Skip to content

Commit

Permalink
poppler-qt: Remove files that are also in poppler
Browse files Browse the repository at this point in the history
  • Loading branch information
xtkoba committed Oct 24, 2022
1 parent 892c98a commit e1e2634
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 10 deletions.
6 changes: 3 additions & 3 deletions packages/poppler/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
# Please align the version with `poppler-qt` package.
TERMUX_PKG_VERSION=22.04.0
TERMUX_PKG_REVISION=2
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
TERMUX_PKG_SHA256=813fb4b90e7bda63df53205c548602bae728887a60f4048aae4dbd9b1927deff
TERMUX_PKG_DEPENDS="fontconfig, freetype, glib, libc++, libcairo, libcurl, libiconv, libjpeg-turbo, libpng, libtiff, littlecms, openjpeg, openjpeg-tools, zlib"
TERMUX_PKG_BUILD_DEPENDS="boost, boost-headers"
TERMUX_PKG_BREAKS="poppler-dev"
TERMUX_PKG_REPLACES="poppler-dev"
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)"
#texlive needs the xpdf headers
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
-DENABLE_GLIB=ON
Expand Down
26 changes: 19 additions & 7 deletions x11-packages/poppler-qt/build.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
TERMUX_PKG_HOMEPAGE=https://poppler.freedesktop.org/
TERMUX_PKG_DESCRIPTION="PDF rendering library"
TERMUX_PKG_DESCRIPTION="Poppler Qt wrapper"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
# Please align the version with `poppler` package.
TERMUX_PKG_VERSION=22.04.0
TERMUX_PKG_REVISION=2
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
TERMUX_PKG_SHA256=813fb4b90e7bda63df53205c548602bae728887a60f4048aae4dbd9b1927deff
TERMUX_PKG_DEPENDS="fontconfig, freetype, glib, libc++, libcairo, libcurl, libiconv, libjpeg-turbo, libpng, libtiff, littlecms, openjpeg, openjpeg-tools, qt5-qtbase, zlib"
TERMUX_PKG_DEPENDS="poppler (>= ${TERMUX_PKG_VERSION}), qt5-qtbase"
TERMUX_PKG_BUILD_DEPENDS="boost, boost-headers, qt5-qtbase-cross-tools"
TERMUX_PKG_BREAKS="poppler, poppler-dev"
TERMUX_PKG_REPLACES="poppler, poppler-dev"
TERMUX_PKG_CONFLICTS="poppler"
TERMUX_PKG_PROVIDES="poppler"
#texlive needs the xpdf headers
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
-DENABLE_GLIB=ON
Expand All @@ -27,6 +23,12 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
"

termux_step_pre_configure() {
# Certain packages are not safe to build on device because their
# build.sh script deletes specific files in $TERMUX_PREFIX.
if $TERMUX_ON_DEVICE_BUILD; then
termux_error_exit "Package '$TERMUX_PKG_NAME' is not safe for on-device builds."
fi

if ! test "${_POPPLER_SOVERSION}"; then
termux_error_exit "Please set _POPPLER_SOVERSION variable."
fi
Expand All @@ -41,3 +43,13 @@ termux_step_pre_configure() {

CPPFLAGS+=" -DCMS_NO_REGISTER_KEYWORD"
}

termux_step_post_massage() {
find . ! -type d \
! -wholename "./include/poppler/qt5/*" \
! -wholename "./lib/libpoppler-qt5.so" \
! -wholename "./lib/pkgconfig/poppler-qt5.pc" \
! -wholename "./share/doc/$TERMUX_PKG_NAME/*" \
-exec rm -f '{}' \;
find . -type d -empty -delete
}

0 comments on commit e1e2634

Please sign in to comment.