commit: 77e4cb85f6781ff1bb88bc9b9033f65226673ef7 Author: Bernard Cafarelli <voyageur <AT> gentoo <DOT> org> AuthorDate: Mon Oct 12 18:22:07 2015 +0000 Commit: Bernard Cafarelli <voyageur <AT> gentoo <DOT> org> CommitDate: Mon Oct 12 18:22:18 2015 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=77e4cb85
sys-devel/llvm: fix some USE=ocaml issues Bug: 559624 Bug: 562008 Package-Manager: portage-2.2.23 sys-devel/llvm/files/cmake/llvm-3.7.0-ocaml-build_doc.patch | 12 ++++++++++++ sys-devel/llvm/files/cmake/llvm-3.7.0-ocaml-multilib.patch | 8 ++++---- sys-devel/llvm/llvm-3.7.0-r2.ebuild | 7 +++++-- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/sys-devel/llvm/files/cmake/llvm-3.7.0-ocaml-build_doc.patch b/sys-devel/llvm/files/cmake/llvm-3.7.0-ocaml-build_doc.patch new file mode 100644 index 0000000..d53ce19 --- /dev/null +++ b/sys-devel/llvm/files/cmake/llvm-3.7.0-ocaml-build_doc.patch @@ -0,0 +1,12 @@ +diff -Naur llvm-3.7.0.src.orig/docs/CMakeLists.txt llvm-3.7.0.src/docs/CMakeLists.txt +--- llvm-3.7.0.src.orig/docs/CMakeLists.txt 2015-08-18 18:48:44.000000000 +0200 ++++ llvm-3.7.0.src/docs/CMakeLists.txt 2015-10-12 14:40:00.985384589 +0200 +@@ -115,7 +115,7 @@ + endif() + + list(FIND LLVM_BINDINGS_LIST ocaml uses_ocaml) +-if( NOT uses_ocaml LESS 0 ) ++if( NOT uses_ocaml LESS 0 AND LLVM_BUILD_DOCS ) + set(doc_targets + ocaml_llvm + ocaml_llvm_all_backends diff --git a/sys-devel/llvm/files/cmake/llvm-3.7.0-ocaml-multilib.patch b/sys-devel/llvm/files/cmake/llvm-3.7.0-ocaml-multilib.patch index caba3d1..024bad7 100644 --- a/sys-devel/llvm/files/cmake/llvm-3.7.0-ocaml-multilib.patch +++ b/sys-devel/llvm/files/cmake/llvm-3.7.0-ocaml-multilib.patch @@ -14,13 +14,13 @@ install(FILES ${install_files} - DESTINATION lib/ocaml) -+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/ocaml) ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/ocaml/llvm) install(FILES ${install_shlibs} PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE - DESTINATION lib/ocaml) -+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/ocaml) ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/ocaml/llvm) foreach( install_file ${install_files} ${install_shlibs} ) get_filename_component(filename "${install_file}" NAME) @@ -31,7 +31,7 @@ install(FILES "${LLVM_LIBRARY_DIR}/ocaml/META.llvm_${TARGET}" - DESTINATION lib/ocaml) -+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/ocaml) ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/ocaml/llvm) endforeach() --- llvm-3.7.0rc3.src-orig/bindings/ocaml/llvm/CMakeLists.txt 2014-12-30 14:24:07.000000000 +1100 +++ llvm-3.7.0rc3.src/bindings/ocaml/llvm/CMakeLists.txt 2015-08-30 19:23:43.561583624 +1000 @@ -40,4 +40,4 @@ install(FILES "${LLVM_LIBRARY_DIR}/ocaml/META.llvm" - DESTINATION lib/ocaml) -+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/ocaml) ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/ocaml/llvm) diff --git a/sys-devel/llvm/llvm-3.7.0-r2.ebuild b/sys-devel/llvm/llvm-3.7.0-r2.ebuild index de885b7..303ce98 100644 --- a/sys-devel/llvm/llvm-3.7.0-r2.ebuild +++ b/sys-devel/llvm/llvm-3.7.0-r2.ebuild @@ -40,9 +40,10 @@ COMMON_DEPEND=" libffi? ( >=virtual/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] ) ncurses? ( >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] ) ocaml? ( - dev-lang/ocaml:0= + >=dev-lang/ocaml-4.00.0:0= dev-ml/findlib - dev-ml/ocaml-ctypes )" + dev-ml/ocaml-ctypes + !!<=sys-devel/llvm-3.7.0-r2[ocaml] )" # configparser-3.2 breaks the build (3.3 or none at all are fine) DEPEND="${COMMON_DEPEND} dev-lang/perl @@ -151,6 +152,8 @@ src_prepare() { sed -e "/RUN/s/-warn-error A//" -i test/Bindings/OCaml/*ml || die # Fix libdir for ocaml bindings install, bug #559134 epatch "${FILESDIR}"/cmake/${P}-ocaml-multilib.patch + # Do not build/install ocaml docs with USE=-doc, bug #562008 + epatch "${FILESDIR}"/cmake/${P}-ocaml-build_doc.patch # Make it possible to override Sphinx HTML install dirs # https://llvm.org/bugs/show_bug.cgi?id=23780