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

Contents of /www-client/mozilla-firefox/mozilla-firefox-1.0-r3.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-r3.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
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 ~ia64 ppc ~sparc ~x86 hppa"
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
57 src_compile() {
58 ####################################
59 #
60 # mozconfig, CFLAGS and CXXFLAGS setup
61 #
62 ####################################
63
64 mozconfig_init
65
66 # Bug 60668: Galeon doesn't build without oji enabled, so enable it
67 # regardless of java setting.
68 mozconfig_annotate '' --enable-oji --enable-mathml
69
70 # Other ff-specific settings
71 mozconfig_use_enable mozdevelop jsd
72 mozconfig_use_enable mozdevelop xpctools
73 mozconfig_use_extension mozdevelop venkman
74 mozconfig_use_enable gnome gnomevfs
75 mozconfig_use_extension gnome gnomevfs
76 mozconfig_use_enable mozsvg svg
77 mozconfig_use_enable mozsvg svg-renderer-cairo
78 mozconfig_annotate '' --with-default-mozilla-five-home=/usr/lib/MozillaFirefox
79
80 # Finalize and report settings
81 mozconfig_final
82
83 # hardened GCC uses -fstack-protector-all by default, and this breaks
84 # firefox.
85 has_hardened && append-flags -fno-stack-protector-all
86 replace-flags -fstack-protector-all -fstack-protector
87
88 ####################################
89 #
90 # Configure and build Firefox
91 #
92 ####################################
93
94 # ./configure picks up the mozconfig stuff
95 econf
96
97 # This removes extraneous CFLAGS from the Makefiles to reduce RAM
98 # requirements while compiling
99 edit_makefiles
100
101 emake MOZ_PHOENIX=1 || die
102 }
103
104 src_install() {
105 # Plugin path creation
106 PLUGIN_DIR="/usr/lib/nsbrowser/plugins"
107 dodir ${PLUGIN_DIR}
108
109 dodir /usr/lib
110 dodir /usr/lib/MozillaFirefox
111 cp -RL --no-preserve=links ${S}/dist/bin/* ${D}/usr/lib/MozillaFirefox
112
113 #fix permissions
114 chown -R root:root ${D}/usr/lib/MozillaFirefox
115
116 # Plugin path setup (rescuing the existent plugins)
117 src_mv_plugins /usr/lib/MozillaFirefox/plugins
118
119 dodir /usr/bin
120 dosym /usr/libexec/mozilla-launcher /usr/bin/firefox
121 insinto /etc/env.d
122 doins ${FILESDIR}/10MozillaFirefox
123
124 # Fix icons to look the same everywhere
125 insinto /usr/lib/MozillaFirefox/icons
126 doins ${S}/build/package/rpm/SOURCES/mozicon16.xpm
127 doins ${S}/build/package/rpm/SOURCES/mozicon50.xpm
128
129 # Install icon and .desktop for menu entry
130 insinto /usr/share/pixmaps
131 doins ${FILESDIR}/icon/firefox-icon.png
132 # Fix bug 54179: Install .desktop file into /usr/share/applications
133 # instead of /usr/share/gnome/apps/Internet (18 Jun 2004 agriffis)
134 insinto /usr/share/applications
135 doins ${FILESDIR}/icon/mozillafirefox.desktop
136
137 # Normally firefox-0.9 must be run as root once before it can be
138 # run as a normal user. Drop in some initialized files to avoid
139 # this.
140 einfo "Extracting firefox-${PV} initialization files"
141 tar xjpf ${FILESDIR}/firefox-0.9-init.tar.bz2 -C ${D}/usr/lib/MozillaFirefox
142 }
143
144 pkg_preinst() {
145 export MOZILLA_FIVE_HOME=${ROOT}/usr/lib/MozillaFirefox
146
147 # Remove the old plugins dir
148 pkg_mv_plugins /usr/lib/MozillaFirefox/plugins
149
150 # Remove entire installed instance to prevent all kinds of
151 # problems... see bug 44772 for example
152 rm -rf "${MOZILLA_FIVE_HOME}"
153 }
154
155 pkg_postinst() {
156 export MOZILLA_FIVE_HOME="${ROOT}/usr/lib/MozillaFirefox"
157
158 # Needed to update the run time bindings for REGXPCOM
159 # (do not remove next line!)
160 env-update
161
162 # Register Components and Chrome
163 #
164 # Bug 67031: Set HOME=~root in case this is being emerged via sudo.
165 # Otherwise the following commands will create ~/.mozilla owned by root
166 # and 700 perms, which makes subsequent execution of firefox by user
167 # impossible.
168 einfo "Registering Components and Chrome..."
169 HOME=~root LD_LIBRARY_PATH=/usr/lib/MozillaFirefox ${MOZILLA_FIVE_HOME}/regxpcom
170 HOME=~root LD_LIBRARY_PATH=/usr/lib/MozillaFirefox ${MOZILLA_FIVE_HOME}/regchrome
171
172 # Fix permissions of component registry
173 chmod 0644 ${MOZILLA_FIVE_HOME}/components/compreg.dat
174
175 # Fix directory permissions
176 find ${MOZILLA_FIVE_HOME}/ -type d -perm 0700 -exec chmod 0755 {} \; || :
177
178 # Fix permissions on chrome files
179 find ${MOZILLA_FIVE_HOME}/chrome/ -name '*.rdf' -exec chmod 0644 {} \; || :
180
181 # This should be called in the postinst and postrm of all the
182 # mozilla, mozilla-bin, firefox, firefox-bin, thunderbird and
183 # thunderbird-bin ebuilds.
184 update_mozilla_launcher_symlinks
185 }
186
187 pkg_postrm() {
188 update_mozilla_launcher_symlinks
189 }

  ViewVC Help
Powered by ViewVC 1.1.20