summaryrefslogtreecommitdiff
path: root/package/squid/patches
diff options
context:
space:
mode:
Diffstat (limited to 'package/squid/patches')
-rw-r--r--package/squid/patches/patch-configure20
-rw-r--r--package/squid/patches/patch-include_config_h48
-rw-r--r--package/squid/patches/patch-lib_util_c22
-rw-r--r--package/squid/patches/patch-src_Makefile_in19
4 files changed, 109 insertions, 0 deletions
diff --git a/package/squid/patches/patch-configure b/package/squid/patches/patch-configure
new file mode 100644
index 000000000..5ea663655
--- /dev/null
+++ b/package/squid/patches/patch-configure
@@ -0,0 +1,20 @@
+$Id$
+--- squid-2.5.STABLE13.orig/configure 2006-03-12 12:29:22.000000000 +0100
++++ squid-2.5.STABLE13/configure 2006-10-02 20:00:32.000000000 +0200
+@@ -1538,6 +1538,7 @@ CRYPTLIB=''
+ REGEXLIB='' # -lregex
+ LIBREGEX='' # libregex.a
+
++if false; then
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+ set dummy pkg-config; ac_word=$2
+ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+@@ -1573,7 +1574,7 @@ if test -n "$PKGCONFIG"; then
+ else
+ echo "$ac_t""no" 1>&6
+ fi
+-
++fi
+
+ echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
+ echo "configure:1580: checking for Cygwin environment" >&5
diff --git a/package/squid/patches/patch-include_config_h b/package/squid/patches/patch-include_config_h
new file mode 100644
index 000000000..1c8b1dc23
--- /dev/null
+++ b/package/squid/patches/patch-include_config_h
@@ -0,0 +1,48 @@
+$Id$
+
+ evil kludge because configure only checks the host system,
+ not the build system, yet builds a tool to run on it (cf_gen)
+
+ the real way to do this is probably to enhance configure.in
+ the way gcc uses it if doing a build with build!=(host==target),
+ but this should be enough for now; contact tg@ (PR#71) if it isn't
+
+--- squid-2.5.STABLE13.orig/include/config.h 2005-04-23 03:32:27.000000000 +0200
++++ squid-2.5.STABLE13/include/config.h 2006-09-18 19:21:26.000000000 +0200
+@@ -34,7 +34,36 @@
+ #ifndef SQUID_CONFIG_H
+ #define SQUID_CONFIG_H
+
++#ifndef BUILD_HOST_TOOL
+ #include "autoconf.h" /* For GNU autoconf variables */
++#else
++/* we just hope our host systems can cope */
++#define STDC_HEADERS 1
++#define HAVE_MEMCPY 1
++#define HAVE_MEMMOVE 1
++#define HAVE_MEMSET 1
++#define HAVE_MKSTEMP 1
++#define HAVE_MKTIME 1
++#define HAVE_ASSERT_H 1
++#define HAVE_CTYPE_H 1
++#define HAVE_DIRENT_H 1
++#define HAVE_ERRNO_H 1
++#define HAVE_FCNTL_H 1
++#define HAVE_GETOPT_H 1
++#define HAVE_INTTYPES_H 1
++#define HAVE_LIMITS_H 1
++#define HAVE_SIGNAL_H 1
++#define HAVE_STDARG_H 1
++#define HAVE_STDDEF_H 1
++#define HAVE_STDIO_H 1
++#define HAVE_STDLIB_H 1
++#define HAVE_STRING_H 1
++#define HAVE_SYS_PARAM_H 1
++#define HAVE_SYS_STAT_H 1
++#define HAVE_SYS_TIME_H 1
++#define HAVE_TIME_H 1
++#define HAVE_UNISTD_H 1
++#endif
+ #include "version.h"
+
+ /****************************************************************************
diff --git a/package/squid/patches/patch-lib_util_c b/package/squid/patches/patch-lib_util_c
new file mode 100644
index 000000000..622df36d6
--- /dev/null
+++ b/package/squid/patches/patch-lib_util_c
@@ -0,0 +1,22 @@
+$Id$
+
+ the host tools don't need libm
+
+--- squid-2.5.STABLE13.orig/lib/util.c 2005-06-30 20:50:56.000000000 +0200
++++ squid-2.5.STABLE13/lib/util.c 2006-09-18 19:23:46.000000000 +0200
+@@ -704,6 +704,7 @@ xpercent(double part, double whole)
+ return xdiv(100 * part, whole);
+ }
+
++#ifndef BUILD_HOST_TOOL
+ int
+ xpercentInt(double part, double whole)
+ {
+@@ -714,6 +715,7 @@ xpercentInt(double part, double whole)
+ return (int) floor(xpercent(part, whole) + 0.5);
+ #endif
+ }
++#endif
+
+ /* somewhat safer division */
+ double
diff --git a/package/squid/patches/patch-src_Makefile_in b/package/squid/patches/patch-src_Makefile_in
new file mode 100644
index 000000000..c77f4d6fb
--- /dev/null
+++ b/package/squid/patches/patch-src_Makefile_in
@@ -0,0 +1,19 @@
+$Id$
+
+ cross-configure kludge
+
+--- squid-2.5.STABLE13.orig/src/Makefile.in 2005-09-28 22:57:21.000000000 +0200
++++ squid-2.5.STABLE13/src/Makefile.in 2006-09-18 19:24:05.000000000 +0200
+@@ -702,7 +702,12 @@ cachemgr$(CGIEXT)$(EXEEXT): $(cachemgr__
+ $(LINK) $(cachemgr__CGIEXT__LDFLAGS) $(cachemgr__CGIEXT__OBJECTS) $(cachemgr__CGIEXT__LDADD) $(LIBS)
+ cf_gen$(EXEEXT): $(cf_gen_OBJECTS) $(cf_gen_DEPENDENCIES)
+ @rm -f cf_gen$(EXEEXT)
++ifneq (${HOSTCC},)
++ ${HOSTCC} ${INCLUDES} -DNDEBUG -DBUILD_HOST_TOOL -o cf_gen$(EXEEXT) \
++ $(srcdir)/cf_gen.c $(top_srcdir)/lib/util.c
++else
+ $(LINK) $(cf_gen_LDFLAGS) $(cf_gen_OBJECTS) $(cf_gen_LDADD) $(LIBS)
++endif
+ dnsserver$(EXEEXT): $(dnsserver_OBJECTS) $(dnsserver_DEPENDENCIES)
+ @rm -f dnsserver$(EXEEXT)
+ $(LINK) $(dnsserver_LDFLAGS) $(dnsserver_OBJECTS) $(dnsserver_LDADD) $(LIBS)