davfs2: patched build error (#1327) when 'Compile with full language support' option was enabled
Signed-off-by: fededim@gmail.com
PKG_NAME:=neon
PKG_VERSION:=0.30.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.webdav.org/neon
TARGET_CFLAGS += $(FPIC)
-TARGET_CPPFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
+TARGET_CPPFLAGS += -D_GNU_SOURCE
CONFIGURE_ARGS += \
--enable-shared \
PKG_NAME:=davfs2
PKG_VERSION:=1.5.4
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://download.savannah.gnu.org/releases/davfs2/
PKG_FIXUP:=gettext-version autoreconf
include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/nls.mk
define Package/davfs2
SECTION:=net
CATEGORY:=Network
SUBMENU:=Filesystem
- DEPENDS=+libneon +kmod-fuse +libfuse
+ DEPENDS=+libneon +kmod-fuse +libfuse $(ICONV_DEPENDS) $(INTL_DEPENDS)
TITLE:=Mount a WebDAV resource as a regular file system.
URL:=http://savannah.nongnu.org/projects/davfs2/
MAINTAINER:=Federico Di Marco <fededim@gmail.com>
/etc/davfs2/davfs2.conf
endef
-TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
+TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include # $(ICONV_CFLAGS) $(INTL_CFLAGS)
-TARGET_CPPFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
+TARGET_CPPFLAGS += -D_GNU_SOURCE # $(ICONV_CPFLAGS) $(INTL_CPPFLAGS)
CONFIGURE_VARS += \
- LDFLAGS="$(TARGET_LDFLAGS) -L$(TOOLCHAIN_DIR)/usr/lib -L$(TOOLCHAIN_DIR)/lib"
+ LDFLAGS="$(TARGET_LDFLAGS) -L$(TOOLCHAIN_DIR)/usr/lib -L$(TOOLCHAIN_DIR)/lib $(if $(INTL_FULL),-lintl) $(if $(ICONV_FULL),-liconv)" #$(INTL_LDFLAGS) $(ICONV_LDFLAGS)
-CONFIGURE_ARGS += --with-neon="$(STAGING_DIR)/usr"
+CONFIGURE_ARGS += --with-neon="$(STAGING_DIR)/usr" --enable-largefile #--with-libintl-prefix=$(INTL_PREFIX) --with-libiconv-prefix=$(ICONV_PREFIX)
define Package/davfs2/install
$(INSTALL_DIR) $(1)/usr/sbin
--- /dev/null
+diff --git a/src/webdav.c b/src/webdav.c
+index 1ff7c7f..74cd957 100644
+--- a/src/webdav.c
++++ b/src/webdav.c
+@@ -25,7 +25,7 @@
+ #ifdef HAVE_FCNTL_H
+ #include <fcntl.h>
+ #endif
+-#ifdef HAVE_ICONV_H
++#ifdef HAVE_ICONV
+ #include <iconv.h>
+ #endif
+ #ifdef HAVE_LANGINFO_H
+@@ -231,7 +231,7 @@ static int initialized;
+ Needed by ssl_verify() which may be called at any time. */
+ static int have_terminal;
+
+-#ifdef HAVE_ICONV_H
++#ifdef HAVE_ICONV
+ /* Handle to convert character encoding from utf-8 to LC_CTYPE.
+ If NULL no conversion is done. */
+ static iconv_t from_utf_8;
+@@ -264,7 +264,7 @@ static char **cookie_list;
+ /* Private function prototypes and inline functions */
+ /*==================================================*/
+
+-#ifdef HAVE_ICONV_H
++#ifdef HAVE_ICONV
+ static void
+ convert(char **s, iconv_t conv);
+ #endif
+@@ -337,7 +337,7 @@ dav_init_webdav(const dav_args *args)
+ if (args->neon_debug & ~NE_DBG_HTTPPLAIN)
+ syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "Initializing webdav");
+
+-#ifdef HAVE_ICONV_H
++#ifdef HAVE_ICONV
+ char *lc_charset = nl_langinfo(CODESET);
+ if (lc_charset && strcasecmp(lc_charset, "UTF-8") != 0) {
+ from_utf_8 = iconv_open(lc_charset, "UTF-8");