Gentoo Archives: gentoo-commits

From: Sergei Trofimovich <slyfox@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/blocksruntime/files/, sys-libs/blocksruntime/
Date: Fri, 28 Aug 2020 07:49:56
Message-Id: 1598600983.ae376c73ef197d6c7aa619e821c436ccab0cd77e.slyfox@gentoo
1 commit: ae376c73ef197d6c7aa619e821c436ccab0cd77e
2 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
3 AuthorDate: Fri Aug 28 07:40:51 2020 +0000
4 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
5 CommitDate: Fri Aug 28 07:49:43 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ae376c73
7
8 sys-libs/blocksruntime: new package, clang's -fblocks runtime support
9
10 Bug: https://bugs.gentoo.org/729256
11 Package-Manager: Portage-3.0.4, Repoman-3.0.1
12 Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
13
14 sys-libs/blocksruntime/Manifest | 1 +
15 .../blocksruntime-0_pre20171027.ebuild | 41 ++++++++++++++++++++++
16 ...locksruntime-0_pre20171027-ldflags-soname.patch | 34 ++++++++++++++++++
17 sys-libs/blocksruntime/metadata.xml | 11 ++++++
18 4 files changed, 87 insertions(+)
19
20 diff --git a/sys-libs/blocksruntime/Manifest b/sys-libs/blocksruntime/Manifest
21 new file mode 100644
22 index 00000000000..59798faef4b
23 --- /dev/null
24 +++ b/sys-libs/blocksruntime/Manifest
25 @@ -0,0 +1 @@
26 +DIST blocksruntime-0_pre20171027.tar.gz 40571 BLAKE2B 5cb5cee10d482a3028b6ed496f7ed4fba25504c5e188dd21be37f0a65b72750e0ce31f7243e9cd848d10323e43e7d058fd2f7eb5ffed9a64e543d418ac96cfac SHA512 4008730f7ee4173f22c40220c4b87cd3f5cfadd12d5ddbaec244e3c4164111f036d0b859cf4bb5f2425313148f5c6445de30af2d4ccc83e1b97a66895ccc6dc5
27
28 diff --git a/sys-libs/blocksruntime/blocksruntime-0_pre20171027.ebuild b/sys-libs/blocksruntime/blocksruntime-0_pre20171027.ebuild
29 new file mode 100644
30 index 00000000000..cf596b31660
31 --- /dev/null
32 +++ b/sys-libs/blocksruntime/blocksruntime-0_pre20171027.ebuild
33 @@ -0,0 +1,41 @@
34 +# Copyright 1999-2020 Gentoo Authors
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=7
38 +
39 +inherit toolchain-funcs vcs-snapshot
40 +
41 +COMMIT=9cc93ae2b58676c23fd02cf0c686fa15b7a3ff81 # 27 Oct 2017
42 +
43 +DESCRIPTION="BlocksRuntime library needed for clang's -fblocks support"
44 +HOMEPAGE="https://github.com/mackyle/blocksruntime"
45 +SRC_URI="https://github.com/mackyle/blocksruntime/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
46 +
47 +LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
48 +SLOT="0"
49 +KEYWORDS="~amd64 ~x86"
50 +IUSE=""
51 +
52 +RDEPEND=""
53 +DEPEND="${RDEPEND}"
54 +
55 +PATCHES=(
56 + "${FILESDIR}"/${PN}-0_pre20171027-ldflags-soname.patch
57 +)
58 +
59 +src_prepare() {
60 + default
61 +
62 + tc-export CC AR RANLIB
63 +}
64 +
65 +src_compile() {
66 + ./buildlib -shared || die
67 +}
68 +
69 +src_install() {
70 + prefix="${EPREFIX}/usr" \
71 + libdir="${EPREFIX}/usr/$(get_libdir)" \
72 + DESTDIR="${D}" \
73 + ./installlib || die
74 +}
75
76 diff --git a/sys-libs/blocksruntime/files/blocksruntime-0_pre20171027-ldflags-soname.patch b/sys-libs/blocksruntime/files/blocksruntime-0_pre20171027-ldflags-soname.patch
77 new file mode 100644
78 index 00000000000..66e9f1993bd
79 --- /dev/null
80 +++ b/sys-libs/blocksruntime/files/blocksruntime-0_pre20171027-ldflags-soname.patch
81 @@ -0,0 +1,34 @@
82 +--- a/buildlib
83 ++++ b/buildlib
84 +@@ -28,11 +28,13 @@ if [ -n "$shared" ]; then
85 + SHLIB="${LIB%.a}.dylib"
86 + SHOPT="-dynamiclib -Wl,-all_load"
87 + SHOPT2=
88 ++ SONAME=
89 + ;;
90 + *)
91 + SHLIB="${LIB%.a}.so"
92 + SHOPT="-shared -Wl,-whole-archive"
93 + SHOPT2="-Wl,-no-whole-archive"
94 ++ SONAME="-Wl,-soname=${SHLIB}.0"
95 + ;;
96 + esac
97 + fi
98 +@@ -108,5 +110,5 @@ echo "SRC=$SRC"
99 + [ -z "$shared" ] ||
100 + (
101 + PS4= && set -ex
102 +- "$CC" $FPIC $CFLAGS -o "$SHLIB" $SHOPT $LIB $SHOPT2
103 ++ "$CC" $FPIC $CFLAGS $LDFLAGS -o "$SHLIB" $SHOPT $LIB $SHOPT2 ${SONAME}
104 + ) || exit
105 +--- a/installlib
106 ++++ b/installlib
107 +@@ -91,5 +91,7 @@ docmd "install -d "$DESTDIR"$includedir "$DESTDIR"$libdir"
108 + docmd "install -m 644 $HEADER "$DESTDIR"$includedir/"
109 + [ -z "$LIB" ] ||
110 + docmd "install -m 644 $LIB "$DESTDIR"$libdir/"
111 +-[ -z "$SHLIB" ] ||
112 ++[ -z "$SHLIB" ] || {
113 + docmd "install -m $SHLIBMODE $SHLIB "$DESTDIR"$libdir/"
114 ++docmd "ln -s $SHLIB "$DESTDIR"$libdir/${SHLIB}.0"
115 ++}
116
117 diff --git a/sys-libs/blocksruntime/metadata.xml b/sys-libs/blocksruntime/metadata.xml
118 new file mode 100644
119 index 00000000000..4ce153662dd
120 --- /dev/null
121 +++ b/sys-libs/blocksruntime/metadata.xml
122 @@ -0,0 +1,11 @@
123 +<?xml version="1.0" encoding="UTF-8"?>
124 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
125 +<pkgmetadata>
126 + <maintainer type="person">
127 + <email>slyfox@g.o</email>
128 + <name>Sergei Trofimovich</name>
129 + </maintainer>
130 + <upstream>
131 + <remote-id type="github">mackyle/blocksruntime</remote-id>
132 + </upstream>
133 +</pkgmetadata>