summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-libs/icu-le-hb/files/icu-le-hb-1.0.3-icu68.patch58
-rw-r--r--dev-libs/icu-le-hb/icu-le-hb-1.0.3-r1.ebuild4
-rw-r--r--eclass/versionator.eclass2
-rw-r--r--net-proxy/haproxy/Manifest1
-rw-r--r--net-proxy/haproxy/haproxy-1.8.27.ebuild169
-rw-r--r--profiles/package.mask3
-rw-r--r--sci-visualization/gnuplot/files/gnuplot-5.4.0-pkg-config.patch40
-rw-r--r--sci-visualization/gnuplot/gnuplot-5.4.0-r1.ebuild (renamed from sci-visualization/gnuplot/gnuplot-5.4.0.ebuild)1
-rw-r--r--sci-visualization/gnuplot/gnuplot-5.4.0-r100.ebuild212
9 files changed, 489 insertions, 1 deletions
diff --git a/dev-libs/icu-le-hb/files/icu-le-hb-1.0.3-icu68.patch b/dev-libs/icu-le-hb/files/icu-le-hb-1.0.3-icu68.patch
new file mode 100644
index 000000000000..9aa6958faff9
--- /dev/null
+++ b/dev-libs/icu-le-hb/files/icu-le-hb-1.0.3-icu68.patch
@@ -0,0 +1,58 @@
+From c0a0a85833cdcceb636dbe986f39a43ac40f839f Mon Sep 17 00:00:00 2001
+From: Lars Wendler <polynomial-c@gentoo.org>
+Date: Fri, 30 Oct 2020 15:04:44 +0100
+Subject: [PATCH] Fix build with icu-68.1
+
+icu-68.1 removed public macro definitions for TRUE and FALSE
+
+Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
+---
+ src/LEFontInstance.cpp | 2 +-
+ src/LEGlyphStorage.cpp | 2 +-
+ src/LEInsertionList.cpp | 4 ++--
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/LEFontInstance.cpp b/src/LEFontInstance.cpp
+index e5595f2..89bc3ed 100644
+--- a/src/LEFontInstance.cpp
++++ b/src/LEFontInstance.cpp
+@@ -79,7 +79,7 @@ void LEFontInstance::mapCharsToGlyphs(const LEUnicode chars[], le_int32 offset,
+
+ LEGlyphID LEFontInstance::mapCharToGlyph(LEUnicode32 ch, const LECharMapper *mapper) const
+ {
+- return mapCharToGlyph(ch, mapper, TRUE);
++ return mapCharToGlyph(ch, mapper, true);
+ }
+
+ LEGlyphID LEFontInstance::mapCharToGlyph(LEUnicode32 ch, const LECharMapper *mapper, le_bool filterZeroWidth) const
+diff --git a/src/LEGlyphStorage.cpp b/src/LEGlyphStorage.cpp
+index bac403a..b537676 100644
+--- a/src/LEGlyphStorage.cpp
++++ b/src/LEGlyphStorage.cpp
+@@ -659,7 +659,7 @@ le_bool LEGlyphStorage::applyInsertion(le_int32 atPosition, le_int32 count, LEGl
+ // just got replaced by the insertion
+ fSrcIndex -= 1;
+
+- return FALSE;
++ return false;
+ }
+
+ U_NAMESPACE_END
+diff --git a/src/LEInsertionList.cpp b/src/LEInsertionList.cpp
+index c64b8a1..3e39952 100644
+--- a/src/LEInsertionList.cpp
++++ b/src/LEInsertionList.cpp
+@@ -86,11 +86,11 @@ le_bool LEInsertionList::applyInsertions(LEInsertionCallback *callback)
+ {
+ for (InsertionRecord *rec = head; rec != NULL; rec = rec->next) {
+ if (callback->applyInsertion(rec->position, rec->count, rec->glyphs)) {
+- return TRUE;
++ return true;
+ }
+ }
+
+- return FALSE;
++ return false;
+ }
+
+ U_NAMESPACE_END
diff --git a/dev-libs/icu-le-hb/icu-le-hb-1.0.3-r1.ebuild b/dev-libs/icu-le-hb/icu-le-hb-1.0.3-r1.ebuild
index 29001e5eecca..fa6e7b24bd9a 100644
--- a/dev-libs/icu-le-hb/icu-le-hb-1.0.3-r1.ebuild
+++ b/dev-libs/icu-le-hb/icu-le-hb-1.0.3-r1.ebuild
@@ -27,6 +27,10 @@ BDEPEND="
virtual/pkgconfig
"
+PATCHES=(
+ "${FILESDIR}/${P}-icu68.patch" #751931
+)
+
src_prepare() {
default
eautoreconf
diff --git a/eclass/versionator.eclass b/eclass/versionator.eclass
index 24f9fb2c20bc..8a1066a0fd30 100644
--- a/eclass/versionator.eclass
+++ b/eclass/versionator.eclass
@@ -7,11 +7,11 @@
# base-system@gentoo.org
# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6
# @BLURB: functions which simplify manipulation of ${PV} and similar version strings
+# @DEPRECATED: ver_* functions from EAPI 7
# @DESCRIPTION:
# This eclass provides functions which simplify manipulating $PV and similar
# variables. Most functions default to working with $PV, although other
# values can be used.
-# @DEPRECATED: ver_* functions from EAPI 7
# @EXAMPLE:
# Simple Example 1: $PV is 1.2.3b, we want 1_2.3b:
# MY_PV=$(replace_version_separator 1 '_' )
diff --git a/net-proxy/haproxy/Manifest b/net-proxy/haproxy/Manifest
index 511eb56a3267..3bc0cb03188e 100644
--- a/net-proxy/haproxy/Manifest
+++ b/net-proxy/haproxy/Manifest
@@ -1,4 +1,5 @@
DIST haproxy-1.8.26.tar.gz 2205531 BLAKE2B 87aaeb3df6668752ec9242bda86b9b28339ad6926ee3ad16c606239693daa0d957271a76e270bf7d2d64102024121d4e9c1458da0f2e1d9bb8188856c0f68949 SHA512 a88f1fab0c234140e949ca12a87a09d7be1e0888bf2022a19c971727af08e579e3e6318d87411772915df6d73880710e6afdab842b622b6c0fa02020fa5c9425
+DIST haproxy-1.8.27.tar.gz 2209243 BLAKE2B 31d83f41fd5e8f77ec28a7c168661c7e8a24b51890cbc8336fd45668b031fca87a3533c9f78ee18302394e54e58b89786300a32506dadf0d7275c84e62b0f395 SHA512 d8b36787ea75cb3a8332b1b95fc154d6e83a52ffd91548d1d0bacab62a069d3c05e859e2e40ddb65c1a37d0a30cc6a29a07c8260ce69413a3e80c83b4143dd8a
DIST haproxy-2.0.14.tar.gz 2651320 BLAKE2B dd5aed78e52b3d3dd295f3883d45adf8795efac93cf6c23fbe39be031f29d19adad0afb400e8041281413f4570bc074f06d9cd88bee672789311e56f57b258d0 SHA512 6b63b713a1009eff59a2622fa93462deb8794c910685840f142711a61be88ea228c7cb2ec7ca50bba0803288625e1a65b2d2f87ffbcedfd23debfbbbb5d96993
DIST haproxy-2.0.17.tar.gz 2676783 BLAKE2B ee17afdf3b34bc28fe810746709ef5cb07cbcc3d7508ab13349f67b59584dfd53d6f2f926615b87095b6f130560a529c480957d62e2943bc0936e1b905896fa9 SHA512 edcd061534ef9a6d7eab9692dccbb22fb7a3bf145cbf555646763c0fd72f7f13d41482744072286327a48951397a11822f1708b26be24b7bc5a327f516ca8816
DIST haproxy-2.0.18.tar.gz 2679168 BLAKE2B dbc591223f640524bc898b5c2261c4092ddee0b245fcf96ea0ccccab45fdbdadb2880b870ced6141b6325ad5bb7765951d15b0325d3343bea7e90a138db0c68b SHA512 67245c375541b6004667831aaecb38e59429363f45f24fd0c4c36a28fa59dc24d66fe54b093e6b52d6029b6de8b3c86cda19e15f5f438119669bca9d70d4c0a3
diff --git a/net-proxy/haproxy/haproxy-1.8.27.ebuild b/net-proxy/haproxy/haproxy-1.8.27.ebuild
new file mode 100644
index 000000000000..2c5c63d0d07c
--- /dev/null
+++ b/net-proxy/haproxy/haproxy-1.8.27.ebuild
@@ -0,0 +1,169 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+[[ ${PV} == *9999 ]] && SCM="git-r3"
+inherit toolchain-funcs flag-o-matic systemd linux-info $SCM
+
+MY_P="${PN}-${PV/_beta/-dev}"
+
+DESCRIPTION="A TCP/HTTP reverse proxy for high availability environments"
+HOMEPAGE="http://www.haproxy.org"
+if [[ ${PV} != *9999 ]]; then
+ SRC_URI="http://haproxy.1wt.eu/download/$(ver_cut 1-2)/src/${MY_P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~ppc ~x86"
+else
+ EGIT_REPO_URI="http://git.haproxy.org/git/haproxy-$(ver_cut 1-2).git/"
+ EGIT_BRANCH=master
+fi
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+IUSE="+crypt doc examples libressl slz net_ns +pcre pcre-jit pcre2 pcre2-jit ssl
+systemd +threads tools vim-syntax +zlib lua device-atlas 51degrees wurfl"
+REQUIRED_USE="pcre-jit? ( pcre )
+ pcre2-jit? ( pcre2 )
+ pcre? ( !pcre2 )
+ device-atlas? ( pcre )
+ ?? ( slz zlib )"
+
+DEPEND="
+ pcre? (
+ dev-libs/libpcre
+ pcre-jit? ( dev-libs/libpcre[jit] )
+ )
+ pcre2? (
+ dev-libs/libpcre
+ pcre2-jit? ( dev-libs/libpcre2[jit] )
+ )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0=[zlib?] )
+ libressl? ( dev-libs/libressl:0= )
+ )
+ slz? ( dev-libs/libslz:= )
+ zlib? ( sys-libs/zlib )
+ lua? ( dev-lang/lua:5.3 )
+ device-atlas? ( dev-libs/device-atlas-api-c )"
+RDEPEND="${DEPEND}
+ acct-group/haproxy
+ acct-user/haproxy"
+
+S="${WORKDIR}/${MY_P}"
+
+DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS README )
+CONTRIBS=( halog iprange )
+# ip6range is present in 1.6, but broken.
+ver_test $PV -ge 1.7.0 && CONTRIBS+=( ip6range spoa_example tcploop )
+# TODO: mod_defender - requires apache / APR, modsecurity - the same
+ver_test $PV -ge 1.8.0 && CONTRIBS+=( hpack )
+
+haproxy_use() {
+ (( $# != 2 )) && die "${FUNCNAME} <USE flag> <make option>"
+
+ usex "${1}" "USE_${2}=1" "USE_${2}="
+}
+
+pkg_setup() {
+ if use net_ns; then
+ CONFIG_CHECK="~NET_NS"
+ linux-info_pkg_setup
+ fi
+}
+
+src_compile() {
+ local -a args=(
+ V=1
+ TARGET=linux2628
+ USE_GETADDRINFO=1
+ USE_TFO=1
+ )
+
+ # TODO: PCRE2_WIDTH?
+ args+=( $(haproxy_use threads THREAD) )
+ args+=( $(haproxy_use crypt LIBCRYPT) )
+ args+=( $(haproxy_use net_ns NS) )
+ args+=( $(haproxy_use pcre PCRE) )
+ args+=( $(haproxy_use pcre-jit PCRE_JIT) )
+ args+=( $(haproxy_use ssl OPENSSL) )
+ args+=( $(haproxy_use slz SLZ) )
+ args+=( $(haproxy_use zlib ZLIB) )
+ args+=( $(haproxy_use lua LUA) )
+ args+=( $(haproxy_use 51degrees 51DEGREES) )
+ args+=( $(haproxy_use device-atlas DEVICEATLAS) )
+ args+=( $(haproxy_use wurfl WURFL) )
+ args+=( $(haproxy_use systemd SYSTEMD) )
+
+ # For now, until the strict-aliasing breakage will be fixed
+ append-cflags -fno-strict-aliasing
+
+ emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]}
+ emake -C contrib/systemd SBINDIR=/usr/sbin
+
+ if use tools ; then
+ for contrib in ${CONTRIBS[@]} ; do
+ emake -C contrib/${contrib} \
+ CFLAGS="${CFLAGS}" OPTIMIZE="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]}
+ done
+ fi
+}
+
+src_install() {
+ dosbin haproxy
+ dosym ../sbin/haproxy /usr/bin/haproxy
+
+ newconfd "${FILESDIR}/${PN}.confd" $PN
+ newinitd "${FILESDIR}/${PN}.initd-r6" $PN
+
+ doman doc/haproxy.1
+
+ systemd_dounit contrib/systemd/haproxy.service
+
+ einstalldocs
+
+ # The errorfiles are used by upstream defaults.
+ insinto /etc/haproxy/errors/
+ doins examples/errorfiles/*
+
+ if use doc; then
+ dodoc ROADMAP doc/*.txt
+ #if use lua; then
+ # TODO: doc/lua-api/
+ #fi
+ fi
+
+ if use tools ; then
+ has halog "${CONTRIBS[@]}" && dobin contrib/halog/halog
+ has "iprange" "${CONTRIBS[@]}" && newbin contrib/iprange/iprange haproxy_iprange
+ has "ip6range" "${CONTRIBS[@]}" && newbin contrib/ip6range/ip6range haproxy_ip6range
+ has "spoa_example" "${CONTRIBS[@]}" && newbin contrib/spoa_example/spoa haproxy_spoa_example
+ has "spoa_example" "${CONTRIBS[@]}" && newdoc contrib/spoa_example/README README.spoa_example
+ has "tcploop" "${CONTRIBS[@]}" && newbin contrib/tcploop/tcploop haproxy_tcploop
+ has "hpack" "${CONTRIBS[@]}" && newbin contrib/hpack/gen-rht haproxy_hpack
+ fi
+
+ if use examples ; then
+ docinto examples
+ dodoc examples/*.cfg
+ dodoc examples/seamless_reload.txt
+ fi
+
+ if use vim-syntax ; then
+ insinto /usr/share/vim/vimfiles/syntax
+ doins examples/haproxy.vim
+ fi
+}
+
+pkg_postinst() {
+ if [[ ! -f "${EROOT}/etc/haproxy/haproxy.cfg" ]] ; then
+ ewarn "You need to create /etc/haproxy/haproxy.cfg before you start the haproxy service."
+ ewarn "It's best practice to not run haproxy as root, user and group haproxy was therefore created."
+ ewarn "Make use of them with the \"user\" and \"group\" directives."
+
+ if [[ -d "${EROOT}/usr/share/doc/${PF}" ]]; then
+ einfo "Please consult the installed documentation for learning the configuration file's syntax."
+ einfo "The documentation and sample configuration files are installed here:"
+ einfo " ${EROOT}/usr/share/doc/${PF}"
+ fi
+ fi
+}
diff --git a/profiles/package.mask b/profiles/package.mask
index 3dbdbcc8e662..8017d4247afc 100644
--- a/profiles/package.mask
+++ b/profiles/package.mask
@@ -233,6 +233,8 @@ dev-lua/luacrypto
# Marek Szuba <marecki@gentoo.org> (2020-10-13)
# All these ebuilds require slotted Lua, which is still masked.
+# Ulrich Müller <ulm@gentoo.org> (2020-11-06)
+# Added sci-visualization/gnuplot.
>=app-misc/worker-3.8.3-r100
>=dev-lua/luv-1.32.0.0-r100
>=dev-lua/luadbi-0.7.2-r100
@@ -245,6 +247,7 @@ dev-lua/luacrypto
>=mail-filter/imapfilter-2.6.16-r100
>=net-analyzer/suricata-6.0.0-r100
>=net-p2p/eiskaltdcpp-2.2.10-r100
+>=sci-visualization/gnuplot-5.4.0-r100
>=www-servers/lighttpd-1.4.55-r100
>=app-admin/conky-1.11.4
>=media-sound/aqualung-1.1-r100
diff --git a/sci-visualization/gnuplot/files/gnuplot-5.4.0-pkg-config.patch b/sci-visualization/gnuplot/files/gnuplot-5.4.0-pkg-config.patch
new file mode 100644
index 000000000000..aa98f27dc2b2
--- /dev/null
+++ b/sci-visualization/gnuplot/files/gnuplot-5.4.0-pkg-config.patch
@@ -0,0 +1,40 @@
+From 87034e509b366078b746a3a70e05aaf497e34585 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ulrich=20M=C3=BCller?= <ulm@gentoo.org>
+Date: Fri, 6 Nov 2020 13:25:02 +0100
+Subject: [PATCH] configure.ac: move PKG_PROG_PKG_CONFIG to the beginning of
+ the file
+
+Bug #2349
+---
+ configure.ac | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 67ad1396c..606242ea3 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -88,6 +88,10 @@ AC_CHECK_MEMBERS([struct tm.tm_gmtoff, struct tm.__tm_gmtoff],,,[
+ #include <sys/types.h>
+ #include <time.h>])
+
++dnl explicit call to PKG_PROG_PKG_CONFIG because the first call to
++dnl PKG_CHECK_MODULES{,_NOFAIL} may not happen
++PKG_PROG_PKG_CONFIG
++
+ AC_ARG_WITH(libcerf,dnl
+ [ --without-libcerf build without special functions from libcerf (default enabled)],,
+ [test -z "${with_libcerf}" && with_libcerf=yes])
+@@ -759,10 +763,6 @@ AC_ARG_ENABLE(raise-console,dnl
+ fi
+
+
+-dnl explicit call to PKG_PROG_PKG_CONFIG because the first call to
+-dnl PKG_CHECK_MODULES may not happen
+-PKG_PROG_PKG_CONFIG
+-
+ dnl wxWidgets terminal
+
+ dnl wxWidgets terminal needs C++
+--
+2.29.2
+
diff --git a/sci-visualization/gnuplot/gnuplot-5.4.0.ebuild b/sci-visualization/gnuplot/gnuplot-5.4.0-r1.ebuild
index a4baae2bd989..5b9eabee4ca7 100644
--- a/sci-visualization/gnuplot/gnuplot-5.4.0.ebuild
+++ b/sci-visualization/gnuplot/gnuplot-5.4.0-r1.ebuild
@@ -73,6 +73,7 @@ TEXMF="${EPREFIX}/usr/share/texmf-site"
PATCHES=(
"${FILESDIR}"/${PN}-5.0.1-fix-underlinking.patch
"${FILESDIR}"/${PN}-5.0.6-no-picins.patch
+ "${FILESDIR}"/${PN}-5.4.0-pkg-config.patch
)
src_prepare() {
diff --git a/sci-visualization/gnuplot/gnuplot-5.4.0-r100.ebuild b/sci-visualization/gnuplot/gnuplot-5.4.0-r100.ebuild
new file mode 100644
index 000000000000..72fd9678d759
--- /dev/null
+++ b/sci-visualization/gnuplot/gnuplot-5.4.0-r100.ebuild
@@ -0,0 +1,212 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+LUA_COMPAT=( lua5-{1,2,3} )
+
+inherit autotools flag-o-matic lua-single readme.gentoo-r1 toolchain-funcs wxwidgets
+
+DESCRIPTION="Command-line driven interactive plotting program"
+HOMEPAGE="http://www.gnuplot.info/"
+
+if [[ -z ${PV%%*9999} ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://git.code.sf.net/p/gnuplot/gnuplot-main"
+ EGIT_BRANCH="master"
+ MY_P="${PN}"
+ EGIT_CHECKOUT_DIR="${WORKDIR}/${MY_P}"
+else
+ MY_P="${P/_/.}"
+ SRC_URI="mirror://sourceforge/gnuplot/${MY_P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+fi
+
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="gnuplot"
+SLOT="0"
+IUSE="aqua bitmap cairo doc examples +gd ggi latex libcaca libcerf lua qt5 readline regis wxwidgets X"
+REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} )"
+
+RDEPEND="
+ cairo? (
+ x11-libs/cairo
+ x11-libs/pango )
+ gd? ( >=media-libs/gd-2.0.35-r3:2=[png] )
+ ggi? ( media-libs/libggi )
+ latex? (
+ virtual/latex-base
+ lua? (
+ dev-tex/pgf
+ >=dev-texlive/texlive-latexrecommended-2008-r2 ) )
+ libcaca? ( media-libs/libcaca )
+ lua? ( ${LUA_DEPS} )
+ qt5? (
+ dev-qt/qtcore:5=
+ dev-qt/qtgui:5=
+ dev-qt/qtnetwork:5=
+ dev-qt/qtprintsupport:5=
+ dev-qt/qtsvg:5=
+ dev-qt/qtwidgets:5= )
+ readline? ( sys-libs/readline:0= )
+ libcerf? ( sci-libs/libcerf )
+ wxwidgets? (
+ x11-libs/wxGTK:3.0-gtk3[X]
+ x11-libs/cairo
+ x11-libs/pango
+ x11-libs/gtk+:3 )
+ X? ( x11-libs/libXaw )"
+
+DEPEND="${RDEPEND}"
+
+BDEPEND="
+ virtual/pkgconfig
+ doc? (
+ virtual/latex-base
+ dev-texlive/texlive-latexextra
+ dev-texlive/texlive-langgreek
+ app-text/ghostscript-gpl )
+ qt5? ( dev-qt/linguist-tools:5 )"
+
+GP_VERSION="${PV%.*}"
+E_SITEFILE="lisp/50${PN}-gentoo.el"
+TEXMF="${EPREFIX}/usr/share/texmf-site"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-5.0.1-fix-underlinking.patch
+ "${FILESDIR}"/${PN}-5.0.6-no-picins.patch
+ "${FILESDIR}"/${PN}-5.4.0-pkg-config.patch
+)
+
+pkg_setup() {
+ use lua && lua_setup
+}
+
+src_prepare() {
+ default
+
+ if [[ ${PV##*.} = 9999 ]]; then
+ local dir
+ for dir in config demo m4 term tutorial; do
+ emake -C "$dir" -f Makefile.am.in Makefile.am
+ done
+ fi
+
+ # Add special version identification as required by provision 2
+ # of the gnuplot license
+ sed -i -e "1s/.*/& (Gentoo revision ${PR})/" PATCHLEVEL || die
+
+ eautoreconf
+
+ # Make sure we don't mix build & host flags.
+ sed -i \
+ -e 's:@CPPFLAGS@:$(BUILD_CPPFLAGS):' \
+ -e 's:@CFLAGS@:$(BUILD_CFLAGS):' \
+ -e 's:@LDFLAGS@:$(BUILD_LDFLAGS):' \
+ -e 's:@CC@:$(CC_FOR_BUILD):' \
+ docs/Makefile.in || die
+}
+
+src_configure() {
+ if ! use latex; then
+ sed -i -e '/SUBDIRS/s/LaTeX//' share/Makefile.in || die
+ fi
+
+ if use wxwidgets; then
+ WX_GTK_VER="3.0-gtk3"
+ setup-wxwidgets
+ fi
+
+ tc-export CC CXX #453174
+ tc-export_build_env BUILD_CC
+ export CC_FOR_BUILD=${BUILD_CC}
+
+ use qt5 && append-cxxflags -std=c++11
+
+ econf \
+ --with-texdir="${TEXMF}/tex/latex/${PN}" \
+ --with-readline=$(usex readline gnu builtin) \
+ $(use_with bitmap bitmap-terminals) \
+ $(use_with cairo) \
+ $(use_with gd) \
+ "$(use_with ggi ggi "${EPREFIX}/usr/$(get_libdir)")" \
+ "$(use_with libcaca caca "${EPREFIX}/usr/$(get_libdir)")" \
+ $(use_with libcerf) \
+ $(use_with lua) \
+ $(use_with regis) \
+ $(use_with X x) \
+ --enable-stats \
+ $(use_with qt5 qt qt5) \
+ $(use_enable wxwidgets) \
+ DIST_CONTACT="https://bugs.gentoo.org/" \
+ EMACS=no
+}
+
+src_compile() {
+ # Prevent access violations, see bug 201871
+ export VARTEXFONTS="${T}/fonts"
+
+ emake all
+
+ if use doc; then
+ # Avoid sandbox violation in epstopdf/ghostscript
+ addpredict /var/cache/fontconfig
+ if use cairo; then
+ emake -C docs pdf
+ else
+ ewarn "Cannot build figures unless cairo is enabled."
+ ewarn "Building documentation without figures."
+ emake -C docs pdf_nofig
+ mv docs/nofigures.pdf docs/gnuplot.pdf || die
+ fi
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ dodoc BUGS NEWS PGPKEYS README* RELEASE_NOTES
+ newdoc term/PostScript/README README-ps
+ newdoc term/js/README README-js
+ use lua && newdoc term/lua/README README-lua
+
+ local DOC_CONTENTS='Gnuplot no longer links against pdflib. You can
+ use the "pdfcairo" terminal for PDF output.'
+ use cairo || DOC_CONTENTS+=' It is available with USE="cairo".'
+ use gd && DOC_CONTENTS+="\n\nFor font support in png/jpeg/gif output,
+ you may have to set the GDFONTPATH and GNUPLOT_DEFAULT_GDFONT
+ environment variables. See the FAQ file in /usr/share/doc/${PF}/
+ for more information."
+ readme.gentoo_create_doc
+
+ if use examples; then
+ # Demo files
+ insinto /usr/share/${PN}/${GP_VERSION}
+ doins -r demo
+ rm -f "${ED}"/usr/share/${PN}/${GP_VERSION}/demo/Makefile*
+ rm -f "${ED}"/usr/share/${PN}/${GP_VERSION}/demo/binary*
+ fi
+
+ if use doc; then
+ # Manual, FAQ
+ dodoc docs/gnuplot.pdf FAQ.pdf
+ # Documentation for making PostScript files
+ docinto psdoc
+ dodoc docs/psdoc/{*.doc,*.tex,*.ps,*.gpi,README}
+ fi
+}
+
+src_test() {
+ #GNUTERM="unknown" emake check # spiderplot and isosurface tests fail
+ GNUTERM="dumb" emake check
+}
+
+pkg_postinst() {
+ use latex && texmf-update
+ readme.gentoo_print_elog
+}
+
+pkg_postrm() {
+ use latex && texmf-update
+}