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

Contents of /www-client/mozilla-firefox/mozilla-firefox-1.0.7-r4.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.10 - (show annotations) (download)
Wed Oct 25 15:27:42 2006 UTC (14 years, 1 month ago) by cardoe
Branch: MAIN
CVS Tags: HEAD
Changes since 1.9: +1 -1 lines
FILE REMOVED
Anarchy's Changes: Fixed bug #152641 for 1.5.0.7 & 2.0. Removed 1.0.x series. Removed 2.x RCs. Cleaned up old files.
(Portage version: 2.1.2_pre3-r8)
 (Signed 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.7-r4.ebuild,v 1.9 2006/09/15 15:58:55 tcort 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.7.12-patches-1.2"
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/mozilla-${PVER}.tar.bz2
23 http://dev.gentoo.org/~azarah/mozilla/mozilla-${PVER}.tar.bz2"
24
25 KEYWORDS="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 mozilla-${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 #History security fix
88 epatch ${FILESDIR}/1.5/${PN}-1.5-history.patch
89 epatch ${FILESDIR}/1.5/${PN}-1.5-mork.patch
90
91 # Needed by some of the patches
92 WANT_AUTOCONF=2.1 autoconf || die "WANT_AUTOCONF failed"
93 }
94
95 src_compile() {
96 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
97
98 ####################################
99 #
100 # mozconfig, CFLAGS and CXXFLAGS setup
101 #
102 ####################################
103
104 mozconfig_init
105
106 # Bug 60668: Galeon doesn't build without oji enabled, so enable it
107 # regardless of java setting.
108 mozconfig_annotate '' --enable-oji --enable-mathml --enable-extensions=typeaheadfind
109
110 # Other ff-specific settings
111 mozconfig_use_enable mozdevelop jsd
112 mozconfig_use_enable mozdevelop xpctools
113 mozconfig_use_extension mozdevelop venkman
114 mozconfig_use_enable gnome gnomevfs
115 mozconfig_use_extension gnome gnomevfs
116 mozconfig_use_enable mozcalendar calendar
117 mozconfig_use_enable mozsvg svg
118 mozconfig_use_enable mozsvg svg-renderer-libart
119 use mozsvg && export MOZ_INTERNAL_LIBART_LGPL=1
120 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
121 #mozconfig_annotate '' --with-user-appdir=.firefox
122
123 # Finalize and report settings
124 mozconfig_final
125
126 # hardened GCC uses -fstack-protector-all by default, which breaks us
127 has_hardened && append-flags -fno-stack-protector-all
128 # remove -fstack-protector because now it borks firefox
129 CFLAGS=${CFLAGS/-fstack-protector-all/}
130 CFLAGS=${CFLAGS/-fstack-protector/}
131 CXXFLAGS=${CXXFLAGS/-fstack-protector-all/}
132 CXXFLAGS=${CXXFLAGS/-fstack-protector/}
133
134 ####################################
135 #
136 # Configure and build
137 #
138 ####################################
139
140 CPPFLAGS="${CPPFLAGS} -DARON_WAS_HERE" \
141 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
142 econf || die
143
144 # It would be great if we could pass these in via CPPFLAGS or CFLAGS prior
145 # to econf, but the quotes cause configure to fail.
146 sed -i -e \
147 's|-DARON_WAS_HERE|-DGENTOO_NSPLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsplugins\\\" -DGENTOO_NSBROWSER_PLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsbrowser/plugins\\\"|' \
148 ${S}/config/autoconf.mk \
149 ${S}/nsprpub/config/autoconf.mk \
150 ${S}/xpfe/global/buildconfig.html
151
152 # Fixup the RPATH
153 sed -i -e \
154 's|#RPATH_FIXER|'"${MOZILLA_FIVE_HOME}"'|' \
155 ${S}/config/rules.mk \
156 ${S}/nsprpub/config/rules.mk \
157 ${S}/security/coreconf/rules.mk \
158 ${S}/security/coreconf/rules.mk
159
160 # This removes extraneous CFLAGS from the Makefiles to reduce RAM
161 # requirements while compiling
162 edit_makefiles
163
164 emake || die
165 }
166
167 src_install() {
168 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
169
170 # Most of the installation happens here
171 dodir ${MOZILLA_FIVE_HOME}
172 cp -RL ${S}/dist/bin/* ${D}${MOZILLA_FIVE_HOME} || die "Failed to Copy"
173
174 # Create directory structure to support portage-installed extensions.
175 # See update_chrome() in mozilla-launcher
176 keepdir ${MOZILLA_FIVE_HOME}/chrome.d
177 cp ${D}${MOZILLA_FIVE_HOME}/chrome/installed-chrome.txt \
178 ${D}${MOZILLA_FIVE_HOME}/chrome.d/0_base-chrome.txt || die "Failed to Copy"
179 dodir ${MOZILLA_FIVE_HOME}/extensions
180 keepdir ${MOZILLA_FIVE_HOME}/extensions.d
181 cp ${D}${MOZILLA_FIVE_HOME}/defaults/profile/extensions/installed-extensions.txt \
182 ${D}${MOZILLA_FIVE_HOME}/extensions.d/0_base-extensions.txt || die "Failed to Copy"
183 cp ${D}${MOZILLA_FIVE_HOME}/defaults/profile/extensions/Extensions.rdf \
184 ${D}${MOZILLA_FIVE_HOME}/extensions/ || die "Failed to Copy"
185 cp -RL ${D}${MOZILLA_FIVE_HOME}/defaults/profile/extensions/\{*\} \
186 ${D}${MOZILLA_FIVE_HOME}/extensions/ || die "Failed to Copy"
187
188 # Create /usr/bin/firefox
189 install_mozilla_launcher_stub firefox ${MOZILLA_FIVE_HOME}
190
191 # Install icon and .desktop for menu entry
192 doicon ${FILESDIR}/icon/firefox-icon.png
193 domenu ${FILESDIR}/icon/mozillafirefox.desktop
194
195 # Fix icons to look the same everywhere
196 insinto ${MOZILLA_FIVE_HOME}/icons
197 doins ${S}/dist/branding/mozicon16.xpm
198 doins ${S}/dist/branding/mozicon50.xpm
199
200 ####################################
201 #
202 # Install files necessary for applications to build against firefox
203 #
204 ####################################
205
206 einfo "Installing includes and idl files..."
207 dodir ${MOZILLA_FIVE_HOME}/{include,idl} /usr/include
208 cd ${S}/dist
209 cp -LfR include/* ${D}${MOZILLA_FIVE_HOME}/include || die "Failed to Copy"
210 cp -LfR idl/* ${D}${MOZILLA_FIVE_HOME}/idl || die "Failed to Copy"
211
212 # Dirty hack to get some applications using this header running
213 dosym ${MOZILLA_FIVE_HOME}/include/necko/nsIURI.h \
214 /usr/$(get_libdir)/${MOZILLA_FIVE_HOME##*/}/include/nsIURI.h
215
216 # Compatibility symlink so that applications can still build against firefox
217 # even though it has moved. To remove this symlink, grep -r MozillaFirefox
218 # /usr/portage and fix those ebuilds
219 dosym ${MOZILLA_FIVE_HOME##*/} ${MOZILLA_FIVE_HOME%/*}/MozillaFirefox
220
221 # Fix firefox-config and install it
222 sed -i -e "s|/usr/$(get_libdir)/firefox-${PV}|${MOZILLA_FIVE_HOME}|g
223 s|/usr/include/firefox-${PV}|${MOZILLA_FIVE_HOME}/include|g
224 s|/usr/share/idl/firefox-${MY_PV}|${MOZILLA_FIVE_HOME}/idl|g
225 s|%{idldir}|${MOZILLA_FIVE_HOME}/idl|g
226 s|\(echo -L.*\)\($\)|\1 -Wl,-rpath,${MOZILLA_FIVE_HOME}\2|" \
227 ${S}/build/unix/firefox-config
228 exeinto ${MOZILLA_FIVE_HOME}
229 doexe ${S}/build/unix/firefox-config
230
231 # Fix pkgconfig files and install them
232 insinto /usr/$(get_libdir)/pkgconfig
233 for x in ${S}/build/unix/*.pc; do
234 sed -i -e "s|^libdir=.*|libdir=${MOZILLA_FIVE_HOME}|
235 s|^includedir=.*|includedir=${MOZILLA_FIVE_HOME}/include|
236 s|^idldir=.*|idldir=${MOZILLA_FIVE_HOME}/idl|
237 s|\(Libs:.*\)\($\)|\1 -Wl,-rpath,\${libdir}\2|" ${x}
238 doins ${x}
239 done
240
241 # Install env.d snippet, which isn't necessary for running firefox, but
242 # might be necessary for programs linked against firefox
243 insinto /etc/env.d
244 doins ${FILESDIR}/10MozillaFirefox
245 dosed "s|/usr/lib|/usr/$(get_libdir)|" /etc/env.d/10MozillaFirefox
246
247 # Install manpage (from the Fedora package)
248 doman ${FILESDIR}/firefox.1
249
250 # Install docs
251 dodoc ${S}/{LEGAL,LICENSE}
252 }
253
254 pkg_postinst() {
255 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
256
257 # Update the component registry
258 MOZILLA_LIBDIR=${ROOT}${MOZILLA_FIVE_HOME} MOZILLA_LAUNCHER=firefox \
259 /usr/libexec/mozilla-launcher -register
260
261 # This should be called in the postinst and postrm of all the
262 # mozilla, mozilla-bin, firefox, firefox-bin, thunderbird and
263 # thunderbird-bin ebuilds.
264 update_mozilla_launcher_symlinks
265
266 # Update mimedb for the new .desktop file
267 fdo-mime_desktop_database_update
268 }
269
270 pkg_postrm() {
271 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
272
273 # Update the component registry
274 MOZILLA_LIBDIR=${ROOT}${MOZILLA_FIVE_HOME} MOZILLA_LAUNCHER=firefox \
275 /usr/libexec/mozilla-launcher -register
276
277 update_mozilla_launcher_symlinks
278
279 # Update mimedb if .desktop file has been removed (uninstallation)
280 [ -f ${ROOT}/usr/share/applications/mozillafirefox.desktop ] \
281 || fdo-mime_desktop_database_update
282 }

  ViewVC Help
Powered by ViewVC 1.1.20