commit:     9526b21a4dde5fde5db8f6b0a662e4a869eb237d
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 27 22:43:20 2021 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Sat Nov 27 22:46:31 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9526b21a

sci-mathematics/gretl: add 2021d, drop 1.9.90

Closes: https://bugs.gentoo.org/589074
Closes: https://bugs.gentoo.org/648636
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 sci-mathematics/gretl/Manifest                     |  2 +-
 .../gretl/files/gretl-2001d-appdatadir.patch       | 11 ++++
 .../{gretl-1.9.90.ebuild => gretl-2021d.ebuild}    | 76 +++++++++++++---------
 sci-mathematics/gretl/metadata.xml                 |  1 +
 4 files changed, 57 insertions(+), 33 deletions(-)

diff --git a/sci-mathematics/gretl/Manifest b/sci-mathematics/gretl/Manifest
index 3ca4fcb50dd3..fbcad222b4ce 100644
--- a/sci-mathematics/gretl/Manifest
+++ b/sci-mathematics/gretl/Manifest
@@ -1 +1 @@
-DIST gretl-1.9.90.tar.xz 7764820 BLAKE2B 
1a47c31a62aad662ed3cfb4ad2057000eef14daf1f8cac4125f511f0229e29c1a7f43bc2e6014ec5b971173d9698e842c13e36b0f12faaa2f4fa996e26d984cb
 SHA512 
35ec45fb2ad2dec490567411c1a5d909dc7fc8f0c4a6ca142e6e92b2d95a9efc9581f154a7806cf3f5178b530cdca9508b7c215bca29e1bcaebfa874d476667a
+DIST gretl-2021d.tar.xz 13256260 BLAKE2B 
ba4ae04317e3bd4c9ae064718ceee7b8c6afceaa263c1adcfb7fa5fe8bb74c9abc7f7847666a95f1035c36c553ce8ab80a002f488348e3e02fd321c5dd53d5d8
 SHA512 
17d5ba473208a5e810329b88c3e6b8421af73d6e1a172547c393143cd8419e2ff6cd07b9c741f0d6e65796fee64f4c71b7f5ccf0c81a67936c4d16f1fd0d7edb

diff --git a/sci-mathematics/gretl/files/gretl-2001d-appdatadir.patch 
b/sci-mathematics/gretl/files/gretl-2001d-appdatadir.patch
new file mode 100644
index 000000000000..8b42edccc88b
--- /dev/null
+++ b/sci-mathematics/gretl/files/gretl-2001d-appdatadir.patch
@@ -0,0 +1,11 @@
+--- a/gui/Makefile.in
++++ b/gui/Makefile.in
+@@ -139,7 +139,7 @@
+ else
+   gretldir = $(datarootdir)/gretl
+   uidir = $(gretldir)/ui
+-  appdatadir = $(datarootdir)/appdata
++  appdatadir = $(datarootdir)/metainfo
+ endif
+ 
+ tooldir = $(topsrc)/tools

diff --git a/sci-mathematics/gretl/gretl-1.9.90.ebuild 
b/sci-mathematics/gretl/gretl-2021d.ebuild
similarity index 59%
rename from sci-mathematics/gretl/gretl-1.9.90.ebuild
rename to sci-mathematics/gretl/gretl-2021d.ebuild
index 57ea0d58c2b7..dcc6aca2cfbe 100644
--- a/sci-mathematics/gretl/gretl-1.9.90.ebuild
+++ b/sci-mathematics/gretl/gretl-2021d.ebuild
@@ -1,76 +1,77 @@
 # Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=5
+EAPI=8
 
-USE_EINSTALL=true
-
-inherit elisp-common toolchain-funcs
+inherit elisp-common toolchain-funcs xdg-utils
 
 DESCRIPTION="Regression, econometrics and time-series library"
 HOMEPAGE="http://gretl.sourceforge.net/";
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz"
+SRC_URI="mirror://sourceforge/project/${PN}/${PN}/${PV}/${P}.tar.xz"
 
 LICENSE="GPL-3"
-SLOT="0/10"
+SLOT="0/40"
 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
-IUSE="accessibility cpu_flags_x86_avx +curl emacs gnome gtk mpi nls odbc 
openmp python
-       readline cpu_flags_x86_sse2 R static-libs"
+IUSE="cpu_flags_x86_avx emacs extras gnome gtk mpi nls odbc openmp python
+       readline cpu_flags_x86_sse2 R"
 
-CDEPEND="
+DEPEND="
        dev-libs/glib:2=
-       dev-libs/gmp:0=
+       >=dev-libs/gmp-4.0.1:0=
+       dev-libs/json-glib:0=
        dev-libs/libxml2:2=
-       dev-libs/mpfr:0=
+       >=dev-libs/mpfr-2.2.0:0=
+       net-misc/curl:0=
        sci-libs/fftw:3.0=
        sci-visualization/gnuplot
        virtual/lapack
        virtual/latex-base
-       accessibility? ( app-accessibility/flite:= )
-       curl? ( net-misc/curl:0= )
        emacs? ( >=app-editors/emacs-23.1:* )
+       gnome? ( >=gnome-extra/libgsf-1.14.47[gtk?] )
        gtk? (
                        media-libs/gd:2=[png]
-                       sci-visualization/gnuplot[gd]
+                       >=sci-visualization/gnuplot-5.0[cairo]
                        x11-libs/gtk+:3=
                        x11-libs/gtksourceview:3.0= )
        mpi? ( virtual/mpi )
        odbc? ( dev-db/unixODBC:0= )
        R? ( dev-lang/R:0= )
        readline? ( sys-libs/readline:0= )"
-RDEPEND="${CDEPEND}
+RDEPEND="${DEPEND}
        python? ( dev-python/numpy )"
-DEPEND="${CDEPEND}
-       virtual/pkgconfig"
+BDEPEND="virtual/pkgconfig
+       extras? ( dev-texlive/texlive-latexextra )
+       gtk? ( x11-misc/xdg-utils )"
 
 SITEFILE=50${PN}-gentoo.el
 
-REQUIRED_USE="emacs? ( gtk ) !curl? ( !gtk )"
+REQUIRED_USE="emacs? ( gtk )"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-2001d-appdatadir.patch
+)
+
+DOCS=( README ChangeLog CompatLog )
 
-pkg_setup() {
-       if use openmp && [[ $(tc-getCC)$ == *gcc* ]] && ! tc-has-openmp ; then
-               ewarn "You are using a non capable gcc compiler ( < 4.2 ? )"
-               die "Need an OpenMP capable compiler"
+pkg_pretend() {
+       if [[ ${MERGE_TYPE} != binary ]]; then
+               use openmp && tc-check-openmp
        fi
 }
 
 src_configure() {
+       xdg_environment_reset
        econf \
                --disable-rpath \
-               --enable-shared \
-               --with-mpfr \
-               --docdir="${EPREFIX}/usr/share/doc/${PF}" \
-               --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \
                $(use_enable cpu_flags_x86_avx avx) \
-               $(use_enable curl www) \
+               $(use_enable extras build-addons) \
                $(use_enable gtk gui) \
                $(use_enable gtk xdg) \
                $(use_enable gtk xdg-utils) \
                $(use_enable nls) \
                $(use_enable openmp) \
                $(use_enable cpu_flags_x86_sse2 sse2) \
-               $(use_enable static-libs static) \
-               $(use_with accessibility audio) \
+               $(use_with gnome gsf) \
                $(use_with mpi) \
                $(use_with odbc) \
                $(use_with readline) \
@@ -80,7 +81,7 @@ src_configure() {
 }
 
 src_compile() {
-       emake
+       default
        if use emacs; then
                cd utils/emacs && emake
                elisp-compile gretl.el
@@ -88,13 +89,13 @@ src_compile() {
 }
 
 src_install() {
-       # to fix
        emake -j1 DESTDIR="${D}" install
+       einstalldocs
+       find "${ED}" -type f -name '*.la' -delete || die
        if use emacs; then
                elisp-install ${PN} utils/emacs/gretl.{el,elc}
                elisp-site-file-install "${FILESDIR}/${SITEFILE}"
        fi
-       dodoc README README.audio ChangeLog CompatLog
 }
 
 pkg_postinst() {
@@ -104,8 +105,19 @@ pkg_postinst() {
                elog "add the following line to your \"~/.emacs\" file:"
                elog "  (add-to-list 'auto-mode-alist '(\"\\\\.inp\\\\'\" . 
gretl-mode))"
        fi
+
+       if use gtk; then
+               xdg_desktop_database_update
+               xdg_icon_cache_update
+               xdg_mimeinfo_database_update
+       fi
 }
 
 pkg_postrm() {
        use emacs && elisp-site-regen
+       if use gtk; then
+               xdg_desktop_database_update
+               xdg_icon_cache_update
+               xdg_mimeinfo_database_update
+       fi
 }

diff --git a/sci-mathematics/gretl/metadata.xml 
b/sci-mathematics/gretl/metadata.xml
index 47fa48a1557b..8ddce5301b74 100644
--- a/sci-mathematics/gretl/metadata.xml
+++ b/sci-mathematics/gretl/metadata.xml
@@ -18,6 +18,7 @@
   in LaTeX format.
 </longdescription>
   <use>
+    <flag name="extras">Build and install add-ons bundled with gretl</flag>
     <flag name="R">Enable support for <pkg>dev-lang/R</pkg></flag>
   </use>
   <upstream>

Reply via email to