termux-packages/packages/poppler/build.sh

44 lines
1.8 KiB
Bash
Raw Normal View History

2017-01-19 03:25:42 +00:00
TERMUX_PKG_HOMEPAGE=https://poppler.freedesktop.org/
2015-06-12 23:03:31 +00:00
TERMUX_PKG_DESCRIPTION="PDF rendering library"
2019-01-21 12:53:58 +00:00
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
# Please align the version with `poppler-qt` package.
2022-04-28 04:08:53 +00:00
TERMUX_PKG_VERSION=22.04.0
TERMUX_PKG_REVISION=3
# Do not forget to bump revision of reverse dependencies and rebuild them
# when SOVERSION is changed.
_POPPLER_SOVERSION=120
TERMUX_PKG_SRCURL=https://poppler.freedesktop.org/poppler-${TERMUX_PKG_VERSION}.tar.xz
2022-04-28 04:08:53 +00:00
TERMUX_PKG_SHA256=813fb4b90e7bda63df53205c548602bae728887a60f4048aae4dbd9b1927deff
2022-10-24 05:10:09 +00:00
TERMUX_PKG_DEPENDS="fontconfig, freetype, glib, libc++, libcairo, libcurl, libiconv, libjpeg-turbo, libpng, libtiff, littlecms, openjpeg, zlib"
TERMUX_PKG_BUILD_DEPENDS="boost, boost-headers, g-ir-scanner, openjpeg-tools"
TERMUX_PKG_BREAKS="poppler-dev, poppler-qt (<< 22.04.0-3), poppler-qt (<< ${TERMUX_PKG_VERSION})"
TERMUX_PKG_REPLACES="poppler-dev, poppler-qt (<< 22.04.0-3)"
2022-10-24 05:10:09 +00:00
TERMUX_PKG_DISABLE_GIR=false
#texlive needs the xpdf headers
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
-DENABLE_GLIB=ON
2022-10-24 05:10:09 +00:00
-DENABLE_GOBJECT_INTROSPECTION=ON
2019-03-16 08:50:27 +00:00
-DENABLE_UNSTABLE_API_ABI_HEADERS=ON
2018-08-09 18:32:31 +00:00
-DENABLE_QT5=OFF
-DFONT_CONFIGURATION=fontconfig
"
2022-04-28 04:08:53 +00:00
termux_step_pre_configure() {
if ! test "${_POPPLER_SOVERSION}"; then
termux_error_exit "Please set _POPPLER_SOVERSION variable."
fi
local sover_x11=$(. $TERMUX_SCRIPTDIR/x11-packages/poppler-qt/build.sh; echo $_POPPLER_SOVERSION)
if [ "${sover_x11}" != "${_POPPLER_SOVERSION}" ]; then
termux_error_exit "SOVERSION mismatch with \"poppler-qt\" package."
fi
local sover_cmake=$(sed -En 's/^.*set_target_properties\(poppler PROPERTIES .* SOVERSION ([0-9]+).*$/\1/p' CMakeLists.txt)
if [ "${sover_cmake}" != "${_POPPLER_SOVERSION}" ]; then
termux_error_exit "SOVERSION guard check failed (CMakeLists.txt: \"${sover_cmake}\")."
fi
2022-10-24 05:10:09 +00:00
termux_setup_gir
2022-04-28 04:08:53 +00:00
CPPFLAGS+=" -DCMS_NO_REGISTER_KEYWORD"
}