[mingw-zfstream: 2/15] import from review

Kalev Lember kalev at fedoraproject.org
Wed Mar 7 18:25:23 UTC 2012


commit 7ad51a90e5c8c22dee21b6bc4a7d3359752e4ddf
Author: sailer <sailer at fedoraproject.org>
Date:   Fri May 22 00:03:00 2009 +0000

    import from review

 .cvsignore            |    2 +
 mingw32-zfstream.spec |   92 +++++++++++++++++++++++++++++++++++++++++++++++++
 sources               |    2 +
 zfstream-zip.patch    |   76 ++++++++++++++++++++++++++++++++++++++++
 4 files changed, 172 insertions(+), 0 deletions(-)
---
diff --git a/.cvsignore b/.cvsignore
index e69de29..ba69064 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -0,0 +1,2 @@
+libs11n_zfstream-2004.12.02.tar.gz
+zfstream-autotools.tar.gz
diff --git a/mingw32-zfstream.spec b/mingw32-zfstream.spec
new file mode 100644
index 0000000..54e74be
--- /dev/null
+++ b/mingw32-zfstream.spec
@@ -0,0 +1,92 @@
+%global __strip %{_mingw32_strip}
+%global __objdump %{_mingw32_objdump}
+%global _use_internal_dependency_generator 0
+%global __find_requires %{_mingw32_findrequires}
+%global __find_provides %{_mingw32_findprovides}
+
+%global vday 02
+%global vmonth 12
+%global vyear 2004
+%global name1 zfstream
+
+Name:           mingw32-%{name1}
+Version:        %{vyear}%{vmonth}%{vday}
+Release:        5%{?dist}
+Summary:        MinGW Windows abstraction API for reading and writing compressed files
+
+Group:          System Environment/Libraries
+License:        LGPLv2+
+URL:            http://www.wanderinghorse.net/computing/%{name1}/
+Source0:        http://www.wanderinghorse.net/computing/%{name1}/libs11n_%{name1}-%{vyear}.%{vmonth}.%{vday}.tar.gz
+# I tried half a day to get the rather peculiar original build system working,
+# but I failed, so I decided to simply replace it by autotools.
+# This has the further advantage that it knows how to cross-compile.
+Source1:        %{name1}-autotools.tar.gz
+# The patch has been sent via private mail to the author. The author responded
+# that the patch had been integrated into his personal tree, but apparently
+# he has not gotten around to release a new version.
+Patch1:         %{name1}-zip.patch
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildArch:      noarch
+
+BuildRequires:  mingw32-bzip2
+BuildRequires:  mingw32-zlib
+BuildRequires:  mingw32-minizip
+BuildRequires:  libtool
+BuildRequires:  automake
+BuildRequires:  mingw32-filesystem >= 23
+BuildRequires:  mingw32-gcc
+BuildRequires:  mingw32-binutils
+BuildRequires:  mingw32-gcc-c++
+
+%description
+MinGW zfstream C++ compressed I/O abstraction library
+
+
+%prep
+%setup -q -n libs11n_%{name1}-%{vyear}.%{vmonth}.%{vday} -a 1
+%patch1 -p0 -b .zip
+touch NEWS README AUTHORS
+aclocal
+autoconf
+autoheader
+libtoolize -f
+automake -a -c
+
+%build
+%{_mingw32_configure} --disable-static
+make %{?_smp_mflags}
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+make install DESTDIR=$RPM_BUILD_ROOT
+
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%files
+%defattr(-,root,root,-)
+%doc LICENSE
+%{_mingw32_bindir}/libzfstream-0.dll
+%{_mingw32_includedir}/*
+%{_mingw32_libdir}/libzfstream.dll.a
+%{_mingw32_libdir}/libzfstream.la
+%{_mingw32_libdir}/pkgconfig/zfstream.pc
+
+%changelog
+* Fri May 15 2009 Thomas Sailer <t.sailer at alumni.ethz.ch> - 20041202-5
+- add missing BR
+
+* Fri May  1 2009 Thomas Sailer <t.sailer at alumni.ethz.ch> - 20041202-4
+- incorporate changes from native review
+
+* Mon Mar 23 2009 Thomas Sailer <t.sailer at alumni.ethz.ch> - 20041202-3
+- unfiy main and devel subpackages
+
+* Mon Mar 23 2009 Thomas Sailer <t.sailer at alumni.ethz.ch> - 20041202-2
+- copy from native package
+
diff --git a/sources b/sources
index e69de29..e0eaeb9 100644
--- a/sources
+++ b/sources
@@ -0,0 +1,2 @@
+906e46120012978a6715b425dd6db0a7  libs11n_zfstream-2004.12.02.tar.gz
+fb26ab3f2a3e0c3f41adf3d0068fa589  zfstream-autotools.tar.gz
diff --git a/zfstream-zip.patch b/zfstream-zip.patch
new file mode 100644
index 0000000..e0b3ca4
--- /dev/null
+++ b/zfstream-zip.patch
@@ -0,0 +1,76 @@
+--- src/zfstream.hpp.orig	2007-12-28 17:04:40.000000000 +0100
++++ src/zfstream.hpp	2007-12-28 17:06:16.000000000 +0100
+@@ -45,7 +45,9 @@
+                  */
+         	GZipCompression = ZLibCompression,
+                 /** BZipCompression means to use the zfstream::obzstream class for output streams. */
+-	        BZipCompression = 2
++	        BZipCompression = 2,
++                /** ZipCompression means to use the zfstream::ozipstream class for output streams. */
++	        ZipCompression = 3
+         };
+ 
+         /**
+@@ -81,6 +83,7 @@
+            - std::ifstream
+            - zfstream::gzstream
+            - zfstream::bzstream
++           - zfstream::zipstream
+ 
+            It will return NULL if it cannot open filename, or a
+            std::ifstream if it cannot figure out a decompression
+@@ -110,6 +113,7 @@
+ 
+            - zfstream::ogzstream
+            - zfstream::obzstream
++           - zfstream::ozipstream
+            - std::ofstream
+ 
+            Note that this function only uses filename to pass to the
+--- src/zfstream.cpp.orig	2007-12-28 17:04:49.000000000 +0100
++++ src/zfstream.cpp	2007-12-28 17:11:39.000000000 +0100
+@@ -17,6 +17,7 @@
+ 
+ #if HAVE_ZLIB
+ #  include "gzstream.hpp"
++#  include "zipstream.hpp"
+ #endif
+ #if HAVE_BZLIB
+ #  include "bzstream.hpp"
+@@ -33,6 +34,7 @@
+                   case( NoCompression ): return "NoCompression";  break;
+                   case( ZLibCompression ): return "ZLibCompression"; break;
+                   case( BZipCompression ): return "BZipCompression"; break;
++                  case( ZipCompression ): return "ZipCompression"; break;
+                   default: return ""; break;
+                 }
+         }
+@@ -46,6 +48,7 @@
+ #endif                
+ #if HAVE_ZLIB
+                 if( ZLibCompression == p ) return true;
++                if( ZipCompression == p ) return true;
+ #endif            
+                 return false;
+         }
+@@ -107,6 +110,12 @@
+                         //COUT << "gzip!"<<std::endl;
+                         return new zfstream::igzstream( src.c_str() );
+                 }
++                // zip=504b 0304 (dec: 80 75 3 4)  ascii: PK\003\004
++                if( 0x50 == buff[0] && 0x4b == buff[1] )
++                {
++                        //COUT << "zip!"<<std::endl;
++                        return new zfstream::izipstream( src.c_str() );
++                }
+ #endif            
+                 return new std::ifstream( src.c_str() );
+         }
+@@ -121,6 +130,7 @@
+                   // REMINDER: when/if GZip/ZLib mean different things, this will break!
+                   // C++ won't let me put both in here when they have the same value.
+                   case ZLibCompression: return new zfstream::ogzstream( fname.c_str() );
++                  case ZipCompression: return new zfstream::ozipstream( fname.c_str() );
+ #endif
+ #if HAVE_BZLIB
+                   case BZipCompression: return new zfstream::obzstream( fname.c_str() );


More information about the scm-commits mailing list