blob: 0f2800a95f7067485fb3de8c128e5e5c28813c11 [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -05001SUMMARY = "libgphoto2 allows you to access digital cameras"
2SECTION = "libs"
Andrew Geissler9aee5002022-03-30 16:27:02 +00003LICENSE = "LGPL-2.1-only"
Andrew Geissler87f5cff2022-09-30 13:13:31 -05004LIC_FILES_CHKSUM = "file://COPYING;md5=477378d78dfeeaa93826ee4ec7c643fb"
Andrew Geissler82c905d2020-04-13 13:39:40 -05005
6DEPENDS = "libtool jpeg virtual/libusb0 libexif zlib libxml2"
7
8# The .fdi and .rules files were generated with:
9# 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# They are release specific, so please regen when adding new releases
11
12SRC_URI = "${SOURCEFORGE_MIRROR}/gphoto/libgphoto2-${PV}.tar.bz2;name=libgphoto2 \
13 file://40-libgphoto2.rules \
14 file://0001-configure.ac-remove-AM_PO_SUBDIRS.patch \
15"
Andrew Geissler87f5cff2022-09-30 13:13:31 -050016SRC_URI[libgphoto2.sha256sum] = "ee61a1dac6ad5cf711d114e06b90a6d431961a6e7ec59f4b757a7cd77b1c0fb4"
Andrew Geissler82c905d2020-04-13 13:39:40 -050017
18inherit autotools pkgconfig gettext lib_package
19
20EXTRA_OECONF = " --with-drivers=all udevscriptdir=${nonarch_base_libdir}/udev ac_cv_lib_ltdl_lt_dlcaller_register=yes"
21
22PACKAGECONFIG ??= ""
23PACKAGECONFIG[gd] = ",--without-gdlib,gd"
24PACKAGECONFIG[serial] = "--enable-serial,--disable-serial,lockdev"
25
Andrew Geissler9aee5002022-03-30 16:27:02 +000026do_configure:prepend() {
27 rm -rf ${S}/libgphoto2_port/auto-m4/*
28 rm -rf ${S}/auto-m4/*
29}
30
Patrick Williams213cb262021-08-07 19:21:33 -050031do_configure:append() {
Andrew Geissler82c905d2020-04-13 13:39:40 -050032 cp ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/libgphoto2_port/po/
33 cd ${S}/libgphoto2_port/
34 autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} $acpaths
Andrew Geisslera2681d92020-10-16 10:17:07 -050035
36 # remove WORKDIR information from config to improve reproducibility
37 # libgphoto2_port recheck config will set the WORKDIR info again, so dont do that
38 sed -i 's/'$(echo ${WORKDIR} | sed 's_/_\\/_g')'/../g' ${B}/config.h
39 sed -i 's/'$(echo ${WORKDIR} | sed 's_/_\\/_g')'/../g' ${B}/libgphoto2_port/config.status
40 sed -i '/config\.status/ s/\-\-recheck//' ${B}/libgphoto2_port/Makefile
Andrew Geissler82c905d2020-04-13 13:39:40 -050041 cd ${S}
42}
43
Patrick Williams213cb262021-08-07 19:21:33 -050044do_install:append() {
Andrew Geissler82c905d2020-04-13 13:39:40 -050045 install -d ${D}${sysconfdir}/udev/rules.d/
46 install -m 0644 ${WORKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d/
47}
48
49PACKAGES =+ "libgphotoport libgphoto2-camlibs"
Patrick Williams213cb262021-08-07 19:21:33 -050050FILES:libgphoto2-camlibs = "${libdir}/libgphoto2*/*/*.so*"
51RRECOMMENDS:${PN} = "libgphoto2-camlibs"
Andrew Geissler82c905d2020-04-13 13:39:40 -050052
Patrick Williams213cb262021-08-07 19:21:33 -050053FILES:libgphotoport = "${libdir}/libgphoto2_port.so.*"
Andrew Geissler82c905d2020-04-13 13:39:40 -050054
Patrick Williams213cb262021-08-07 19:21:33 -050055FILES:${PN} += "${nonarch_base_libdir}/udev/*"
56FILES:${PN}-dbg += "${libdir}/*/*/.debug"
57FILES:${PN}-dev += "${libdir}/*/*/*.la"
Andrew Geissler87f5cff2022-09-30 13:13:31 -050058FILES:${PN}-doc += "${datadir}/libgphoto2_port/0.12.?/vcamera/README.txt"