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

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

  ViewVC Help
Powered by ViewVC 1.1.20