1DESCRIPTION = "PDF transformation/inspection software"
2HOMEPAGE = "http://qpdf.sourceforge.net"
3LICENSE = "Apache-2.0"
4LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57"
5
6DEPENDS = "zlib jpeg ${@bb.utils.contains('PACKAGECONFIG', 'gnutls', 'gnutls', 'openssl', d)}"
7
8SRC_URI = "git://github.com/qpdf/qpdf.git;protocol=https;branch=main"
9SRCREV = "c03ee7aa663c4361e23ca32b596adf6e8be0e8ac"
10
11inherit cmake pkgconfig gettext
12
13EXTRA_OECMAKE = ' \
14	-DRANDOM_DEVICE="/dev/random" \
15	-DBUILD_STATIC_LIBS=OFF \
16	-DALLOW_CRYPTO_NATIVE=OFF \
17	-DUSE_IMPLICIT_CRYPTO=OFF \
18'
19
20LDFLAGS:append:mipsarch = " -latomic"
21LDFLAGS:append:riscv32 = " -latomic"
22
23S="${WORKDIR}/git"
24
25PACKAGECONFIG ?= "gnutls"
26PACKAGECONFIG[gnutls] = "-DREQUIRE_CRYPTO_GNUTLS=ON,-DREQUIRE_CRYPTO_OPENSSL=ON"
27
28do_install:append() {
29    # Change the fully defined path on the target
30    sed -i -e 's|${STAGING_LIBDIR}|${libdir}|g' ${D}${libdir}/cmake/${BPN}/libqpdfTargets.cmake
31}
32