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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Tue Nov 29 22:04:37 2005 UTC (15 years ago) by anarchy
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
1.5 final release
(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-r1.ebuild,v 1.2 2005/11/24 03:45:18 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 http://dev.gentoo.org/~agriffis/dist/mozilla-1.7.10-nsplugins-v2.patch"
22
23 KEYWORDS="-*"
24 SLOT="0"
25 LICENSE="MPL-1.1 NPL-1.1"
26 IUSE="java mozdevelop"
27
28 RDEPEND="java? ( virtual/jre )
29 >=www-client/mozilla-launcher-1.39"
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 # addresses visibility issues on ppc and amd64
58 # will not hurt to apply on other archs as well.
59 epatch ${FILESDIR}/1.5/firefox-1.1-visibility.patch
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 # fix pkgconfig files properly to contain gentoo-locations
73 epatch ${FILESDIR}/firefox-gentoo-pkgconfig.patch
74
75 ####################################
76 #
77 # general compilation and run-time fixes
78 #
79 ####################################
80
81 # patch from fedora to remove the pangoxft things
82 epatch ${FILESDIR}/1.5/firefox-nopangoxft.patch
83 # cairo-canvas patch, only needed to build against system cairo
84 # epatch ${FILESDIR}/1.5/firefox-cairo-canvas.patch
85
86 # patch from fedora to stop crashing with gnome-vfs
87 epatch ${FILESDIR}/firefox-1.1-uriloader.patch
88
89 ####################################
90 #
91 # behavioral fixes
92 #
93 ####################################
94
95 # patch to fix typeahead find for browsers which embed Firefox
96 # http://bugzilla.gnome.org/show_bug.cgi?id=157435
97 epatch ${DISTDIR}/embed-typeaheadfind.patch
98
99 # rpath fix
100 epatch ${FILESDIR}/mozilla-rpath-1.patch
101 epatch ${DISTDIR}/mozilla-1.7.10-nsplugins-v2.patch
102
103 # Fix scripts that call for /usr/local/bin/perl #51916
104 ebegin "Patching smime to call perl from /usr/bin"
105 sed -i -e '1s,usr/local/bin,usr/bin,' ${S}/security/nss/cmd/smimetools/smime
106 eend $? || die "sed failed"
107
108 echo ""
109 ewarn "Even tho this is 1.5rc3 I am gonna take bug reports"
110 ewarn "If you can attach a patch for any problems you may encounter"
111 ewarn "I will push bugs upstream if I feel it is need, do not take"
112 ewarn "offense or think I am blowing your bug report off"
113 ewarn "Thank you! Anarchy."
114 }
115
116 src_compile() {
117 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
118
119 ####################################
120 #
121 # mozconfig, CFLAGS and CXXFLAGS setup
122 #
123 ####################################
124
125 mozconfig_init
126
127 mozconfig_annotate '' --enable-extensions=default,typeaheadfind
128 mozconfig_annotate '' --disable-mailnews
129 #mozconfig_annotate '' --enable-native-uconv
130 mozconfig_annotate '' --enable-image-encoder=all
131
132 # Bug 60668: Galeon doesn't build without oji enabled, so enable it
133 # regardless of java setting.
134 mozconfig_annotate '' --enable-oji --enable-mathml
135
136 # Other ff-specific settings
137 mozconfig_use_enable mozdevelop jsd
138 mozconfig_use_enable mozdevelop xpctools
139 mozconfig_use_extension mozdevelop venkman
140 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
141
142 # Finalize and report settings
143 mozconfig_final
144
145 # hardened GCC uses -fstack-protector-all by default, which breaks us
146 has_hardened && append-flags -fno-stack-protector-all
147 # remove -fstack-protector because now it borks firefox
148 CFLAGS=${CFLAGS/-fstack-protector-all/}
149 CFLAGS=${CFLAGS/-fstack-protector/}
150 CXXFLAGS=${CXXFLAGS/-fstack-protector-all/}
151 CXXFLAGS=${CXXFLAGS/-fstack-protector/}
152
153 ####################################
154 #
155 # Configure and build
156 #
157 ####################################
158
159 CPPFLAGS="${CPPFLAGS} -DARON_WAS_HERE" \
160 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
161 econf || die
162
163 # It would be great if we could pass these in via CPPFLAGS or CFLAGS prior
164 # to econf, but the quotes cause configure to fail.
165 sed -i -e \
166 's|-DARON_WAS_HERE|-DGENTOO_NSPLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsplugins\\\" -DGENTOO_NSBROWSER_PLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsbrowser/plugins\\\"|' \
167 ${S}/config/autoconf.mk \
168 ${S}/nsprpub/config/autoconf.mk \
169 ${S}/xpfe/global/buildconfig.html
170
171 # Fixup the RPATH
172 sed -i -e \
173 's|#RPATH_FIXER|'"${MOZILLA_FIVE_HOME}"'|' \
174 ${S}/config/rules.mk \
175 ${S}/nsprpub/config/rules.mk \
176 ${S}/security/coreconf/rules.mk
177
178 # This removes extraneous CFLAGS from the Makefiles to reduce RAM
179 # requirements while compiling
180 edit_makefiles
181
182 emake || die
183 }
184
185 src_install() {
186 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
187
188 # Most of the installation happens here
189 dodir ${MOZILLA_FIVE_HOME}
190 cp -RL ${S}/dist/bin/* ${D}${MOZILLA_FIVE_HOME}
191
192 # Create directory structure to support portage-installed extensions.
193 # See update_chrome() in mozilla-launcher
194 keepdir ${MOZILLA_FIVE_HOME}/chrome.d
195 keepdir ${MOZILLA_FIVE_HOME}/extensions.d
196 cp ${D}${MOZILLA_FIVE_HOME}/chrome/installed-chrome.txt \
197 ${D}${MOZILLA_FIVE_HOME}/chrome.d/0_base-chrome.txt
198
199 # Create /usr/bin/firefox
200 install_mozilla_launcher_stub firefox ${MOZILLA_FIVE_HOME}
201
202 # Install icon and .desktop for menu entry
203 doicon ${FILESDIR}/icon/firefox-icon.png
204 domenu ${FILESDIR}/icon/mozillafirefox.desktop
205
206 # Fix icons to look the same everywhere
207 insinto ${MOZILLA_FIVE_HOME}/icons
208 doins ${S}/dist/branding/mozicon16.xpm
209 doins ${S}/dist/branding/mozicon50.xpm
210
211 ####################################
212 #
213 # Install files necessary for applications to build against firefox
214 #
215 ####################################
216
217 ewarn "Installing includes and idl files..."
218 dodir ${MOZILLA_FIVE_HOME}/idl ${MOZILLA_FIVE_HOME}/include
219 cd ${S}/dist
220 cp -LfR include/* ${D}${MOZILLA_FIVE_HOME}/include || die "failed to copy"
221 cp -LfR idl/* ${D}${MOZILLA_FIVE_HOME}/idl || die "failed to copy"
222
223 # Dirty hack to get some applications using this header running
224 dosym ${MOZILLA_FIVE_HOME}/include/necko/nsIURI.h \
225 /usr/$(get_libdir)/${MOZILLA_FIVE_HOME##*/}/include/nsIURI.h
226
227
228 # Fix pkgconfig files and install them
229 insinto /usr/$(get_libdir)/pkgconfig
230 for x in ${S}/build/unix/*.pc; do
231 doins ${x}
232 done
233
234 ####################################
235 #
236 # Some preferences, probably gentoo.org as start-page also
237 #
238 ####################################
239
240 dodir ${D}/${MOZILLA_FIVE_HOME}/greprefs
241 cp ${FILESDIR}/gentoo-default-prefs.js ${D}/${MOZILLA_FIVE_HOME}/greprefs/all-gentoo.js
242 dodir ${D}/${MOZILLA_FIVE_HOME}/defaults/pref
243 cp ${FILESDIR}/gentoo-default-prefs.js ${D}/${MOZILLA_FIVE_HOME}/defaults/pref/all-gentoo.js
244
245 # Install docs
246 dodoc LEGAL LICENSE
247 }
248
249 pkg_postinst() {
250 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
251
252 # This should be called in the postinst and postrm of all the
253 # mozilla, mozilla-bin, firefox, firefox-bin, thunderbird and
254 # thunderbird-bin ebuilds.
255 update_mozilla_launcher_symlinks
256
257 # Update mimedb for the new .desktop file
258 fdo-mime_desktop_database_update
259
260 echo ""
261 ewarn "Even tho this is 1.5rc3 I am gonna take bug reports"
262 ewarn "If you can, attach a patch for any problems you may encounter"
263 ewarn "I will push bugs upstream if I feel it is need, do not take"
264 ewarn "offense or think I am blowing your bug report off"
265 ewarn "Thank you! Anarchy."
266 }
267
268 pkg_postrm() {
269 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
270
271 update_mozilla_launcher_symlinks
272 }

  ViewVC Help
Powered by ViewVC 1.1.20