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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sun Jan 8 17:38:40 2006 UTC (14 years, 10 months ago) by anarchy
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
bug #117331, linguas support, uriloader patch updated
(Portage version: 2.1_pre3-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.5-r4.ebuild,v 1.1 2005/12/23 03:48:38 anarchy Exp ${PV}_rc3-r2.ebuild,v 1.1 2005/11/26 04:20:32 anarchy 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
11 inherit flag-o-matic toolchain-funcs eutils mozconfig-2 mozilla-launcher makeedit multilib fdo-mime versionator
12
13 DESCRIPTION="Firefox Web Browser"
14 HOMEPAGE="http://www.mozilla.org/projects/firefox/"
15 SRC_URI="ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${PV}/source/firefox-${PV}-source.tar.bz2
16 mirror://gentoo/mozilla-jslibmath-alpha.patch
17 mirror://gentoo/embed-typeaheadfind-1.patch
18 http://dev.gentoo.org/~agriffis/dist/mozilla-1.7.10-nsplugins-v2.patch"
19
20 KEYWORDS="-* ~amd64 ~ppc ~x86"
21 SLOT="0"
22 LICENSE="MPL-1.1 NPL-1.1"
23 IUSE="java mozdevelop"
24
25 RDEPEND="java? ( virtual/jre )
26 >=www-client/mozilla-launcher-1.39"
27
28 DEPEND="${RDEPEND}
29 java? ( >=dev-java/java-config-0.2.0 )"
30
31 S=${WORKDIR}/mozilla
32
33 # Needed by src_compile() and src_install().
34 # Would do in pkg_setup but that loses the export attribute, they
35 # become pure shell variables.
36 export MOZ_CO_PROJECT=browser
37 export BUILD_OFFICIAL=1
38 export MOZILLA_OFFICIAL=1
39
40 src_unpack() {
41 unpack firefox-${PV}-source.tar.bz2
42 cd ${S} || die "cd failed"
43
44 ####################################
45 #
46 # architecture patches
47 #
48 ####################################
49
50 # alpha stubs patch from lfs project.
51 # <taviso@gentoo.org> (26 Jun 2003)
52 use alpha && epatch ${FILESDIR}/${PV}/mozilla-1.3-alpha-stubs.patch
53
54 # addresses visibility issues on ppc and amd64
55 # will not hurt to apply on other archs as well.
56 epatch ${FILESDIR}/${PV}/firefox-1.1-visibility.patch
57
58 # hppa patches from Ivar <orskaug@stud.ntnu.no>
59 # <gmsoft@gentoo.org> (22 Dec 2004)
60 epatch ${FILESDIR}/${PV}/mozilla-hppa.patch
61
62 # patch to solve segfaults on ia64, from Debian, originally from David
63 # Mosberger
64 epatch ${FILESDIR}/${PV}/mozilla-firefox-1.1a2-ia64.patch
65
66 # patch to fix math operations on alpha, makes maps.google.com work!
67 epatch ${DISTDIR}/mozilla-jslibmath-alpha.patch
68
69 # fix pkgconfig files properly to contain gentoo-locations
70 epatch ${FILESDIR}/firefox-gentoo-pkgconfig.patch
71
72 ####################################
73 #
74 # general compilation and run-time fixes
75 #
76 ####################################
77
78 # patch from fedora to remove the pangoxft things
79 epatch ${FILESDIR}/${PV}/firefox-nopangoxft.patch
80 # cairo-canvas patch, only needed to build against system cairo
81 epatch ${FILESDIR}/${PV}/firefox-cairo-canvas.patch
82
83 # patch from fedora to stop crashing with gnome-vfs
84 epatch ${FILESDIR}/firefox-1.1-uriloader.patch
85
86 ####################################
87 #
88 # behavioral fixes
89 #
90 ####################################
91
92 # patch to fix typeahead find for browsers which embed Firefox
93 # http://bugzilla.gnome.org/show_bug.cgi?id=157435
94 epatch ${DISTDIR}/embed-typeaheadfind-1.patch
95 epatch ${FILESDIR}/${PV}/${P}-gtk.patch
96
97 # rpath fix
98 epatch ${FILESDIR}/mozilla-rpath-1.patch
99 epatch ${DISTDIR}/mozilla-1.7.10-nsplugins-v2.patch
100
101 # Fix scripts that call for /usr/local/bin/perl #51916
102 ebegin "Patching smime to call perl from /usr/bin"
103 sed -i -e '1s,usr/local/bin,usr/bin,' ${S}/security/nss/cmd/smimetools/smime
104 eend $? || die "sed failed"
105
106 #security fix in history
107 cd ${S}
108 epatch ${FILESDIR}/${PV}/${P}-history.patch
109 epatch ${FILESDIR}/${PV}/${P}-mork.patch
110
111 # Fix a compilation issue using the 32-bit userland with 64-bit kernel on
112 # PowerPC, because with that configuration, it detects a ppc64 system.
113 # -- hansmi, 2005-11-13
114 if use ppc && [[ "${PROFILE_ARCH}" == ppc64 ]]; then
115 sed -i -e "s#OS_TEST=\`uname -m\`\$#OS_TEST=${ARCH}#" \
116 ${S}/configure
117 sed -i -e "s#OS_TEST :=.*uname -m.*\$#OS_TEST:=${ARCH}#" \
118 ${S}/security/coreconf/arch.mk
119 fi
120 }
121
122 src_compile() {
123 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
124
125 ####################################
126 #
127 # mozconfig, CFLAGS and CXXFLAGS setup
128 #
129 ####################################
130
131 mozconfig_init
132 mozconfig_config
133
134 mozconfig_annotate '' --enable-extensions=default,typeaheadfind
135 mozconfig_annotate '' --disable-mailnews
136 #mozconfig_annotate '' --enable-native-uconv
137 mozconfig_annotate '' --enable-image-encoder=all
138 mozconfig_annotate '' --enable-canvas
139
140 # Bug 60668: Galeon doesn't build without oji enabled, so enable it
141 # regardless of java setting.
142 mozconfig_annotate '' --enable-oji --enable-mathml
143
144 # Other ff-specific settings
145 mozconfig_use_enable mozdevelop jsd
146 mozconfig_use_enable mozdevelop xpctools
147 mozconfig_use_extension mozdevelop venkman
148 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
149
150 # Finalize and report settings
151 mozconfig_final
152
153 # hardened GCC uses -fstack-protector-all by default, which breaks us
154 has_hardened && append-flags -fno-stack-protector-all
155 # remove -fstack-protector because now it borks firefox
156 CFLAGS=${CFLAGS/-fstack-protector-all/}
157 CFLAGS=${CFLAGS/-fstack-protector/}
158 CXXFLAGS=${CXXFLAGS/-fstack-protector-all/}
159 CXXFLAGS=${CXXFLAGS/-fstack-protector/}
160
161 append-flags -freorder-blocks -fno-reorder-functions
162
163 ####################################
164 #
165 # Configure and build
166 #
167 ####################################
168
169 CPPFLAGS="${CPPFLAGS} -DARON_WAS_HERE" \
170 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
171 econf || die
172
173 # It would be great if we could pass these in via CPPFLAGS or CFLAGS prior
174 # to econf, but the quotes cause configure to fail.
175 sed -i -e \
176 's|-DARON_WAS_HERE|-DGENTOO_NSPLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsplugins\\\" -DGENTOO_NSBROWSER_PLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsbrowser/plugins\\\"|' \
177 ${S}/config/autoconf.mk \
178 ${S}/nsprpub/config/autoconf.mk \
179 ${S}/xpfe/global/buildconfig.html
180
181 # Fixup the RPATH
182 sed -i -e \
183 's|#RPATH_FIXER|'"${MOZILLA_FIVE_HOME}"'|' \
184 ${S}/config/rules.mk \
185 ${S}/nsprpub/config/rules.mk \
186 ${S}/security/coreconf/rules.mk
187
188 # This removes extraneous CFLAGS from the Makefiles to reduce RAM
189 # requirements while compiling
190 edit_makefiles
191
192 emake || die
193 }
194
195 src_install() {
196 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
197
198 # Most of the installation happens here
199 dodir ${MOZILLA_FIVE_HOME}
200 cp -RL ${S}/dist/bin/* ${D}${MOZILLA_FIVE_HOME}
201
202 # Create directory structure to support portage-installed extensions.
203 # See update_chrome() in mozilla-launcher
204 keepdir ${MOZILLA_FIVE_HOME}/chrome.d
205 keepdir ${MOZILLA_FIVE_HOME}/extensions.d
206 cp ${D}${MOZILLA_FIVE_HOME}/chrome/installed-chrome.txt \
207 ${D}${MOZILLA_FIVE_HOME}/chrome.d/0_base-chrome.txt
208
209 # Create /usr/bin/firefox
210 install_mozilla_launcher_stub firefox ${MOZILLA_FIVE_HOME}
211
212 # Install icon and .desktop for menu entry
213 doicon ${FILESDIR}/icon/firefox-icon.png
214 domenu ${FILESDIR}/icon/mozillafirefox.desktop
215
216 # Fix icons to look the same everywhere
217 insinto ${MOZILLA_FIVE_HOME}/icons
218 doins ${S}/dist/branding/mozicon16.xpm
219 doins ${S}/dist/branding/mozicon50.xpm
220
221 ####################################
222 #
223 # Install files necessary for applications to build against firefox
224 #
225 ####################################
226
227 ewarn "Installing includes and idl files..."
228 dodir ${MOZILLA_FIVE_HOME}/idl ${MOZILLA_FIVE_HOME}/include
229 cd ${S}/dist
230 cp -LfR include/* ${D}${MOZILLA_FIVE_HOME}/include || die "failed to copy"
231 cp -LfR idl/* ${D}${MOZILLA_FIVE_HOME}/idl || die "failed to copy"
232
233 # Dirty hack to get some applications using this header running
234 dosym ${MOZILLA_FIVE_HOME}/include/necko/nsIURI.h \
235 /usr/$(get_libdir)/${MOZILLA_FIVE_HOME##*/}/include/nsIURI.h
236
237
238 # Fix pkgconfig files and install them
239 insinto /usr/$(get_libdir)/pkgconfig
240 for x in ${S}/build/unix/*.pc; do
241 doins ${x}
242 done
243
244 ####################################
245 #
246 # Some preferences, probably gentoo.org as start-page also
247 #
248 ####################################
249
250 dodir ${MOZILLA_FIVE_HOME}/greprefs
251 cp ${FILESDIR}/gentoo-default-prefs.js ${D}/${MOZILLA_FIVE_HOME}/greprefs/all-gentoo.js
252 dodir ${MOZILLA_FIVE_HOME}/defaults/pref
253 cp ${FILESDIR}/gentoo-default-prefs.js ${D}/${MOZILLA_FIVE_HOME}/defaults/pref/all-gentoo.js
254
255 # Install docs
256 dodoc LEGAL
257 }
258
259 pkg_postinst() {
260 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
261
262 # This should be called in the postinst and postrm of all the
263 # mozilla, mozilla-bin, firefox, firefox-bin, thunderbird and
264 # thunderbird-bin ebuilds.
265 update_mozilla_launcher_symlinks
266
267 # Update mimedb for the new .desktop file
268 fdo-mime_desktop_database_update
269
270 echo ""
271 ewarn "Please remember to rebuild any packages that you have built"
272 ewarn "against firefox. Some packages might be busted please search"
273 ewarn "http://bugs.gentoo.org if no bug is open, then please open a new"
274 ewarn "bug report so these can be fixed."
275 ewarn "Thank you! anarchy@gentoo.org."
276 echo ""
277 einfo "I am unable to brand firefox or thunderbird officially yet."
278 einfo "You will see that everything says Deer Park cause of this."
279 einfo "As soon as I can brand it I will commit a -r1 release."
280 }
281
282 pkg_postrm() {
283 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
284
285 update_mozilla_launcher_symlinks
286 }

  ViewVC Help
Powered by ViewVC 1.1.20