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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Mon Nov 21 00:17:58 2005 UTC (15 years ago) by anarchy
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
refer to changelog
(Portage version: 2.0.53_rc7)

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_rc3.ebuild,v 1.1 2005/11/18 04:00:51 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 MY_P="$(replace_version_separator 2 '')"
14 FV=${MY_P/beta/b}
15
16 DESCRIPTION="Firefox Web Browser"
17 HOMEPAGE="http://www.mozilla.org/projects/firefox/"
18 SRC_URI="http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${FV}/source/firefox-${FV}-source.tar.bz2
19 mirror://gentoo/mozilla-jslibmath-alpha.patch
20 mirror://gentoo/embed-typeaheadfind.patch"
21
22 KEYWORDS="-*"
23 SLOT="0"
24 LICENSE="MPL-1.1 NPL-1.1"
25 IUSE="java mozdevelop"
26
27 RDEPEND="java? ( virtual/jre )
28 >=www-client/mozilla-launcher-1.39"
29
30 DEPEND="${RDEPEND}
31 java? ( >=dev-java/java-config-0.2.0 )"
32
33 S=${WORKDIR}/mozilla
34
35 # Needed by src_compile() and src_install().
36 # Would do in pkg_setup but that loses the export attribute, they
37 # become pure shell variables.
38 export MOZ_CO_PROJECT=browser
39 export BUILD_OFFICIAL=1
40 export MOZILLA_OFFICIAL=1
41
42 src_unpack() {
43 unpack firefox-${FV}-source.tar.bz2
44 cd ${S} || die "cd failed"
45
46 ####################################
47 #
48 # architecture patches
49 #
50 ####################################
51
52 # alpha stubs patch from lfs project.
53 # <taviso@gentoo.org> (26 Jun 2003)
54 use alpha && epatch ${FILESDIR}/1.5/mozilla-1.3-alpha-stubs.patch
55
56 # amd64 visibility patch
57 if [[ ${ARCH} == amd64 ]] && [[ $(gcc-major-version) -ge 3 ]]; then
58 epatch ${FILESDIR}/1.5/firefox-visibility.patch
59 fi
60
61 # hppa patches from Ivar <orskaug@stud.ntnu.no>
62 # <gmsoft@gentoo.org> (22 Dec 2004)
63 epatch ${FILESDIR}/1.5/mozilla-hppa.patch
64
65 # patch to solve segfaults on ia64, from Debian, originally from David
66 # Mosberger
67 epatch ${FILESDIR}/1.5/mozilla-firefox-1.1a2-ia64.patch
68
69 # patch to fix math operations on alpha, makes maps.google.com work!
70 epatch ${DISTDIR}/mozilla-jslibmath-alpha.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}/1.5/firefox-nopangoxft.patch
80 # cairo-canvas patch, only needed to build against system cairo
81 # epatch ${FILESDIR}/1.5/firefox-cairo-canvas.patch
82
83 # fix pkgconfig files properly
84 epatch ${FILESDIR}/firefox-pkgconfig.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.patch
95
96 # rpath fix
97 epatch ${FILESDIR}/mozilla-rpath-1.patch
98
99 # Fix scripts that call for /usr/local/bin/perl #51916
100 ebegin "Patching smime to call perl from /usr/bin"
101 sed -i -e '1s,usr/local/bin,usr/bin,' ${S}/security/nss/cmd/smimetools/smime
102 eend $? || die "sed failed"
103
104 echo ""
105 ewarn "Even tho this is 1.5rc3 I am gonna take bug reports"
106 ewarn "If you can attach a patch for any problems you may encounter"
107 ewarn "I will push bugs upstream if I feel it is need, do not take"
108 ewarn "offense or think I am blowing your bug report off"
109 ewarn "Thank you! Anarchy."
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 mozconfig_annotate '' --enable-extensions=default,typeaheadfind
124 mozconfig_annotate '' --disable-mailnews
125 #mozconfig_annotate '' --enable-native-uconv
126 mozconfig_annotate '' --enable-image-encoder=all
127
128 # Bug 60668: Galeon doesn't build without oji enabled, so enable it
129 # regardless of java setting.
130 mozconfig_annotate '' --enable-oji --enable-mathml
131
132 # Other ff-specific settings
133 mozconfig_use_enable mozdevelop jsd
134 mozconfig_use_enable mozdevelop xpctools
135 mozconfig_use_extension mozdevelop venkman
136 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
137
138 # Finalize and report settings
139 mozconfig_final
140
141 # hardened GCC uses -fstack-protector-all by default, which breaks us
142 has_hardened && append-flags -fno-stack-protector-all
143 # remove -fstack-protector because now it borks firefox
144 CFLAGS=${CFLAGS/-fstack-protector-all/}
145 CFLAGS=${CFLAGS/-fstack-protector/}
146 CXXFLAGS=${CXXFLAGS/-fstack-protector-all/}
147 CXXFLAGS=${CXXFLAGS/-fstack-protector/}
148
149 ####################################
150 #
151 # Configure and build
152 #
153 ####################################
154
155 CPPFLAGS="${CPPFLAGS} -DARON_WAS_HERE" \
156 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
157 econf || die
158
159 # It would be great if we could pass these in via CPPFLAGS or CFLAGS prior
160 # to econf, but the quotes cause configure to fail.
161 sed -i -e \
162 's|-DARON_WAS_HERE|-DGENTOO_NSPLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsplugins\\\" -DGENTOO_NSBROWSER_PLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsbrowser/plugins\\\"|' \
163 ${S}/config/autoconf.mk \
164 ${S}/nsprpub/config/autoconf.mk \
165 ${S}/xpfe/global/buildconfig.html
166
167 # Fixup the RPATH
168 sed -i -e \
169 's|#RPATH_FIXER|'"${MOZILLA_FIVE_HOME}"'|' \
170 ${S}/config/rules.mk \
171 ${S}/nsprpub/config/rules.mk \
172 ${S}/security/coreconf/rules.mk
173
174 # This removes extraneous CFLAGS from the Makefiles to reduce RAM
175 # requirements while compiling
176 edit_makefiles
177
178 emake || die
179 }
180
181 src_install() {
182 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
183
184 # Most of the installation happens here
185 dodir ${MOZILLA_FIVE_HOME}
186 cp -RL ${S}/dist/bin/* ${D}${MOZILLA_FIVE_HOME}
187
188 # Create directory structure to support portage-installed extensions.
189 # See update_chrome() in mozilla-launcher
190 keepdir ${MOZILLA_FIVE_HOME}/chrome.d
191 keepdir ${MOZILLA_FIVE_HOME}/extensions.d
192 cp ${D}${MOZILLA_FIVE_HOME}/chrome/installed-chrome.txt \
193 ${D}${MOZILLA_FIVE_HOME}/chrome.d/0_base-chrome.txt
194
195 # Create /usr/bin/firefox
196 install_mozilla_launcher_stub firefox ${MOZILLA_FIVE_HOME}
197
198 # Install icon and .desktop for menu entry
199 doicon ${FILESDIR}/icon/firefox-icon.png
200 domenu ${FILESDIR}/icon/mozillafirefox.desktop
201
202 # Fix icons to look the same everywhere
203 insinto ${MOZILLA_FIVE_HOME}/icons
204 doins ${S}/dist/branding/mozicon16.xpm
205 doins ${S}/dist/branding/mozicon50.xpm
206
207 ####################################
208 #
209 # Install files necessary for applications to build against firefox
210 #
211 ####################################
212
213 ewarn "Installing includes and idl files..."
214 dodir ${MOZILLA_FIVE_HOME}/idl ${MOZILLA_FIVE_HOME}/include
215 cd ${S}/dist
216 cp -LfR include/* ${D}${MOZILLA_FIVE_HOME}/include || die "failed to copy"
217 cp -LfR idl/* ${D}${MOZILLA_FIVE_HOME}/idl || die "failed to copy"
218
219 # Dirty hack to get some applications using this header running
220 dosym ${MOZILLA_FIVE_HOME}/include/necko/nsIURI.h \
221 /usr/$(get_libdir)/${MOZILLA_FIVE_HOME##*/}/include/nsIURI.h
222
223 # Fix firefox-config and install it
224 sed -i -e "s|\(echo -L.*\)\($\)|\1 -Wl,-R${MOZILLA_FIVE_HOME}\2|" \
225 ${S}/build/unix/firefox-config
226 exeinto ${MOZILLA_FIVE_HOME}
227 doexe ${S}/build/unix/firefox-config
228
229 # Fix pkgconfig files and install them
230 insinto /usr/$(get_libdir)/pkgconfig
231 for x in ${S}/build/unix/*.pc; do
232 sed -i -e "s|\(^Libs: -L.*\)\($\)|\1 -Wl,-R\$\{libdir\}\2|" ${x}
233 doins ${x}
234 done
235
236 ####################################
237 #
238 # Some preferences, probably gentoo.org as start-page also
239 #
240 ####################################
241
242 dodir ${D}/${MOZILLA_FIVE_HOME}/greprefs
243 cp ${FILESDIR}/gentoo-default-prefs.js ${D}/${MOZILLA_FIVE_HOME}/greprefs/all-gentoo.js
244 dodir ${D}/${MOZILLA_FIVE_HOME}/defaults/pref
245 cp ${FILESDIR}/gentoo-default-prefs.js ${D}/${MOZILLA_FIVE_HOME}/defaults/pref/all-gentoo.js
246
247 # Install docs
248 dodoc LEGAL LICENSE
249 }
250
251 pkg_postinst() {
252 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
253
254 # This should be called in the postinst and postrm of all the
255 # mozilla, mozilla-bin, firefox, firefox-bin, thunderbird and
256 # thunderbird-bin ebuilds.
257 update_mozilla_launcher_symlinks
258
259 # Update mimedb for the new .desktop file
260 fdo-mime_desktop_database_update
261
262 echo ""
263 ewarn "Even tho this is 1.5rc3 I am gonna take bug reports"
264 ewarn "If you can, attach a patch for any problems you may encounter"
265 ewarn "I will push bugs upstream if I feel it is need, do not take"
266 ewarn "offense or think I am blowing your bug report off"
267 ewarn "Thank you! Anarchy."
268 }
269
270 pkg_postrm() {
271 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
272
273 update_mozilla_launcher_symlinks
274 }

  ViewVC Help
Powered by ViewVC 1.1.20