xref: /OK3568_Linux_fs/yocto/meta-openembedded/meta-oe/recipes-graphics/gphoto2/libgphoto2_2.5.27.bb (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunSUMMARY = "libgphoto2 allows you to access digital cameras"
2*4882a593SmuzhiyunSECTION = "libs"
3*4882a593SmuzhiyunLICENSE = "LGPL-2.1-only"
4*4882a593SmuzhiyunLIC_FILES_CHKSUM = "file://COPYING;md5=0448d3676bc0de00406af227d341a4d1"
5*4882a593Smuzhiyun
6*4882a593SmuzhiyunDEPENDS = "libtool jpeg virtual/libusb0 libexif zlib libxml2"
7*4882a593Smuzhiyun
8*4882a593Smuzhiyun# The .fdi and .rules files were generated with:
9*4882a593Smuzhiyun#  libgphoto2-2.5.8/packaging/generic$ qemu-arm -s 1048576 -r 2.6.24 -L /OE/angstrom-dev/staging/armv5te-angstrom-linux-gnueabi/ .libs/print-camera-list
10*4882a593Smuzhiyun# They are release specific, so please regen when adding new releases
11*4882a593Smuzhiyun
12*4882a593SmuzhiyunSRC_URI = "${SOURCEFORGE_MIRROR}/gphoto/libgphoto2-${PV}.tar.bz2;name=libgphoto2 \
13*4882a593Smuzhiyun           file://40-libgphoto2.rules \
14*4882a593Smuzhiyun           file://0001-configure.ac-remove-AM_PO_SUBDIRS.patch \
15*4882a593Smuzhiyun"
16*4882a593Smuzhiyun
17*4882a593SmuzhiyunSRC_URI[libgphoto2.md5sum] = "83a2f96dade72e95dffb8e5fa9628d7e"
18*4882a593SmuzhiyunSRC_URI[libgphoto2.sha256sum] = "f8b85478c44948a0b0b52c4d4dfda2de1d7bcb7b262c76bd1ae306d9c63240d7"
19*4882a593Smuzhiyun
20*4882a593Smuzhiyuninherit autotools pkgconfig gettext lib_package
21*4882a593Smuzhiyun
22*4882a593SmuzhiyunEXTRA_OECONF = " --with-drivers=all udevscriptdir=${nonarch_base_libdir}/udev ac_cv_lib_ltdl_lt_dlcaller_register=yes"
23*4882a593Smuzhiyun
24*4882a593SmuzhiyunPACKAGECONFIG ??= ""
25*4882a593SmuzhiyunPACKAGECONFIG[gd] = ",--without-gdlib,gd"
26*4882a593SmuzhiyunPACKAGECONFIG[serial] = "--enable-serial,--disable-serial,lockdev"
27*4882a593Smuzhiyun
28*4882a593Smuzhiyundo_configure:prepend() {
29*4882a593Smuzhiyun    rm -rf ${S}/libgphoto2_port/auto-m4/*
30*4882a593Smuzhiyun    rm -rf ${S}/auto-m4/*
31*4882a593Smuzhiyun}
32*4882a593Smuzhiyun
33*4882a593Smuzhiyundo_configure:append() {
34*4882a593Smuzhiyun    cp ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/libgphoto2_port/po/
35*4882a593Smuzhiyun    cd ${S}/libgphoto2_port/
36*4882a593Smuzhiyun    autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} $acpaths
37*4882a593Smuzhiyun
38*4882a593Smuzhiyun    # remove WORKDIR information from config to improve reproducibility
39*4882a593Smuzhiyun    # libgphoto2_port recheck config will set the WORKDIR info again, so dont do that
40*4882a593Smuzhiyun    sed -i 's/'$(echo ${WORKDIR} | sed 's_/_\\/_g')'/../g' ${B}/config.h
41*4882a593Smuzhiyun    sed -i 's/'$(echo ${WORKDIR} | sed 's_/_\\/_g')'/../g' ${B}/libgphoto2_port/config.status
42*4882a593Smuzhiyun    sed -i '/config\.status/ s/\-\-recheck//' ${B}/libgphoto2_port/Makefile
43*4882a593Smuzhiyun    cd ${S}
44*4882a593Smuzhiyun}
45*4882a593Smuzhiyun
46*4882a593Smuzhiyundo_install:append() {
47*4882a593Smuzhiyun    install -d ${D}${sysconfdir}/udev/rules.d/
48*4882a593Smuzhiyun    install -m 0644 ${WORKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d/
49*4882a593Smuzhiyun}
50*4882a593Smuzhiyun
51*4882a593SmuzhiyunPACKAGES =+ "libgphotoport libgphoto2-camlibs"
52*4882a593SmuzhiyunFILES:libgphoto2-camlibs = "${libdir}/libgphoto2*/*/*.so*"
53*4882a593SmuzhiyunRRECOMMENDS:${PN} = "libgphoto2-camlibs"
54*4882a593Smuzhiyun
55*4882a593SmuzhiyunFILES:libgphotoport = "${libdir}/libgphoto2_port.so.*"
56*4882a593Smuzhiyun
57*4882a593SmuzhiyunFILES:${PN} += "${nonarch_base_libdir}/udev/*"
58*4882a593SmuzhiyunFILES:${PN}-dbg += "${libdir}/*/*/.debug"
59*4882a593SmuzhiyunFILES:${PN}-dev += "${libdir}/*/*/*.la"
60*4882a593SmuzhiyunFILES:${PN}-doc += "${datadir}/libgphoto2_port/0.12.0/vcamera/README.txt"
61