aboutsummaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authorsunpoet <sunpoet@FreeBSD.org>2018-02-21 04:24:47 +0800
committersunpoet <sunpoet@FreeBSD.org>2018-02-21 04:24:47 +0800
commit6ceedebf2fc0b012a0e7b4bd27eecf56ef8ee48e (patch)
treeedbc3458e5023a94b2faab57e304a65e46a32797 /devel
parent0db5e131937dcc04587955a3003ba68842a077ac (diff)
downloadfreebsd-ports-gnome-6ceedebf2fc0b012a0e7b4bd27eecf56ef8ee48e.tar.gz
freebsd-ports-gnome-6ceedebf2fc0b012a0e7b4bd27eecf56ef8ee48e.tar.zst
freebsd-ports-gnome-6ceedebf2fc0b012a0e7b4bd27eecf56ef8ee48e.zip
Add p5-FFI-Platypus 0.47
Platypus is a library for creating interfaces to machine code libraries written in languages like C, C++, Fortran, Rust, Pascal. Essentially anything that gets compiled into machine code. This implementation uses libffi to accomplish this task. libffi is battle tested by a number of other scripting and virtual machine languages, such as Python and Ruby to serve a similar role. WWW: http://search.cpan.org/dist/FFI-Platypus/
Diffstat (limited to 'devel')
-rw-r--r--devel/Makefile1
-rw-r--r--devel/p5-FFI-Platypus/Makefile32
-rw-r--r--devel/p5-FFI-Platypus/distinfo3
-rw-r--r--devel/p5-FFI-Platypus/files/patch-inc-My-ModuleBuild.pm35
-rw-r--r--devel/p5-FFI-Platypus/pkg-descr7
-rw-r--r--devel/p5-FFI-Platypus/pkg-plist31
6 files changed, 109 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile
index 4c8462488080..88a1036b480a 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -2497,6 +2497,7 @@
SUBDIR += p5-ExtUtils-XSBuilder
SUBDIR += p5-ExtUtils-XSpp
SUBDIR += p5-FFI-CheckLib
+ SUBDIR += p5-FFI-Platypus
SUBDIR += p5-FSA-Rules
SUBDIR += p5-Fennec-Lite
SUBDIR += p5-File-Append-TempFile
diff --git a/devel/p5-FFI-Platypus/Makefile b/devel/p5-FFI-Platypus/Makefile
new file mode 100644
index 000000000000..48d05fb598fd
--- /dev/null
+++ b/devel/p5-FFI-Platypus/Makefile
@@ -0,0 +1,32 @@
+# Created by: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= FFI-Platypus
+PORTVERSION= 0.47
+CATEGORIES= devel perl5
+MASTER_SITES= CPAN
+PKGNAMEPREFIX= p5-
+
+MAINTAINER= sunpoet@FreeBSD.org
+COMMENT= Write Perl bindings to non-Perl libraries with FFI
+
+LICENSE= ART10 GPLv1+
+LICENSE_COMB= dual
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+BUILD_DEPENDS= p5-Config-AutoConf>=0.309:devel/p5-Config-AutoConf \
+ p5-FFI-CheckLib>=0.05:devel/p5-FFI-CheckLib \
+ p5-File-ShareDir>=0:devel/p5-File-ShareDir
+LIB_DEPENDS= libffi.so:devel/libffi
+RUN_DEPENDS= p5-FFI-CheckLib>=0.05:devel/p5-FFI-CheckLib \
+ p5-File-ShareDir>=0:devel/p5-File-ShareDir
+
+MAKE_ARGS= extra_compiler_flags="-I${LOCALBASE}/include" \
+ extra_linker_flags="-L${LOCALBASE}/lib -lffi"
+USE_PERL5= modbuild
+USES= localbase perl5
+
+post-install:
+ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/${SITE_ARCH_REL}/auto/FFI/Platypus/Platypus.so
+
+.include <bsd.port.mk>
diff --git a/devel/p5-FFI-Platypus/distinfo b/devel/p5-FFI-Platypus/distinfo
new file mode 100644
index 000000000000..cbc3cac8d142
--- /dev/null
+++ b/devel/p5-FFI-Platypus/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1519142077
+SHA256 (FFI-Platypus-0.47.tar.gz) = d41560cdd6604e71bf74dd424131225c66e873ced2cabdce98f7470b1af84a90
+SIZE (FFI-Platypus-0.47.tar.gz) = 199520
diff --git a/devel/p5-FFI-Platypus/files/patch-inc-My-ModuleBuild.pm b/devel/p5-FFI-Platypus/files/patch-inc-My-ModuleBuild.pm
new file mode 100644
index 000000000000..db4b882e5dd1
--- /dev/null
+++ b/devel/p5-FFI-Platypus/files/patch-inc-My-ModuleBuild.pm
@@ -0,0 +1,35 @@
+--- inc/My/ModuleBuild.pm.orig 2017-03-23 22:26:13 UTC
++++ inc/My/ModuleBuild.pm
+@@ -3,7 +3,6 @@ package My::ModuleBuild;
+ use strict;
+ use warnings;
+ use 5.008001;
+-use Alien::FFI;
+ use My::LibTest;
+ use My::AutoConf;
+ use My::Dev;
+@@ -23,8 +22,6 @@ sub new
+
+ $args{c_source} = 'xs';
+ $args{include_dirs} = 'include';
+- $args{extra_compiler_flags} = Alien::FFI->cflags;
+- $args{extra_linker_flags} = Alien::FFI->libs;
+ $args{requires}->{'Math::Int64'} = '0.34' if $ENV{FFI_PLATYPUS_DEBUG_FAKE32} || $Config{uvsize} < 8;
+
+ if($^O eq 'MSWin32' && $Config{cc} =~ /cl(\.exe)?$/i)
+@@ -94,15 +91,6 @@ sub new
+ $ccflags = "@ccflags";
+ }
+
+- # on some configurations (eg. Solaris 64 bit, Strawberry Perl)
+- # -L flags are included in the lddlflags configuration, but we
+- # need to make sure OUR -L comes first
+- my @libdirflags = grep /^-L/, shellwords(Alien::FFI->libs);
+- if(@libdirflags)
+- {
+- $lddlflags = join ' ', @libdirflags, $lddlflags;
+- }
+-
+ if($^O eq 'MSWin32')
+ {
+ # needed by My/Probe.pm on any MSWin32 platform
diff --git a/devel/p5-FFI-Platypus/pkg-descr b/devel/p5-FFI-Platypus/pkg-descr
new file mode 100644
index 000000000000..6e4ba3492244
--- /dev/null
+++ b/devel/p5-FFI-Platypus/pkg-descr
@@ -0,0 +1,7 @@
+Platypus is a library for creating interfaces to machine code libraries written
+in languages like C, C++, Fortran, Rust, Pascal. Essentially anything that gets
+compiled into machine code. This implementation uses libffi to accomplish this
+task. libffi is battle tested by a number of other scripting and virtual machine
+languages, such as Python and Ruby to serve a similar role.
+
+WWW: http://search.cpan.org/dist/FFI-Platypus/
diff --git a/devel/p5-FFI-Platypus/pkg-plist b/devel/p5-FFI-Platypus/pkg-plist
new file mode 100644
index 000000000000..35a27ae62e6d
--- /dev/null
+++ b/devel/p5-FFI-Platypus/pkg-plist
@@ -0,0 +1,31 @@
+%%SITE_ARCH%%/FFI/Platypus.pm
+%%SITE_ARCH%%/FFI/Platypus/API.pm
+%%SITE_ARCH%%/FFI/Platypus/Buffer.pm
+%%SITE_ARCH%%/FFI/Platypus/Declare.pm
+%%SITE_ARCH%%/FFI/Platypus/Lang/ASM.pm
+%%SITE_ARCH%%/FFI/Platypus/Lang/C.pm
+%%SITE_ARCH%%/FFI/Platypus/Lang/Win32.pm
+%%SITE_ARCH%%/FFI/Platypus/Memory.pm
+%%SITE_ARCH%%/FFI/Platypus/Record.pm
+%%SITE_ARCH%%/FFI/Platypus/Record/TieArray.pm
+%%SITE_ARCH%%/FFI/Platypus/ShareConfig.pm
+%%SITE_ARCH%%/FFI/Platypus/Type.pod
+%%SITE_ARCH%%/FFI/Platypus/Type/PointerSizeBuffer.pm
+%%SITE_ARCH%%/FFI/Platypus/Type/StringPointer.pm
+%%SITE_ARCH%%/auto/FFI/Platypus/Platypus.so
+%%SITE_ARCH%%/auto/share/dist/FFI-Platypus/README.txt
+%%SITE_ARCH%%/auto/share/dist/FFI-Platypus/config.json
+%%PERL5_MAN3%%/FFI::Platypus.3.gz
+%%PERL5_MAN3%%/FFI::Platypus::API.3.gz
+%%PERL5_MAN3%%/FFI::Platypus::Buffer.3.gz
+%%PERL5_MAN3%%/FFI::Platypus::Declare.3.gz
+%%PERL5_MAN3%%/FFI::Platypus::Lang::ASM.3.gz
+%%PERL5_MAN3%%/FFI::Platypus::Lang::C.3.gz
+%%PERL5_MAN3%%/FFI::Platypus::Lang::Win32.3.gz
+%%PERL5_MAN3%%/FFI::Platypus::Memory.3.gz
+%%PERL5_MAN3%%/FFI::Platypus::Record.3.gz
+%%PERL5_MAN3%%/FFI::Platypus::Record::TieArray.3.gz
+%%PERL5_MAN3%%/FFI::Platypus::ShareConfig.3.gz
+%%PERL5_MAN3%%/FFI::Platypus::Type.3.gz
+%%PERL5_MAN3%%/FFI::Platypus::Type::PointerSizeBuffer.3.gz
+%%PERL5_MAN3%%/FFI::Platypus::Type::StringPointer.3.gz