From 281528655c7c918963a894707cff67c742d7a999 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sat, 31 Jul 2010 16:18:35 +0200 Subject: fix cross-compile on FreeBSD host --- package/squid/Makefile | 4 ++- package/squid/patches/patch-include_squid_endian_h | 15 +++++++++++ package/squid/patches/patch-include_squid_types_h | 31 ++++++++++++++++++++++ 3 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 package/squid/patches/patch-include_squid_endian_h create mode 100644 package/squid/patches/patch-include_squid_types_h diff --git a/package/squid/Makefile b/package/squid/Makefile index 624260b13..34cb65e0b 100644 --- a/package/squid/Makefile +++ b/package/squid/Makefile @@ -100,6 +100,7 @@ CONFIGURE_ENV+= ac_cv_sizeof_void_p=4 \ ac_cv_lib_nsl_main=no \ ac_cv_func_strnstr=no \ squid_cv_pf_inet6=yes +XAKE_FLAGS+= MKDIR_P="mkdir -p" CONFIGURE_ARGS+= --datadir=/usr/share/squid \ --libexecdir=/usr/lib/squid \ --sysconfdir=/etc/squid \ @@ -147,7 +148,8 @@ post-install: ${INSTALL_MODS_y} ${INSTALL_MODS_m} ${IDIR_SQUID}/etc/squid/ ${INSTALL_DATA} ./files/squid.conf ${IDIR_SQUID}/etc/squid/ ${INSTALL_DIR} ${IDIR_SQUID}/usr/share/squid/errors - ${CP} ${WRKINST}/usr/share/squid/errors/en ${IDIR_SQUID}/usr/share/squid/errors + ${CP} ${WRKINST}/usr/share/squid/errors/en \ + ${IDIR_SQUID}/usr/share/squid/errors ${CP} ${WRKINST}/usr/share/squid/icons ${IDIR_SQUID}/usr/share/squid/ ${INSTALL_DIR} ${IDIR_SQUID}/usr/sbin ${IDIR_SQUID}/usr/lib/squid ${INSTALL_BIN} ${WRKINST}/usr/sbin/squid ${IDIR_SQUID}/usr/sbin/ diff --git a/package/squid/patches/patch-include_squid_endian_h b/package/squid/patches/patch-include_squid_endian_h new file mode 100644 index 000000000..b89b1121c --- /dev/null +++ b/package/squid/patches/patch-include_squid_endian_h @@ -0,0 +1,15 @@ +--- squid-3.1.4.orig/include/squid_endian.h 2010-05-30 15:21:11.000000000 +0200 ++++ squid-3.1.4/include/squid_endian.h 2010-07-31 14:29:02.000000000 +0200 +@@ -65,9 +65,12 @@ + * + * Some systems define htobe16()/be16toh() and friends in . + */ ++#include ++#if !defined(BSD) + #if HAVE_BYTESWAP_H + # include + #endif /* HAVE_BYTESWAP_H */ ++#endif + #ifdef HAVE_MACHINE_BYTE_SWAP_H + # include + #endif /* HAVE_MACHINE_BYTE_SWAP_H */ diff --git a/package/squid/patches/patch-include_squid_types_h b/package/squid/patches/patch-include_squid_types_h new file mode 100644 index 000000000..ae6bd3de3 --- /dev/null +++ b/package/squid/patches/patch-include_squid_types_h @@ -0,0 +1,31 @@ +--- squid-3.1.4.orig/include/squid_types.h 2010-05-30 15:21:12.000000000 +0200 ++++ squid-3.1.4/include/squid_types.h 2010-07-31 14:28:05.000000000 +0200 +@@ -56,13 +56,16 @@ + #ifndef SQUID_TYPES_H + #define SQUID_TYPES_H + ++#include + /* This should be in synch with what we have in acinclude.m4 */ + #if HAVE_SYS_TYPES_H + #include + #endif ++#if !defined(BSD) + #if HAVE_LINUX_TYPES_H + #include + #endif ++#endif + #if STDC_HEADERS + #include + #include +@@ -70,9 +73,11 @@ + #if HAVE_INTTYPES_H + #include + #endif ++#if !defined(BSD) + #if HAVE_SYS_BITYPES_H + #include + #endif ++#endif + #if HAVE_SYS_SELECT_H + #include + #endif -- cgit v1.2.3