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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.20