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

Contents of /www-client/mozilla-firefox/mozilla-firefox-1.5_rc2-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Thu Nov 17 21:17:59 2005 UTC (15 years ago) by anarchy
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
pkg-config patch for makefile
(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_rc2-r2.ebuild,v 1.1 2005/11/16 22:53:28 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 # rpath fix
95 epatch ${FILESDIR}/mozilla-rpath-1.patch
96
97 # Fix scripts that call for /usr/local/bin/perl #51916
98 ebegin "Patching smime to call perl from /usr/bin"
99 sed -i -e '1s,usr/local/bin,usr/bin,' ${S}/security/nss/cmd/smimetools/smime
100 eend $? || die "sed failed"
101
102 echo
103 ewarn "This firefox-1.5rc1 ebuild is provided for your convenience,"
104 ewarn "the use of this ebuild is not supported by gentoo developers. "
105 ewarn "Please file bugs related to firefox-1.5 with upstream developers."
106 ewarn "Bugs should be filed @ https://bugzilla.mozilla.org."
107 ewarn "Thank you Anarchy"
108 }
109
110 src_compile() {
111 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
112
113 ####################################
114 #
115 # mozconfig, CFLAGS and CXXFLAGS setup
116 #
117 ####################################
118
119 mozconfig_init
120
121 mozconfig_annotate '' --enable-extensions=default,typeaheadfind
122 mozconfig_annotate '' --disable-mailnews
123 #mozconfig_annotate '' --enable-native-uconv
124 mozconfig_annotate '' --enable-image-encoder=all
125
126 # Bug 60668: Galeon doesn't build without oji enabled, so enable it
127 # regardless of java setting.
128 mozconfig_annotate '' --enable-oji --enable-mathml
129
130 # Other ff-specific settings
131 mozconfig_use_enable mozdevelop jsd
132 mozconfig_use_enable mozdevelop xpctools
133 mozconfig_use_extension mozdevelop venkman
134 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
135
136 # Finalize and report settings
137 mozconfig_final
138
139 # hardened GCC uses -fstack-protector-all by default, which breaks us
140 has_hardened && append-flags -fno-stack-protector-all
141 # remove -fstack-protector because now it borks firefox
142 CFLAGS=${CFLAGS/-fstack-protector-all/}
143 CFLAGS=${CFLAGS/-fstack-protector/}
144 CXXFLAGS=${CXXFLAGS/-fstack-protector-all/}
145 CXXFLAGS=${CXXFLAGS/-fstack-protector/}
146
147 ####################################
148 #
149 # Configure and build
150 #
151 ####################################
152
153 CPPFLAGS="${CPPFLAGS} -DARON_WAS_HERE" \
154 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
155 econf || die
156
157 # It would be great if we could pass these in via CPPFLAGS or CFLAGS prior
158 # to econf, but the quotes cause configure to fail.
159 sed -i -e \
160 's|-DARON_WAS_HERE|-DGENTOO_NSPLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsplugins\\\" -DGENTOO_NSBROWSER_PLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsbrowser/plugins\\\"|' \
161 ${S}/config/autoconf.mk \
162 ${S}/nsprpub/config/autoconf.mk \
163 ${S}/xpfe/global/buildconfig.html
164
165 # Fixup the RPATH
166 sed -i -e \
167 's|#RPATH_FIXER|'"${MOZILLA_FIVE_HOME}"'|' \
168 ${S}/config/rules.mk \
169 ${S}/nsprpub/config/rules.mk \
170 ${S}/security/coreconf/rules.mk \
171 ${S}/security/coreconf/rules.mk
172
173 # This removes extraneous CFLAGS from the Makefiles to reduce RAM
174 # requirements while compiling
175 edit_makefiles
176
177 emake || die
178 }
179
180 src_install() {
181 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
182
183 # Most of the installation happens here
184 dodir ${MOZILLA_FIVE_HOME}
185 cp -RL ${S}/dist/bin/* ${D}${MOZILLA_FIVE_HOME}
186
187 # Create directory structure to support portage-installed extensions.
188 # See update_chrome() in mozilla-launcher
189 keepdir ${MOZILLA_FIVE_HOME}/chrome.d
190 keepdir ${MOZILLA_FIVE_HOME}/extensions.d
191 cp ${D}${MOZILLA_FIVE_HOME}/chrome/installed-chrome.txt \
192 ${D}${MOZILLA_FIVE_HOME}/chrome.d/0_base-chrome.txt
193
194 # Create /usr/bin/firefox
195 install_mozilla_launcher_stub firefox ${MOZILLA_FIVE_HOME}
196
197 # Install icon and .desktop for menu entry
198 insinto /usr/share/pixmaps
199 doins ${FILESDIR}/icon/firefox-icon.png
200
201 # Fix bug 54179: Install .desktop file into /usr/share/applications
202 # instead of /usr/share/gnome/apps/Internet (18 Jun 2004 agriffis)
203 insinto /usr/share/applications
204 doins ${FILESDIR}/icon/mozillafirefox.desktop
205
206 ####################################
207 #
208 # Install files necessary for applications to build against firefox
209 #
210 ####################################
211
212 ewarn "Installing includes and idl files..."
213 dodir ${MOZILLA_FIVE_HOME}/idl ${MOZILLA_FIVE_HOME}/include
214 cd ${S}/dist
215 cp -LfR include/* ${D}${MOZILLA_FIVE_HOME}/include || die "failed to copy"
216 cp -LfR idl/* ${D}${MOZILLA_FIVE_HOME}/idl || die "failed to copy"
217
218 # Dirty hack to get some applications using this header running
219 dosym ${MOZILLA_FIVE_HOME}/include/necko/nsIURI.h \
220 /usr/$(get_libdir)/${MOZILLA_FIVE_HOME##*/}/include/nsIURI.h
221
222 # Fix firefox-config and install it
223 sed -i -e "s|/usr/lib/firefox-${MY_PV}|${MOZILLA_FIVE_HOME}|g
224 s|/usr/include/firefox-${MY_PV}|${MOZILLA_FIVE_HOME}/include|g
225 s|/usr/share/idl/firefox-${MY_PV}|${MOZILLA_FIVE_HOME}/idl|g
226 s|\(echo -L.*\)\($\)|\1 -Wl,-R${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 sed -i -e "s|-L/usr/lib/firefox-${MY_PV}|-L\$\{libdir\}|
233 s|-I/usr/include/firefox-${MY_PV}|-I\$\{includedir\}|" \
234 ${S}/build/unix/firefox-nspr.pc
235 insinto /usr/$(get_libdir)/pkgconfig
236 for x in ${S}/build/unix/*.pc; do
237 sed -i -e "s|^libdir=.*|libdir=${MOZILLA_FIVE_HOME}|
238 s|^includedir=.*|includedir=${MOZILLA_FIVE_HOME}/include|
239 s|^idldir=.*|idldir=${MOZILLA_FIVE_HOME}/idl|
240 s|\(^Libs: -L.*\)\($\)|\1 -Wl,-R\$\{libdir\}\2|" ${x}
241 doins ${x}
242 done
243
244 ####################################
245 #
246 # Some preferences, probably gentoo.org as start-page also
247 #
248 ####################################
249
250 dodir ${D}/${MOZILLA_FIVE_HOME}/greprefs
251 cp ${FILESDIR}/gentoo-default-prefs.js ${D}/${MOZILLA_FIVE_HOME}/greprefs/all-gentoo.js
252 dodir ${D}/${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 LICENSE
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 echo
268 ewarn "This firefox-1.5rc1 ebuild is provided for your convenience,"
269 ewarn "the use of this ebuild is not supported by gentoo developers. "
270 ewarn "Please file bugs related to firefox-1.5 with upstream developers."
271 ewarn "Bugs should be filed @ https://bugzilla.mozilla.org."
272 ewarn "Thank you. anarchy@gentoo.org for more info"
273 }
274
275 pkg_postrm() {
276 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
277
278 update_mozilla_launcher_symlinks
279 }

  ViewVC Help
Powered by ViewVC 1.1.20