dev-ml/ppx_here: use proper install method
authorAlexis Ballier <aballier@gentoo.org>
Fri, 5 Feb 2016 17:00:49 +0000 (18:00 +0100)
committerAlexis Ballier <aballier@gentoo.org>
Fri, 5 Feb 2016 20:59:02 +0000 (21:59 +0100)
Package-Manager: portage-2.2.27
Signed-off-by: Alexis Ballier <aballier@gentoo.org>
dev-ml/ppx_here/ppx_here-113.24.00.ebuild

index 74f426c21d29f1e9948bf03dc00f8e940d08958a..3b4dbe0195408ca751785e2c08114ca65570b9f7 100644 (file)
@@ -6,10 +6,9 @@ EAPI="5"
 
 inherit oasis
 
-MY_P=${PN/-/_}-${PV}
 DESCRIPTION="Expands [%here] into its location"
 HOMEPAGE="http://www.janestreet.com/ocaml"
-SRC_URI="http://ocaml.janestreet.com/ocaml-core/${PV%.*}/files/${MY_P}.tar.gz"
+SRC_URI="http://ocaml.janestreet.com/ocaml-core/${PV%.*}/files/${P}.tar.gz"
 
 LICENSE="Apache-2.0"
 SLOT="0/${PV}"
@@ -21,13 +20,22 @@ DEPEND="dev-ml/ppx_tools:=
        dev-ml/ppx_core:="
 
 RDEPEND="${DEPEND}"
-DEPEND="${RDEPEND} dev-ml/oasis"
+DEPEND="${RDEPEND} dev-ml/opam"
 
-S="${WORKDIR}/${MY_P}"
+src_configure() {
+       emake setup.exe
+       OASIS_SETUP_COMMAND="./setup.exe" oasis_src_configure
+}
 
-DOCS=( CHANGES.md )
+src_compile() {
+       emake
+}
 
-src_prepare() {
-       sed -i -e "s/Executable ppx/Executable ${PN}/" _oasis || die
-       oasis setup || die
+src_install() {
+       opam-installer -i \
+               --prefix="${ED}/usr" \
+               --libdir="${D}/$(ocamlc -where)" \
+               --docdir="${ED}/usr/share/doc/${PF}" \
+               ${PN}.install || die
+       dodoc CHANGES.md
 }