git: 2ce5d605bd50 - main - www/edbrowse: fix -lopenssl for 12.4

From: Alfonso S. Siciliano <asiciliano_at_FreeBSD.org>
Date: Thu, 23 Nov 2023 21:50:35 UTC
The branch main has been updated by asiciliano:

URL: https://cgit.FreeBSD.org/ports/commit/?id=2ce5d605bd50f0f2e81f7a1ad9bf74bb1fb24c5e

commit 2ce5d605bd50f0f2e81f7a1ad9bf74bb1fb24c5e
Author:     Alfonso S. Siciliano <asiciliano@FreeBSD.org>
AuthorDate: 2023-11-23 21:46:19 +0000
Commit:     Alfonso S. Siciliano <asiciliano@FreeBSD.org>
CommitDate: 2023-11-23 21:50:10 +0000

    www/edbrowse: fix -lopenssl for 12.4
    
    Fix CI https://pkg-status.freebsd.org/package19/data/124amd64-default-build-as-user/ea297437c894/logs/edbrowse-3.8.7_1.log
    
    PR:             275153
    Approved by:    fernape
---
 www/edbrowse/Makefile                  |  7 +++++++
 www/edbrowse/files/extra-patch-openssl | 11 +++++++++++
 2 files changed, 18 insertions(+)

diff --git a/www/edbrowse/Makefile b/www/edbrowse/Makefile
index c8274684bdb0..c65a59d355f8 100644
--- a/www/edbrowse/Makefile
+++ b/www/edbrowse/Makefile
@@ -31,6 +31,13 @@ PORTDOCS=	*
 
 OPTIONS_DEFINE=	DOCS
 
+.include <bsd.port.options.mk>
+
+# Skip openssl.pc while using OpenSSL from base system on older FreeBSD versions which does not skip this file
+.if ${SSL_DEFAULT} == base && !exists(/usr/libdata/pkgconfig/openssl.pc)
+EXTRA_PATCHES+=	${PATCHDIR}/extra-patch-openssl
+.endif
+
 do-install:
 	${INSTALL_MAN} ${WRKSRC}/doc/man-edbrowse-freebsd.1 ${STAGEDIR}${MAN1PREFIX}/man/man1/${PORTNAME}.1
 	${INSTALL_PROGRAM} ${WRKSRC}/src/edbrowse ${STAGEDIR}${PREFIX}/bin
diff --git a/www/edbrowse/files/extra-patch-openssl b/www/edbrowse/files/extra-patch-openssl
new file mode 100644
index 000000000000..97786da57ebf
--- /dev/null
+++ b/www/edbrowse/files/extra-patch-openssl
@@ -0,0 +1,11 @@
+--- src/makefile.orig	2023-11-17 18:00:41.589174000 +0100
++++ src/makefile	2023-11-17 18:01:13.273125000 +0100
+@@ -9,7 +9,7 @@
+ CFLAGS += $(PLATFORM_CFLAGS)
+ 
+ # determine includes and linker flags
+-DEPENDENCIES = libcurl:curl odbc libpcre2-8:pcre2-8 readline openssl
++DEPENDENCIES = libcurl:curl odbc libpcre2-8:pcre2-8 readline
+ INCLUDES = $(shell ./make-helper.sh pkg-config-includes $(DEPENDENCIES))
+ LINKER_LIBS = $(shell ./make-helper.sh pkg-config-libs $(DEPENDENCIES))
+ CFLAGS += $(INCLUDES)