From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 79777139694 for ; Sun, 9 Jul 2017 21:03:11 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 55EA4214106; Sun, 9 Jul 2017 21:03:08 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 25FE5214106 for ; Sun, 9 Jul 2017 21:03:08 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id AC680341AB3 for ; Sun, 9 Jul 2017 21:03:06 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2099B7477 for ; Sun, 9 Jul 2017 21:03:05 +0000 (UTC) From: "David Seifert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "David Seifert" Message-ID: <1499634173.e094f6f984fe57e55a2850f60ba11be9dfaf23a6.soap@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/plplot/files/, sci-libs/plplot/ X-VCS-Repository: repo/gentoo X-VCS-Files: sci-libs/plplot/files/plplot-5.12.0-ocaml-remove-rpath.patch sci-libs/plplot/plplot-5.12.0-r1.ebuild X-VCS-Directories: sci-libs/plplot/ sci-libs/plplot/files/ X-VCS-Committer: soap X-VCS-Committer-Name: David Seifert X-VCS-Revision: e094f6f984fe57e55a2850f60ba11be9dfaf23a6 X-VCS-Branch: master Date: Sun, 9 Jul 2017 21:03:05 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 1883e987-cfd4-431a-b204-5ebbabe511c8 X-Archives-Hash: 9df4dffa8a37d1b9cee457478ee8e680 commit: e094f6f984fe57e55a2850f60ba11be9dfaf23a6 Author: David Seifert gentoo org> AuthorDate: Sun Jul 9 21:02:26 2017 +0000 Commit: David Seifert gentoo org> CommitDate: Sun Jul 9 21:02:53 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e094f6f9 sci-libs/plplot: Re-enable OCaml support * Convert absolute -L paths to relative ones in order to prevent ocamlmklib's braindead behaviour of randomly inserting RPATHs into libraries. Package-Manager: Portage-2.3.6, Repoman-2.3.2 .../files/plplot-5.12.0-ocaml-remove-rpath.patch | 34 ++++++++++++++++++++++ sci-libs/plplot/plplot-5.12.0-r1.ebuild | 20 ++++++++----- 2 files changed, 47 insertions(+), 7 deletions(-) diff --git a/sci-libs/plplot/files/plplot-5.12.0-ocaml-remove-rpath.patch b/sci-libs/plplot/files/plplot-5.12.0-ocaml-remove-rpath.patch new file mode 100644 index 00000000000..2d18c79736f --- /dev/null +++ b/sci-libs/plplot/files/plplot-5.12.0-ocaml-remove-rpath.patch @@ -0,0 +1,34 @@ +Fix OCaml's asinine RPATH inserting behaviour. + +--- a/bindings/ocaml/CMakeLists.txt ++++ b/bindings/ocaml/CMakeLists.txt +@@ -97,6 +97,20 @@ + + # ocamlc -c compiles *.c into *.o. + # ocamlmklib links *.o into *.so and *.a ++ ++ # ocamlmklib implicits inserts RPATHs if it is provided with an absolute path to -L, ++ # which is absolutely unacceptable and presents a massive security hazard. The ++ # following statements convert the absolute paths to relative ones to fix this. ++ # See also: ++ # https://caml.inria.fr/mantis/view.php?id=5943 ++ if(CMAKE_SKIP_RPATH) ++ file(RELATIVE_PATH CAMLIDL_LINK_LIB_DIR ${CMAKE_CURRENT_BINARY_DIR} ${CAMLIDL_LIB_DIR}) ++ file(RELATIVE_PATH CMAKE_LINK_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_BINARY_DIR}) ++ else(CMAKE_SKIP_RPATH) ++ set(CAMLIDL_LINK_LIB_DIR ${CAMLIDL_LIB_DIR}) ++ set(CMAKE_LINK_BINARY_DIR ${CMAKE_BINARY_DIR}) ++ endif(CMAKE_SKIP_RPATH) ++ + add_custom_command( + OUTPUT + ${CMAKE_CURRENT_BINARY_DIR}/plplot_core_stubs.o +@@ -105,7 +119,7 @@ + ${CMAKE_CURRENT_BINARY_DIR}/libplplot_stubs.a + COMMAND ${OCAMLC} -ccopt -I${CAMLIDL_LIB_DIR} -c ${CMAKE_CURRENT_BINARY_DIR}/plplot_core_stubs.c + COMMAND ${OCAMLC} -ccopt -I${CMAKE_SOURCE_DIR}/include -ccopt -I${CMAKE_BINARY_DIR}/include -ccopt -I${CMAKE_SOURCE_DIR}/lib/qsastime -ccopt -I${CMAKE_BINARY_DIR} -ccopt -I${CAMLIDL_LIB_DIR} -ccopt -DPLPLOT_HAVE_CONFIG_H -c ${CMAKE_CURRENT_SOURCE_DIR}/plplot_impl.c +- COMMAND ${OCAMLMKLIB} -o plplot_stubs -L${CAMLIDL_LIB_DIR} -lcamlidl -L${CMAKE_BINARY_DIR}/src -lplplot ${CMAKE_CURRENT_BINARY_DIR}/plplot_core_stubs.o ${CMAKE_CURRENT_BINARY_DIR}/plplot_impl.o ${ocaml_STATIC_FLAGS} ++ COMMAND ${OCAMLMKLIB} -o plplot_stubs -L${CAMLIDL_LINK_LIB_DIR} -lcamlidl -L${CMAKE_LINK_BINARY_DIR}/src -lplplot ${CMAKE_CURRENT_BINARY_DIR}/plplot_core_stubs.o ${CMAKE_CURRENT_BINARY_DIR}/plplot_impl.o ${ocaml_STATIC_FLAGS} + DEPENDS + ${CMAKE_CURRENT_BINARY_DIR}/plplot_core_stubs.c + ${CMAKE_CURRENT_SOURCE_DIR}/plplot_impl.c diff --git a/sci-libs/plplot/plplot-5.12.0-r1.ebuild b/sci-libs/plplot/plplot-5.12.0-r1.ebuild index c8be469a4e5..a8582c6ed65 100644 --- a/sci-libs/plplot/plplot-5.12.0-r1.ebuild +++ b/sci-libs/plplot/plplot-5.12.0-r1.ebuild @@ -17,7 +17,7 @@ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" LICENSE="LGPL-2" SLOT="0/14" # SONAME of libplplot.so KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" -IUSE="cairo cxx doc +dynamic examples fortran gd java jpeg latex lua octave pdf +IUSE="cairo cxx doc +dynamic examples fortran gd java jpeg latex lua ocaml octave pdf pdl png python qhull qt5 shapefile svg tcl test threads tk truetype wxwidgets X" REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} ) qt5? ( dynamic ) test? ( latex ) tk? ( tcl )" RESTRICT="octave? ( test )" @@ -31,6 +31,11 @@ RDEPEND=" virtual/latex-base ) lua? ( dev-lang/lua:0= ) + ocaml? ( + dev-lang/ocaml + dev-ml/camlidl + cairo? ( dev-ml/cairo-ocaml[gtk] ) + ) octave? ( sci-mathematics/octave:0= ) pdf? ( media-libs/libharu:0= ) pdl? ( @@ -78,6 +83,7 @@ DEPEND="${RDEPEND} >=virtual/jdk-1.5 dev-lang/swig ) + ocaml? ( dev-ml/findlib ) octave? ( >=dev-lang/swig-3.0.12 ) python? ( dev-lang/swig ) test? ( @@ -90,6 +96,7 @@ PATCHES=( "${FILESDIR}"/${PN}-5.11.0-octave.patch "${FILESDIR}"/${PN}-5.12.0-multiarch.patch "${FILESDIR}"/${PN}-5.12.0-java-install-path.patch + "${FILESDIR}"/${PN}-5.12.0-ocaml-remove-rpath.patch ) pkg_setup() { @@ -131,9 +138,6 @@ src_configure() { # - Bindings: # * Ada is a mess in Gentoo, don't use # * D has been removed from Gentoo, don't use - # * OCaml is a general disaster and randomly inserts RPATH - # on the basis of absolute -L linker paths: - # https://caml.inria.fr/mantis/view.php?id=5943 # * Qt4 has been disabled, as it is deprecated and unsupported upstream # - DPLD_* drivers need to use ON/OFF instead of the usex defaults yes/no, as # the testsuite performs a string comparison to determine which tests to run @@ -149,8 +153,7 @@ src_configure() { ## Features -DBUILD_DOC=OFF -DBUILD_DOX_DOC=OFF - -DUSE_RPATH=OFF - -DCMAKE_SKIP_INSTALL_RPATH=ON + -DCMAKE_SKIP_RPATH=ON -DPREBUILT_DOC=$(usex doc) -DHAVE_SHAPELIB=$(usex shapefile) -DWITH_FREETYPE=$(usex truetype) @@ -165,7 +168,7 @@ src_configure() { ## Bindings -DENABLE_ada=OFF -DENABLE_d=OFF - -DENABLE_ocaml=OFF + -DENABLE_ocaml=$(usex ocaml) -DENABLE_pyqt4=OFF -DENABLE_cxx=$(usex cxx) -DENABLE_DYNDRIVERS=$(usex dynamic) @@ -242,6 +245,9 @@ src_configure() { use shapefile && mycmakeargs+=( -DSHAPELIB_INCLUDE_DIR="${EPREFIX}"/usr/include/libshp ) + use ocaml && mycmakeargs+=( + -DOCAML_INSTALL_DIR="$(ocamlc -where)" + ) use python && mycmakeargs+=( -DENABLE_pyqt5=$(usex qt5) )