summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app-text/crengine-ng/Manifest1
-rw-r--r--app-text/crengine-ng/crengine-ng-0.9.12.ebuild78
2 files changed, 79 insertions, 0 deletions
diff --git a/app-text/crengine-ng/Manifest b/app-text/crengine-ng/Manifest
index e31b16954f84..e08b1ba63612 100644
--- a/app-text/crengine-ng/Manifest
+++ b/app-text/crengine-ng/Manifest
@@ -1,2 +1,3 @@
DIST crengine-ng-0.9.11.tar.bz2 4026770 BLAKE2B 27137f3177a9aacc47b4b2ef38ed9baba81d987c46232247686cdbc307b9602fb1d5a915240d4712ca05ac49c7d263e49cf14dbf1b126e8c31862e62d56e742d SHA512 0014060f13e04432bba4c00885bc0c4cbf094d9d69cd8544b995d40bd569d690b5ebd8f02ab8ecba3d7f4bca6154a753a26690aacd96a19870dc2fdacf625f33
+DIST crengine-ng-0.9.12.tar.bz2 4378495 BLAKE2B 5bece250ad45460a974160245d97a60aa5749e51f7448e1c3ba053185c563e1ecd62b38357766e7fc750eaf481a7345ccfc8515a6961e4d813ff7ff5c3c161d1 SHA512 bd400a8b3d6cc0938f82863a995885ce28a5ad02cfedd9429fd603698cd4f2bfb9fe8460cdb737c59c7008004e1c03fc9d1359f3c7223233d4e5380016cff4b0
DIST freefont-otf-20120503.tar.gz 4487813 BLAKE2B a280bef885bc71897a8475814602d7537b05d14a70e5857acd1007bc0a074be9db1e08fbd63fcabf3fde7874391bdd319d00b213e29b203d474fb320e91b82a2 SHA512 cee9a573b17ccc689b61f0925fb6624d58e3a3369d996e379e70c3a4cd750429d68c14c85fbcab4381101c8f4bf56730ef40e0045fdd79647019db41b4ec74fd
diff --git a/app-text/crengine-ng/crengine-ng-0.9.12.ebuild b/app-text/crengine-ng/crengine-ng-0.9.12.ebuild
new file mode 100644
index 000000000000..a7dcaebd4596
--- /dev/null
+++ b/app-text/crengine-ng/crengine-ng-0.9.12.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+inherit cmake
+
+DESCRIPTION="Cross-platform library designed to implement e-book readers"
+HOMEPAGE="https://gitlab.com/coolreader-ng/crengine-ng"
+SRC_URI="https://gitlab.com/coolreader-ng/${PN}/-/archive/${PV}/${P}.tar.bz2
+ test? ( mirror://gnu/freefont/freefont-otf-20120503.tar.gz )"
+
+LICENSE="GPL-2+"
+SLOT="0/6"
+KEYWORDS="~amd64 ~arm64 ~x86"
+IUSE="+png +jpeg +gif +svg +chm +harfbuzz +fontconfig +libunibreak +fribidi +zstd +libutf8proc static-libs test"
+
+RESTRICT="!test? ( test )"
+
+CDEPEND="sys-libs/zlib
+ png? ( media-libs/libpng:0 )
+ jpeg? ( media-libs/libjpeg-turbo )
+ >=media-libs/freetype-2.10.0
+ harfbuzz? ( media-libs/harfbuzz:=[truetype] )
+ libunibreak? ( dev-libs/libunibreak:= )
+ fribidi? ( dev-libs/fribidi )
+ zstd? ( app-arch/zstd:= )
+ libutf8proc? ( dev-libs/libutf8proc:= )
+ fontconfig? ( media-libs/fontconfig )"
+
+RDEPEND="${CDEPEND}"
+DEPEND="
+ ${RDEPEND}
+ test? ( dev-cpp/gtest
+ app-arch/zip )
+"
+BDEPEND="virtual/pkgconfig
+ ${CDEPEND}"
+
+src_prepare() {
+ cmake_src_prepare
+ if use test; then
+ mkdir -p "${BUILD_DIR}/crengine/tests/fonts/"
+ cp -p "${WORKDIR}/freefont-20120503/"*.otf "${BUILD_DIR}/crengine/tests/fonts/"
+ fi
+}
+
+src_configure() {
+ CMAKE_BUILD_TYPE="Release"
+ local mycmakeargs=(
+ -DCRE_BUILD_SHARED=ON
+ -DCRE_BUILD_STATIC=$(usex static-libs)
+ -DUSE_COLOR_BACKBUFFER=ON
+ -DWITH_LIBPNG=$(usex png)
+ -DWITH_LIBJPEG=$(usex jpeg)
+ -DWITH_FREETYPE=ON
+ -DWITH_HARFBUZZ=$(usex harfbuzz)
+ -DWITH_LIBUNIBREAK=$(usex libunibreak)
+ -DWITH_FRIBIDI=$(usex fribidi)
+ -DWITH_ZSTD=$(usex zstd)
+ -DWITH_UTF8PROC=$(usex libutf8proc)
+ -DUSE_GIF=$(usex gif)
+ -DUSE_NANOSVG=$(usex svg)
+ -DUSE_CHM=$(usex chm)
+ -DUSE_ANTIWORD=ON
+ -DUSE_FONTCONFIG=$(usex fontconfig)
+ -DUSE_SHASUM=OFF
+ -DUSE_MD4C=ON
+ -DBUILD_TOOLS=OFF
+ -DENABLE_UNITTESTING=$(usex test)
+ -DOFFLINE_BUILD_MODE=ON
+ )
+ cmake_src_configure
+}
+
+src_test() {
+ cd "${BUILD_DIR}/crengine/tests"
+ ./unittests
+}