1 |
commit: 8fb65064d8753d73a0d03fb1ab53ff38bf86349b |
2 |
Author: Ian Stakenvicius <axs <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Feb 28 19:48:25 2017 +0000 |
4 |
Commit: Ian Stakenvicius <axs <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Feb 28 20:41:58 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8fb65064 |
7 |
|
8 |
dev-lang/spidermonkey:45 - fix symlink installs via patch instead of sed |
9 |
|
10 |
Found a patch to the build system which forces copies rather than symlinks |
11 |
to all non-objfiles (meaning headers), to address the symlink installation |
12 |
issue. Also applied the sed patch for icu.m4 for esr45 |
13 |
|
14 |
Package-Manager: portage-2.3.3 |
15 |
|
16 |
.../files/mozilla_configure_regexp_esr.patch | 32 ++++++++++++++++++++++ |
17 |
...spidermonkey-45-dont-symlink-non-objfiles.patch | 21 ++++++++++++++ |
18 |
dev-lang/spidermonkey/spidermonkey-45.0.2.ebuild | 10 ++----- |
19 |
3 files changed, 56 insertions(+), 7 deletions(-) |
20 |
|
21 |
diff --git a/dev-lang/spidermonkey/files/mozilla_configure_regexp_esr.patch b/dev-lang/spidermonkey/files/mozilla_configure_regexp_esr.patch |
22 |
new file mode 100644 |
23 |
index 00000000000..9e165ff9e88 |
24 |
--- /dev/null |
25 |
+++ b/dev-lang/spidermonkey/files/mozilla_configure_regexp_esr.patch |
26 |
@@ -0,0 +1,32 @@ |
27 |
+From: Jory A. Pratt <anarchy@g.o> |
28 |
+ |
29 |
+Note: the first occurrence of :space: is [:space:] (with a single pair |
30 |
+of []), where it should be [[:space:]] (with two pairs of []). |
31 |
+ |
32 |
+This causes the sed command to fail (with the error message quoted in |
33 |
+my original report), driving to failure the whole configure step. |
34 |
+ |
35 |
+https://bugzilla.mozilla.org/show_bug.cgi?id=1329252 |
36 |
+ |
37 |
+diff --git a/build/autoconf/icu.m4 b/build/autoconf/icu.m4 |
38 |
+--- a/build/autoconf/icu.m4 |
39 |
++++ b/build/autoconf/icu.m4 |
40 |
+@@ -68,17 +68,17 @@ if test -n "$USE_ICU"; then |
41 |
+ icudir="$_topsrcdir/intl/icu/source" |
42 |
+ if test ! -d "$icudir"; then |
43 |
+ icudir="$_topsrcdir/../../intl/icu/source" |
44 |
+ if test ! -d "$icudir"; then |
45 |
+ AC_MSG_ERROR([Cannot find the ICU directory]) |
46 |
+ fi |
47 |
+ fi |
48 |
+ |
49 |
+- version=`sed -n 's/^[[:space:]]*#[[:space:]]*define[[:space:]][[:space:]]*U_ICU_VERSION_MAJOR_NUM[[:space:]][[:space:]]*\([0-9][0-9]*\)[[:space:]]*$/\1/p' "$icudir/common/unicode/uvernum.h"` |
50 |
++ version=`sed -n 's/^[[[:space:]]]*#[[:space:]]*define[[:space:]][[:space:]]*U_ICU_VERSION_MAJOR_NUM[[:space:]][[:space:]]*\([0-9][0-9]*\)[[:space:]]*$/\1/p' "$icudir/common/unicode/uvernum.h"` |
51 |
+ if test x"$version" = x; then |
52 |
+ AC_MSG_ERROR([cannot determine icu version number from uvernum.h header file $lineno]) |
53 |
+ fi |
54 |
+ MOZ_ICU_VERSION="$version" |
55 |
+ |
56 |
+ if test "$OS_TARGET" = WINNT; then |
57 |
+ MOZ_SHARED_ICU=1 |
58 |
+ fi |
59 |
|
60 |
diff --git a/dev-lang/spidermonkey/files/spidermonkey-45-dont-symlink-non-objfiles.patch b/dev-lang/spidermonkey/files/spidermonkey-45-dont-symlink-non-objfiles.patch |
61 |
new file mode 100644 |
62 |
index 00000000000..061e8a572db |
63 |
--- /dev/null |
64 |
+++ b/dev-lang/spidermonkey/files/spidermonkey-45-dont-symlink-non-objfiles.patch |
65 |
@@ -0,0 +1,21 @@ |
66 |
+--- a/python/mozbuild/mozbuild/backend/recursivemake.py 2016-04-14 13:55:21.000000000 -0400 |
67 |
++++ b/python/mozbuild/mozbuild/backend/recursivemake.py 2017-02-28 14:43:09.431448016 -0500 |
68 |
+@@ -1301,17 +1301,17 @@ |
69 |
+ |
70 |
+ for path, files in files.walk(): |
71 |
+ target_var = (mozpath.join(target, path) |
72 |
+ if path else target).replace('/', '_') |
73 |
+ have_objdir_files = False |
74 |
+ for f in files: |
75 |
+ if not isinstance(f, ObjDirPath): |
76 |
+ dest = mozpath.join(reltarget, path, mozpath.basename(f)) |
77 |
+- install_manifest.add_symlink(f.full_path, dest) |
78 |
++ install_manifest.add_copy(f.full_path, dest) |
79 |
+ else: |
80 |
+ backend_file.write('%s_FILES += %s\n' % ( |
81 |
+ target_var, self._pretty_path(f, backend_file))) |
82 |
+ have_objdir_files = True |
83 |
+ if have_objdir_files: |
84 |
+ backend_file.write('%s_DEST := $(DEPTH)/%s\n' |
85 |
+ % (target_var, |
86 |
+ mozpath.join(target, path))) |
87 |
|
88 |
diff --git a/dev-lang/spidermonkey/spidermonkey-45.0.2.ebuild b/dev-lang/spidermonkey/spidermonkey-45.0.2.ebuild |
89 |
index b697709ce00..addd5d92d01 100644 |
90 |
--- a/dev-lang/spidermonkey/spidermonkey-45.0.2.ebuild |
91 |
+++ b/dev-lang/spidermonkey/spidermonkey-45.0.2.ebuild |
92 |
@@ -37,7 +37,9 @@ pkg_setup(){ |
93 |
src_prepare() { |
94 |
eapply "${FILESDIR}"/${PN}-38-jsapi-tests.patch \ |
95 |
"${FILESDIR}"/mozjs45-1266366.patch \ |
96 |
- "${FILESDIR}"/mozjs38-pkg-config-version.patch |
97 |
+ "${FILESDIR}"/mozjs38-pkg-config-version.patch \ |
98 |
+ "${FILESDIR}"/mozilla_configure_regexp_esr.patch \ |
99 |
+ "${FILESDIR}"/${PN}-${SLOT}-dont-symlink-non-objfiles.patch |
100 |
|
101 |
# apply relevant (modified) patches from gentoo's firefox-45 patchset |
102 |
eapply "${FILESDIR}"/ff45 |
103 |
@@ -71,12 +73,6 @@ src_configure() { |
104 |
$(use_enable jit ion) \ |
105 |
$(use_enable static-libs static) \ |
106 |
$(use_enable test tests) |
107 |
- |
108 |
- # An unfortunate hack to undo header install symlinking, but |
109 |
- # necessary until the function that generates this file can be |
110 |
- # determined and fixed |
111 |
- sed -i -e 's/^1/2/' \ |
112 |
- "${BUILDDIR}"/_build_manifests/install/dist_include || die |
113 |
} |
114 |
|
115 |
cross_make() { |