commit:     c28d040c2e8882070888e9d8a6213b63140010c8
Author:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
AuthorDate: Wed Mar  2 10:59:34 2022 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Wed Mar  2 11:00:06 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c28d040c

sci-mathematics/gsl-shell: add version 2.3.2

Closes: https://bugs.gentoo.org/570288
Bug: https://bugs.gentoo.org/725628
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>

 sci-mathematics/gsl-shell/Manifest                 |  1 +
 .../gsl-shell-2.3.2-no-compile-in-install.patch    | 24 +++++++++
 ...gsl-shell-2.3.2-sphinx-extmath-to-imgmath.patch | 13 +++++
 sci-mathematics/gsl-shell/gsl-shell-2.3.2.ebuild   | 62 ++++++++++++++++++++++
 4 files changed, 100 insertions(+)

diff --git a/sci-mathematics/gsl-shell/Manifest 
b/sci-mathematics/gsl-shell/Manifest
index a84b8b1d7f52..4bf89166a2de 100644
--- a/sci-mathematics/gsl-shell/Manifest
+++ b/sci-mathematics/gsl-shell/Manifest
@@ -1 +1,2 @@
 DIST gsl-shell-2.3.0-beta1.tar.gz 3380519 BLAKE2B 
3f63c74d48f01d1cd181a275facd979d31a06089004ac0db3b060d77cdcf4fb195ad064a76c64a7a13a6641102864cb79845b8f15573bc1481365952835f1fd7
 SHA512 
627c0b6bb35bc1a33bab16d0bb2b193b5a005a1d97a96e6a9038fbe7144936427131197983a2ef347ed91c655a82a4d477430a610d9e36453a2669ef0baae231
+DIST gsl-shell-2.3.2.tar.gz 3400376 BLAKE2B 
8218b4d3232048fe7575631c7acc66d313520ee4d41a1dd2c267f021c8271a427673a575cc00f8f55a4868b8ec5e9626c0cbaa6ea9fa76662a726e436a527cf3
 SHA512 
6379380ab15a7ec477d67d36305ce76c551d32e88d8611447eeb6deaf9877c362392bce45599a2b2988331064c22626260c41f8548624c23e2c4e3c59c87c291

diff --git 
a/sci-mathematics/gsl-shell/files/gsl-shell-2.3.2-no-compile-in-install.patch 
b/sci-mathematics/gsl-shell/files/gsl-shell-2.3.2-no-compile-in-install.patch
new file mode 100644
index 000000000000..d8cdaa02a2c5
--- /dev/null
+++ 
b/sci-mathematics/gsl-shell/files/gsl-shell-2.3.2-no-compile-in-install.patch
@@ -0,0 +1,24 @@
+diff --git a/Makefile b/Makefile
+index 39b4872..4c04865 100644
+--- a/Makefile
++++ b/Makefile
+@@ -154,8 +154,8 @@ mkdir -p $1$(PREFIX)/bin
+ mkdir -p $1$(PREFIX)/share/applications
+ mkdir -p $1$(PREFIX)/share/icons/hicolor/128x128/apps
+ mkdir -p $1$(PREFIX)/share/$(PACKAGE_NAME)/$(PACKAGE_VERSION)
+-cp $(GSL_SHELL_GUI) $(GSL_SHELL) $1$(PREFIX)/bin
+-strip $1$(PREFIX)/bin/$(GSL_SHELL) $1$(PREFIX)/bin/$(GSL_SHELL_GUI)
++test -f $(GSL_SHELL_GUI) && cp $(GSL_SHELL_GUI) $1$(PREFIX)/bin  || :
++test -f $(GSL_SHELL) && cp $(GSL_SHELL) $1$(PREFIX)/bin  || :
+ test -f $(LUAJIT_SO) && \
+   mkdir -p $1$(PREFIX)/lib && \
+   cp $(LUAJIT_SO) $1$(PREFIX)/lib && \
+@@ -168,7 +168,7 @@ $(CP_REL) $(LUA_BASE_FILES) 
$1$(PREFIX)/share/$(PACKAGE_NAME)/$(PACKAGE_VERSION)
+ $(CP_REL) $(EXAMPLES_FILES) $1$(PREFIX)/bin
+ endef
+ 
+-install: $(GSL_SHELL) $(GSL_SHELL_GUI)
++install:
+       $(call install-to-dir,$(DESTDIR))
+ 
+ debian: $(DEBIAN_PACKAGE)

diff --git 
a/sci-mathematics/gsl-shell/files/gsl-shell-2.3.2-sphinx-extmath-to-imgmath.patch
 
b/sci-mathematics/gsl-shell/files/gsl-shell-2.3.2-sphinx-extmath-to-imgmath.patch
new file mode 100644
index 000000000000..29ddaf2fd710
--- /dev/null
+++ 
b/sci-mathematics/gsl-shell/files/gsl-shell-2.3.2-sphinx-extmath-to-imgmath.patch
@@ -0,0 +1,13 @@
+diff --git a/doc/user-manual/conf.py b/doc/user-manual/conf.py
+index 899f5d6..9475d85 100644
+--- a/doc/user-manual/conf.py
++++ b/doc/user-manual/conf.py
+@@ -25,7 +25,7 @@ import sys, os
+ 
+ # Add any Sphinx extension module names here, as strings. They can be 
extensions
+ # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
+-extensions = ['sphinx.ext.intersphinx', 'sphinx.ext.pngmath']
++extensions = ['sphinx.ext.intersphinx', 'sphinx.ext.imgmath']
+ 
+ # Add any paths that contain templates here, relative to this directory.
+ templates_path = ['_templates']

diff --git a/sci-mathematics/gsl-shell/gsl-shell-2.3.2.ebuild 
b/sci-mathematics/gsl-shell/gsl-shell-2.3.2.ebuild
new file mode 100644
index 000000000000..14ec634d1a7c
--- /dev/null
+++ b/sci-mathematics/gsl-shell/gsl-shell-2.3.2.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+DOCS_BUILDER="sphinx"
+DOCS_DIR="doc/user-manual"
+DOCS_AUTODOC=0
+inherit toolchain-funcs python-any-r1 docs
+
+MY_P=${P/_/-}
+DESCRIPTION="Lua interactive shell for sci-libs/gsl"
+HOMEPAGE="https://www.nongnu.org/gsl-shell/";
+SRC_URI="https://github.com/franko/gsl-shell/archive/refs/tags/v${PV}.tar.gz 
-> ${P}.tar.gz"
+S="${WORKDIR}/${MY_P}"
+
+SLOT="0"
+LICENSE="GPL-3"
+KEYWORDS="~amd64 ~x86"
+IUSE="fox"
+
+RDEPEND="
+       >=sci-libs/gsl-1.14:=
+       virtual/blas
+       >=x11-libs/agg-2.5
+       >=media-libs/freetype-2.4.10
+       sys-libs/readline:0=
+       || ( media-fonts/ubuntu-font-family media-fonts/freefont 
media-fonts/dejavu )
+       fox? ( x11-libs/fox:1.6 )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+       dev-lang/luajit
+       virtual/pkgconfig
+       doc? ( virtual/latex-base )
+"
+
+PATCHES=(
+       "${FILESDIR}/${P}-no-compile-in-install.patch"
+       "${FILESDIR}/${P}-sphinx-extmath-to-imgmath.patch"
+)
+
+src_prepare() {
+       tc-export PKG_CONFIG
+       default
+}
+
+src_compile() {
+       local BLAS=$($(tc-getPKG_CONFIG) --libs blas)
+       local GSL=$($(tc-getPKG_CONFIG) --libs gsl)
+       emake -j1 gsl-shell CC="$(tc-getCC)" CXX="$(tc-getCXX)" 
CFLAGS="${CFLAGS}" \
+               GSL_LIBS="$($(tc-getPKG_CONFIG) --libs gsl) ${BLAS}"
+       if use fox; then
+               local FOX_INCLUDES="$(WANT_FOX=1.6 fox-config --cflags)"
+               local FOX_LIBS="$(WANT_FOX=1.6 fox-config --libs)"
+               emake -j1 gsl-shell-gui CC="$(tc-getCC)" CXX="$(tc-getCXX)" \
+                       CFLAGS="${CFLAGS}" FOX_INCLUDES="${FOX_INCLUDES}" 
FOX_LIBS="${FOX_LIBS}"  \
+                       GSL_LIBS="$($(tc-getPKG_CONFIG) --libs gsl) ${BLAS}"
+       fi
+       docs_compile
+}

Reply via email to