public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Quinet Charlie" <w.iron.zombie@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/proj/guru:dev commit in: sys-libs/gcompat/
Date: Mon, 10 Feb 2025 23:33:42 +0000 (UTC)	[thread overview]
Message-ID: <1739230420.5bd5663aef7ac4188918d61ced2cd8f998be4e09.w.iron.zombie@gentoo> (raw)

commit:     5bd5663aef7ac4188918d61ced2cd8f998be4e09
Author:     Charlie Quinet <w.iron.zombie <AT> gmail <DOT> com>
AuthorDate: Mon Feb 10 23:32:20 2025 +0000
Commit:     Quinet Charlie <w.iron.zombie <AT> gmail <DOT> com>
CommitDate: Mon Feb 10 23:33:40 2025 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=5bd5663a

sys-libs/gcompat: add live ebuild

gcompat hasn't had a point release for a while (2 years) and there are support for more symbols in the latest git

Signed-off-by: Charlie Quinet <w.iron.zombie <AT> gmail.com>

 sys-libs/gcompat/gcompat-9999.ebuild | 57 ++++++++++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)

diff --git a/sys-libs/gcompat/gcompat-9999.ebuild b/sys-libs/gcompat/gcompat-9999.ebuild
new file mode 100644
index 000000000..108d53a71
--- /dev/null
+++ b/sys-libs/gcompat/gcompat-9999.ebuild
@@ -0,0 +1,57 @@
+# Copyright 2018-2020 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit multilib-minimal flag-o-matic git-r3
+
+DESCRIPTION="The GNU C Library compatibility layer for musl"
+HOMEPAGE="https://git.adelielinux.org/adelie/gcompat"
+EGIT_REPO_URI="https://git.adelielinux.org/adelie/gcompat.git"
+LICENSE="UoI-NCSA"
+SLOT="0"
+IUSE="libucontext obstack"
+
+DEPEND="
+	libucontext? ( sys-libs/libucontext )
+	obstack? ( sys-libs/obstack-standalone )
+"
+RDEPEND="${DEPEND}"
+
+get_loader_name() {
+	# Loosely based on Adélie APKBUILD
+	# TODO: Check against glibc’s logic
+
+	case "$ABI" in
+		x86) echo "ld-linux.so.2" ;;
+		amd64) echo "ld-linux-x86-64.so.2" ;;
+		arm64) echo "ld-linux-aarch64.so.1" ;;
+		arm*) echo "ld-linux-armhf.so.3" ;;
+		mips | powerpc | s390) echo "ld.so.1" ;;
+	esac
+}
+
+get_linker_path() {
+	local arch=$(ldd 2>&1 | sed -n '1s/^musl libc (\(.*\))$/\1/p')
+	echo "/lib/ld-musl-${arch}.so.1"
+}
+
+src_compile() {
+	filter-flags "-Wl,--as-needed"
+
+	emake \
+		LINKER_PATH="$(get_linker_path)" \
+		LOADER_NAME="$(get_loader_name)" \
+		WITH_OBSTACK="$(usex obstack 'obstack-standalone' 'no')" \
+		$(usex libucontext WITH_LIBUCONTEXT=yes '')
+}
+
+src_install() {
+	emake \
+		LINKER_PATH="$(get_linker_path)" \
+		LOADER_NAME="$(get_loader_name)" \
+		WITH_OBSTACK="$(usex obstack 'obstack-standalone' 'no')" \
+		$(usex libucontext WITH_LIBUCONTEXT=yes '') \
+		DESTDIR="${D}" \
+		install
+}


             reply	other threads:[~2025-02-10 23:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-10 23:33 Quinet Charlie [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-02-07 20:19 [gentoo-commits] repo/proj/guru:dev commit in: sys-libs/gcompat/ Violet Purcell
2024-03-21  1:25 Haelwenn Monnier
2024-03-20 20:53 Haelwenn Monnier
2024-03-20 19:39 Haelwenn Monnier

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=1739230420.5bd5663aef7ac4188918d61ced2cd8f998be4e09.w.iron.zombie@gentoo \
    --to=w.iron.zombie@gmail.com \
    --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