--- /usr/portage/dev-ml/xml-light/xml-light-2.2-r2.ebuild 2014-03-03 21:01:11.000000000 -0300 +++ /alt/portage/local/dev-ml/xml-light/xml-light-2.2-r2.ebuild 2014-08-16 21:00:20.291931663 -0300 @@ -13,9 +13,9 @@ LICENSE="LGPL-2.1" SLOT="0/${PV}" KEYWORDS="amd64 x86" -IUSE="doc" +IUSE="doc +ocamlopt" -RDEPEND="dev-lang/ocaml:=" +RDEPEND="dev-lang/ocaml:=[ocamlopt?]" DEPEND="app-arch/unzip ${RDEPEND}" @@ -28,6 +28,9 @@ src_compile() { emake -j1 + if use ocamlopt; then + emake -j1 opt + fi if use doc;then emake doc fi @@ -41,8 +44,12 @@ version="${PV}" description="${DESCRIPTION}" requires="" -archive(byte) = "xml-light.cma" +archive(byte)="xml-light.cma" EOF + if use ocamlopt; then + emake INSTALLDIR="${D}"/usr/$(get_libdir)/ocaml/${PN} installopt + echo 'archive(native)="xml-light.cmxa"' >> "${D}"/usr/$(get_libdir)/ocaml/${PN}/META + fi dodoc README if use doc; then emake doc