Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Allow to build with a custom openssl
Vsevolod Stakhov committed 1 year ago
commit 97a80f28e6fcec6fb4081eee70fa0e7a3ef88e5d
parent dfa04e4
2 files changed +16 -4
modified auto.def
@@ -18,8 +18,9 @@ options {
	with-coverage => "build with llvm coverage support"
	with-asan => "build with libasan support"
	with-lsan => "build with liblsan support"
-
	with-ubsan => "Build with libubsan support"
-
	with-libcurl => "Build with external libcurl"
+
	with-ubsan => "build with libubsan support"
+
	with-libcurl => "build with external libcurl"
+
	with-openssl.pc => "build with openssl getting flags via pc files"
	default-format:txz => "Default compression format: tzst (default), txz, tbz, tar"
}

@@ -346,6 +347,12 @@ if {[pkg-config-init 0]} {
			}
		}
	}
+

+
	if {[opt-bool with-openssl.pc]} {
+
		if {![pkg-config openssl]} {
+
			user-error "Unable to find openssl"
+
		}
+
	}
}

foreach repo [list binary] {
modified libpkg/Makefile.autosetup
@@ -92,8 +92,6 @@ LOCAL_LDFLAGS= @waflags@ \
		-L$(top_builddir)/external/libder -lder_pic \
		-L$(top_builddir)/external/libecc -lecc_pic \
		@nowaflags@ \
-
		-lssl \
-
		-lcrypto \
		-lm

STATIC_LIBS=	@REPOS_STATIC_LIBS@ \
@@ -151,6 +149,13 @@ LOCAL_LDFLAGS+= @PKG_LIBARCHIVE_LDFLAGS@ @PKG_LIBARCHIVE_LIBS@
LOCAL_LDFLAGS+=	-larchive
@endif

+
@if PKG_OPENSSL_LIBS
+
LOCAL_CFLAGS+=	@PKG_OPENSSL_CFLAGS@
+
LOCAL_LDFLAGS+=	@PKG_OPENSSL_LDFLAGS@ @PKG_OPENSSL_LIBS@
+
@else
+
LOCAL_LDFLAGS+=	-lssl -lcrypto
+
@endif
+

@if PKG_LIBLDNS_LIBS
LOCAL_CFLAGS+=	@PKG_LIBLDNS_CFLAGS@
LOCAL_LDFLAGS+=	@PKG_LIBLDNS_LDFLAGS@ @PKG_LIBLDNS_LIBS@