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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.20