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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.20