diff options
author | Francesco Zardi | 2022-11-08 10:46:57 +0100 |
---|---|---|
committer | Francesco Zardi | 2022-11-08 10:47:25 +0100 |
commit | 4e3791cdeb12f0a11e503fe199b93e6819d29922 (patch) | |
tree | 81e76f565c835f549c29f92ea82f4ce9ed10ddf2 | |
download | aur-4e3791cdeb12f0a11e503fe199b93e6819d29922.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 30 | ||||
-rw-r--r-- | PKGBUILD | 68 | ||||
-rw-r--r-- | gnuplot.install | 34 | ||||
-rw-r--r-- | update-lua-5.3.patch | 34 | ||||
-rw-r--r-- | use-wx-config-2.8.patch | 67 |
5 files changed, 233 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..750ae07d8f43 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,30 @@ +pkgbase = gnuplot4 + pkgdesc = Plotting package which outputs to X11, PostScript, PNG, GIF, and others + pkgver = 4.6.7 + pkgrel = 3 + url = http://www.gnuplot.info + install = gnuplot.install + arch = i686 + arch = x86_64 + license = custom + makedepends = texinfo + makedepends = emacs + makedepends = texlive-core + makedepends = texlive-latexextra + depends = readline + depends = gd + depends = wxgtk2.8 + depends = cairo + depends = libjpeg + depends = openssl-1.1 + depends = qt4 + depends = lua + provides = gnuplot + source = http://downloads.sourceforge.net/sourceforge/gnuplot/gnuplot-4.6.7.tar.gz + source = use-wx-config-2.8.patch + source = update-lua-5.3.patch + sha1sums = 0f76465981f4643a5a5491333aeda4d56d890622 + sha1sums = 2074dc08fdd80c7ad0beb0137983edc1de5dcd6c + sha1sums = 532e3c0ff2daa47d1bd54ffd2f77592b83113c79 + +pkgname = gnuplot4 diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..e005533b338c --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,68 @@ +# Maintainer: Francesco Zardi <frazar0 [at] hotmail [dot] it> +# Contributor: Ronald van Haren <ronald.archlinux.org> +# Contributor: damir <damir at archlinux.org> +# Contributor: Tom Newsom <Jeepster at gmx.co.uk> +_basename=gnuplot +_version_major=4 +_version_minor=6 +_version_patch=7 + +pkgname=$_basename$_version_major +pkgver=$_version_major.$_version_minor.$_version_patch +pkgrel=3 +pkgdesc="Plotting package which outputs to X11, PostScript, PNG, GIF, and others" +arch=('i686' 'x86_64') +url="http://www.gnuplot.info" +license=('custom') +depends=('readline' 'gd' 'wxgtk2.8' 'cairo' 'libjpeg' 'openssl-1.1' 'qt4' 'lua') +provides=('gnuplot') +makedepends=('texinfo' 'emacs' 'texlive-core' 'texlive-latexextra') +install=gnuplot.install +source=("http://downloads.sourceforge.net/sourceforge/$_basename/$_basename-$pkgver.tar.gz" + 'use-wx-config-2.8.patch' + 'update-lua-5.3.patch') +sha1sums=('0f76465981f4643a5a5491333aeda4d56d890622' + '2074dc08fdd80c7ad0beb0137983edc1de5dcd6c' + '532e3c0ff2daa47d1bd54ffd2f77592b83113c79') + +prepare() { + cd "$srcdir/$_basename-$pkgver" + + # fix default source location; use the GDFONTPATH variable to modify at runtime + sed -i 's|/usr/X11R6/lib/X11/fonts/truetype|/usr/share/fonts/TTF|' src/variable.c + + sed -i -e 's|/usr/X11R6/lib/X11/fonts/Type1|/usr/share/fonts/Type1|' \ + -e 's|$(X11ROOT)/X11R6/lib/X11/fonts/Type1|$(X11ROOT)/usr/share/fonts/Type1|' \ + src/variable.c + + # Use wx-config-2.8 instead of wx-config + patch -p1 -i ../use-wx-config-2.8.patch + + # Replace calls to functions deprecated in Lua 5.3 + patch -p1 -i ../update-lua-5.3.patch +} + +build() { + cd "$srcdir/$_basename-$pkgver" + + # Set same ABI version used to compile wxgtk2.8 + export CXXFLAGS="${CXXFLAGS:-} -fabi-version=2" + + ./configure --prefix=/usr \ + --libexecdir=/usr/bin \ + --with-gihdir=/usr/share/gnuplot \ + --with-readline=gnu \ + --enable-stats \ + --enable-qt4 + make pkglibexecdir=/usr/bin +} + +package() { + cd "$srcdir/$_basename-$pkgver" + make pkglibexecdir=/usr/bin DESTDIR="$pkgdir" install install-info + + install -Dm644 lisp/dotemacs "$pkgdir/usr/share/emacs/site-lisp/dotemacs" + install -Dm644 Copyright "$pkgdir/usr/share/licenses/$_basename/Copyright" + + rm -f "$pkgdir/usr/share/texmf-dist/ls-R" +} diff --git a/gnuplot.install b/gnuplot.install new file mode 100644 index 000000000000..f80cc7f9d7f9 --- /dev/null +++ b/gnuplot.install @@ -0,0 +1,34 @@ +info_dir=/usr/share/info +info_files=(gnuplot.info) + +post_install() { +cat << EOF +==> To add the gnuplot mode in Emacs, add the content of /usr/share/emacs/site-lisp/dotemacs to your ~/.emacs file. +EOF + + if [ -f /usr/bin/mktexlsr ]; then + echo "Updating TeX tree..." + mktexlsr + fi + +for f in ${info_files[@]}; do + install-info ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null + done +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + for f in ${info_files[@]}; do + install-info --delete ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null + done +} + +post_remove() { + if [ -f /usr/bin/mktexlsr ]; then + echo "Updating TeX tree..." + mktexlsr + fi +}
\ No newline at end of file diff --git a/update-lua-5.3.patch b/update-lua-5.3.patch new file mode 100644 index 000000000000..a9925cb8012c --- /dev/null +++ b/update-lua-5.3.patch @@ -0,0 +1,34 @@ +From 4fcbbe9d5434467357867512df827ffc1cf5ccff Mon Sep 17 00:00:00 2001 +From: Francesco Zardi <frazar0@hotmail.it> +Date: Mon, 7 Nov 2022 19:31:57 +0100 +Subject: [PATCH 1/1] Replace calls to function deprecated in Lua 5.3 + +--- + term/lua.trm | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/term/lua.trm b/term/lua.trm +index 9ac6df9..7b425dc 100644 +--- a/term/lua.trm ++++ b/term/lua.trm +@@ -247,7 +247,7 @@ LUA_GP_int_error(lua_State *L) { + msg = luaL_checkstring(L, 1); + break; + case 2: +- t_num = luaL_checkint(L, 1); ++ t_num = luaL_checkinteger(L, 1); + msg = luaL_checkstring(L, 2); + break; + default: +@@ -281,7 +281,7 @@ LUA_GP_int_warn(lua_State *L) { + msg = luaL_checkstring(L, 1); + break; + case 2: +- t_num = luaL_checkint(L, 1); ++ t_num = luaL_checkinteger(L, 1); + msg = luaL_checkstring(L, 2); + break; + default: +-- +2.38.1 + diff --git a/use-wx-config-2.8.patch b/use-wx-config-2.8.patch new file mode 100644 index 000000000000..a78e433468a2 --- /dev/null +++ b/use-wx-config-2.8.patch @@ -0,0 +1,67 @@ +From 31885accfba3eb9200ca01c1c6fab9ff8ae7ff18 Mon Sep 17 00:00:00 2001 +From: Francesco Zardi <frazar0@hotmail.it> +Date: Mon, 7 Nov 2022 19:02:06 +0100 +Subject: [PATCH 1/1] Replace calls to "wx-config" with "wx-config-2.8" + +--- + config/mingw/Makefile | 4 ++-- + configure | 4 ++-- + configure.in | 4 ++-- + 3 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/config/mingw/Makefile b/config/mingw/Makefile +index 048a87d..4bc222b 100644 +--- a/config/mingw/Makefile ++++ b/config/mingw/Makefile +@@ -368,9 +368,9 @@ endif + + ifdef WXT + CFLAGS += -DWXWIDGETS +- WXT_CXXFLAGS := $(shell wx-config --cxxflags) ++ WXT_CXXFLAGS := $(shell wx-config-2.8 --cxxflags) + CXXFLAGS += $(WXT_CXXFLAGS) +- WX_LIBS := $(shell wx-config --libs | sed -e "s+-Wl,--subsystem,windows++g" -e "s+-mwindows++g") ++ WX_LIBS := $(shell wx-config-2.8 --libs | sed -e "s+-Wl,--subsystem,windows++g" -e "s+-mwindows++g") + WX_OBJS = wxt_gui.$(O) + endif + +diff --git a/configure b/configure +index a7631cf..0bf5bf9 100755 +--- a/configure ++++ b/configure +@@ -12288,8 +12288,8 @@ if test "${with_wx_config+set}" = set; then : + fi + + +- # Extract the first word of "wx-config", so it can be a program name with args. +-set dummy wx-config; ac_word=$2 ++ # Extract the first word of "wx-config-2.8", so it can be a program name with args. ++set dummy wx-config-2.8; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } + if ${ac_cv_path_WX_CONFIG+:} false; then : +diff --git a/configure.in b/configure.in +index 28e9e5d..f87e31c 100755 +--- a/configure.in ++++ b/configure.in +@@ -975,7 +975,7 @@ if test "${enable_wxwidgets}" = yes ; then + + dnl The user can specify another path for wx-config + WXWIDGETS_PATH="${PATH}" +- AC_ARG_WITH(wx-config,dnl ++ AC_ARG_WITH(wx-config-2.8,dnl + [--with-wx-config=PATH Use the given path to wx-config, the wxWidgets configuration program + (default search in $PATH)], + [ if test "${with_wx_config}" != "no" ; then +@@ -983,7 +983,7 @@ if test "${enable_wxwidgets}" = yes ; then + fi ]) + + dnl Look for wx-config in the path +- AC_PATH_PROG(WX_CONFIG, wx-config, no, ${WXWIDGETS_PATH}) ++ AC_PATH_PROG(WX_CONFIG, wx-config-2.8, no, ${WXWIDGETS_PATH}) + if test "${WX_CONFIG}" = "no"; then + AC_MSG_WARN([wxWidgets can't be found. You can try --with-wx-config-path to give the right path to wx-config. The wxWidgets terminal will not be compiled.]) + enable_wxwidgets_ok=no +-- +2.38.1 + |