Skip to content

Commit

Permalink
gnupg: fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
hadfl committed Dec 31, 2024
1 parent 79b72c1 commit 137d02c
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 22 deletions.
1 change: 0 additions & 1 deletion build/gnupg/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ PATH+=":$DEPROOT$PREFIX/bin"

download_source $PROG $PROG $VER
patch_source
run_autoreconf -fi
build
install_execattr
run_testsuite check
Expand Down
1 change: 1 addition & 0 deletions build/gnupg/local.mog
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ license ../pinentry-$(PINENTRY)/COPYING license=GPLv2
dir group=bin mode=0755 owner=root path=etc/$(PREFIX)

<transform path=$(PREFIX)/share/(?:doc|info) -> drop>
<transform path=$(PREFIX)/share/man/manh -> drop>

# gpg needs the proc_lock_memory privilege in order to be able to lock a
# memory segment. If it can't do that, it utters
Expand Down
30 changes: 20 additions & 10 deletions build/gnupg/patches/gcc14.patch
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
diff -wpruN --no-dereference '--exclude=*.orig' a~/acinclude.m4 a/acinclude.m4
--- a~/acinclude.m4 1970-01-01 00:00:00
+++ a/acinclude.m4 1970-01-01 00:00:00
@@ -84,7 +84,8 @@ AC_DEFUN([GNUPG_CHECK_ENDIAN],
not big endian
#endif]])], gnupg_cv_c_endian=big, gnupg_cv_c_endian=little)])
if test "$gnupg_cv_c_endian" = unknown; then
- AC_RUN_IFELSE([AC_LANG_SOURCE([[main () {
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdlib.h>
+ int main (void) {
unfortunately we need to patch configure instead of acinclude.m4
as running autoconf will lead to gnupg being flagged as dev release

./gpg --version
gpg (GnuPG) 2.4.7-unknown
libgcrypt 1.11.0
NOTE: THIS IS A DEVELOPMENT VERSION!
It is only intended for test purposes and should NOT be
used in a production environment or with production keys!

diff -wpruN --no-dereference '--exclude=*.orig' a~/configure a/configure
--- a~/configure 1970-01-01 00:00:00
+++ a/configure 1970-01-01 00:00:00
@@ -14096,7 +14096,8 @@ rm -f core conftest.err conftest.$ac_obj
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-main () {
+#include <stdlib.h>
+int main (void) {
/* Are we little or big endian? From Harbison&Steele. */
union
{
20 changes: 9 additions & 11 deletions build/gnupg/patches/no-html-doc.patch
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
diff -wpruN --no-dereference '--exclude=*.orig' a~/doc/Makefile.am a/doc/Makefile.am
--- a~/doc/Makefile.am 1970-01-01 00:00:00
+++ a/doc/Makefile.am 1970-01-01 00:00:00
@@ -95,7 +95,7 @@ myhtmlman_pages = \
see comment in gcc14.patch

diff -wpruN --no-dereference '--exclude=*.orig' a~/doc/Makefile.in a/doc/Makefile.in
--- a~/doc/Makefile.in 1970-01-01 00:00:00
+++ a/doc/Makefile.in 1970-01-01 00:00:00
@@ -538,11 +538,11 @@ myhtmlman_pages = \
gpg-wks-server.1.html \
dirmngr-client.1.html gpg-card.1.html gpg-check-pattern.1.html

-man_MANS = $(myman_pages) gnupg.7 gnupg.7.html
+man_MANS = $(myman_pages) gnupg.7

watchgnupg_SOURCE = gnupg.texi

@@ -103,7 +103,7 @@ watchgnupg_SOURCE = gnupg.texi
CLEANFILES = yat2m mkdefsinc defs.inc

DISTCLEANFILES = gnupg.tmp gnupg.ops yat2m-stamp.tmp yat2m-stamp \
- $(myman_pages) gnupg.7 gnupg.7.html $(myhtmlman_pages)
+ $(myman_pages) gnupg.7

yat2m: yat2m.c
$(CC_FOR_BUILD) -o $@ $(srcdir)/yat2m.c
@@ -152,7 +152,7 @@ yat2m-stamp: $(myman_sources) defs.inc
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
@@ -1260,7 +1260,7 @@ yat2m-stamp: $(myman_sources) defs.inc

yat2m-stamp: $(YAT2M)

Expand Down

0 comments on commit 137d02c

Please sign in to comment.