From 09803522a2796b647f85a4aaa4e877792fefccf5 Mon Sep 17 00:00:00 2001 From: Andrey Grozin Date: Tue, 3 Jan 2023 17:42:58 +0700 Subject: app-text/crengine-ng: compilation fixes Closes: https://bugs.gentoo.org/889078 Signed-off-by: Andrey Grozin --- app-text/crengine-ng/crengine-ng-0.9.4-r1.ebuild | 60 ++++++++++++++++++++++ app-text/crengine-ng/files/crengine-ng-0.9.4.patch | 55 ++++++++++++++++++++ 2 files changed, 115 insertions(+) create mode 100644 app-text/crengine-ng/crengine-ng-0.9.4-r1.ebuild create mode 100644 app-text/crengine-ng/files/crengine-ng-0.9.4.patch (limited to 'app-text') diff --git a/app-text/crengine-ng/crengine-ng-0.9.4-r1.ebuild b/app-text/crengine-ng/crengine-ng-0.9.4-r1.ebuild new file mode 100644 index 000000000000..75782c9ba4db --- /dev/null +++ b/app-text/crengine-ng/crengine-ng-0.9.4-r1.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2023 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" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+png +jpeg +gif +svg +chm +harfbuzz +fontconfig +libunibreak +fribidi +zstd +libutf8proc lto static-libs" + +CDEPEND="sys-libs/zlib + png? ( media-libs/libpng:0 ) + jpeg? ( media-libs/libjpeg-turbo ) + >=media-libs/freetype-2.10.0 + harfbuzz? ( media-libs/harfbuzz:= ) + libunibreak? ( dev-libs/libunibreak:= ) + fribidi? ( dev-libs/fribidi ) + zstd? ( app-arch/zstd:= ) + libutf8proc? ( dev-libs/libutf8proc:= ) + fontconfig? ( media-libs/fontconfig )" + +RDEPEND="${CDEPEND}" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig + ${CDEPEND}" + +PATCHES=( "${FILESDIR}"/${P}.patch ) + +src_configure() { + CMAKE_USE_DIR="${S}" + 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 + -DBUILD_TOOLS=OFF + -DENABLE_UNITTESTING=OFF + -DENABLE_LTO=$(usex lto) + ) + cmake_src_configure +} diff --git a/app-text/crengine-ng/files/crengine-ng-0.9.4.patch b/app-text/crengine-ng/files/crengine-ng-0.9.4.patch new file mode 100644 index 000000000000..227071816d5b --- /dev/null +++ b/app-text/crengine-ng/files/crengine-ng-0.9.4.patch @@ -0,0 +1,55 @@ +From 62106833d4e8af5325ed7a55c7a897e43a52bb20 Mon Sep 17 00:00:00 2001 +From: Aleksey Chernov +Date: Sun, 1 Jan 2023 09:55:04 +0400 +Subject: [PATCH] Compile warnings/errors fixed: `strcasecmp` missing + prototype. + +--- + thirdparty/antiword/antiword.h | 3 +++ + thirdparty/chmlib/src/chm_lib.c | 6 +----- + 2 files changed, 4 insertions(+), 5 deletions(-) + +diff --git a/thirdparty/antiword/antiword.h b/thirdparty/antiword/antiword.h +index e6f4d68f..0abce7af 100644 +--- a/thirdparty/antiword/antiword.h ++++ b/thirdparty/antiword/antiword.h +@@ -31,6 +31,9 @@ + #else + #include + #endif /* __riscos */ ++#include ++#include ++ + #include "wordconst.h" + #include "wordtypes.h" + #include "fail.h" +diff --git a/thirdparty/chmlib/src/chm_lib.c b/thirdparty/chmlib/src/chm_lib.c +index 637a32b2..2e26db1e 100644 +--- a/thirdparty/chmlib/src/chm_lib.c ++++ b/thirdparty/chmlib/src/chm_lib.c +@@ -59,6 +59,7 @@ + #include + #include + #include ++#include + #ifdef CHM_DEBUG + #include + #endif +@@ -70,14 +71,9 @@ + #ifdef WIN32 + #include + #include +-#ifdef _WIN32_WCE + #define strcasecmp _stricmp + #define strncasecmp _strnicmp + #else +-#define strcasecmp _stricmp +-#define strncasecmp _strnicmp +-#endif +-#else + /* basic Linux system includes */ + #define _XOPEN_SOURCE 500 + #include +-- +2.37.4 + -- cgit v1.2.3-65-gdbad