pkgsrc-WIP-changes archive

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

libgpg-error-32: compat32 package for libgpg-error-32



Module Name:	pkgsrc-wip
Committed By:	Naveen Narayanan <zerous@nocebo.space>
Pushed By:	zerous
Date:		Thu Jul 11 18:55:23 2019 +0200
Changeset:	51dd90f9e41cf606bd7a809f48d165301d38effd

Added Files:
	libgpg-error-32/DESCR
	libgpg-error-32/Makefile
	libgpg-error-32/PLIST
	libgpg-error-32/buildlink3.mk
	libgpg-error-32/distinfo
	libgpg-error-32/patches/patch-src_estream.c

Log Message:
libgpg-error-32: compat32 package for libgpg-error-32

libgpg-error is a library that defines common error values for all
GnuPG components.  Among these are GPG, GPGSM, GPGME, GPG-Agent,
libgcrypt, pinentry, SmartCard Daemon and possibly more in the future.

Note: This package is intended to crosscompile libgpg-error for i386

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=51dd90f9e41cf606bd7a809f48d165301d38effd

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 libgpg-error-32/DESCR                       |  3 ++
 libgpg-error-32/Makefile                    | 46 +++++++++++++++++++++++++++++
 libgpg-error-32/PLIST                       | 29 ++++++++++++++++++
 libgpg-error-32/buildlink3.mk               | 17 +++++++++++
 libgpg-error-32/distinfo                    |  7 +++++
 libgpg-error-32/patches/patch-src_estream.c | 36 ++++++++++++++++++++++
 6 files changed, 138 insertions(+)

diffs:
diff --git a/libgpg-error-32/DESCR b/libgpg-error-32/DESCR
new file mode 100644
index 0000000000..218150bb5f
--- /dev/null
+++ b/libgpg-error-32/DESCR
@@ -0,0 +1,3 @@
+libgpg-error is a library that defines common error values for all
+GnuPG components.  Among these are GPG, GPGSM, GPGME, GPG-Agent,
+libgcrypt, pinentry, SmartCard Daemon and possibly more in the future.
diff --git a/libgpg-error-32/Makefile b/libgpg-error-32/Makefile
new file mode 100644
index 0000000000..e2838c9f16
--- /dev/null
+++ b/libgpg-error-32/Makefile
@@ -0,0 +1,46 @@
+# $NetBSD: Makefile,v 1.71 2019/03/20 05:43:20 adam Exp $
+
+DISTNAME=	libgpg-error-1.36
+CATEGORIES=	security
+ABI=		32
+MASTER_SITES=	ftp://ftp.gnupg.org/gcrypt/libgpg-error/
+MASTER_SITES+=	ftp://ftp.ring.gr.jp/pub/net/gnupg/libgpg-error/
+EXTRACT_SUFX=	.tar.bz2
+LIBABISUFFIX?=          /32
+CONFIGURE_ARGS+=        --libdir=${PREFIX}/lib${LIBABISUFFIX}
+CFLAGS+=                -m32
+
+PKGNAME=	compat${ABI}_${DISTNAME}
+MAINTAINER=	minskim%NetBSD.org@localhost
+HOMEPAGE=	http://www.gnupg.org/
+COMMENT=	Definitions of common error values for all GnuPG components
+LICENSE=	gnu-gpl-v2 AND gnu-lgpl-v2.1
+
+USE_LIBTOOL=		yes
+USE_PKGLOCALEDIR=	yes
+USE_TOOLS+=		gmake
+GNU_CONFIGURE=		yes
+INFO_FILES=		yes
+TEST_TARGET=		check
+
+.include "../../mk/bsd.prefs.mk"
+
+.if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
+CONFIGURE_ENV+=		CC_FOR_BUILD=${NATIVE_CC:Q}
+.else
+CONFIGURE_ENV+=		CC_FOR_BUILD=${CC:Q}\ ${CFLAGS:M*:Q}
+.endif
+
+.if !empty(MACHINE_PLATFORM:MSunOS-5.10-*)
+LIBS+=	-lrt
+.endif
+
+remove non-libraries:
+	echo "Removing non-compat lib package content"
+	find ${DESTDIR}${PREFIX} -path ${DESTDIR}${PREFIX}/lib${LIBABISUFFIX} -prune -or -type f -exec ${RM} {} +
+
+post-install: remove non-libraries
+
+.include "../../converters/libiconv/buildlink3.mk"
+.include "../../devel/gettext-lib/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/libgpg-error-32/PLIST b/libgpg-error-32/PLIST
new file mode 100644
index 0000000000..9af9782ee4
--- /dev/null
+++ b/libgpg-error-32/PLIST
@@ -0,0 +1,29 @@
+@comment $NetBSD$
+lib/32/libgpg-error.la
+lib/32/pkgconfig/gpg-error.pc
+@pkgdir share/locale/zh_TW/LC_MESSAGES
+@pkgdir share/locale/zh_CN/LC_MESSAGES
+@pkgdir share/locale/vi/LC_MESSAGES
+@pkgdir share/locale/uk/LC_MESSAGES
+@pkgdir share/locale/sv/LC_MESSAGES
+@pkgdir share/locale/sr/LC_MESSAGES
+@pkgdir share/locale/ru/LC_MESSAGES
+@pkgdir share/locale/ro/LC_MESSAGES
+@pkgdir share/locale/pt/LC_MESSAGES
+@pkgdir share/locale/pl/LC_MESSAGES
+@pkgdir share/locale/nl/LC_MESSAGES
+@pkgdir share/locale/ja/LC_MESSAGES
+@pkgdir share/locale/it/LC_MESSAGES
+@pkgdir share/locale/hu/LC_MESSAGES
+@pkgdir share/locale/fr/LC_MESSAGES
+@pkgdir share/locale/es/LC_MESSAGES
+@pkgdir share/locale/eo/LC_MESSAGES
+@pkgdir share/locale/de/LC_MESSAGES
+@pkgdir share/locale/da/LC_MESSAGES
+@pkgdir share/locale/cs/LC_MESSAGES
+@pkgdir share/libgpg-error
+@pkgdir share/common-lisp/source/gpg-error
+@pkgdir share/aclocal
+@pkgdir man/man1
+@pkgdir include
+@pkgdir bin
diff --git a/libgpg-error-32/buildlink3.mk b/libgpg-error-32/buildlink3.mk
new file mode 100644
index 0000000000..fbe0d6c316
--- /dev/null
+++ b/libgpg-error-32/buildlink3.mk
@@ -0,0 +1,17 @@
+# $NetBSD: buildlink3.mk,v 1.14 2011/04/22 13:41:54 obache Exp $
+
+BUILDLINK_TREE+=	compat32_libgpg-error
+
+.if !defined(compat32_LIBGPG_ERROR_BUILDLINK3_MK)
+compat32_LIBGPG_ERROR_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.compat32_libgpg-error+=	compat32_libgpg-error>=0.6
+BUILDLINK_ABI_DEPENDS.compat32_libgpg-error+=	compat32_libgpg-error>=1.10nb1
+#BUILDLINK_PKGSRCDIR.libgpg-error?=	../../security/libgpg-error
+BUILDLINK_PKGSRCDIR.compat32_libgpg-error?=	../../wip/libgpg-error-32
+BUILDLINK_LIBDIRS.compat32_libgpg-error?=	lib/32
+
+.include "../../devel/gettext-lib/buildlink3.mk"
+.endif # COMPAT32_LIBGPG_ERROR_BUILDLINK3_MK
+
+BUILDLINK_TREE+=	-compat32_libgpg-error
diff --git a/libgpg-error-32/distinfo b/libgpg-error-32/distinfo
new file mode 100644
index 0000000000..f8614b01b3
--- /dev/null
+++ b/libgpg-error-32/distinfo
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.45 2019/03/20 05:43:20 adam Exp $
+
+SHA1 (libgpg-error-1.36.tar.bz2) = 5245ce38b198cecd57775fb3c7b7328ec1a2a615
+RMD160 (libgpg-error-1.36.tar.bz2) = 13a9405bcb8ef179fff58e72f47a54889ddd287f
+SHA512 (libgpg-error-1.36.tar.bz2) = 6e5f853f77dc04f0091d94b224cab8e669042450f271b78d0ea0219658d059c9cab1ab0eaa020a4227f451520b417fc340b85971a6f5e144fa69be57e15df346
+Size (libgpg-error-1.36.tar.bz2) = 920542 bytes
+SHA1 (patch-src_estream.c) = 0502a55403062abeab22c83a6d919c57ff1c5d82
diff --git a/libgpg-error-32/patches/patch-src_estream.c b/libgpg-error-32/patches/patch-src_estream.c
new file mode 100644
index 0000000000..fb1bddb327
--- /dev/null
+++ b/libgpg-error-32/patches/patch-src_estream.c
@@ -0,0 +1,36 @@
+$NetBSD: patch-src_estream.c,v 1.4 2018/03/16 09:48:00 adam Exp $
+
+Don't use atexit(), since this library mey be dlopen()ed
+and dlclose()d before exit() is called.
+
+Instead mark the do_deinit() function as a destructor.
+
+https://bugs.g10code.com/gnupg/issue1749
+
+--- src/estream.c.orig	2018-02-21 19:50:18.000000000 +0000
++++ src/estream.c
+@@ -485,6 +485,7 @@ do_list_remove (estream_t stream, int wi
+ /*
+  * The atexit handler for the entire gpgrt.
+  */
++__attribute__((destructor,used))
+ static void
+ do_deinit (void)
+ {
+@@ -515,7 +516,16 @@ _gpgrt_estream_init (void)
+   if (!initialized)
+     {
+       initialized = 1;
++#if 0
++      /* This library may be unloaded via dlclose() before
++       * exit() is called, causing the atexit handler to try
++       * to jump into unmapped address space, causing a segfault.
++       * This has been observed with apache and php.  Instead, use
++       * the destructor attribute, since that will cause it
++       * to be called on dlclose() as well.
++       */
+       atexit (do_deinit);
++#endif
+     }
+   return 0;
+ }


Home | Main Index | Thread Index | Old Index