/[gentoo-x86]/www-client/mozilla-firefox/mozilla-firefox-1.0.6-r6.ebuild
Gentoo

Contents of /www-client/mozilla-firefox/mozilla-firefox-1.0.6-r6.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Wed Nov 16 22:53:28 2005 UTC (15 years ago) by anarchy
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +1 -1 lines
FILE REMOVED
cleanup, rpath fix on 1.5rc2-r2
(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.0.6-r6.ebuild,v 1.4 2005/08/18 19:53:19 anarchy Exp $
4
5 unset ALLOWED_FLAGS # stupid extra-functions.sh ... bug 49179
6 inherit flag-o-matic toolchain-funcs eutils mozconfig mozilla-launcher makeedit multilib
7
8 DESCRIPTION="Firefox Web Browser"
9 HOMEPAGE="http://www.mozilla.org/projects/firefox/"
10 SRC_URI="http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${PV}/source/firefox-${PV}-source.tar.bz2
11 mirror://gentoo/mozilla-firefox-1.0-4ft2.patch.bz2
12 mirror://gentoo/mozilla-firefox-1.0.3-ia64.patch.bz2
13 mirror://gentoo/mozilla-jslibmath-alpha.patch
14 http://dev.gentoo.org/~agriffis/dist/mozilla-1.7.10-nsplugins-v2.patch
15 http://dev.gentoo.org/~anarchy/dist/embed-typeaheadfind.patch"
16
17 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~sparc ~x86"
18 SLOT="0"
19 LICENSE="MPL-1.1 NPL-1.1"
20 IUSE="gnome java mozdevelop mozsvg ssl"
21
22 # xrender.pc appeared for the first time in xorg-x11-6.7.0-r2
23 # and is required to build with support for cairo. #71504
24 RDEPEND="java? ( virtual/jre )
25 >=media-libs/libmng-1.0.0
26 mozsvg? (
27 !<=x11-base/xorg-x11-6.7.0-r2
28 x11-libs/cairo
29 )
30 >=www-client/mozilla-launcher-1.39"
31
32 DEPEND="${RDEPEND}
33 java? ( >=dev-java/java-config-0.2.0 )"
34
35 S=${WORKDIR}/mozilla
36
37 # Needed by src_compile() and src_install().
38 # Would do in pkg_setup but that loses the export attribute, they
39 # become pure shell variables.
40 export BUILD_OFFICIAL=1
41 export MOZILLA_OFFICIAL=1
42 export MOZ_PHOENIX=1
43
44 src_unpack() {
45 declare x
46
47 for x in ${A}; do
48 [[ $x == *.tar.* ]] || continue
49 unpack $x || die "unpack failed"
50 done
51 cd ${S} || die "cd failed"
52
53 ####################################
54 #
55 # architecture patches
56 #
57 ####################################
58
59 # alpha stubs patch from lfs project.
60 # <taviso@gentoo.org> (26 Jun 2003)
61 use alpha && epatch ${FILESDIR}/mozilla-1.3-alpha-stubs.patch
62
63 # hppa patches from Ivar <orskaug@stud.ntnu.no>
64 # <gmsoft@gentoo.org> (22 Dec 2004)
65 epatch ${FILESDIR}/mozilla-hppa.patch
66
67 # patch to solve segfaults on ia64, from Debian, originally from David
68 # Mosberger
69 epatch ${DISTDIR}/mozilla-firefox-1.0.3-ia64.patch.bz2
70
71 # patch to fix math operations on alpha, makes maps.google.com work!
72 epatch ${DISTDIR}/mozilla-jslibmath-alpha.patch
73
74 ####################################
75 #
76 # general compilation and run-time fixes
77 #
78 ####################################
79
80 # GCC4 compile fix, bug #87800
81 epatch ${FILESDIR}/${P}-gcc4.patch
82
83 # patch out ft caching code since the API changed between releases of
84 # freetype; this enables freetype-2.1.8+ compat.
85 # https://bugzilla.mozilla.org/show_bug.cgi?id=234035#c65
86 epatch ${DISTDIR}/mozilla-firefox-1.0-4ft2.patch.bz2
87
88 # Patch for newer versions of cairo #80301
89 if has_version '>=x11-libs/cairo-0.3.0'; then
90 epatch ${FILESDIR}/svg-cairo-0.3.0-fix.patch
91 fi
92
93 ####################################
94 #
95 # behavioral fixes
96 #
97 ####################################
98
99 # patch to fix separate character on euro keyboards, bug 68995
100 epatch ${FILESDIR}/mozilla-firefox-1.0-kp_separator.patch
101
102 # some patches from Debian to set default preferences:
103 # - inherit LANG from env
104 # - shut off SSLv2 and 40-bit ciphers by default
105 # - disable application auto-updating
106 epatch ${FILESDIR}/mozilla-firefox-1.0.3-prefs.patch
107
108 # look in /usr/lib/nsplugins for plugins, in addition to the usual places
109 epatch ${DISTDIR}/mozilla-1.7.10-nsplugins-v2.patch
110
111 # patch to fix crash in GtkPromptService::Prompt
112 # https://bugzilla.mozilla.org/show_bug.cgi?id=265599
113 epatch ${FILESDIR}/gtk-prompt-service.patch
114
115 # patch to make prompts window modal instead of application modal
116 # https://bugzilla.mozilla.org/show_bug.cgi?id=224454
117 epatch ${FILESDIR}/embedprompter-modal.patch
118
119 # patch to fix typeahead find for browsers which embed Firefox
120 # http://bugzilla.gnome.org/show_bug.cgi?id=157435
121 epatch ${DISTDIR}/embed-typeaheadfind.patch
122
123 # patch to make the interface requestor give out its nsIDOMWindow
124 # https://bugzilla.mozilla.org/show_bug.cgi?id=277587
125 epatch ${FILESDIR}/securebrowserui-iirq.patch
126
127 # patch to add border to tooltips
128 # https://bugzilla.mozilla.org/show_bug.cgi?id=238052
129 epatch ${FILESDIR}/gtk-tooltips.patch
130
131 #rpath patch
132 epatch ${FILESDIR}/mozilla-rpath-1.patch
133 }
134
135 src_compile() {
136 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
137
138 grep -Flr "#RPATH_FIXER" --include=*.mk . | xargs sed -i -e \
139 's|#RPATH_FIXER|'"${MOZILLA_FIVE_HOME}"'|'
140
141 ####################################
142 #
143 # mozconfig, CFLAGS and CXXFLAGS setup
144 #
145 ####################################
146
147 mozconfig_init
148
149 # Bug 60668: Galeon doesn't build without oji enabled, so enable it
150 # regardless of java setting.
151 mozconfig_annotate '' --enable-oji --enable-mathml --enable-extensions=typeaheadfind
152
153 # Other ff-specific settings
154 mozconfig_use_enable mozdevelop jsd
155 mozconfig_use_enable mozdevelop xpctools
156 mozconfig_use_extension mozdevelop venkman
157 mozconfig_use_enable gnome gnomevfs
158 mozconfig_use_extension gnome gnomevfs
159 mozconfig_use_enable mozsvg svg
160 mozconfig_use_enable mozsvg svg-renderer-cairo
161 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
162 #mozconfig_annotate '' --with-user-appdir=.firefox
163
164 # Finalize and report settings
165 mozconfig_final
166
167 # hardened GCC uses -fstack-protector-all by default, which breaks us
168 has_hardened && append-flags -fno-stack-protector-all
169 replace-flags -fstack-protector-all -fstack-protector
170
171 ####################################
172 #
173 # Configure and build
174 #
175 ####################################
176
177 CPPFLAGS="${CPPFLAGS} -DARON_WAS_HERE" \
178 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
179 econf || die
180
181 # It would be great if we could pass these in via CPPFLAGS or CFLAGS prior
182 # to econf, but the quotes cause configure to fail.
183 grep -Flre -DARON_WAS_HERE --exclude=config.\* . | xargs sed -i -e \
184 's|-DARON_WAS_HERE|-DGENTOO_NSPLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsplugins\\\" -DGENTOO_NSBROWSER_PLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsbrowser/plugins\\\"|'
185
186 # This removes extraneous CFLAGS from the Makefiles to reduce RAM
187 # requirements while compiling
188 edit_makefiles
189
190 emake || die
191 ####################################
192 #
193 # Build Mozilla NSS
194 #
195 ####################################
196
197 # Build the NSS/SSL support
198 if use ssl; then
199 einfo "Building Mozilla-Firefox NSS..."
200
201 # Fix #include problem
202 cd ${S}/security/coreconf || die "cd coreconf failed"
203 echo 'INCLUDES += -I$(DIST)/include/nspr -I$(DIST)/include/dbm'\
204 >>headers.mk
205 emake -j1 || die "make security headers failed"
206
207 cd ${S}/security/nss || die "cd nss failed"
208 emake -j1 moz_import || die "make moz_import failed"
209 emake -j1 || die "make nss failed"
210 fi
211
212 }
213
214 src_install() {
215 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
216
217 # Most of the installation happens here
218 dodir ${MOZILLA_FIVE_HOME}
219 cp -RL ${S}/dist/bin/* ${D}${MOZILLA_FIVE_HOME}
220
221 # Create directory structure to support portage-installed extensions.
222 # See update_chrome() in mozilla-launcher
223 keepdir ${MOZILLA_FIVE_HOME}/chrome.d
224 keepdir ${MOZILLA_FIVE_HOME}/extensions.d
225 cp ${D}${MOZILLA_FIVE_HOME}/chrome/installed-chrome.txt \
226 ${D}${MOZILLA_FIVE_HOME}/chrome.d/0_base-chrome.txt || die "failed to copy"
227
228 # Create /usr/bin/firefox
229 install_mozilla_launcher_stub firefox ${MOZILLA_FIVE_HOME}
230
231 # Install icon and .desktop for menu entry
232 insinto /usr/share/pixmaps
233 doins ${FILESDIR}/icon/firefox-icon.png
234
235 # Fix bug 54179: Install .desktop file into /usr/share/applications
236 # instead of /usr/share/gnome/apps/Internet (18 Jun 2004 agriffis)
237 insinto /usr/share/applications
238 doins ${FILESDIR}/icon/mozillafirefox.desktop
239
240 # Fix icons to look the same everywhere
241 insinto ${MOZILLA_FIVE_HOME}/icons
242 doins ${S}/build/package/rpm/SOURCES/mozicon16.xpm
243 doins ${S}/build/package/rpm/SOURCES/mozicon50.xpm
244
245 ####################################
246 #
247 # Install files necessary for applications to build against firefox
248 #
249 ####################################
250
251 einfo "Installing includes and idl files..."
252 dodir ${MOZILLA_FIVE_HOME}/include/idl /usr/include
253 cd ${S}/dist
254 cp -LfR include/* ${D}${MOZILLA_FIVE_HOME}/include || die "failed to copy"
255 cp -LfR idl/* ${D}${MOZILLA_FIVE_HOME}/include/idl || die "failed to copy"
256
257 # Install the NSS/SSL libs, headers and tools
258 if use ssl; then
259 einfo "Installing Mozilla-Firefox NSS..."
260 # Install the headers ('make install' do not work for headers ...)
261 insinto ${MOZILLA_FIVE_HOME}/include/nss
262 [ -d ${S}/dist/public/nss ] && doins ${S}/dist/public/nss/*.h
263 [ -d ${S}/dist/public/seccmd ] && doins ${S}/dist/public/seccmd/*.h
264 [ -d ${S}/dist/public/security ] && doins ${S}/dist/public/security/*.h
265 # These come with zlib ...
266 rm -f ${D}${MOZILLA_FIVE_HOME}/include/nss/{zconf.h,zlib.h}
267
268 cd ${S}/security/nss
269
270 mkdir -p ${WORKDIR}/nss/{bin,lib}
271 export SOURCE_BIN_DIR=${WORKDIR}/nss/bin
272 export SOURCE_LIB_DIR=${WORKDIR}/nss/lib
273
274 make install || die "make failed"
275 # Gets installed as symbolic links ...
276 # cp -Lf ${WORKDIR}/nss/bin/* ${D}/usr/bin
277 cp -Lf ${WORKDIR}/nss/lib/* ${D}${MOZILLA_FIVE_HOME} || die "failed to copy"
278
279 # Need to unset these incase we want to rebuild, else the build
280 # gets newked.
281 unset SOURCE_LIB_DIR
282 unset SOURCE_BIN_DIR
283 fi
284
285 # Dirty hack to get some applications using this header running
286 dosym ${MOZILLA_FIVE_HOME}/include/necko/nsIURI.h \
287 /usr/$(get_libdir)/${MOZILLA_FIVE_HOME##*/}/include/nsIURI.h
288
289 # Compatibility symlink so that applications can still build against firefox
290 # even though it has moved. To remove this symlink, grep -r MozillaFirefox
291 # /usr/portage and fix those ebuilds
292 dosym ${MOZILLA_FIVE_HOME##*/} ${MOZILLA_FIVE_HOME%/*}/MozillaFirefox
293
294 # Fix firefox-config and install it
295 sed -i -e "s|/usr/lib/firefox-${PV}|${MOZILLA_FIVE_HOME}|g
296 s|/usr/include/firefox-${PV}|${MOZILLA_FIVE_HOME}/include|g
297 s|\(echo -L.*\)\($\)|\1 -Wl,-R${MOZILLA_FIVE_HOME}\2|" \
298 ${S}/build/unix/firefox-config
299 exeinto ${MOZILLA_FIVE_HOME}
300 doexe ${S}/build/unix/firefox-config
301
302 # Fix pkgconfig files and install them
303 sed -i -e "s|-L/usr/lib/firefox-${PV}|-L\$\{libdir\}|" \
304 ${S}/build/unix/firefox-nspr.pc
305 insinto /usr/$(get_libdir)/pkgconfig
306 for x in ${S}/build/unix/*.pc; do
307 sed -i -e "s|^libdir=.*|libdir=${MOZILLA_FIVE_HOME}|
308 s|^includedir=.*|includedir=${MOZILLA_FIVE_HOME}/include|
309 s|\(^Libs: -L.*\)\($\)|\1 -Wl,-R\$\{libdir\}\2|" ${x}
310 doins ${x}
311 done
312
313 # Install docs
314 dodoc LEGAL LICENSE
315 }
316
317 pkg_postinst() {
318 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
319
320 # Update the component registry
321 MOZILLA_LIBDIR=${ROOT}${MOZILLA_FIVE_HOME} MOZILLA_LAUNCHER=firefox \
322 /usr/libexec/mozilla-launcher -register
323
324 # This should be called in the postinst and postrm of all the
325 # mozilla, mozilla-bin, firefox, firefox-bin, thunderbird and
326 # thunderbird-bin ebuilds.
327 update_mozilla_launcher_symlinks
328 }
329
330 pkg_postrm() {
331 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
332
333 # Update the component registry
334 MOZILLA_LIBDIR=${ROOT}${MOZILLA_FIVE_HOME} MOZILLA_LAUNCHER=firefox \
335 /usr/libexec/mozilla-launcher -register
336
337 update_mozilla_launcher_symlinks
338 }

  ViewVC Help
Powered by ViewVC 1.1.20