diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2013-07-02 16:31:41 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2013-07-02 16:32:28 +0200 |
commit | 2ef211efeb1de2e48862d6ecc2fc2bab3a702b22 (patch) | |
tree | 507e09e6f3db14eeb75c905a1b312aaf7a51103d /main | |
parent | f10bce070b3bea6cfad50c28c94561df9d7c271a (diff) | |
download | aports-2ef211efeb1de2e48862d6ecc2fc2bab3a702b22.tar.bz2 aports-2ef211efeb1de2e48862d6ecc2fc2bab3a702b22.tar.xz |
main/haserl: upgrade to 0.9.30
Diffstat (limited to 'main')
5 files changed, 392 insertions, 5 deletions
diff --git a/main/haserl/0001-Modernize-configure.ac-for-newer-autotools.patch b/main/haserl/0001-Modernize-configure.ac-for-newer-autotools.patch new file mode 100644 index 0000000000..87813fbe2e --- /dev/null +++ b/main/haserl/0001-Modernize-configure.ac-for-newer-autotools.patch @@ -0,0 +1,82 @@ +From 4875e8266e134d73128fd6e393429e5d24f8e4ee Mon Sep 17 00:00:00 2001 +From: Nathan Angelacos <nangel@alpinelinux.org> +Date: Sun, 30 Jun 2013 21:58:00 -0700 +Subject: [PATCH 1/4] Modernize configure.ac for newer autotools + +--- + ChangeLog | 3 +++ + configure.ac | 14 +++++++------- + 2 files changed, 10 insertions(+), 7 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index a244edf..dffc9d1 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,6 @@ ++ 0.9.31 ++ * Modernize configure.ac ++ + 2013-27-06 + 0.9.30 + * The Mayhem Team of CMU found an undisclosed segfault when the first +diff --git a/configure.ac b/configure.ac +index 7998afb..74560c5 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1,6 +1,6 @@ + # Process this file with autoconf to produce a configure script. +-AC_INIT([haserl],[0.9.30],[Nathan Angelacos - nangel@users.sourceforge.net],[haserl]) +-AM_INIT_AUTOMAKE([haserl],[$PACKAGE_VERSION]) ++AC_INIT([haserl],[0.9.31],[Nathan Angelacos - nangel@users.sourceforge.net],[haserl]) ++AM_INIT_AUTOMAKE + + # Checks for programs. + AC_PROG_CC +@@ -56,7 +56,7 @@ ac_report_bash_extensions=disabled + + + AC_ARG_WITH(lua, +- AC_HELP_STRING([--with-lua[[=DIR]]], [use lua in DIR]), ++ AS_HELP_STRING([--with-lua[[=DIR]]],[use lua in DIR]), + [ case "$withval" in + no) ac_report_have_lua=disabled + ;; +@@ -90,7 +90,7 @@ AM_CONDITIONAL(USE_LUA, test x$ac_report_have_lua = xenabled) + + # shell: ordinary Haserl code with embedded Lua + AC_ARG_ENABLE(luashell, +- AC_HELP_STRING([--enable-luashell], [Includes the standard Lua shell - Haserl with embedded Lua (default is yes if Lua's enabled)]), ++ AS_HELP_STRING([--enable-luashell],[Includes the standard Lua shell - Haserl with embedded Lua (default is yes if Lua's enabled)]), + [case "${enableval}" in + yes) luashell=true ;; + no) luashell=false ;; +@@ -103,7 +103,7 @@ fi + + # shell: precompiled Haserl code - compiled Lua code + AC_ARG_ENABLE(luacshell, +- AC_HELP_STRING([--enable-luacshell], [Includes the compiled Lua shell - precompiled Haserl/Lua (default is yes if Lua's enabled)]), ++ AS_HELP_STRING([--enable-luacshell],[Includes the compiled Lua shell - precompiled Haserl/Lua (default is yes if Lua's enabled)]), + [case "${enableval}" in + yes) luacshell=true ;; + no) luacshell=false ;; +@@ -121,7 +121,7 @@ fi + # the Linux shell is always available + + AC_ARG_ENABLE(bashshell, +- AC_HELP_STRING([--enable-bashshell], [Includes the Bash or another Linux shell (default is yes)]), ++ AS_HELP_STRING([--enable-bashshell],[Includes the Bash or another Linux shell (default is yes)]), + [case "${enableval}" in + yes) bashshell=true ;; + no) bashshell=false ;; +@@ -149,7 +149,7 @@ fi + + # Do we include scott's bash extensions + AC_ARG_ENABLE(bash-extensions, +- AC_HELP_STRING([--enable-bash-extensions], [Includes bash extensions to the haserl script language (default is no)]), ++ AS_HELP_STRING([--enable-bash-extensions],[Includes bash extensions to the haserl script language (default is no)]), + [case "${enableval}" in + yes) bashextensions=true + ac_report_bash_extensions=enabled +-- +1.8.3.2 + diff --git a/main/haserl/0002-remove-the-generated-config.h.in.patch b/main/haserl/0002-remove-the-generated-config.h.in.patch new file mode 100644 index 0000000000..025652985b --- /dev/null +++ b/main/haserl/0002-remove-the-generated-config.h.in.patch @@ -0,0 +1,126 @@ +From bb9ed0eb0ce455a6b7552b11d09a395ad3d4489f Mon Sep 17 00:00:00 2001 +From: Natanael Copa <ncopa@alpinelinux.org> +Date: Mon, 1 Jul 2013 13:43:42 +0200 +Subject: [PATCH 2/4] remove the generated config.h.in + +It is generated with autoheader +--- + src/config.h.in | 106 -------------------------------------------------------- + 1 file changed, 106 deletions(-) + delete mode 100644 src/config.h.in + +diff --git a/src/config.h.in b/src/config.h.in +deleted file mode 100644 +index f9135a1..0000000 +--- a/src/config.h.in ++++ /dev/null +@@ -1,106 +0,0 @@ +-/* src/config.h.in. Generated from configure.ac by autoheader. */ +- +-/* Include bash extensions */ +-#undef BASHEXTENSIONS +- +-/* Define to 1 if you have the <inttypes.h> header file. */ +-#undef HAVE_INTTYPES_H +- +-/* Define to 1 if you have the <memory.h> header file. */ +-#undef HAVE_MEMORY_H +- +-/* Define to 1 if you have the `memset' function. */ +-#undef HAVE_MEMSET +- +-/* Define to 1 if you have the `putenv' function. */ +-#undef HAVE_PUTENV +- +-/* Define to 1 if you have the <signal.h> header file. */ +-#undef HAVE_SIGNAL_H +- +-/* Define to 1 if you have the <stdint.h> header file. */ +-#undef HAVE_STDINT_H +- +-/* Define to 1 if you have the <stdlib.h> header file. */ +-#undef HAVE_STDLIB_H +- +-/* Define to 1 if you have the `strcasecmp' function. */ +-#undef HAVE_STRCASECMP +- +-/* Define to 1 if you have the `strdup' function. */ +-#undef HAVE_STRDUP +- +-/* Define to 1 if you have the <strings.h> header file. */ +-#undef HAVE_STRINGS_H +- +-/* Define to 1 if you have the <string.h> header file. */ +-#undef HAVE_STRING_H +- +-/* Define to 1 if you have the `strncasecmp' function. */ +-#undef HAVE_STRNCASECMP +- +-/* Define to 1 if you have the `strstr' function. */ +-#undef HAVE_STRSTR +- +-/* Define to 1 if you have the <sys/stat.h> header file. */ +-#undef HAVE_SYS_STAT_H +- +-/* Define to 1 if you have the <sys/types.h> header file. */ +-#undef HAVE_SYS_TYPES_H +- +-/* Define to 1 if you have the <unistd.h> header file. */ +-#undef HAVE_UNISTD_H +- +-/* Include Bash/Linux shell */ +-#undef INCLUDE_BASHSHELL +- +-/* Include shell for precompiled Haserl/Lua */ +-#undef INCLUDE_LUACSHELL +- +-/* Include ordinary Lua shell */ +-#undef INCLUDE_LUASHELL +- +-/* Include just the compiled Lua shell */ +-#undef JUST_LUACSHELL +- +-/* Name of package */ +-#undef PACKAGE +- +-/* Define to the address where bug reports for this package should be sent. */ +-#undef PACKAGE_BUGREPORT +- +-/* Define to the full name of this package. */ +-#undef PACKAGE_NAME +- +-/* Define to the full name and version of this package. */ +-#undef PACKAGE_STRING +- +-/* Define to the one symbol short name of this package. */ +-#undef PACKAGE_TARNAME +- +-/* Define to the home page for this package. */ +-#undef PACKAGE_URL +- +-/* Define to the version of this package. */ +-#undef PACKAGE_VERSION +- +-/* Define to 1 if you have the ANSI C header files. */ +-#undef STDC_HEADERS +- +-/* the subshell to start up */ +-#undef SUBSHELL_CMD +- +-/* Enable Lua */ +-#undef USE_LUA +- +-/* Version number of package */ +-#undef VERSION +- +-/* Enable GNU Extensions */ +-#undef _GNU_SOURCE +- +-/* Define to empty if `const' does not conform to ANSI C. */ +-#undef const +- +-/* Define to `unsigned int' if <sys/types.h> does not define. */ +-#undef size_t +-- +1.8.3.2 + diff --git a/main/haserl/0003-use-pkg-config-to-find-Lua-CFLAGS-and-LIBS.patch b/main/haserl/0003-use-pkg-config-to-find-Lua-CFLAGS-and-LIBS.patch new file mode 100644 index 0000000000..0d40147068 --- /dev/null +++ b/main/haserl/0003-use-pkg-config-to-find-Lua-CFLAGS-and-LIBS.patch @@ -0,0 +1,120 @@ +From 8a71fdd71b5496028c92c1aa1bd6a949c13579ca Mon Sep 17 00:00:00 2001 +From: Natanael Copa <ncopa@alpinelinux.org> +Date: Mon, 1 Jul 2013 13:48:45 +0200 +Subject: [PATCH 3/4] use pkg-config to find Lua CFLAGS and LIBS + +By default, use pkg-config lua --cflags/--libs but let user override +the pkg-config name. For example, to build with lua5.2.pc use + --with-lua=lua5.2 + +This fixes situations when both lua5.1 and lua5.2 is available but not +'lua'. +--- + configure.ac | 44 +++++++++----------------------------------- + src/Makefile.am | 6 ++++-- + src/h_lua.h | 1 + + 3 files changed, 14 insertions(+), 37 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 74560c5..a854642 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -40,13 +40,6 @@ AC_DEFINE([_GNU_SOURCE], [], [Enable GNU Extensions]) + + + dnl ************************************************************** +-AC_ARG_WITH(lua-headers, +- [ --with-lua-headers=DIR lua include files location], +- [LUA_HDR_DIR="$withval"] +- [CFLAGS="$CFLAGS -I$withval"] +-) +- +- + dnl Checks for lua + + luashell=false +@@ -54,36 +47,17 @@ luacshell=false + ac_report_have_lua=disabled + ac_report_bash_extensions=disabled + ++AC_ARG_WITH([lua], ++ AS_HELP_STRING([--with-lua], [Specify lua pkg-config name (default is 'lua')])) + +-AC_ARG_WITH(lua, +- AS_HELP_STRING([--with-lua[[=DIR]]],[use lua in DIR]), +-[ case "$withval" in +- no) ac_report_have_lua=disabled +- ;; +- *) AC_SEARCH_LIBS(dlopen, dl) +- # ubuntu has lua5.1 rather than just lua +- if pkg-config --exists lua5.1; then +- LUALIB=lua5.1 +- else +- LUALIB=lua +- fi +- if test -z "$LUA_HDR_DIR"; then +- CFLAGS="$CFLAGS `pkg-config $LUALIB --cflags`" +- fi +- LIBS="$LIBS -lm" +- LDFLAGS="$LDFLAGS -Wl,-E -L$withval" +- AC_DEFINE(USE_LUA, , [Enable Lua]) +- +- AC_CHECK_LIB($LUALIB, luaL_newstate, , [ +- AC_MSG_ERROR([The Lua runtime library cannot be found!]) +- ], $LIBS) +- luashell=true +- luacshell=true +- ac_report_have_lua=enabled +- ;; +- esac ], [ +- ac_report_have_lua=disabled ++AS_IF([test "x$with_lua" = "xyes"], [with_lua=lua]) ++AS_IF([test "x$with_lua" != "xno"], [ ++ luashell=true ++ luacshell=true ++ ac_report_have_lua=enabled ++ PKG_CHECK_MODULES([LUA], [$with_lua]) + ]) ++ + AM_CONDITIONAL(USE_LUA, test x$ac_report_have_lua = xenabled) + + # If Lua is enabled, the user can choose between two different shells +diff --git a/src/Makefile.am b/src/Makefile.am +index 245d92e..c3e220a 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -27,8 +27,8 @@ if USE_LUA + # lua2c_LIBS ?= -llua -ldl -lm + lua2c_LDFLAGS ?= -Wl,-E + lua2c: lua2c.c +- $(CC_FOR_BUILD) $(CFLAGS) $(LDFLAGS) $(lua2c_LDFLAGS) \ +- -o $@ $^ $(LIBS) ++ $(CC_FOR_BUILD) $(CFLAGS) $(LUA_CFLAGS) $(LDFLAGS) $(lua2c_LDFLAGS) \ ++ -o $@ $^ $(LIBS) $(LUA_LIBS) + + haserl_lualib.inc : haserl_lualib.lua lua2c + if ! ./lua2c haserl_lualib haserl_lualib.lua >$@; then \ +@@ -45,6 +45,8 @@ bin_PROGRAMS = haserl + haserl_SOURCES = common.c common.h sliding_buffer.c sliding_buffer.h \ + h_error.c h_error.h h_script.c h_script.h rfc2388.c rfc2388.h \ + $(BASHSOURCE) $(LUASOURCE) haserl.c haserl.h ++haserl_CFLAGS = $(LUA_CFLAGS) ++haserl_LDADD = $(LUA_LIBS) + + install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ +diff --git a/src/h_lua.h b/src/h_lua.h +index f85efdc..e8984e5 100644 +--- a/src/h_lua.h ++++ b/src/h_lua.h +@@ -21,6 +21,7 @@ + #ifndef H_LUA_H + #define H_LUA_H 1 + ++#include <lua.h> + + void lua_exec(buffer_t *buf, char *str); + void lua_echo(buffer_t *buf, char *str, size_t len); +-- +1.8.3.2 + diff --git a/main/haserl/0004-fix-compiler-warning-variable-retval-set-but-not-use.patch b/main/haserl/0004-fix-compiler-warning-variable-retval-set-but-not-use.patch new file mode 100644 index 0000000000..5bacbbf6ef --- /dev/null +++ b/main/haserl/0004-fix-compiler-warning-variable-retval-set-but-not-use.patch @@ -0,0 +1,36 @@ +From 62d7c40250415cad65e44cfe00f75f55edea36e3 Mon Sep 17 00:00:00 2001 +From: Natanael Copa <ncopa@alpinelinux.org> +Date: Mon, 1 Jul 2013 13:57:50 +0200 +Subject: [PATCH 4/4] fix compiler warning: variable 'retval' set but not used + +make it build with -Wall -Werror +--- + src/haserl.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/src/haserl.c b/src/haserl.c +index 22ac396..6b346c0 100644 +--- a/src/haserl.c ++++ b/src/haserl.c +@@ -692,7 +692,6 @@ main (int argc, char *argv[]) + #endif + script_t *scriptchain; + +- int retval = 0; + char *filename = NULL; + + argv_t *av = NULL; +@@ -878,8 +877,8 @@ main (int argc, char *argv[]) + if (strcasecmp (getenv ("REQUEST_METHOD"), "POST") == 0) + { + if (global.acceptall == TRUE) +- retval = ReadCGIQueryString (env); +- retval = ReadCGIPOSTValues (env); ++ ReadCGIQueryString (env); ++ ReadCGIPOSTValues (env); + } + } + } +-- +1.8.3.2 + diff --git a/main/haserl/APKBUILD b/main/haserl/APKBUILD index e58045d891..ad7e36d233 100644 --- a/main/haserl/APKBUILD +++ b/main/haserl/APKBUILD @@ -1,30 +1,39 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=haserl -pkgver=0.9.29 +pkgver=0.9.30 pkgrel=0 pkgdesc="Html And Shell Embedded Report Language" url="http://haserl.sourceforge.net/" arch="all" license="GPL-2" depends= -makedepends="lua-dev automake autoconf" +makedepends="lua5.1-dev automake autoconf" subpackages="$pkgname-doc" source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz + 0001-Modernize-configure.ac-for-newer-autotools.patch + 0002-remove-the-generated-config.h.in.patch + 0003-use-pkg-config-to-find-Lua-CFLAGS-and-LIBS.patch + 0004-fix-compiler-warning-variable-retval-set-but-not-use.patch " _builddir="$srcdir/$pkgname-$pkgver" prepare() { cd "$_builddir" + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done sed -i -e 's/^ /\t/' src/Makefile.am || return 1 rm -f src/haserl_lualib.inc - aclocal && autoconf && automake --add-missing || return 1 + aclocal && autoconf && autoheader && automake --add-missing || return 1 } build() { cd "$_builddir" ./configure --prefix=/usr \ - --with-lua || return 1 + --with-lua=lua5.1 || return 1 make || return 1 } @@ -34,4 +43,18 @@ package() { chmod 4111 "$pkgdir"/usr/bin/haserl } -md5sums="4cac9409530200b4a7a82a48ec174800 haserl-0.9.29.tar.gz" +md5sums="e25f1a13f7cfe5993e961803446cd718 haserl-0.9.30.tar.gz +70c13f4fcbc856fabd4988cbaa889b0d 0001-Modernize-configure.ac-for-newer-autotools.patch +5d03b8001deb2a3fccd5dec5debb073c 0002-remove-the-generated-config.h.in.patch +11871f1faf9d45d081896aa9ac02713a 0003-use-pkg-config-to-find-Lua-CFLAGS-and-LIBS.patch +3aa1e5ad8f7b9acf436617213798bf87 0004-fix-compiler-warning-variable-retval-set-but-not-use.patch" +sha256sums="01f9f942c58beb8eb6acd7fdbc5fa32e9156a9b8630992def7eb5a48c5f04b50 haserl-0.9.30.tar.gz +50a78f87142554800e680ba3d0b6aec899a0a0ce96309522fc9df04ac247ed73 0001-Modernize-configure.ac-for-newer-autotools.patch +ecc996c7adc877a35960fe09e9b89c86e5c475bc4133ff1df925562eb25d29c3 0002-remove-the-generated-config.h.in.patch +330ade0ae71d32de9db8aca58a8d87e924ba8cd097db352a580e448d5ccd2bbc 0003-use-pkg-config-to-find-Lua-CFLAGS-and-LIBS.patch +9fe2e3320798f635c801a148af85c2638df3a451427ffdc36893558da86c037c 0004-fix-compiler-warning-variable-retval-set-but-not-use.patch" +sha512sums="33b478c5cb5a53e8e696b9db36aaabe5961da3fa9d6199eb198d780ca9de9c1c9588f594a2ffd4ba0dd56c5ed6a1494ef4f67ae73f31bfa24cd6629b53dee806 haserl-0.9.30.tar.gz +00b219aad35513ba915e4b01d6e831738c1e4c3e06385dfd0a49ea3433faf44641bbfb24858e2933ccdc605388621a7ba89f7ca611fa5b28526697b255a8bc2e 0001-Modernize-configure.ac-for-newer-autotools.patch +a7ef9f6bc95c812730ff0067143c7e215f6acced3b30f3e2fc1c7174f730021d856b86350342fb3a7eb851b4d0af9561a00994b5b27949348f586c9989eb4e1d 0002-remove-the-generated-config.h.in.patch +8fa409c9a4d2e9225fcb89281c094e6edd1bd3a1ffe6d743f0c3ae66c33b9960aa4ecd460f9119c095a76a8b1c37da0722a7956a5525cce1b9843ea654195048 0003-use-pkg-config-to-find-Lua-CFLAGS-and-LIBS.patch +5062364c45106d1a3fadf05dcd0a5dc010f7acf0c1bd0914333abd735ac5a8a82c175694208484e5ab146b930dafd969d8245baf2e8f510cb05f57694c14ff58 0004-fix-compiler-warning-variable-retval-set-but-not-use.patch" |