[packages/perl-Graphics-PLplot] - new
baggins
baggins at pld-linux.org
Thu Jun 13 16:34:56 CEST 2013
commit 80bae2684aced6c7dc5777a65254af73c8fac41a
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Thu Jun 13 16:34:41 2013 +0200
- new
fix-plplot-call.patch | 11 ++++++++
perl-Graphics-PLplot.spec | 65 +++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 76 insertions(+)
---
diff --git a/perl-Graphics-PLplot.spec b/perl-Graphics-PLplot.spec
new file mode 100644
index 0000000..e7fac1e
--- /dev/null
+++ b/perl-Graphics-PLplot.spec
@@ -0,0 +1,65 @@
+#
+# Conditional build:
+%bcond_with tests # "make test" requires running X and plplot-driver-xwin
+#
+%define pdir Graphics
+%define pnam PLplot
+%include /usr/lib/rpm/macros.perl
+Summary: Graphics::PLplot - Perl interface to the PLplot plotting library
+Name: perl-Graphics-PLplot
+Version: 0.03
+Release: 1
+License: GPL v1+ or Artistic
+Group: Development/Languages/Perl
+Source0: http://www.cpan.org/modules/by-module/Graphics/%{pdir}-%{pnam}-%{version}.tar.gz
+# Source0-md5: 95a1cfeef5522f963357b1a757e9ba08
+Patch0: fix-plplot-call.patch
+URL: http://search.cpan.org/dist/Graphics-PLplot/
+BuildRequires: perl-devel >= 1:5.8.0
+BuildRequires: plplot-devel
+BuildRequires: rpm-perlprov >= 4.1-13
+%if %{with tests}
+BuildRequires: plplot-driver-xwin
+%endif
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+This module provides a perl interface to the PLplot plotting library
+available from http://www.plplot.org. The interface is very similar
+to the C interface except that:
+
+ - Arrays are passed in by reference
+ - If the number of elements in an array is required by the C function
+ the perl interface calculates this automatically [eg plline]
+ - Return values are returned and not supplied as arguments
+
+%prep
+%setup -q -n %{pdir}-%{pnam}-%{version}
+%patch0 -p1
+
+%build
+%{__perl} Makefile.PL \
+ INSTALLDIRS=vendor
+%{__make} \
+ CC="%{__cc}" \
+ OPTIMIZE="%{rpmcflags}"
+
+%{?with_tests:%{__make} test}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} pure_install \
+ DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc README
+%{perl_vendorarch}/Graphics/*.pm
+%dir %{perl_vendorarch}/auto/Graphics/PLplot
+%{perl_vendorarch}/auto/Graphics/PLplot/*.bs
+%attr(755,root,root) %{perl_vendorarch}/auto/Graphics/PLplot/*.so
+%{_mandir}/man3/*
diff --git a/fix-plplot-call.patch b/fix-plplot-call.patch
new file mode 100644
index 0000000..d70ba7a
--- /dev/null
+++ b/fix-plplot-call.patch
@@ -0,0 +1,11 @@
+--- Graphics-PLplot-0.03/PLplot.xs.orig 2004-03-07 22:21:06.000000000 +0100
++++ Graphics-PLplot-0.03/PLplot.xs 2013-06-13 16:29:31.403874547 +0200
+@@ -1174,7 +1174,7 @@
+ int status;
+ PPCODE:
+ /* $ARGV[0] is not the program name in perl */
+- status = plParseOpts( &ix_argv, argv, mode | PL_PARSE_NOPROGRAM );
++ status = c_plparseopts( &ix_argv, argv, mode | PL_PARSE_NOPROGRAM );
+ XPUSHs( sv_2mortal(newSViv(status) ));
+ XPUSHs( newRV_noinc( (SV*)unpack1Dchar( argv, ix_argv) ));
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/perl-Graphics-PLplot.git/commitdiff/80bae2684aced6c7dc5777a65254af73c8fac41a
More information about the pld-cvs-commit
mailing list