pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/security/libassuan Update to libassuan-1.0.5. As ship...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/5ca49a0b8145
branches:  trunk
changeset: 546718:5ca49a0b8145
user:      bjs <bjs%pkgsrc.org@localhost>
date:      Sun Sep 07 02:40:53 2008 +0000

description:
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:

 security/libassuan/Makefile         |  17 +++++-
 security/libassuan/PLIST            |   4 +-
 security/libassuan/distinfo         |  12 +++-
 security/libassuan/patches/patch-aa |  95 +++++++++++++++++++++++++++++++++++++
 security/libassuan/patches/patch-ab |  44 +++++++++++++++++
 security/libassuan/patches/patch-ac |  71 +++++++++++++++++++++++++++
 security/libassuan/patches/patch-ad |  11 ++++
 7 files changed, 246 insertions(+), 8 deletions(-)

diffs (truncated from 301 to 300 lines):

diff -r bfcd00554d1f -r 5ca49a0b8145 security/libassuan/Makefile
--- a/security/libassuan/Makefile       Sun Sep 07 02:10:15 2008 +0000
+++ b/security/libassuan/Makefile       Sun Sep 07 02:40:53 2008 +0000
@@ -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 @@
 
 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 -r bfcd00554d1f -r 5ca49a0b8145 security/libassuan/PLIST
--- a/security/libassuan/PLIST  Sun Sep 07 02:10:15 2008 +0000
+++ b/security/libassuan/PLIST  Sun Sep 07 02:40:53 2008 +0000
@@ -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 -r bfcd00554d1f -r 5ca49a0b8145 security/libassuan/distinfo
--- a/security/libassuan/distinfo       Sun Sep 07 02:10:15 2008 +0000
+++ b/security/libassuan/distinfo       Sun Sep 07 02:40:53 2008 +0000
@@ -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 -r bfcd00554d1f -r 5ca49a0b8145 security/libassuan/patches/patch-aa
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/libassuan/patches/patch-aa       Sun Sep 07 02:40:53 2008 +0000
@@ -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@localhost])
++AC_INIT([libassuan],[1.0.5],[bug-libassuan%gnupg.org@localhost])
+ # 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 -r bfcd00554d1f -r 5ca49a0b8145 security/libassuan/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/libassuan/patches/patch-ab       Sun Sep 07 02:40:53 2008 +0000
@@ -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 -r bfcd00554d1f -r 5ca49a0b8145 security/libassuan/patches/patch-ac
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/libassuan/patches/patch-ac       Sun Sep 07 02:40:53 2008 +0000
@@ -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 -r bfcd00554d1f -r 5ca49a0b8145 security/libassuan/patches/patch-ad
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/libassuan/patches/patch-ad       Sun Sep 07 02:40:53 2008 +0000
@@ -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)



Home | Main Index | Thread Index | Old Index