1 |
commit: 288a728fc408f7a20cff8422f4660749eaf1091f |
2 |
Author: Pacho Ramos <pacho <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Aug 6 06:47:53 2016 +0000 |
4 |
Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Aug 6 07:05:08 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=288a728f |
7 |
|
8 |
dev-util/meson: new package needed by gst-transcoder (and probably needed by more gstreamer stuff in the future). |
9 |
|
10 |
Package-Manager: portage-2.3.0 |
11 |
|
12 |
dev-util/meson/Manifest | 1 + |
13 |
dev-util/meson/files/meson-0.33.0-runpath.patch | 96 +++++++++++++++++++++++++ |
14 |
dev-util/meson/meson-0.33.0.ebuild | 36 ++++++++++ |
15 |
dev-util/meson/metadata.xml | 8 +++ |
16 |
4 files changed, 141 insertions(+) |
17 |
|
18 |
diff --git a/dev-util/meson/Manifest b/dev-util/meson/Manifest |
19 |
new file mode 100644 |
20 |
index 0000000..10dce1e |
21 |
--- /dev/null |
22 |
+++ b/dev-util/meson/Manifest |
23 |
@@ -0,0 +1 @@ |
24 |
+DIST meson-0.33.0.tar.gz 482221 SHA256 2417fd27cbb1e9b1006fe9e5a1f3896285d4c925ffffdf9478638b5fe3ea7fc5 SHA512 de4bdc40574dfbbc5a29861c32984dc1c97d28992e849c32f1ec0e314d3c69861768583c29eea2b9708ec6b734759d7eac60a53015fd321e29f1e9b1dbbffc22 WHIRLPOOL f12522765dcdf035f873625c3f8dca3d5800e7f12907ac80e65b76d6f7dd54469cd91060d5b89e16b1ca088c94808901706aa98a1d53ff65429bf1b733246dcf |
25 |
|
26 |
diff --git a/dev-util/meson/files/meson-0.33.0-runpath.patch b/dev-util/meson/files/meson-0.33.0-runpath.patch |
27 |
new file mode 100644 |
28 |
index 0000000..2081cd3 |
29 |
--- /dev/null |
30 |
+++ b/dev-util/meson/files/meson-0.33.0-runpath.patch |
31 |
@@ -0,0 +1,96 @@ |
32 |
+From b42c0555ca35ebf6e97438ef414a3de62eaa2ced Mon Sep 17 00:00:00 2001 |
33 |
+From: Jussi Pakkanen <jpakkane@×××××.com> |
34 |
+Date: Tue, 2 Aug 2016 21:45:45 +0300 |
35 |
+Subject: [PATCH] Handle both DT_RPATH as well as DT_RUNPATH when fixing rpath |
36 |
+ settings. |
37 |
+ |
38 |
+--- |
39 |
+ mesonbuild/scripts/depfixer.py | 30 +++++++++++++++++++++++------- |
40 |
+ 1 file changed, 23 insertions(+), 7 deletions(-) |
41 |
+ |
42 |
+diff --git a/mesonbuild/scripts/depfixer.py b/mesonbuild/scripts/depfixer.py |
43 |
+index 8ff0dd1..cb136f4 100644 |
44 |
+--- a/mesonbuild/scripts/depfixer.py |
45 |
++++ b/mesonbuild/scripts/depfixer.py |
46 |
+@@ -20,6 +20,7 @@ |
47 |
+ SHT_STRTAB = 3 |
48 |
+ DT_NEEDED = 1 |
49 |
+ DT_RPATH = 15 |
50 |
++DT_RUNPATH = 29 |
51 |
+ DT_STRTAB = 5 |
52 |
+ DT_SONAME = 14 |
53 |
+ |
54 |
+@@ -211,21 +212,29 @@ def print_soname(self): |
55 |
+ self.bf.seek(strtab.val + soname.val) |
56 |
+ print(self.read_str()) |
57 |
+ |
58 |
+- def get_rpath_offset(self): |
59 |
++ def get_entry_offset(self, entrynum): |
60 |
+ sec = self.find_section(b'.dynstr') |
61 |
+ for i in self.dynamic: |
62 |
+- if i.d_tag == DT_RPATH: |
63 |
++ if i.d_tag == entrynum: |
64 |
+ return sec.sh_offset + i.val |
65 |
+ return None |
66 |
+ |
67 |
+ def print_rpath(self): |
68 |
+- offset = self.get_rpath_offset() |
69 |
++ offset = self.get_entry_offset(DT_RPATH) |
70 |
+ if offset is None: |
71 |
+ print("This file does not have an rpath.") |
72 |
+ else: |
73 |
+ self.bf.seek(offset) |
74 |
+ print(self.read_str()) |
75 |
+ |
76 |
++ def print_runpath(self): |
77 |
++ offset = self.get_entry_offset(DT_RUNPATH) |
78 |
++ if offset is None: |
79 |
++ print("This file does not have a runpath.") |
80 |
++ else: |
81 |
++ self.bf.seek(offset) |
82 |
++ print(self.read_str()) |
83 |
++ |
84 |
+ def print_deps(self): |
85 |
+ sec = self.find_section(b'.dynstr') |
86 |
+ deps = [] |
87 |
+@@ -257,9 +266,15 @@ def fix_deps(self, prefix): |
88 |
+ self.bf.write(newname) |
89 |
+ |
90 |
+ def fix_rpath(self, new_rpath): |
91 |
++ # The path to search for can be either rpath or runpath. |
92 |
++ # Fix both of them to be sure. |
93 |
++ self.fix_rpathtype_entry(new_rpath, DT_RPATH) |
94 |
++ self.fix_rpathtype_entry(new_rpath, DT_RUNPATH) |
95 |
++ |
96 |
++ def fix_rpathtype_entry(self, new_rpath, entrynum): |
97 |
+ if isinstance(new_rpath, str): |
98 |
+ new_rpath = new_rpath.encode('utf8') |
99 |
+- rp_off = self.get_rpath_offset() |
100 |
++ rp_off = self.get_entry_offset(entrynum) |
101 |
+ if rp_off is None: |
102 |
+ if self.verbose: |
103 |
+ print('File does not have rpath. It should be a fully static executable.') |
104 |
+@@ -272,12 +287,12 @@ def fix_rpath(self, new_rpath): |
105 |
+ self.bf.write(new_rpath) |
106 |
+ self.bf.write(b'\0'*(len(old_rpath) - len(new_rpath) + 1)) |
107 |
+ if len(new_rpath) == 0: |
108 |
+- self.remove_rpath_entry() |
109 |
++ self.remove_rpath_entry(entrynum) |
110 |
+ |
111 |
+- def remove_rpath_entry(self): |
112 |
++ def remove_rpath_entry(self, entrynum): |
113 |
+ sec = self.find_section(b'.dynamic') |
114 |
+ for (i, entry) in enumerate(self.dynamic): |
115 |
+- if entry.d_tag == DT_RPATH: |
116 |
++ if entry.d_tag == entrynum: |
117 |
+ rpentry = self.dynamic[i] |
118 |
+ rpentry.d_tag = 0 |
119 |
+ self.dynamic = self.dynamic[:i] + self.dynamic[i+1:] + [rpentry] |
120 |
+@@ -296,6 +311,7 @@ def run(args): |
121 |
+ e = Elf(args[0]) |
122 |
+ if len(args) == 1: |
123 |
+ e.print_rpath() |
124 |
++ e.print_runpath() |
125 |
+ else: |
126 |
+ new_rpath = args[1] |
127 |
+ e.fix_rpath(new_rpath) |
128 |
|
129 |
diff --git a/dev-util/meson/meson-0.33.0.ebuild b/dev-util/meson/meson-0.33.0.ebuild |
130 |
new file mode 100644 |
131 |
index 0000000..56c2ab9 |
132 |
--- /dev/null |
133 |
+++ b/dev-util/meson/meson-0.33.0.ebuild |
134 |
@@ -0,0 +1,36 @@ |
135 |
+# Copyright 1999-2016 Gentoo Foundation |
136 |
+# Distributed under the terms of the GNU General Public License v2 |
137 |
+# $Id$ |
138 |
+ |
139 |
+EAPI=6 |
140 |
+PYTHON_COMPAT=( python3_{3,4,5} ) |
141 |
+ |
142 |
+inherit distutils-r1 |
143 |
+ |
144 |
+DESCRIPTION="Open source build system" |
145 |
+HOMEPAGE="http://mesonbuild.com/" |
146 |
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
147 |
+ |
148 |
+LICENSE="Apache-2.0" |
149 |
+SLOT="0" |
150 |
+KEYWORDS="~amd64 ~x86" |
151 |
+IUSE="" |
152 |
+ |
153 |
+DEPEND="${PYTHON_DEPS} |
154 |
+ dev-util/ninja |
155 |
+" |
156 |
+RDEPEND="${DEPEND}" |
157 |
+ |
158 |
+DOCS=( authors.txt contributing.txt ) |
159 |
+ |
160 |
+PATCHES=( |
161 |
+ # https://github.com/mesonbuild/meson/pull/663 |
162 |
+ "${FILESDIR}"/${P}-runpath.patch |
163 |
+) |
164 |
+ |
165 |
+src_install() { |
166 |
+ distutils-r1_src_install |
167 |
+ for i in mesonconf mesonintrospect meson wraptool; do |
168 |
+ dosym "${i}.py" "/usr/bin/${i}" |
169 |
+ done |
170 |
+} |
171 |
|
172 |
diff --git a/dev-util/meson/metadata.xml b/dev-util/meson/metadata.xml |
173 |
new file mode 100644 |
174 |
index 0000000..fb1ea72 |
175 |
--- /dev/null |
176 |
+++ b/dev-util/meson/metadata.xml |
177 |
@@ -0,0 +1,8 @@ |
178 |
+<?xml version="1.0" encoding="UTF-8"?> |
179 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
180 |
+<pkgmetadata> |
181 |
+<maintainer type="project"> |
182 |
+ <email>gstreamer@g.o</email> |
183 |
+ <name>GStreamer package maintainers</name> |
184 |
+</maintainer> |
185 |
+</pkgmetadata> |