public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Justin Lecher" <jlec@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/sci:master commit in: sci-libs/libmed/, sci-libs/libmed/files/
Date: Sat,  2 Jul 2016 08:08:52 +0000 (UTC)	[thread overview]
Message-ID: <1467425796.db2afff9b36650e6316d7d97f425f23a816429cd.jlec@gentoo> (raw)

commit:     db2afff9b36650e6316d7d97f425f23a816429cd
Author:     layman <layman <AT> localhost>
AuthorDate: Sat Jul  2 01:47:45 2016 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Sat Jul  2 02:16:36 2016 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=db2afff9

sci-libs/libmed: initial ebuild bump

 .../libmed/files/libmed-3.1.0-cmake-fortran.patch  | 20 +++++++
 .../libmed/files/libmed-3.1.0-fix-swig-build.patch | 19 +++++++
 sci-libs/libmed/libmed-3.1.0.ebuild                | 64 ++++++++++++++++++++++
 sci-libs/libmed/metadata.xml                       |  8 +++
 4 files changed, 111 insertions(+)

diff --git a/sci-libs/libmed/files/libmed-3.1.0-cmake-fortran.patch b/sci-libs/libmed/files/libmed-3.1.0-cmake-fortran.patch
new file mode 100644
index 0000000..490c14a
--- /dev/null
+++ b/sci-libs/libmed/files/libmed-3.1.0-cmake-fortran.patch
@@ -0,0 +1,20 @@
+Make cmake properly disable fortran upon user requirments
+
+--- ./CMakeLists.txt.orig	2016-07-01 15:28:57.139304608 +0300
++++ ./CMakeLists.txt	2016-07-01 15:34:22.295899455 +0300
+@@ -8,10 +8,13 @@
+ 
+ INCLUDE(CheckLanguage)
+ CHECK_LANGUAGE(Fortran)
+-IF(CMAKE_Fortran_COMPILER)
++OPTION (MEDFILE_BUILD_FORTRAN "Build fortran library" ON)
++IF(MEDFILE_BUILD_FORTRAN)
+   ENABLE_LANGUAGE(Fortran)
++  IF(NOT CMAKE_Fortran_COMPILER)
++      MESSAGE(FATAL_EROOR "Fortran support was requested but not found")
++  ENDIF()
+ ELSE()
+-  MESSAGE(STATUS "No Fortran support")
+ ENDIF()
+ 
+ ## Version number 

diff --git a/sci-libs/libmed/files/libmed-3.1.0-fix-swig-build.patch b/sci-libs/libmed/files/libmed-3.1.0-fix-swig-build.patch
new file mode 100644
index 0000000..cd6b230
--- /dev/null
+++ b/sci-libs/libmed/files/libmed-3.1.0-fix-swig-build.patch
@@ -0,0 +1,19 @@
+Fix wierd typedefs macroses in the header witch made swing to fail
+
+diff --git a/include/H5public_extract.h.in b/include/H5public_extract.h.in
+index ba07342..28318f4 100644
+--- a/include/H5public_extract.h.in
++++ b/include/H5public_extract.h.in
+@@ -28,9 +28,9 @@ extern "C" {
+ @HDF5_TYPEDEF_HID_T@
+ @HDF5_TYPEDEF_HSIZE_T@
+ 
+-#typedef int herr_t;
+-#typedef int hid_t;
+-#typedef unsigned long long   hsize_t;
++typedef int herr_t;
++typedef int hid_t;
++typedef unsigned long long   hsize_t;
+ 
+ #ifdef __cplusplus
+ }

diff --git a/sci-libs/libmed/libmed-3.1.0.ebuild b/sci-libs/libmed/libmed-3.1.0.ebuild
new file mode 100644
index 0000000..b443f6e
--- /dev/null
+++ b/sci-libs/libmed/libmed-3.1.0.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+FORTRAN_NEEDED=fortran
+# NOTE:The build for multiple python versions should be possible but complecated for the build system
+PYTHON_COMPAT=( python2_7 python3_{3,4,5} )
+
+inherit eutils toolchain-funcs fortran-2 python-single-r1 cmake-utils
+
+MY_P="med-${PV}"
+
+DESCRIPTION="A library to store and exchange meshed data or computation results"
+HOMEPAGE="http://www.salome-platform.org/"
+SRC_URI="http://files.salome-platform.org/Salome/other/${MY_P}.tar.gz"
+
+LICENSE="GPL-3 LGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc fortran python static-libs test"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+RDEPEND="
+	sci-libs/hdf5[fortran=]
+	sys-cluster/openmpi[fortran=]
+	python? ( ${PYTHON_DEPS} )
+"
+DEPEND="${RDEPEND}
+	python? ( >=dev-lang/swig-2.0.9:0 )
+"
+
+S=${WORKDIR}/${MY_P}_SRC
+
+PATCHES=(
+	"${FILESDIR}/${P}-cmake-fortran.patch"
+	"${FILESDIR}/${P}-fix-swig-build.patch"
+)
+
+DOCS=( AUTHORS ChangeLog INSTALL README )
+
+pkg_setup() {
+	use python && python-single-r1_pkg_setup
+	use fortran && fortran-2_pkg_setup
+}
+
+src_configure() {
+	local mycmakeargs=(
+		-DMEDFILE_BUILD_FORTRAN="$(usex fortran)"
+		-DMEDFILE_BUILD_STATIC_LIBS="$(usex static-libs)"
+		-DMEDFILE_INSTALL_DOC="$(usex doc)"
+		-DMEDFILE_BUILD_PYTHON="$(usex python)"
+		-DMEDFILE_BUILD_TESTS="$(usex test)"
+	)
+
+	cmake-utils_src_configure
+}
+
+src_install() {
+	cmake-utils_src_install
+	# Prevent test executables being installed
+	use test && rm -rf "${D}/usr/bin/"{testc,testf}
+}

diff --git a/sci-libs/libmed/metadata.xml b/sci-libs/libmed/metadata.xml
new file mode 100644
index 0000000..8425c0d
--- /dev/null
+++ b/sci-libs/libmed/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+  <maintainer type="project">
+    <email>sci@gentoo.org</email>
+    <name>Gentoo Science Project</name>
+  </maintainer>
+</pkgmetadata>


                 reply	other threads:[~2016-07-02  8:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1467425796.db2afff9b36650e6316d7d97f425f23a816429cd.jlec@gentoo \
    --to=jlec@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox