diff options
author | Yaakov Selkowitz <yselkowitz@users.sourceforge.net> | 2011-03-16 00:55:17 -0500 |
---|---|---|
committer | Yaakov Selkowitz <yselkowitz@users.sourceforge.net> | 2011-03-16 00:55:17 -0500 |
commit | 13da0e7ac7e41ccdcfb22555b8ce9704d323c75a (patch) | |
tree | 71c0d9ab5c8f66dc08284ad327297d2c8ea50113 | |
download | cygwin-bzip2-13da0e7ac7e41ccdcfb22555b8ce9704d323c75a.tar.gz cygwin-bzip2-13da0e7ac7e41ccdcfb22555b8ce9704d323c75a.tar.xz cygwin-bzip2-13da0e7ac7e41ccdcfb22555b8ce9704d323c75a.zip |
cygwin-bzip2 1.0.6-1
-rw-r--r-- | bzip2-1.0.4-bzip2recover.patch | 12 | ||||
-rw-r--r-- | bzip2-1.0.6-cygwin-dll.patch | 15 | ||||
-rw-r--r-- | cygwin-bzip2.spec | 127 | ||||
-rw-r--r-- | sources | 1 |
4 files changed, 155 insertions, 0 deletions
diff --git a/bzip2-1.0.4-bzip2recover.patch b/bzip2-1.0.4-bzip2recover.patch new file mode 100644 index 0000000..e2bfe1c --- /dev/null +++ b/bzip2-1.0.4-bzip2recover.patch @@ -0,0 +1,12 @@ +--- bzip2-1.0.4/bzip2recover.c.pom 2007-01-03 03:00:55.000000000 +0100 ++++ bzip2-1.0.4/bzip2recover.c 2007-02-05 11:55:17.000000000 +0100 +@@ -309,7 +309,8 @@ + UInt32 buffHi, buffLo, blockCRC; + Char* p; + +- strcpy ( progName, argv[0] ); ++ strncpy ( progName, argv[0], BZ_MAX_FILENAME-1); ++ progName[BZ_MAX_FILENAME-1]='\0'; + inFileName[0] = outFileName[0] = 0; + + fprintf ( stderr, diff --git a/bzip2-1.0.6-cygwin-dll.patch b/bzip2-1.0.6-cygwin-dll.patch new file mode 100644 index 0000000..afc61ca --- /dev/null +++ b/bzip2-1.0.6-cygwin-dll.patch @@ -0,0 +1,15 @@ +--- a/Makefile-libbz2_so ++++ b/Makefile-libbz2_so +@@ -35,10 +35,8 @@ + bzlib.o + + all: $(OBJS) +- $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.6 $(OBJS) +- $(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.6 +- rm -f libbz2.so.1.0 +- ln -s libbz2.so.1.0.6 libbz2.so.1.0 ++ $(CC) $(CFLAGS) -shared -Wl,--out-implib -Wl,libbz2.dll.a -o cygbz2-1.dll $(OBJS) ++ $(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.dll.a + + clean: + rm -f $(OBJS) bzip2.o libbz2.so.1.0.6 libbz2.so.1.0 bzip2-shared diff --git a/cygwin-bzip2.spec b/cygwin-bzip2.spec new file mode 100644 index 0000000..9dfadda --- /dev/null +++ b/cygwin-bzip2.spec @@ -0,0 +1,127 @@ +%define __strip %{_cygwin_strip} +%define __objdump %{_cygwin_objdump} +%define _use_internal_dependency_generator 0 +%define __find_requires %{_cygwin_findrequires} +%define __find_provides %{_cygwin_findprovides} + +# Running the tests requires Wine. +%define run_tests 0 + +Name: cygwin-bzip2 +Version: 1.0.6 +Release: 1%{?dist} +Summary: Cygwin port of bzip2 file compression utility + +License: BSD +Group: Development/Libraries +URL: http://www.bzip.org/ +Source0: http://www.bzip.org/%{version}/bzip2-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildArch: noarch + +Patch6: bzip2-1.0.4-bzip2recover.patch +Patch11: bzip2-1.0.6-cygwin-dll.patch + +BuildRequires: cygwin-filesystem +BuildRequires: cygwin-binutils +BuildRequires: cygwin-gcc +BuildRequires: cygwin + +%if %{run_tests} +BuildRequires: wine +%endif + + +%description +Bzip2 is a freely available, patent-free, high quality data compressor. +Bzip2 compresses files to within 10 to 15 percent of the capabilities +of the best techniques available. However, bzip2 has the added benefit +of being approximately two times faster at compression and six times +faster at decompression than those techniques. Bzip2 is not the +fastest compression utility, but it does strike a balance between speed +and compression capability. + +This package contains development tools and libraries for use when +cross-compiling Cygwin software in Fedora. + + +%prep +%setup -q -n bzip2-%{version} + +%patch6 -p1 -b .bz2recover +%patch11 -p1 -b .dll + + +%build +make -f Makefile-libbz2_so \ + CC="%{_cygwin_cc}" \ + AR="%{_cygwin_ar}" \ + RANLIB="%{_cygwin_ranlib}" \ + CFLAGS="%{_cygwin_cflags} -D_FILE_OFFSET_BITS=64" \ + %{?_smp_mflags} all + +rm -f *.o +make CC="%{_cygwin_cc}" \ + AR="%{_cygwin_ar}" \ + RANLIB="%{_cygwin_ranlib}" \ + CFLAGS="%{_cygwin_cflags} -D_FILE_OFFSET_BITS=64" \ + %{?_smp_mflags} \ +%if %{run_tests} + all +%else + libbz2.a bzip2 bzip2recover +%endif + + +%install +rm -rf $RPM_BUILD_ROOT +make PREFIX=$RPM_BUILD_ROOT%{_cygwin_prefix} install + +# The binaries which are symlinks contain the full buildroot +# name in the symlink, so replace those. +pushd $RPM_BUILD_ROOT%{_cygwin_bindir} +rm bzcmp bzegrep bzfgrep bzless +ln -s bzdiff bzcmp +ln -s bzgrep bzegrep +ln -s bzgrep bzfgrep +ln -s bzmore bzless +popd + +# Remove the manpages, they're duplicates of the native package, +# and located in the wrong place anyway. +rm -rf $RPM_BUILD_ROOT%{_cygwin_prefix}/man + +# The Makefile doesn't install the DLL. +install -m0755 cygbz2-1.dll $RPM_BUILD_ROOT%{_cygwin_bindir}/ +install -m0644 libbz2.dll.a $RPM_BUILD_ROOT%{_cygwin_libdir}/ + +# Remove the static library. +rm $RPM_BUILD_ROOT%{_cygwin_libdir}/libbz2.a + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc LICENSE +%{_cygwin_bindir}/cygbz2-1.dll +%{_cygwin_includedir}/bzlib.h +%{_cygwin_libdir}/libbz2.dll.a +%{_cygwin_bindir}/bunzip2 +%{_cygwin_bindir}/bzcat +%{_cygwin_bindir}/bzcmp +%{_cygwin_bindir}/bzdiff +%{_cygwin_bindir}/bzegrep +%{_cygwin_bindir}/bzfgrep +%{_cygwin_bindir}/bzgrep +%{_cygwin_bindir}/bzip2 +%{_cygwin_bindir}/bzip2recover +%{_cygwin_bindir}/bzless +%{_cygwin_bindir}/bzmore + + +%changelog +* Wed Mar 16 2011 Yaakov Selkowitz <cygwin-ports-general@lists.sourceforge.net> - 1.0.6-1 +- Initial spec file, largely based on mingw32-bzip2. @@ -0,0 +1 @@ +00b516f4704d4a7cb50a1d97e6e8e15b bzip2-1.0.6.tar.gz |