2008-02-26 19:23:25 +00:00
|
|
|
#
|
2012-02-05 21:15:58 +00:00
|
|
|
# Copyright (C) 2006-2012 OpenWrt.org
|
2006-09-17 11:11:19 +00:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=libgphoto2
|
2012-02-05 21:15:58 +00:00
|
|
|
PKG_VERSION:=2.4.12
|
|
|
|
PKG_RELEASE:=1
|
2006-09-17 11:11:19 +00:00
|
|
|
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
|
|
|
PKG_SOURCE_URL:=@SF/gphoto
|
2012-02-05 21:15:58 +00:00
|
|
|
PKG_MD5SUM:=735c50ebb15cb8be61bac400ee4afb1e
|
2006-09-17 11:11:19 +00:00
|
|
|
|
2012-06-11 21:18:33 +00:00
|
|
|
PKG_FIXUP:=autoreconf
|
2010-02-19 00:14:01 +00:00
|
|
|
PKG_LIBTOOL_PATHS:=. libgphoto2_port
|
2010-01-31 14:48:46 +00:00
|
|
|
PKG_INSTALL:=1
|
2006-09-17 11:11:19 +00:00
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
2011-02-02 18:54:24 +00:00
|
|
|
include $(INCLUDE_DIR)/nls.mk
|
2006-09-17 11:11:19 +00:00
|
|
|
|
2006-10-03 17:25:17 +00:00
|
|
|
define Package/libgphoto2/Default
|
2006-09-17 11:11:19 +00:00
|
|
|
SECTION:=libs
|
|
|
|
CATEGORY:=Libraries
|
|
|
|
URL:=http://www.gphoto.org/
|
2006-10-03 17:25:17 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/libgphoto2
|
|
|
|
$(call Package/libgphoto2/Default)
|
2012-06-12 01:57:13 +00:00
|
|
|
DEPENDS:=+libexif +libjpeg +libpthread +libltdl $(ICONV_DEPENDS)
|
2006-10-03 17:25:17 +00:00
|
|
|
TITLE:=The basic library of the gphoto2 program.
|
|
|
|
MENU:=1
|
2006-09-17 11:11:19 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/libgphoto2-drivers
|
2006-10-03 17:25:17 +00:00
|
|
|
$(call Package/libgphoto2/Default)
|
2013-10-15 13:37:32 +00:00
|
|
|
DEPENDS:=libgphoto2 +libusb-compat +libgd
|
2006-10-03 17:25:17 +00:00
|
|
|
TITLE:=Gphoto2 drivers for various cameras
|
2006-09-17 11:11:19 +00:00
|
|
|
endef
|
|
|
|
|
2008-02-26 19:23:25 +00:00
|
|
|
CONFIGURE_ARGS += \
|
|
|
|
--enable-shared \
|
|
|
|
--enable-static \
|
|
|
|
--disable-rpath \
|
|
|
|
--with-drivers=all \
|
|
|
|
--without-included-ltdl \
|
|
|
|
--without-libiconv-prefix \
|
|
|
|
--without-libintl-prefix \
|
|
|
|
|
|
|
|
CONFIGURE_VARS += \
|
2011-07-20 21:48:49 +00:00
|
|
|
CPPFLAGS="$$$$CPPFLAGS $(ICONV_CFLAGS)" \
|
|
|
|
LDFLAGS="$$$$LDFLAGS $(ICONV_LDFLAGS)" \
|
2008-02-26 19:23:25 +00:00
|
|
|
LIBEXIF_CFLAGS="$$$$CPPFLAGS" \
|
|
|
|
LIBEXIF_LIBS="$$$$LDFLAGS -lexif" \
|
|
|
|
LIBUSB_CFLAGS="$$$$CPPFLAGS" \
|
|
|
|
LIBUSB_LIBS="$$$$LDFLAGS -lusb" \
|
|
|
|
LIBS="-lltdl" \
|
2006-09-17 11:11:19 +00:00
|
|
|
|
2012-02-05 21:15:58 +00:00
|
|
|
# If OpenWrt is using the iconv stub, we disable iconv support
|
2011-07-20 21:48:49 +00:00
|
|
|
# in libgphoto2 entirely since the stub lacks some essential
|
|
|
|
# conversions like UCS-2 to UTF-8 which will let certain drivers
|
|
|
|
# fail with "Failed to create iconv converter" .
|
|
|
|
ifneq ($(ICONV_FULL),1)
|
|
|
|
CONFIGURE_VARS += am_cv_func_iconv=no am_cv_lib_iconv=no
|
|
|
|
endif
|
|
|
|
|
2010-01-31 14:48:46 +00:00
|
|
|
MAKE_FLAGS += \
|
|
|
|
LIBLTDL="" \
|
2006-09-17 11:11:19 +00:00
|
|
|
|
2010-04-19 08:57:17 +00:00
|
|
|
TARGET_CFLAGS += $(FPIC)
|
|
|
|
|
2006-09-17 11:11:19 +00:00
|
|
|
define Build/InstallDev
|
2009-12-18 11:06:19 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/bin
|
2007-12-09 18:59:01 +00:00
|
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gphoto2{,-port}-config $(1)/usr/bin/
|
2009-12-18 11:06:19 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/include
|
2007-10-07 03:20:26 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/include/gphoto2 $(1)/usr/include/
|
2009-12-18 11:06:19 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
2007-10-07 03:20:26 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libgphoto2{,_port}.{a,so*} $(1)/usr/lib/
|
2009-12-18 11:06:19 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
2007-10-07 03:20:26 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libgphoto2.pc $(1)/usr/lib/pkgconfig/
|
|
|
|
$(SED) 's,-I$$$${prefix}/include/gphoto2,,g' $(1)/usr/bin/gphoto2{,-port}-config
|
|
|
|
$(SED) 's,-I$$$${prefix}/include,,g' $(1)/usr/bin/gphoto2{,-port}-config
|
2007-02-01 23:28:40 +00:00
|
|
|
# remove annoying recursive symlink
|
2007-10-07 03:20:26 +00:00
|
|
|
rm -f $(1)/usr/include/gphoto2/gphoto2
|
2006-09-17 11:11:19 +00:00
|
|
|
endef
|
|
|
|
|
2006-10-03 17:25:17 +00:00
|
|
|
define Package/libgphoto2/install
|
2006-11-23 00:29:07 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
2006-10-03 17:25:17 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libgphoto2{,_port}.so.* $(1)/usr/lib/
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/libgphoto2-drivers/install
|
2006-11-23 00:29:07 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/
|
2006-10-03 17:25:17 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libgphoto2{,_port} $(1)/usr/lib/
|
|
|
|
rm -rf $(1)/usr/lib/libgphoto2{,_port}/*/*.{,l}a
|
2012-06-12 01:57:13 +00:00
|
|
|
rm -f $(1)/usr/lib/libgphoto2_port/*/usb.so
|
2006-10-03 17:25:17 +00:00
|
|
|
endef
|
|
|
|
|
2006-09-17 11:11:19 +00:00
|
|
|
$(eval $(call BuildPackage,libgphoto2))
|
|
|
|
$(eval $(call BuildPackage,libgphoto2-drivers))
|