diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2020-08-28 08:40:51 +0100 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2020-08-28 08:49:43 +0100 |
commit | ae376c73ef197d6c7aa619e821c436ccab0cd77e (patch) | |
tree | e12340bc0e8a3360cd2d1be35bd423fc000d89c8 /sys-libs/blocksruntime | |
parent | net-analyzer/zabbix: bump to 5.0.3 (diff) | |
download | gentoo-ae376c73ef197d6c7aa619e821c436ccab0cd77e.tar.gz gentoo-ae376c73ef197d6c7aa619e821c436ccab0cd77e.tar.bz2 gentoo-ae376c73ef197d6c7aa619e821c436ccab0cd77e.zip |
sys-libs/blocksruntime: new package, clang's -fblocks runtime support
Bug: https://bugs.gentoo.org/729256
Package-Manager: Portage-3.0.4, Repoman-3.0.1
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'sys-libs/blocksruntime')
-rw-r--r-- | sys-libs/blocksruntime/Manifest | 1 | ||||
-rw-r--r-- | sys-libs/blocksruntime/blocksruntime-0_pre20171027.ebuild | 41 | ||||
-rw-r--r-- | sys-libs/blocksruntime/files/blocksruntime-0_pre20171027-ldflags-soname.patch | 34 | ||||
-rw-r--r-- | sys-libs/blocksruntime/metadata.xml | 11 |
4 files changed, 87 insertions, 0 deletions
diff --git a/sys-libs/blocksruntime/Manifest b/sys-libs/blocksruntime/Manifest new file mode 100644 index 000000000000..59798faef4bb --- /dev/null +++ b/sys-libs/blocksruntime/Manifest @@ -0,0 +1 @@ +DIST blocksruntime-0_pre20171027.tar.gz 40571 BLAKE2B 5cb5cee10d482a3028b6ed496f7ed4fba25504c5e188dd21be37f0a65b72750e0ce31f7243e9cd848d10323e43e7d058fd2f7eb5ffed9a64e543d418ac96cfac SHA512 4008730f7ee4173f22c40220c4b87cd3f5cfadd12d5ddbaec244e3c4164111f036d0b859cf4bb5f2425313148f5c6445de30af2d4ccc83e1b97a66895ccc6dc5 diff --git a/sys-libs/blocksruntime/blocksruntime-0_pre20171027.ebuild b/sys-libs/blocksruntime/blocksruntime-0_pre20171027.ebuild new file mode 100644 index 000000000000..cf596b316604 --- /dev/null +++ b/sys-libs/blocksruntime/blocksruntime-0_pre20171027.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-funcs vcs-snapshot + +COMMIT=9cc93ae2b58676c23fd02cf0c686fa15b7a3ff81 # 27 Oct 2017 + +DESCRIPTION="BlocksRuntime library needed for clang's -fblocks support" +HOMEPAGE="https://github.com/mackyle/blocksruntime" +SRC_URI="https://github.com/mackyle/blocksruntime/archive/${COMMIT}.tar.gz -> ${P}.tar.gz" + +LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND="" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}"/${PN}-0_pre20171027-ldflags-soname.patch +) + +src_prepare() { + default + + tc-export CC AR RANLIB +} + +src_compile() { + ./buildlib -shared || die +} + +src_install() { + prefix="${EPREFIX}/usr" \ + libdir="${EPREFIX}/usr/$(get_libdir)" \ + DESTDIR="${D}" \ + ./installlib || die +} diff --git a/sys-libs/blocksruntime/files/blocksruntime-0_pre20171027-ldflags-soname.patch b/sys-libs/blocksruntime/files/blocksruntime-0_pre20171027-ldflags-soname.patch new file mode 100644 index 000000000000..66e9f1993bd8 --- /dev/null +++ b/sys-libs/blocksruntime/files/blocksruntime-0_pre20171027-ldflags-soname.patch @@ -0,0 +1,34 @@ +--- a/buildlib ++++ b/buildlib +@@ -28,11 +28,13 @@ if [ -n "$shared" ]; then + SHLIB="${LIB%.a}.dylib" + SHOPT="-dynamiclib -Wl,-all_load" + SHOPT2= ++ SONAME= + ;; + *) + SHLIB="${LIB%.a}.so" + SHOPT="-shared -Wl,-whole-archive" + SHOPT2="-Wl,-no-whole-archive" ++ SONAME="-Wl,-soname=${SHLIB}.0" + ;; + esac + fi +@@ -108,5 +110,5 @@ echo "SRC=$SRC" + [ -z "$shared" ] || + ( + PS4= && set -ex +- "$CC" $FPIC $CFLAGS -o "$SHLIB" $SHOPT $LIB $SHOPT2 ++ "$CC" $FPIC $CFLAGS $LDFLAGS -o "$SHLIB" $SHOPT $LIB $SHOPT2 ${SONAME} + ) || exit +--- a/installlib ++++ b/installlib +@@ -91,5 +91,7 @@ docmd "install -d "$DESTDIR"$includedir "$DESTDIR"$libdir" + docmd "install -m 644 $HEADER "$DESTDIR"$includedir/" + [ -z "$LIB" ] || + docmd "install -m 644 $LIB "$DESTDIR"$libdir/" +-[ -z "$SHLIB" ] || ++[ -z "$SHLIB" ] || { + docmd "install -m $SHLIBMODE $SHLIB "$DESTDIR"$libdir/" ++docmd "ln -s $SHLIB "$DESTDIR"$libdir/${SHLIB}.0" ++} diff --git a/sys-libs/blocksruntime/metadata.xml b/sys-libs/blocksruntime/metadata.xml new file mode 100644 index 000000000000..4ce153662dd9 --- /dev/null +++ b/sys-libs/blocksruntime/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>slyfox@gentoo.org</email> + <name>Sergei Trofimovich</name> + </maintainer> + <upstream> + <remote-id type="github">mackyle/blocksruntime</remote-id> + </upstream> +</pkgmetadata> |