[packages/perl-Git-Raw] - initial, version 0.81

adwol adwol at pld-linux.org
Mon Sep 10 01:41:21 CEST 2018


commit 60531253d5d7fa6b723250d16f5ddf9bf7928d1b
Author: Adam Osuchowski <adwol at pld-linux.org>
Date:   Mon Sep 10 01:39:38 2018 +0200

    - initial, version 0.81

 perl-Git-Raw-Makefile.patch        | 356 +++++++++++++++++++++++++++++++++++++
 perl-Git-Raw-git_buf_dispose.patch | 259 +++++++++++++++++++++++++++
 perl-Git-Raw.spec                  |  75 ++++++++
 3 files changed, 690 insertions(+)
---
diff --git a/perl-Git-Raw.spec b/perl-Git-Raw.spec
new file mode 100644
index 0000000..e67c2e9
--- /dev/null
+++ b/perl-Git-Raw.spec
@@ -0,0 +1,75 @@
+#
+# Conditional build:
+%bcond_without	tests		# do not perform "make test"
+
+%define	libgit2_version	%(rpm -q --qf '%{VERSION}' libgit2)
+
+%define	pdir	Git
+%define	pnam	Raw
+%include	/usr/lib/rpm/macros.perl
+Summary:	Git::Raw - Perl bindings to the Git linkable library (libgit2)
+Name:		perl-Git-Raw
+Version:	0.81
+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
+Patch0:		%{name}-Makefile.patch
+Patch1:		%{name}-git_buf_dispose.patch
+URL:		http://search.cpan.org/dist/Git-Raw/
+BuildRequires:	libgit2-devel
+BuildRequires:	perl-devel >= 1:5.8.0
+BuildRequires:	rpm-perlprov >= 4.1-13
+%if %{with tests}
+%endif
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+libgit2 is a pure C implementation of the Git core methods provided
+as a re-entrant linkable library designed to be fast and portable with
+a solid API. This module provides Perl bindings to the libgit2 API.
+
+WARNING: The API of this module is unstable and may change without
+warning (any change will be appropriately documented in the changelog)
+
+%prep
+%setup -q -n %{pdir}-%{pnam}-%{version}
+%patch0 -p1
+%patch1 -p1
+
+rm -rf deps
+%{__grep} -v '^deps/' MANIFEST > MANIFEST.new
+%{__mv} MANIFEST.new MANIFEST
+
+%{__sed} -i -e 's/0\.27\.0/%{libgit2_version}/g' t/02-commit.t
+
+%build
+%{__perl} Makefile.PL \
+	INSTALLDIRS=vendor
+%{__make} \
+	CC="%{__cc}" \
+	OPTIMIZE="%{rpmcflags}"
+
+%{?with_tests:%{__make} test}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+%{__make} install \
+	DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc Changes README
+%dir %{perl_vendorarch}/Git
+%{perl_vendorarch}/Git/Raw
+%{perl_vendorarch}/Git/Raw.pm
+%dir %{perl_vendorarch}/auto/Git
+%dir %{perl_vendorarch}/auto/Git/Raw
+%attr(755,root,root) %{perl_vendorarch}/auto/Git/Raw/*.so
+%{_mandir}/man3/Git::Raw.3pm*
+%{_mandir}/man3/Git::Raw::*.3pm*
diff --git a/perl-Git-Raw-Makefile.patch b/perl-Git-Raw-Makefile.patch
new file mode 100644
index 0000000..a68e38c
--- /dev/null
+++ b/perl-Git-Raw-Makefile.patch
@@ -0,0 +1,356 @@
+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 @@
+     "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" => "-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"
+ };
diff --git a/perl-Git-Raw-git_buf_dispose.patch b/perl-Git-Raw-git_buf_dispose.patch
new file mode 100644
index 0000000..e32d905
--- /dev/null
+++ b/perl-Git-Raw-git_buf_dispose.patch
@@ -0,0 +1,259 @@
+diff -ruNp Git-Raw-0.81.orig/Raw.xs Git-Raw-0.81/Raw.xs
+--- Git-Raw-0.81.orig/Raw.xs	2018-06-27 19:20:49.000000000 +0200
++++ Git-Raw-0.81/Raw.xs	2018-09-10 01:21:18.624697416 +0200
+@@ -2309,7 +2309,7 @@ message_prettify(class, msg, ...)
+ 		RETVAL = &PL_sv_undef;
+ 		if (rc == GIT_OK) {
+ 			RETVAL = newSVpv(buf.ptr, buf.size);
+-			git_buf_dispose(&buf);
++			git_buf_free(&buf);
+ 		}
+ 
+ 		git_check_error(rc);
+diff -ruNp Git-Raw-0.81.orig/xs/Branch.xs Git-Raw-0.81/xs/Branch.xs
+--- Git-Raw-0.81.orig/xs/Branch.xs	2018-06-27 19:20:49.000000000 +0200
++++ Git-Raw-0.81/xs/Branch.xs	2018-09-10 01:21:18.617697448 +0200
+@@ -165,7 +165,7 @@ upstream_name(self)
+ 		if (rc == GIT_OK)
+ 			RETVAL = newSVpv(buf.ptr, buf.size);
+ 
+-		git_buf_dispose(&buf);
++		git_buf_free(&buf);
+ 
+ 		if (rc != GIT_ENOTFOUND)
+ 			git_check_error(rc);
+@@ -204,8 +204,8 @@ remote_name(self)
+ 				RETVAL = newSVpv(remote.ptr, remote.size);
+ 		}
+ 
+-		git_buf_dispose(&upstream);
+-		git_buf_dispose(&remote);
++		git_buf_free(&upstream);
++		git_buf_free(&remote);
+ 
+ 		if (rc != GIT_ENOTFOUND)
+ 			git_check_error(rc);
+diff -ruNp Git-Raw-0.81.orig/xs/Commit.xs Git-Raw-0.81/xs/Commit.xs
+--- Git-Raw-0.81.orig/xs/Commit.xs	2018-06-27 19:20:49.000000000 +0200
++++ Git-Raw-0.81/xs/Commit.xs	2018-09-10 01:21:18.617697448 +0200
+@@ -468,12 +468,12 @@ as_email(commit, ...)
+ 			&diff_opts
+ 		);
+ 		if (rc != GIT_OK) {
+-			git_buf_dispose(&buf);
++			git_buf_free(&buf);
+ 			git_check_error(rc);
+ 		}
+ 
+ 		RETVAL = newSVpv(buf.ptr, buf.size);
+-		git_buf_dispose(&buf);
++		git_buf_free(&buf);
+ 
+ 	OUTPUT: RETVAL
+ 
+diff -ruNp Git-Raw-0.81.orig/xs/Config.xs Git-Raw-0.81/xs/Config.xs
+--- Git-Raw-0.81.orig/xs/Config.xs	2018-06-27 19:20:49.000000000 +0200
++++ Git-Raw-0.81/xs/Config.xs	2018-09-10 01:21:18.618697443 +0200
+@@ -118,7 +118,7 @@ str(self, name, ...)
+ 			git_check_error(rc);
+ 
+ 			RETVAL = newSVpv(buf.ptr, 0);
+-			git_buf_dispose(&buf);
++			git_buf_free(&buf);
+ 		}
+ 
+ 	OUTPUT: RETVAL
+diff -ruNp Git-Raw-0.81.orig/xs/Diff/Stats.xs Git-Raw-0.81/xs/Diff/Stats.xs
+--- Git-Raw-0.81.orig/xs/Diff/Stats.xs	2018-06-27 19:20:49.000000000 +0200
++++ Git-Raw-0.81/xs/Diff/Stats.xs	2018-09-10 01:21:18.620697434 +0200
+@@ -62,7 +62,7 @@ buffer(self, ...)
+ 
+ 		RETVAL = newSVpv(buf.ptr, buf.size);
+ 
+-		git_buf_dispose(&buf);
++		git_buf_free(&buf);
+ 
+ 	OUTPUT: RETVAL
+ 
+diff -ruNp Git-Raw-0.81.orig/xs/Diff.xs Git-Raw-0.81/xs/Diff.xs
+--- Git-Raw-0.81.orig/xs/Diff.xs	2018-06-27 19:20:49.000000000 +0200
++++ Git-Raw-0.81/xs/Diff.xs	2018-09-10 01:21:18.616697453 +0200
+@@ -51,7 +51,7 @@ buffer(self, format)
+ 
+ 		RETVAL = newSVpv(buf.ptr, buf.size);
+ 
+-		git_buf_dispose(&buf);
++		git_buf_free(&buf);
+ 
+ 	OUTPUT: RETVAL
+ 
+diff -ruNp Git-Raw-0.81.orig/xs/Filter/List.xs Git-Raw-0.81/xs/Filter/List.xs
+--- Git-Raw-0.81.orig/xs/Filter/List.xs	2018-06-27 19:20:49.000000000 +0200
++++ Git-Raw-0.81/xs/Filter/List.xs	2018-09-10 01:21:18.621697430 +0200
+@@ -62,11 +62,11 @@ apply_to_blob(self, blob)
+ 			&buf, self, blob
+ 		);
+ 		if (rc != GIT_OK)
+-			git_buf_dispose(&buf);
++			git_buf_free(&buf);
+ 
+ 		git_check_error(rc);
+ 		RETVAL = newSVpv(buf.ptr, buf.size);
+-		git_buf_dispose(&buf);
++		git_buf_free(&buf);
+ 
+ 	OUTPUT: RETVAL
+ 
+@@ -94,16 +94,16 @@ apply_to_data(self, data)
+ 			&buf, self, &in
+ 		);
+ 		if (rc != GIT_OK) {
+-			git_buf_dispose(&in);
+-			git_buf_dispose(&buf);
++			git_buf_free(&in);
++			git_buf_free(&buf);
+ 		}
+ 
+ 		git_check_error(rc);
+ 
+ 		RETVAL = newSVpv(buf.ptr, buf.size);
+ 
+-		git_buf_dispose(&in);
+-		git_buf_dispose(&buf);
++		git_buf_free(&in);
++		git_buf_free(&buf);
+ 
+ 	OUTPUT: RETVAL
+ 
+@@ -131,11 +131,11 @@ apply_to_file(self, path)
+ 			&buf, list, repo_ptr -> repository, path
+ 		);
+ 		if (rc != GIT_OK)
+-			git_buf_dispose(&buf);
++			git_buf_free(&buf);
+ 
+ 		git_check_error(rc);
+ 		RETVAL = newSVpv(buf.ptr, buf.size);
+-		git_buf_dispose(&buf);
++		git_buf_free(&buf);
+ 
+ 	OUTPUT: RETVAL
+ 
+diff -ruNp Git-Raw-0.81.orig/xs/Mempack.xs Git-Raw-0.81/xs/Mempack.xs
+--- Git-Raw-0.81.orig/xs/Mempack.xs	2018-06-27 19:20:49.000000000 +0200
++++ Git-Raw-0.81/xs/Mempack.xs	2018-09-10 01:21:18.619697439 +0200
+@@ -38,7 +38,7 @@ dump(self, repo)
+ 
+ 		RETVAL = newSVpv(buf.ptr, buf.size);
+ 
+-		git_buf_dispose(&buf);
++		git_buf_free(&buf);
+ 
+ 	OUTPUT: RETVAL
+ 
+diff -ruNp Git-Raw-0.81.orig/xs/Note.xs Git-Raw-0.81/xs/Note.xs
+--- Git-Raw-0.81.orig/xs/Note.xs	2018-06-27 19:20:49.000000000 +0200
++++ Git-Raw-0.81/xs/Note.xs	2018-09-10 01:21:18.615697457 +0200
+@@ -196,7 +196,7 @@ default_ref(class, repo)
+ 		rc = git_reference_lookup(
+ 			&ref, repo_ptr -> repository, ref_name.ptr
+ 		);
+-		git_buf_dispose(&ref_name);
++		git_buf_free(&ref_name);
+ 
+ 		RETVAL = &PL_sv_undef;
+ 		if (rc != GIT_ENOTFOUND) {
+diff -ruNp Git-Raw-0.81.orig/xs/Patch.xs Git-Raw-0.81/xs/Patch.xs
+--- Git-Raw-0.81.orig/xs/Patch.xs	2018-06-27 19:20:49.000000000 +0200
++++ Git-Raw-0.81/xs/Patch.xs	2018-09-10 01:21:18.616697453 +0200
+@@ -15,7 +15,7 @@ buffer(self)
+ 
+ 		RETVAL = newSVpv(buf.ptr, buf.size);
+ 
+-		git_buf_dispose(&buf);
++		git_buf_free(&buf);
+ 
+ 	OUTPUT: RETVAL
+ 
+diff -ruNp Git-Raw-0.81.orig/xs/RefSpec.xs Git-Raw-0.81/xs/RefSpec.xs
+--- Git-Raw-0.81.orig/xs/RefSpec.xs	2018-06-27 19:20:49.000000000 +0200
++++ Git-Raw-0.81/xs/RefSpec.xs	2018-09-10 01:21:18.619697439 +0200
+@@ -95,7 +95,7 @@ transform(self, ref)
+ 		if (rc == GIT_OK)
+ 			RETVAL = newSVpv(buf.ptr, buf.size);
+ 
+-		git_buf_dispose(&buf);
++		git_buf_free(&buf);
+ 		git_check_error(rc);
+ 
+ 	OUTPUT: RETVAL
+@@ -120,7 +120,7 @@ rtransform(self, ref)
+ 		if (rc == GIT_OK)
+ 			RETVAL = newSVpv(buf.ptr, buf.size);
+ 
+-		git_buf_dispose(&buf);
++		git_buf_free(&buf);
+ 		git_check_error(rc);
+ 
+ 	OUTPUT: RETVAL
+diff -ruNp Git-Raw-0.81.orig/xs/Remote.xs Git-Raw-0.81/xs/Remote.xs
+--- Git-Raw-0.81.orig/xs/Remote.xs	2018-06-27 19:20:49.000000000 +0200
++++ Git-Raw-0.81/xs/Remote.xs	2018-09-10 01:21:18.618697443 +0200
+@@ -155,13 +155,13 @@ default_branch(self)
+ 			RETVAL = &PL_sv_undef;
+ 		} else {
+ 			if (rc != GIT_OK)
+-				git_buf_dispose(&buf);
++				git_buf_free(&buf);
+ 
+ 			git_check_error(rc);
+ 			RETVAL = newSVpv(buf.ptr, buf.size);
+ 		}
+ 
+-		git_buf_dispose(&buf);
++		git_buf_free(&buf);
+ 
+ 	OUTPUT: RETVAL
+ 
+diff -ruNp Git-Raw-0.81.orig/xs/Repository.xs Git-Raw-0.81/xs/Repository.xs
+--- Git-Raw-0.81.orig/xs/Repository.xs	2018-06-27 19:20:49.000000000 +0200
++++ Git-Raw-0.81/xs/Repository.xs	2018-09-10 01:21:18.621697430 +0200
+@@ -123,7 +123,7 @@ discover(class, path)
+ 		if (rc == GIT_OK)
+ 			rc = git_repository_open(&r, (const char*) buf.ptr);
+ 
+-		git_buf_dispose(&buf);
++		git_buf_free(&buf);
+ 		git_check_error(rc);
+ 
+ 		Newxz(repo, 1, git_raw_repository);
+@@ -1198,7 +1198,7 @@ message(self)
+ 		if (rc == GIT_OK)
+ 			RETVAL = newSVpv(buf.ptr, 0);
+ 
+-		git_buf_dispose(&buf);
++		git_buf_free(&buf);
+ 		git_check_error(rc);
+ 
+ 	OUTPUT: RETVAL
+diff -ruNp Git-Raw-0.81.orig/xs/Worktree.xs Git-Raw-0.81/xs/Worktree.xs
+--- Git-Raw-0.81.orig/xs/Worktree.xs	2018-06-27 19:20:49.000000000 +0200
++++ Git-Raw-0.81/xs/Worktree.xs	2018-09-10 01:21:18.619697439 +0200
+@@ -117,7 +117,7 @@ is_locked(self)
+ 	PPCODE:
+ 		rc = git_worktree_is_locked(&buf, self);
+ 		if (rc < 0) {
+-			git_buf_dispose(&buf);
++			git_buf_free(&buf);
+ 			git_check_error(rc);
+ 		}
+ 
+@@ -126,7 +126,7 @@ is_locked(self)
+ 		else
+ 			mXPUSHi (0);
+ 
+-		git_buf_dispose(&buf);
++		git_buf_free(&buf);
+ 		XSRETURN(1);
+ 
+ void
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/perl-Git-Raw.git/commitdiff/60531253d5d7fa6b723250d16f5ddf9bf7928d1b



More information about the pld-cvs-commit mailing list