2 # Copyright (C) 2006-2012 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
15 PKG_SOURCE_URL
:=@SF
/gphoto
16 PKG_MD5SUM
:=735c50ebb15cb8be61bac400ee4afb1e
19 PKG_LIBTOOL_PATHS
:=. libgphoto2_port
22 include $(INCLUDE_DIR
)/package.mk
23 include $(INCLUDE_DIR
)/nls.mk
25 define Package
/libgphoto2
/Default
28 URL
:=http
://www.gphoto.org
/
31 define Package
/libgphoto2
32 $(call Package
/libgphoto2
/Default
)
33 DEPENDS
:=+libexif
+libjpeg
+libpthread
+libltdl
$(ICONV_DEPENDS
)
34 TITLE
:=The basic library of the gphoto2 program.
38 define Package
/libgphoto2-drivers
39 $(call Package
/libgphoto2
/Default
)
40 DEPENDS
:=libgphoto2
+libusb-1.0
+libgd
41 TITLE
:=Gphoto2 drivers for various cameras
49 --without-included-ltdl \
50 --without-libiconv-prefix \
51 --without-libintl-prefix \
54 CPPFLAGS
="$$$$CPPFLAGS $(ICONV_CFLAGS)" \
55 LDFLAGS
="$$$$LDFLAGS $(ICONV_LDFLAGS)" \
56 LIBEXIF_CFLAGS
="$$$$CPPFLAGS" \
57 LIBEXIF_LIBS
="$$$$LDFLAGS -lexif" \
58 LIBUSB_CFLAGS
="$$$$CPPFLAGS" \
59 LIBUSB_LIBS
="$$$$LDFLAGS -lusb" \
62 # If OpenWrt is using the iconv stub, we disable iconv support
63 # in libgphoto2 entirely since the stub lacks some essential
64 # conversions like UCS-2 to UTF-8 which will let certain drivers
65 # fail with "Failed to create iconv converter" .
66 ifneq ($(ICONV_FULL
),1)
67 CONFIGURE_VARS
+= am_cv_func_iconv
=no am_cv_lib_iconv
=no
73 TARGET_CFLAGS
+= $(FPIC
)
75 define Build
/InstallDev
76 $(INSTALL_DIR
) $(1)/usr
/bin
77 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/gphoto2
{,-port
}-config
$(1)/usr
/bin
/
78 $(INSTALL_DIR
) $(1)/usr
/include
79 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/gphoto2
$(1)/usr
/include/
80 $(INSTALL_DIR
) $(1)/usr
/lib
81 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgphoto2
{,_port
}.
{a
,so
*} $(1)/usr
/lib
/
82 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
83 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/libgphoto2.
pc $(1)/usr
/lib
/pkgconfig
/
84 $(SED
) 's,-I$$$${prefix}/include/gphoto2,,g' $(1)/usr
/bin
/gphoto2
{,-port
}-config
85 $(SED
) 's,-I$$$${prefix}/include,,g' $(1)/usr
/bin
/gphoto2
{,-port
}-config
86 # remove annoying recursive symlink
87 rm -f
$(1)/usr
/include/gphoto2
/gphoto2
90 define Package
/libgphoto2
/install
91 $(INSTALL_DIR
) $(1)/usr
/lib
92 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgphoto2
{,_port
}.so.
* $(1)/usr
/lib
/
95 define Package
/libgphoto2-drivers
/install
96 $(INSTALL_DIR
) $(1)/usr
/lib
/
97 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgphoto2
{,_port
} $(1)/usr
/lib
/
98 rm -rf
$(1)/usr
/lib
/libgphoto2
{,_port
}/*/*.
{,l
}a
99 rm -f
$(1)/usr
/lib
/libgphoto2_port
/*/usb.so
102 $(eval
$(call BuildPackage
,libgphoto2
))
103 $(eval
$(call BuildPackage
,libgphoto2-drivers
))