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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.20