public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Horodniceanu Andrei" <a.horodniceanu@proton.me>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/user/dlang:master commit in: dev-libs/gtkd/
Date: Mon, 18 Dec 2023 12:37:43 +0000 (UTC)	[thread overview]
Message-ID: <1702823208.391ce890a1ca37cce3ee643f61c63c06f428d0dc.a.horodniceanu@gentoo> (raw)

commit:     391ce890a1ca37cce3ee643f61c63c06f428d0dc
Author:     Horodniceanu Andrei <a.horodniceanu <AT> proton <DOT> me>
AuthorDate: Thu Nov 30 19:45:42 2023 +0000
Commit:     Horodniceanu Andrei <a.horodniceanu <AT> proton <DOT> 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 <a.horodniceanu <AT> 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


             reply	other threads:[~2023-12-18 12:37 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-18 12:37 Horodniceanu Andrei [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-01-03 20:34 [gentoo-commits] repo/user/dlang:master commit in: dev-libs/gtkd/ Horodniceanu Andrei
2024-07-14 20:09 Horodniceanu Andrei
2024-07-14 19:44 Horodniceanu Andrei
2024-06-02  5:29 Horodniceanu Andrei
2024-06-02  5:29 Horodniceanu Andrei
2024-05-02 21:00 Horodniceanu Andrei
2024-05-02 21:00 Horodniceanu Andrei
2024-04-13 23:04 Horodniceanu Andrei
2024-01-14 10:37 Horodniceanu Andrei
2024-01-14 10:37 Horodniceanu Andrei
2023-11-28  9:42 Horodniceanu Andrei
2023-11-17 21:44 Horodniceanu Andrei
2021-05-21 17:20 Marco Leise

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1702823208.391ce890a1ca37cce3ee643f61c63c06f428d0dc.a.horodniceanu@gentoo \
    --to=a.horodniceanu@proton.me \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox