public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sci-libs/xdmf2/files/, sci-libs/xdmf2/
@ 2016-09-03 20:23 David Seifert
  0 siblings, 0 replies; 2+ messages in thread
From: David Seifert @ 2016-09-03 20:23 UTC (permalink / raw
  To: gentoo-commits

commit:     a794290b70ad9e707d613ccceee5ab215c232d4d
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sat Sep  3 20:18:45 2016 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sat Sep  3 20:20:10 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a794290b

sci-libs/xdmf2: Remove heuristics to help detect HDF5_ROOT

Gentoo-bug: 591302
* EAPI=6
* Add missing RDEPEND on dev-libs/boost
* Add ${PYTHON_REQUIRED_USE} to REQUIRED_USE
* [QA] Byte-compile XdmfCore.py and Xdmf.py
* Thanks to Michael Palimaka <kensington <AT> gentoo.org> for
  helping to identify the culprit

Package-Manager: portage-2.3.0

 ...2-1.0_p141226-cannot-find-hdf5-bug-591302.patch | 41 ++++++++++++
 sci-libs/xdmf2/xdmf2-1.0_p141226-r2.ebuild         | 74 ++++++++++++++++++++++
 2 files changed, 115 insertions(+)

diff --git a/sci-libs/xdmf2/files/xdmf2-1.0_p141226-cannot-find-hdf5-bug-591302.patch b/sci-libs/xdmf2/files/xdmf2-1.0_p141226-cannot-find-hdf5-bug-591302.patch
new file mode 100644
index 00000000..99735a4
--- /dev/null
+++ b/sci-libs/xdmf2/files/xdmf2-1.0_p141226-cannot-find-hdf5-bug-591302.patch
@@ -0,0 +1,41 @@
+Too much automagic trying to find the correct prefix
+of HDF5. Remove all the pointless heuristics.
+See also: https://bugs.gentoo.org/show_bug.cgi?id=591302
+
+* CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
+*   Could NOT find HDF5 (missing: HDF5_LIBRARIES HDF5_INCLUDE_DIRS
+*   HDF5_HL_LIBRARIES)
+
+--- xdmf2-1.0_p141226/core/CMakeLists.txt
++++ xdmf2-1.0_p141226/core/CMakeLists.txt
+@@ -35,19 +35,7 @@
+   mark_as_advanced(FORCE Boost_INCLUDE_DIR)
+ endif(Boost_FOUND)
+ 
+-# Find HDF5_ROOT if not set
+-if ("$ENV{HDF5_ROOT}" STREQUAL "")
+-  find_file (HDF5_LIB libhdf5.so HINTS ENV LD_LIBRARY_PATH)
+-  if (NOT "${HDF5_LIB}" STREQUAL "")
+-    get_filename_component(HDF5_LIBRARY_DIR "${HDF5_LIB}" PATH)
+-    get_filename_component(HDF5_ROOT "${HDF5_LIBRARY_DIR}/../" ABSOLUTE)
+-    set(ENV{HDF5_ROOT} ${HDF5_ROOT})
+-  endif (NOT "${HDF5_LIB}" STREQUAL "")
+-endif ("$ENV{HDF5_ROOT}" STREQUAL "")
+-
+-mark_as_advanced(CLEAR HDF5_C_INCLUDE_DIR)
+-mark_as_advanced(CLEAR HDF5_hdf5_LIBRARY_DEBUG)
+-mark_as_advanced(CLEAR HDF5_hdf5_LIBRARY_RELEASE)
++# Find HDF5
+ find_package(HDF5 REQUIRED)
+ if(HDF5_FOUND)
+   mark_as_advanced(FORCE HDF5_C_INCLUDE_DIR)
+@@ -73,9 +61,6 @@
+   endif(HDF5_IS_PARALLEL)
+   get_filename_component(HDF5_ROOT "${HDF5_INCLUDE_DIR}/../" REALPATH)
+   set(HDF5_BINARY_DIRS ${HDF5_ROOT}/bin ${HDF5_ROOT}/dll)
+-  if (NOT HDF5_LIBRARIES)
+-    find_library (HDF5_LIBRARIES hdf5 HINTS ${HDF5_ROOT} ENV LD_LIBRARY_PATH)
+-  endif (NOT HDF5_LIBRARIES)
+   set(XDMF_LIBRARIES ${XDMF_LIBRARIES} ${HDF5_LIBRARIES})
+   set(XDMF_HDF5_BINARY_DIRS ${HDF5_BINARY_DIRS} PARENT_SCOPE)
+   set(XDMF_BINARIES ${XDMF_BINARIES} ${HDF5_BINARY_DIRS})

diff --git a/sci-libs/xdmf2/xdmf2-1.0_p141226-r2.ebuild b/sci-libs/xdmf2/xdmf2-1.0_p141226-r2.ebuild
new file mode 100644
index 00000000..b1b0bbb
--- /dev/null
+++ b/sci-libs/xdmf2/xdmf2-1.0_p141226-r2.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-utils python-single-r1
+
+DESCRIPTION="eXtensible Data Model and Format"
+HOMEPAGE="http://xdmf.org/index.php/Main_Page"
+SRC_URI="https://dev.gentoo.org/~jlec/distfiles/${P}.tar.xz"
+
+SLOT="0"
+LICENSE="VTK"
+KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc python test"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="
+	dev-libs/boost:=
+	sci-libs/hdf5:=
+	dev-libs/libxml2:2
+	python? ( ${PYTHON_DEPS} )
+	"
+DEPEND="${RDEPEND}
+	doc? ( app-doc/doxygen )
+	python? ( dev-lang/swig:0 )
+"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-module.patch
+	"${FILESDIR}"/${P}-cannot-find-hdf5-bug-591302.patch
+)
+
+pkg_setup() {
+	use python && python-single-r1_pkg_setup && python_export
+}
+
+src_prepare() {
+	if use python; then
+		local _site=$(python_get_sitedir)
+		sed \
+			-e "/DESTINATION/s:python:${_site##${EPREFIX}/usr/$(get_libdir)/}:g" \
+			-i CMakeLists.txt || die
+	fi
+
+	sed \
+		-e "/DESTINATION/s:lib:$(get_libdir):g" \
+		-e "/INSTALL/s:lib:$(get_libdir):g" \
+		-i CMakeLists.txt core/CMakeLists.txt || die
+	cmake-utils_src_prepare
+}
+
+src_configure() {
+	local mycmakeargs=(
+		-DBUILD_SHARED_LIBS=1
+		-DXDMF_BUILD_DOCUMENTATION=$(usex doc)
+		-DBUILD_TESTING=$(usex test)
+		-DXDMF_WRAP_PYTHON=$(usex python)
+#		-DXDMF_WRAP_JAVA=$(usex java)
+	)
+	cmake-utils_src_configure
+}
+
+src_install() {
+	cmake-utils_src_install
+	dosym XdmfConfig.cmake /usr/share/cmake/Modules/${PN}Config.cmake
+
+	# need to byte-compile 'XdmfCore.py' and 'Xdmf.py'
+	# as the CMake build system does not compile them itself
+	python_optimize "${D%/}$(python_get_sitedir)"
+}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-libs/xdmf2/files/, sci-libs/xdmf2/
@ 2018-08-30 14:59 Alexey Shvetsov
  0 siblings, 0 replies; 2+ messages in thread
From: Alexey Shvetsov @ 2018-08-30 14:59 UTC (permalink / raw
  To: gentoo-commits

commit:     70c86f141899974ebead3d3372ef6d6aa87ddd2c
Author:     Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 30 14:58:30 2018 +0000
Commit:     Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
CommitDate: Thu Aug 30 14:59:42 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=70c86f14

sci-libs/xdmf2: Fix build with CMake 3.12+

Package-Manager: Portage-2.3.47, Repoman-2.3.10

 .../xdmf2/files/xdmf2-1.0_p141226-cmake-3.12.patch | 14 ++++
 sci-libs/xdmf2/xdmf2-1.0_p141226-r3.ebuild         | 78 ++++++++++++++++++++++
 2 files changed, 92 insertions(+)

diff --git a/sci-libs/xdmf2/files/xdmf2-1.0_p141226-cmake-3.12.patch b/sci-libs/xdmf2/files/xdmf2-1.0_p141226-cmake-3.12.patch
new file mode 100644
index 00000000000..14e74bb6108
--- /dev/null
+++ b/sci-libs/xdmf2/files/xdmf2-1.0_p141226-cmake-3.12.patch
@@ -0,0 +1,14 @@
+--- a/CMakeLists.txt	2018-08-30 17:49:07.777815386 +0300
++++ b/CMakeLists.txt	2018-08-30 17:49:49.276706955 +0300
+@@ -6,6 +6,11 @@
+ 	cmake_policy(SET CMP0015 NEW)
+ endif (POLICY CMP0015)
+ 
++# Needed for CMake 2.12+
++if(POLICY CMP0077)
++	cmake_policy(SET CMP0077 NEW)
++endif()
++
+ if(MSVC10)
+ 	SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR})
+ 	SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR})

diff --git a/sci-libs/xdmf2/xdmf2-1.0_p141226-r3.ebuild b/sci-libs/xdmf2/xdmf2-1.0_p141226-r3.ebuild
new file mode 100644
index 00000000000..205807de8ad
--- /dev/null
+++ b/sci-libs/xdmf2/xdmf2-1.0_p141226-r3.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-utils flag-o-matic python-single-r1
+
+DESCRIPTION="eXtensible Data Model and Format"
+HOMEPAGE="http://xdmf.org/index.php/Main_Page"
+SRC_URI="https://dev.gentoo.org/~jlec/distfiles/${P}.tar.xz"
+
+SLOT="0"
+LICENSE="VTK"
+KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc python test"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="
+	dev-libs/boost:=
+	sci-libs/hdf5:=
+	dev-libs/libxml2:2
+	python? ( ${PYTHON_DEPS} )
+	"
+
+DEPEND="${RDEPEND}
+	doc? ( app-doc/doxygen )
+	python? ( dev-lang/swig:0 )
+"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-module.patch
+	"${FILESDIR}"/${P}-cannot-find-hdf5-bug-591302.patch
+	"${FILESDIR}"/${P}-cmake-3.12.patch
+)
+
+pkg_setup() {
+	use python && python-single-r1_pkg_setup && python_export
+}
+
+src_prepare() {
+	if use python; then
+		local _site=$(python_get_sitedir)
+		sed \
+			-e "/DESTINATION/s:python:${_site##${EPREFIX}/usr/$(get_libdir)/}:g" \
+			-i CMakeLists.txt || die
+	fi
+
+	sed \
+		-e "/DESTINATION/s:lib:$(get_libdir):g" \
+		-e "/INSTALL/s:lib:$(get_libdir):g" \
+		-i CMakeLists.txt core/CMakeLists.txt || die
+	cmake-utils_src_prepare
+}
+
+src_configure() {
+	# bug 619604
+	append-cxxflags -std=c++14
+
+	local mycmakeargs=(
+		-DBUILD_SHARED_LIBS=1
+		-DXDMF_BUILD_DOCUMENTATION=$(usex doc)
+		-DBUILD_TESTING=$(usex test)
+		-DXDMF_WRAP_PYTHON=$(usex python)
+#		-DXDMF_WRAP_JAVA=$(usex java)
+	)
+	cmake-utils_src_configure
+}
+
+src_install() {
+	cmake-utils_src_install
+	dosym XdmfConfig.cmake /usr/share/cmake/Modules/${PN}Config.cmake
+
+	# need to byte-compile 'XdmfCore.py' and 'Xdmf.py'
+	# as the CMake build system does not compile them itself
+	use python && python_optimize "${D%/}$(python_get_sitedir)"
+}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-08-30 15:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-03 20:23 [gentoo-commits] repo/gentoo:master commit in: sci-libs/xdmf2/files/, sci-libs/xdmf2/ David Seifert
  -- strict thread matches above, loose matches on Subject: below --
2018-08-30 14:59 Alexey Shvetsov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox