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

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

  ViewVC Help
Powered by ViewVC 1.1.20