summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-08-15 00:03:14 +0100
committerSam James <sam@gentoo.org>2024-08-15 00:28:39 +0100
commitf6d4fb1c42492dbacc9ea83d18aff6dca3162e55 (patch)
tree199323317526cc1f749142bb58facefd69f1ca00 /sys-libs/libucontext
parentsys-libs/libucontext: drop 1.1-r1 (diff)
downloadgentoo-f6d4fb1c42492dbacc9ea83d18aff6dca3162e55.tar.gz
gentoo-f6d4fb1c42492dbacc9ea83d18aff6dca3162e55.tar.bz2
gentoo-f6d4fb1c42492dbacc9ea83d18aff6dca3162e55.zip
sys-libs/libucontext: add 1.3.1
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-libs/libucontext')
-rw-r--r--sys-libs/libucontext/Manifest1
-rw-r--r--sys-libs/libucontext/libucontext-1.3.1.ebuild66
2 files changed, 67 insertions, 0 deletions
diff --git a/sys-libs/libucontext/Manifest b/sys-libs/libucontext/Manifest
index 581bd40c2f49..86de052e4c59 100644
--- a/sys-libs/libucontext/Manifest
+++ b/sys-libs/libucontext/Manifest
@@ -1 +1,2 @@
DIST libucontext-1.2.tar.gz 29073 BLAKE2B 378816376877729776c41515ad1c3da36c24528bcdcf5272c4df2029b5273cf90228c163e87bd1af558129b1274d0b22632c4fa8ad2a0f37ac7014dae527a48e SHA512 f47b776517fa9e3fe48b762b11ae580c28bd7646f9e3ab843141d3e203f886326e68dd8040852ab1cb92dbd09d821161660c4be44e3025448d90131e74a4cf51
+DIST libucontext-1.3.1.tar.gz 31231 BLAKE2B b7ca1bf2f506b6a4300af13403e4ca283711fcec2ac2cf9b3a6bf0ed6f7b8aeeda510d47cbf8d88cb7630ad15b8bac835349acf7bec86190cbcc033d8402370a SHA512 00133fd2ab314ce54c80ef0596356288440a4aece0ed3afca1faa061ec41242ae8be87a500e5a5a8697ec22aded87b00fb53f67554e1a045359ff92b89c05883
diff --git a/sys-libs/libucontext/libucontext-1.3.1.ebuild b/sys-libs/libucontext/libucontext-1.3.1.ebuild
new file mode 100644
index 000000000000..0bf6304cca17
--- /dev/null
+++ b/sys-libs/libucontext/libucontext-1.3.1.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+DESCRIPTION="ucontext implementation featuring glibc-compatible ABI"
+HOMEPAGE="https://github.com/kaniini/libucontext"
+SRC_URI="https://github.com/kaniini/libucontext/archive/refs/tags/${P}.tar.gz"
+S="${WORKDIR}"/${PN}-${P}
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~x86"
+IUSE="+man"
+
+BDEPEND="man? ( app-text/scdoc )"
+
+src_compile() {
+ tc-export AR CC
+
+ arch=
+
+ # Override arch detection
+ # https://github.com/kaniini/libucontext/blob/master/Makefile#L3
+ if use x86 ; then
+ arch="x86"
+ elif use arm ; then
+ arch="arm"
+ elif use arm64 ; then
+ arch="aarch64"
+ elif use ppc64 ; then
+ arch="ppc64"
+ else
+ arch="$(uname -m)"
+ fi
+
+ emake \
+ ARCH="${arch}" \
+ LDFLAGS="${LDFLAGS}" \
+ libdir="/usr/$(get_libdir)" \
+ pkgconfigdir="/usr/$(get_libdir)/pkgconfig" \
+ all $(usev man 'docs')
+}
+
+src_test() {
+ emake \
+ ARCH="${arch}" \
+ LDFLAGS="${LDFLAGS}" \
+ libdir="/usr/$(get_libdir)" \
+ pkgconfigdir="/usr/$(get_libdir)/pkgconfig" \
+ check
+}
+
+src_install() {
+ emake \
+ ARCH="${arch}" \
+ DESTDIR="${D}" \
+ prefix="${EPREFIX}/usr" \
+ libdir="${EPREFIX}/usr/$(get_libdir)" \
+ pkgconfigdir="${EPREFIX}/usr/$(get_libdir)/pkgconfig" \
+ install $(usev man 'install_docs')
+
+ find "${ED}" -name '*.a' -delete || die
+}