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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.20