jcapik pushed to tuxcmd (f22). "- Removing bundled ZipArchive (#1103599) (..more)"
notifications at fedoraproject.org
notifications at fedoraproject.org
Thu Apr 9 15:23:05 UTC 2015
>From c5fd9f72788f1b1f3449055bd8891b79007f1a39 Mon Sep 17 00:00:00 2001
From: Jaromir Capik <jcapik at redhat.com>
Date: Thu, 9 Apr 2015 17:21:32 +0200
Subject: - Removing bundled ZipArchive (#1103599) - Cleaning the spec
diff --git a/tuxcmd-0.6.70-remove-bundled-zip-deps.patch b/tuxcmd-0.6.70-remove-bundled-zip-deps.patch
new file mode 100644
index 0000000..25a13f3
--- /dev/null
+++ b/tuxcmd-0.6.70-remove-bundled-zip-deps.patch
@@ -0,0 +1,124 @@
+diff -Naur tuxcmd-modules-0.6.70.orig/zip/Makefile tuxcmd-modules-0.6.70/zip/Makefile
+--- tuxcmd-modules-0.6.70.orig/zip/Makefile 2009-11-15 17:00:40.000000000 +0100
++++ tuxcmd-modules-0.6.70/zip/Makefile 2015-04-09 16:57:41.000000000 +0200
+@@ -2,12 +2,11 @@
+ DESTDIR = /usr
+ INSTALL=install -c
+ INSTALL_DATA = ${INSTALL} -m 644
+-DIR_ZIPARCHIVE = ./ZipArchive/
+
+ # compiler options
+ CC = gcc
+ CPP = g++
+-CFLAGS =-I. -I$(DIR_ZIPARCHIVE) -I/usr/include \
++CFLAGS =-I. -I/usr/include/ZipArchive -I/usr/include \
+ -Wall -fPIC -O2 -g \
+ -DG_DISABLE_DEPRECATED -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE \
+ -D__VERBOSE_DEBUGx
+@@ -30,11 +29,8 @@
+
+ all shared static: libzip_plugin.so
+
+-libzip_plugin.so: ziparchive $(VFS_COMMON_OBJECTS) $(VFS_CPP_OBJECTS) $(VFS_C_OBJECTS)
+- $(CPP) -shared -o libzip_plugin.so zip.o $(VFS_COMMON_OBJECTS) $(DIR_ZIPARCHIVE)libziparch.a -lz -lm $(CFLAGS) `pkg-config glib-2.0 --libs`
+-
+-ziparchive:
+- ( cd $(DIR_ZIPARCHIVE) && make -f ../Makefile.ziparch ) || exit 1
++libzip_plugin.so: $(VFS_COMMON_OBJECTS) $(VFS_CPP_OBJECTS) $(VFS_C_OBJECTS)
++ $(CPP) -shared -o libzip_plugin.so zip.o $(VFS_COMMON_OBJECTS) -lziparch -lz -lm $(CFLAGS) `pkg-config glib-2.0 --libs`
+
+ strutils.o: strutils.c strutils.h
+ treepathutils.o: treepathutils.c treepathutils.h
+@@ -46,5 +42,4 @@
+ $(INSTALL) ./libzip_plugin.so $(DESTDIR)/lib$(LIB_SUFFIX)/tuxcmd/
+
+ clean:
+- ( cd $(DIR_ZIPARCHIVE) && make -f ../Makefile.ziparch clean ) || exit 1
+ rm -f *.o *.d *.gch libzip_plugin.so
+diff -Naur tuxcmd-modules-0.6.70.orig/zip/zip.cpp tuxcmd-modules-0.6.70/zip/zip.cpp
+--- tuxcmd-modules-0.6.70.orig/zip/zip.cpp 2009-11-15 17:00:40.000000000 +0100
++++ tuxcmd-modules-0.6.70/zip/zip.cpp 2015-04-09 16:56:53.000000000 +0200
+@@ -359,7 +359,7 @@
+ globs->zip->SetCallback(globs->extract_callback, CZipActionCallback::cbAdd);
+
+ // Set automatic flushing of changes to disk
+- globs->zip->SetAutoFlush(true);
++ globs->zip->SetAutoFinalize(true);
+ }
+ catch (CZipException e) {
+ printf ("(EE) VFSOpenArchive: Error while processing archive %s\n%s\n", (LPCTSTR) sName, (LPCTSTR)e.GetErrorDescription());
+@@ -386,7 +386,7 @@
+ // Closing the archive...
+ fprintf(stderr, "(II) VFSClose: Closing the archive...\n");
+ try {
+- if (globs->archive_modified) globs->zip->Flush();
++ if (globs->archive_modified) globs->zip->Finalize();
+ globs->zip->Close(CZipArchive::afNoException, false);
+ //*** In case of inconsistency, try using afWriteDir value
+ // (Use when an exception was thrown. The Close method writes the
+@@ -558,7 +558,7 @@
+ try {
+ CZipFileHeader header;
+ // globs->zip->SetFileHeaderAttr(header, 0x41ED0010); // alternatively use ZipPlatform::GetDefaultAttributes();
+- globs->zip->SetFileHeaderAttr(header, 0x41ED); // alternatively use ZipPlatform::GetDefaultAttributes();
++ header.SetSystemAttr(0x41ED); // alternatively use ZipPlatform::GetDefaultAttributes();
+ char *s = exclude_leading_path_sep(sDirName);
+ header.SetFileName(s);
+ free(s);
+@@ -642,6 +642,7 @@
+
+ TVFSResult VFSRename(struct TVFSGlobs *globs, const char *sSrcName, const char *sDstName)
+ {
++
+ printf ("(II) VFSRename: Going to rename/move the file '%s' to '%s'...\n", sSrcName, sDstName);
+
+ char *AFile = exclude_trailing_path_sep(sSrcName);
+@@ -654,9 +655,11 @@
+ return cVFS_Failed;
+ }
+
++ CZipFileHeader *header = globs->zip->GetFileInfo(file_no);
++
+ try {
+ try {
+- if (! globs->zip->RenameFile(file_no, ADestFile)) {
++ if (! header->SetFileName(ADestFile)) {
+ printf ("(EE) VFSRename: Rename/move file '%s' failed.\n", sSrcName);
+ return cVFS_Failed;
+ }
+@@ -721,7 +724,7 @@
+ printf("(II) VFSChmod: Current permissions: 0x%lX, stripped: 0x%lX, setting to: 0x%X, modified: 0x%lX\n",
+ header->GetSystemAttr(), header->GetSystemAttr() & 0xFFFFF000,
+ Mode & 0xFFF, (header->GetSystemAttr() & 0xFFFFF000) + (Mode & 0xFFF));
+- globs->zip->SetFileHeaderAttr(*header, (header->GetSystemAttr() & 0xFFFFF000) + (Mode & 0xFFF));
++ header->SetSystemAttr((header->GetSystemAttr() & 0xFFFFF000) + (Mode & 0xFFF));
+
+ // write the local header information
+ globs->zip->OverwriteLocalHeader(file_no);
+@@ -735,7 +738,7 @@
+ }
+ */
+ globs->zip->RemoveCentralDirectoryFromArchive();
+- globs->zip->Flush();
++ globs->zip->Finalize();
+
+
+ printf("(II) VFSChmod OK.\n");
+@@ -902,7 +905,7 @@
+ do {
+ try {
+ try_again = FALSE;
+- if (! globs->zip->ExtractFile(file_no, dest_path, false, dest_filename, globs->block_size)) {
++ if (! globs->zip->ExtractFile(file_no, dest_path, false, dest_filename, ZipPlatform::dfmRegular, globs->block_size)) {
+ globs->zip->CloseFile(NULL, true);
+ fprintf(stderr, "(EE) VFSCopyToLocal: Error while copying out, archive closed = %d.\n", globs->zip->IsClosed());
+ return cVFS_WriteErr;
+@@ -972,7 +975,7 @@
+ return cVFS_WriteErr;
+ }
+
+- globs->zip->Flush();
++ globs->zip->Finalize();
+ printf("(II) VFSCopyFromLocal: copy OK, archive closed = %d.\n", globs->zip->IsClosed());
+ build_global_filelist(globs);
+ globs->archive_modified = true;
diff --git a/tuxcmd-module-ziparchive-gcc-4.7-2.patch b/tuxcmd-module-ziparchive-gcc-4.7-2.patch
deleted file mode 100644
index 1763d76..0000000
--- a/tuxcmd-module-ziparchive-gcc-4.7-2.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From f4d8292cf67ab481a27ea88f04e2edd6dc16119e Mon Sep 17 00:00:00 2001
-From: Tomas Bzatek <tbzatek at redhat.com>
-Date: Fri, 3 Feb 2012 15:37:06 +0100
-Subject: [PATCH] ZipArchive: More complete fix for gcc-4.7
-
-Reverting the #ifdef changes I did last time and adding an include
-should do the trick. More testing on older platforms is needed though.
----
- zip/ZipArchive/stdafx.h | 3 ++-
- 1 files changed, 2 insertions(+), 1 deletions(-)
-
-diff --git a/zip/ZipArchive/stdafx.h b/zip/ZipArchive/stdafx.h
-index db54a41..ddb2fd4 100644
---- a/zip/ZipArchive/stdafx.h
-+++ b/zip/ZipArchive/stdafx.h
-@@ -23,6 +23,7 @@
-
- #include "_features.h"
- #include "_platform.h"
-+#include <unistd.h>
-
- #if _MSC_VER > 1000
- #pragma once
-@@ -67,7 +68,7 @@
- #define ZIP_SIZE_TYPE DWORD
- #define ZIP_ZLIB_TYPE int
-
--#if !defined(_INTPTR_T_DEFINED)
-+#if !defined(_INTPTR_T_DEFINED) && !defined(__GNUC__)
- #if defined (__BORLANDC__)
- #include <stdint.h>
- #elif _MSC_VER <= 1200 || !defined _MSC_VER
---
-1.7.8.4
-
diff --git a/tuxcmd-module-ziparchive-gcc-4.7.patch b/tuxcmd-module-ziparchive-gcc-4.7.patch
deleted file mode 100644
index 3c4da72..0000000
--- a/tuxcmd-module-ziparchive-gcc-4.7.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From e932ebbf029a4cdb38c61a838e8f3669debd410e Mon Sep 17 00:00:00 2001
-From: Tomas Bzatek <tbzatek at redhat.com>
-Date: Tue, 31 Jan 2012 13:19:50 +0000
-Subject: ZipArchive: GCC 4.7 compatibility
-
----
-diff --git a/zip/ZipArchive/ZipCollections_stl.h b/zip/ZipArchive/ZipCollections_stl.h
-index 8792a6e..3facaad 100644
---- a/zip/ZipArchive/ZipCollections_stl.h
-+++ b/zip/ZipArchive/ZipCollections_stl.h
-@@ -86,10 +86,10 @@ public:
- }
- TYPE& GetAt(size_t uIndex) {return this->at(uIndex);}
- const TYPE& GetAt(size_t uIndex) const {return this->at(uIndex);}
-- size_t Add(const TYPE& x) {push_back(x);return GetUpperBound();}
-+ size_t Add(const TYPE& x) {this->push_back(x);return GetUpperBound();}
- void RemoveAll() {this->clear();}
-- void RemoveAt(size_t uIndex) { erase(GetIterFromIndex(uIndex));}
-- void InsertAt(size_t uIndex, const TYPE& x){insert(GetIterFromIndex(uIndex), x);}
-+ void RemoveAt(size_t uIndex) { this->erase(GetIterFromIndex(uIndex));}
-+ void InsertAt(size_t uIndex, const TYPE& x){this->insert(GetIterFromIndex(uIndex), x);}
-
- TYPE& operator[](size_t uIndex)
- {
-@@ -114,8 +114,8 @@ public:
- typedef typename std::list<TYPE>::iterator iterator;
- typedef typename std::list<TYPE>::const_iterator const_iterator;
- size_t GetCount() const {return this->size();}
-- void AddTail(const TYPE& x){push_back(x);}
-- void AddHead(const TYPE& x){push_front(x);}
-+ void AddTail(const TYPE& x){this->push_back(x);}
-+ void AddHead(const TYPE& x){this->push_front(x);}
- void RemoveHead() {this->pop_front();}
- void RemoveTail() {this->pop_back();}
- void RemoveAll() {this->clear();}
-@@ -131,7 +131,7 @@ public:
- TYPE& GetPrev(iterator& pos) { return *pos--;}
- TYPE GetPrev(iterator& pos) const{ return *pos--;}
- iterator Find(TYPE& x) { return std::find(this->begin(), this->end(), x);}
-- void RemoveAt(iterator& pos) { erase(pos);}
-+ void RemoveAt(iterator& pos) { this->erase(pos);}
- bool IteratorValid(const_iterator &iter) const
- {
- return iter != this->end();
-@@ -167,11 +167,11 @@ public:
- typedef typename std::map<KEY,VALUE, std::less<KEY>, std::allocator<std::pair<const KEY, VALUE> > >::value_type v_type;
- void SetAt( KEY key, VALUE newValue)
- {
-- insert(v_type(key, newValue));
-+ this->insert(v_type(key, newValue));
- }
- ZBOOL RemoveKey( KEY key )
- {
-- return erase(key) != 0;
-+ return this->erase(key) != 0;
- }
- ZBOOL Lookup( KEY key, VALUE& rValue ) const
- {
-diff --git a/zip/ZipArchive/stdafx.h b/zip/ZipArchive/stdafx.h
-index 9d96081..db54a41 100644
---- a/zip/ZipArchive/stdafx.h
-+++ b/zip/ZipArchive/stdafx.h
-@@ -67,7 +67,7 @@
- #define ZIP_SIZE_TYPE DWORD
- #define ZIP_ZLIB_TYPE int
-
--#if !defined(_INTPTR_T_DEFINED) && !defined(__GNUC__)
-+#if !defined(_INTPTR_T_DEFINED)
- #if defined (__BORLANDC__)
- #include <stdint.h>
- #elif _MSC_VER <= 1200 || !defined _MSC_VER
---
-cgit v0.9.0.2
diff --git a/tuxcmd.spec b/tuxcmd.spec
index d619b2a..bb2efac 100644
--- a/tuxcmd.spec
+++ b/tuxcmd.spec
@@ -1,6 +1,6 @@
Name: tuxcmd
Version: 0.6.70
-Release: 14%{?dist}
+Release: 15%{?dist}
Summary: Tux Commander: file manager with 2 panels side by side using GTK2
Group: Applications/File
@@ -12,13 +12,16 @@ ExcludeArch: s390 s390x
URL: http://tuxcmd.sourceforge.net/
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
Source1: http://downloads.sourceforge.net/%{name}/%{name}-modules-%{version}.tar.bz2
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: fpc >= 2.6.2-4%{?dist}
BuildRequires: glib2-devel
BuildRequires: gtk2-devel
BuildRequires: desktop-file-utils
BuildRequires: libgcc
+BuildRequires: ZipArchive-devel
+BuildRequires: zlib-devel
+BuildRequires: bzip2-devel
+
# turn smartlinking off, not needed anymore with fpc-2.2.2-2
Patch4: tuxcmd-disable-smartlinking.patch
@@ -28,13 +31,12 @@ Patch4: tuxcmd-disable-smartlinking.patch
Patch5: tuxcmd-module-libarchive_libarchive-3.0.0a.patch
Patch6: tuxcmd-module-gvfs_include-glib.patch
-# GCC 4.7 compatibility
-Patch7: tuxcmd-module-ziparchive-gcc-4.7.patch
-Patch8: tuxcmd-module-ziparchive-gcc-4.7-2.patch
-
# ARM linking compatibility
Patch9: tuxcmd-arm-gcc_s.so-linking.patch
+# Remove bundled zip deps (#1103599)
+Patch10: tuxcmd-0.6.70-remove-bundled-zip-deps.patch
+
%description
Tux Commander is open-source file manager with 2 panels side by side written
for GTK2. The main goal of this project is to create powerful user-friendly
@@ -49,6 +51,7 @@ Requires: %{name} = %{version}-%{release}
BuildRequires: libarchive-devel >= 2.5.5
BuildRequires: bzip2-devel
+
%description modules
The tuxcmd-modules package contains extra VFS (virtual file system) modules
extending Tux Commander's functionality:
@@ -62,12 +65,11 @@ Group: Applications/File
Requires: %{name} = %{version}-%{release}
Requires: gvfs
+
%description gvfs
This package contains networking GVFS module for Tux Commander file manager.
-
-
%prep
%setup -q -b 1
%patch4 -p1 -b .disable-smartlinking
@@ -78,12 +80,14 @@ ln -s %{_libdir}/libgcc_s.so.1 libgcc_s.so
pushd ../%{name}-modules-%{version}
%patch5 -p1 -b .libarchive3
%patch6 -p1 -b .glib-include
-%patch7 -p1 -b .gcc-4.7
-%patch8 -p1 -b .gcc-4.7-2
+%patch10 -p1 -b .bundled-zip
popd
-%build
+# Removing bundled ZipArchive
+rm -rf ../tuxcmd-modules-0.6.70/zip/ZipArchive
+
+%build
make final_debug
# build modules
@@ -92,7 +96,6 @@ make CC="gcc %{optflags}" CPP="g++ %{optflags}" shared
%install
-rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT/usr
desktop-file-install --delete-original \
--dir $RPM_BUILD_ROOT%{_datadir}/applications \
@@ -110,11 +113,6 @@ mkdir -p doc/zip
cp -pr zip/{COPYING,README} doc/zip
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-
%post
update-desktop-database %{_datadir}/applications &> /dev/null
touch --no-create %{_datadir}/icons/hicolor
@@ -122,6 +120,7 @@ if [ -x /usr/bin/gtk-update-icon-cache ]; then
gtk-update-icon-cache -q %{_datadir}/icons/hicolor
fi
+
%postun
update-desktop-database %{_datadir}/applications &> /dev/null
touch --no-create %{_datadir}/icons/hicolor
@@ -131,7 +130,6 @@ fi
%files
-%defattr(-,root,root,-)
%doc COPYING README
%dir %{_libdir}/tuxcmd
%{_bindir}/tuxcmd
@@ -141,20 +139,23 @@ fi
%files modules
-%defattr(-,root,root,-)
%doc ../%{name}-modules-%{version}/doc/libarchive
%doc ../%{name}-modules-%{version}/doc/zip
%{_libdir}/tuxcmd/libarchive_plugin.so
%{_libdir}/tuxcmd/libzip_plugin.so
+
%files gvfs
-%defattr(-,root,root,-)
%doc ../%{name}-modules-%{version}/gvfs/README
%doc ../%{name}-modules-%{version}/gvfs/COPYING
%{_libdir}/tuxcmd/libgvfs_plugin.so
%changelog
+* Thu Apr 09 2015 Jaromir Capik <jcapik at redhat.com> - 0.6.70-15
+- Removing bundled ZipArchive (#1103599)
+- Cleaning the spec
+
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.6.70-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/tuxcmd.git/commit/?h=f22&id=c5fd9f72788f1b1f3449055bd8891b79007f1a39
More information about the scm-commits
mailing list