diff options
Diffstat (limited to 'sys-libs/libucontext')
-rw-r--r-- | sys-libs/libucontext/Manifest | 2 | ||||
-rw-r--r-- | sys-libs/libucontext/libucontext-1.2.ebuild | 69 |
2 files changed, 71 insertions, 0 deletions
diff --git a/sys-libs/libucontext/Manifest b/sys-libs/libucontext/Manifest index 62aef2d8e282..271d66958c40 100644 --- a/sys-libs/libucontext/Manifest +++ b/sys-libs/libucontext/Manifest @@ -1,4 +1,6 @@ AUX libucontext-1.1-respect-CFLAGS.patch 368 BLAKE2B b04163e9e75ad3f8704d85d78091a41957cb072edd3ecbe58dbf45bf59c5ffb3662b5f96bf413eaaa5e328c964cbe99a70c6f8f23f4f8bc74bfdda7a0e45c54d SHA512 889b67269066ccdf84221dd1a636d4f6782f4c5f6800828f4068f3764b7e9d1797614d9f07f81864bc720f415c475c1b78aba38dd35355a54fcbf2f7a64a57ff DIST libucontext-1.1.tar.gz 25261 BLAKE2B 269b3899657779bc2c6a2f1c365242f0ee936afeb0acf74e48af5c1e6b96918bbaa239039508e7b1b1f7b358679fb4a222311b761223b69b9a3e7a9be2d0bc40 SHA512 05aed6f82a2b3d9dba896423335a7fc2fc5eddc87ed725f05e14488c6ddfcef10b835c928619439c7783e052baff7ef2dc162b6e06aa78992f6f611ca13c2e39 +DIST libucontext-1.2.tar.gz 29073 BLAKE2B 378816376877729776c41515ad1c3da36c24528bcdcf5272c4df2029b5273cf90228c163e87bd1af558129b1274d0b22632c4fa8ad2a0f37ac7014dae527a48e SHA512 f47b776517fa9e3fe48b762b11ae580c28bd7646f9e3ab843141d3e203f886326e68dd8040852ab1cb92dbd09d821161660c4be44e3025448d90131e74a4cf51 EBUILD libucontext-1.1-r1.ebuild 1227 BLAKE2B 80165906c3525c3a1d8cd1079a509ff11cb8ec92833ea493e03103c775f99c4f303d86c33ee4fb921cb9c1dcdfc9e06b031e2c6158c1547a99a86edf7b4ff9ab SHA512 accd79cbc600ca4f02dcdc76f6ed7a964b8714238dfe2d5d44734ef3be472a998a6d04afa196c9a086e58ca18138c80b64973b4caa870ffe7e1ba5e579220ede +EBUILD libucontext-1.2.ebuild 1370 BLAKE2B b7a8af9afd2dec3988699e500395a206eb628994d9f7bf50547ae44ae9204850ef1cba637c87a9235a0896a5ebe0785350fa573e0615ba781723d2a7fcd7b739 SHA512 966f7bf60091d9af0d7bb8bed9fabf0fba82087a3d091da79c0b19983d8d2b80ffe67381baab2de3f4dc9c113865ed157377007c9cc85f5c23f331417ae1a31c MISC metadata.xml 329 BLAKE2B 8958a3567263e9f2fc2409c2cd5858ca3e68659a45f67e5132fca640c6ffe05cac8810436f334b5c775ed049709f43aaf366cfecc97bc732a0917bb47aa5c34d SHA512 7b5d5832b22828f6a0600e3be45ff1da8ff340481a3602db6f5b8540373ff0ac3c72f0de64f00a1691598bbd9cea0128eb869cda67d8ac4894e3a51a7009a730 diff --git a/sys-libs/libucontext/libucontext-1.2.ebuild b/sys-libs/libucontext/libucontext-1.2.ebuild new file mode 100644 index 000000000000..7120a14d92cb --- /dev/null +++ b/sys-libs/libucontext/libucontext-1.2.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2022 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" +IUSE="+man" + +BDEPEND="man? ( app-text/scdoc )" + +# segfault needs investigation +# 1.2 eems ok? +#RESTRICT="test" + +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="${ED}" \ + LIBDIR="/usr/$(get_libdir)" \ + PKGCONFIGDIR="/usr/$(get_libdir)/pkgconfig" \ + install $(usev man 'install_docs') + + find "${ED}" -name '*.a' -delete || die +} |