blob: b1fb7579eed09a7074951692a3e6ac7f9ea9919d [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 \
Patrick Williamse760df82023-05-26 11:10:49 -050015 file://0001-configure-Filter-out-buildpaths-from-CC.patch \
Andrew Geissler82c905d2020-04-13 13:39:40 -050016"
Andrew Geissler87f5cff2022-09-30 13:13:31 -050017SRC_URI[libgphoto2.sha256sum] = "ee61a1dac6ad5cf711d114e06b90a6d431961a6e7ec59f4b757a7cd77b1c0fb4"
Andrew Geissler82c905d2020-04-13 13:39:40 -050018
19inherit autotools pkgconfig gettext lib_package
20
21EXTRA_OECONF = " --with-drivers=all udevscriptdir=${nonarch_base_libdir}/udev ac_cv_lib_ltdl_lt_dlcaller_register=yes"
22
23PACKAGECONFIG ??= ""
24PACKAGECONFIG[gd] = ",--without-gdlib,gd"
25PACKAGECONFIG[serial] = "--enable-serial,--disable-serial,lockdev"
26
Andrew Geissler9aee5002022-03-30 16:27:02 +000027do_configure:prepend() {
28 rm -rf ${S}/libgphoto2_port/auto-m4/*
29 rm -rf ${S}/auto-m4/*
30}
31
Patrick Williams213cb262021-08-07 19:21:33 -050032do_configure:append() {
Andrew Geissler82c905d2020-04-13 13:39:40 -050033 cp ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/libgphoto2_port/po/
34 cd ${S}/libgphoto2_port/
35 autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} $acpaths
Andrew Geissler82c905d2020-04-13 13:39:40 -050036 cd ${S}
37}
38
Patrick Williams213cb262021-08-07 19:21:33 -050039do_install:append() {
Andrew Geissler82c905d2020-04-13 13:39:40 -050040 install -d ${D}${sysconfdir}/udev/rules.d/
41 install -m 0644 ${WORKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d/
42}
43
44PACKAGES =+ "libgphotoport libgphoto2-camlibs"
Patrick Williams213cb262021-08-07 19:21:33 -050045FILES:libgphoto2-camlibs = "${libdir}/libgphoto2*/*/*.so*"
46RRECOMMENDS:${PN} = "libgphoto2-camlibs"
Andrew Geissler82c905d2020-04-13 13:39:40 -050047
Patrick Williams213cb262021-08-07 19:21:33 -050048FILES:libgphotoport = "${libdir}/libgphoto2_port.so.*"
Andrew Geissler82c905d2020-04-13 13:39:40 -050049
Patrick Williams213cb262021-08-07 19:21:33 -050050FILES:${PN} += "${nonarch_base_libdir}/udev/*"
51FILES:${PN}-dbg += "${libdir}/*/*/.debug"
52FILES:${PN}-dev += "${libdir}/*/*/*.la"
Andrew Geissler87f5cff2022-09-30 13:13:31 -050053FILES:${PN}-doc += "${datadir}/libgphoto2_port/0.12.?/vcamera/README.txt"