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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (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.1: +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-r1.ebuild,v 1.1 2005/12/08 22:52:35 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 #security fix in history
107 cd ${S}
108 epatch ${FILESDIR}/${PV}/${P}-history.patch
109 }
110
111 src_compile() {
112 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
113
114 ####################################
115 #
116 # mozconfig, CFLAGS and CXXFLAGS setup
117 #
118 ####################################
119
120 mozconfig_init
121 mozconfig_config
122
123 mozconfig_annotate '' --enable-extensions=default,typeaheadfind
124 mozconfig_annotate '' --disable-mailnews
125 #mozconfig_annotate '' --enable-native-uconv
126 mozconfig_annotate '' --enable-image-encoder=all
127
128 # Bug 60668: Galeon doesn't build without oji enabled, so enable it
129 # regardless of java setting.
130 mozconfig_annotate '' --enable-oji --enable-mathml
131
132 # Other ff-specific settings
133 mozconfig_use_enable canvas
134 mozconfig_use_enable mozdevelop jsd
135 mozconfig_use_enable mozdevelop xpctools
136 mozconfig_use_extension mozdevelop venkman
137 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
138
139 # Finalize and report settings
140 mozconfig_final
141
142 # hardened GCC uses -fstack-protector-all by default, which breaks us
143 has_hardened && append-flags -fno-stack-protector-all
144 # remove -fstack-protector because now it borks firefox
145 CFLAGS=${CFLAGS/-fstack-protector-all/}
146 CFLAGS=${CFLAGS/-fstack-protector/}
147 CXXFLAGS=${CXXFLAGS/-fstack-protector-all/}
148 CXXFLAGS=${CXXFLAGS/-fstack-protector/}
149
150 ####################################
151 #
152 # Configure and build
153 #
154 ####################################
155
156 CPPFLAGS="${CPPFLAGS} -DARON_WAS_HERE" \
157 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
158 econf || die
159
160 # It would be great if we could pass these in via CPPFLAGS or CFLAGS prior
161 # to econf, but the quotes cause configure to fail.
162 sed -i -e \
163 's|-DARON_WAS_HERE|-DGENTOO_NSPLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsplugins\\\" -DGENTOO_NSBROWSER_PLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsbrowser/plugins\\\"|' \
164 ${S}/config/autoconf.mk \
165 ${S}/nsprpub/config/autoconf.mk \
166 ${S}/xpfe/global/buildconfig.html
167
168 # Fixup the RPATH
169 sed -i -e \
170 's|#RPATH_FIXER|'"${MOZILLA_FIVE_HOME}"'|' \
171 ${S}/config/rules.mk \
172 ${S}/nsprpub/config/rules.mk \
173 ${S}/security/coreconf/rules.mk
174
175 # This removes extraneous CFLAGS from the Makefiles to reduce RAM
176 # requirements while compiling
177 edit_makefiles
178
179 emake || die
180 }
181
182 src_install() {
183 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
184
185 # Most of the installation happens here
186 dodir ${MOZILLA_FIVE_HOME}
187 cp -RL ${S}/dist/bin/* ${D}${MOZILLA_FIVE_HOME}
188
189 # Create directory structure to support portage-installed extensions.
190 # See update_chrome() in mozilla-launcher
191 keepdir ${MOZILLA_FIVE_HOME}/chrome.d
192 keepdir ${MOZILLA_FIVE_HOME}/extensions.d
193 cp ${D}${MOZILLA_FIVE_HOME}/chrome/installed-chrome.txt \
194 ${D}${MOZILLA_FIVE_HOME}/chrome.d/0_base-chrome.txt
195
196 # Create /usr/bin/firefox
197 install_mozilla_launcher_stub firefox ${MOZILLA_FIVE_HOME}
198
199 # Install icon and .desktop for menu entry
200 doicon ${FILESDIR}/icon/firefox-icon.png
201 domenu ${FILESDIR}/icon/mozillafirefox.desktop
202
203 # Fix icons to look the same everywhere
204 insinto ${MOZILLA_FIVE_HOME}/icons
205 doins ${S}/dist/branding/mozicon16.xpm
206 doins ${S}/dist/branding/mozicon50.xpm
207
208 ####################################
209 #
210 # Install files necessary for applications to build against firefox
211 #
212 ####################################
213
214 ewarn "Installing includes and idl files..."
215 dodir ${MOZILLA_FIVE_HOME}/idl ${MOZILLA_FIVE_HOME}/include
216 cd ${S}/dist
217 cp -LfR include/* ${D}${MOZILLA_FIVE_HOME}/include || die "failed to copy"
218 cp -LfR idl/* ${D}${MOZILLA_FIVE_HOME}/idl || die "failed to copy"
219
220 # Dirty hack to get some applications using this header running
221 dosym ${MOZILLA_FIVE_HOME}/include/necko/nsIURI.h \
222 /usr/$(get_libdir)/${MOZILLA_FIVE_HOME##*/}/include/nsIURI.h
223
224
225 # Fix pkgconfig files and install them
226 insinto /usr/$(get_libdir)/pkgconfig
227 for x in ${S}/build/unix/*.pc; do
228 doins ${x}
229 done
230
231 ####################################
232 #
233 # Some preferences, probably gentoo.org as start-page also
234 #
235 ####################################
236
237 dodir ${MOZILLA_FIVE_HOME}/greprefs
238 cp ${FILESDIR}/gentoo-default-prefs.js ${D}/${MOZILLA_FIVE_HOME}/greprefs/all-gentoo.js
239 dodir ${MOZILLA_FIVE_HOME}/defaults/pref
240 cp ${FILESDIR}/gentoo-default-prefs.js ${D}/${MOZILLA_FIVE_HOME}/defaults/pref/all-gentoo.js
241
242 # Install docs
243 dodoc LEGAL
244 }
245
246 pkg_postinst() {
247 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
248
249 # This should be called in the postinst and postrm of all the
250 # mozilla, mozilla-bin, firefox, firefox-bin, thunderbird and
251 # thunderbird-bin ebuilds.
252 update_mozilla_launcher_symlinks
253
254 # Update mimedb for the new .desktop file
255 fdo-mime_desktop_database_update
256
257 echo ""
258 ewarn "Please remember to rebuild any packages that you have built"
259 ewarn "against firefox. Some packages might be busted please search"
260 ewarn "http://bugs.gentoo.org if no bug is open, then please open a new"
261 ewarn "bug report so these can be fixed."
262 ewarn "Thank you! anarchy@gentoo.org."
263 echo ""
264 einfo "I am unable to brand firefox or thunderbird officially yet."
265 einfo "You will see that everything says Deer Park cause of this."
266 einfo "As soon as I can brand it I will commit a -r1 release."
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