Subject: | RFE: patch to allow compiling against system libbz2 |
I've attached a tiny patch that I'm planning to use in the Fedora
package for Compress::Raw::Bzip2 to compile against the system libbz2.
The default behavior remains unchanged.
Subject: | Compress-Raw-Bzip2-2.004-system-libbz2.patch |
--- Compress-Raw-Bzip2-2.004/Makefile.PL.orig 2007-01-11 05:01:22.000000000 -0600
+++ Compress-Raw-Bzip2-2.004/Makefile.PL 2007-03-16 12:29:55.000000000 -0500
@@ -9,8 +9,9 @@
my $WALL= '';
$WALL = ' -Wall -Wno-comment ' if $Config{'cc'} =~ /gcc/ ;
-my $BZIP2_LIB = 'bzip2-src';
-my $BZIP2_INCLUDE = '.';
+my $BUILD_BZIP2 = defined($ENV{BUILD_BZIP2}) ? $ENV{BUILD_BZIP2} : 1;
+my $BZIP2_LIB = defined($ENV{BZIP2_LIB}) ? $ENV{BZIP2_LIB} : 'bzip2-src';
+my $BZIP2_INCLUDE = defined($ENV{BZIP2_INCLUDE}) ? $ENV{BZIP2_INCLUDE} : '.';
#ParseCONFIG() ;
@@ -38,13 +39,11 @@
),
- bzip2_files($BZIP2_LIB),
-
-# (
-# $BUILD_BZIP2
-# ? bzip2_files($ZLIB_LIB)
-# : (LIBS => [ "-L$BZIP2_LIB -lbz2 " ])
-# ),
+ (
+ $BUILD_BZIP2
+ ? bzip2_files($BZIP2_LIB)
+ : (LIBS => [ "-L$BZIP2_LIB -lbz2 " ])
+ ),
(
$] >= 5.005