[packages/perl-UV] - new

qboosh qboosh at pld-linux.org
Tue Jan 12 17:55:12 CET 2016


commit e25876d7a0f2c464883db9308ed9e6dbf0d6289c
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Tue Jan 12 17:57:14 2016 +0100

    - new

 perl-UV-system-libuv.patch | 58 ++++++++++++++++++++++++++++++++++
 perl-UV.spec               | 78 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 136 insertions(+)
---
diff --git a/perl-UV.spec b/perl-UV.spec
new file mode 100644
index 0000000..f0b9278
--- /dev/null
+++ b/perl-UV.spec
@@ -0,0 +1,78 @@
+#
+# Conditional build:
+%bcond_with	system_libuv	# use system libuv [not ready for 1.x]
+%bcond_without	tests		# do not perform "make test"
+#
+%define		pdir	UV
+%include	/usr/lib/rpm/macros.perl
+Summary:	UV - Perl interface to libuv
+Summary(pl.UTF-8):	UV - perlowy interfejs do libuv
+Name:		perl-UV
+Version:	0.24
+Release:	1
+License:	MIT
+Group:		Development/Languages/Perl
+Source0:	http://www.cpan.org/modules/by-authors/id/T/TY/TYPESTER/%{pdir}-%{version}.tar.gz
+# Source0-md5:	826db3b5609cfafe59030347579f6e54
+Patch0:		%{name}-system-libuv.patch
+URL:		http://search.cpan.org/dist/UV/
+%{?with_system_libuv:BuildRequires:	libuv-devel >= 0.10}
+BuildRequires:	perl-devel >= 1:5.8.0
+BuildRequires:	rpm-perlprov >= 4.1-13
+%if %{with tests}
+BuildRequires:	perl-Test-TCP
+%endif
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+UV provides low-level interface to libuv,
+<https://github.com/joyent/libuv>, platform layer for Node.js.
+
+Low-level means this module's functions maps to libuv functions
+directly. uv_listen maps to UV::listen, uv_tcp_connect to
+UV::tcp_connect, and so on.
+
+%description -l pl.UTF-8
+Moduł UV udostępnia niskopoziomowy interfejs do biblioteki libuv
+(<https://github.com/joent/libuv>) - zależnej od platformy warstwy
+Node.js.
+
+Niskopoziomowość oznacza, że funkcje tego modułu odwzorowują się
+bezpośrednio na funkcje libuv. uv_listen odwzorowuje się na
+UV::listen, uv_tcp_connect na UV::tcp_connect itd.
+
+%prep
+%setup -q -n %{pdir}-%{version}
+%if %{with system_libuv}
+%patch0 -p1
+%endif
+
+%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
+
+install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+cp -a example $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc Changes LICENSE README.md
+%{perl_vendorarch}/UV.pm
+%dir %{perl_vendorarch}/auto/UV
+%attr(755,root,root) %{perl_vendorarch}/auto/UV/UV.so
+%{_mandir}/man3/UV.3pm*
+%{_examplesdir}/%{name}-%{version}
diff --git a/perl-UV-system-libuv.patch b/perl-UV-system-libuv.patch
new file mode 100644
index 0000000..61f4991
--- /dev/null
+++ b/perl-UV-system-libuv.patch
@@ -0,0 +1,58 @@
+--- UV-0.24/Makefile.PL.orig	2013-03-29 08:53:40.000000000 +0100
++++ UV-0.24/Makefile.PL	2016-01-11 21:50:58.824753288 +0100
+@@ -36,17 +36,14 @@
+ 
+ use_ppport 3.20;
+ cc_src_paths 'src';
+-cc_include_paths 'deps/libuv/include';
+ cc_warnings;
+ 
+ test_requires 'Test::TCP';
+ 
+-no_index directory => 'deps';
+-
+ auto_set_repository;
+ 
+ if ($^O eq 'linux') {
+-    cc_libs 'm', 'dl', 'rt', 'pthread';
++    cc_libs 'm', 'dl', 'rt', 'pthread', 'uv';
+ }
+ elsif ($^O eq 'darwin') {
+     cc_libs 'm', 'pthread';
+@@ -68,36 +65,4 @@
+     die "$^O is unsupported at this point\n";
+ }
+ 
+-unless ($^O eq 'MSWin32') {
+-    cc_append_to_ccflags '-fPIC';
+-
+-    # XXX
+-    use File::Spec;
+-    my $mk_file = File::Spec->catfile('deps', 'libuv', 'config-unix.mk');
+-
+-    open my $fh, '<', $mk_file or die $!;
+-    my $mk = do { local $/; <$fh> };
+-    close $fh;
+-
+-    unless ($mk =~ /-g -fPIC/) {
+-        $mk =~ s/-g/-g -fPIC/;
+-
+-        open $fh, '>', $mk_file or die $!;
+-        print $fh $mk;
+-        close $fh;
+-    }
+-}
+-
+-makemaker_args->{MYEXTLIB} = 'deps/libuv/libuv$(LIB_EXT)';
+-
+-{
+-    package MY;
+-    sub postamble {
+-        <<'__EOF__';
+-$(MYEXTLIB):
+-	$(MAKE) -C deps/libuv
+-__EOF__
+-    }
+-}
+-
+ WriteAll;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/perl-UV.git/commitdiff/e25876d7a0f2c464883db9308ed9e6dbf0d6289c



More information about the pld-cvs-commit mailing list