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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.11 - (show annotations) (download)
Sun Jan 29 18:33:35 2006 UTC (14 years, 10 months ago) by anarchy
Branch: MAIN
CVS Tags: HEAD
Changes since 1.10: +1 -1 lines
FILE REMOVED
just some cleanup to remove obsolete cruft
(Portage version: 2.1_pre4-r1)

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.7-r2.ebuild,v 1.10 2005/10/17 16:18:28 agriffis 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
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="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 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 # Needed by some of the patches
78 WANT_AUTOCONF=2.1 autoconf || die "WANT_AUTOCONF failed"
79 }
80
81 src_compile() {
82 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
83
84 ####################################
85 #
86 # mozconfig, CFLAGS and CXXFLAGS setup
87 #
88 ####################################
89
90 mozconfig_init
91
92 # Bug 60668: Galeon doesn't build without oji enabled, so enable it
93 # regardless of java setting.
94 mozconfig_annotate '' --enable-oji --enable-mathml --enable-extensions=typeaheadfind
95
96 # Other ff-specific settings
97 mozconfig_use_enable mozdevelop jsd
98 mozconfig_use_enable mozdevelop xpctools
99 mozconfig_use_extension mozdevelop venkman
100 mozconfig_use_enable gnome gnomevfs
101 mozconfig_use_extension gnome gnomevfs
102 mozconfig_use_enable mozcalendar calendar
103 mozconfig_use_enable mozsvg svg
104 mozconfig_use_enable mozsvg svg-renderer-libart
105 use mozsvg && export MOZ_INTERNAL_LIBART_LGPL=1
106 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
107 #mozconfig_annotate '' --with-user-appdir=.firefox
108
109 # Finalize and report settings
110 mozconfig_final
111
112 # hardened GCC uses -fstack-protector-all by default, which breaks us
113 has_hardened && append-flags -fno-stack-protector-all
114 replace-flags -fstack-protector-all -fstack-protector
115
116 ####################################
117 #
118 # Configure and build
119 #
120 ####################################
121
122 CPPFLAGS="${CPPFLAGS} -DARON_WAS_HERE" \
123 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
124 econf || die
125
126 # It would be great if we could pass these in via CPPFLAGS or CFLAGS prior
127 # to econf, but the quotes cause configure to fail.
128 sed -i -e \
129 's|-DARON_WAS_HERE|-DGENTOO_NSPLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsplugins\\\" -DGENTOO_NSBROWSER_PLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsbrowser/plugins\\\"|' \
130 ${S}/config/autoconf.mk \
131 ${S}/nsprpub/config/autoconf.mk \
132 ${S}/xpfe/global/buildconfig.html
133
134 # Fixup the RPATH
135 sed -i -e \
136 's|#RPATH_FIXER|'"${MOZILLA_FIVE_HOME}"'|' \
137 ${S}/config/rules.mk \
138 ${S}/nsprpub/config/rules.mk \
139 ${S}/security/coreconf/rules.mk \
140 ${S}/security/coreconf/rules.mk
141
142 # This removes extraneous CFLAGS from the Makefiles to reduce RAM
143 # requirements while compiling
144 edit_makefiles
145
146 emake || die
147 }
148
149 src_install() {
150 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
151
152 # Most of the installation happens here
153 dodir ${MOZILLA_FIVE_HOME}
154 cp -RL ${S}/dist/bin/* ${D}${MOZILLA_FIVE_HOME} || die "Failed to Copy"
155
156 # Create directory structure to support portage-installed extensions.
157 # See update_chrome() in mozilla-launcher
158 keepdir ${MOZILLA_FIVE_HOME}/chrome.d
159 keepdir ${MOZILLA_FIVE_HOME}/extensions.d
160 cp ${D}${MOZILLA_FIVE_HOME}/chrome/installed-chrome.txt \
161 ${D}${MOZILLA_FIVE_HOME}/chrome.d/0_base-chrome.txt || die "Failed to Copy"
162
163 # Create /usr/bin/firefox
164 install_mozilla_launcher_stub firefox ${MOZILLA_FIVE_HOME}
165
166 # Install icon and .desktop for menu entry
167 insinto /usr/share/pixmaps
168 doins ${FILESDIR}/icon/firefox-icon.png
169
170 # Fix bug 54179: Install .desktop file into /usr/share/applications
171 # instead of /usr/share/gnome/apps/Internet (18 Jun 2004 agriffis)
172 insinto /usr/share/applications
173 doins ${FILESDIR}/icon/mozillafirefox.desktop
174
175 # Fix icons to look the same everywhere
176 insinto ${MOZILLA_FIVE_HOME}/icons
177 doins ${S}/build/package/rpm/SOURCES/mozicon16.xpm
178 doins ${S}/build/package/rpm/SOURCES/mozicon50.xpm
179
180 ####################################
181 #
182 # Install files necessary for applications to build against firefox
183 #
184 ####################################
185
186 einfo "Installing includes and idl files..."
187 dodir ${MOZILLA_FIVE_HOME}/{include,idl} /usr/include
188 cd ${S}/dist
189 cp -LfR include/* ${D}${MOZILLA_FIVE_HOME}/include || die "Failed to Copy"
190 cp -LfR idl/* ${D}${MOZILLA_FIVE_HOME}/idl || die "Failed to Copy"
191
192 # Dirty hack to get some applications using this header running
193 dosym ${MOZILLA_FIVE_HOME}/include/necko/nsIURI.h \
194 /usr/$(get_libdir)/${MOZILLA_FIVE_HOME##*/}/include/nsIURI.h
195
196 # Compatibility symlink so that applications can still build against firefox
197 # even though it has moved. To remove this symlink, grep -r MozillaFirefox
198 # /usr/portage and fix those ebuilds
199 dosym ${MOZILLA_FIVE_HOME##*/} ${MOZILLA_FIVE_HOME%/*}/MozillaFirefox
200
201 # Fix firefox-config and install it
202 sed -i -e "s|/usr/$(get_libdir)/firefox-${PV}|${MOZILLA_FIVE_HOME}|g
203 s|/usr/include/firefox-${PV}|${MOZILLA_FIVE_HOME}/include|g
204 s|/usr/share/idl/firefox-${MY_PV}|${MOZILLA_FIVE_HOME}/idl|g
205 s|%{idldir}|${MOZILLA_FIVE_HOME}/idl|g
206 s|\(echo -L.*\)\($\)|\1 -Wl,-rpath,${MOZILLA_FIVE_HOME}\2|" \
207 ${S}/build/unix/firefox-config
208 exeinto ${MOZILLA_FIVE_HOME}
209 doexe ${S}/build/unix/firefox-config
210
211 # Fix pkgconfig files and install them
212 insinto /usr/$(get_libdir)/pkgconfig
213 for x in ${S}/build/unix/*.pc; do
214 sed -i -e "s|^libdir=.*|libdir=${MOZILLA_FIVE_HOME}|
215 s|^includedir=.*|includedir=${MOZILLA_FIVE_HOME}/include|
216 s|^idldir=.*|idldir=${MOZILLA_FIVE_HOME}/idl|
217 s|\(Libs:.*\)\($\)|\1 -Wl,-rpath,\${libdir}\2|" ${x}
218 doins ${x}
219 done
220
221 # Install env.d snippet, which isn't necessary for running firefox, but
222 # might be necessary for programs linked against firefox
223 insinto /etc/env.d
224 doins ${FILESDIR}/10MozillaFirefox
225 dosed "s|/usr/lib|/usr/$(get_libdir)|" /etc/env.d/10MozillaFirefox
226
227 # Install docs
228 dodoc ${S}/{LEGAL,LICENSE}
229 }
230
231 pkg_postinst() {
232 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
233
234 # Update the component registry
235 MOZILLA_LIBDIR=${ROOT}${MOZILLA_FIVE_HOME} MOZILLA_LAUNCHER=firefox \
236 /usr/libexec/mozilla-launcher -register
237
238 # This should be called in the postinst and postrm of all the
239 # mozilla, mozilla-bin, firefox, firefox-bin, thunderbird and
240 # thunderbird-bin ebuilds.
241 update_mozilla_launcher_symlinks
242 }
243
244 pkg_postrm() {
245 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
246
247 # Update the component registry
248 MOZILLA_LIBDIR=${ROOT}${MOZILLA_FIVE_HOME} MOZILLA_LAUNCHER=firefox \
249 /usr/libexec/mozilla-launcher -register
250
251 update_mozilla_launcher_symlinks
252 }

  ViewVC Help
Powered by ViewVC 1.1.20