Name poppler
Description
Version 25.03.0-5+deb13u2
Package Base
Homepage
Maintainers ['Debian freedesktop.org maintainers <pkg-freedesktop-maintainers@lists.alioth.debian.org>']
Contributors ['Emilio Pozuelo Monfort <pochu@debian.org>', 'Loic Minier <lool@dooz.org>', 'Pino Toscano <pino@debian.org>']
Distro-repo https://salsa.debian.org/freedesktop-team/poppler
Sources ['https://sources.debian.org/data/main/p/poppler/25.03.0-5+deb13u2/debian/watch', 'https://sources.debian.org/src/poppler/25.03.0-5+deb13u2/debian/patches/CVE-2025-32364.patch', 'https://sources.debian.org/src/poppler/25.03.0-5+deb13u2/debian/patches/CVE-2025-32365.patch', 'https://sources.debian.org/src/poppler/25.03.0-5+deb13u2/debian/patches/CVE-2025-43903.patch', 'https://sources.debian.org/src/poppler/25.03.0-5+deb13u2/debian/patches/CVE-2025-50420.patch', 'https://sources.debian.org/src/poppler/25.03.0-5+deb13u2/debian/patches/CVE-2025-52886.patch', 'https://sources.debian.org/src/poppler/25.03.0-5+deb13u2/debian/patches/series']
Dependencies []
Optional-Dependencies []
Build-Dependencies ['debhelper-compat', 'dh-sequence-gir', 'dpkg-dev', 'cmake', 'gir1.2-cairo-1.0-dev', 'gir1.2-gio-2.0-dev', 'gir1.2-gobject-2.0-dev', 'gtk-doc-tools', 'libboost-dev', 'libcairo2-dev', 'libcurl4-gnutls-dev', 'libfontconfig-dev', 'libfreetype-dev', 'libgdk-pixbuf-2.0-dev', 'libgirepository1.0-dev', 'libglib2.0-dev', 'libgpgme-dev', 'libgpgmepp-dev', 'libgtk-3-dev', 'libjpeg-dev', 'liblcms2-dev', 'libnss3-dev', 'libopenjp2-7-dev', 'libpng-dev', 'libtiff-dev', 'pkgconf', 'python3', 'qt6-base-dev [amd64 arm64 armel armhf loong64 mips64el ppc64el riscv64 s390x alpha hppa hurd-any m68k powerpc ppc64 sh4 sparc64]', 'qtbase5-dev', 'zlib1g-dev']
Provides []
Builddate
Architecture amd64
Distro-Version trixie
Licenses []
Hash
#!/usr/bin/make -f

# the upstream version (i.e. without the Debian revision)
UPSTREAM_VERSION := $(shell dpkg-parsechangelog | sed -n 's/^Version: //p' | cut -f1 -d '-')
# symbols.in files & their "generated" file names
SYMBOLS_in := $(wildcard debian/*.symbols.in)
SYMBOLS_generated := $(patsubst %.in,%,$(SYMBOLS_in))

libpopplerN := $(shell sed -rn 's/^Package:[[:space:]]*(libpoppler[0-9]+(t64)?)[[:space:]]*$$/\1/p' debian/control)

built_binaries := $(shell dh_listpackages)

# enable all the hardening options
export DEB_BUILD_MAINT_OPTIONS = hardening=+all optimize=+lto

# disable gtk stuff to minimize Build-Depends
CONFIGURE_ARGS :=				\
	-DCMAKE_BUILD_TYPE=Release		\
	-DCMAKE_C_FLAGS_RELEASE="$(CFLAGS)"	\
	-DCMAKE_CXX_FLAGS_RELEASE="$(CXXFLAGS)"	\
	-DENABLE_GLIB=ON			\
	-DENABLE_QT5=ON				\
	-DENABLE_CPP=ON				\
	-DENABLE_GTK_DOC=$(if $(filter libpoppler-glib-doc,$(shell dh_listpackages)),ON,OFF) \
	-DENABLE_UNSTABLE_API_ABI_HEADERS=ON	\
	-DENABLE_CMS=lcms2			\
	-DENABLE_LIBOPENJPEG=openjpeg2		\
	-DBUILD_GTK_TESTS=OFF

ifeq ($(filter %-qt6-dev,$(built_binaries)),)
CONFIGURE_ARGS += -DENABLE_QT6=OFF
endif

%:
	dh $@

override_dh_auto_clean:
	dh_auto_clean
	rm -f glib/reference/html/*
	rm -f $(SYMBOLS_generated)

override_dh_auto_configure:
	dh_auto_configure -- $(CONFIGURE_ARGS)

override_dh_installchangelogs:
	dh_installchangelogs -p$(libpopplerN)
	dh_installchangelogs --remaining-packages -XChangeLog

override_dh_makeshlibs: $(SYMBOLS_generated)
	dh_makeshlibs

debian/%.symbols: debian/%.symbols.in
	cat $^ | sed -e 's/#CURVER#/$(UPSTREAM_VERSION)/g' > $@

# TODO: https://gitlab.freedesktop.org/poppler/test
# has the missing unittestcases directory
# We could add an extra tarball as was done with editorconfig-core
# Or we could ask upstream if it makes sense to move those tests
# into the same git repo
override_dh_auto_test:
	-dh_auto_test