gperf: Add package

This commit is contained in:
Auxilus 2017-11-22 04:26:34 +05:30 committed by Fredrik Fornwall
parent b8f6d4a6c6
commit 5f19aec1cb
2 changed files with 25 additions and 0 deletions

6
packages/gperf/build.sh Normal file
View File

@ -0,0 +1,6 @@
TERMUX_PKG_HOMEPAGE=https://www.gnu.org/software/gperf
TERMUX_PKG_DESCRIPTION="A perfect hash function generator"
TERMUX_PKG_VERSION=3.1
TERMUX_PKG_SRCURL=http://mirrors.kernel.org/gnu/gperf/gperf-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=588546b945bba4b70b6a3a616e80b4ab466e3f33024a352fc2198112cdbb3ae2
TERMUX_PKG_BUILD_IN_SRC=yes

View File

@ -0,0 +1,19 @@
--- ./src/output.cc
+++ ../src/output.cc
@@ -2083,6 +2083,16 @@
}
printf ("\n");
+ // Include stdlib.h or cstdlib header to fix errors about size_t
+ if (option[KRC] || option[C] || option[ANSIC])
+ {
+ printf("#include <stdlib.h>\n\n");
+ }
+ else if (option[CPLUSPLUS])
+ {
+ printf("#include <cstdlib>\n\n");
+ }
+
if (_charset_dependent
&& (_key_positions.get_size() > 0 || option[UPPERLOWER]))
{