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

Contents of /www-client/mozilla-firefox/mozilla-firefox-1.0.6-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations) (download)
Sat Jul 23 05:33:53 2005 UTC (15 years, 4 months ago) by anarchy
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +1 -1 lines
FILE REMOVED
fixed env.d variable
(Portage version: 2.0.51.22-r2)

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.6-r1.ebuild,v 1.6 2005/07/22 22:52:13 anarchy Exp $
4
5 unset ALLOWED_FLAGS # stupid extra-functions.sh ... bug 49179
6 inherit flag-o-matic toolchain-funcs eutils mozconfig mozilla-launcher makeedit multilib
7
8 DESCRIPTION="Firefox Web Browser"
9 HOMEPAGE="http://www.mozilla.org/projects/firefox/"
10 SRC_URI="http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${PV}/source/firefox-${PV}-source.tar.bz2
11 mirror://gentoo/mozilla-firefox-1.0-4ft2.patch.bz2
12 mirror://gentoo/mozilla-firefox-1.0.3-ia64.patch.bz2
13 mirror://gentoo/mozilla-jslibmath-alpha.patch
14 mirror://gentoo/mozilla-firefox-1.0.6-nsplugins.patch
15 http://dev.gentoo.org/~agriffis/dist/mozilla-firefox-1.0.6-nsplugins.patch"
16
17 KEYWORDS="alpha amd64 ~arm ~hppa ia64 ppc ~sparc x86"
18 SLOT="0"
19 LICENSE="MPL-1.1 NPL-1.1"
20 IUSE="gnome java mozdevelop mozsvg mozcalendar"
21
22 # xrender.pc appeared for the first time in xorg-x11-6.7.0-r2
23 # and is required to build with support for cairo. #71504
24 RDEPEND="java? ( virtual/jre )
25 >=media-libs/libmng-1.0.0
26 mozsvg? (
27 >=x11-base/xorg-x11-6.7.0-r2
28 x11-libs/cairo
29 )
30 >=www-client/mozilla-launcher-1.39"
31
32 DEPEND="${RDEPEND}
33 java? ( >=dev-java/java-config-0.2.0 )"
34
35 S=${WORKDIR}/mozilla
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 BUILD_OFFICIAL=1
41 export MOZILLA_OFFICIAL=1
42 export MOZ_PHOENIX=1
43
44 src_unpack() {
45 declare x
46
47 for x in ${A}; do
48 [[ $x == *.tar.* ]] || continue
49 unpack $x || die "unpack failed"
50 done
51 cd ${S} || die "cd failed"
52
53 ####################################
54 #
55 # architecture patches
56 #
57 ####################################
58
59 # alpha stubs patch from lfs project.
60 # <taviso@gentoo.org> (26 Jun 2003)
61 use alpha && epatch ${FILESDIR}/mozilla-1.3-alpha-stubs.patch
62
63 # hppa patches from Ivar <orskaug@stud.ntnu.no>
64 # <gmsoft@gentoo.org> (22 Dec 2004)
65 epatch ${FILESDIR}/mozilla-hppa.patch
66
67 # patch to solve segfaults on ia64, from Debian, originally from David
68 # Mosberger
69 epatch ${DISTDIR}/mozilla-firefox-1.0.3-ia64.patch.bz2
70
71 # patch to fix math operations on alpha, makes maps.google.com work!
72 epatch ${DISTDIR}/mozilla-jslibmath-alpha.patch
73
74 ####################################
75 #
76 # general compilation and run-time fixes
77 #
78 ####################################
79
80 # GCC4 compile fix, bug #87800
81 epatch ${FILESDIR}/mozilla-firefox-1.0.4-gcc4.patch
82
83 # patch out ft caching code since the API changed between releases of
84 # freetype; this enables freetype-2.1.8+ compat.
85 # https://bugzilla.mozilla.org/show_bug.cgi?id=234035#c65
86 epatch ${DISTDIR}/mozilla-firefox-1.0-4ft2.patch.bz2
87
88 # Patch for newer versions of cairo #80301
89 if has_version '>=x11-libs/cairo-0.3.0'; then
90 epatch ${FILESDIR}/svg-cairo-0.3.0-fix.patch
91 fi
92
93 ####################################
94 #
95 # behavioral fixes
96 #
97 ####################################
98
99 # patch to fix separate character on euro keyboards, bug 68995
100 epatch ${FILESDIR}/mozilla-firefox-1.0-kp_separator.patch
101
102 # some patches from Debian to set default preferences:
103 # - inherit LANG from env
104 # - shut off SSLv2 and 40-bit ciphers by default
105 # - disable application auto-updating
106 epatch ${FILESDIR}/mozilla-firefox-1.0.3-prefs.patch
107
108 # look in /usr/lib/nsplugins for plugins, in addition to the usual places
109 epatch ${DISTDIR}/mozilla-firefox-1.0.6-nsplugins.patch
110 }
111
112 src_compile() {
113 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
114
115 ####################################
116 #
117 # mozconfig, CFLAGS and CXXFLAGS setup
118 #
119 ####################################
120
121 mozconfig_init
122
123 # Bug 60668: Galeon doesn't build without oji enabled, so enable it
124 # regardless of java setting.
125 mozconfig_annotate '' --enable-oji --enable-mathml
126
127 # Other ff-specific settings
128 mozconfig_use_enable mozdevelop jsd
129 mozconfig_use_enable mozdevelop xpctools
130 mozconfig_use_extension mozdevelop venkman
131 mozconfig_use_enable gnome gnomevfs
132 mozconfig_use_extension gnome gnomevfs
133 mozconfig_use_enable mozcalendar calendar
134 mozconfig_use_enable mozsvg svg
135 mozconfig_use_enable mozsvg svg-renderer-cairo
136 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
137 #mozconfig_annotate '' --with-user-appdir=.firefox
138
139 # Finalize and report settings
140 mozconfig_final
141
142 # hardened GCC uses -fstack-protector-all by default, which breaks us
143 has_hardened && append-flags -fno-stack-protector-all
144 replace-flags -fstack-protector-all -fstack-protector
145
146 ####################################
147 #
148 # Configure and build
149 #
150 ####################################
151
152 LD="$(tc-getLD)" CC="$(tc-getCC)" CXX="$(tc-getCXX)" \
153 econf || die
154
155 # This removes extraneous CFLAGS from the Makefiles to reduce RAM
156 # requirements while compiling
157 edit_makefiles
158
159 emake || die
160 }
161
162 src_install() {
163 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
164
165 # Most of the installation happens here
166 dodir ${MOZILLA_FIVE_HOME}
167 cp -RL --no-preserve=links ${S}/dist/bin/* ${D}${MOZILLA_FIVE_HOME}
168
169 # Create directory structure to support portage-installed extensions.
170 # See update_chrome() in mozilla-launcher
171 keepdir ${MOZILLA_FIVE_HOME}/chrome.d
172 keepdir ${MOZILLA_FIVE_HOME}/extensions.d
173 cp ${D}${MOZILLA_FIVE_HOME}/chrome/installed-chrome.txt \
174 ${D}${MOZILLA_FIVE_HOME}/chrome.d/0_base-chrome.txt
175
176 # Create /usr/bin/firefox
177 install_mozilla_launcher_stub firefox ${MOZILLA_FIVE_HOME}
178
179 # Install icon and .desktop for menu entry
180 insinto /usr/share/pixmaps
181 doins ${FILESDIR}/icon/firefox-icon.png
182
183 # Fix bug 54179: Install .desktop file into /usr/share/applications
184 # instead of /usr/share/gnome/apps/Internet (18 Jun 2004 agriffis)
185 insinto /usr/share/applications
186 doins ${FILESDIR}/icon/mozillafirefox.desktop
187
188 # Fix icons to look the same everywhere
189 insinto ${MOZILLA_FIVE_HOME}/icons
190 doins ${S}/build/package/rpm/SOURCES/mozicon16.xpm
191 doins ${S}/build/package/rpm/SOURCES/mozicon50.xpm
192
193 ####################################
194 #
195 # Install files necessary for applications to build against firefox
196 #
197 ####################################
198
199 einfo "Installing includes and idl files..."
200 dodir ${MOZILLA_FIVE_HOME}/include/idl /usr/include
201 cd ${S}/dist
202 cp -LfR include/* ${D}${MOZILLA_FIVE_HOME}/include
203 cp -LfR idl/* ${D}${MOZILLA_FIVE_HOME}/include/idl
204
205 # Dirty hack to get some applications using this header running
206 dosym ${MOZILLA_FIVE_HOME}/include/necko/nsIURI.h \
207 /usr/lib/${MOZILLA_FIVE_HOME##*/}/include/nsIURI.h
208
209 # Compatibility symlink so that applications can still build against firefox
210 # even though it has moved. To remove this symlink, grep -r MozillaFirefox
211 # /usr/portage and fix those ebuilds
212 dosym ${MOZILLA_FIVE_HOME##*/} ${MOZILLA_FIVE_HOME%/*}/MozillaFirefox
213
214 # Fix firefox-config and install it
215 sed -i -e "s|/usr/lib/firefox-${PV}|${MOZILLA_FIVE_HOME}|g
216 s|/usr/include/firefox-${PV}|${MOZILLA_FIVE_HOME}/include|g" \
217 ${S}/build/unix/firefox-config
218 exeinto ${MOZILLA_FIVE_HOME}
219 doexe ${S}/build/unix/firefox-config
220
221 # Fix pkgconfig files and install them
222 insinto /usr/$(get_libdir)/pkgconfig
223 for x in ${S}/build/unix/*.pc; do
224 sed -i -e "s|^libdir=.*|libdir=${MOZILLA_FIVE_HOME}|
225 s|^includedir=.*|includedir=${MOZILLA_FIVE_HOME}/include|" ${x}
226 doins ${x}
227 done
228
229 # Install env.d snippet, which isn't necessary for running firefox, but
230 # might be necessary for programs linked against firefox
231 insinto /etc/env.d
232 doins ${FILESDIR}/10MozillaFirefox
233 dosed "s|/usr/lib|/usr/$(get_libdir)|" /etc/env.d/10MozillaFirefox
234
235 # Install docs
236 dodoc LEGAL LICENSE
237 }
238
239 pkg_postinst() {
240 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
241
242 # Update the component registry
243 MOZILLA_LIBDIR=${ROOT}${MOZILLA_FIVE_HOME} MOZILLA_LAUNCHER=firefox \
244 /usr/libexec/mozilla-launcher -register
245
246 # This should be called in the postinst and postrm of all the
247 # mozilla, mozilla-bin, firefox, firefox-bin, thunderbird and
248 # thunderbird-bin ebuilds.
249 update_mozilla_launcher_symlinks
250 }
251
252 pkg_postrm() {
253 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
254
255 # Update the component registry
256 MOZILLA_LIBDIR=${ROOT}${MOZILLA_FIVE_HOME} MOZILLA_LAUNCHER=firefox \
257 /usr/libexec/mozilla-launcher -register
258
259 update_mozilla_launcher_symlinks
260 }

  ViewVC Help
Powered by ViewVC 1.1.20