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

Contents of /www-client/mozilla-firefox/mozilla-firefox-1.0.7.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Mon Sep 26 22:09:57 2005 UTC (15 years, 2 months ago) by azarah
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
Remove broken versions.
(Portage version: 2.0.52-r1)

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

  ViewVC Help
Powered by ViewVC 1.1.20