This fixes erlang to properly link its shared objects on OpenBSD, and
lets at least devel/rebar now build.

"make update-plist" tells me there's a new pkg/PLIST, but then fails
to write it for some currently unknown reason.  I don't expect the
plist actually changes with this, but someone might double check that.

ok?

Index: Makefile
===================================================================
RCS file: /cvs/ports/lang/erlang/Makefile,v
retrieving revision 1.51
diff -u -p -r1.51 Makefile
--- Makefile    30 Aug 2012 20:54:59 -0000      1.51
+++ Makefile    5 Sep 2012 22:08:33 -0000
@@ -7,7 +7,7 @@ V=              R15B01
 DISTNAME=      otp_src_${V}
 PKGNAME=       erlang-15b.01
 EPOCH=         0
-REVISION=      0
+REVISION=      1
 CATEGORIES=    lang
 
 # Erlang Public License
@@ -41,6 +41,7 @@ USE_GROFF =   Yes
 CONFIGURE_STYLE=autoconf no-autoheader
 CONFIGURE_ENV= LDFLAGS="${LDFLAGS} -pthread"
 AUTOCONF_VERSION=2.59
+AUTOCONF_DIR=  ${WRKSRC} ${WRKSRC}/erts
 MODGNU_CONFIG_GUESS_DIRS=      ${WRKSRC}/erts/autoconf \
                                ${WRKSRC}/lib/erl_interface/src/auxdir
 
Index: patches/patch-erts_configure_in
===================================================================
RCS file: patches/patch-erts_configure_in
diff -N patches/patch-erts_configure_in
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-erts_configure_in     5 Sep 2012 22:08:33 -0000
@@ -0,0 +1,15 @@
+$OpenBSD$
+--- erts/configure.in.orig     Sun Apr  1 11:15:00 2012
++++ erts/configure.in  Wed Sep  5 14:52:08 2012
+@@ -3548,6 +3548,11 @@ case $host_os in
+                       DED_LDFLAGS="-m32 $DED_LDFLAGS"
+               fi
+       ;;      
++      openbsd*)
++              DED_LD="$CC"
++              DED_LD_FLAG_RUNTIME_LIBRARY_PATH="$CFLAG_RUNTIME_LIBRARY_PATH"
++              DED_LDFLAGS="-shared"
++      ;;
+       osf*)
+               # NOTE! Whitespace after -rpath is important.
+               DED_LD_FLAG_RUNTIME_LIBRARY_PATH="-rpath "

Reply via email to