/[gentoo-x86]/www-client/mozilla-firefox/mozilla-firefox-1.5_beta2-r1.ebuild
Gentoo

Contents of /www-client/mozilla-firefox/mozilla-firefox-1.5_beta2-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Thu Nov 3 03:24:51 2005 UTC (15 years ago) by anarchy
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
1.5rc1 added - read changelog
(Portage version: 2.0.53_rc7)

1 # Copyright 1999-2005 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/www-client/mozilla-firefox/mozilla-firefox-1.5_beta2-r1.ebuild,v 1.3 2005/11/02 18:02:53 anarchy Exp $
4
5 unset ALLOWED_FLAGS # stupid extra-functions.sh ... bug 49179
6 MOZ_FREETYPE2="no" # Need to disable for newer .. remove here and in mozconfig
7 # when older is removed from tree.
8 MOZ_PANGO="yes" # Need to enable for newer .. remove here and in mozconfig
9 # when older is removed from tree.
10
11 inherit flag-o-matic toolchain-funcs eutils mozconfig mozilla-launcher makeedit multilib fdo-mime versionator
12
13 MY_P="$(replace_version_separator 2 '')"
14 FV=${MY_P/beta/b}
15
16 DESCRIPTION="Firefox Web Browser"
17 HOMEPAGE="http://www.mozilla.org/projects/firefox/"
18 SRC_URI="http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${FV}/source/firefox-${FV}-source.tar.bz2
19 mirror://gentoo/mozilla-jslibmath-alpha.patch
20 mirror://gentoo/embed-typeaheadfind.patch"
21
22 KEYWORDS="-*"
23 SLOT="0"
24 LICENSE="MPL-1.1 NPL-1.1"
25 IUSE="java mozdevelop"
26
27 RDEPEND="java? ( virtual/jre )
28 >=www-client/mozilla-launcher-1.39"
29
30 DEPEND="${RDEPEND}
31 java? ( >=dev-java/java-config-0.2.0 )"
32
33 S=${WORKDIR}/mozilla
34
35 # Needed by src_compile() and src_install().
36 # Would do in pkg_setup but that loses the export attribute, they
37 # become pure shell variables.
38 export MOZ_CO_PROJECT=browser
39 export BUILD_OFFICIAL=1
40 export MOZILLA_OFFICIAL=1
41
42 src_unpack() {
43 unpack firefox-${FV}-source.tar.bz2
44 cd ${S} || die "cd failed"
45
46 ####################################
47 #
48 # architecture patches
49 #
50 ####################################
51
52 # alpha stubs patch from lfs project.
53 # <taviso@gentoo.org> (26 Jun 2003)
54 use alpha && epatch ${FILESDIR}/1.5/mozilla-1.3-alpha-stubs.patch
55
56 # amd64 visibility patch
57 if [[ ${ARCH} == amd64 ]] && [[ $(gcc-major-version) -eq 3 ]]; then
58 epatch ${FILESDIR}/1.5/firefox-visibility.patch
59 fi
60
61 # hppa patches from Ivar <orskaug@stud.ntnu.no>
62 # <gmsoft@gentoo.org> (22 Dec 2004)
63 epatch ${FILESDIR}/1.5/mozilla-hppa.patch
64
65 # patch to solve segfaults on ia64, from Debian, originally from David
66 # Mosberger
67 epatch ${FILESDIR}/1.5/mozilla-firefox-1.1a2-ia64.patch
68
69 # patch to fix math operations on alpha, makes maps.google.com work!
70 epatch ${DISTDIR}/mozilla-jslibmath-alpha.patch
71
72 ####################################
73 #
74 # general compilation and run-time fixes
75 #
76 ####################################
77
78 # patch from fedora to remove the pangoxft things
79 epatch ${FILESDIR}/1.5/firefox-nopangoxft.patch
80 #cairo-canvas patch
81 epatch ${FILESDIR}/1.5/firefox-cairo-canvas.patch
82
83 ####################################
84 #
85 # behavioral fixes
86 #
87 ####################################
88
89 # patch to fix typeahead find for browsers which embed Firefox
90 # http://bugzilla.gnome.org/show_bug.cgi?id=157435
91 epatch ${DISTDIR}/embed-typeaheadfind.patch
92
93 # Fix scripts that call for /usr/local/bin/perl #51916
94 ebegin "Patching smime to call perl from /usr/bin"
95 sed -i -e '1s,usr/local/bin,usr/bin,' ${S}/security/nss/cmd/smimetools/smime
96 eend $? || die "sed failed"
97 }
98
99 src_compile() {
100 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
101
102 ####################################
103 #
104 # mozconfig, CFLAGS and CXXFLAGS setup
105 #
106 ####################################
107
108 mozconfig_init
109
110 mozconfig_annotate '' --enable-extensions=default,typeaheadfind
111 mozconfig_annotate '' --disable-mailnews
112 #mozconfig_annotate '' --enable-native-uconv
113 mozconfig_annotate '' --enable-image-encoder=all
114
115 # Bug 60668: Galeon doesn't build without oji enabled, so enable it
116 # regardless of java setting.
117 mozconfig_annotate '' --enable-oji --enable-mathml
118
119 # Other ff-specific settings
120 mozconfig_use_enable mozdevelop jsd
121 mozconfig_use_enable mozdevelop xpctools
122 mozconfig_use_extension mozdevelop venkman
123 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
124
125 # Finalize and report settings
126 mozconfig_final
127
128 # hardened GCC uses -fstack-protector-all by default, which breaks us
129 has_hardened && append-flags -fno-stack-protector-all
130 # remove -fstack-protector because now it borks firefox
131 CFLAGS=${CFLAGS/-fstack-protector-all/}
132 CFLAGS=${CFLAGS/-fstack-protector/}
133 CXXFLAGS=${CXXFLAGS/-fstack-protector-all/}
134 CXXFLAGS=${CXXFLAGS/-fstack-protector/}
135
136 ####################################
137 #
138 # Configure and build
139 #
140 ####################################
141
142 CPPFLAGS="${CPPFLAGS} -DARON_WAS_HERE" \
143 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
144 econf || die
145
146 # It would be great if we could pass these in via CPPFLAGS or CFLAGS prior
147 # to econf, but the quotes cause configure to fail.
148 sed -i -e \
149 's|-DARON_WAS_HERE|-DGENTOO_NSPLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsplugins\\\" -DGENTOO_NSBROWSER_PLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsbrowser/plugins\\\"|' \
150 ${S}/config/autoconf.mk \
151 ${S}/nsprpub/config/autoconf.mk \
152 ${S}/xpfe/global/buildconfig.html
153
154 # Fixup the RPATH
155 sed -i -e \
156 's|#RPATH_FIXER|'"${MOZILLA_FIVE_HOME}"'|' \
157 ${S}/config/rules.mk \
158 ${S}/nsprpub/config/rules.mk \
159 ${S}/security/coreconf/rules.mk \
160 ${S}/security/coreconf/rules.mk
161
162 # This removes extraneous CFLAGS from the Makefiles to reduce RAM
163 # requirements while compiling
164 edit_makefiles
165
166 emake || die
167 }
168
169 src_install() {
170 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
171
172 # Most of the installation happens here
173 dodir ${MOZILLA_FIVE_HOME}
174 cp -RL ${S}/dist/bin/* ${D}${MOZILLA_FIVE_HOME}
175
176 # Create directory structure to support portage-installed extensions.
177 # See update_chrome() in mozilla-launcher
178 keepdir ${MOZILLA_FIVE_HOME}/chrome.d
179 keepdir ${MOZILLA_FIVE_HOME}/extensions.d
180 cp ${D}${MOZILLA_FIVE_HOME}/chrome/installed-chrome.txt \
181 ${D}${MOZILLA_FIVE_HOME}/chrome.d/0_base-chrome.txt
182
183 # Create /usr/bin/firefox
184 install_mozilla_launcher_stub firefox ${MOZILLA_FIVE_HOME}
185
186 # Install icon and .desktop for menu entry
187 insinto /usr/share/pixmaps
188 doins ${FILESDIR}/icon/firefox-icon.png
189
190 # Fix bug 54179: Install .desktop file into /usr/share/applications
191 # instead of /usr/share/gnome/apps/Internet (18 Jun 2004 agriffis)
192 insinto /usr/share/applications
193 doins ${FILESDIR}/icon/mozillafirefox.desktop
194
195 ####################################
196 #
197 # Install files necessary for applications to build against firefox
198 #
199 ####################################
200
201 einfo "Installing includes and idl files..."
202 dodir ${MOZILLA_FIVE_HOME}/idl ${MOZILLA_FIVE_HOME}/include
203 cd ${S}/dist
204 cp -LfR include/* ${D}${MOZILLA_FIVE_HOME}/include || die "failed to copy"
205 cp -LfR idl/* ${D}${MOZILLA_FIVE_HOME}/idl || die "failed to copy"
206
207 # Dirty hack to get some applications using this header running
208 dosym ${MOZILLA_FIVE_HOME}/include/necko/nsIURI.h \
209 /usr/$(get_libdir)/${MOZILLA_FIVE_HOME##*/}/include/nsIURI.h
210
211 # Fix firefox-config and install it
212 sed -i -e "s|/usr/lib/firefox-${MY_PV}|${MOZILLA_FIVE_HOME}|g
213 s|/usr/include/firefox-${MY_PV}|${MOZILLA_FIVE_HOME}/include|g
214 s|/usr/share/idl/firefox-${MY_PV}|${MOZILLA_FIVE_HOME}/idl|g
215 s|\(echo -L.*\)\($\)|\1 -Wl,-R${MOZILLA_FIVE_HOME}\2|" \
216 ${S}/build/unix/firefox-config
217 exeinto ${MOZILLA_FIVE_HOME}
218 doexe ${S}/build/unix/firefox-config
219
220 # Fix pkgconfig files and install them
221 sed -i -e "s|-L/usr/lib/firefox-${MY_PV}|-L\$\{libdir\}|
222 s|-I/usr/include/firefox-${MY_PV}|-I\$\{includedir\}|" \
223 ${S}/build/unix/firefox-nspr.pc
224 insinto /usr/$(get_libdir)/pkgconfig
225 for x in ${S}/build/unix/*.pc; do
226 sed -i -e "s|^libdir=.*|libdir=${MOZILLA_FIVE_HOME}|
227 s|^includedir=.*|includedir=${MOZILLA_FIVE_HOME}/include|
228 s|^idldir=.*|idldir=${MOZILLA_FIVE_HOME}/idl|
229 s|\(^Libs: -L.*\)\($\)|\1 -Wl,-R\$\{libdir\}\2|" ${x}
230 doins ${x}
231 done
232
233 ####################################
234 #
235 # Some preferences, probably gentoo.org as start-page also
236 #
237 ####################################
238
239 dodir ${D}/${MOZILLA_FIVE_HOME}/greprefs
240 cp ${FILESDIR}/gentoo-default-prefs.js ${D}/${MOZILLA_FIVE_HOME}/greprefs/all-gentoo.js
241 dodir ${D}/${MOZILLA_FIVE_HOME}/defaults/pref
242 cp ${FILESDIR}/gentoo-default-prefs.js ${D}/${MOZILLA_FIVE_HOME}/defaults/pref/all-gentoo.js
243
244 # Install docs
245 dodoc LEGAL LICENSE
246 }
247
248 pkg_postinst() {
249 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
250
251 ####################################
252 #
253 # The registration is done here,
254 # mozilla-launcher do not do it correctly for now
255 #
256 ####################################
257
258 touch ${MOZILLA_FIVE_HOME}/components/compreg.dat
259 touch ${MOZILLA_FIVE_HOME}/components/xpti.dat
260 [ -x ${MOZILLA_FIVE_HOME}/firefox ] && ${MOZILLA_FIVE_HOME}/firefox -register
261 [ -x ${MOZILLA_FIVE_HOME}/regxpcom ] && ${MOZILLA_FIVE_HOME}/regxpcom
262
263 # This should be called in the postinst and postrm of all the
264 # mozilla, mozilla-bin, firefox, firefox-bin, thunderbird and
265 # thunderbird-bin ebuilds.
266 update_mozilla_launcher_symlinks
267 }
268
269 pkg_postrm() {
270 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
271
272 ####################################
273 #
274 # The registration is done here,
275 # mozilla-launcher do not do it correctly for now
276 #
277 ####################################
278
279 [ -x ${MOZILLA_FIVE_HOME}/firefox ] && ${MOZILLA_FIVE_HOME}/firefox -register
280 [ -x ${MOZILLA_FIVE_HOME}/regxpcom ] && ${MOZILLA_FIVE_HOME}/regxpcom
281 update_mozilla_launcher_symlinks
282 }

  ViewVC Help
Powered by ViewVC 1.1.20