-#
-# Copyright (C) 2006 OpenWrt.org
+#
+# Copyright (C) 2006-2008 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=libgphoto2
-PKG_VERSION:=2.3.1
+PKG_VERSION:=2.4.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@SF/gphoto
-PKG_MD5SUM:=37f85e34e5b6031ddf6cac8b8782ac4f
+PKG_MD5SUM:=a60154772635b693ff08b4f34dea7f61
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
-PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
+PKG_FIXUP = libtool
include $(INCLUDE_DIR)/package.mk
-
define Package/libgphoto2/Default
SECTION:=libs
CATEGORY:=Libraries
TITLE:=Gphoto2 drivers for various cameras
endef
-define Build/Configure
- $(call Build/Configure/Default, \
- --enable-shared \
- --enable-static \
- --disable-rpath \
- --with-drivers=all \
- --without-included-ltdl \
- --without-libiconv-prefix \
- --without-libintl-prefix \
- , \
- CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/lib/libiconv/include" \
- LDFLAGS="$$$$LDFLAGS -L$(STAGING_DIR)/usr/lib/libiconv/lib" \
- LIBEXIF_CFLAGS="$$$$CPPFLAGS" \
- LIBEXIF_LIBS="$$$$LDFLAGS -lexif" \
- LIBUSB_CFLAGS="$$$$CPPFLAGS" \
- LIBUSB_LIBS="$$$$LDFLAGS -lusb" \
- LIBS="-lltdl" \
- )
-endef
+CONFIGURE_ARGS += \
+ --enable-shared \
+ --enable-static \
+ --disable-rpath \
+ --with-drivers=all \
+ --without-included-ltdl \
+ --without-libiconv-prefix \
+ --without-libintl-prefix \
+
+CONFIGURE_VARS += \
+ CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/lib/libiconv/include" \
+ LDFLAGS="$$$$LDFLAGS -L$(STAGING_DIR)/usr/lib/libiconv/lib" \
+ LIBEXIF_CFLAGS="$$$$CPPFLAGS" \
+ LIBEXIF_LIBS="$$$$LDFLAGS -lexif" \
+ LIBUSB_CFLAGS="$$$$CPPFLAGS" \
+ LIBUSB_LIBS="$$$$LDFLAGS -lusb" \
+ LIBS="-lltdl" \
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) \
+++ /dev/null
-diff -urN libgphoto2-2.3.1/camlibs/ptp2/ptp-pack.c libgphoto2-2.3.1.new/camlibs/ptp2/ptp-pack.c
---- libgphoto2-2.3.1/camlibs/ptp2/ptp-pack.c 2006-12-24 16:16:20.000000000 +0100
-+++ libgphoto2-2.3.1.new/camlibs/ptp2/ptp-pack.c 2007-02-28 00:17:17.000000000 +0100
-@@ -116,8 +116,17 @@
- nconv = iconv (params->cd_ucs2_to_locale, &stringp, &convlen, &locp, &convmax);
- /* FIXME: handle size errors */
- loclstr[PTP_MAXSTRLEN*3] = '\0';
-- if (nconv == (size_t) -1)
-- return NULL;
-+ if (nconv == (size_t) -1) {
-+ int i;
-+ /* try the old way, in case iconv is broken */
-+ for (i=0;i<loclen;i++) {
-+ if (string[i]>127)
-+ loclstr[i] = '?';
-+ else
-+ loclstr[i] = string[i];
-+ }
-+ string[loclen] = 0;
-+ }
- return strdup(loclstr);
- }
- return NULL;