Index: mediawiki-1.11.0.ebuild =================================================================== RCS file: /var/cvsroot/gentoo-x86/www-apps/mediawiki/mediawiki-1.11.0.ebuild,v retrieving revision 1.3 diff -u -B -r1.3 mediawiki-1.11.0.ebuild --- mediawiki-1.11.0.ebuild 26 Nov 2007 12:00:23 -0000 1.3 +++ mediawiki-1.11.0.ebuild 7 Jan 2008 20:28:06 -0000 @@ -2,7 +2,9 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/www-apps/mediawiki/mediawiki-1.11.0.ebuild,v 1.3 2007/11/26 12:00:23 tchiwam Exp $ -inherit webapp depend.php versionator +inherit webapp depend.php versionator eutils + +EAPI="1" MY_BRANCH=$(get_version_component_range 1-2) @@ -13,14 +15,14 @@ RESTRICT="mirror" LICENSE="GPL-2" KEYWORDS="~amd64 ~ppc ~sparc ~x86" -IUSE="imagemagick math mysql postgres restrict" +IUSE="imagemagick math mysql postgres restrict +ocamlopt" S="${WORKDIR}/${P/_/}" #S="${WORKDIR}/${P/.0_/}" DEPEND="math? ( >=dev-lang/ocaml-3.0.6 )" -RDEPEND=" +RDEPEND="${DEPEND} >=dev-lang/php-5.1.4-r6 math? ( virtual/tetex @@ -43,6 +45,12 @@ ! PHPCHECKNODIE="yes" require_php_with_any_use gd gd-external ; then die "Re-install ${PHP_PKG} with ${flags} and either gd or gd-external" fi + if use ocamlopt && use math && ! built_with_use --missing true dev-lang/ocaml ocamlopt; then + eerror "In order to build ${PN} with native code support from ocaml" + eerror "You first need to have a native code ocaml compiler." + eerror "You need to install dev-lang/ocaml with ocamlopt useflag on." + die "Please install ocaml with ocamlopt useflag" + fi } src_unpack() { @@ -61,6 +69,11 @@ if use math; then einfo "Compiling math support" cd math || die + if ! use ocamlopt; then + sed -i -e "s/ocamlopt/ocamlc/" Makefile + sed -i -e "s/cmxa/cma/" Makefile + sed -i -e "s/cmx/cmo/g" Makefile + fi emake || die else einfo "No math support enabled. Skipping."