Explorar o código

upgrade to a newer Compress::Bzip2 module

Ralf S. Engelschall %!s(int64=20) %!d(string=hai) anos
pai
achega
7003db7054
Modificáronse 2 ficheiros con 9 adicións e 46 borrados
  1. 0 34
      perl-comp/perl-comp.patch
  2. 9 12
      perl-comp/perl-comp.spec

+ 0 - 34
perl-comp/perl-comp.patch

@@ -1,34 +0,0 @@
-Port to BZip2 1.0.x API
-
-Index: Bzip2.xs
---- Bzip2.xs.orig	1999-02-16 15:18:01 +0100
-+++ Bzip2.xs	2004-11-09 17:37:41 +0100
-@@ -41,8 +41,8 @@
- PROTOTYPES:	ENABLE
- 
- BOOT:
--	if (bzlibVersion() == NULL)
--		croak("Compress::Bzip2 cannot load bzip-libraray %s\n",bzlibVersion()) ;
-+	if (BZ2_bzlibVersion() == NULL)
-+		croak("Compress::Bzip2 cannot load bzip-library\n");
- 
- double
- constant(name, arg)
-@@ -76,7 +76,7 @@
- 		new_len = out_len;
- 
- 		out[0] = 0xf0;
--		err = bzBuffToBuffCompress(out+5,&new_len,in,in_len,6,0,240);
-+		err = BZ2_bzBuffToBuffCompress(out+5,&new_len,in,in_len,6,0,240);
- 
- 		if (err != BZ_OK || new_len > out_len)
- 		{
-@@ -113,7 +113,7 @@
- 		SvPOK_only(RETVAL);
- 		out = SvPVX(RETVAL);
- 		new_len = out_len;
--		err = bzBuffToBuffDecompress(out,&new_len,in+5,in_len,0,0);
-+		err = BZ2_bzBuffToBuffDecompress(out,&new_len,in+5,in_len,0,0);
- 		if (err != BZ_OK || new_len != out_len)
- 		{
- 			SvREFCNT_dec(RETVAL);

+ 9 - 12
perl-comp/perl-comp.spec

@@ -26,7 +26,7 @@
 %define       V_perl                 5.8.6
 %define       V_compress_zlib        1.34
 %define       V_compress_lzo         1.08
-%define       V_compress_bzip2       1.00
+%define       V_compress_bzip2       2.05
 %define       V_io_zlib              1.04
 
 #   package information
@@ -40,14 +40,13 @@ Class:        BASE
 Group:        Language
 License:      GPL/Artistic
 Version:      %{V_perl}
-Release:      20050131
+Release:      20050430
 
 #   list of sources
 Source0:      http://www.cpan.org/modules/by-module/Compress/Compress-Zlib-%{V_compress_zlib}.tar.gz
 Source1:      http://www.cpan.org/modules/by-module/Compress/Compress-LZO-%{V_compress_lzo}.tar.gz
-Source2:      http://www.cpan.org/modules/by-module/Compress/Compress-Bzip2-%{V_compress_bzip2}.tar.gz
+Source2:      http://www.cpan.org/authors/id/A/AR/ARJAY/Compress-Bzip2-%{V_compress_bzip2}.tar.gz
 Source3:      http://www.cpan.org/modules/by-module/IO/IO-Zlib-%{V_io_zlib}.tar.gz
-Patch0:       perl-comp.patch
 
 #   build information
 Prefix:       %{l_prefix}
@@ -69,7 +68,7 @@ AutoReqProv:  no
 %track
     prog perl-comp:Compress-Bzip2 = {
         version   = %{V_compress_bzip2}
-        url       = http://www.cpan.org/modules/by-module/Compress/
+        url       = http://www.cpan.org/authors/id/A/AR/ARJAY/
         regex     = Compress-Bzip2-(__VER__)\.tar\.gz
     }
     prog perl-comp:Compress-LZO = {
@@ -93,7 +92,6 @@ AutoReqProv:  no
     %setup -q -T -D -a 1
     %setup -q -T -D -a 2
     %setup -q -T -D -a 3
-    %patch -p0 -d Compress-Bzip2-%{V_compress_bzip2}
 
 %build
 
@@ -110,12 +108,11 @@ AutoReqProv:  no
           -e 's:^#\($LZO_LIB[^=]*\)=.*:\1= "%{l_ldflags}";:' \
           Makefile.PL
     ) || exit $?
-    ( cd Compress-Bzip2-%{V_compress_bzip2}
-      %{l_shtool} subst \
-          -e 's:^#\($Bzip2_LIB[^=]*\)=.*:\1= "%{l_ldflags}";:' \
-          -e 's:^#\($Bzip2_INCLUDE[^=]*\)=.*:\1= "%{l_cppflags bzip2}";:' \
-          Makefile.PL
-    ) || exit $?
+    ( echo "BUILD_BZLIB   = False"
+      echo "BZLIB_INCLUDE = %{l_prefix}/include"
+      echo "BZLIB_LIB     = %{l_prefix}/lib"
+      echo "BZLIB_BIN     = %{l_prefix}/bin"
+    ) >>Compress-Bzip2-%{V_compress_bzip2}/config.in
     %{l_prefix}/bin/perl-openpkg -d %{SOURCE0} configure build install
     %{l_prefix}/bin/perl-openpkg -d %{SOURCE1} configure build install
     %{l_prefix}/bin/perl-openpkg -d %{SOURCE2} configure build install