Fix lang/erlang

2012-09-05 Thread Matthew Dempsky
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
--- Makefile30 Aug 2012 20:54:59 -  1.51
+++ Makefile5 Sep 2012 22:08:33 -
@@ -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 -
+++ patches/patch-erts_configure_in 5 Sep 2012 22:08:33 -
@@ -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 



Re: Fix lang/erlang

2012-09-05 Thread Nigel Taylor
On 09/05/12 23:17, Matthew Dempsky wrote:
 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?
 
Ok

Built on amd64 and i386, along with devel/rebar. lang/elixar also built
which depends on devel/rebar. lang/elixar regression tests run ok. Only
have i386/amd64 to build / run regression tests on.

The existing PLIST is ok.


make update-plist works for me. Generates a different and wrong PLIST,

$ diff -u PLIST{.orig,}
--- PLIST.orig  Sat May 26 17:16:12 2012
+++ PLIST   Thu Sep  6 00:18:41 2012
@@ -328,6 +328,7 @@
 lib/erlang/${ERTS}/src/
 lib/erlang/${ERTS}/src/setuid_socket_wrap.c
 lib/erlang/lib/
+@comment lib/erlang/lib/${TOOLS}/emacs/test.erl.orig
 lib/erlang/lib/${APPMON}/
 lib/erlang/lib/${APPMON}/doc/
 lib/erlang/lib/${APPMON}/doc/html/
@@ -6025,7 +6026,7 @@
 lib/erlang/lib/${TOOLS}/emacs/erlang.el
 lib/erlang/lib/${TOOLS}/emacs/erlang_appwiz.el
 lib/erlang/lib/${TOOLS}/emacs/test.erl.indented
-@comment lib/erlang/lib/${TOOLS}/emacs/test.erl.orig
+lib/erlang/lib/${TOOLS}/emacs/test.erl.orig
 lib/erlang/lib/${TOOLS}/examples/
 lib/erlang/lib/${TOOLS}/examples/xref_examples.erl
 lib/erlang/lib/${TOOLS}/info


reordered the @comment line, and uncommented entry
lib/erlang/lib/${TOOLS}/emacs/test.erl.orig