pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

MoarVM: Fix build and packaging on NetBSD.



Module Name:	pkgsrc-wip
Committed By:	Thomas Klausner <wiz%NetBSD.org@localhost>
Pushed By:	wiz
Date:		Mon Dec 28 22:15:00 2015 +0100
Changeset:	23a66795b761433f518ff95d43d741c24ab3f52c

Modified Files:
	MoarVM/Makefile
	MoarVM/PLIST
	MoarVM/distinfo
Added Files:
	MoarVM/patches/patch-build_probe.pm
	MoarVM/patches/patch-build_setup.pm

Log Message:
MoarVM: Fix build and packaging on NetBSD.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=23a66795b761433f518ff95d43d741c24ab3f52c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 MoarVM/Makefile                     | 10 ++++++++++
 MoarVM/PLIST                        |  2 +-
 MoarVM/distinfo                     |  2 ++
 MoarVM/patches/patch-build_probe.pm | 15 +++++++++++++++
 MoarVM/patches/patch-build_setup.pm | 22 ++++++++++++++++++++++
 5 files changed, 50 insertions(+), 1 deletion(-)

diffs:
diff --git a/MoarVM/Makefile b/MoarVM/Makefile
index c2ef7fe..3d5de3b 100644
--- a/MoarVM/Makefile
+++ b/MoarVM/Makefile
@@ -14,6 +14,8 @@ USE_LANGUAGES=	c c++
 
 HAS_CONFIGURE=		yes
 CONFIG_SHELL=		${PERL5}
+LDFLAGS+=		${COMPILER_RPATH_FLAG}${PREFIX}/lib -L${PREFIX}/lib
+CONFIGURE_ENV+=		LDFLAGS=${LDFLAGS:Q}
 CONFIGURE_SCRIPT=	Configure.pl
 CONFIGURE_ARGS=		--prefix=${PREFIX:Q} \
 			--has-libatomic_ops \
@@ -21,6 +23,14 @@ CONFIGURE_ARGS=		--prefix=${PREFIX:Q} \
 			--has-libuv \
 			--has-libtommath
 
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} == "Darwin"
+PLIST_SUBST+=	EXT=dylib
+.else
+PLIST_SUBST+=	EXT=so
+.endif
+
 .include "../../devel/libatomic_ops/buildlink3.mk"
 .include "../../devel/libffi/buildlink3.mk"
 .include "../../devel/libuv/buildlink3.mk"
diff --git a/MoarVM/PLIST b/MoarVM/PLIST
index 63f2418..43ec6e3 100644
--- a/MoarVM/PLIST
+++ b/MoarVM/PLIST
@@ -174,7 +174,7 @@ include/msinttypes/inttypes.h
 include/msinttypes/stdint.h
 include/sha1/sha1.h
 include/tinymt/tinymt64.h
-lib/libmoar.dylib
+lib/libmoar.${EXT}
 share/nqp/lib/MAST/Nodes.nqp
 share/nqp/lib/MAST/Ops.nqp
 share/pkgconfig/moar.pc
diff --git a/MoarVM/distinfo b/MoarVM/distinfo
index 0b65711..c868e3e 100644
--- a/MoarVM/distinfo
+++ b/MoarVM/distinfo
@@ -4,3 +4,5 @@ SHA1 (MoarVM-2015.12.tar.gz) = aec5d730a3f1ee80bb86190f21c0b90f1379922d
 RMD160 (MoarVM-2015.12.tar.gz) = 372b3dacee231c371730ba6e8089e315ee8e3687
 SHA512 (MoarVM-2015.12.tar.gz) = cd51dc2495a2f897ecff3ae46ff4334a840d52de6f3c492473bbd4d0b2fc5dffe4e671b008bd5baa623ba7017bf995900898f690b0b93a827559f43525e421f4
 Size (MoarVM-2015.12.tar.gz) = 3273408 bytes
+SHA1 (patch-build_probe.pm) = 8ea9313c1d2329239f123fb4f6c28e1f7de566c2
+SHA1 (patch-build_setup.pm) = fd53d47bd3126b2c89d4e8d82c6bc0b6db5f4fdf
diff --git a/MoarVM/patches/patch-build_probe.pm b/MoarVM/patches/patch-build_probe.pm
new file mode 100644
index 0000000..fa514b1
--- /dev/null
+++ b/MoarVM/patches/patch-build_probe.pm
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Add LDFLAGS for Configure.pl probes so e.g. finding libffi works.
+
+--- build/probe.pm.orig	2015-12-25 12:37:32.000000000 +0000
++++ build/probe.pm
+@@ -57,7 +57,7 @@ sub compile {
+         push @objs, $obj;
+     }
+ 
+-    my $command = "$config->{ld} $config->{ldout}$leaf @objs $config->{ldlibs} >$devnull 2>&1";
++    my $command = "$config->{ld} $ENV{'LDFLAGS'} $config->{ldout}$leaf @objs $config->{ldlibs} >$devnull 2>&1";
+     system $command
+         and return;
+     return 1;
diff --git a/MoarVM/patches/patch-build_setup.pm b/MoarVM/patches/patch-build_setup.pm
new file mode 100644
index 0000000..10a3f90
--- /dev/null
+++ b/MoarVM/patches/patch-build_setup.pm
@@ -0,0 +1,22 @@
+$NetBSD$
+
+pkgsrc uses gmake everywhere, so use gmake syntax.
+Not for upstreaming.
+
+--- build/setup.pm.orig	2015-12-25 12:37:32.000000000 +0000
++++ build/setup.pm
+@@ -171,12 +171,12 @@ our %TC_BSD = (
+     %TC_POSIX,
+ 
+     mknoisy => <<'TERM',
+-.if $(NOISY) != 1
++ifneq ($(NOISY), 1)
+ MSG = @echo
+ CMD = @
+ NOOUT = > @nul@
+ NOERR = 2> @nul@
+-.endif
++endif
+ TERM
+ );
+ 


Home | Main Index | Thread Index | Old Index