Skip to content

Commit

Permalink
Sync Compress-Raw-Zlib with CPAN 2.202
Browse files Browse the repository at this point in the history
From ChangeLog:

  2.202 27 June 2022

      * Z_NULL should be 'UV' rather than 'PV'
        pmqs/Compress-Raw-Zlib#17
        Sun Jun 26 22:02:04 2022 +0100
        de28f0335d3d605d696b19d43fc48de42272455c

  2.201 25 June 2022

      * 2.021
        Sat Jun 25 08:42:46 2022 +0100
        85416cab509c18c5fa3f923de7b45b6c7c0f7a6f

      * 2.201
        Sat Jun 25 08:39:26 2022 +0100
        b3d63862b2ff4ac9d28e23be500c0d32ad69dd11

      * More zlib-ng updates
        Thu Jun 23 22:42:13 2022 +0100
        313f626425181702b5fc80af2b6ea7eed41d5a9d

      * Fix test count regression in t/07bufsize.t (#16)
        Wed Jun 22 09:45:11 2022 +0100
        98dc5b4a2b30c26752b6f686462b06b8db72a5e4

  2.200 21 June 2022

      * Added zlib-ng support
        pmqs/Compress-Raw-Zlib#9

      * Only set Z_SOLO when building zlib sources
      * pmqs/Compress-Raw-Zlib#12
        Tue Jun 7 10:13:00 2022 +0100
        c44e0b732e214b7f77d42a3af6ae64ef944cee90

  2.105 14 April 2022

      * Add Compress::Raw::Zlib::VERSION to output
        Sat May 14 15:16:57 2022 +0100
        3e22c93169a67986017f64d9a2e5085c417d8624

      * Dump version info when running test harness
        Sat May 14 15:10:17 2022 +0100
        ca9f33ba0323d0abc91a83800636f180b2b44162

      * Fix use of ZLIB_INCLUDE/LIB
        Sat May 14 09:01:38 2022 +0100
        8a7d4a97d7441b61a8a888342766419044fa5a33

      * More fixes for BUILD_ZLIB off
        Sat May 14 08:54:04 2022 +0100
        2d9650094dab90858ef58bfbda62f3bc60e159e4

      * Add BUILD_ZLIB to the matrix
        Sat May 14 08:31:54 2022 +0100
        b61b92fc9d06bf04f1adec337357ffbd39535901

      * Merge branch 'master' of
      * https://github.com/pmqs/Compress-Raw-Zlib
        Sat May 14 08:27:14 2022 +0100
        3ac7d0d3d45ae263402fab1ebb3835e2ae16c5a6

      * Fix for BUILD_ZLIB disabled
        Sat May 14 08:25:34 2022 +0100
        b0f04e37fb58a34ef01767ad16a8f63ca868eec6

      * Add BUILD_ZLIB to the matrix
        Sat May 14 08:22:56 2022 +0100
        aa8f5ff981c7305c995d4e2f798ae0d7d45866a5

  2.104 13 April 2022

      * Merge pull request #11 from monkburger/symbol_fix_2
        Fri May 13 07:17:19 2022 +0100
        64aea2d3f78946d7df4096eadfa0d7267f4439a5

      * perl_crz -> Perl_crz
        Tue May 3 18:19:24 2022 +0000
        20502e6c2eba8ddcad80b20574e840457c0cb369

      * This is a slightly different way to fix
      * pmqs/Compress-Raw-Zlib#8
        Tue May 3 18:06:48 2022 +0000
        d9cd27fb212da7455b6ba44729ca11bb441f3950

      * add tests for crc32/adler32_combine
        Mon May 2 16:18:13 2022 +0100
        dcfe9ef439790f1a4fae81cf3eac38cfeb848294
  • Loading branch information
atoomic committed Jul 20, 2022
1 parent 587a88e commit ffad8d3
Show file tree
Hide file tree
Showing 12 changed files with 469 additions and 236 deletions.
2 changes: 1 addition & 1 deletion Porting/Maintainers.pl
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ package Maintainers;
},

'Compress::Raw::Zlib' => {
'DISTRIBUTION' => 'PMQS/Compress-Raw-Zlib-2.105.tar.gz',
'DISTRIBUTION' => 'PMQS/Compress-Raw-Zlib-2.202.tar.gz',
'FILES' => q[cpan/Compress-Raw-Zlib],
'EXCLUDED' => [
qr{^examples/},
Expand Down
89 changes: 62 additions & 27 deletions cpan/Compress-Raw-Zlib/Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ use Config;
my $ZLIB_LIB ;
my $ZLIB_INCLUDE ;
my $BUILD_ZLIB = 0 ;
my $USE_ZLIB_NG = 0;
my $OLD_ZLIB = '' ;
my $WALL = '' ;
my $GZIP_OS_CODE = -1 ;
Expand Down Expand Up @@ -74,6 +75,8 @@ UpDowngrade(getPerlFiles('MANIFEST'))
my $OPT_Z_PREFIX = '-DZ_PREFIX' ;
my $OPT_ZLIB_INCLUDE = "-I$ZLIB_INCLUDE";
my $OPT_ZLIB_LIB = "-L$ZLIB_LIB" ;
my $OPT_SOLO = '-DZ_SOLO';
my $OPT_USE_ZLIB_NG = "";

if (! $BUILD_ZLIB)
{
Expand All @@ -85,13 +88,21 @@ if (! $BUILD_ZLIB)

$OPT_ZLIB_LIB = ''
if $ZLIB_LIB eq './zlib-src' ;

$OPT_SOLO = '';
}

if ( $USE_ZLIB_NG)
{
$OPT_USE_ZLIB_NG = '-DUSE_ZLIB_NG';
$ZLIB_LIBRARY_NAME = $^O eq 'MSWin32' ? 'zlib-ng' : 'z-ng' ;
}

WriteMakefile(
NAME => 'Compress::Raw::Zlib',
VERSION_FROM => 'lib/Compress/Raw/Zlib.pm',
INC => $OPT_ZLIB_INCLUDE ,
DEFINE => "-DNO_VIZ -DZ_SOLO $OLD_ZLIB $WALL $OPT_Z_PREFIX -DGZIP_OS_CODE=$GZIP_OS_CODE $USE_PPPORT_H -DPerl_crz_BUILD_ZLIB=$BUILD_ZLIB" ,
DEFINE => "-DNO_VIZ $OPT_SOLO $OLD_ZLIB $WALL $OPT_Z_PREFIX $OPT_USE_ZLIB_NG -DGZIP_OS_CODE=$GZIP_OS_CODE $USE_PPPORT_H -DPerl_crz_BUILD_ZLIB=$BUILD_ZLIB" ,
XS => { 'Zlib.xs' => 'Zlib.c'},
'depend' => { 'Makefile' => 'config.in' },
'clean' => { FILES => '*.c constants.h constants.xs' },
Expand Down Expand Up @@ -177,7 +188,6 @@ my @names = qw(
Z_NEED_DICT
Z_NO_COMPRESSION
Z_NO_FLUSH
Z_NULL
Z_OK
Z_PARTIAL_FLUSH
Z_RLE
Expand All @@ -187,8 +197,13 @@ my @names = qw(
Z_UNKNOWN
Z_VERSION_ERROR
ZLIBNG_VERNUM
ZLIBNG_VER_MAJOR
ZLIBNG_VER_MINOR
ZLIBNG_VER_REVISION
ZLIBNG_VER_STATUS
ZLIBNG_VER_MODIFIED
);
#ZLIB_VERNUM

my %verSpecificNames = (
Z_TREES => '1240',
Expand Down Expand Up @@ -226,6 +241,9 @@ if (eval {require ExtUtils::Constant; 1}) {
}
keys %verSpecificNames ;

push @names, { name => 'Z_NULL', type => 'UV' };
push @names, { name => 'ZLIBNG_VERSION', type => 'PV' };

ExtUtils::Constant::WriteConstants(
NAME => 'Zlib',
NAMES => \@names,
Expand All @@ -244,12 +262,24 @@ else {
}
}

sub getBoolean
{
my $name = shift ;
my $info = shift;

my $x = defined $ENV{$name}
? $ENV{$name}
: $info->{$name} ;

return ($x =~ /^yes|on|true|1$/i) ? 1 : 0;
}

sub ParseCONFIG
{
my ($k, $v) ;
my @badkey = () ;
my %Info = () ;
my @Options = qw( INCLUDE LIB BUILD_ZLIB OLD_ZLIB GZIP_OS_CODE ) ;
my @Options = qw( INCLUDE LIB BUILD_ZLIB OLD_ZLIB GZIP_OS_CODE USE_ZLIB_NG) ;
my %ValidOption = map {$_, 1} @Options ;
my %Parsed = %ValidOption ;
my $CONFIG = 'config.in' ;
Expand Down Expand Up @@ -285,44 +315,48 @@ sub ParseCONFIG
$ZLIB_INCLUDE = defined $ENV{'ZLIB_INCLUDE'}
? $ENV{'ZLIB_INCLUDE'}
: $Info{'INCLUDE'} ;

$ZLIB_LIB = defined $ENV{'ZLIB_LIB'}
?$ENV{'ZLIB_LIB'}
: $Info{'LIB'} ;

$USE_ZLIB_NG = getBoolean('USE_ZLIB_NG', \%Info);

if ($^O eq 'VMS') {
$ZLIB_INCLUDE = VMS::Filespec::vmspath($ZLIB_INCLUDE);
$ZLIB_LIB = VMS::Filespec::vmspath($ZLIB_LIB);
}

my $y = defined $ENV{'OLD_ZLIB'}
? $ENV{'OLD_ZLIB'}
: $Info{'OLD_ZLIB'} ;
$OLD_ZLIB = '-DOLD_ZLIB' if $y and $y =~ /^yes|on|true|1$/i;

my $x = defined $ENV{'BUILD_ZLIB'}
? $ENV{'BUILD_ZLIB'}
: $Info{'BUILD_ZLIB'} ;

if ($x and $x =~ /^yes|on|true|1$/i ) {
$OLD_ZLIB = '-DOLD_ZLIB'
if getBoolean('OLD_ZLIB', \%Info);

$BUILD_ZLIB = 1 ;
$BUILD_ZLIB = getBoolean('BUILD_ZLIB', \%Info);

# ZLIB_LIB & ZLIB_INCLUDE must point to the same place when
# BUILD_ZLIB is specified.
die "INCLUDE & LIB must be the same when BUILD_ZLIB is True\n"
if $ZLIB_LIB ne $ZLIB_INCLUDE ;
if ($BUILD_ZLIB ) {

# Check the zlib source directory exists
die "LIB/INCLUDE directory '$ZLIB_LIB' does not exits\n"
unless -d $ZLIB_LIB ;
# ZLIB_LIB & ZLIB_INCLUDE must point to the same place when
# BUILD_ZLIB is specified.
die "INCLUDE & LIB must be the same when BUILD_ZLIB is True\n"
if $ZLIB_LIB ne $ZLIB_INCLUDE ;

# check for a well known file
die "LIB/INCLUDE directory, '$ZLIB_LIB', doesn't seem to have the zlib source files\n"
unless -e catfile($ZLIB_LIB, 'zlib.h') ;
# Check the zlib source directory exists
die "LIB/INCLUDE directory '$ZLIB_LIB' does not exits\n"
unless -d $ZLIB_LIB ;

# check for a well known file
if ($USE_ZLIB_NG)
{
die "LIB/INCLUDE directory, '$ZLIB_LIB', doesn't seem to have the zlib-ng source files\n"
unless -e catfile($ZLIB_LIB, 'zlib-ng.h') ;
}
else
{
die "LIB/INCLUDE directory, '$ZLIB_LIB', doesn't seem to have the zlib source files\n"
unless -e catfile($ZLIB_LIB, 'zlib.h') ;
}

# write the Makefile
print "Building Zlib enabled\n" ;
# write the Makefile
print "Building Zlib enabled\n" ;
}

$GZIP_OS_CODE = defined $ENV{'GZIP_OS_CODE'}
Expand All @@ -348,6 +382,7 @@ sub ParseCONFIG
GZIP_OS_CODE [$GZIP_OS_CODE]
OLD_ZLIB [$OLD_ZLIB]
BUILD_ZLIB [$BUILD_ZLIB]
USE_ZLIB_NG [$USE_ZLIB_NG]
EOM

Expand Down
Loading

0 comments on commit ffad8d3

Please sign in to comment.