/[gentoo-x86]/net-libs/xulrunner/xulrunner-1.9.0.8.ebuild
Gentoo

Contents of /net-libs/xulrunner/xulrunner-1.9.0.8.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations) (download)
Fri Apr 3 09:57:02 2009 UTC (5 years, 6 months ago) by armin76
Branch: MAIN
Changes since 1.6: +2 -2 lines
Bump patchset to fix unaligned accesses, bug #251603, patch by Friedrich Oslage <bluebird at gentoo dot org>, add ~sparc
(Portage version: 2.1.6.7/cvs/Linux ia64)

1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-libs/xulrunner/xulrunner-1.9.0.8.ebuild,v 1.6 2009/03/30 15:06:29 armin76 Exp $
4
5 WANT_AUTOCONF="2.1"
6
7 inherit flag-o-matic toolchain-funcs eutils mozconfig-3 makeedit multilib java-pkg-opt-2 python autotools
8 PATCH="${P}-patches-0.1"
9
10 DESCRIPTION="Mozilla runtime package that can be used to bootstrap XUL+XPCOM applications"
11 HOMEPAGE="http://developer.mozilla.org/en/docs/XULRunner"
12 SRC_URI="mirror://gentoo/${P}.tar.bz2
13 http://dev.gentoo.org/~armin76/dist/${P}.tar.bz2
14 mirror://gentoo/${PATCH}.tar.bz2
15 http://dev.gentoo.org/~armin76/dist/${PATCH}.tar.bz2"
16
17 KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 -sparc x86"
18 SLOT="1.9"
19 LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )"
20 IUSE=""
21
22 RDEPEND="java? ( >=virtual/jre-1.4 )
23 >=sys-devel/binutils-2.16.1
24 >=dev-libs/nss-3.12.2
25 >=dev-libs/nspr-4.7.3
26 >=app-text/hunspell-1.1.9
27 >=media-libs/lcms-1.17"
28
29 DEPEND="java? ( >=virtual/jdk-1.4 )
30 ${RDEPEND}
31 dev-util/pkgconfig"
32
33 S="${WORKDIR}/mozilla"
34
35 # Needed by src_compile() and src_install().
36 # Would do in pkg_setup but that loses the export attribute, they
37 # become pure shell variables.
38 export MOZ_CO_PROJECT=xulrunner
39 export BUILD_OFFICIAL=1
40 export MOZILLA_OFFICIAL=1
41
42 pkg_setup(){
43 if ! built_with_use x11-libs/cairo X; then
44 eerror "Cairo is not built with X useflag."
45 eerror "Please add 'X' to your USE flags, and re-emerge cairo."
46 die "Cairo needs X"
47 fi
48
49 if ! built_with_use --missing true x11-libs/pango X; then
50 eerror "Pango is not built with X useflag."
51 eerror "Please add 'X' to your USE flags, and re-emerge pango."
52 die "Pango needs X"
53 fi
54 java-pkg-opt-2_pkg_setup
55 }
56
57 src_unpack() {
58 unpack ${A}
59
60 # Apply our patches
61 cd "${S}" || die "cd failed"
62 EPATCH_SUFFIX="patch" \
63 EPATCH_FORCE="yes" \
64 epatch "${WORKDIR}"/patch
65
66 eautoreconf || die "failed running eautoreconf"
67
68 # We need to re-patch this because autoreconf overwrites it
69 epatch "${WORKDIR}"/patch/000_flex-configure-LANG.patch
70 }
71
72 src_compile() {
73 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}-1.9"
74
75 ####################################
76 #
77 # mozconfig, CFLAGS and CXXFLAGS setup
78 #
79 ####################################
80
81 mozconfig_init
82 mozconfig_config
83
84 MEXTENSIONS="default"
85 # if use python; then
86 # MEXTENSIONS="${MEXTENSIONS},python/xpcom"
87 # fi
88
89 # It doesn't compile on alpha without this LDFLAGS
90 use alpha && append-ldflags "-Wl,--no-relax"
91
92 mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
93 mozconfig_annotate '' --disable-mailnews
94 mozconfig_annotate 'broken' --disable-mochitest
95 mozconfig_annotate 'broken' --disable-crashreporter
96 mozconfig_annotate '' --enable-system-hunspell
97 #mozconfig_annotate '' --enable-system-sqlite
98 mozconfig_annotate '' --enable-image-encoder=all
99 mozconfig_annotate '' --enable-canvas
100 #mozconfig_annotate '' --enable-js-binary
101 mozconfig_annotate '' --enable-embedding-tests
102 mozconfig_annotate '' --with-system-nspr
103 mozconfig_annotate '' --with-system-nss
104 mozconfig_annotate '' --enable-system-lcms
105 mozconfig_annotate '' --with-system-bz2
106 # Bug 60668: Galeon doesn't build without oji enabled, so enable it
107 # regardless of java setting.
108 mozconfig_annotate '' --enable-oji --enable-mathml
109 mozconfig_annotate 'places' --enable-storage --enable-places --enable-places_bookmarks
110 mozconfig_annotate '' --enable-safe-browsing
111
112 # Other ff-specific settings
113 mozconfig_annotate '' --enable-jsd
114 mozconfig_annotate '' --enable-xpctools
115 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
116
117 #disable java
118 if ! use java ; then
119 mozconfig_annotate '-java' --disable-javaxpcom
120 fi
121
122 # Finalize and report settings
123 mozconfig_final
124
125 if [[ $(gcc-major-version) -lt 4 ]]; then
126 append-cxxflags -fno-stack-protector
127 fi
128
129 ####################################
130 #
131 # Configure and build
132 #
133 ####################################
134
135 CPPFLAGS="${CPPFLAGS} -DARON_WAS_HERE" \
136 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
137 econf || die
138
139 # It would be great if we could pass these in via CPPFLAGS or CFLAGS prior
140 # to econf, but the quotes cause configure to fail.
141 sed -i -e \
142 's|-DARON_WAS_HERE|-DGENTOO_NSPLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsplugins\\\" -DGENTOO_NSBROWSER_PLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsbrowser/plugins\\\"|' \
143 "${S}"/config/autoconf.mk \
144 "${S}"/toolkit/content/buildconfig.html
145
146 emake || die "emake failed"
147 }
148
149 src_install() {
150 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}-1.9"
151
152 emake DESTDIR="${D}" install || die "emake install failed"
153
154 rm "${D}"/usr/bin/xulrunner
155
156 dodir /usr/bin
157 dosym ${MOZILLA_FIVE_HOME}/xulrunner /usr/bin/xulrunner-1.9
158
159 # Add vendor
160 echo "pref(\"general.useragent.vendor\",\"Gentoo\");" \
161 >> "${D}"${MOZILLA_FIVE_HOME}/defaults/pref/vendor.js
162
163 if use java ; then
164 java-pkg_regjar "${D}"${MOZILLA_FIVE_HOME}/javaxpcom.jar
165 java-pkg_regjar "${D}"${MOZILLA_FIVE_HOME}/sdk/lib/MozillaGlue.jar
166 java-pkg_regjar "${D}"${MOZILLA_FIVE_HOME}/sdk/lib/MozillaInterfaces.jar
167 fi
168 }

  ViewVC Help
Powered by ViewVC 1.1.20