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

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

  ViewVC Help
Powered by ViewVC 1.1.20