From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1BE811582ED for ; Fri, 14 Jun 2024 06:46:04 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DC017E2B5A; Fri, 14 Jun 2024 06:46:02 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id AEE4EE2B5A for ; Fri, 14 Jun 2024 06:46:02 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C36A733C1C1 for ; Fri, 14 Jun 2024 06:46:01 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C9E521CEC for ; Fri, 14 Jun 2024 06:45:58 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1718347484.b8b74017825d8e7be72e07c4a2ab68f7df06f023.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-crypt/ccid/files/, app-crypt/ccid/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-crypt/ccid/ccid-1.5.4.ebuild app-crypt/ccid/ccid-1.5.5.ebuild app-crypt/ccid/files/ccid-1.5.4-remove-flex-configure-dependency.patch app-crypt/ccid/files/ccid-1.5.5-remove-flex-configure-dependency.patch X-VCS-Directories: app-crypt/ccid/files/ app-crypt/ccid/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: b8b74017825d8e7be72e07c4a2ab68f7df06f023 X-VCS-Branch: master Date: Fri, 14 Jun 2024 06:45:58 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 84127fa5-6178-4031-ab95-5404b7d5034d X-Archives-Hash: 514f77fb03621d1ae84d64f640bd4c86 commit: b8b74017825d8e7be72e07c4a2ab68f7df06f023 Author: Eli Schwartz gmail com> AuthorDate: Tue Jun 11 01:10:49 2024 +0000 Commit: Sam James gentoo org> CommitDate: Fri Jun 14 06:44:44 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b8b74017 app-crypt/ccid: make sure elibtoolize is applied Needed to e.g. pass LTO warning flags through to the linker. In theory it would be nice to run a full eautoreconf, since eautoconf is already run, but the package errors out with automake since a patch deletes the use of flex in configure.ac while it is still required for the actual build. Actually-correct patch created & fix submitted upstream, since there was never a good reason to hack around this locally: https://github.com/LudovicRousseau/CCID/pull/140 Signed-off-by: Eli Schwartz gmail.com> Signed-off-by: Sam James gentoo.org> app-crypt/ccid/ccid-1.5.4.ebuild | 2 +- app-crypt/ccid/ccid-1.5.5.ebuild | 2 +- ...id-1.5.4-remove-flex-configure-dependency.patch | 65 ++++++++++++++++++++-- ...id-1.5.5-remove-flex-configure-dependency.patch | 63 +++++++++++++++++++-- 4 files changed, 121 insertions(+), 11 deletions(-) diff --git a/app-crypt/ccid/ccid-1.5.4.ebuild b/app-crypt/ccid/ccid-1.5.4.ebuild index 6652a82c38c2..005b7c99b1e9 100644 --- a/app-crypt/ccid/ccid-1.5.4.ebuild +++ b/app-crypt/ccid/ccid-1.5.4.ebuild @@ -29,7 +29,7 @@ PATCHES=( src_prepare() { default - eautoconf + eautoreconf } src_configure() { diff --git a/app-crypt/ccid/ccid-1.5.5.ebuild b/app-crypt/ccid/ccid-1.5.5.ebuild index d701d5ebd5cf..a7a1290a0795 100644 --- a/app-crypt/ccid/ccid-1.5.5.ebuild +++ b/app-crypt/ccid/ccid-1.5.5.ebuild @@ -29,7 +29,7 @@ PATCHES=( src_prepare() { default - eautoconf + eautoreconf } src_configure() { diff --git a/app-crypt/ccid/files/ccid-1.5.4-remove-flex-configure-dependency.patch b/app-crypt/ccid/files/ccid-1.5.4-remove-flex-configure-dependency.patch index 564532c9ab42..b0c8122b6ec6 100644 --- a/app-crypt/ccid/files/ccid-1.5.4-remove-flex-configure-dependency.patch +++ b/app-crypt/ccid/files/ccid-1.5.4-remove-flex-configure-dependency.patch @@ -1,16 +1,71 @@ -Bug: https://bugs.gentoo.org/221361 -Reverts upstream commit eec7cdf0 +From 5bd94d9670ad10df9f14349dfa098d0a2e40ab08 Mon Sep 17 00:00:00 2001 +From: Eli Schwartz +Date: Mon, 10 Jun 2024 22:02:37 -0400 +Subject: [PATCH] make building work again when flex is not installed +This explicitly reverts commit eec7cdf03dda2bd26e320ead73b91da5a9d86443 +because it was a bad idea. + +The motivating bug report was https://github.com/LudovicRousseau/PCSC/issues/124 +and the issue there occurred when building from a git clone, running +./bootstrap && ./configure && make, and having: + +- configure succeed +- make "succeeeds" at having $LEX run, do nothing and fail to generate + required sources +- compiling nonexistent files fail with highly confusing errors + +The autoconf manual has always documented the correct way to handle this +is to check if lex is unavailable, and set it to the famous automake +wrapper "missing", which checks if a program is missing at build time +rather than at ./configure time, and fails the build if the rule cannot +be run. This means: + +When building from a git clone, if flex is not available then +- configure succeeds +- make fails to run $LEX, and tells you to install flex + +The previous attempt to fix the highly confusing error instead resulted +in configure erroring out, and saying flex is required, even when it is +*not* required because a `make dist` tarball was used, which contains +pregenerated tokenparser.c for the express purpose of making flex +unnecessary. + +See autoconf documentation on $LEX: +https://www.gnu.org/software/autoconf/manual/autoconf-2.72/html_node/Particular-Programs.html#index-AC_005fPROG_005fLEX-1 + +And automake documentation on why to use "missing": +https://www.gnu.org/software/automake/manual/html_node/maintainer_002dmode.html + +Signed-off-by: Eli Schwartz +--- + configure.ac | 9 ++++----- + 1 file changed, 4 insertions(+), 5 deletions(-) + +diff --git a/configure.ac b/configure.ac +index d291f2b..a5af2eb 100644 --- a/configure.ac +++ b/configure.ac -@@ -32,11 +32,6 @@ AC_PROG_CPP - AC_PROG_INSTALL +@@ -33,10 +33,10 @@ AC_PROG_INSTALL AC_PROG_MAKE_SET AC_PROG_LN_S --AC_PROG_LEX([noyywrap]) + AC_PROG_LEX([noyywrap]) -if test $LEX = ":" -then - AC_MSG_ERROR([no lex or flex found]) -fi ++AS_IF([test $LEX = ":"], [ ++ AM_MISSING_PROG(MISSINGLEX, [flex]) ++ LEX=$MISSINGLEX] ++) AM_PROG_AR PKG_PROG_PKG_CONFIG + +@@ -354,4 +354,3 @@ AC_CONFIG_FILES(Makefile + examples/Makefile) + + AC_OUTPUT +- +-- +2.44.2 + diff --git a/app-crypt/ccid/files/ccid-1.5.5-remove-flex-configure-dependency.patch b/app-crypt/ccid/files/ccid-1.5.5-remove-flex-configure-dependency.patch index a124c50d1161..1ffb74fc61aa 100644 --- a/app-crypt/ccid/files/ccid-1.5.5-remove-flex-configure-dependency.patch +++ b/app-crypt/ccid/files/ccid-1.5.5-remove-flex-configure-dependency.patch @@ -1,13 +1,68 @@ -Bug: https://bugs.gentoo.org/221361 -Reverts upstream commit eec7cdf0 & 41270c2 +From 7e2207a07979b6c1b206024e83e22ca2bbd4e17c Mon Sep 17 00:00:00 2001 +From: Eli Schwartz +Date: Mon, 10 Jun 2024 22:02:37 -0400 +Subject: [PATCH] make building work again when flex is not installed +This explicitly reverts commit eec7cdf03dda2bd26e320ead73b91da5a9d86443 +because it was a bad idea. + +The motivating bug report was https://github.com/LudovicRousseau/PCSC/issues/124 +and the issue there occurred when building from a git clone, running +./bootstrap && ./configure && make, and having: + +- configure succeed +- make "succeeeds" at having $LEX run, do nothing and fail to generate + required sources +- compiling nonexistent files fail with highly confusing errors + +The autoconf manual has always documented the correct way to handle this +is to check if lex is unavailable, and set it to the famous automake +wrapper "missing", which checks if a program is missing at build time +rather than at ./configure time, and fails the build if the rule cannot +be run. This means: + +When building from a git clone, if flex is not available then +- configure succeeds +- make fails to run $LEX, and tells you to install flex + +The previous attempt to fix the highly confusing error instead resulted +in configure erroring out, and saying flex is required, even when it is +*not* required because a `make dist` tarball was used, which contains +pregenerated tokenparser.c for the express purpose of making flex +unnecessary. + +See autoconf documentation on $LEX: +https://www.gnu.org/software/autoconf/manual/autoconf-2.72/html_node/Particular-Programs.html#index-AC_005fPROG_005fLEX-1 + +And automake documentation on why to use "missing": +https://www.gnu.org/software/automake/manual/html_node/maintainer_002dmode.html + +Signed-off-by: Eli Schwartz +--- + configure.ac | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index eb2370f..c012f2a 100644 --- a/configure.ac +++ b/configure.ac -@@ -33,7 +33,5 @@ +@@ -33,7 +33,10 @@ AC_PROG_INSTALL AC_PROG_MAKE_SET AC_PROG_LN_S --AC_PROG_LEX([noyywrap]) + AC_PROG_LEX([noyywrap]) -AS_IF([test $LEX = ":"], [AC_MSG_ERROR([no lex or flex found])]) ++AS_IF([test $LEX = ":"], [ ++ AM_MISSING_PROG(MISSINGLEX, [flex]) ++ LEX=$MISSINGLEX] ++) AM_PROG_AR PKG_PROG_PKG_CONFIG + +@@ -331,4 +334,3 @@ AC_CONFIG_FILES(Makefile + examples/Makefile) + + AC_OUTPUT +- +-- +2.44.2