From nobody Wed Oct 12 08:34:16 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MnQtJ5fpjz4flQB; Wed, 12 Oct 2022 08:34:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MnQtJ5CjHz3VvH; Wed, 12 Oct 2022 08:34:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665563656; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zjz/YqQyXb7mFEUXgoN977su5BF95NMHqc4fSMqnMVU=; b=e1gbN9RWINYweXbb6yG2wA1cPGRJgEb5nGv6bKHF3Kjayv/v/NeE+oQ/t3JP1zQk2uudor QnM46M0O//EBWGxqKiZoEmiXhjlU0hg4hHFnzNmzy9FSuvg4vr+sdJocCoAXFdjDS9uK+Q 1kCy3jssca1IqCPur9Im8KdRvUEUnU10M2YKSbFs3vSAPu8j01xxiZ5w+mulDLAMBrZBfx X6dzcf+NEHnIhXukIT1AVYtnqKxJAyJdXt6iaTBWmplhNQISu97Xmyi+My/U0INICf3xBi 3XFvYHHc67Oo+PA0Ozh5cMhQtnLtFd4Vn5D5NGGAg797WHyQVdYNkCDzK80qMg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MnQtJ4HD1z1FpX; Wed, 12 Oct 2022 08:34:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 29C8YGps093836; Wed, 12 Oct 2022 08:34:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 29C8YG68093835; Wed, 12 Oct 2022 08:34:16 GMT (envelope-from git) Date: Wed, 12 Oct 2022 08:34:16 GMT Message-Id: <202210120834.29C8YG68093835@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Baptiste Daroussin Subject: git: 41067961b6f3 - stable/13 - openssl: install pc files List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 41067961b6f3a0b5667e40e768b7b46e4092348e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665563656; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zjz/YqQyXb7mFEUXgoN977su5BF95NMHqc4fSMqnMVU=; b=Gzdz836JxwRa/EyxbwKgciIlrjx34JYyFfTt+jFQRvWBPdJSYscSysrIeBmlgl7A1bEwJP uGdmDTBpxlOaR0JRc0Bq+00w7UHbcD2vZNJISotw41GOX5jzplugncsB82pImzFkZPjZ+g bfHWFhCVno3DGY2yLXaotQTwWulbipaVl0zAtnBnsx94gLTOkNbLzU4XYH2k3woVIyvsyz T2i1qp2ZyLy+lkr1wjPylnsIgWxkmdE2mpr+GT9mFIw+Z8ElNDbH56chtHtBFWAosririO Isgrc4R465RG9NbTV/A/aWCXJZCiVXJiFGFgo8SAEjv8oollrmkF0wy9bgRI/g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1665563656; a=rsa-sha256; cv=none; b=ucWGFetSS1YIvJp33SIwaZe5oaOq+1vt469b3WCewUQHjiX65KxQ15dBaAKF/prt0DFNRG itVvi0bSLpVSTjX2OTIrylG9IpgxUYiXfOU25bn2NBdhgLEiKcphQuKF6APG+6N/52y5FB +6YyBxXMEMmKEtM41jEpAOHkBBTsXhGqOT9+KiFQdasFS4J1APZqEbEUpbHjev9kNWxEU5 VaX/oemHz/eM56W/+Cp4uCe6J3llCDZSv+i7coxQH2FR0AWfaCSrc1MFNjtIFK2Fkdbkcy WqWi2FLOa9KJp5V8pAMKyqSwlaE5uXcFR0GiLlmSIuw4Ezexc+ty3w/BmST5ig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=41067961b6f3a0b5667e40e768b7b46e4092348e commit 41067961b6f3a0b5667e40e768b7b46e4092348e Author: Baptiste Daroussin AuthorDate: 2022-08-26 14:02:09 +0000 Commit: Baptiste Daroussin CommitDate: 2022-10-12 08:34:03 +0000 openssl: install pc files most programs in ports are looking for .pc files in order to get the necessary information on how to compile and link against openssl. The ports now also has a way to hide or force a path for pkgconf. Providing .pc files along with openssl in base will allow (once all the supported version of FreeBSD has it) so improve the framework to deal with openssl in base vs openssl in ports (and libressl) This will also greatly reduce the number of patches necessary to workaround the build systems which only knows how to detect where openssl is installed via pkgconf. PR: 266051 MFC After: 3 weeks Reviewed by: jkim, delphij Exp-run by: antoine Differential Revision: https://reviews.freebsd.org/D36360 (cherry picked from commit b323fa85f15268ac44b8ff90faf90bce5d87b608) --- secure/lib/libcrypto/Makefile | 1 + secure/lib/libcrypto/Makefile.inc | 6 ++++++ secure/lib/libcrypto/libcrypto.pc.in | 12 ++++++++++++ secure/lib/libssl/Makefile | 2 ++ secure/lib/libssl/libssl.pc.in | 11 +++++++++++ secure/lib/libssl/openssl.pc.in | 9 +++++++++ 6 files changed, 41 insertions(+) diff --git a/secure/lib/libcrypto/Makefile b/secure/lib/libcrypto/Makefile index cf9259a19e16..8a38f0f563a0 100644 --- a/secure/lib/libcrypto/Makefile +++ b/secure/lib/libcrypto/Makefile @@ -12,6 +12,7 @@ SHLIB_MAJOR= 111 VERSION_MAP= ${.CURDIR}/Version.map NO_LINT= +PCFILES= libcrypto.pc .include "Makefile.man" .include "Makefile.inc" diff --git a/secure/lib/libcrypto/Makefile.inc b/secure/lib/libcrypto/Makefile.inc index 846692c679c6..2fa17420be43 100644 --- a/secure/lib/libcrypto/Makefile.inc +++ b/secure/lib/libcrypto/Makefile.inc @@ -113,3 +113,9 @@ CFLAGS+= -DENGINESDIR="\"${LIBDIR}/engines\"" CFLAGS+= -DNDEBUG MANDIR= ${SHAREDIR}/openssl/man/man + +.for pcfile in ${PCFILES} +${pcfile}: ${pcfile}.in + sed -e 's,@openssl_ver@,${OPENSSL_VER},g' ${.ALLSRC} > ${.TARGET} +.endfor +CLEANFILES+= ${PCFILES} diff --git a/secure/lib/libcrypto/libcrypto.pc.in b/secure/lib/libcrypto/libcrypto.pc.in new file mode 100644 index 000000000000..d0da079d9f19 --- /dev/null +++ b/secure/lib/libcrypto/libcrypto.pc.in @@ -0,0 +1,12 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include +enginesdir=${libdir}/engines + +Name: OpenSSL-libcrypto +Description: OpenSSL cryptography library +Version: @openssl_ver@ +Libs: -L${libdir} -lcrypto +Libs.private: -pthread +Cflags: -I${includedir} diff --git a/secure/lib/libssl/Makefile b/secure/lib/libssl/Makefile index 893ea6ebed79..8c72c6221056 100644 --- a/secure/lib/libssl/Makefile +++ b/secure/lib/libssl/Makefile @@ -9,6 +9,8 @@ PACKAGE= openssl NO_LINT= +PCFILES= libssl.pc openssl.pc + .include "../libcrypto/Makefile.inc" SRCS= bio_ssl.c d1_lib.c d1_msg.c d1_srtp.c methods.c packet.c pqueue.c diff --git a/secure/lib/libssl/libssl.pc.in b/secure/lib/libssl/libssl.pc.in new file mode 100644 index 000000000000..c3cf2b606e65 --- /dev/null +++ b/secure/lib/libssl/libssl.pc.in @@ -0,0 +1,11 @@ +prefix=/usr/ +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: OpenSSL-libssl +Description: Secure Sockets Layer and cryptography libraries +Version: @openssl_ver@ +Requires.private: libcrypto +Libs: -L${libdir} -lssl +Cflags: -I${includedir} diff --git a/secure/lib/libssl/openssl.pc.in b/secure/lib/libssl/openssl.pc.in new file mode 100644 index 000000000000..f2d849dc70ac --- /dev/null +++ b/secure/lib/libssl/openssl.pc.in @@ -0,0 +1,9 @@ +prefix=/usr/ +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: OpenSSL +Description: Secure Sockets Layer and cryptography libraries and tools +Version: @openssl_ver@ +Requires: libssl libcrypto