summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2020-12-06 12:01:27 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2020-12-06 23:15:49 +0100
commit5455b67899a23c5ffad69fa0b1b291f030d2c088 (patch)
tree96c9a07e49e95210ee5a9f3b02fdf3c95e6157fb
parentkde-plasma/kwin: EAPI-6 bump, drop IUSE="opengl,wayland", gles->gles2-only (diff)
downloadkde-sunset-5455b67899a23c5ffad69fa0b1b291f030d2c088.tar.gz
kde-sunset-5455b67899a23c5ffad69fa0b1b291f030d2c088.tar.bz2
kde-sunset-5455b67899a23c5ffad69fa0b1b291f030d2c088.zip
app-text/poppler: Shed as much weight as possible
Package-Manager: Portage-3.0.11, Repoman-3.0.2 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
-rw-r--r--app-text/poppler/poppler-0.61.1-r1.ebuild112
1 files changed, 112 insertions, 0 deletions
diff --git a/app-text/poppler/poppler-0.61.1-r1.ebuild b/app-text/poppler/poppler-0.61.1-r1.ebuild
new file mode 100644
index 00000000..05a6fddc
--- /dev/null
+++ b/app-text/poppler/poppler-0.61.1-r1.ebuild
@@ -0,0 +1,112 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake flag-o-matic toolchain-funcs xdg-utils
+
+DESCRIPTION="PDF rendering library based on the xpdf-3.0 code base"
+HOMEPAGE="https://poppler.freedesktop.org/"
+SRC_URI="https://poppler.freedesktop.org/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0/72" # CHECK THIS WHEN BUMPING!!! SUBSLOT IS libpoppler.so SOVERSION
+KEYWORDS="amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="cjk curl debug doc +jpeg +jpeg2k +lcms nss png tiff"
+
+# No test data provided
+RESTRICT="test"
+
+DEPEND="
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ >=media-libs/fontconfig-2.6.0
+ >=media-libs/freetype-2.3.9
+ sys-libs/zlib
+ curl? ( net-misc/curl )
+ jpeg? ( virtual/jpeg:0 )
+ jpeg2k? ( media-libs/openjpeg:2= )
+ lcms? ( media-libs/lcms:2 )
+ nss? ( >=dev-libs/nss-3.19:0 )
+ png? ( media-libs/libpng:0= )
+ tiff? ( media-libs/tiff:0 )
+"
+RDEPEND="${DEPEND}
+ cjk? ( >=app-text/poppler-data-0.4.7 )
+"
+BDEPEND="virtual/pkgconfig"
+
+DOCS=( AUTHORS NEWS README README-XPDF )
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0.60.1-qt5-dependencies.patch"
+ "${FILESDIR}/${PN}-0.28.1-fix-multilib-configuration.patch"
+ "${FILESDIR}/${PN}-0.61.0-respect-cflags.patch"
+ "${FILESDIR}/${PN}-0.33.0-openjpeg2.patch"
+ "${FILESDIR}/${PN}-0.40-FindQt4.patch"
+ "${FILESDIR}/${PN}-0.57.0-disable-internal-jpx.patch"
+)
+
+src_prepare() {
+ cmake_src_prepare
+
+ # Clang doesn't grok this flag, the configure nicely tests that, but
+ # cmake just uses it, so remove it if we use clang
+ if [[ ${CC} == clang ]] ; then
+ sed -i -e 's/-fno-check-new//' cmake/modules/PopplerMacros.cmake || die
+ fi
+
+ if ! grep -Fq 'cmake_policy(SET CMP0002 OLD)' CMakeLists.txt ; then
+ sed '/^cmake_minimum_required/acmake_policy(SET CMP0002 OLD)' \
+ -i CMakeLists.txt || die
+ else
+ einfo "policy(SET CMP0002 OLD) - workaround can be removed"
+ fi
+
+ # we need to up the C++ version, bug #622526, #643278
+ append-cxxflags -std=c++11
+}
+
+src_configure() {
+ xdg_environment_reset
+ local mycmakeargs=(
+ -DBUILD_GTK_TESTS=OFF
+ -DBUILD_QT4_TESTS=OFF
+ -DBUILD_QT5_TESTS=OFF
+ -DBUILD_CPP_TESTS=OFF
+ -DENABLE_SPLASH=ON
+ -DENABLE_ZLIB=ON
+ -DENABLE_ZLIB_UNCOMPRESS=OFF
+ -DENABLE_XPDF_HEADERS=ON
+ -DENABLE_LIBCURL="$(usex curl)"
+ -DENABLE_CPP=OFF
+ -DENABLE_UTILS=OFF
+ -DSPLASH_CMYK=OFF
+ -DUSE_FIXEDPOINT=OFF
+ -DUSE_FLOAT=OFF
+ -DWITH_Cairo=OFF
+ -DWITH_JPEG="$(usex jpeg)"
+ -DWITH_NSS3="$(usex nss)"
+ -DWITH_PNG="$(usex png)"
+ -DWITH_Qt4=ON
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Core=ON
+ -DWITH_TIFF="$(usex tiff)"
+ )
+ if use jpeg; then
+ mycmakeargs+=(-DENABLE_DCTDECODER=libjpeg)
+ else
+ mycmakeargs+=(-DENABLE_DCTDECODER=none)
+ fi
+ if use jpeg2k; then
+ mycmakeargs+=(-DENABLE_LIBOPENJPEG=openjpeg2)
+ else
+ mycmakeargs+=(-DENABLE_LIBOPENJPEG=none)
+ fi
+ if use lcms; then
+ mycmakeargs+=(-DENABLE_CMS=lcms2)
+ else
+ mycmakeargs+=(-DENABLE_CMS=)
+ fi
+
+ cmake_src_configure
+}