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

Contents of /www-client/mozilla-firefox/mozilla-firefox-1.0.8.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations) (download)
Mon Jun 12 02:09:24 2006 UTC (14 years, 5 months ago) by anarchy
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +1 -1 lines
FILE REMOVED
removed most vulnerable versions, will remove 1.0.7 soon as ia64 marks 1.5.0.4 stable
(Portage version: 2.1)
 (Unsigned Manifest commit)

1 # Copyright 1999-2006 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.8.ebuild,v 1.6 2006/04/22 16:43:52 gmsoft Exp $
4
5 unset ALLOWED_FLAGS # stupid extra-functions.sh ... bug 49179
6 MOZ_FREETYPE2="no" # Need to disable for newer .. remove here and in mozconfig
7 # when older is removed from tree.
8 MOZ_PANGO="yes" # Need to enable for newer .. remove here and in mozconfig
9 # when older is removed from tree.
10 inherit flag-o-matic toolchain-funcs eutils mozconfig mozilla-launcher makeedit multilib fdo-mime
11
12 PVER="1.0.8-patches-1.0"
13 SVGVER="2.3.10p1"
14
15 DESCRIPTION="Firefox Web Browser"
16 HOMEPAGE="http://www.mozilla.org/projects/firefox/"
17 SRC_URI="http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${PV}/source/firefox-${PV}-source.tar.bz2
18 mozsvg? (
19 mirror://gentoo/moz_libart_lgpl-${SVGVER}.tar.bz2
20 http://dev.gentoo.org/~azarah/mozilla/moz_libart_lgpl-${SVGVER}.tar.bz2
21 )
22 mirror://gentoo/${PN}-${PVER}.tar.bz2
23 http://dev.gentoo.org/~anarchy/dist/${PN}-${PVER}.tar.bz2"
24
25 KEYWORDS="alpha ~amd64 ~arm hppa ~ia64 ppc sparc x86"
26 SLOT="0"
27 LICENSE="MPL-1.1 NPL-1.1"
28 IUSE="gnome java mozdevelop mozsvg mozcalendar"
29
30 # xrender.pc appeared for the first time in xorg-x11-6.7.0-r2
31 # and is required to build with support for cairo. #71504
32 RDEPEND="java? ( virtual/jre )
33 >=media-libs/libmng-1.0.0
34 mozsvg? ( !<x11-base/xorg-x11-6.7.0-r2 )
35 >=www-client/mozilla-launcher-1.39"
36
37 DEPEND="${RDEPEND}
38 java? ( >=dev-java/java-config-0.2.0 )"
39
40 S=${WORKDIR}/mozilla
41
42 # Needed by src_compile() and src_install().
43 # Would do in pkg_setup but that loses the export attribute, they
44 # become pure shell variables.
45 export BUILD_OFFICIAL=1
46 export MOZILLA_OFFICIAL=1
47 export MOZ_PHOENIX=1
48
49 src_unpack() {
50 unpack firefox-${PV}-source.tar.bz2 ${PN}-${PVER}.tar.bz2
51 cd ${S} || die "cd failed"
52
53 if use mozsvg; then
54 cd ${S}/other-licenses
55 unpack moz_libart_lgpl-${SVGVER}.tar.bz2
56 fi
57 cd ${S}
58
59 ####################################
60 #
61 # patch collection
62 #
63 ####################################
64
65 # Need pango-1.10.0 stable
66 rm -f ${WORKDIR}/patch/03[67]*
67 epatch ${WORKDIR}/patch
68
69 # Without 03[67]* patches, we need to link to pangoxft
70 epatch ${FILESDIR}/mozilla-1.7.12-gtk2xft-link-pangoxft.patch
71
72 # Fix scripts that call for /usr/local/bin/perl #51916
73 ebegin "Patching smime to call perl from /usr/bin"
74 sed -i -e '1s,usr/local/bin,usr/bin,' ${S}/security/nss/cmd/smimetools/smime
75 eend $? || die "sed failed"
76
77 # Fix a compilation issue using the 32-bit userland with 64-bit kernel on
78 # PowerPC, because with that configuration, mozilla detects a ppc64 system.
79 # -- hansmi, 2005-10-02
80 if use ppc && [[ "${PROFILE_ARCH}" == ppc64 ]]; then
81 sed -i -e "s#OS_TEST=\`uname -m\`\$#OS_TEST=${ARCH}#" \
82 ${S}/configure.in
83 sed -i -e "s#OS_TEST :=.*uname -m.*\$#OS_TEST:=${ARCH}#" \
84 ${S}/security/coreconf/arch.mk
85 fi
86
87 # Needed by some of the patches
88 WANT_AUTOCONF=2.1 autoconf || die "WANT_AUTOCONF failed"
89 }
90
91 src_compile() {
92 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
93
94 ####################################
95 #
96 # mozconfig, CFLAGS and CXXFLAGS setup
97 #
98 ####################################
99
100 mozconfig_init
101
102 # Bug 60668: Galeon doesn't build without oji enabled, so enable it
103 # regardless of java setting.
104 mozconfig_annotate '' --enable-oji --enable-mathml --enable-extensions=typeaheadfind
105
106 # Other ff-specific settings
107 mozconfig_use_enable mozdevelop jsd
108 mozconfig_use_enable mozdevelop xpctools
109 mozconfig_use_extension mozdevelop venkman
110 mozconfig_use_enable gnome gnomevfs
111 mozconfig_use_extension gnome gnomevfs
112 mozconfig_use_enable mozcalendar calendar
113 mozconfig_use_enable mozsvg svg
114 mozconfig_use_enable mozsvg svg-renderer-libart
115 use mozsvg && export MOZ_INTERNAL_LIBART_LGPL=1
116 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
117 #mozconfig_annotate '' --with-user-appdir=.firefox
118
119 # Finalize and report settings
120 mozconfig_final
121
122 # hardened GCC uses -fstack-protector-all by default, which breaks us
123 has_hardened && append-flags -fno-stack-protector-all
124 # remove -fstack-protector because now it borks firefox
125 CFLAGS=${CFLAGS/-fstack-protector-all/}
126 CFLAGS=${CFLAGS/-fstack-protector/}
127 CXXFLAGS=${CXXFLAGS/-fstack-protector-all/}
128 CXXFLAGS=${CXXFLAGS/-fstack-protector/}
129
130 ####################################
131 #
132 # Configure and build
133 #
134 ####################################
135
136 CPPFLAGS="${CPPFLAGS} -DARON_WAS_HERE" \
137 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
138 econf || die
139
140 # It would be great if we could pass these in via CPPFLAGS or CFLAGS prior
141 # to econf, but the quotes cause configure to fail.
142 sed -i -e \
143 's|-DARON_WAS_HERE|-DGENTOO_NSPLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsplugins\\\" -DGENTOO_NSBROWSER_PLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsbrowser/plugins\\\"|' \
144 ${S}/config/autoconf.mk \
145 ${S}/nsprpub/config/autoconf.mk \
146 ${S}/xpfe/global/buildconfig.html
147
148 # Fixup the RPATH
149 sed -i -e \
150 's|#RPATH_FIXER|'"${MOZILLA_FIVE_HOME}"'|' \
151 ${S}/config/rules.mk \
152 ${S}/nsprpub/config/rules.mk \
153 ${S}/security/coreconf/rules.mk \
154 ${S}/security/coreconf/rules.mk
155
156 # This removes extraneous CFLAGS from the Makefiles to reduce RAM
157 # requirements while compiling
158 edit_makefiles
159
160 emake || die
161 }
162
163 src_install() {
164 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
165
166 # Most of the installation happens here
167 dodir ${MOZILLA_FIVE_HOME}
168 cp -RL ${S}/dist/bin/* ${D}${MOZILLA_FIVE_HOME} || die "Failed to Copy"
169
170 # Create directory structure to support portage-installed extensions.
171 # See update_chrome() in mozilla-launcher
172 keepdir ${MOZILLA_FIVE_HOME}/chrome.d
173 cp ${D}${MOZILLA_FIVE_HOME}/chrome/installed-chrome.txt \
174 ${D}${MOZILLA_FIVE_HOME}/chrome.d/0_base-chrome.txt || die "Failed to Copy"
175 dodir ${MOZILLA_FIVE_HOME}/extensions
176 keepdir ${MOZILLA_FIVE_HOME}/extensions.d
177 cp ${D}${MOZILLA_FIVE_HOME}/defaults/profile/extensions/installed-extensions.txt \
178 ${D}${MOZILLA_FIVE_HOME}/extensions.d/0_base-extensions.txt || die "Failed to Copy"
179 cp ${D}${MOZILLA_FIVE_HOME}/defaults/profile/extensions/Extensions.rdf \
180 ${D}${MOZILLA_FIVE_HOME}/extensions/ || die "Failed to Copy"
181 cp -RL ${D}${MOZILLA_FIVE_HOME}/defaults/profile/extensions/\{*\} \
182 ${D}${MOZILLA_FIVE_HOME}/extensions/ || die "Failed to Copy"
183
184 # Create /usr/bin/firefox
185 install_mozilla_launcher_stub firefox ${MOZILLA_FIVE_HOME}
186
187 # Install icon and .desktop for menu entry
188 doicon ${FILESDIR}/icon/firefox-icon.png
189 domenu ${FILESDIR}/icon/mozillafirefox.desktop
190
191 # Fix icons to look the same everywhere
192 insinto ${MOZILLA_FIVE_HOME}/icons
193 doins ${S}/dist/branding/mozicon16.xpm
194 doins ${S}/dist/branding/mozicon50.xpm
195
196 ####################################
197 #
198 # Install files necessary for applications to build against firefox
199 #
200 ####################################
201
202 einfo "Installing includes and idl files..."
203 dodir ${MOZILLA_FIVE_HOME}/{include,idl} /usr/include
204 cd ${S}/dist
205 cp -LfR include/* ${D}${MOZILLA_FIVE_HOME}/include || die "Failed to Copy"
206 cp -LfR idl/* ${D}${MOZILLA_FIVE_HOME}/idl || die "Failed to Copy"
207
208 # Dirty hack to get some applications using this header running
209 dosym ${MOZILLA_FIVE_HOME}/include/necko/nsIURI.h \
210 /usr/$(get_libdir)/${MOZILLA_FIVE_HOME##*/}/include/nsIURI.h
211
212 # Compatibility symlink so that applications can still build against firefox
213 # even though it has moved. To remove this symlink, grep -r MozillaFirefox
214 # /usr/portage and fix those ebuilds
215 dosym ${MOZILLA_FIVE_HOME##*/} ${MOZILLA_FIVE_HOME%/*}/MozillaFirefox
216
217 # Fix firefox-config and install it
218 sed -i -e "s|/usr/$(get_libdir)/firefox-${PV}|${MOZILLA_FIVE_HOME}|g
219 s|/usr/include/firefox-${PV}|${MOZILLA_FIVE_HOME}/include|g
220 s|/usr/share/idl/firefox-${MY_PV}|${MOZILLA_FIVE_HOME}/idl|g
221 s|%{idldir}|${MOZILLA_FIVE_HOME}/idl|g
222 s|\(echo -L.*\)\($\)|\1 -Wl,-rpath,${MOZILLA_FIVE_HOME}\2|" \
223 ${S}/build/unix/firefox-config
224 exeinto ${MOZILLA_FIVE_HOME}
225 doexe ${S}/build/unix/firefox-config
226
227 # Fix pkgconfig files and install them
228 insinto /usr/$(get_libdir)/pkgconfig
229 for x in ${S}/build/unix/*.pc; do
230 sed -i -e "s|^libdir=.*|libdir=${MOZILLA_FIVE_HOME}|
231 s|^includedir=.*|includedir=${MOZILLA_FIVE_HOME}/include|
232 s|^idldir=.*|idldir=${MOZILLA_FIVE_HOME}/idl|
233 s|\(Libs:.*\)\($\)|\1 -Wl,-rpath,\${libdir}\2|" ${x}
234 doins ${x}
235 done
236
237 # Install env.d snippet, which isn't necessary for running firefox, but
238 # might be necessary for programs linked against firefox
239 insinto /etc/env.d
240 doins ${FILESDIR}/10MozillaFirefox
241 dosed "s|/usr/lib|/usr/$(get_libdir)|" /etc/env.d/10MozillaFirefox
242
243 # Install manpage (from the Fedora package)
244 doman ${FILESDIR}/firefox.1
245
246 # Install docs
247 dodoc ${S}/{LEGAL,LICENSE}
248 }
249
250 pkg_postinst() {
251 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
252
253 # Update the component registry
254 MOZILLA_LIBDIR=${ROOT}${MOZILLA_FIVE_HOME} MOZILLA_LAUNCHER=firefox \
255 /usr/libexec/mozilla-launcher -register
256
257 # This should be called in the postinst and postrm of all the
258 # mozilla, mozilla-bin, firefox, firefox-bin, thunderbird and
259 # thunderbird-bin ebuilds.
260 update_mozilla_launcher_symlinks
261
262 # Update mimedb for the new .desktop file
263 fdo-mime_desktop_database_update
264 }
265
266 pkg_postrm() {
267 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
268
269 # Update the component registry
270 MOZILLA_LIBDIR=${ROOT}${MOZILLA_FIVE_HOME} MOZILLA_LAUNCHER=firefox \
271 /usr/libexec/mozilla-launcher -register
272
273 update_mozilla_launcher_symlinks
274
275 # Update mimedb if .desktop file has been removed (uninstallation)
276 [ -f ${ROOT}/usr/share/applications/mozillafirefox.desktop ] \
277 || fdo-mime_desktop_database_update
278 }

  ViewVC Help
Powered by ViewVC 1.1.20