summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorbjs <bjs@pkgsrc.org>2008-09-07 02:40:53 +0000
committerbjs <bjs@pkgsrc.org>2008-09-07 02:40:53 +0000
commitf8fc2597e3d2ff34d56f5715b9c845ab14bd9cee (patch)
tree83734bffc8fd6e7f97bb4765e78e5511aebb1882 /security
parent58c9eb1cce8a72d5049a63734908e0c2ec08d970 (diff)
downloadpkgsrc-f8fc2597e3d2ff34d56f5715b9c845ab14bd9cee.tar.gz
Update to libassuan-1.0.5. As shipped, it builds with -fPIC on linux.
This is not acceptable for us. Instead, we patch to use libtool. The included test passes. Changes since 1.0.3: * Minor fixes. * Build library for GNU/Linux as PIC [**but we use libtool**] * New hook feature to enhance the internal I/O functions.
Diffstat (limited to 'security')
-rw-r--r--security/libassuan/Makefile17
-rw-r--r--security/libassuan/PLIST4
-rw-r--r--security/libassuan/distinfo12
-rw-r--r--security/libassuan/patches/patch-aa95
-rw-r--r--security/libassuan/patches/patch-ab44
-rw-r--r--security/libassuan/patches/patch-ac71
-rw-r--r--security/libassuan/patches/patch-ad11
7 files changed, 246 insertions, 8 deletions
diff --git a/security/libassuan/Makefile b/security/libassuan/Makefile
index 0713a141c8f..a753c6203d2 100644
--- a/security/libassuan/Makefile
+++ b/security/libassuan/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.15 2008/07/14 12:56:11 joerg Exp $
+# $NetBSD: Makefile,v 1.16 2008/09/07 02:40:53 bjs Exp $
#
-DISTNAME= libassuan-1.0.3
+DISTNAME= libassuan-1.0.5
CATEGORIES= security
MASTER_SITES= ftp://ftp.gnupg.org/gcrypt/libassuan/
EXTRACT_SUFX= .tar.bz2
@@ -15,8 +15,21 @@ PKG_DESTDIR_SUPPORT= user-destdir
GNU_CONFIGURE= yes
INFO_FILES= yes
+USE_TOOLS+= autoconf autoreconf automake
+USE_LIBTOOL= yes
+###
+### XXX By default, this package will build with -fPIC on linux.
+### Instead, let's patch it to use libtool and use --with-pic
+### to build position-independent code when possible.
+CONFIGURE_ARGS+= --with-pic
+TEST_TARGET= check
BUILDLINK_API_DEPENDS.libgpg-error+= libgpg-error>=1.0.0
+pre-configure:
+ cd ${WRKSRC} && \
+ ${SETENV} ${CONFIGURE_ENV} ${CONFIG_SHELL} autogen.sh && \
+ ${TOUCH} ${TOUCH_FLAGS} libtool
+
.include "../../security/libgpg-error/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/security/libassuan/PLIST b/security/libassuan/PLIST
index ad855f265e6..3b50bfd1709 100644
--- a/security/libassuan/PLIST
+++ b/security/libassuan/PLIST
@@ -1,6 +1,6 @@
-@comment $NetBSD: PLIST,v 1.3 2006/03/31 23:56:29 jlam Exp $
+@comment $NetBSD: PLIST,v 1.4 2008/09/07 02:40:53 bjs Exp $
bin/libassuan-config
include/assuan.h
info/assuan.info
-lib/libassuan.a
+lib/libassuan.la
share/aclocal/libassuan.m4
diff --git a/security/libassuan/distinfo b/security/libassuan/distinfo
index 6462b74f873..2973ef578c5 100644
--- a/security/libassuan/distinfo
+++ b/security/libassuan/distinfo
@@ -1,5 +1,9 @@
-$NetBSD: distinfo,v 1.9 2007/11/07 11:13:15 shannonjr Exp $
+$NetBSD: distinfo,v 1.10 2008/09/07 02:40:53 bjs Exp $
-SHA1 (libassuan-1.0.3.tar.bz2) = 1a16c9d1086e2cda819a3f7d4e5ebd41eb350e5f
-RMD160 (libassuan-1.0.3.tar.bz2) = fd4fa8bff29d8a7ee9901aa2ad665df989c5c82e
-Size (libassuan-1.0.3.tar.bz2) = 292168 bytes
+SHA1 (libassuan-1.0.5.tar.bz2) = f6c36e9d99736883a8ce5b80b0a51d854cbbbc70
+RMD160 (libassuan-1.0.5.tar.bz2) = 7c4a75c71a3117cf140ea66ca89765349f39218e
+Size (libassuan-1.0.5.tar.bz2) = 297786 bytes
+SHA1 (patch-aa) = 89707efd069a5113fbdaba2464405e91c9173ca6
+SHA1 (patch-ab) = c6af201ae6c8030310c8af7be5af88a7ce02c6c5
+SHA1 (patch-ac) = 8dbb703833c8b0a63b5b355309c91cd189235468
+SHA1 (patch-ad) = e0fa944fa8ac1e5e4f1b9ba0df934fe15e26e655
diff --git a/security/libassuan/patches/patch-aa b/security/libassuan/patches/patch-aa
new file mode 100644
index 00000000000..e1192e5f8af
--- /dev/null
+++ b/security/libassuan/patches/patch-aa
@@ -0,0 +1,95 @@
+$NetBSD: patch-aa,v 1.1 2008/09/07 02:40:53 bjs Exp $
+
+--- configure.ac.orig 2008-05-25 03:58:25.000000000 -0400
++++ configure.ac
+@@ -18,7 +18,7 @@
+
+ # Process this file with autoconf to produce a configure script.
+
+-AC_PREREQ(2.61)
++AC_PREREQ(2.62)
+ min_automake_version="1.10"
+
+ # Remember to change the version number immediately *after* a release.
+@@ -27,10 +27,7 @@ min_automake_version="1.10"
+ m4_define([my_version], [1.0.5])
+ m4_define([my_issvn], [no])
+
+-m4_define([svn_revision], m4_esyscmd([echo -n $( (svn info 2>/dev/null \
+- || echo 'Revision: 0')|sed -n '/^Revision:/ {s/[^0-9]//gp;q;}')]))
+-AC_INIT([libassuan], my_version[]m4_if(my_issvn,[yes],[-svn[]svn_revision]),
+- [bug-libassuan@gnupg.org])
++AC_INIT([libassuan],[1.0.5],[bug-libassuan@gnupg.org])
+ # Note, that this is not yet available as a shared library.
+
+ PACKAGE=$PACKAGE_NAME
+@@ -39,11 +36,11 @@ VERSION=$PACKAGE_VERSION
+ AM_INIT_AUTOMAKE
+ AM_MAINTAINER_MODE
+ AC_CONFIG_SRCDIR(src/assuan.h)
+-AM_CONFIG_HEADER(config.h)
++AC_CONFIG_HEADERS([config.h])
+ AC_CANONICAL_HOST
+ AB_INIT
+
+-AC_GNU_SOURCE
++AC_USE_SYSTEM_EXTENSIONS
+
+
+ AC_SUBST(PACKAGE)
+@@ -72,7 +69,7 @@ fi
+ AC_PROG_INSTALL
+ AC_PROG_LN_S
+ AC_PROG_MAKE_SET
+-AC_PROG_RANLIB
++AC_PROG_LIBTOOL
+ #AC_ARG_PROGRAM
+
+ if test "$GCC" = yes; then
+@@ -106,11 +103,11 @@ AH_BOTTOM([
+ have_dosish_system=no
+ have_w32_system=no
+ case "${host}" in
+- *-linux*)
+- if test "$GCC" = yes; then
+- CFLAGS="$CFLAGS -fPIC -DPIC"
+- fi
+- ;;
++dnl *-linux*)
++dnl if test "$GCC" = yes; then
++dnl CFLAGS="$CFLAGS -fPIC -DPIC"
++dnl fi
++dnl ;;
+ *-mingw32*)
+ have_dosish_system=yes
+ have_w32_system=yes
+@@ -177,7 +174,13 @@ AC_C_CONST
+ AC_C_INLINE
+ AC_TYPE_SIZE_T
+ AC_TYPE_SIGNAL
+-AC_DECL_SYS_SIGLIST
++AC_CHECK_DECLS([sys_siglist],[],[],[#include <signal.h>
++/* NetBSD declares sys_siglist in unistd.h. */
++#ifdef HAVE_UNISTD_H
++# include <unistd.h>
++#endif
++])
++
+
+ gl_HEADER_SYS_SOCKET
+ gl_TYPE_SOCKLEN_T
+@@ -243,12 +246,9 @@ AC_REPLACE_FUNCS(setenv)
+ #
+ AC_MSG_CHECKING(for SO_PEERCRED)
+ AC_CACHE_VAL(assuan_cv_sys_so_peercred,
+- [AC_TRY_COMPILE([#include <sys/socket.h>],
+- [struct ucred cr;
++ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/socket.h>]], [[struct ucred cr;
+ int cl = sizeof cr;
+- getsockopt (1, SOL_SOCKET, SO_PEERCRED, &cr, &cl);],
+- assuan_cv_sys_so_peercred=yes,
+- assuan_cv_sys_so_peercred=no)
++ getsockopt (1, SOL_SOCKET, SO_PEERCRED, &cr, &cl);]])],[assuan_cv_sys_so_peercred=yes],[assuan_cv_sys_so_peercred=no])
+ ])
+ AC_MSG_RESULT($assuan_cv_sys_so_peercred)
+ if test $assuan_cv_sys_so_peercred = yes; then
diff --git a/security/libassuan/patches/patch-ab b/security/libassuan/patches/patch-ab
new file mode 100644
index 00000000000..1e7a2c25a6e
--- /dev/null
+++ b/security/libassuan/patches/patch-ab
@@ -0,0 +1,44 @@
+$NetBSD: patch-ab,v 1.1 2008/09/07 02:40:53 bjs Exp $
+
+--- src/Makefile.am.orig 2007-08-24 01:29:48.000000000 -0400
++++ src/Makefile.am
+@@ -23,7 +23,7 @@ BUILT_SOURCES = assuan-errors.c
+ MOSTLYCLEANFILES = assuan-errors.c
+
+ if HAVE_PTH
+-libassuan_pth = libassuan-pth.a
++libassuan_pth = libassuan-pth.la
+ else
+ libassuan_pth =
+ endif
+@@ -31,7 +31,7 @@ endif
+ bin_SCRIPTS = libassuan-config
+ m4datadir = $(datadir)/aclocal
+ m4data_DATA = libassuan.m4
+-lib_LIBRARIES = libassuan.a $(libassuan_pth)
++lib_LTLIBRARIES = libassuan.la $(libassuan_pth)
+ include_HEADERS = assuan.h
+
+
+@@ -51,15 +51,15 @@ common_sources = \
+ assuan-socket-connect.c \
+ assuan-uds.c \
+ assuan-logging.c \
+- assuan-socket.c
++ assuan-socket.c
+
+-libassuan_a_SOURCES = $(common_sources) assuan-io.c
+-libassuan_a_LIBADD = @LIBOBJS@
++libassuan_la_SOURCES = $(common_sources) assuan-io.c
++libassuan_la_LIBADD = @LTLIBOBJS@
+
+ if HAVE_PTH
+-libassuan_pth_a_SOURCES = $(common_sources) assuan-io-pth.c
+-libassuan_pth_a_CFLAGS = $(AM_CFLAGS) $(PTH_CFLAGS)
+-libassuan_pth_a_LIBADD = @LIBOBJS@
++libassuan_pth_la_SOURCES = $(common_sources) assuan-io-pth.c
++libassuan_pth_la_CFLAGS = $(AM_CFLAGS) $(PTH_CFLAGS)
++libassuan_pth_la_LIBADD = @LTLIBOBJS@
+ endif
+
+ assuan-errors.c : assuan.h mkerrors
diff --git a/security/libassuan/patches/patch-ac b/security/libassuan/patches/patch-ac
new file mode 100644
index 00000000000..89ae037aead
--- /dev/null
+++ b/security/libassuan/patches/patch-ac
@@ -0,0 +1,71 @@
+$NetBSD: patch-ac,v 1.1 2008/09/07 02:40:53 bjs Exp $
+
+--- aclocal.m4.orig 2008-09-06 22:03:58.000000000 -0400
++++ aclocal.m4
+@@ -940,3 +940,66 @@ m4_include([m4/gnupg-pth.m4])
+ m4_include([m4/onceonly.m4])
+ m4_include([m4/socklen.m4])
+ m4_include([m4/sys_socket_h.m4])
++
++# AC_USE_SYSTEM_EXTENSIONS
++# ------------------------
++# Enable extensions on systems that normally disable them,
++# typically due to standards-conformance issues.
++#
++# Remember that #undef in AH_VERBATIM gets replaced with #define by
++# AC_DEFINE. The goal here is to define all known feature-enabling
++# macros, then, if reports of conflicts are made, disable macros that
++# cause problems on some platforms (such as __EXTENSIONS__).
++AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
++[AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
++AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
++
++ AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=])
++ if test "$MINIX" = yes; then
++ AC_DEFINE([_POSIX_SOURCE], [1],
++ [Define to 1 if you need to in order for `stat' and other
++ things to work.])
++ AC_DEFINE([_POSIX_1_SOURCE], [2],
++ [Define to 2 if the system does not provide POSIX.1 features
++ except with this defined.])
++ AC_DEFINE([_MINIX], [1],
++ [Define to 1 if on MINIX.])
++ fi
++
++ AH_VERBATIM([__EXTENSIONS__],
++[/* Enable extensions on AIX 3, Interix. */
++#ifndef _ALL_SOURCE
++# undef _ALL_SOURCE
++#endif
++/* Enable GNU extensions on systems that have them. */
++#ifndef _GNU_SOURCE
++# undef _GNU_SOURCE
++#endif
++/* Enable threading extensions on Solaris. */
++#ifndef _POSIX_PTHREAD_SEMANTICS
++# undef _POSIX_PTHREAD_SEMANTICS
++#endif
++/* Enable extensions on HP NonStop. */
++#ifndef _TANDEM_SOURCE
++# undef _TANDEM_SOURCE
++#endif
++/* Enable general extensions on Solaris. */
++#ifndef __EXTENSIONS__
++# undef __EXTENSIONS__
++#endif
++])
++ AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
++ [ac_cv_safe_to_define___extensions__],
++ [AC_COMPILE_IFELSE(
++ [AC_LANG_PROGRAM([
++# define __EXTENSIONS__ 1
++ AC_INCLUDES_DEFAULT])],
++ [ac_cv_safe_to_define___extensions__=yes],
++ [ac_cv_safe_to_define___extensions__=no])])
++ test $ac_cv_safe_to_define___extensions__ = yes &&
++ AC_DEFINE([__EXTENSIONS__])
++ AC_DEFINE([_ALL_SOURCE])
++ AC_DEFINE([_GNU_SOURCE])
++ AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
++ AC_DEFINE([_TANDEM_SOURCE])
++])# AC_USE_SYSTEM_EXTENSIONS
diff --git a/security/libassuan/patches/patch-ad b/security/libassuan/patches/patch-ad
new file mode 100644
index 00000000000..4ec56a780ca
--- /dev/null
+++ b/security/libassuan/patches/patch-ad
@@ -0,0 +1,11 @@
+$NetBSD: patch-ad,v 1.1 2008/09/07 02:40:53 bjs Exp $
+
+--- tests/Makefile.am.orig 2007-07-05 13:10:06.000000000 -0400
++++ tests/Makefile.am
+@@ -35,5 +35,5 @@ AM_CFLAGS = # $(GPG_ERROR_CFLAGS)
+
+ noinst_HEADERS = common.h
+ noinst_PROGRAMS = $(TESTS)
+-LDADD = ../src/libassuan.a $(NETLIBS) # $(GPG_ERROR_LIBS)
++LDADD = ../src/libassuan.la $(NETLIBS) # $(GPG_ERROR_LIBS)
+