sci-visualization/gr: add 0.72.0

Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
This commit is contained in:
Andreas K. Hüttel
2023-04-08 23:44:19 +02:00
parent 9782fba137
commit ffe519e592
2 changed files with 81 additions and 0 deletions

View File

@@ -1 +1,2 @@
DIST gr-0.53.0.tar.gz 19267451 BLAKE2B bd243fac9df6222c4b9e3591adfcd1d37dd41628719bd7be7ab385402f0f97e21f3eb23df3ae5d2ed3e43df2b3d83ff66f4e0b478d717772b57dce5885a98721 SHA512 49eee39fd4abd62d6794a16eb023688a525f6906054610dccd85c1b7b0bed9b198d923834cbf661099f753ec40b383a911c295f781420aeead712c5712583c80
DIST gr-0.72.0.tar.gz 9064921 BLAKE2B 92f531cd308c8bcec0f36fd57b1aeddfeb555ae4ceb1a394276f37ae515d1b5172ef775d0b33d6aa429ac46021194a4327646a486112032722121c01885c6bfa SHA512 cb04cff65649c4f688c07afaa6959ba08f88f6f9d0935bbd7b29bf58dab2a114609ea45d9849a1acc5bbd0feab4083d692a4364ada653dcbfe7f99e2594d9a42

View File

@@ -0,0 +1,80 @@
# Copyright 2019-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake
DESCRIPTION="Universal framework for cross-platform visualization applications"
HOMEPAGE="https://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 postscript tiff truetype"
DEPEND="
dev-qt/qtgui:5
media-libs/fontconfig
media-libs/glfw
media-libs/libjpeg-turbo:=
media-libs/libpng:=
media-libs/qhull:=
net-libs/zeromq
sys-libs/zlib
virtual/opengl
x11-libs/agg
x11-libs/libX11
x11-libs/libXt
cairo? ( x11-libs/cairo )
ffmpeg? ( media-video/ffmpeg:= )
postscript? ( app-text/ghostscript-gpl )
tiff? ( media-libs/tiff:= )
truetype? ( media-libs/freetype )
"
RDEPEND="${DEPEND}"
BDEPEND=""
PATCHES=(
"${FILESDIR}/${PN}-0.53.0-musl.patch"
)
REQUIRED_USE="cairo? ( truetype )"
src_configure() {
use cairo || mycmakeargs+=( -DCAIRO_LIBRARY= )
use postscript || mycmakeargs+=( -DGS_LIBRARY= )
use ffmpeg || mycmakeargs+=( -DFFMPEG_INCLUDE_DIR= )
use truetype || mycmakeargs+=( -DFREETYPE_LIBRARY= )
use tiff || mycmakeargs+=( -DTIFF_LIBRARY= )
# todo: X11 automagic
mycmakeargs+=( -DCMAKE_INSTALL_PREFIX=/usr/gr )
mycmakeargs+=( -DCMAKE_INSTALL_LIBDIR=lib )
#
# I need to have a serious conversation with upstream.
# * The main consumer of this package is dev-lang/julia.
# * If I patch gr to install in standard locations, julia does
# not find it anymore.
# * I can't patch julia, since the corresponding scripts are
# downloaded at runtime from its package registry ...
# * See bug 882619 in addition.
cmake_src_configure
}
src_install() {
cmake_src_install
find "${ED}" -name '*.a' -delete
echo "GRDIR=/usr/gr" > "${T}/99gr"
echo "LDPATH=/usr/gr/$(get_libdir)" >> "${T}/99gr"
doenvd "${T}/99gr"
[[ -f "${ED}/usr/gr/bin/gksqt" ]] && dosym ../gr/bin/gksqt /usr/bin/gksqt
elog "${P} relies on the environment variable GRDIR. If you want to use it in a running shell,"
elog "e.g. with dev-lang/julia, then run \"source /etc/profile\" first."
}