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

Contents of /www-client/mozilla-firefox/mozilla-firefox-1.0_rc2.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_rc2.ebuild,v 1.2 2005/03/23 20:05:30 seemant Exp $
4
5 inherit makeedit flag-o-matic gcc nsplugins eutils mozilla 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 gtk2 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 gtk2? ( >=x11-libs/gtk+-2.1.1 >=dev-libs/libIDL-0.8.0 )
30 !gtk2? ( =x11-libs/gtk+-1.2* =gnome-base/orbit-0* )
31 java? ( virtual/jre )
32 >=www-client/mozilla-launcher-1.20"
33
34 DEPEND="${RDEPEND}
35 virtual/libc
36 dev-util/pkgconfig
37 java? ( >=dev-java/java-config-0.2.0 )"
38
39 # Needed by src_compile() and src_install().
40 # Would do in pkg_setup but that loses the export attribute, they
41 # become pure shell variables.
42 export MOZ_PHOENIX=1
43
44 src_unpack() {
45 unpack firefox-${MY_PV}-source.tar.bz2 || die "unpack failed"
46 cd ${S} || die "cd failed"
47
48 # alpha stubs patch from lfs project.
49 # <taviso@gentoo.org> (26 Jun 2003)
50 use alpha && epatch ${FILESDIR}/mozilla-1.3-alpha-stubs.patch
51 }
52
53 src_compile() {
54 local myconf
55
56 ####################################
57 #
58 # myconf, CFLAGS and CXXFLAGS setup
59 #
60 ####################################
61
62 # mozilla_conf comes from mozilla.eclass
63 mozilla_conf
64
65 # 1.0PR requires --enable-single-profile to build
66 # http://bugzilla.mozilla.org/show_bug.cgi?id=258831
67 myconf="${myconf} \
68 --with-default-mozilla-five-home=/usr/lib/MozillaFirefox \
69 --enable-single-profile"
70
71 # hardened GCC uses -fstack-protector-all by default, and this breaks
72 # firefox.
73 has_hardened && append-flags -fno-stack-protector-all
74 replace-flags -fstack-protector-all -fstack-protector
75
76 ####################################
77 #
78 # Configure and build Firefox
79 #
80 ####################################
81
82 econf ${myconf} || die
83
84 # This removes extraneous CFLAGS from the Makefiles to reduce RAM
85 # requirements while compiling
86 edit_makefiles
87
88 emake MOZ_PHOENIX=1 || die
89 }
90
91 src_install() {
92 # Plugin path creation
93 PLUGIN_DIR="/usr/lib/nsbrowser/plugins"
94 dodir ${PLUGIN_DIR}
95
96 dodir /usr/lib
97 dodir /usr/lib/MozillaFirefox
98 cp -RL --no-preserve=links ${S}/dist/bin/* ${D}/usr/lib/MozillaFirefox
99
100 #fix permissions
101 chown -R root:root ${D}/usr/lib/MozillaFirefox
102
103 # Plugin path setup (rescuing the existent plugins)
104 src_mv_plugins /usr/lib/MozillaFirefox/plugins
105
106 dodir /usr/bin
107 dosym /usr/libexec/mozilla-launcher /usr/bin/firefox
108 insinto /etc/env.d
109 doins ${FILESDIR}/10MozillaFirefox
110
111 # Fix icons to look the same everywhere
112 insinto /usr/lib/MozillaFirefox/icons
113 doins ${S}/build/package/rpm/SOURCES/mozicon16.xpm
114 doins ${S}/build/package/rpm/SOURCES/mozicon50.xpm
115
116 # Install icon and .desktop for menu entry
117 insinto /usr/share/pixmaps
118 doins ${FILESDIR}/icon/firefox-icon.png
119 # Fix bug 54179: Install .desktop file into /usr/share/applications
120 # instead of /usr/share/gnome/apps/Internet (18 Jun 2004 agriffis)
121 insinto /usr/share/applications
122 doins ${FILESDIR}/icon/mozillafirefox.desktop
123
124 # Normally firefox-0.9 must be run as root once before it can be
125 # run as a normal user. Drop in some initialized files to avoid
126 # this.
127 einfo "Extracting firefox-${PV} initialization files"
128 tar xjpf ${FILESDIR}/firefox-0.9-init.tar.bz2 -C ${D}/usr/lib/MozillaFirefox
129 }
130
131 pkg_preinst() {
132 export MOZILLA_FIVE_HOME=${ROOT}/usr/lib/MozillaFirefox
133
134 # Remove the old plugins dir
135 pkg_mv_plugins /usr/lib/MozillaFirefox/plugins
136
137 # Remove entire installed instance to prevent all kinds of
138 # problems... see bug 44772 for example
139 rm -rf "${MOZILLA_FIVE_HOME}"
140 }
141
142 pkg_postinst() {
143 export MOZILLA_FIVE_HOME="${ROOT}/usr/lib/MozillaFirefox"
144
145 # Needed to update the run time bindings for REGXPCOM
146 # (do not remove next line!)
147 env-update
148
149 # Register Components and Chrome
150 einfo "Registering Components and Chrome..."
151 LD_LIBRARY_PATH=/usr/lib/MozillaFirefox ${MOZILLA_FIVE_HOME}/regxpcom
152 LD_LIBRARY_PATH=/usr/lib/MozillaFirefox ${MOZILLA_FIVE_HOME}/regchrome
153
154 # Fix permissions of component registry
155 chmod 0644 ${MOZILLA_FIVE_HOME}/components/compreg.dat
156
157 # Fix directory permissions
158 find ${MOZILLA_FIVE_HOME}/ -type d -perm 0700 -exec chmod 0755 {} \; || :
159
160 # Fix permissions on chrome files
161 find ${MOZILLA_FIVE_HOME}/chrome/ -name '*.rdf' -exec chmod 0644 {} \; || :
162
163 # This should be called in the postinst and postrm of all the
164 # mozilla, mozilla-bin, firefox, firefox-bin, thunderbird and
165 # thunderbird-bin ebuilds.
166 update_mozilla_launcher_symlinks
167 }
168
169 pkg_postrm() {
170 update_mozilla_launcher_symlinks
171 }

  ViewVC Help
Powered by ViewVC 1.1.20