Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
---
lfs/squidguard | 2 +
src/patches/squidguard-1.6.0-configure.patch | 55 ++++++++++++++++++++
src/patches/squidguard-1.6.0-stdlib.patch | 22 ++++++++
3 files changed, 79 insertions(+)
create mode 100644 src/patches/squidguard-1.6.0-configure.patch
create mode 100644 src/patches/squidguard-1.6.0-stdlib.patch
@@ -72,6 +72,8 @@ $(subst %,%_BLAKE2,$(objects)) :
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
+ cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/squidguard-1.6.0-stdlib.patch
+ cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/squidguard-1.6.0-configure.patch
cd $(DIR_APP) && ./autogen.sh
cd $(DIR_APP) && ./configure \
--prefix=/usr \
new file mode 100644
@@ -0,0 +1,55 @@
+--- squidguard-1.6.0/configure.ac~ 2024-08-06 10:40:16.797400705 +0000
++++ squidguard-1.6.0/configure.ac 2024-08-06 10:41:36.321245621 +0000
+@@ -237,7 +237,7 @@
+ {
+ LDAP *p;
+ p = ldap_init("localhost", LDAP_PORT);
+- exit(0);
++ return 0;
+ }
+ ]])],,[
+ echo
+@@ -358,8 +358,8 @@
+ #endif
+ ver = major + ((float) minor / 1000);
+ if (ver >= 2.006)
+- exit (0);
+- exit (1);
++ return 0;
++ return 1;
+ }
+ ]])],
+ [db_ok_version=yes],
+@@ -396,8 +396,8 @@
+ #endif
+ ver = major + ((float) minor / 1000);
+ if (ver > 2.007 && ver < 3.002)
+- exit (1);
+- exit (0);
++ return 1;
++ return 0;
+ }
+ ]])],
+ [db_ok_version=yes],
+@@ -432,8 +432,8 @@
+ #endif
+ ver = major + ((float) minor / 1000);
+ if (ver >= 3.002)
+- exit (0);
+- exit (1);
++ return 0;
++ return 1;
+ }
+ ]])],
+ [dbg2_ok_version=yes],
+@@ -460,8 +460,8 @@
+ #endif
+ ver = major + ((float) minor / 1000);
+ if (ver >= 4.002)
+- exit (0);
+- exit (1);
++ return 0;
++ return 1;
+ }
+ ]])],
+ [dbg3_ok_version=yes],
new file mode 100644
@@ -0,0 +1,22 @@
+--- a/configure.ac 2022-12-15 10:33:13.845801113 +0300
++++ b/configure.ac 2022-12-15 10:33:39.828949903 +0300
+@@ -342,6 +342,9 @@
+ LIBS="$LIBS -ldb"
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+ #include <db.h>
++ #ifdef HAVE_STDLIB_H
++ #include <stdlib.h>
++ #endif
+ int main()
+ {
+ int major, minor, patch;
+@@ -377,6 +378,9 @@
+
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+ #include <db.h>
++ #ifdef HAVE_STDLIB_H
++ #include <stdlib.h>
++ #endif
+ int main()
+ {
+ int major, minor, patch;