diff options
author | V3n3RiX <venerix@koprulu.sector> | 2021-12-05 02:47:11 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2021-12-05 02:47:11 +0000 |
commit | 2771f79232c273bc2a57d23bf335dd81ccf6af28 (patch) | |
tree | c8af0fd04194aed03cf067d44e53c7edd3e9ab84 /sci-mathematics/gretl/gretl-2021d.ebuild | |
parent | e9d044d4b9b71200a96adfa280848858c0f468c9 (diff) |
gentoo resync : 05.12.2021
Diffstat (limited to 'sci-mathematics/gretl/gretl-2021d.ebuild')
-rw-r--r-- | sci-mathematics/gretl/gretl-2021d.ebuild | 123 |
1 files changed, 123 insertions, 0 deletions
diff --git a/sci-mathematics/gretl/gretl-2021d.ebuild b/sci-mathematics/gretl/gretl-2021d.ebuild new file mode 100644 index 000000000000..dcc6aca2cfbe --- /dev/null +++ b/sci-mathematics/gretl/gretl-2021d.ebuild @@ -0,0 +1,123 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit elisp-common toolchain-funcs xdg-utils + +DESCRIPTION="Regression, econometrics and time-series library" +HOMEPAGE="http://gretl.sourceforge.net/" +SRC_URI="mirror://sourceforge/project/${PN}/${PN}/${PV}/${P}.tar.xz" + +LICENSE="GPL-3" +SLOT="0/40" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" +IUSE="cpu_flags_x86_avx emacs extras gnome gtk mpi nls odbc openmp python + readline cpu_flags_x86_sse2 R" + +DEPEND=" + dev-libs/glib:2= + >=dev-libs/gmp-4.0.1:0= + dev-libs/json-glib:0= + dev-libs/libxml2:2= + >=dev-libs/mpfr-2.2.0:0= + net-misc/curl:0= + sci-libs/fftw:3.0= + sci-visualization/gnuplot + virtual/lapack + virtual/latex-base + emacs? ( >=app-editors/emacs-23.1:* ) + gnome? ( >=gnome-extra/libgsf-1.14.47[gtk?] ) + gtk? ( + media-libs/gd:2=[png] + >=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="${DEPEND} + python? ( dev-python/numpy )" +BDEPEND="virtual/pkgconfig + extras? ( dev-texlive/texlive-latexextra ) + gtk? ( x11-misc/xdg-utils )" + +SITEFILE=50${PN}-gentoo.el + +REQUIRED_USE="emacs? ( gtk )" + +PATCHES=( + "${FILESDIR}"/${PN}-2001d-appdatadir.patch +) + +DOCS=( README ChangeLog CompatLog ) + +pkg_pretend() { + if [[ ${MERGE_TYPE} != binary ]]; then + use openmp && tc-check-openmp + fi +} + +src_configure() { + xdg_environment_reset + econf \ + --disable-rpath \ + $(use_enable cpu_flags_x86_avx avx) \ + $(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_with gnome gsf) \ + $(use_with mpi) \ + $(use_with odbc) \ + $(use_with readline) \ + $(use_with R libR) \ + ${myconf} \ + LAPACK_LIBS="$($(tc-getPKG_CONFIG) --libs lapack)" +} + +src_compile() { + default + if use emacs; then + cd utils/emacs && emake + elisp-compile gretl.el + fi +} + +src_install() { + 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 +} + +pkg_postinst() { + if use emacs; then + elisp-site-regen + elog "To use gretl-mode for all \".inp\" files that you edit," + 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 +} |