Gentoo Archives: gentoo-commits

From: Ian Stakenvicius <axs@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/mozilla:crossdev commit in: eclass/, www-client/firefox/files/
Date: Wed, 23 Dec 2015 21:33:33
Message-Id: 1450906399.3087bd0a044d19d5fe6321bbca5ad57539867004.axs@gentoo
1 commit: 3087bd0a044d19d5fe6321bbca5ad57539867004
2 Author: Ian Stakenvicius <axs <AT> gentoo <DOT> org>
3 AuthorDate: Fri Nov 27 18:27:42 2015 +0000
4 Commit: Ian Stakenvicius <axs <AT> gentoo <DOT> org>
5 CommitDate: Wed Dec 23 21:33:19 2015 +0000
6 URL: https://gitweb.gentoo.org/proj/mozilla.git/commit/?id=3087bd0a
7
8 eclass reworking for cross-compile and other improvements
9
10 set --host only when cross-compiling, do not set --build
11
12 eclass/mozconfig-v6.38.eclass | 18 ++++++++-----
13 eclass/mozconfig-v6.42.eclass | 18 ++++++++-----
14 eclass/mozcoreconf-v3.eclass | 18 ++++++++++++-
15 www-client/firefox/files/nss.m4.pkg-config.patch | 33 ++++++++++++++++++++++++
16 4 files changed, 74 insertions(+), 13 deletions(-)
17
18 diff --git a/eclass/mozconfig-v6.38.eclass b/eclass/mozconfig-v6.38.eclass
19 index ecd4578..361c9e6 100644
20 --- a/eclass/mozconfig-v6.38.eclass
21 +++ b/eclass/mozconfig-v6.38.eclass
22 @@ -193,10 +193,10 @@ mozconfig_config() {
23 fi
24
25 # These are enabled by default in all mozilla applications
26 - mozconfig_annotate '' --with-system-nspr --with-nspr-prefix="${EPREFIX}"/usr
27 - mozconfig_annotate '' --with-system-nss --with-nss-prefix="${EPREFIX}"/usr
28 - mozconfig_annotate '' --x-includes="${EPREFIX}"/usr/include --x-libraries="${EPREFIX}"/usr/$(get_libdir)
29 - mozconfig_annotate '' --with-system-libevent="${EPREFIX}"/usr
30 + mozconfig_annotate '' --with-system-nspr --with-nspr-prefix="${SYSROOT}${EPREFIX}"/usr
31 + mozconfig_annotate '' --with-system-nss --with-nss-prefix="${SYSROOT}${EPREFIX}"/usr
32 + mozconfig_annotate '' --x-includes="${SYSROOT}${EPREFIX}"/usr/include --x-libraries="${SYSROOT}${EPREFIX}"/usr/$(get_libdir)
33 + mozconfig_annotate '' --with-system-libevent="${SYSROOT}${EPREFIX}"/usr
34 mozconfig_annotate '' --prefix="${EPREFIX}"/usr
35 mozconfig_annotate '' --libdir="${EPREFIX}"/usr/$(get_libdir)
36 mozconfig_annotate 'Gentoo default' --enable-system-hunspell
37 @@ -219,8 +219,14 @@ mozconfig_config() {
38 mozconfig_annotate '' --enable-replace-malloc
39 fi
40
41 - mozconfig_annotate '' --target="${CTARGET:-${CHOST}}"
42 - mozconfig_annotate '' --build="${CTARGET:-${CHOST}}"
43 + # Instead of the standard --build= and --host=, mozilla uses --host instead
44 + # of --build, and --target intstead of --host.
45 + # Note, mozilla also has --build but it does not do what you think it does.
46 + mozconfig_annotate '' --target="${CHOST}"
47 + if [[ "${CBUILD:-${CHOST}}" != "${CHOST}" ]]; then
48 + # set --host only when cross-compiling
49 + mozconfig_annotate '' --host="${CBUILD:-${CHOST}}"
50 + fi
51
52 if use gstreamer ; then
53 mozconfig_annotate '+gstreamer' --enable-gstreamer=1.0
54
55 diff --git a/eclass/mozconfig-v6.42.eclass b/eclass/mozconfig-v6.42.eclass
56 index 1feea38..40616c7 100644
57 --- a/eclass/mozconfig-v6.42.eclass
58 +++ b/eclass/mozconfig-v6.42.eclass
59 @@ -219,10 +219,10 @@ mozconfig_config() {
60 fi
61
62 # These are enabled by default in all mozilla applications
63 - mozconfig_annotate '' --with-system-nspr --with-nspr-prefix="${EPREFIX}"/usr
64 - mozconfig_annotate '' --with-system-nss --with-nss-prefix="${EPREFIX}"/usr
65 - mozconfig_annotate '' --x-includes="${EPREFIX}"/usr/include --x-libraries="${EPREFIX}"/usr/$(get_libdir)
66 - mozconfig_annotate '' --with-system-libevent="${EPREFIX}"/usr
67 + mozconfig_annotate '' --with-system-nspr --with-nspr-prefix="${SYSROOT}${EPREFIX}"/usr
68 + mozconfig_annotate '' --with-system-nss --with-nss-prefix="${SYSROOT}${EPREFIX}"/usr
69 + mozconfig_annotate '' --x-includes="${SYSROOT}${EPREFIX}"/usr/include --x-libraries="${SYSROOT}${EPREFIX}"/usr/$(get_libdir)
70 + mozconfig_annotate '' --with-system-libevent="${SYSROOT}${EPREFIX}"/usr
71 mozconfig_annotate '' --prefix="${EPREFIX}"/usr
72 mozconfig_annotate '' --libdir="${EPREFIX}"/usr/$(get_libdir)
73 mozconfig_annotate 'Gentoo default' --enable-system-hunspell
74 @@ -245,8 +245,14 @@ mozconfig_config() {
75 mozconfig_annotate '' --enable-replace-malloc
76 fi
77
78 - mozconfig_annotate '' --target="${CTARGET:-${CHOST}}"
79 - mozconfig_annotate '' --build="${CTARGET:-${CHOST}}"
80 + # Instead of the standard --build= and --host=, mozilla uses --host instead
81 + # of --build, and --target intstead of --host.
82 + # Note, mozilla also has --build but it does not do what you think it does.
83 + mozconfig_annotate '' --target="${CHOST}"
84 + if [[ "${CBUILD:-${CHOST}}" != "${CHOST}" ]]; then
85 + # set --host only when cross-compiling
86 + mozconfig_annotate '' --host="${CBUILD:-${CHOST}}"
87 + fi
88
89 if use gstreamer ; then
90 mozconfig_annotate '+gstreamer' --enable-gstreamer=1.0
91
92 diff --git a/eclass/mozcoreconf-v3.eclass b/eclass/mozcoreconf-v3.eclass
93 index 9588ce2..e933db3 100644
94 --- a/eclass/mozcoreconf-v3.eclass
95 +++ b/eclass/mozcoreconf-v3.eclass
96 @@ -10,12 +10,17 @@
97 #
98 # inherit mozconfig-v5.* or above for mozilla configuration support
99
100 +# @ECLASS-VARIABLE: MOZILLA_FIVE_HOME
101 +# @DESCCRIPTION:
102 +# This is an eclass-generated variable that defines the rpath that the mozilla
103 +# product will be installed in. Read-only
104 +
105 if [[ ! ${_MOZCORECONF_V3} ]]; then
106
107 PYTHON_COMPAT=( python2_7 )
108 PYTHON_REQ_USE='threads,sqlite'
109
110 -inherit multilib flag-o-matic python-any-r1 versionator
111 +inherit multilib toolchain-funcs flag-o-matic python-any-r1 versionator
112
113 IUSE="${IUSE} custom-cflags custom-optimization"
114
115 @@ -80,6 +85,9 @@ moz_pkgsetup() {
116 export LC_MESSAGES="C"
117 export LC_CTYPE="C"
118
119 + # Ensure we use correct toolchain
120 + tc-export CC CXX LD PKG_CONFIG
121 +
122 # Ensure that we have a sane build enviroment
123 export MOZILLA_CLIENT=1
124 export BUILD_OPT=1
125 @@ -89,6 +97,9 @@ moz_pkgsetup() {
126 # ensure MOZCONFIG is not defined
127 eval unset MOZCONFIG
128
129 + # set MOZILLA_FIVE_HOME
130 + export MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
131 +
132 # nested configure scripts in mozilla products generate unrecognized options
133 # false positives when toplevel configure passes downwards.
134 export QA_CONFIGURE_OPTIONS=".*"
135 @@ -196,6 +207,11 @@ mozconfig_init() {
136 # Go a little faster; use less RAM
137 append-flags "$MAKEEDIT_FLAGS"
138
139 + # Use the MOZILLA_FIVE_HOME for the rpath
140 + append-ldflags -Wl,-rpath="${MOZILLA_FIVE_HOME}"
141 + # Set MOZILLA_FIVE_HOME in mozconfig
142 + mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
143 +
144 ####################################
145 #
146 # mozconfig setup
147
148 diff --git a/www-client/firefox/files/nss.m4.pkg-config.patch b/www-client/firefox/files/nss.m4.pkg-config.patch
149 new file mode 100644
150 index 0000000..e3ac8f8
151 --- /dev/null
152 +++ b/www-client/firefox/files/nss.m4.pkg-config.patch
153 @@ -0,0 +1,33 @@
154 +--- a/build/autoconf/nss.m4 2015-11-20 15:37:26.951993242 -0500
155 ++++ b/build/autoconf/nss.m4 2015-11-20 15:37:19.431992752 -0500
156 +@@ -8,6 +8,8 @@
157 + AC_DEFUN([AM_PATH_NSS],
158 + [dnl
159 +
160 ++PKG_CHECK_MODULES([NSS],[nss >= $1],[ifelse([$2], , :, [$2])],[
161 ++
162 + AC_ARG_WITH(nss-prefix,
163 + [ --with-nss-prefix=PFX Prefix where NSS is installed],
164 + nss_config_prefix="$withval",
165 +@@ -84,8 +86,9 @@
166 + ifelse([$3], , :, [$3])
167 + fi
168 +
169 ++ ])
170 +
171 +- AC_SUBST(NSS_CFLAGS)
172 ++ AC_SUBST_LIST(NSS_CFLAGS)
173 + AC_SUBST_LIST(NSS_LIBS)
174 +
175 + ])
176 +--- a/configure.in 2015-11-20 15:40:57.401762087 -0500
177 ++++ b/configure.in 2015-11-20 15:50:10.080854755 -0500
178 +@@ -8775,7 +8775,7 @@
179 + AC_SUBST(NSPR_CFLAGS)
180 + AC_SUBST(MOZ_NATIVE_NSPR)
181 +
182 +-AC_SUBST(NSS_CFLAGS)
183 ++AC_SUBST_LIST(NSS_CFLAGS)
184 + AC_SUBST(MOZ_NATIVE_NSS)
185 + AC_SUBST(NSS_DISABLE_DBM)
186 +