diff options
author | olgeni <olgeni@FreeBSD.org> | 2007-07-03 04:47:53 +0800 |
---|---|---|
committer | olgeni <olgeni@FreeBSD.org> | 2007-07-03 04:47:53 +0800 |
commit | b965e39a1e321b9869084070dc462eaa0d2ddd56 (patch) | |
tree | 8eb97e1e032a26da9bddb1e6fca43f4f8425653f /lang/erlang | |
parent | e945a0568fe5af734d9506bb599f64ad00d4680a (diff) | |
download | freebsd-ports-gnome-b965e39a1e321b9869084070dc462eaa0d2ddd56.tar.gz freebsd-ports-gnome-b965e39a1e321b9869084070dc462eaa0d2ddd56.tar.zst freebsd-ports-gnome-b965e39a1e321b9869084070dc462eaa0d2ddd56.zip |
* Use gcc(1) rather than ld(1) to link the crypto_drv.so port driver, else the Erlang runtime would fail to load it.
* Use the correct struct member when compiling SCTP support (this should unbreak CURRENT).
Submitted by: dumbbell
Diffstat (limited to 'lang/erlang')
-rw-r--r-- | lang/erlang/Makefile | 1 | ||||
-rw-r--r-- | lang/erlang/files/patch-erts-emulator-Makefile.in | 15 | ||||
-rw-r--r-- | lang/erlang/files/patch-erts-emulator-drivers-common-inet_drv.c | 29 | ||||
-rw-r--r-- | lang/erlang/files/patch-erts_config.h.in | 17 | ||||
-rw-r--r-- | lang/erlang/files/patch-erts_configure | 140 |
5 files changed, 202 insertions, 0 deletions
diff --git a/lang/erlang/Makefile b/lang/erlang/Makefile index 5a30b57ab157..a504e0f01e14 100644 --- a/lang/erlang/Makefile +++ b/lang/erlang/Makefile @@ -7,6 +7,7 @@ PORTNAME= erlang PORTVERSION= r11b5 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= lang parallel MASTER_SITES= http://www.erlang.org/download/ \ diff --git a/lang/erlang/files/patch-erts-emulator-Makefile.in b/lang/erlang/files/patch-erts-emulator-Makefile.in new file mode 100644 index 000000000000..20d61548c764 --- /dev/null +++ b/lang/erlang/files/patch-erts-emulator-Makefile.in @@ -0,0 +1,15 @@ + +$FreeBSD$ + +--- erts/emulator/Makefile.in.orig ++++ erts/emulator/Makefile.in +@@ -265,7 +265,9 @@ + endif + WITH_SCTP=@WITH_SCTP@ + ifdef WITH_SCTP ++ifneq ($(findstring freebsd,$(TARGET)),freebsd) + LIBS += -lsctp ++endif + endif + + ORG_THR_LIBS=@EMU_THR_LIBS@ diff --git a/lang/erlang/files/patch-erts-emulator-drivers-common-inet_drv.c b/lang/erlang/files/patch-erts-emulator-drivers-common-inet_drv.c new file mode 100644 index 000000000000..f7d48c82139c --- /dev/null +++ b/lang/erlang/files/patch-erts-emulator-drivers-common-inet_drv.c @@ -0,0 +1,29 @@ + +$FreeBSD$ + +--- erts/emulator/drivers/common/inet_drv.c.orig ++++ erts/emulator/drivers/common/inet_drv.c +@@ -5684,7 +5684,11 @@ + arg.es.sctp_peer_error_event = get_int8(curr); curr++; + arg.es.sctp_shutdown_event = get_int8(curr); curr++; + arg.es.sctp_partial_delivery_event = get_int8(curr); curr++; ++# ifdef HAVE_STRUCT_SCTP_EVENT_SUBSCRIBE_SCTP_ADAPTATION_LAYER_EVENT ++ arg.es.sctp_adaptation_layer_event = get_int8(curr); curr++; ++# else + arg.es.sctp_adaption_layer_event = get_int8(curr); curr++; ++# endif + + proto = IPPROTO_SCTP; + type = SCTP_EVENTS; +@@ -6580,7 +6584,11 @@ + i = LOAD_BOOL (spec, i, evs.sctp_peer_error_event); + i = LOAD_BOOL (spec, i, evs.sctp_shutdown_event); + i = LOAD_BOOL (spec, i, evs.sctp_partial_delivery_event); ++# ifdef HAVE_STRUCT_SCTP_EVENT_SUBSCRIBE_SCTP_ADAPTATION_LAYER_EVENT ++ i = LOAD_BOOL (spec, i, evs.sctp_adaptation_layer_event); ++# else + i = LOAD_BOOL (spec, i, evs.sctp_adaption_layer_event); ++# endif + /* NB: sctp_authentication_event is not yet supported in Linux */ + i = LOAD_TUPLE (spec, i, 9); + i = LOAD_TUPLE (spec, i, 2); diff --git a/lang/erlang/files/patch-erts_config.h.in b/lang/erlang/files/patch-erts_config.h.in new file mode 100644 index 000000000000..0cb9747c20e1 --- /dev/null +++ b/lang/erlang/files/patch-erts_config.h.in @@ -0,0 +1,17 @@ + +$FreeBSD$ + +--- erts/config.h.in.orig ++++ erts/config.h.in +@@ -366,6 +366,10 @@ + /* Define to 1 if `ssh_data' is member of `struct sctp_send_failed'. */ + #undef HAVE_STRUCT_SCTP_SEND_FAILED_SSH_DATA + ++/* Define to 1 if `sctp_adaptation_layer_event' is member of ++ `struct sctp_event_subscribe'. */ ++#undef HAVE_STRUCT_SCTP_EVENT_SUBSCRIBE_SCTP_ADAPTATION_LAYER_EVENT ++ + /* Define to 1 if you have the <syslog.h> header file. */ + #undef HAVE_SYSLOG_H + + diff --git a/lang/erlang/files/patch-erts_configure b/lang/erlang/files/patch-erts_configure new file mode 100644 index 000000000000..95badb4bf7cb --- /dev/null +++ b/lang/erlang/files/patch-erts_configure @@ -0,0 +1,140 @@ + +$FreeBSD$ + +--- erts/configure.orig ++++ erts/configure +@@ -11040,6 +11040,125 @@ + + + fi ++echo "$as_me:$LINENO: checking for struct sctp_event_subscribe.sctp_adaptation_layer_event" >&5 ++echo $ECHO_N "checking for struct sctp_event_subscribe.sctp_adaptation_layer_event... $ECHO_C" >&6 ++if test "${ac_cv_member_struct_sctp_event_subscribe_sctp_adaptation_layer_event+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++#if HAVE_SYS_SOCKET_H ++ #include <sys/socket.h> ++ #endif ++ #include <netinet/sctp.h> ++ ++ ++int ++main () ++{ ++static struct sctp_event_subscribe ac_aggr; ++if (ac_aggr.sctp_adaptation_layer_event) ++return 0; ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ++ (eval $ac_compile) 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; } && ++ { ac_try='test -s conftest.$ac_objext' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ ac_cv_member_struct_sctp_event_subscribe_sctp_adaptation_layer_event=yes ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++#if HAVE_SYS_SOCKET_H ++ #include <sys/socket.h> ++ #endif ++ #include <netinet/sctp.h> ++ ++ ++int ++main () ++{ ++static struct sctp_event_subscribe ac_aggr; ++if (sizeof ac_aggr.sctp_adaptation_layer_event) ++return 0; ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ++ (eval $ac_compile) 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; } && ++ { ac_try='test -s conftest.$ac_objext' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ ac_cv_member_struct_sctp_event_subscribe_sctp_adaptation_layer_event=yes ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ac_cv_member_struct_sctp_event_subscribe_sctp_adaptation_layer_event=no ++fi ++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++fi ++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++fi ++echo "$as_me:$LINENO: result: $ac_cv_member_struct_sctp_event_subscribe_sctp_adaptation_layer_event" >&5 ++echo "${ECHO_T}$ac_cv_member_struct_sctp_event_subscribe_sctp_adaptation_layer_event" >&6 ++if test $ac_cv_member_struct_sctp_event_subscribe_sctp_adaptation_layer_event = yes; then ++ ++cat >>confdefs.h <<_ACEOF ++#define HAVE_STRUCT_SCTP_EVENT_SUBSCRIBE_SCTP_ADAPTATION_LAYER_EVENT 1 ++_ACEOF ++ ++ ++fi + + fi + +@@ -19219,7 +19219,7 @@ + DED_LD_FLAG_RUNTIME_LIBRARY_PATH= + STATIC_CFLAGS="-mdynamic-no-pic" + ;; +- linux*) ++ linux*|freebsd*) + DED_LD="$CC" + DED_LDFLAGS="-shared" + ;; |