er 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 4clRkb3r15zvBy; Mon, 13 Oct 2025 06:09:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59D69B55080712; Mon, 13 Oct 2025 06:09:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59D69Bif080709; Mon, 13 Oct 2025 06:09:11 GMT (envelope-from git) Date: Mon, 13 Oct 2025 06:09:11 GMT Message-Id: <202510130609.59D69Bif080709@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Xin LI Subject: git: e1ea6b7b70cf - stable/14 - MFC: libbz2: add pkg-config file (bzip2.pc) 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: delphij X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e1ea6b7b70cf5204979f6c6112ad54c0036a9f7e Auto-Submitted: auto-generated The branch stable/14 has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=e1ea6b7b70cf5204979f6c6112ad54c0036a9f7e commit e1ea6b7b70cf5204979f6c6112ad54c0036a9f7e Author: Xin LI AuthorDate: 2025-10-10 05:35:54 +0000 Commit: Xin LI CommitDate: 2025-10-13 06:09:06 +0000 MFC: libbz2: add pkg-config file (bzip2.pc) Add generation of a bzip2.pc file for use with pkg-config and create a basic template as bzip2.pc.in. This allows other software to easily locate and link against libbz2 using standard pkg-config mechanisms instead of manual compiler and linker flags. The version number is extracted automatically from bzlib.h to keep it consistent with the library sources. Tested: pkg-config --exists --print-errors "bzip2 >= 1.0.9" (fail, expected) pkg-config --exists --print-errors "bzip2 >= 1.0" (succeeded) pkg-config --libs bzip2 (-lbz2) pkg-config --cflags bzip2 () (cherry picked from commit 586319793368cbc664b48187bda60d27e171753a) --- lib/libbz2/Makefile | 13 +++++++++++++ lib/libbz2/bzip2.pc.in | 11 +++++++++++ 2 files changed, 24 insertions(+) diff --git a/lib/libbz2/Makefile b/lib/libbz2/Makefile index 832ec15487b8..3f52b3df6f92 100644 --- a/lib/libbz2/Makefile +++ b/lib/libbz2/Makefile @@ -12,4 +12,17 @@ CFLAGS+= -I${BZ2DIR} WARNS?= 3 +BZIP2_VERSION!= sed -n '/bzip2\/libbzip2 version /{s/.*version //;s/ of.*//p;q;}' ${BZ2DIR}/bzlib.h + +bzip2.pc: bzip2.pc.in + sed -e 's,@prefix@,/usr,g ; \ + s,@exec_prefix@,$${prefix},g ; \ + s,@libdir@,${LIBDIR},g ; \ + s,@sharedlibdir@,${SHLIBDIR},g ; \ + s,@includedir@,${INCLUDEDIR},g ; \ + s,@VERSION@,${BZIP2_VERSION},g ;' \ + ${.ALLSRC} > ${.TARGET} + +PCFILES= bzip2.pc + .include diff --git a/lib/libbz2/bzip2.pc.in b/lib/libbz2/bzip2.pc.in new file mode 100644 index 000000000000..d91c9931a58a --- /dev/null +++ b/lib/libbz2/bzip2.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +sharedlibdir=@sharedlibdir@ +includedir=@includedir@ + +Name: bzip2 +Description: bzip2 compression library +Version: @VERSION@ +Libs: -L${libdir} -lbz2 +Cflags: -I${includedir}