From nobody Tue Sep 6 07:32:18 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 4MMHCR194Kz4cNVy; Tue, 6 Sep 2022 07:32:19 +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 4MMHCR0fSWz3b0h; Tue, 6 Sep 2022 07:32:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662449539; 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=7oCXVmXwWCEHHL5XUK/qaqQQm7CgV4QPnFn2wwSk9eo=; b=RJljdYGP9slC0Q2LzFaxH8zpz36OkD81XgB41sivAoypGPGhF6K088QWFKqAUzhPcdOkw6 xIkKtuvJD9EnXB5R+EeOFW20XYp3FeNSMGdehOE7pxxKQ1EWMKQ8fqXsVlLfj9A3GT+Rw7 0jXk6R35SdcrPBJAAGxqxr8pnzMOI8JG1si/mXt7p3uiKKJhlzxhlGKsiN/1XTTD4+Vhgu Ju94+5SVl8Aom1GNVkTCyhlnBR9RbHOkBGrMmXEMsj49/hPgZTmBxAIIj6lKGthGr9OoJH 1OuEB1R8l4GobyCVTnDseHkFWkp3rvOdF3v9WFmTA6VRXTMJGGUupoTU0wR39w== 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 4MMHCQ6qh3z15qT; Tue, 6 Sep 2022 07:32:18 +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 2867WIWS050944; Tue, 6 Sep 2022 07:32:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2867WI5L050943; Tue, 6 Sep 2022 07:32:18 GMT (envelope-from git) Date: Tue, 6 Sep 2022 07:32:18 GMT Message-Id: <202209060732.2867WI5L050943@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: b323fa85f152 - main - 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/main X-Git-Reftype: branch X-Git-Commit: b323fa85f15268ac44b8ff90faf90bce5d87b608 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662449539; 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=7oCXVmXwWCEHHL5XUK/qaqQQm7CgV4QPnFn2wwSk9eo=; b=jopTToNN/MmRxvTlYwEqdWnqTFrheFpOG7jD/ps9Hvweg076YR/4zbqGt6okXf8w8MqxPI pL8mM39h255SEFE/Q5tq88SIcieLGS3o/NfNUa0cjGrwRImp48pe+KvdqPAOMHp6CEYvTx Isf5y/9FLRtxke03UiqxO6EDaWwggldqOxIZK0sy0uekIvuUwAUenhqJRZAShuRzqvfaE9 xyXPe7441V6LpZrDJVPajTHjHALhJ0QpIIc3w6KGBQv/plSk0ni00dfjMOq38nvSws4dTl ReKOhnXPAuhTF3VFixm5ifdyz7mkm2yvHc7OAdvWhHgJbk+G2x06N5e30AzDDw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1662449539; a=rsa-sha256; cv=none; b=obMpa0KEQYIsQTQmtUcG+dsWW6JujsCjrBDuHdH4fQJcd3zkM1Bo4EKESx4c25SYlU/d0L fi3EMKnI+qfu9AtkjtZ5mBLkB619m6inyNTzg+reyn5/X8xjtiAHaNCt0wCttKyYUXT8bl 07SW8wtC2tO8CtBDTrGKH+jUQuWzu8CQ57smiHetYtHMQZN+EFupUXRL21J3dFr2bzeDwP Zup2X3h97bXBYWxRcmjxJh/hdTnHn0fVPJ88sduDKC+8N/cz21UMDChM2g3mQg8i/Wd2qn r3kj2ax5p58A1Cm8l0elRh50vlJ+Utp/jl2Eje4Re2NpgYC+MxRxZ5idsAEe8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=b323fa85f15268ac44b8ff90faf90bce5d87b608 commit b323fa85f15268ac44b8ff90faf90bce5d87b608 Author: Baptiste Daroussin AuthorDate: 2022-08-26 14:02:09 +0000 Commit: Baptiste Daroussin CommitDate: 2022-09-06 07:32:02 +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 --- 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 e318179120ce..d8b8f454122c 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