diff --git a/devel/hs-network/Makefile b/devel/hs-network/Makefile index 66bee096a14..7c147816771 100644 --- a/devel/hs-network/Makefile +++ b/devel/hs-network/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.16 2012/10/28 23:28:20 kili Exp $ +# $OpenBSD: Makefile,v 1.17 2012/11/06 21:24:16 kili Exp $ COMMENT = Haskell networking library @@ -18,6 +18,9 @@ MODULES = lang/ghc MODGHC_BUILD = cabal hackage haddock register +CONFIGURE_STYLE = autoconf +AUTOCONF_VERSION = 2.61 + RUN_DEPENDS = devel/hs-parsec>=2.0,<3.2 BUILD_DEPENDS = ${RUN_DEPENDS} diff --git a/devel/hs-network/patches/patch-configure b/devel/hs-network/patches/patch-configure deleted file mode 100644 index c8b2b4b4b8c..00000000000 --- a/devel/hs-network/patches/patch-configure +++ /dev/null @@ -1,90 +0,0 @@ -$OpenBSD: patch-configure,v 1.1 2012/10/02 13:35:40 dcoppa Exp $ - -ucred is sockpeercred on OpenBSD - ---- configure.orig Mon Oct 1 20:30:38 2012 -+++ configure Mon Oct 1 20:31:01 2012 -@@ -4292,8 +4292,8 @@ fi - rm -f -r conftest* - - --{ echo "$as_me:$LINENO: checking for SO_PEERCRED and struct ucred in sys/socket.h" >&5 --echo $ECHO_N "checking for SO_PEERCRED and struct ucred in sys/socket.h... $ECHO_C" >&6; } -+{ echo "$as_me:$LINENO: checking for SO_PEERCRED and struct sockpeercred in sys/socket.h" >&5 -+echo $ECHO_N "checking for SO_PEERCRED and struct sockpeercred in sys/socket.h... $ECHO_C" >&6; } - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF -@@ -4305,7 +4305,7 @@ cat >>conftest.$ac_ext <<_ACEOF - #ifndef SO_PEERCRED - # error no SO_PEERCRED - #endif --struct ucred u; -+struct sockpeercred u; - int - main () - { -@@ -4331,16 +4331,16 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then -- ac_cv_ucred=yes -+ ac_cv_sockpeercred=yes - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - -- ac_cv_ucred=no -+ ac_cv_sockpeercred=no - fi - - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext --if test "x$ac_cv_ucred" = xno; then -+if test "x$ac_cv_sockpeercred" = xno; then - old_CFLAGS="$CFLAGS" - CFLAGS="-D_GNU_SOURCE $CFLAGS" - cat >conftest.$ac_ext <<_ACEOF -@@ -4354,7 +4354,7 @@ cat >>conftest.$ac_ext <<_ACEOF - #ifndef SO_PEERCRED - # error no SO_PEERCRED - #endif --struct ucred u; -+struct sockpeercred u; - int - main () - { -@@ -4380,29 +4380,29 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then -- ac_cv_ucred=yes -+ ac_cv_sockpeercred=yes - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - -- ac_cv_ucred=no -+ ac_cv_sockpeercred=no - fi - - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -- if test "x$ac_cv_ucred" = xyes; then -+ if test "x$ac_cv_sockpeercred" = xyes; then - EXTRA_CPPFLAGS=-D_GNU_SOURCE - fi - else - old_CFLAGS="$CFLAGS" - fi --if test "x$ac_cv_ucred" = xno; then -+if test "x$ac_cv_sockpeercred" = xno; then - CFLAGS="$old_CFLAGS" - { echo "$as_me:$LINENO: result: no" >&5 - echo "${ECHO_T}no" >&6; } - else - - cat >>confdefs.h <<\_ACEOF --#define HAVE_STRUCT_UCRED 1 -+#define HAVE_STRUCT_SOCKPEERCRED 1 - _ACEOF - - { echo "$as_me:$LINENO: result: yes" >&5 diff --git a/devel/hs-network/patches/patch-configure_ac b/devel/hs-network/patches/patch-configure_ac new file mode 100644 index 00000000000..f2f1ba653b7 --- /dev/null +++ b/devel/hs-network/patches/patch-configure_ac @@ -0,0 +1,50 @@ +$OpenBSD: patch-configure_ac,v 1.1 2012/11/06 21:24:16 kili Exp $ + +ucred is sockpeercred on OpenBSD + +--- configure.ac.orig Tue Apr 24 05:19:39 2012 ++++ configure.ac Tue Nov 6 22:06:51 2012 +@@ -64,16 +64,16 @@ AC_EGREP_HEADER(in_addr_t, netinet/in.h, + AC_MSG_RESULT(no)) + + dnl -------------------------------------------------- +-dnl * test for SO_PEERCRED and struct ucred ++dnl * test for SO_PEERCRED and struct sockpeercred + dnl -------------------------------------------------- +-AC_MSG_CHECKING(for SO_PEERCRED and struct ucred in sys/socket.h) ++AC_MSG_CHECKING(for SO_PEERCRED and struct sockpeercred in sys/socket.h) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include + #include + #ifndef SO_PEERCRED + # error no SO_PEERCRED + #endif +-struct ucred u;]])],ac_cv_ucred=yes,ac_cv_ucred=no) +-if test "x$ac_cv_ucred" = xno; then ++struct sockpeercred u;]])],ac_cv_sockpeercred=yes,ac_cv_sockpeercred=no) ++if test "x$ac_cv_sockpeercred" = xno; then + old_CFLAGS="$CFLAGS" + CFLAGS="-D_GNU_SOURCE $CFLAGS" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include +@@ -81,18 +81,18 @@ if test "x$ac_cv_ucred" = xno; then + #ifndef SO_PEERCRED + # error no SO_PEERCRED + #endif +-struct ucred u;]])],ac_cv_ucred=yes,ac_cv_ucred=no) +- if test "x$ac_cv_ucred" = xyes; then ++struct sockpeercred u;]])],ac_cv_sockpeercred=yes,ac_cv_sockpeercred=no) ++ if test "x$ac_cv_sockpeercred" = xyes; then + EXTRA_CPPFLAGS=-D_GNU_SOURCE + fi + else + old_CFLAGS="$CFLAGS" + fi +-if test "x$ac_cv_ucred" = xno; then ++if test "x$ac_cv_sockpeercred" = xno; then + CFLAGS="$old_CFLAGS" + AC_MSG_RESULT(no) + else +- AC_DEFINE([HAVE_STRUCT_UCRED], [1], [Define to 1 if you have both SO_PEERCRED and struct ucred.]) ++ AC_DEFINE([HAVE_STRUCT_SOCKPEERCRED], [1], [Define to 1 if you have both SO_PEERCRED and struct sockpeercred.]) + AC_MSG_RESULT(yes) + fi +