update libgphoto2 to v2.3.1 (closes: #1105), add dependency on libiconv
[openwrt/svn-archive/archive.git] / libs / libgphoto2 / Makefile
index d7738d7a3c8cad057cd933fb22bc4ed750a9a15c..c5fb9b3e6a6452ad42d8d8665d498947c1852467 100644 (file)
@@ -4,17 +4,17 @@
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
-# $Id$
+# $Id$
 
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libgphoto2
-PKG_VERSION:=2.2.1
+PKG_VERSION:=2.3.1
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=@SF/gphoto
-PKG_MD5SUM:=69827311733e39fafa9f77bb05e55b77
+PKG_MD5SUM:=37f85e34e5b6031ddf6cac8b8782ac4f
 PKG_CAT:=bzcat
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
@@ -31,7 +31,7 @@ endef
 
 define Package/libgphoto2
   $(call Package/libgphoto2/Default)
-  DEPENDS:=+libusb +libexif +libjpeg +libpthread +libltdl
+  DEPENDS:=+libusb +libexif +libjpeg +libpthread +libltdl +libiconv
   TITLE:=The basic library of the gphoto2 program.
   MENU:=1
 endef
@@ -47,12 +47,13 @@ define Build/Configure
                --enable-shared \
                --enable-static \
                --disable-rpath \
-               --with-gnu-ld \
                --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" \
@@ -85,19 +86,20 @@ define Build/InstallDev
 endef
 
 define Build/UninstallDev
-       rm -rf  $(STAGING_DIR)/usr/bin/gphoto2-config \
+       rm -rf \
+               $(STAGING_DIR)/usr/bin/gphoto2-config \
                $(STAGING_DIR)/usr/bin/gphoto2-port-config \
                $(STAGING_DIR)/usr/include/gphoto2* \
                $(STAGING_DIR)/usr/lib/libgphoto*.{a,so*}
 endef
 
 define Package/libgphoto2/install
-       install -m0755 -d $(1)/usr/lib
+       $(INSTALL_DIR) $(1)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgphoto2{,_port}.so.* $(1)/usr/lib/
 endef
 
 define Package/libgphoto2-drivers/install
-       install -d -m0755 $(1)/usr/lib/
+       $(INSTALL_DIR) $(1)/usr/lib/
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgphoto2{,_port} $(1)/usr/lib/
        rm -rf $(1)/usr/lib/libgphoto2{,_port}/*/*.{,l}a
 endef