diff options
author | schmonz <schmonz@pkgsrc.org> | 2014-05-17 04:06:56 +0000 |
---|---|---|
committer | schmonz <schmonz@pkgsrc.org> | 2014-05-17 04:06:56 +0000 |
commit | 4d8d18a9826b2d971c89f4dde336883e4da60d63 (patch) | |
tree | c74c4d659418c65dd9402ed293ad744f0e176323 /mail | |
parent | 1cff6a619ce4675d1a914287811ef76e80efec02 (diff) | |
download | pkgsrc-4d8d18a9826b2d971c89f4dde336883e4da60d63.tar.gz |
Detect absence of AI_V4MAPPED to fix build on NetBSD.
Diffstat (limited to 'mail')
-rw-r--r-- | mail/isync/Makefile | 5 | ||||
-rw-r--r-- | mail/isync/distinfo | 5 | ||||
-rw-r--r-- | mail/isync/patches/patch-configure | 77 | ||||
-rw-r--r-- | mail/isync/patches/patch-configure.ac | 14 | ||||
-rw-r--r-- | mail/isync/patches/patch-src_socket.c | 18 |
5 files changed, 117 insertions, 2 deletions
diff --git a/mail/isync/Makefile b/mail/isync/Makefile index 9bfef642d2c..d27c067d640 100644 --- a/mail/isync/Makefile +++ b/mail/isync/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.33 2014/04/24 14:48:44 schmonz Exp $ +# $NetBSD: Makefile,v 1.34 2014/05/17 04:06:56 schmonz Exp $ DISTNAME= isync-1.1.0 CATEGORIES= mail net @@ -16,6 +16,9 @@ GNU_CONFIGURE= yes CONFIGURE_ARGS+= --with-ssl=${BUILDLINK_PREFIX.openssl} LDFLAGS+= -lcrypto +post-patch: + ${TOUCH} ${WRKSRC}/configure ${WRKSRC}/aclocal.m4 ${WRKSRC}/Makefile.in + BUILDLINK_TRANSFORM+= l:db:${BDB_TYPE} .include "../../security/openssl/buildlink3.mk" .include "../../mk/bdb.buildlink3.mk" diff --git a/mail/isync/distinfo b/mail/isync/distinfo index 781751b9b81..cbf1211ad04 100644 --- a/mail/isync/distinfo +++ b/mail/isync/distinfo @@ -1,9 +1,12 @@ -$NetBSD: distinfo,v 1.11 2014/04/24 14:48:44 schmonz Exp $ +$NetBSD: distinfo,v 1.12 2014/05/17 04:06:56 schmonz Exp $ SHA1 (isync-1.1.0.tar.gz) = d99bd9603e17f94ebe4af1691482a6676ea0fb42 RMD160 (isync-1.1.0.tar.gz) = 0060ef3249accc4e48bf7cd0a4b24be3c570337d Size (isync-1.1.0.tar.gz) = 249374 bytes SHA1 (patch-ae) = e1a1badcb99fe6089a15a259985933aceedfc110 SHA1 (patch-af) = f3803de6c97733fa5fd17ab89dbd75910eec3301 +SHA1 (patch-configure) = c43a4d860dd92f8e22459f8fef8f024017e90137 +SHA1 (patch-configure.ac) = b629267faa8bf9756d497b3d950a71366b529743 SHA1 (patch-src_Makefile.in) = f946bff2e0a2b9a50fdcc752b2d5e3767f42a03b SHA1 (patch-src_compat_Makefile.in) = 82ee8cb1abcb8479865856b085c2ca016242b6dd +SHA1 (patch-src_socket.c) = a962c02b05df1c3ad50155264c3e7c0ab5c291b8 diff --git a/mail/isync/patches/patch-configure b/mail/isync/patches/patch-configure new file mode 100644 index 00000000000..f4159ca739b --- /dev/null +++ b/mail/isync/patches/patch-configure @@ -0,0 +1,77 @@ +$NetBSD: patch-configure,v 1.1 2014/05/17 04:06:56 schmonz Exp $ + +NetBSD does not support AI_V4MAPPED. + +--- configure.orig 2014-05-17 03:55:53.000000000 +0000 ++++ configure +@@ -1799,6 +1799,52 @@ $as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + + } # ac_fn_c_check_func ++ ++# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES ++# --------------------------------------------- ++# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR ++# accordingly. ++ac_fn_c_check_decl () ++{ ++ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack ++ as_decl_name=`echo $2|sed 's/ *(.*//'` ++ as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 ++$as_echo_n "checking whether $as_decl_name is declared... " >&6; } ++if eval \${$3+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++$4 ++int ++main () ++{ ++#ifndef $as_decl_name ++#ifdef __cplusplus ++ (void) $as_decl_use; ++#else ++ (void) $as_decl_name; ++#endif ++#endif ++ ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ eval "$3=yes" ++else ++ eval "$3=no" ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++fi ++eval ac_res=\$$3 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 ++$as_echo "$ac_res" >&6; } ++ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno ++ ++} # ac_fn_c_check_decl + cat >config.log <<_ACEOF + This file contains any messages produced by compilers while + running configure, to aid debugging if configure makes a mistake. +@@ -4290,6 +4336,17 @@ _ACEOF + fi + done + ++ac_fn_c_check_decl "$LINENO" "AI_V4MAPPED" "ac_cv_have_decl_AI_V4MAPPED" "$ac_includes_default" ++if test "x$ac_cv_have_decl_AI_V4MAPPED" = xyes; then : ++ ac_have_decl=1 ++else ++ ac_have_decl=0 ++fi ++ ++cat >>confdefs.h <<_ACEOF ++#define HAVE_DECL_AI_V4MAPPED $ac_have_decl ++_ACEOF ++ + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 + $as_echo_n "checking for socket in -lsocket... " >&6; } diff --git a/mail/isync/patches/patch-configure.ac b/mail/isync/patches/patch-configure.ac new file mode 100644 index 00000000000..59a78628a06 --- /dev/null +++ b/mail/isync/patches/patch-configure.ac @@ -0,0 +1,14 @@ +$NetBSD: patch-configure.ac,v 1.1 2014/05/17 04:06:56 schmonz Exp $ + +NetBSD does not support AI_V4MAPPED. + +--- configure.ac.orig 2013-12-13 17:54:37.000000000 +0000 ++++ configure.ac +@@ -30,6 +30,7 @@ fi + + AC_CHECK_HEADERS(sys/poll.h sys/select.h) + AC_CHECK_FUNCS(vasprintf memrchr) ++AC_CHECK_DECLS([AI_V4MAPPED]) + + AC_CHECK_LIB(socket, socket, [SOCK_LIBS="-lsocket"]) + AC_CHECK_LIB(nsl, inet_ntoa, [SOCK_LIBS="$SOCK_LIBS -lnsl"]) diff --git a/mail/isync/patches/patch-src_socket.c b/mail/isync/patches/patch-src_socket.c new file mode 100644 index 00000000000..93cb24abb19 --- /dev/null +++ b/mail/isync/patches/patch-src_socket.c @@ -0,0 +1,18 @@ +$NetBSD: patch-src_socket.c,v 1.1 2014/05/17 04:06:56 schmonz Exp $ + +NetBSD does not support AI_V4MAPPED. + +--- src/socket.c.orig 2013-12-13 17:54:37.000000000 +0000 ++++ src/socket.c +@@ -349,7 +349,11 @@ socket_connect( conn_t *sock, void (*cb) + memset( &hints, 0, sizeof(hints) ); + hints.ai_family = AF_UNSPEC; + hints.ai_socktype = SOCK_STREAM; ++#if defined(HAVE_DECL_AI_V4MAPPED) + hints.ai_flags = AI_V4MAPPED | AI_ADDRCONFIG; ++#else ++ hints.ai_flags = AI_ADDRCONFIG; ++#endif + infon( "Resolving %s... ", conf->host ); + if ((gaierr = getaddrinfo( conf->host, NULL, &hints, &sock->addrs ))) { + error( "IMAP error: Cannot resolve server '%s': %s\n", conf->host, gai_strerror( gaierr ) ); |