Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id D643B84D17 for ; Thu, 15 Jun 2023 23:41:32 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id 3Fv7Rca7PV-K for ; Thu, 15 Jun 2023 23:41:32 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id 31D5184D01 for ; Thu, 15 Jun 2023 23:41:32 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 5994FFA89; Thu, 15 Jun 2023 23:41:31 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_168687249145390" MIME-Version: 1.0 Date: Thu, 15 Jun 2023 23:41:31 +0000 From: "Taylor R Campbell" Subject: CVS commit: pkgsrc/security/libgpg-error To: pkgsrc-changes@NetBSD.org Approved: commit_and_comment Reply-To: riastradh@netbsd.org X-Mailer: log_accum Message-Id: <20230615234131.5994FFA89@cvs.NetBSD.org> This is a multi-part message in MIME format. --_----------=_168687249145390 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: riastradh Date: Thu Jun 15 23:41:31 UTC 2023 Modified Files: pkgsrc/security/libgpg-error: distinfo Added Files: pkgsrc/security/libgpg-error/patches: patch-src_syscfg_lock-obj-pub.netbsd.h Log Message: libgpg-error: Make this cross-compile on NetBSD. Provide an architecture-independent definition of a structure that wraps pthread_mutex_t. For some reason libgpg-error tries to discover this by a runtime test in the configure script and spit out C approximating the declaration automagically, which is incompatible with cross-compilation. Since PTHREAD_MUTEX_INITIALIZER always works on NetBSD, just use that. No change to native compilation because it always tries `lock-obj-pub.native.h' first -- the one it generated during configure -- and then falls back to the cross options like this patch adds. To generate a diff of this commit: cvs rdiff -u -r1.58 -r1.59 pkgsrc/security/libgpg-error/distinfo cvs rdiff -u -r0 -r1.1 \ pkgsrc/security/libgpg-error/patches/patch-src_syscfg_lock-obj-pub.netbsd.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_168687249145390 Content-Disposition: inline Content-Length: 1758 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/security/libgpg-error/distinfo diff -u pkgsrc/security/libgpg-error/distinfo:1.58 pkgsrc/security/libgpg-error/distinfo:1.59 --- pkgsrc/security/libgpg-error/distinfo:1.58 Fri Apr 7 09:14:48 2023 +++ pkgsrc/security/libgpg-error/distinfo Thu Jun 15 23:41:31 2023 @@ -1,6 +1,7 @@ -$NetBSD: distinfo,v 1.58 2023/04/07 09:14:48 adam Exp $ +$NetBSD: distinfo,v 1.59 2023/06/15 23:41:31 riastradh Exp $ BLAKE2s (libgpg-error-1.47.tar.bz2) = 91e8ad1fa6a7f42b68a9dca5b285c90bf9f3def9bdae1c23767c9bc29e5658fd SHA512 (libgpg-error-1.47.tar.bz2) = bbb4b15dae75856ee5b1253568674b56ad155524ae29a075cb5b0a7e74c4af685131775c3ea2226fff2f84ef80855e77aa661645d002b490a795c7ae57b66a30 Size (libgpg-error-1.47.tar.bz2) = 1020862 bytes SHA1 (patch-src_estream.c) = 0502a55403062abeab22c83a6d919c57ff1c5d82 +SHA1 (patch-src_syscfg_lock-obj-pub.netbsd.h) = 6f00890bc3d821da9b715c00a8f068fa4964df9e Added files: Index: pkgsrc/security/libgpg-error/patches/patch-src_syscfg_lock-obj-pub.netbsd.h diff -u /dev/null pkgsrc/security/libgpg-error/patches/patch-src_syscfg_lock-obj-pub.netbsd.h:1.1 --- /dev/null Thu Jun 15 23:41:31 2023 +++ pkgsrc/security/libgpg-error/patches/patch-src_syscfg_lock-obj-pub.netbsd.h Thu Jun 15 23:41:31 2023 @@ -0,0 +1,17 @@ +$NetBSD: patch-src_syscfg_lock-obj-pub.netbsd.h,v 1.1 2023/06/15 23:41:31 riastradh Exp $ + +Provide a generic NetBSD definition of lock and initializer, for +cross-compilation. + +--- src/syscfg/lock-obj-pub.netbsd.h.orig 2023-06-15 19:44:14.451323950 +0000 ++++ src/syscfg/lock-obj-pub.netbsd.h +@@ -0,0 +1,9 @@ ++#include ++ ++typedef struct ++{ ++ long _vers; ++ pthread_mutex_t u; ++} gpgrt_lock_t; ++ ++#define GPGRT_LOCK_INITIALIZER {1, PTHREAD_MUTEX_INITIALIZER} --_----------=_168687249145390--