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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations) (download)
Sun Dec 18 02:10:52 2005 UTC (14 years, 11 months ago) by anarchy
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +1 -1 lines
FILE REMOVED
text relocation corrections
(Portage version: 2.0.53)

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

  ViewVC Help
Powered by ViewVC 1.1.20