commit:     3b99e98a7f71e2ba432fa10c1ed1994668e552b5
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Mar  7 12:11:19 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Mar  7 12:11:27 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3b99e98a

app-crypt/gcr: fix implicit func decls

It doesn't make sense to default XOPEN_SOURCE and subsequently DEFAULT_SOURCE
as DEFAULT_SOURCE is asking for no extensions. Anyway, just ask for GNU_SOURCE
as it'll placate both musl and glibc for all of strptime/timegm/getpass and
gcr-3 is obsolete anyway.

gcr-4 is fine.

Closes: https://bugs.gentoo.org/900152
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../gcr/files/3.41.1-implicit-func-decl.patch      | 28 ++++++++++++++++++++++
 .../{gcr-3.41.1-r1.ebuild => gcr-3.41.1-r2.ebuild} |  1 +
 2 files changed, 29 insertions(+)

diff --git a/app-crypt/gcr/files/3.41.1-implicit-func-decl.patch 
b/app-crypt/gcr/files/3.41.1-implicit-func-decl.patch
new file mode 100644
index 000000000000..f3f688013a76
--- /dev/null
+++ b/app-crypt/gcr/files/3.41.1-implicit-func-decl.patch
@@ -0,0 +1,28 @@
+It doesn't make sense to default XOPEN_SOURCE and subsequently DEFAULT_SOURCE
+as DEFAULT_SOURCE is asking for no extensions. Anyway, just ask for GNU_SOURCE
+as it'll placate both musl and glibc for all of strptime/timegm/getpass and
+gcr-3 is obsolete anyway.
+--- a/gck/meson.build
++++ b/gck/meson.build
+@@ -77,8 +77,7 @@ gck_cflags = [
+   '-DGCK_API_SUBJECT_TO_CHANGE',
+   '-DP11_KIT_API_SUBJECT_TO_CHANGE',
+   '-DPKCS11_REGISTRY_DIR="@0@"'.format(get_option('prefix') / 
get_option('libdir') / 'pkcs11'),
+-  '-D_XOPEN_SOURCE',   # Needed for strptime()
+-  '-D_DEFAULT_SOURCE', # Needed for timegm
++  '-D_GNU_SOURCE',   # Needed for strptime(), timegm, getpass
+ ]
+ 
+ gck_symbolmap = meson.current_source_dir() / 'libgck.map'
+--- a/gcr/meson.build
++++ b/gcr/meson.build
+@@ -146,7 +146,7 @@ gcr_base_cflags = [
+   '-DGCR_API_SUBJECT_TO_CHANGE',
+   '-DGCK_API_SUBJECT_TO_CHANGE',
+   '-DP11_KIT_API_SUBJECT_TO_CHANGE',
+-  '-D_XOPEN_SOURCE',   # Needed for strptime()
++  '-D_GNU_SOURCE',   # Needed for strptime(), timegm, getpass
+ ]
+ 
+ gcr_base_symbolmap = meson.current_source_dir() / 'libgcr-base.map'
+

diff --git a/app-crypt/gcr/gcr-3.41.1-r1.ebuild 
b/app-crypt/gcr/gcr-3.41.1-r2.ebuild
similarity index 98%
rename from app-crypt/gcr/gcr-3.41.1-r1.ebuild
rename to app-crypt/gcr/gcr-3.41.1-r2.ebuild
index fa27a868884a..24ad67b9bce4 100644
--- a/app-crypt/gcr/gcr-3.41.1-r1.ebuild
+++ b/app-crypt/gcr/gcr-3.41.1-r2.ebuild
@@ -47,6 +47,7 @@ BDEPEND="
 
 PATCHES=(
        "${FILESDIR}"/3.38.0-optional-vapi.patch
+       "${FILESDIR}"/3.41.1-implicit-func-decl.patch
 )
 
 pkg_setup() {

Reply via email to