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

Contents of /www-client/mozilla-firefox/mozilla-firefox-1.5_rc1-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Mon Nov 14 18:35:46 2005 UTC (15 years ago) by anarchy
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
revision bump
(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_rc1-r1.ebuild,v 1.1 2005/11/07 03:10:13 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 =x11-libs/pango-1.10.1"
30
31 DEPEND="${RDEPEND}
32 java? ( >=dev-java/java-config-0.2.0 )"
33
34 S=${WORKDIR}/mozilla
35
36 # Needed by src_compile() and src_install().
37 # Would do in pkg_setup but that loses the export attribute, they
38 # become pure shell variables.
39 export MOZ_CO_PROJECT=browser
40 export BUILD_OFFICIAL=1
41 export MOZILLA_OFFICIAL=1
42
43 src_unpack() {
44 unpack firefox-${FV}-source.tar.bz2
45 cd ${S} || die "cd failed"
46
47 ####################################
48 #
49 # architecture patches
50 #
51 ####################################
52
53 # alpha stubs patch from lfs project.
54 # <taviso@gentoo.org> (26 Jun 2003)
55 use alpha && epatch ${FILESDIR}/1.5/mozilla-1.3-alpha-stubs.patch
56
57 # amd64 visibility patch
58 if [[ ${ARCH} == amd64 ]] && [[ $(gcc-major-version) -ge 3 ]]; then
59 epatch ${FILESDIR}/1.5/firefox-visibility.patch
60 fi
61
62 # hppa patches from Ivar <orskaug@stud.ntnu.no>
63 # <gmsoft@gentoo.org> (22 Dec 2004)
64 epatch ${FILESDIR}/1.5/mozilla-hppa.patch
65
66 # patch to solve segfaults on ia64, from Debian, originally from David
67 # Mosberger
68 epatch ${FILESDIR}/1.5/mozilla-firefox-1.1a2-ia64.patch
69
70 # patch to fix math operations on alpha, makes maps.google.com work!
71 epatch ${DISTDIR}/mozilla-jslibmath-alpha.patch
72
73 ####################################
74 #
75 # general compilation and run-time fixes
76 #
77 ####################################
78
79 # patch from fedora to remove the pangoxft things
80 epatch ${FILESDIR}/1.5/firefox-nopangoxft.patch
81 #cairo-canvas patch
82 epatch ${FILESDIR}/1.5/firefox-cairo-canvas.patch
83
84 ####################################
85 #
86 # behavioral fixes
87 #
88 ####################################
89
90 # patch to fix typeahead find for browsers which embed Firefox
91 # http://bugzilla.gnome.org/show_bug.cgi?id=157435
92 epatch ${DISTDIR}/embed-typeaheadfind.patch
93
94 # Fix scripts that call for /usr/local/bin/perl #51916
95 ebegin "Patching smime to call perl from /usr/bin"
96 sed -i -e '1s,usr/local/bin,usr/bin,' ${S}/security/nss/cmd/smimetools/smime
97 eend $? || die "sed failed"
98
99 echo
100 ewarn "This firefox-1.5rc1 ebuild is provided for your convenience,"
101 ewarn "the use of this ebuild is not supported by gentoo developers. "
102 ewarn "Please file bugs related to firefox-1.5 with upstream developers."
103 ewarn "Bugs should be filed @ https://bugzilla.mozilla.org."
104 ewarn "Thank you Anarchy"
105 }
106
107 src_compile() {
108 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
109
110 ####################################
111 #
112 # mozconfig, CFLAGS and CXXFLAGS setup
113 #
114 ####################################
115
116 mozconfig_init
117
118 mozconfig_annotate '' --enable-extensions=default,typeaheadfind
119 mozconfig_annotate '' --disable-mailnews
120 #mozconfig_annotate '' --enable-native-uconv
121 mozconfig_annotate '' --enable-image-encoder=all
122
123 # Bug 60668: Galeon doesn't build without oji enabled, so enable it
124 # regardless of java setting.
125 mozconfig_annotate '' --enable-oji --enable-mathml
126
127 # Other ff-specific settings
128 mozconfig_use_enable mozdevelop jsd
129 mozconfig_use_enable mozdevelop xpctools
130 mozconfig_use_extension mozdevelop venkman
131 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
132
133 # Finalize and report settings
134 mozconfig_final
135
136 # hardened GCC uses -fstack-protector-all by default, which breaks us
137 has_hardened && append-flags -fno-stack-protector-all
138 # remove -fstack-protector because now it borks firefox
139 CFLAGS=${CFLAGS/-fstack-protector-all/}
140 CFLAGS=${CFLAGS/-fstack-protector/}
141 CXXFLAGS=${CXXFLAGS/-fstack-protector-all/}
142 CXXFLAGS=${CXXFLAGS/-fstack-protector/}
143
144 ####################################
145 #
146 # Configure and build
147 #
148 ####################################
149
150 CPPFLAGS="${CPPFLAGS} -DARON_WAS_HERE" \
151 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
152 econf || die
153
154 # It would be great if we could pass these in via CPPFLAGS or CFLAGS prior
155 # to econf, but the quotes cause configure to fail.
156 sed -i -e \
157 's|-DARON_WAS_HERE|-DGENTOO_NSPLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsplugins\\\" -DGENTOO_NSBROWSER_PLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsbrowser/plugins\\\"|' \
158 ${S}/config/autoconf.mk \
159 ${S}/nsprpub/config/autoconf.mk \
160 ${S}/xpfe/global/buildconfig.html
161
162 # Fixup the RPATH
163 sed -i -e \
164 's|#RPATH_FIXER|'"${MOZILLA_FIVE_HOME}"'|' \
165 ${S}/config/rules.mk \
166 ${S}/nsprpub/config/rules.mk \
167 ${S}/security/coreconf/rules.mk \
168 ${S}/security/coreconf/rules.mk
169
170 # This removes extraneous CFLAGS from the Makefiles to reduce RAM
171 # requirements while compiling
172 edit_makefiles
173
174 emake || die
175 }
176
177 src_install() {
178 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
179
180 # Most of the installation happens here
181 dodir ${MOZILLA_FIVE_HOME}
182 cp -RL ${S}/dist/bin/* ${D}${MOZILLA_FIVE_HOME}
183
184 # Create directory structure to support portage-installed extensions.
185 # See update_chrome() in mozilla-launcher
186 keepdir ${MOZILLA_FIVE_HOME}/chrome.d
187 keepdir ${MOZILLA_FIVE_HOME}/extensions.d
188 cp ${D}${MOZILLA_FIVE_HOME}/chrome/installed-chrome.txt \
189 ${D}${MOZILLA_FIVE_HOME}/chrome.d/0_base-chrome.txt
190
191 # Create /usr/bin/firefox
192 install_mozilla_launcher_stub firefox ${MOZILLA_FIVE_HOME}
193
194 # Install icon and .desktop for menu entry
195 insinto /usr/share/pixmaps
196 doins ${FILESDIR}/icon/firefox-icon.png
197
198 # Fix bug 54179: Install .desktop file into /usr/share/applications
199 # instead of /usr/share/gnome/apps/Internet (18 Jun 2004 agriffis)
200 insinto /usr/share/applications
201 doins ${FILESDIR}/icon/mozillafirefox.desktop
202
203 ####################################
204 #
205 # Install files necessary for applications to build against firefox
206 #
207 ####################################
208
209 ewarn "Installing includes and idl files..."
210 dodir ${MOZILLA_FIVE_HOME}/idl ${MOZILLA_FIVE_HOME}/include
211 cd ${S}/dist
212 cp -LfR include/* ${D}${MOZILLA_FIVE_HOME}/include || die "failed to copy"
213 cp -LfR idl/* ${D}${MOZILLA_FIVE_HOME}/idl || die "failed to copy"
214
215 # Dirty hack to get some applications using this header running
216 dosym ${MOZILLA_FIVE_HOME}/include/necko/nsIURI.h \
217 /usr/$(get_libdir)/${MOZILLA_FIVE_HOME##*/}/include/nsIURI.h
218
219 # Fix firefox-config and install it
220 sed -i -e "s|/usr/lib/firefox-${MY_PV}|${MOZILLA_FIVE_HOME}|g
221 s|/usr/include/firefox-${MY_PV}|${MOZILLA_FIVE_HOME}/include|g
222 s|/usr/share/idl/firefox-${MY_PV}|${MOZILLA_FIVE_HOME}/idl|g
223 s|\(echo -L.*\)\($\)|\1 -Wl,-R${MOZILLA_FIVE_HOME}\2|" \
224 ${S}/build/unix/firefox-config
225 exeinto ${MOZILLA_FIVE_HOME}
226 doexe ${S}/build/unix/firefox-config
227
228 # Fix pkgconfig files and install them
229 sed -i -e "s|-L/usr/lib/firefox-${MY_PV}|-L\$\{libdir\}|
230 s|-I/usr/include/firefox-${MY_PV}|-I\$\{includedir\}|" \
231 ${S}/build/unix/firefox-nspr.pc
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: -L.*\)\($\)|\1 -Wl,-R\$\{libdir\}\2|" ${x}
238 doins ${x}
239 done
240
241 ####################################
242 #
243 # Some preferences, probably gentoo.org as start-page also
244 #
245 ####################################
246
247 dodir ${D}/${MOZILLA_FIVE_HOME}/greprefs
248 cp ${FILESDIR}/gentoo-default-prefs.js ${D}/${MOZILLA_FIVE_HOME}/greprefs/all-gentoo.js
249 dodir ${D}/${MOZILLA_FIVE_HOME}/defaults/pref
250 cp ${FILESDIR}/gentoo-default-prefs.js ${D}/${MOZILLA_FIVE_HOME}/defaults/pref/all-gentoo.js
251
252 # Install docs
253 dodoc LEGAL LICENSE
254 }
255
256 pkg_postinst() {
257 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
258
259 # This should be called in the postinst and postrm of all the
260 # mozilla, mozilla-bin, firefox, firefox-bin, thunderbird and
261 # thunderbird-bin ebuilds.
262 update_mozilla_launcher_symlinks
263
264 echo
265 ewarn "This firefox-1.5rc1 ebuild is provided for your convenience,"
266 ewarn "the use of this ebuild is not supported by gentoo developers. "
267 ewarn "Please file bugs related to firefox-1.5 with upstream developers."
268 ewarn "Bugs should be filed @ https://bugzilla.mozilla.org."
269 ewarn "Thank you. anarchy@gentoo.org for more info"
270 }
271
272 pkg_postrm() {
273 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
274
275 update_mozilla_launcher_symlinks
276 }

  ViewVC Help
Powered by ViewVC 1.1.20