pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/security/mhash Ugh, this was worse than I thought. Re...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f821623dfb62
branches:  trunk
changeset: 549757:f821623dfb62
user:      bjs <bjs%pkgsrc.org@localhost>
date:      Sat Nov 08 13:47:11 2008 +0000

description:
Ugh, this was worse than I thought.  Refactor my change to account
for all autoconf definitions that pollute namespace.  Additionally,
I've prepared a distribution patch from FreeBSD ports which
fixes many memory leaks (see comment in patch).

PKGREVISION++

diffstat:

 security/mhash/Makefile         |  12 +++++++++---
 security/mhash/distinfo         |   9 +++++++--
 security/mhash/patches/patch-aa |  37 +++++++++++++++++++++++++------------
 security/mhash/patches/patch-ab |  14 ++++++++++++++
 security/mhash/patches/patch-ac |  30 ++++++++++++++++++++++++++++++
 5 files changed, 85 insertions(+), 17 deletions(-)

diffs (150 lines):

diff -r afe60f7d26d4 -r f821623dfb62 security/mhash/Makefile
--- a/security/mhash/Makefile   Sat Nov 08 13:20:43 2008 +0000
+++ b/security/mhash/Makefile   Sat Nov 08 13:47:11 2008 +0000
@@ -1,21 +1,27 @@
-# $NetBSD: Makefile,v 1.23 2008/11/08 12:55:21 bjs Exp $
+# $NetBSD: Makefile,v 1.24 2008/11/08 13:47:11 bjs Exp $
 
 DISTNAME=      mhash-0.9.9
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    security devel
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=mhash/}
 EXTRACT_SUFX=  .tar.bz2
 
+PATCHFILES+=   mhash-freebsd-patches-20081108.diff.gz
+PATCH_SITES=   ${MASTER_SITE_LOCAL}
+
 MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
 HOMEPAGE=      http://mhash.sourceforge.net/
 COMMENT=       Hash algorithms library
 
 PKG_DESTDIR_SUPPORT=   user-destdir
 
-USE_TOOLS+=            gmake perl
+USE_TOOLS+=            gmake perl autoconf
 USE_LIBTOOL=           yes
 GNU_CONFIGURE=         yes
 
 INSTALLATION_DIRS=     include/mutils
 
+pre-configure:
+       cd ${WRKSRC} && autoconf -v -f
+
 .include "../../mk/bsd.pkg.mk"
diff -r afe60f7d26d4 -r f821623dfb62 security/mhash/distinfo
--- a/security/mhash/distinfo   Sat Nov 08 13:20:43 2008 +0000
+++ b/security/mhash/distinfo   Sat Nov 08 13:47:11 2008 +0000
@@ -1,6 +1,11 @@
-$NetBSD: distinfo,v 1.9 2008/11/08 12:55:21 bjs Exp $
+$NetBSD: distinfo,v 1.10 2008/11/08 13:47:11 bjs Exp $
 
 SHA1 (mhash-0.9.9.tar.bz2) = cd72ea80a58bbcc4b1ef96268d03d508ab082529
 RMD160 (mhash-0.9.9.tar.bz2) = bd5ced522314ba559d4a04d33f07df8e6aec2887
 Size (mhash-0.9.9.tar.bz2) = 634563 bytes
-SHA1 (patch-aa) = be09dcc2072cfa25affb6f4af35e8e684207a818
+SHA1 (mhash-freebsd-patches-20081108.diff.gz) = 832b643bbd88e1a7ea3b88c34ed119fb89c03cc3
+RMD160 (mhash-freebsd-patches-20081108.diff.gz) = b8e1518119660cf33b85d14b9e871f14c7ff0eba
+Size (mhash-freebsd-patches-20081108.diff.gz) = 6376 bytes
+SHA1 (patch-aa) = dd0c768a7f710adeaf6350550e97f36dfa3344f3
+SHA1 (patch-ab) = 39d26134ebbc935a6bbbc0876fdc23bc52a8a29f
+SHA1 (patch-ac) = aea5b22ffd9cb13513f4262e401a8ac17f05cf7b
diff -r afe60f7d26d4 -r f821623dfb62 security/mhash/patches/patch-aa
--- a/security/mhash/patches/patch-aa   Sat Nov 08 13:20:43 2008 +0000
+++ b/security/mhash/patches/patch-aa   Sat Nov 08 13:47:11 2008 +0000
@@ -1,18 +1,31 @@
-$NetBSD: patch-aa,v 1.1 2008/11/08 12:55:21 bjs Exp $
+$NetBSD: patch-aa,v 1.2 2008/11/08 13:47:11 bjs Exp $
 
-Code could rely on the definition of 'VERSION'--and *not* define
-it in installed headers!
-
-If this patch causes a problem, something is not right.
+These are now defined in config.h.in to avoid namespace pollution.
 
 --- include/mutils/mhash_config.h.in.orig      2007-04-04 22:21:23.000000000 -0400
 +++ include/mutils/mhash_config.h.in
-@@ -224,7 +224,7 @@
- #undef USE_DMALLOC
+@@ -181,24 +181,6 @@
+ /* Define to 1 if your C compiler doesn't accept -c and -o together. */
+ #undef NO_MINUS_C_MINUS_O
  
- /* Version number of package */
--#undef VERSION
-+/* #undef VERSION */
+-/* Name of package */
+-#undef PACKAGE
+-
+-/* Define to the address where bug reports for this package should be sent. */
+-#undef PACKAGE_BUGREPORT
+-
+-/* Define to the full name of this package. */
+-#undef PACKAGE_NAME
+-
+-/* Define to the full name and version of this package. */
+-#undef PACKAGE_STRING
+-
+-/* Define to the one symbol short name of this package. */
+-#undef PACKAGE_TARNAME
+-
+-/* Define to the version of this package. */
+-#undef PACKAGE_VERSION
+-
+ /* Define to 1 if the C compiler supports function prototypes. */
+ #undef PROTOTYPES
  
- /* Define if using the dmalloc debugging malloc package */
- #undef WITH_DMALLOC
diff -r afe60f7d26d4 -r f821623dfb62 security/mhash/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/mhash/patches/patch-ab   Sat Nov 08 13:47:11 2008 +0000
@@ -0,0 +1,14 @@
+$NetBSD: patch-ab,v 1.1 2008/11/08 13:47:11 bjs Exp $
+
+Add directive for stub config.h as per patch-a[ac].
+
+--- configure.in.orig  2007-04-04 22:22:28.000000000 -0400
++++ configure.in
+@@ -6,6 +6,7 @@ AC_CONFIG_SRCDIR([lib/mhash.c])
+ AM_INIT_AUTOMAKE
+ 
+ AC_DEFINE([MHASH_VERSION], PROGRAM_VERSION, "MHash Version")
++AC_CONFIG_HEADER([include/mutils/config.h])
+ AC_CONFIG_HEADER([include/mutils/mhash_config.h])
+ 
+ 
diff -r afe60f7d26d4 -r f821623dfb62 security/mhash/patches/patch-ac
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/mhash/patches/patch-ac   Sat Nov 08 13:47:11 2008 +0000
@@ -0,0 +1,30 @@
+$NetBSD: patch-ac,v 1.1 2008/11/08 13:47:11 bjs Exp $
+
+Add these definitions here to avoid namespace pollution in
+include/mutils/mhash_config.h.
+
+--- include/mutils/config.h.in.orig    2008-11-08 08:23:23.000000000 -0500
++++ include/mutils/config.h.in
+@@ -0,0 +1,22 @@
++/* Name of package */
++#undef PACKAGE
++
++/* Define to the address where bug reports for this package should be sent. */
++#undef PACKAGE_BUGREPORT
++
++/* Define to the full name of this package. */
++#undef PACKAGE_NAME
++
++/* Define to the full name and version of this package. */
++#undef PACKAGE_STRING
++
++/* Define to the one symbol short name of this package. */
++#undef PACKAGE_TARNAME
++
++/* Define to the version of this package. */
++#undef PACKAGE_VERSION
++
++/* Version number of package */
++#undef VERSION
++
++



Home | Main Index | Thread Index | Old Index