sci-visualization/gr: New package. Somewhat WIP.
authorAndreas K. Hüttel <dilfridge@gentoo.org>
Fri, 29 May 2020 11:30:10 +0000 (14:30 +0300)
committerAndreas K. Hüttel <dilfridge@gentoo.org>
Fri, 29 May 2020 11:31:42 +0000 (14:31 +0300)
Closes: https://bugs.gentoo.org/683188
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
sci-visualization/gr/Manifest [new file with mode: 0644]
sci-visualization/gr/files/gr-0.49.0-paths.patch [new file with mode: 0644]
sci-visualization/gr/gr-0.49.0.ebuild [new file with mode: 0644]
sci-visualization/gr/metadata.xml [new file with mode: 0644]

diff --git a/sci-visualization/gr/Manifest b/sci-visualization/gr/Manifest
new file mode 100644 (file)
index 0000000..ad263e8
--- /dev/null
@@ -0,0 +1 @@
+DIST gr-0.49.0.tar.gz 8604669 BLAKE2B a4f14910b8b229e722018a00e7f7f1b0c354265282b16c49e536bb8771a1bd69c0e0c17a9e4e70593f185e6c58885fcb6842b2f2c121988c1c161f5d11548b1b SHA512 851deac9cc2f42a9f62883e6bfb4bcc6e71e46910ec97a7b5fec087299f12d09043365f594d47c315a23079342bf25893b1a0f59bbd0e92eb140cc2a11126a14
diff --git a/sci-visualization/gr/files/gr-0.49.0-paths.patch b/sci-visualization/gr/files/gr-0.49.0-paths.patch
new file mode 100644 (file)
index 0000000..73e2302
--- /dev/null
@@ -0,0 +1,15 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index db08eeb7..46be6fab 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -907,8 +907,8 @@ if(GR_INSTALL)
+     install(FILES lib/gr/qtgr/grwidget.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/)
+   endif()
+   install(
+-    DIRECTORY lib/gks/fonts
+-    DESTINATION ${CMAKE_INSTALL_PREFIX}/
++    DIRECTORY lib/gks/fonts/
++    DESTINATION ${CMAKE_INSTALL_PREFIX}/share/fonts/gks
+     USE_SOURCE_PERMISSIONS
+   )
+ endif()
diff --git a/sci-visualization/gr/gr-0.49.0.ebuild b/sci-visualization/gr/gr-0.49.0.ebuild
new file mode 100644 (file)
index 0000000..cf59924
--- /dev/null
@@ -0,0 +1,58 @@
+# Copyright 2019-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake
+
+DESCRIPTION="Universal framework for cross-platform visualization applications"
+HOMEPAGE="http://gr-framework.org/"
+SRC_URI="https://github.com/sciapp/gr/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="cairo ffmpeg opengl postscript qt5 tiff truetype X"
+
+DEPEND="
+       media-libs/fontconfig
+       media-libs/libjpeg-turbo
+       media-libs/libpng
+       media-libs/qhull
+       sys-libs/zlib
+       cairo? ( x11-libs/cairo )
+       ffmpeg? ( media-video/ffmpeg )
+       opengl? (
+               media-libs/glfw
+               virtual/opengl
+       )
+       postscript? ( app-text/ghostscript-gpl )
+       qt5? ( dev-qt/qtgui:5 )
+       tiff? ( media-libs/tiff )
+       truetype? ( media-libs/freetype )
+       X? ( x11-libs/libX11 )
+"
+RDEPEND="${DEPEND}"
+BDEPEND=""
+
+PATCHES=(
+       "${FILESDIR}/${P}-paths.patch"
+)
+
+src_configure() {
+       use cairo || mycmakeargs+=( -DCAIRO_LIBRARY= )
+       use opengl || mycmakeargs+=( -DGLFW_LIBRARY= )
+       use postscript || mycmakeargs+=( -DGS_LIBRARY= )
+       use ffmpeg || mycmakeargs+=( -DFFMPEG_INCLUDE_DIR= )
+       use truetype || mycmakeargs+=( -DFREETYPE_LIBRARY= )
+       use tiff || mycmakeargs+=( -DTIFF_LIBRARY= )
+
+       # todo: Qt5, X11 automagic
+
+       cmake_src_configure
+}
+
+src_install() {
+       cmake_src_install
+       find "${ED}" -name '*.a' -delete
+}
diff --git a/sci-visualization/gr/metadata.xml b/sci-visualization/gr/metadata.xml
new file mode 100644 (file)
index 0000000..80a71f5
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+  <maintainer type="person">
+    <email>dilfridge@gentoo.org</email>
+    <name>Andreas K. Huettel</name>
+  </maintainer>
+</pkgmetadata>