1 |
commit: 950af8ba52a538a4fad80d8e6bc5b15b03a4ce85 |
2 |
Author: Harald Weiner <harald.weiner <AT> jku <DOT> at> |
3 |
AuthorDate: Wed Oct 28 18:14:40 2015 +0000 |
4 |
Commit: Justin Lecher <jlec <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Oct 28 18:14:40 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=950af8ba |
7 |
|
8 |
adjusted paths in config files for better replacement in the future |
9 |
|
10 |
dev-util/emscripten/emscripten-1.34.11.ebuild | 10 ++++++++-- |
11 |
dev-util/emscripten/files/99emscripten | 2 +- |
12 |
dev-util/emscripten/files/emscripten.config | 4 ++-- |
13 |
3 files changed, 11 insertions(+), 5 deletions(-) |
14 |
|
15 |
diff --git a/dev-util/emscripten/emscripten-1.34.11.ebuild b/dev-util/emscripten/emscripten-1.34.11.ebuild |
16 |
index 1ab9f7f..9488229 100644 |
17 |
--- a/dev-util/emscripten/emscripten-1.34.11.ebuild |
18 |
+++ b/dev-util/emscripten/emscripten-1.34.11.ebuild |
19 |
@@ -25,9 +25,15 @@ RDEPEND="${DEPEND}" |
20 |
DEST="/usr/share/" |
21 |
TEST="${WORKDIR}/test/" |
22 |
|
23 |
+prepare_file() { |
24 |
+ cp "${FILESDIR}/${1}" "${S}/" || die "could not copy '${1}'" |
25 |
+ sed -i "s/\${PV}/${PV}/g" "${S}/${1}" || \ |
26 |
+ die "could not adjust path for '${1}'" |
27 |
+} |
28 |
+ |
29 |
src_prepare() { |
30 |
- cp "${FILESDIR}/emscripten.config" "${S}/" || die "could not copy .config file" |
31 |
- cp "${FILESDIR}/99emscripten" "${S}/" || die "could not copy 99emscripten file" |
32 |
+ prepare_file "99emscripten" |
33 |
+ prepare_file "emscripten.config" |
34 |
} |
35 |
|
36 |
src_test() { |
37 |
|
38 |
diff --git a/dev-util/emscripten/files/99emscripten b/dev-util/emscripten/files/99emscripten |
39 |
index 5051089..b1acf2a 100644 |
40 |
--- a/dev-util/emscripten/files/99emscripten |
41 |
+++ b/dev-util/emscripten/files/99emscripten |
42 |
@@ -1 +1 @@ |
43 |
-EM_CONFIG=/usr/share/emscripten-1.34.11/emscripten.config |
44 |
+EM_CONFIG=/usr/share/emscripten-${PV}/emscripten.config |
45 |
|
46 |
diff --git a/dev-util/emscripten/files/emscripten.config b/dev-util/emscripten/files/emscripten.config |
47 |
index dc56c92..e8a4d7a 100644 |
48 |
--- a/dev-util/emscripten/files/emscripten.config |
49 |
+++ b/dev-util/emscripten/files/emscripten.config |
50 |
@@ -6,8 +6,8 @@ |
51 |
import os |
52 |
|
53 |
# this helps projects using emscripten find it |
54 |
-EMSCRIPTEN_ROOT = os.path.expanduser(os.getenv('EMSCRIPTEN') or '/usr/share/emscripten-1.34.11') # directory |
55 |
-LLVM_ROOT = os.path.expanduser(os.getenv('LLVM') or '/usr/share/emscripten-fastcomp-1.34.11/bin') # directory |
56 |
+EMSCRIPTEN_ROOT = os.path.expanduser(os.getenv('EMSCRIPTEN') or '/usr/share/emscripten-${PV}') # directory |
57 |
+LLVM_ROOT = os.path.expanduser(os.getenv('LLVM') or '/usr/share/emscripten-fastcomp-${PV}/bin') # directory |
58 |
|
59 |
# If not specified, defaults to sys.executable. |
60 |
#PYTHON = 'python' |