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

Contents of /www-client/mozilla-firefox/mozilla-firefox-1.0.3-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Mon Jul 18 15:15:38 2005 UTC (15 years, 4 months ago) by agriffis
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +1 -1 lines
FILE REMOVED
Install /usr/bin/firefox stub using install_mozilla_launcher_stub from
mozilla-launcher.eclass #99084
(Portage version: 2.0.51.20-r5)

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

  ViewVC Help
Powered by ViewVC 1.1.20