From nobody Wed Oct 12 08:38:29 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 4MnQz93Zhbz4flxg; Wed, 12 Oct 2022 08:38:29 +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 4MnQz92zclz3W6F; Wed, 12 Oct 2022 08:38:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665563909; 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=AUgYZczIcpwJ2EWc9K8mMu19LI3NxjOyzGb9QBeErHo=; b=puEsLGDOdL/e2yZTwKFo8KX2hjF/UMbFebIJlyzbBzbVeSVo2Ar/LaiUkINywgzvKC6Jld /wc81PQWveSXZWOsRaYKg5QYASvZHji//sraRsTqjsA0mP37tD13VXsO6zUxwk+J4V6a18 907lbjFq2LOygtZfqaLB/3r4WNS6vAzKium4j2s0y1ePakwACeXFWf+I7flVNJQx5nF1ob ETdl0nJqWMzUv66LwvLLvFsHCfOGFUZxkIFR/Gqo+4YzgVTyThifKC2/BkLzws1BsgYXWG uKKUQR76TbFsvAYJfuk8uRrXcXzfEvR4a7EevrEU5Wlon10eBovUv/UxwqeLSg== 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 4MnQz921D1z1FpY; Wed, 12 Oct 2022 08:38:29 +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 29C8cTaF094422; Wed, 12 Oct 2022 08:38:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 29C8cTKN094421; Wed, 12 Oct 2022 08:38:29 GMT (envelope-from git) Date: Wed, 12 Oct 2022 08:38:29 GMT Message-Id: <202210120838.29C8cTKN094421@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: ec07cdb92432 - stable/12 - 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/12 X-Git-Reftype: branch X-Git-Commit: ec07cdb9243290bb8a83ed0c7faf974c87902681 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665563909; 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=AUgYZczIcpwJ2EWc9K8mMu19LI3NxjOyzGb9QBeErHo=; b=kiFur4nNE7jzVVO6qXQj89depl8u+4Vsl9WkNYQtYQddHl3Ex1mrZguc+E/Uw7o2R5aRU4 vfVq90g+Zi3sgVH6IgJsQplgG6x8T20nSQe1edjg0ednR0b1O2dPGYrW3NA8SXbc632Mlb x7X6sQLgYJ4BWeMKZEDkWW+MwXF/ykGvw0aEE+QZZOAsTvZc6ZbafGjnsQCfe2Ew1u3zlg 3CP7X33O5ahUJAnRsiZA8rtgzQNLpKVls2o1GdOUhmPqBS3lUfTWSXgTnDyHVp5mVnlMeP pnHwKl8ZNmFpAlcV37W9W9Si643MO2AXKMWdbVE73MeRBvNppEyCYbCLplYlPQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1665563909; a=rsa-sha256; cv=none; b=AO6ysAIpZzWeJ5KBYsDnR8jacAn3Je+eHPXKebFxeRHnNyfN5bpitOmw4y5HERdftYY9gg 1n9KdSfYjut0O0v3UpyPhOvRTcrAdvuCWhnekFgxZqwOA1UqFyE2uufPsGkhPpIgODVWeH PZxTBX1OEEAne3pWscAMdAHbnyALlndsQzgATiYWxrvZK3yup5BXgWcXEdo3myz35Nfean 3W/ICSi0a+zjDiz7eMaYJPuKRWQsvtCDNdvQ7OWkQWQMNhRBS16NeIIU03UogFAX69BD9q JlfDtEOJm3ksuN4cheYy2JeCrLdRGule9hLp/BS7nJrM5bohxYRGqehjOy+OCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=ec07cdb9243290bb8a83ed0c7faf974c87902681 commit ec07cdb9243290bb8a83ed0c7faf974c87902681 Author: Baptiste Daroussin AuthorDate: 2022-08-26 14:02:09 +0000 Commit: Baptiste Daroussin CommitDate: 2022-10-12 08:37:53 +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 db71e23ef85e..9a57b31a0c87 100644 --- a/secure/lib/libcrypto/Makefile +++ b/secure/lib/libcrypto/Makefile @@ -10,6 +10,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 538e3e392537..caa05e849948 100644 --- a/secure/lib/libcrypto/Makefile.inc +++ b/secure/lib/libcrypto/Makefile.inc @@ -81,3 +81,9 @@ CFLAGS+= -DENGINESDIR="\"/usr/lib/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 ce9771450435..438ad854d42b 100644 --- a/secure/lib/libssl/Makefile +++ b/secure/lib/libssl/Makefile @@ -6,6 +6,8 @@ VERSION_MAP= ${.CURDIR}/Version.map 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