summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Grozin <grozin@gentoo.org>2023-01-03 17:42:58 +0700
committerAndrey Grozin <grozin@gentoo.org>2023-01-03 17:42:58 +0700
commit09803522a2796b647f85a4aaa4e877792fefccf5 (patch)
tree5a771ebbc91a5acc7eacd54d0a415f590b5f0991 /app-text
parentmail-mta/exim-4.94.2-r12: update openssl-3 patches (diff)
downloadgentoo-09803522a2796b647f85a4aaa4e877792fefccf5.tar.gz
gentoo-09803522a2796b647f85a4aaa4e877792fefccf5.tar.bz2
gentoo-09803522a2796b647f85a4aaa4e877792fefccf5.zip
app-text/crengine-ng: compilation fixes
Closes: https://bugs.gentoo.org/889078 Signed-off-by: Andrey Grozin <grozin@gentoo.org>
Diffstat (limited to 'app-text')
-rw-r--r--app-text/crengine-ng/crengine-ng-0.9.4-r1.ebuild60
-rw-r--r--app-text/crengine-ng/files/crengine-ng-0.9.4.patch55
2 files changed, 115 insertions, 0 deletions
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 <valexlin@gmail.com>
+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 <sys/types.h>
+ #endif /* __riscos */
++#include <string.h>
++#include <strings.h>
++
+ #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 <stdint.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <strings.h>
+ #ifdef CHM_DEBUG
+ #include <stdio.h>
+ #endif
+@@ -70,14 +71,9 @@
+ #ifdef WIN32
+ #include <windows.h>
+ #include <malloc.h>
+-#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 <unistd.h>
+--
+2.37.4
+