From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 7DBFB158015 for ; Mon, 18 Dec 2023 12:37:47 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A77C92BC01D; Mon, 18 Dec 2023 12:37:46 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7B73A2BC015 for ; Mon, 18 Dec 2023 12:37:46 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 6A0B4335D75 for ; Mon, 18 Dec 2023 12:37:45 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id BD89BACA for ; Mon, 18 Dec 2023 12:37:43 +0000 (UTC) From: "Horodniceanu Andrei" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Horodniceanu Andrei" Message-ID: <1702823208.391ce890a1ca37cce3ee643f61c63c06f428d0dc.a.horodniceanu@gentoo> Subject: [gentoo-commits] repo/user/dlang:master commit in: dev-libs/gtkd/ X-VCS-Repository: repo/user/dlang X-VCS-Files: dev-libs/gtkd/gtkd-3.10.0-r1.ebuild dev-libs/gtkd/gtkd-3.10.0.ebuild X-VCS-Directories: dev-libs/gtkd/ X-VCS-Committer: a.horodniceanu X-VCS-Committer-Name: Horodniceanu Andrei X-VCS-Revision: 391ce890a1ca37cce3ee643f61c63c06f428d0dc X-VCS-Branch: master Date: Mon, 18 Dec 2023 12:37:43 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 70111701-b360-484f-b148-379c5a44aa02 X-Archives-Hash: ddc015744a7768748e83b12a552d48c6 commit: 391ce890a1ca37cce3ee643f61c63c06f428d0dc Author: Horodniceanu Andrei proton me> AuthorDate: Thu Nov 30 19:45:42 2023 +0000 Commit: Horodniceanu Andrei proton me> CommitDate: Sun Dec 17 14:26:48 2023 +0000 URL: https://gitweb.gentoo.org/repo/user/dlang.git/commit/?id=391ce890 dev-libs/gtkd: install pkg-config files Additionally add || die to external commands Signed-off-by: Horodniceanu Andrei proton.me> .../{gtkd-3.10.0.ebuild => gtkd-3.10.0-r1.ebuild} | 28 ++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/dev-libs/gtkd/gtkd-3.10.0.ebuild b/dev-libs/gtkd/gtkd-3.10.0-r1.ebuild similarity index 81% rename from dev-libs/gtkd/gtkd-3.10.0.ebuild rename to dev-libs/gtkd/gtkd-3.10.0-r1.ebuild index 895ead2..d275cfb 100644 --- a/dev-libs/gtkd/gtkd-3.10.0.ebuild +++ b/dev-libs/gtkd/gtkd-3.10.0-r1.ebuild @@ -41,9 +41,9 @@ MINOR=$(ver_cut 2-) src_unpack() { mkdir "${S}" || die "Could not create source directory" - pushd "${S}" >/dev/null + pushd "${S}" >/dev/null || die unpack "${A}" - popd >/dev/null + popd >/dev/null || die } d_src_compile() { @@ -73,6 +73,26 @@ d_src_compile() { dlang_exec ${DC} ${DCFLAGS} -m${MODEL} -Isrc -Igenerated/gtkd ${sources} -lib -od=${SRC_DIR} -oq ${LDFLAGS} ${DLANG_OUTPUT_FLAG}${libname}.a fi fi + + # Generate the pkg-config file. The make rules don't depend on anything so + # it's fine to use them even though we compiled the library in another way. + + # Due to some quirkyness in meson, -L= isn't recognized as a D linker flag + # so we have to change it for ldc2. + local linker_flag + if [[ ${DLANG_VENDOR} == "LDC" ]]; then + linker_flag="-L" + else + linker_flag="${DLANG_LINKER_FLAG}" + fi + local mymakeargs=( + LINKERFLAG="${linker_flag}" + prefix="${EPREFIX}/usr" + libdir="$(get_libdir)" + ) + emake "${mymakeargs[@]}" "${LIB_NAME}-${MAJOR}.pc" + sed -i -e 's@include/d@include/dlang@' "${LIB_NAME}-${MAJOR}.pc" || \ + die "Could not modify include path for ${LIB_NAME}-${MAJOR}.pc" } foreach_used_component compile_libs @@ -94,6 +114,10 @@ d_src_install() { if use static-libs; then dolib.a "lib${LIB_NAME}-${MAJOR}.a" fi + + # Install the pkg-config files + insinto "/usr/$(get_libdir)/pkgconfig" + doins "${LIB_NAME}-${MAJOR}.pc" } foreach_used_component install_libs