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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Thu Jul 21 22:19:43 2005 UTC (15 years, 4 months ago) by agriffis
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Stop using the nsplugins eclass in favor of the nsplugins patch which adds
additional plugin search paths. The plugin symlink madness stops here.

Move firefox to /usr/lib/mozilla-firefox just as thunderbird has moved to
/usr/lib/mozilla-thunderbird (instead of MozillaFirefox and
MozillaThunderbird respectively)

Use new mozilla-launcher registration code instead of the drop-in tarball.
This should allow us to eventually package up extensions as ebuilds ;-)
(Portage version: 2.0.51.22-r2)

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.ebuild,v 1.1 2005/07/20 03:50:05 anarchy Exp $
4
5 inherit makeedit flag-o-matic nsplugins eutils mozconfig mozilla-launcher multilib
6
7 S=${WORKDIR}/mozilla
8
9 DESCRIPTION="The Mozilla Firefox Web Browser"
10 HOMEPAGE="http://www.mozilla.org/projects/firefox/"
11 MY_PV=${PV/_rc/rc}
12 SRC_URI="http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${MY_PV}/source/firefox-${MY_PV}-source.tar.bz2
13 mirror://gentoo/mozilla-firefox-1.0-4ft2.patch.bz2
14 mirror://gentoo/mozilla-firefox-1.0.3-ia64.patch.bz2
15 mirror://gentoo/mozilla-jslibmath-alpha.patch
16 http://dev.gentoo.org/~agriffis/dist/mozilla-firefox-1.0.3-ia64.patch.bz2
17 http://dev.gentoo.org/~agriffis/dist/mozilla-jslibmath-alpha.patch
18 http://dev.gentoo.org/~agriffis/dist/mozilla-firefox-1.0-4ft2.patch.bz2"
19
20 LICENSE="MPL-1.1 NPL-1.1"
21 SLOT="0"
22 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~sparc ~x86"
23 IUSE="gnome java mozdevelop mozsvg mozcalendar"
24
25 # xrender.pc appeared for the first time in xorg-x11-6.7.0-r2
26 # and is required to build with support for cairo. #71504
27 RDEPEND="java? ( virtual/jre )
28 >=media-libs/libmng-1.0.0
29 mozsvg? (
30 >=x11-base/xorg-x11-6.7.0-r2
31 x11-libs/cairo
32 )
33 >=www-client/mozilla-launcher-1.35"
34
35 DEPEND="${RDEPEND}
36 java? ( >=dev-java/java-config-0.2.0 )"
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 MOZ_PHOENIX=1
42
43 src_unpack() {
44 unpack firefox-${MY_PV}-source.tar.bz2 || die "unpack failed"
45 cd ${S} || die "cd failed"
46
47 # alpha stubs patch from lfs project.
48 # <taviso@gentoo.org> (26 Jun 2003)
49 use alpha && epatch ${FILESDIR}/mozilla-1.3-alpha-stubs.patch
50
51 # hppa patches from Ivar <orskaug@stud.ntnu.no>
52 # <gmsoft@gentoo.org> (22 Dec 2004)
53 epatch ${FILESDIR}/mozilla-hppa.patch
54
55 # patch out ft caching code since the API changed between releases of
56 # freetype; this enables freetype-2.1.8+ compat.
57 # https://bugzilla.mozilla.org/show_bug.cgi?id=234035#c65
58 epatch ${DISTDIR}/mozilla-firefox-1.0-4ft2.patch.bz2
59
60 # patch to fix separate character on euro keyboards, bug 68995
61 epatch ${FILESDIR}/mozilla-firefox-1.0-kp_separator.patch
62
63 # some patches from Debian to set default preferences:
64 # - inherit LANG from env
65 # - shut off SSLv2 and 40-bit ciphers by default
66 # - disable application auto-updating
67 epatch ${FILESDIR}/mozilla-firefox-1.0.3-prefs.patch
68
69 # patch to solve segfaults on ia64, from Debian, originally from David
70 # Mosberger
71 epatch ${DISTDIR}/mozilla-firefox-1.0.3-ia64.patch.bz2
72
73 # patch to fix math operations on alpha, makes maps.google.com work!
74 epatch ${DISTDIR}/mozilla-jslibmath-alpha.patch
75
76 if has_version '>=x11-libs/cairo-0.3.0'; then
77 epatch ${FILESDIR}/svg-cairo-0.3.0-fix.patch
78 fi
79
80 # GCC4 compile fix, bug #87800
81 epatch ${FILESDIR}/mozilla-firefox-1.0.4-gcc4.patch
82 }
83
84 src_compile() {
85 ####################################
86 #
87 # mozconfig, CFLAGS and CXXFLAGS setup
88 #
89 ####################################
90
91 mozconfig_init
92
93 # Bug 60668: Galeon doesn't build without oji enabled, so enable it
94 # regardless of java setting.
95 mozconfig_annotate '' --enable-oji --enable-mathml
96
97 # Other ff-specific settings
98 mozconfig_use_enable mozdevelop jsd
99 mozconfig_use_enable mozdevelop xpctools
100 mozconfig_use_extension mozdevelop venkman
101 mozconfig_use_enable gnome gnomevfs
102 mozconfig_use_extension gnome gnomevfs
103 mozconfig_use_enable mozcalendar calendar
104 mozconfig_use_enable mozsvg svg
105 mozconfig_use_enable mozsvg svg-renderer-cairo
106 mozconfig_annotate '' --with-default-mozilla-five-home=/usr/$(get_libdir)/MozillaFirefox
107 mozconfig_annotate '' --prefix=/usr/$(get_libdir)/MozillaFirefox
108
109 # Finalize and report settings
110 mozconfig_final
111
112 # hardened GCC uses -fstack-protector-all by default, and this breaks
113 # firefox.
114 has_hardened && append-flags -fno-stack-protector-all
115 replace-flags -fstack-protector-all -fstack-protector
116
117 ####################################
118 #
119 # Configure and build Firefox
120 #
121 ####################################
122
123 # ./configure picks up the mozconfig stuff
124 export LD="$(tc-getLD)"
125 export CC="$(tc-getCC)"
126 export CXX="$(tc-getCXX)"
127 econf
128
129 # This removes extraneous CFLAGS from the Makefiles to reduce RAM
130 # requirements while compiling
131 edit_makefiles
132
133 emake MOZ_PHOENIX=1 CXX="$(tc-getCXX)" CC="$(tc-getCC)" LD="$(tc-getLD)" || die
134 }
135
136 src_install() {
137 # Plugin path creation
138 PLUGIN_DIR="/usr/$(get_libdir)/nsbrowser/plugins"
139 dodir ${PLUGIN_DIR}
140
141 dodir /usr/$(get_libdir)/MozillaFirefox
142 cp -RL --no-preserve=links ${S}/dist/bin/* ${D}/usr/$(get_libdir)/MozillaFirefox
143
144 einfo "Installing includes and idl files..."
145 # Copy the include and idl files
146 dodir /usr/$(get_libdir)/MozillaFirefox/include/idl /usr/include
147 cd ${S}/dist
148 cp -LfR include/* ${D}/usr/$(get_libdir)/MozillaFirefox/include
149 cp -LfR idl/* ${D}/usr/$(get_libdir)/MozillaFirefox/include/idl
150 dosym /usr/$(get_libdir)/MozillaFirefox/include /usr/include/MozillaFirefox
151
152 # Dirty hack to get some applications using this header running
153 dosym /usr/$(get_libdir)/MozillaFirefox/include/necko/nsIURI.h /usr/lib/MozillaFirefox/include/nsIURI.h
154
155 cd ${S}/build/unix
156 # Fix firefox-config and install it
157 sed -i -e "s:/lib/firefox-${MY_PV}:/$(get_libdir)/MozillaFirefox:g" firefox-config
158 sed -i -e "s:/firefox-${MY_PV}:/MozillaFirefox:g" firefox-config
159 exeinto /usr/$(get_libdir)/MozillaFirefox
160 doexe firefox-config
161 # Fix pkgconfig files and install them
162 insinto /usr/$(get_libdir)/pkgconfig
163 for x in *.pc; do
164 if [[ -f ${x} ]]; then
165 sed -i -e "s:/lib/firefox-${MY_PV}:/$(get_libdir)/MozillaFirefox:g" ${x}
166 sed -i -e "s:/firefox-${MY_PV}:/MozillaFirefox:g" ${x}
167 doins ${x}
168 fi
169 done
170 cd ${S}
171
172
173 #fix permissions
174 chown -R root:root ${D}/usr/$(get_libdir)/MozillaFirefox
175
176 # Plugin path setup (rescuing the existent plugins)
177 src_mv_plugins /usr/$(get_libdir)/MozillaFirefox/plugins
178
179 # Install /usr/bin/firefox
180 install_mozilla_launcher_stub firefox /usr/$(get_libdir)/MozillaFirefox
181
182 # Install env.d snippet, which isn't necessary for running firefox, but
183 # might be necessary for programs linked against firefox
184 insinto /etc/env.d
185 doins ${FILESDIR}/10MozillaFirefox
186
187 # Set correct libdir in env.d file
188 dosed "s:/usr/lib:/usr/$(get_libdir):" /etc/env.d/10MozillaFirefox
189
190 # Fix icons to look the same everywhere
191 insinto /usr/$(get_libdir)/MozillaFirefox/icons
192 doins ${S}/build/package/rpm/SOURCES/mozicon16.xpm
193 doins ${S}/build/package/rpm/SOURCES/mozicon50.xpm
194
195 # Install icon and .desktop for menu entry
196 insinto /usr/share/pixmaps
197 doins ${FILESDIR}/icon/firefox-icon.png
198 # Fix bug 54179: Install .desktop file into /usr/share/applications
199 # instead of /usr/share/gnome/apps/Internet (18 Jun 2004 agriffis)
200 insinto /usr/share/applications
201 doins ${FILESDIR}/icon/mozillafirefox.desktop
202
203 # Normally firefox-0.9 must be run as root once before it can be
204 # run as a normal user. Drop in some initialized files to avoid
205 # this.
206 einfo "Extracting firefox-${PV} initialization files"
207 tar xjpf ${FILESDIR}/firefox-0.9-init.tar.bz2 -C ${D}/usr/$(get_libdir)/MozillaFirefox
208 }
209
210 pkg_preinst() {
211 export MOZILLA_FIVE_HOME=${ROOT}/usr/$(get_libdir)/MozillaFirefox
212
213 # Remove the old plugins dir
214 pkg_mv_plugins /usr/$(get_libdir)/MozillaFirefox/plugins
215
216 # Remove entire installed instance to prevent all kinds of
217 # problems... see bug 44772 for example
218 rm -rf "${MOZILLA_FIVE_HOME}"
219 }
220
221 pkg_postinst() {
222 export MOZILLA_FIVE_HOME="${ROOT}/usr/$(get_libdir)/MozillaFirefox"
223
224 # Needed to update the run time bindings for REGXPCOM
225 # (do not remove next line!)
226 env-update
227
228 # Register Components and Chrome
229 #
230 # Bug 67031: Set HOME=~root in case this is being emerged via sudo.
231 # Otherwise the following commands will create ~/.mozilla owned by root
232 # and 700 perms, which makes subsequent execution of firefox by user
233 # impossible.
234 einfo "Registering Components and Chrome..."
235 HOME=~root LD_LIBRARY_PATH=/usr/$(get_libdir)/MozillaFirefox ${MOZILLA_FIVE_HOME}/regxpcom
236 HOME=~root LD_LIBRARY_PATH=/usr/$(get_libdir)/MozillaFirefox ${MOZILLA_FIVE_HOME}/regchrome
237
238 # Fix permissions of component registry
239 chmod 0644 ${MOZILLA_FIVE_HOME}/components/compreg.dat
240
241 # Fix directory permissions
242 find ${MOZILLA_FIVE_HOME}/ -type d -perm 0700 -exec chmod 0755 {} \; || :
243
244 # Fix permissions on chrome files
245 find ${MOZILLA_FIVE_HOME}/chrome/ -name '*.rdf' -exec chmod 0644 {} \; || :
246
247 # This should be called in the postinst and postrm of all the
248 # mozilla, mozilla-bin, firefox, firefox-bin, thunderbird and
249 # thunderbird-bin ebuilds.
250 update_mozilla_launcher_symlinks
251 }
252
253 pkg_postrm() {
254 update_mozilla_launcher_symlinks
255 }

  ViewVC Help
Powered by ViewVC 1.1.20