public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/sci:master commit in: dev-util/emscripten/, dev-util/emscripten/files/
@ 2015-10-29 13:45 Justin Lecher
  0 siblings, 0 replies; only message in thread
From: Justin Lecher @ 2015-10-29 13:45 UTC (permalink / raw
  To: gentoo-commits

commit:     950af8ba52a538a4fad80d8e6bc5b15b03a4ce85
Author:     Harald Weiner <harald.weiner <AT> jku <DOT> at>
AuthorDate: Wed Oct 28 18:14:40 2015 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Wed Oct 28 18:14:40 2015 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=950af8ba

adjusted paths in config files for better replacement in the future

 dev-util/emscripten/emscripten-1.34.11.ebuild | 10 ++++++++--
 dev-util/emscripten/files/99emscripten        |  2 +-
 dev-util/emscripten/files/emscripten.config   |  4 ++--
 3 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/dev-util/emscripten/emscripten-1.34.11.ebuild b/dev-util/emscripten/emscripten-1.34.11.ebuild
index 1ab9f7f..9488229 100644
--- a/dev-util/emscripten/emscripten-1.34.11.ebuild
+++ b/dev-util/emscripten/emscripten-1.34.11.ebuild
@@ -25,9 +25,15 @@ RDEPEND="${DEPEND}"
 DEST="/usr/share/"
 TEST="${WORKDIR}/test/"
 
+prepare_file() {
+	cp "${FILESDIR}/${1}" "${S}/" || die "could not copy '${1}'"
+	sed -i "s/\${PV}/${PV}/g" "${S}/${1}" || \
+		die "could not adjust path for '${1}'"
+}
+
 src_prepare() {
-	cp "${FILESDIR}/emscripten.config" "${S}/" || die "could not copy .config file"
-	cp "${FILESDIR}/99emscripten" "${S}/" || die "could not copy 99emscripten file"
+	prepare_file "99emscripten"
+	prepare_file "emscripten.config"
 }
 
 src_test() {

diff --git a/dev-util/emscripten/files/99emscripten b/dev-util/emscripten/files/99emscripten
index 5051089..b1acf2a 100644
--- a/dev-util/emscripten/files/99emscripten
+++ b/dev-util/emscripten/files/99emscripten
@@ -1 +1 @@
-EM_CONFIG=/usr/share/emscripten-1.34.11/emscripten.config
+EM_CONFIG=/usr/share/emscripten-${PV}/emscripten.config

diff --git a/dev-util/emscripten/files/emscripten.config b/dev-util/emscripten/files/emscripten.config
index dc56c92..e8a4d7a 100644
--- a/dev-util/emscripten/files/emscripten.config
+++ b/dev-util/emscripten/files/emscripten.config
@@ -6,8 +6,8 @@
 import os
 
 # this helps projects using emscripten find it
-EMSCRIPTEN_ROOT = os.path.expanduser(os.getenv('EMSCRIPTEN') or '/usr/share/emscripten-1.34.11') # directory
-LLVM_ROOT = os.path.expanduser(os.getenv('LLVM') or '/usr/share/emscripten-fastcomp-1.34.11/bin') # directory
+EMSCRIPTEN_ROOT = os.path.expanduser(os.getenv('EMSCRIPTEN') or '/usr/share/emscripten-${PV}') # directory
+LLVM_ROOT = os.path.expanduser(os.getenv('LLVM') or '/usr/share/emscripten-fastcomp-${PV}/bin') # directory
 
 # If not specified, defaults to sys.executable.
 #PYTHON = 'python'


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-10-29 13:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-29 13:45 [gentoo-commits] proj/sci:master commit in: dev-util/emscripten/, dev-util/emscripten/files/ Justin Lecher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox