You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
124 lines
2.8 KiB
124 lines
2.8 KiB
3 years ago
|
# Copyright 1999-2021 Gentoo Authors
|
||
12 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
3 years ago
|
EAPI=8
|
||
12 years ago
|
|
||
3 years ago
|
inherit elisp-common toolchain-funcs xdg-utils
|
||
12 years ago
|
|
||
|
DESCRIPTION="Regression, econometrics and time-series library"
|
||
|
HOMEPAGE="http://gretl.sourceforge.net/"
|
||
3 years ago
|
SRC_URI="mirror://sourceforge/project/${PN}/${PN}/${PV}/${P}.tar.xz"
|
||
12 years ago
|
|
||
|
LICENSE="GPL-3"
|
||
3 years ago
|
SLOT="0/40"
|
||
12 years ago
|
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
|
||
3 years ago
|
IUSE="cpu_flags_x86_avx emacs extras gnome gtk mpi nls odbc openmp python
|
||
|
readline cpu_flags_x86_sse2 R"
|
||
10 years ago
|
|
||
3 years ago
|
DEPEND="
|
||
10 years ago
|
dev-libs/glib:2=
|
||
3 years ago
|
>=dev-libs/gmp-4.0.1:0=
|
||
|
dev-libs/json-glib:0=
|
||
10 years ago
|
dev-libs/libxml2:2=
|
||
3 years ago
|
>=dev-libs/mpfr-2.2.0:0=
|
||
|
net-misc/curl:0=
|
||
10 years ago
|
sci-libs/fftw:3.0=
|
||
12 years ago
|
sci-visualization/gnuplot
|
||
|
virtual/lapack
|
||
|
virtual/latex-base
|
||
5 years ago
|
emacs? ( >=app-editors/emacs-23.1:* )
|
||
3 years ago
|
gnome? ( >=gnome-extra/libgsf-1.14.47[gtk?] )
|
||
12 years ago
|
gtk? (
|
||
10 years ago
|
media-libs/gd:2=[png]
|
||
3 years ago
|
>=sci-visualization/gnuplot-5.0[cairo]
|
||
10 years ago
|
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= )"
|
||
3 years ago
|
RDEPEND="${DEPEND}
|
||
10 years ago
|
python? ( dev-python/numpy )"
|
||
3 years ago
|
BDEPEND="virtual/pkgconfig
|
||
|
extras? ( dev-texlive/texlive-latexextra )
|
||
|
gtk? ( x11-misc/xdg-utils )"
|
||
12 years ago
|
|
||
|
SITEFILE=50${PN}-gentoo.el
|
||
|
|
||
3 years ago
|
REQUIRED_USE="emacs? ( gtk )"
|
||
|
|
||
|
PATCHES=(
|
||
|
"${FILESDIR}"/${PN}-2001d-appdatadir.patch
|
||
|
)
|
||
|
|
||
|
DOCS=( README ChangeLog CompatLog )
|
||
12 years ago
|
|
||
3 years ago
|
pkg_pretend() {
|
||
|
if [[ ${MERGE_TYPE} != binary ]]; then
|
||
|
use openmp && tc-check-openmp
|
||
12 years ago
|
fi
|
||
|
}
|
||
|
|
||
|
src_configure() {
|
||
3 years ago
|
xdg_environment_reset
|
||
12 years ago
|
econf \
|
||
|
--disable-rpath \
|
||
10 years ago
|
$(use_enable cpu_flags_x86_avx avx) \
|
||
3 years ago
|
$(use_enable extras build-addons) \
|
||
12 years ago
|
$(use_enable gtk gui) \
|
||
|
$(use_enable gtk xdg) \
|
||
|
$(use_enable gtk xdg-utils) \
|
||
|
$(use_enable nls) \
|
||
|
$(use_enable openmp) \
|
||
10 years ago
|
$(use_enable cpu_flags_x86_sse2 sse2) \
|
||
3 years ago
|
$(use_with gnome gsf) \
|
||
10 years ago
|
$(use_with mpi) \
|
||
12 years ago
|
$(use_with odbc) \
|
||
|
$(use_with readline) \
|
||
|
$(use_with R libR) \
|
||
|
${myconf} \
|
||
|
LAPACK_LIBS="$($(tc-getPKG_CONFIG) --libs lapack)"
|
||
|
}
|
||
|
|
||
|
src_compile() {
|
||
3 years ago
|
default
|
||
12 years ago
|
if use emacs; then
|
||
|
cd utils/emacs && emake
|
||
10 years ago
|
elisp-compile gretl.el
|
||
12 years ago
|
fi
|
||
|
}
|
||
|
|
||
|
src_install() {
|
||
|
emake -j1 DESTDIR="${D}" install
|
||
3 years ago
|
einstalldocs
|
||
|
find "${ED}" -type f -name '*.la' -delete || die
|
||
12 years ago
|
if use emacs; then
|
||
10 years ago
|
elisp-install ${PN} utils/emacs/gretl.{el,elc}
|
||
|
elisp-site-file-install "${FILESDIR}/${SITEFILE}"
|
||
12 years ago
|
fi
|
||
|
}
|
||
|
|
||
|
pkg_postinst() {
|
||
|
if use emacs; then
|
||
|
elisp-site-regen
|
||
10 years ago
|
elog "To use gretl-mode for all \".inp\" files that you edit,"
|
||
12 years ago
|
elog "add the following line to your \"~/.emacs\" file:"
|
||
|
elog " (add-to-list 'auto-mode-alist '(\"\\\\.inp\\\\'\" . gretl-mode))"
|
||
|
fi
|
||
3 years ago
|
|
||
|
if use gtk; then
|
||
|
xdg_desktop_database_update
|
||
|
xdg_icon_cache_update
|
||
|
xdg_mimeinfo_database_update
|
||
|
fi
|
||
12 years ago
|
}
|
||
|
|
||
|
pkg_postrm() {
|
||
|
use emacs && elisp-site-regen
|
||
3 years ago
|
if use gtk; then
|
||
|
xdg_desktop_database_update
|
||
|
xdg_icon_cache_update
|
||
|
xdg_mimeinfo_database_update
|
||
|
fi
|
||
12 years ago
|
}
|