new package: gnuplot-x

Same as 'gnuplot' from termux-packages but with X11 support.

Requested in https://github.com/termux/x11-packages/issues/90.
This commit is contained in:
Leonid Pliushch 2020-02-11 16:06:25 +02:00 committed by Yaksh Bariya
parent 54e310eac0
commit b490986f7e
No known key found for this signature in database
GPG Key ID: F7486BA7D3D27581
4 changed files with 64 additions and 0 deletions

View File

@ -0,0 +1,12 @@
diff -u -r ../gnuplot-5.2.0/Makefile.in ./Makefile.in
--- ../gnuplot-5.2.0/Makefile.in 2017-09-03 03:44:09.000000000 +0000
+++ ./Makefile.in 2017-10-14 20:54:05.459305245 +0000
@@ -344,7 +344,7 @@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = foreign
-SUBDIRS = config m4 term src docs man demo tutorial share
+SUBDIRS = config m4 term src man tutorial share
EXTRA_DIST = BUGS Copyright FAQ.pdf GNUmakefile INSTALL INSTALL.gnu \
Makefile.maint PATCHLEVEL PGPKEYS README RELEASE_NOTES \
VERSION configure.vms win

View File

@ -0,0 +1,28 @@
TERMUX_PKG_HOMEPAGE=http://gnuplot.info/
TERMUX_PKG_DESCRIPTION="Command-line driven graphing utility"
TERMUX_PKG_LICENSE="BSD"
TERMUX_PKG_VERSION=5.2.8
TERMUX_PKG_SRCURL=https://downloads.sourceforge.net/project/gnuplot/gnuplot/${TERMUX_PKG_VERSION}/gnuplot-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=60a6764ccf404a1668c140f11cc1f699290ab70daa1151bb58fed6139a28ac37
TERMUX_PKG_DEPENDS="libandroid-support, libc++, libiconv, libx11, readline, pango, libgd, zlib"
TERMUX_PKG_CONFLICTS="gnuplot"
TERMUX_PKG_HOSTBUILD=true
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
--with-x
--with-lua=no
--with-bitmap-terminals
--with-texdir=$TERMUX_PREFIX/share/texmf
"
termux_step_host_build() {
"$TERMUX_PKG_SRCDIR/configure"
make -C docs/ gnuplot.gih
}
termux_step_post_make_install() {
mkdir -p $TERMUX_PREFIX/share/gnuplot/5.2/
cp $TERMUX_PKG_HOSTBUILD_DIR/docs/gnuplot.gih \
$TERMUX_PREFIX/share/gnuplot/5.2/gnuplot.gih
}

View File

@ -0,0 +1,11 @@
--- ./src/plot.c.orig 2019-02-08 21:42:42.500914619 +0000
+++ ./src/plot.c 2019-02-08 21:43:56.702190583 +0000
@@ -281,7 +281,7 @@
#endif
/* make sure that we really have revoked root access, this might happen if
gnuplot is compiled without vga support but is installed suid by mistake */
-#ifdef __linux__
+#if defined(__linux__) && !defined(__ANDROID__)
if (setuid(getuid()) != 0) {
fprintf(stderr,"gnuplot: refusing to run at elevated privilege\n");
exit(EXIT_FAILURE);

View File

@ -0,0 +1,13 @@
For WEXITSTATUS macro.
diff -u -r ../gnuplot-5.2.0/src/command.c ./src/command.c
--- ../gnuplot-5.2.0/src/command.c 2017-08-30 18:48:26.000000000 +0000
+++ ./src/command.c 2017-10-14 20:56:13.905856980 +0000
@@ -138,6 +138,7 @@
int vms_ktid; /* key table id, for translating keystrokes */
#endif /* VMS */
+#include <sys/wait.h>
/* static prototypes */
static void command __PROTO((void));