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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Sat Apr 16 17:50:42 2005 UTC (15 years, 7 months ago) by brad
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
Bump to 1.0.3
(Portage version: 2.0.51.19)

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

  ViewVC Help
Powered by ViewVC 1.1.20