Files
haikuports/sci-visualization/gnuplot/gnuplot-5.4.10.recipe

109 lines
2.7 KiB
Bash

SUMMARY="Command-line driven graphing utility"
DESCRIPTION="Originally created to allow both students and scientists to \
visualize mathematical functions and data interactively, but has grown to \
support many non-interactive uses such as web scripting. It is also used \
as a plotting engine by third-party applications like Octave."
HOMEPAGE="http://www.gnuplot.info/"
COPYRIGHT="1986-1993, 1998, 2004 Thomas Williams, Colin Kelley"
LICENSE="Gnuplot"
REVISION="2"
SOURCE_URI="https://downloads.sourceforge.net/gnuplot/gnuplot-$portVersion.tar.gz"
CHECKSUM_SHA256="975d8c1cc2c41c7cedc4e323aff035d977feb9a97f0296dd2a8a66d197a5b27c"
PATCHES="gnuplot-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2"
if [ "$targetArchitecture" = x86_gcc2 ]; then
SECONDARY_ARCHITECTURES="x86"
fi
commandBinDir=$binDir
if [ "$targetArchitecture" = x86_gcc2 ]; then
commandBinDir=$prefix/bin
fi
PROVIDES="
gnuplot$secondaryArchSuffix = $portVersion
cmd:gnuplot = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libgd$secondaryArchSuffix
lib:libedit$secondaryArchSuffix
lib:libz$secondaryArchSuffix
lib:libX11$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
xlibe${secondaryArchSuffix}_devel
devel:libgd$secondaryArchSuffix
devel:libedit$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:automake
cmd:autoconf
cmd:awk
cmd:cmp
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
"
PATCH()
{
sed -i 's/-rdynamic/-Wl,-export-dynamic/g' demo/plugin/Makefile.am
}
BUILD()
{
aclocal
automake
export CFLAGS="-O2" # avoids building with "-g", we're using "make install-strip" anyway.
runConfigure --omit-dirs binDir ./configure --bindir="$commandBinDir" \
--with-bitmap-terminals \
--with-readline=bsd \
--with-cairo=no \
--with-lua=no \
--with-qt=no \
--with-x # Can result in an empty white window. Resizing/moving it seems to help.
# --with-readline=builtin # doesn't works on Haiku. Gets OA/OB/OC/OD on cursor key presses.
# Other (less useful) terminals we could enable without further dependencies:
# --with-gpic \
# --with-mif \
# --with-regis \
# --with-tgif \
make $jobArgs
}
INSTALL()
{
make install-strip
# Remove dirs, if empty (content varies according to "--with-" configure options).
gnuplotLibDir=$libExecDir/gnuplot/${portVersion%.*}
if [ -z "$(ls -A $gnuplotLibDir)" ]; then
rmdir $gnuplotLibDir $libExecDir/gnuplot
fi
}
# BEWARE: test doesn't shows any summary at the end.
# Also, gnuplot_x11 crashes a lot. Be sure to add an "auto-kill" action to
# ~/config/settings/system/debug_server/settings, eg:
#
# executable_actions {
# /sources/*/gnuplot_x11 kill
#}
TEST()
{
make check
}