commit 7abbf4faf58216286bcc3b88906c27b8e3fe31f6 Author: Adam Osuchowski <ad...@pld-linux.org> Date: Tue Nov 14 00:38:30 2023 +0100
- up to 0.90 perl-Git-Raw-Makefile.patch | 353 +------------------------------------------- perl-Git-Raw.spec | 4 +- 2 files changed, 7 insertions(+), 350 deletions(-) --- diff --git a/perl-Git-Raw.spec b/perl-Git-Raw.spec index 9fb3c1d..a32b8b6 100644 --- a/perl-Git-Raw.spec +++ b/perl-Git-Raw.spec @@ -8,13 +8,13 @@ %define pnam Raw Summary: Git::Raw - Perl bindings to the Git linkable library (libgit2) Name: perl-Git-Raw -Version: 0.81 +Version: 0.90 Release: 1 # same as perl License: GPL v1+ or Artistic Group: Development/Languages/Perl Source0: http://www.cpan.org/modules/by-authors/id/J/JA/JACQUESG/%{pdir}-%{pnam}-%{version}.tar.gz -# Source0-md5: 06dec64a5e684958c3cd71bb30872ddf +# Source0-md5: 1ef1bd947245e86c60458a22fbf097b7 Patch0: %{name}-Makefile.patch Patch1: %{name}-git_buf_dispose.patch URL: http://search.cpan.org/dist/Git-Raw/ diff --git a/perl-Git-Raw-Makefile.patch b/perl-Git-Raw-Makefile.patch index a68e38c..ccbb019 100644 --- a/perl-Git-Raw-Makefile.patch +++ b/perl-Git-Raw-Makefile.patch @@ -1,356 +1,13 @@ -diff -ruN Git-Raw-0.81.orig/Makefile.PL Git-Raw-0.81/Makefile.PL ---- Git-Raw-0.81.orig/Makefile.PL 2018-06-27 19:20:49.000000000 +0200 -+++ Git-Raw-0.81/Makefile.PL 2018-09-10 00:44:45.759621984 +0200 -@@ -1,327 +1,3 @@ --use strict; --use warnings; --use Config; --use Getopt::Long; --use File::Basename qw(basename dirname); -- --use Devel::CheckLib; -- --# compiler detection --my $is_gcc = length($Config{gccversion}); --my $is_msvc = $Config{cc} eq 'cl' ? 1 : 0; --my $is_sunpro = (length($Config{ccversion}) && !$is_msvc) ? 1 : 0; -- --# os detection --my $is_solaris = ($^O =~ /(sun|solaris)/i) ? 1 : 0; --my $is_windows = ($^O =~ /MSWin32/i) ? 1 : 0; --my $is_linux = ($^O =~ /linux/i) ? 1 : 0; --my $is_osx = ($^O =~ /darwin/i) ? 1 : 0; --my $is_gkfreebsd = ($^O =~ /gnukfreebsd/i) ? 1 : 0; --my $is_netbsd = ($^O =~ /netbsd/i) ? 1 : 0; -- --# allow the user to override/specify the locations of OpenSSL, libssh2 and libcurl --our $opt = {}; -- --Getopt::Long::GetOptions( -- "help" => \&usage, -- 'with-openssl-include=s' => \$opt->{'ssl'}->{'incdir'}, -- 'with-openssl-libs=s@' => \$opt->{'ssl'}->{'libs'}, -- 'with-libssh2-include=s' => \$opt->{'ssh2'}->{'incdir'}, -- 'with-libssh2-lib=s@' => \$opt->{'ssh2'}->{'libs'}, -- 'with-libcurl-include=s' => \$opt->{'curl'}->{'incdir'}, -- 'with-libcurl-lib=s@' => \$opt->{'curl'}->{'libs'}, --) || die &usage(); -- --my $def = ''; --my $lib = ''; --my $otherldflags = ''; --my $inc = ''; --my $ccflags = ''; -- --my %os_specific = ( -- 'darwin' => { -- 'ssh2' => { -- 'inc' => ['/opt/local/include'], -- 'lib' => ['/opt/local/lib'] -- } -- }, -- 'freebsd' => { -- 'ssh2' => { -- 'inc' => ['/usr/local/include'], -- 'lib' => ['/usr/local/lib'] -- } -- }, -- 'netbsd' => { -- 'ssh2' => { -- 'inc' => ['/usr/pkg/include'], -- 'lib' => ['/usr/pkg/lib'] -- }, -- 'curl' => { -- 'inc' => ['/usr/pkg/include'], -- 'lib' => ['/usr/pkg/lib'] -- } -- } --); -- --my ($ssh2_libpath, $ssh2_incpath); --my ($curl_libpath, $curl_incpath); --if (my $os_params = $os_specific{$^O}) { -- if (my $ssh2 = $os_params -> {'ssh2'}) { -- $ssh2_libpath = $ssh2 -> {'lib'}; -- $ssh2_incpath = $ssh2 -> {'inc'}; -- } -- if (my $curl = $os_params -> {'curl'}) { -- $curl_libpath = $curl -> {'lib'}; -- $curl_incpath = $curl -> {'inc'}; -- } --} -- --my @library_tests = ( -- { -- 'lib' => 'ssh2', -- 'libpath' => $ssh2_libpath, -- 'incpath' => $ssh2_incpath, -- 'header' => 'libssh2.h', -- }, -- { -- 'lib' => 'ssl', -- 'header' => 'openssl/opensslconf.h', -- }, -- { -- 'lib' => 'curl', -- 'libpath' => $curl_libpath, -- 'incpath' => $curl_incpath, -- 'header' => 'curl/curl.h', -- }, --); -- --my %library_opts = ( -- 'ssl' => { -- 'defines' => ' -DGIT_OPENSSL -DGIT_SHA1_OPENSSL -DGIT_HTTPS', -- 'libs' => ' -lssl -lcrypto', -- }, -- 'ssh2' => { -- 'defines' => ' -DGIT_SSH', -- 'libs' => ' -lssh2', -- }, -- 'curl' => { -- 'defines' => ' -DGIT_CURL', -- 'libs' => ' -lcurl', -- } --); -- --# check for optional libraries --foreach my $test (@library_tests) { -- my $library = $test->{lib}; -- my $user_library_opt = $opt->{$library}; -- my $user_incpath = $user_library_opt->{'incdir'}; -- my $user_libs = $user_library_opt->{'libs'}; -- -- if ($user_incpath && $user_libs) { -- $inc .= " -I$user_incpath"; -- -- # perform some magic -- foreach my $user_lib (@$user_libs) { -- my ($link_dir, $link_lib) = (dirname($user_lib), basename($user_lib)); -- -- if (!$is_msvc) { -- my @tokens = grep { $_ } split(/(lib|\.)/, $link_lib); -- shift @tokens if ($tokens[0] eq 'lib'); -- $link_lib = shift @tokens; -- } -- $lib .= " -L$link_dir -l$link_lib"; -- } -- -- my $opts = $library_opts{$library}; -- $opts->{'use'} = 1; -- -- $def .= $opts->{'defines'}; -- -- print uc($library), " support enabled (user provided)", "\n"; -- } elsif (check_lib(%$test)) { -- if (exists($test->{'incpath'})) { -- if (my $incpath = $test->{'incpath'}) { -- $inc .= ' -I'.join (' -I', @$incpath); -- } -- } -- -- if (exists($test->{'libpath'})) { -- if (my $libpath = $test->{'libpath'}) { -- $lib .= ' -L'.join (' -L', @$libpath); -- } -- } -- -- my $opts = $library_opts{$library}; -- $opts->{'use'} = 1; -- -- $def .= $opts->{'defines'}; -- $lib .= $opts->{'libs'}; -- -- print uc($library), " support enabled", "\n"; -- } else { -- print uc($library), " support disabled", "\n"; -- } --} -- --# universally supported --$def .= ' -DNO_VIZ -DSTDC -DNO_GZIP -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE'; -- --$def .= ' -DLIBGIT2_NO_FEATURES_H'; -- --# supported on Solaris --if ($is_solaris) { -- $def .= ' -D_POSIX_C_SOURCE=200112L -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS'; --} -- --# Time structures --if ($is_netbsd) { -- # Needed for stat.st_mtim / stat.st_mtimespec -- $def .= ' -D_NETBSD_SOURCE'; -- -- if ((split (m|\.|, $Config{osvers}))[0] < 7) { -- $def .= ' -DGIT_USE_STAT_MTIMESPEC'; -- } else { -- $def .= ' -DGIT_USE_STAT_MTIM'; -- } --} elsif ($is_osx) { -- $def .= ' -DGIT_USE_STAT_MTIMESPEC'; --} else { -- $def .= ' -DGIT_USE_STAT_MTIM'; --} -- --# Nanosecond resolution --$def .= ' -DGIT_USE_STAT_MTIM_NSEC -DGIT_USE_NEC'; -- --if ($is_gcc) { -- # gcc-like compiler -- $ccflags .= ' -Wall -Wno-unused-variable -Wno-pedantic -Wno-deprecated-declarations'; -- -- # clang compiler is pedantic! -- if ($is_osx) { -- # clang masquerading as gcc -- if ($Config{gccversion} =~ /LLVM/) { -- $ccflags .= ' -Wno-unused-const-variable -Wno-unused-function'; -- } -- -- # Secure transport (HTTPS) -- $def .= ' -DGIT_SECURE_TRANSPORT -DGIT_HTTPS -DGIT_SHA1_COMMON_CRYPTO'; -- $otherldflags .= ' -framework CoreFoundation -framework Security'; -- } -- -- if ($is_solaris) { -- $ccflags .= ' -std=c99'; -- } -- -- # building with a 32-bit perl on a 64-bit OS may require this (supported by cc and gcc-like compilers, -- # excluding some ARM toolchains) -- if ($Config{ptrsize} == 4 && $Config{archname} !~ /arm/) { -- $ccflags .= ' -m32'; -- } --} elsif ($is_sunpro) { -- # probably the SunPro compiler, (try to) enable C99 support -- $ccflags .= ' -xc99=all,no_lib'; -- $def .= ' -D_STDC_C99'; -- -- $ccflags .= ' -errtags=yes -erroff=E_EMPTY_TRANSLATION_UNIT -erroff=E_ZERO_OR_NEGATIVE_SUBSCRIPT'; -- $ccflags .= ' -erroff=E_EMPTY_DECLARATION -erroff=E_STATEMENT_NOT_REACHED'; --} -- --# there are no atomic primitives for the Sun Pro compiler in libgit2, so even if pthreads is available --# and perl has been built with threads support, libgit2 cannot use threads under said compiler --if ($Config{usethreads} && !$is_sunpro) { -- if (check_lib(lib => 'pthread')) { -- $def .= ' -DGIT_THREADS'; -- $lib .= ' -lpthread'; -- -- print "Threads support enabled\n"; -- } else { -- if ($is_windows) { -- $def .= ' -DGIT_THREADS'; -- } else { -- print "Threads support disabled (pthreads not found)\n"; -- } -- } --} elsif ($is_sunpro) { -- print "Thread support disabled (SunPro compiler detected)\n" --} else { -- print "Thread support disabled (perl wasn't built with thread support)\n" --} -- --my @deps = glob 'deps/libgit2/deps/{http-parser,zlib}/*.c'; --my @srcs = glob 'deps/libgit2/src/{*.c,transports/*.c,xdiff/*.c,streams/*.c}'; -- --if ($is_msvc) { -- push @srcs, 'deps/libgit2/src/hash/hash_win32.c'; --} --elsif (!$library_opts{'ssl'}{'use'} && !$is_osx) { -- push @srcs, 'deps/libgit2/src/hash/hash_generic.c'; --} -- --# the system regex is broken on Solaris, not available on Windows --if ($is_windows || $is_solaris) { -- push @srcs, 'deps/libgit2/deps/regex/regex.c'; -- $inc .= ' -Ideps/libgit2/deps/regex'; --} -- --if ($is_windows) { -- push @srcs, glob 'deps/libgit2/src/{win32,compat}/*.c'; -- -- $def .= ' -DWIN32 -DGIT_WIN32 -DGIT_WINHTTP -DGIT_HTTPS'; -- $lib .= ' -lwinhttp -lrpcrt4 -lcrypt32'; -- -- if ($is_msvc) { -- # visual studio compiler -- $def .= ' -D_CRT_SECURE_NO_WARNINGS -DGIT_SHA1_WIN32'; -- } else { -- # mingw/cygwin -- $def .= ' -D_WIN32_WINNT=0x0501 -D__USE_MINGW_ANSI_STDIO=1'; -- } --} else { -- push @srcs, glob 'deps/libgit2/src/unix/*.c' --} -- --# real-time library is required for Solaris and Linux --if ($is_linux || $is_solaris || $is_gkfreebsd) { -- $lib .= ' -lrt'; --} -- --my @objs = map { substr ($_, 0, -1) . 'o' } (@deps, @srcs); -- --sub MY::c_o { -- my $out_switch = '-o '; -- -- if ($is_msvc) { -- $out_switch = '/Fo'; -- } -- -- my $line = qq{ --.c\$(OBJ_EXT): -- \$(CCCMD) \$(CCCDLFLAGS) "-I\$(PERL_INC)" \$(PASTHRU_DEFINE) \$(DEFINE) \$*.c $out_switch\$@ --}; -- -- if ($is_gcc) { -- # disable parallel builds -- $line .= qq{ -- --.NOTPARALLEL: --}; -- } -- return $line; --} -- --if ($is_windows && !$is_msvc) { -- my $def_file = "deps/libgit2/deps/winhttp/winhttp.def"; -- if ($Config{ptrsize} == 8) { -- $def_file = "deps/libgit2/deps/winhttp/winhttp64.def"; -- } -- -- my $result = system ('dlltool', '-d', $def_file, '-k', '-D', 'winhttp.dll', '-l', 'libwinhttp.a'); -- if ($result << 8 != 0) { -- print STDERR "Failed to generate libwinhttp.a: $!\n"; -- exit(1); -- } --} -- - # This Makefile.PL for was generated by Dist::Zilla. - # Don't edit it but the dist.ini used to construct it. - BEGIN { require 5.006; } -@@ -341,7 +17,8 @@ +diff -ruNp Git-Raw-0.90.orig/Makefile.PL Git-Raw-0.90/Makefile.PL +--- Git-Raw-0.90.orig/Makefile.PL 2022-10-27 10:50:15.000000000 +0200 ++++ Git-Raw-0.90/Makefile.PL 2023-11-14 00:35:50.746645206 +0100 +@@ -336,7 +336,8 @@ my %WriteMakefileArgs = ( "Getopt::Long" => "2.35" }, "DISTNAME" => "Git-Raw", -- "INC" => "-I. -Ideps/libgit2 -Ideps/libgit2/src -Ideps/libgit2/include -Ideps/libgit2/deps/http-parser -Ideps/libgit2/deps/zlib", +- "INC" => "-I. -Ideps/libgit2 -I deps/libgit2/include -Ideps/libgit2/src/libgit2 -Ideps/libgit2/src/util -Ideps/libgit2/deps/http-parser -Ideps/libgit2/deps/zlib", + "INC" => "-isystem . -isystem /usr/include -isystem /usr/include/git2", + "LIBS" => "-lgit2", "LICENSE" => "perl", "MIN_PERL_VERSION" => "5.006", "NAME" => "Git::Raw", -@@ -378,14 +55,6 @@ - ); - - $WriteMakefileArgs{MIN_PERL_VERSION} = '5.8.8'; --$WriteMakefileArgs{DEFINE} .= $def; --$WriteMakefileArgs{LIBS} .= $lib; --$WriteMakefileArgs{INC} .= $inc; --$WriteMakefileArgs{CCFLAGS} .= $Config{ccflags} . ' '. $ccflags; --$WriteMakefileArgs{OBJECT} .= ' ' . join ' ', @objs; --$WriteMakefileArgs{dynamic_lib} = { -- OTHERLDFLAGS => $otherldflags --}; - $WriteMakefileArgs{clean} = { - FILES => "*.inc" - }; ================================================================ ---- gitweb: http://git.pld-linux.org/gitweb.cgi/packages/perl-Git-Raw.git/commitdiff/7abbf4faf58216286bcc3b88906c27b8e3fe31f6 _______________________________________________ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit