eclass: Allow ebuilds to override docdir in oasis.eclass.
authorAlexis Ballier <aballier@gentoo.org>
Mon, 26 Oct 2015 12:26:31 +0000 (13:26 +0100)
committerAlexis Ballier <aballier@gentoo.org>
Mon, 26 Oct 2015 12:26:53 +0000 (13:26 +0100)
eclass/oasis.eclass

index 7dc86f3633cf100fdab0b3a3164a7df6eac4a181..7a341ceb4c425f6c07c834bc33d046b95dacd417 100644 (file)
 # The eclass takes care of setting debug in IUSE.
 # Set before inheriting the eclass.
 
+# @ECLASS-VARIABLE: OASIS_DOC_DIR
+# @DESCRIPTION:
+# Specify where to install documentation. Default is for ocamldoc HTML.
+# Change it before inherit if this is not what you want.
+# EPREFIX is automatically prepended.
+: ${OASIS_DOC_DIR:="/usr/share/doc/${PF}/html"}
+
 inherit multilib findlib eutils base
 
 case ${EAPI:-0} in
@@ -80,7 +87,7 @@ oasis_src_configure() {
        ${OASIS_SETUP_COMMAND:-ocaml setup.ml} -configure \
                --prefix "${EPREFIX}/usr" \
                --libdir "${EPREFIX}/usr/$(get_libdir)" \
-               --docdir "${EPREFIX}/usr/share/doc/${PF}/html" \
+               --docdir "${EPREFIX}${OASIS_DOC_DIR}" \
                --destdir "${D}" \
                $(oasis_use_enable ocamlopt is_native) \
                ${confargs} \