From 3db11f3252ff4ebe83262b2e213b8c9d98d46fed Mon Sep 17 00:00:00 2001 From: klausz65 <61782506+klausz65@users.noreply.github.com> Date: Thu, 2 Jan 2025 18:31:12 +0100 Subject: [PATCH] uwimap: fix build using gcc14 and recompile for library/security/openssl-3 --- components/library/uwimap/Makefile | 37 +++++++------- .../library/uwimap/manifests/sample-manifest.p5m | 3 +- .../library/uwimap/patches/z_01ec_makefile.patch | 9 ++-- components/library/uwimap/patches/z_60_gcc14.patch | 59 ++++++++++++++++++++++ components/library/uwimap/pkg5 | 2 +- components/library/uwimap/uwimap.p5m | 2 - 6 files changed, 84 insertions(+), 28 deletions(-) create mode 100644 components/library/uwimap/patches/z_60_gcc14.patch diff --git a/components/library/uwimap/Makefile b/components/library/uwimap/Makefile index f0438bdfce..7964de30b2 100644 --- a/components/library/uwimap/Makefile +++ b/components/library/uwimap/Makefile @@ -19,14 +19,14 @@ # CDDL HEADER END # # Copyright 2011 EveryCity Ltd. All rights reserved. +# Copyright 2025 Klaus Ziegler # -OPENSSL_VERSION= 3.1 include ../../../make-rules/shared-macros.mk COMPONENT_NAME= imap COMPONENT_VERSION= 2007f -COMPONENT_REVISION= 1 +COMPONENT_REVISION= 2 IPS_COMPONENT_VERSION= 0.2007.6 COMPONENT_PROJECT_URL= http://www.washington.edu/imap/ COMPONENT_CLASSIFICATION=System/Libraries @@ -45,11 +45,9 @@ include $(WS_MAKE_RULES)/ips.mk PATH=$(PATH.gnu) -INSTALL_COMMON=$(BUILD_DIR)/.installed - CFLAGS += -D__EXTENSIONS__ -# Provide location for openssl 3.1 headers/libraries +# Provide location for openssl 3 headers/libraries # (Also hardcoded in patch file: z_01ec_makefile.patch ) CFLAGS += -I$(OPENSSL_INCDIR) LDFLAGS += -L$(OPENSSL_LIBDIR) @@ -66,24 +64,23 @@ COMPONENT_BUILD_ARGS += EXTRALDFLAGS="$(LDFLAGS)" COMPONENT_BUILD_TARGETS = ec -$(INSTALL_COMMON): $(BUILD_32_and_64) - $(MKDIR) -p $(PROTO_DIR)/usr/lib/$(MACH64) - $(MKDIR) -p $(PROTO_DIR)/usr/include/c-client - $(CP) $(BUILD_DIR_32)/c-client/libc-client.so.1 $(PROTO_DIR)/usr/lib/ - $(CP) $(BUILD_DIR_64)/c-client/libc-client.so.1 $(PROTO_DIR)/usr/lib/$(MACH64) - $(LN) -fs libc-client.so.1 $(PROTO_DIR)/usr/lib/libc-client.so - $(LN) -fs libc-client.so.1 $(PROTO_DIR)/usr/lib/$(MACH64)/libc-client.so - $(CP) $(SOURCE_DIR)/src/osdep/unix/*.h $(PROTO_DIR)/usr/include/c-client/ - $(CP) $(SOURCE_DIR)/src/c-client/*.h $(PROTO_DIR)/usr/include/c-client/ - $(CP) $(BUILD_DIR_32)/c-client/linkage.h $(PROTO_DIR)/usr/include/c-client/ - $(CP) $(BUILD_DIR_32)/c-client/osdep.h $(PROTO_DIR)/usr/include/c-client/ - $(TOUCH) $@ +define COMPONENT_INSTALL_ACTION= + ($(MKDIR) $(PROTO_DIR)/usr/lib/$(MACH64)) ; \ + ($(MKDIR) $(PROTO_DIR)/usr/include/c-client) ; \ + ($(CP) $(BUILD_DIR_64)/c-client/libc-client.so.1 $(PROTO_DIR)/usr/lib/$(MACH64)) ; \ + ($(LN) -fs libc-client.so.1 $(PROTO_DIR)/usr/lib/libc-client.so) ; \ + ($(LN) -fs libc-client.so.1 $(PROTO_DIR)/usr/lib/$(MACH64)/libc-client.so) ; \ + ($(CP) $(SOURCE_DIR)/src/osdep/unix/*.h $(PROTO_DIR)/usr/include/c-client/) ; \ + ($(CP) $(SOURCE_DIR)/src/c-client/*.h $(PROTO_DIR)/usr/include/c-client/) ; \ + ($(CP) $(BUILD_DIR_64)/c-client/linkage.h $(PROTO_DIR)/usr/include/c-client/) ; \ + ($(CP) $(BUILD_DIR_64)/c-client/osdep.h $(PROTO_DIR)/usr/include/c-client/); +endef -build: $(BUILD_32_and_64) +build: $(BUILD_64) -install: $(INSTALL_COMMON) +install: build $(INSTALL_64) -test: $(NO_TESTS) +test: $(NO_TESTS) # Auto-generated dependencies REQUIRED_PACKAGES += $(OPENSSL_PKG) diff --git a/components/library/uwimap/manifests/sample-manifest.p5m b/components/library/uwimap/manifests/sample-manifest.p5m index a37b7d0603..41d21d800e 100644 --- a/components/library/uwimap/manifests/sample-manifest.p5m +++ b/components/library/uwimap/manifests/sample-manifest.p5m @@ -10,7 +10,7 @@ # # -# Copyright 2024 +# Copyright 2025 # set name=pkg.fmri value=pkg:/$(COMPONENT_FMRI)@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION) @@ -100,4 +100,3 @@ file path=usr/include/c-client/utf8aux.h link path=usr/lib/$(MACH64)/libc-client.so target=libc-client.so.1 file path=usr/lib/$(MACH64)/libc-client.so.1 link path=usr/lib/libc-client.so target=libc-client.so.1 -file path=usr/lib/libc-client.so.1 diff --git a/components/library/uwimap/patches/z_01ec_makefile.patch b/components/library/uwimap/patches/z_01ec_makefile.patch index c3fe9743c1..37f4fa0340 100644 --- a/components/library/uwimap/patches/z_01ec_makefile.patch +++ b/components/library/uwimap/patches/z_01ec_makefile.patch @@ -1,12 +1,15 @@ ---- imap-2007e/Makefile.orig 2011-04-14 19:11:12.780372883 +0100 -+++ imap-2007e/Makefile 2011-04-14 19:18:13.018711766 +0100 + +Update for openssl-3 + +--- imap-2007f/Makefile.orig 2011-04-14 19:11:12.780372883 +0100 ++++ imap-2007f/Makefile 2011-04-14 19:18:13.018711766 +0100 @@ -377,6 +377,10 @@ $(BUILD) BUILDTYPE=lnps IP=$(IP6) \ SPECIALS="GSSDIR=/usr SSLDIR=/usr SSLINCLUDE=/usr/include/openssl SSLCERTS=/etc/ssl/certs SSLKEYS=/etc/ssl/private" +ec: an + $(BUILD) BUILDTYPE=ec IP=$(IP6) \ -+ SPECIALS="CC=$(CC) GSSDIR=/usr SSLDIR=/usr/openssl/3.1 SSLINCLUDE=/usr/openssl/3.1/include/openssl SSLLIB=/usr/openssl/3.1/lib SSLCERTS=/etc/openssl/certs SSLKEYS=/etc/openssl/private" ++ SPECIALS="CC=$(CC) GSSDIR=/usr SSLDIR=/usr/openssl/3 SSLINCLUDE=/usr/openssl/3/include/openssl SSLLIB=/usr/openssl/3/lib SSLCERTS=/etc/openssl/certs SSLKEYS=/etc/openssl/private" + lmd: an $(BUILD) BUILDTYPE=lnp IP=$(IP6) \ diff --git a/components/library/uwimap/patches/z_60_gcc14.patch b/components/library/uwimap/patches/z_60_gcc14.patch new file mode 100644 index 0000000000..72acbc186f --- /dev/null +++ b/components/library/uwimap/patches/z_60_gcc14.patch @@ -0,0 +1,59 @@ + +this is to fix the following error, caused by the next patch in: os_soln.h + +/usr/gcc/14/bin/gcc -fPIC -DPIC -D_REENTRANT `cat CFLAGS` `cat OSCFLAGS` -c osdep.c +In file included from osdep.c:31: +osdep.h:70:19: error: conflicting types for 'Alphasort'; have 'int(void *, void *)' + 70 | #define alphasort Alphasort + | ^~~~~~~~~ +scandir.c:77:5: note: in expansion of macro 'alphasort' + 77 | int alphasort (void *d1,void *d2) + | ^~~~~~~~~ +osdep.h:70:19: note: previous declaration of 'Alphasort' with type 'int(const void *, const void *)' + 70 | #define alphasort Alphasort + | ^~~~~~~~~ +osdep.h:83:5: note: in expansion of macro 'alphasort' + 83 | int alphasort (const void *d1,const void *d2); + | ^~~~~~~~~ + + +--- imap-2007f/src/osdep/unix/scandir.c.orig 2011-07-23 03:20:09.000000000 +0300 ++++ imap-2007f/src/osdep/unix/scandir.c 2025-01-02 14:26:18.314225146 +0200 +@@ -74,7 +74,7 @@ + * Returns: negative if d1 < d2, 0 if d1 == d2, postive if d1 > d2 + */ + +-int alphasort (void *d1,void *d2) ++int alphasort (const void *d1,const void *d2) + { + return strcmp ((*(struct direct **) d1)->d_name, + (*(struct direct **) d2)->d_name); + +this is the initial error caused by using gcc14: + +/usr/gcc/14/bin/gcc -fPIC -DPIC -D_REENTRANT `cat CFLAGS` `cat OSCFLAGS` -c osdep.c +In file included from osdep.c:31: +osdep.h:70:19: error: conflicting types for 'Alphasort'; have 'int(const void *, const void *)' + 70 | #define alphasort Alphasort + | ^~~~~~~~~ +scandir.c:77:5: note: in expansion of macro 'alphasort' + 77 | int alphasort (const void *d1,const void *d2) + | ^~~~~~~~~ +osdep.h:70:19: note: previous declaration of 'Alphasort' with type 'int(void *, void *)' + 70 | #define alphasort Alphasort + | ^~~~~~~~~ +osdep.h:83:5: note: in expansion of macro 'alphasort' + 83 | int alphasort (void *d1,void *d2); + | ^~~~~~~~~ + +--- imap-2007f/src/osdep/unix/os_soln.h.orig 2025-01-02 14:42:48.161310774 +0200 ++++ imap-2007f/src/osdep/unix/os_soln.h 2025-01-02 14:21:30.234870676 +0200 +@@ -80,7 +80,7 @@ + typedef int (*compar_t) (const void *d1,const void *d2); + int scandir (char *dirname,struct direct ***namelist,select_t select, + compar_t compar); +-int alphasort (void *d1,void *d2); ++int alphasort (const void *d1,const void *d2); + + + #include "env_unix.h" diff --git a/components/library/uwimap/pkg5 b/components/library/uwimap/pkg5 index 0e78b44d45..7236bc13d2 100644 --- a/components/library/uwimap/pkg5 +++ b/components/library/uwimap/pkg5 @@ -1,6 +1,6 @@ { "dependencies": [ - "library/security/openssl-31", + "library/security/openssl-3", "system/library" ], "fmris": [ diff --git a/components/library/uwimap/uwimap.p5m b/components/library/uwimap/uwimap.p5m index f50cdee77c..7209651a1b 100644 --- a/components/library/uwimap/uwimap.p5m +++ b/components/library/uwimap/uwimap.p5m @@ -98,5 +98,3 @@ file path=usr/include/c-client/utf8.h file path=usr/include/c-client/utf8aux.h link path=usr/lib/$(MACH64)/libc-client.so target=libc-client.so.1 file path=usr/lib/$(MACH64)/libc-client.so.1 -link path=usr/lib/libc-client.so target=libc-client.so.1 -file path=usr/lib/libc-client.so.1 -- 2.11.4.GIT