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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.9 - (show annotations) (download)
Wed Nov 16 22:53:28 2005 UTC (15 years ago) by anarchy
Branch: MAIN
CVS Tags: HEAD
Changes since 1.8: +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-r7.ebuild,v 1.8 2005/09/17 23:02:43 weeve 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 mozcalendar"
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 ###################################
132 #
133 # security fixes
134 #
135 ###################################
136 epatch ${FILESDIR}/${P}-GLSA105396.patch
137 }
138
139 src_compile() {
140 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
141
142 ####################################
143 #
144 # mozconfig, CFLAGS and CXXFLAGS setup
145 #
146 ####################################
147
148 mozconfig_init
149
150 # Bug 60668: Galeon doesn't build without oji enabled, so enable it
151 # regardless of java setting.
152 mozconfig_annotate '' --enable-oji --enable-mathml --enable-extensions=typeaheadfind
153
154 # Other ff-specific settings
155 mozconfig_use_enable mozdevelop jsd
156 mozconfig_use_enable mozdevelop xpctools
157 mozconfig_use_extension mozdevelop venkman
158 mozconfig_use_enable gnome gnomevfs
159 mozconfig_use_extension gnome gnomevfs
160 mozconfig_use_enable mozcalendar calendar
161 mozconfig_use_enable mozsvg svg
162 mozconfig_use_enable mozsvg svg-renderer-cairo
163 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
164 #mozconfig_annotate '' --with-user-appdir=.firefox
165
166 # Finalize and report settings
167 mozconfig_final
168
169 # hardened GCC uses -fstack-protector-all by default, which breaks us
170 has_hardened && append-flags -fno-stack-protector-all
171 replace-flags -fstack-protector-all -fstack-protector
172
173 ####################################
174 #
175 # Configure and build
176 #
177 ####################################
178
179 CPPFLAGS="${CPPFLAGS} -DARON_WAS_HERE" \
180 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
181 econf || die
182
183 # It would be great if we could pass these in via CPPFLAGS or CFLAGS prior
184 # to econf, but the quotes cause configure to fail.
185 grep -Flre -DARON_WAS_HERE --exclude=config.\* . | xargs sed -i -e \
186 's|-DARON_WAS_HERE|-DGENTOO_NSPLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsplugins\\\" -DGENTOO_NSBROWSER_PLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsbrowser/plugins\\\"|'
187
188 # This removes extraneous CFLAGS from the Makefiles to reduce RAM
189 # requirements while compiling
190 edit_makefiles
191
192 emake || die
193 }
194
195 src_install() {
196 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
197
198 # Most of the installation happens here
199 dodir ${MOZILLA_FIVE_HOME}
200 cp -RL ${S}/dist/bin/* ${D}${MOZILLA_FIVE_HOME} || die "Failed to Copy"
201
202 # Create directory structure to support portage-installed extensions.
203 # See update_chrome() in mozilla-launcher
204 keepdir ${MOZILLA_FIVE_HOME}/chrome.d
205 keepdir ${MOZILLA_FIVE_HOME}/extensions.d
206 cp ${D}${MOZILLA_FIVE_HOME}/chrome/installed-chrome.txt \
207 ${D}${MOZILLA_FIVE_HOME}/chrome.d/0_base-chrome.txt || die "Failed to Copy"
208
209 # Create /usr/bin/firefox
210 install_mozilla_launcher_stub firefox ${MOZILLA_FIVE_HOME}
211
212 # Install icon and .desktop for menu entry
213 insinto /usr/share/pixmaps
214 doins ${FILESDIR}/icon/firefox-icon.png
215
216 # Fix bug 54179: Install .desktop file into /usr/share/applications
217 # instead of /usr/share/gnome/apps/Internet (18 Jun 2004 agriffis)
218 insinto /usr/share/applications
219 doins ${FILESDIR}/icon/mozillafirefox.desktop
220
221 # Fix icons to look the same everywhere
222 insinto ${MOZILLA_FIVE_HOME}/icons
223 doins ${S}/build/package/rpm/SOURCES/mozicon16.xpm
224 doins ${S}/build/package/rpm/SOURCES/mozicon50.xpm
225
226 ####################################
227 #
228 # Install files necessary for applications to build against firefox
229 #
230 ####################################
231
232 einfo "Installing includes and idl files..."
233 dodir ${MOZILLA_FIVE_HOME}/include/idl /usr/include
234 cd ${S}/dist
235 cp -LfR include/* ${D}${MOZILLA_FIVE_HOME}/include || die "Failed to Copy"
236 cp -LfR idl/* ${D}${MOZILLA_FIVE_HOME}/include/idl || die "Failed to Copy"
237
238 # Dirty hack to get some applications using this header running
239 dosym ${MOZILLA_FIVE_HOME}/include/necko/nsIURI.h \
240 /usr/$(get_libdir)/${MOZILLA_FIVE_HOME##*/}/include/nsIURI.h
241
242 # Compatibility symlink so that applications can still build against firefox
243 # even though it has moved. To remove this symlink, grep -r MozillaFirefox
244 # /usr/portage and fix those ebuilds
245 dosym ${MOZILLA_FIVE_HOME##*/} ${MOZILLA_FIVE_HOME%/*}/MozillaFirefox
246
247 # Fix firefox-config and install it
248 sed -i -e "s|/usr/lib/firefox-${PV}|${MOZILLA_FIVE_HOME}|g
249 s|/usr/include/firefox-${PV}|${MOZILLA_FIVE_HOME}/include|g" \
250 ${S}/build/unix/firefox-config
251 exeinto ${MOZILLA_FIVE_HOME}
252 doexe ${S}/build/unix/firefox-config
253
254 # Fix pkgconfig files and install them
255 insinto /usr/$(get_libdir)/pkgconfig
256 for x in ${S}/build/unix/*.pc; do
257 sed -i -e "s|^libdir=.*|libdir=${MOZILLA_FIVE_HOME}|
258 s|^includedir=.*|includedir=${MOZILLA_FIVE_HOME}/include|" ${x}
259 doins ${x}
260 done
261
262 # Install env.d snippet, which isn't necessary for running firefox, but
263 # might be necessary for programs linked against firefox
264 insinto /etc/env.d
265 doins ${FILESDIR}/10MozillaFirefox
266 dosed "s|/usr/lib|/usr/$(get_libdir)|" /etc/env.d/10MozillaFirefox
267
268 # Install docs
269 dodoc LEGAL LICENSE
270 }
271
272 pkg_postinst() {
273 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
274
275 # Update the component registry
276 MOZILLA_LIBDIR=${ROOT}${MOZILLA_FIVE_HOME} MOZILLA_LAUNCHER=firefox \
277 /usr/libexec/mozilla-launcher -register
278
279 # This should be called in the postinst and postrm of all the
280 # mozilla, mozilla-bin, firefox, firefox-bin, thunderbird and
281 # thunderbird-bin ebuilds.
282 update_mozilla_launcher_symlinks
283 }
284
285 pkg_postrm() {
286 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
287
288 # Update the component registry
289 MOZILLA_LIBDIR=${ROOT}${MOZILLA_FIVE_HOME} MOZILLA_LAUNCHER=firefox \
290 /usr/libexec/mozilla-launcher -register
291
292 update_mozilla_launcher_symlinks
293 }

  ViewVC Help
Powered by ViewVC 1.1.20