gperf: Add package
authorAuxilus <raghavsphadke@gmail.com>
Tue, 21 Nov 2017 22:56:34 +0000 (04:26 +0530)
committerFredrik Fornwall <fredrik@fornwall.net>
Tue, 21 Nov 2017 22:56:34 +0000 (23:56 +0100)
packages/gperf/build.sh [new file with mode: 0644]
packages/gperf/output.cc.patch [new file with mode: 0644]

diff --git a/packages/gperf/build.sh b/packages/gperf/build.sh
new file mode 100644 (file)
index 0000000..60842df
--- /dev/null
@@ -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
diff --git a/packages/gperf/output.cc.patch b/packages/gperf/output.cc.patch
new file mode 100644 (file)
index 0000000..a5cb238
--- /dev/null
@@ -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]))
+     {