diff options
author | Sergey Torokhov <torokhov-s-a@yandex.ru> | 2020-04-12 13:11:55 +0300 |
---|---|---|
committer | Sergey Torokhov <torokhov-s-a@yandex.ru> | 2020-04-12 13:11:55 +0300 |
commit | 04dac6c32edc01124333a70700f740b80ca50932 (patch) | |
tree | e7fbc1ed5616e0201ca91a9e90b804774fff8a90 /x11-libs | |
parent | sci-geosciences/geographiclib: new version (diff) | |
download | guru-04dac6c32edc01124333a70700f740b80ca50932.tar.gz guru-04dac6c32edc01124333a70700f740b80ca50932.tar.bz2 guru-04dac6c32edc01124333a70700f740b80ca50932.zip |
x11-libs/gtk-fortran: add new package
The gtk-fortran project aims to offer scientists programming in Fortran
a cross-platform library to build Graphical User Interfaces (GUI).
Gtk-fortran is a partial GTK / Fortran binding 100% written in Fortran,
thanks to the ISO_C_BINDING module for interoperability between C
and Fortran, which is a part of the Fortran 2003 standard.
Signed-off-by: Sergey Torokhov <torokhov-s-a@yandex.ru>
Diffstat (limited to 'x11-libs')
-rw-r--r-- | x11-libs/gtk-fortran/Manifest | 1 | ||||
-rw-r--r-- | x11-libs/gtk-fortran/gtk-fortran-3.24.8.ebuild | 75 | ||||
-rw-r--r-- | x11-libs/gtk-fortran/metadata.xml | 17 |
3 files changed, 93 insertions, 0 deletions
diff --git a/x11-libs/gtk-fortran/Manifest b/x11-libs/gtk-fortran/Manifest new file mode 100644 index 000000000..f1deb79cf --- /dev/null +++ b/x11-libs/gtk-fortran/Manifest @@ -0,0 +1 @@ +DIST gtk-fortran-3.24.8.tar.gz 4164311 BLAKE2B 728d55890344894df534de1530135933e488ea197dc2d9b8f28571ce56a236e7fe2be23ebc4708e1ae5ffeb10e4ee584db366945e3d262225c4e9f7db4fa611d SHA512 58154df7c531ebfabcc687f8f38d3c7db7f7adb6cc015e1ce9c44455ab2506a4dfe6b073a88100131ac3712fee68844e4544f2f77d954285e3fbc86e1b3d9394 diff --git a/x11-libs/gtk-fortran/gtk-fortran-3.24.8.ebuild b/x11-libs/gtk-fortran/gtk-fortran-3.24.8.ebuild new file mode 100644 index 000000000..03e139169 --- /dev/null +++ b/x11-libs/gtk-fortran/gtk-fortran-3.24.8.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +CMAKE_MAKEFILE_GENERATOR="emake" +FORTRAN_STANDARD=2003 + +inherit cmake flag-o-matic fortran-2 + +DESCRIPTION="A GTK+ binding to build Graphical User Interfaces in Fortran" +HOMEPAGE="https://github.com/vmagnin/gtk-fortran" +SRC_URI="https://github.com/vmagnin/${PN}/archive/v19.04.gtk${PV}.tar.gz -> ${P}.tar.gz" + +S="${WORKDIR}/${PN}-19.04.gtk${PV}" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +IUSE="doc examples plplot" + +RDEPEND=" + x11-libs/gtk+:3 + plplot? ( >=sci-libs/plplot-5.13.0[cairo,fortran] ) +" + +DEPEND=" + ${RDEPEND} + doc? ( app-doc/doxygen[dot] ) +" + +BDEPEND=" + virtual/fortran + virtual/pkgconfig +" + +pkg_setup() { + fortran-2_pkg_setup +} + +src_prepare() { + default + # Fix library installation path + sed -i "s:CMAKE_INSTALL_LIBDIR lib:CMAKE_INSTALL_LIBDIR $(get_libdir):" CMakeLists.txt || die + # Fix "Some or all of the gtk libraries were not found. (missing: GTK3_GDKCONFIG_INCLUDE_DIR)", + # ref: https://github.com/vmagnin/gtk-fortran/commit/d3c1682 + sed -i "s:GTK3_GDKCONFIG gdkconfig.h:GTK3_GDKCONFIG gdk/gdkconfig.h:" cmake/FindGTK3.cmake || die + + cmake_src_prepare +} + +src_configure() { + mycmakeargs+=( + -DEXCLUDE_PLPLOT=$(usex plplot false true) + -DINSTALL_EXAMPLES=$(usex examples) + -DNO_BUILD_EXAMPLES=true + ) + # Try to fix (fix similar warnings only for static library): + # /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: CMakeFiles/gtk-fortran_object.dir/gtk-hl-assistant.f90.o: + # warning: relocation against `hl_gtk_assistant_destroy' in read-only section `.rodata' + # /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: warning: creating a DT_TEXTREL in object + append-flags -no-pie + cmake_src_configure +} + +src_compile() { + cmake_src_compile + use doc && cmake_src_compile doxygen +} + +src_install() { + cmake_src_install + use doc && dodoc -r ${BUILD_DIR}/html && rm ${D}/usr/share/doc/${P}/html/{*.map,*.md5} +} diff --git a/x11-libs/gtk-fortran/metadata.xml b/x11-libs/gtk-fortran/metadata.xml new file mode 100644 index 000000000..59ec49c5f --- /dev/null +++ b/x11-libs/gtk-fortran/metadata.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="person"> + <email>torokhov-s-a@yandex.ru</email> + <name>Sergey Torokhov</name> +</maintainer> +<longdescription> + Gtk-fortran is a partial GTK/Fortran binding aims to offer scientists programming in Fortran + a cross-platform library to build Graphical User Interfaces. +</longdescription> +<use> + <flag name="doc">Build doxygen documentation</flag> + <flag name="examples">Install examples source code files</flag> + <flag name="plplot">Build with <pkg>sci-libs/plplot</pkg> support</flag> +</use> +</pkgmetadata> |