Skip to content

Commit

Permalink
deskutils/coolreader: Update to 3.2.59
Browse files Browse the repository at this point in the history
PR:		273420
Reported by:	kenrap@kennethraplee.com
Approved by:	mistresssilvara@hotmail.com (maintainer, timeout > 2 weeks)
  • Loading branch information
kenrap authored and Fernando Apesteguía committed Sep 18, 2023
1 parent 42ce6b3 commit 4b64cf2
Show file tree
Hide file tree
Showing 8 changed files with 145 additions and 6 deletions.
6 changes: 3 additions & 3 deletions deskutils/coolreader/Makefile
@@ -1,7 +1,6 @@
PORTNAME= coolreader
DISTVERSIONPREFIX= cr
DISTVERSION= 3.2.55
PORTREVISION= 2
DISTVERSION= 3.2.59
CATEGORIES= deskutils

MAINTAINER= mistresssilvara@hotmail.com
Expand All @@ -17,7 +16,8 @@ LIB_DEPENDS= libfreetype.so:print/freetype2 \
libpng.so:graphics/png \
libfribidi.so:converters/fribidi \
libunibreak.so:textproc/libunibreak \
libfontconfig.so:x11-fonts/fontconfig
libfontconfig.so:x11-fonts/fontconfig \
libzstd.so:archivers/zstd

USES= qt:5 cmake:noninja pkgconfig desktop-file-utils jpeg

Expand Down
6 changes: 3 additions & 3 deletions deskutils/coolreader/distinfo
@@ -1,3 +1,3 @@
TIMESTAMP = 1615373277
SHA256 (buggins-coolreader-cr3.2.55_GH0.tar.gz) = 41bda9e64fedfcb4eed5756f34b05be53348a8cd40baa9bd9e0a346f94c09587
SIZE (buggins-coolreader-cr3.2.55_GH0.tar.gz) = 13230319
TIMESTAMP = 1684912482
SHA256 (buggins-coolreader-cr3.2.59_GH0.tar.gz) = 54253ce3da8f3575d7e64f0afd3d2e9d369ca4e785584cfad4462eead1b8f51e
SIZE (buggins-coolreader-cr3.2.59_GH0.tar.gz) = 13596218
@@ -0,0 +1,11 @@
--- crengine/src/lvstream/lvfilemappedstream.cpp.orig
+++ crengine/src/lvstream/lvfilemappedstream.cpp
@@ -45,7 +45,7 @@ extern "C" {
// it is logical to define our own wrapper function 'lseek'.
static inline lvpos_t cr3_lseek(int fd, lvoffset_t offset, int whence) {
#if LVLONG_FILE_SUPPORT == 1
- return (lvpos_t)::lseek64(fd, (off64_t)offset, whence);
+ return (lvpos_t)::lseek(fd, (off64_t)offset, whence);
#else
return (lvpos_t)::lseek(fd, (off_t)offset, whence);
#endif
@@ -0,0 +1,11 @@
--- crengine/src/lvstream/lvfilestream.cpp.orig
+++ crengine/src/lvstream/lvfilestream.cpp
@@ -179,7 +179,7 @@ extern "C" {
// it is logical to define our own wrapper function 'lseek'.
static inline lvpos_t cr3_lseek(int fd, lvoffset_t offset, int whence) {
#if LVLONG_FILE_SUPPORT == 1
- return (lvpos_t)::lseek64(fd, (off64_t)offset, whence);
+ return (lvpos_t)::lseek(fd, (off64_t)offset, whence);
#else
return (lvpos_t)::lseek(fd, (off_t)offset, whence);
#endif
89 changes: 89 additions & 0 deletions deskutils/coolreader/files/patch-thirdparty_unman_chmlib_configure
@@ -0,0 +1,89 @@
--- thirdparty_unman/chmlib/configure.orig
+++ thirdparty_unman/chmlib/configure
@@ -11536,9 +11536,9 @@ fi


if test -n "$CHM_USE_IO64"; then
- { $as_echo "$as_me:$LINENO: checking for lseek64" >&5
-$as_echo_n "checking for lseek64... " >&6; }
-if test "${ac_cv_func_lseek64+set}" = set; then
+ { $as_echo "$as_me:$LINENO: checking for lseek" >&5
+$as_echo_n "checking for lseek... " >&6; }
+if test "${ac_cv_func_lseek+set}" = set; then
$as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
@@ -11547,12 +11547,12 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-/* Define lseek64 to an innocuous variant, in case <limits.h> declares lseek64.
+/* Define lseek to an innocuous variant, in case <limits.h> declares lseek.
For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define lseek64 innocuous_lseek64
+#define lseek innocuous_lseek

/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char lseek64 (); below.
+ which can conflict with char lseek (); below.
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
<limits.h> exists even on freestanding compilers. */

@@ -11562,7 +11562,7 @@ cat >>conftest.$ac_ext <<_ACEOF
# include <assert.h>
#endif

-#undef lseek64
+#undef lseek

/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
@@ -11570,18 +11570,18 @@ cat >>conftest.$ac_ext <<_ACEOF
#ifdef __cplusplus
extern "C"
#endif
-char lseek64 ();
+char lseek ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
-#if defined __stub_lseek64 || defined __stub___lseek64
+#if defined __stub_lseek || defined __stub___lseek
choke me
#endif

int
main ()
{
-return lseek64 ();
+return lseek ();
;
return 0;
}
@@ -11607,21 +11607,21 @@ $as_echo "$ac_try_echo") >&5
test "$cross_compiling" = yes ||
$as_test_x conftest$ac_exeext
}; then
- ac_cv_func_lseek64=yes
+ ac_cv_func_lseek=yes
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

- ac_cv_func_lseek64=no
+ ac_cv_func_lseek=no
fi

rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_lseek64" >&5
-$as_echo "$ac_cv_func_lseek64" >&6; }
-if test "x$ac_cv_func_lseek64" = x""yes; then
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_lseek" >&5
+$as_echo "$ac_cv_func_lseek" >&6; }
+if test "x$ac_cv_func_lseek" = x""yes; then
:
else

@@ -0,0 +1,11 @@
--- thirdparty_unman/chmlib/configure.in.orig
+++ thirdparty_unman/chmlib/configure.in
@@ -97,7 +97,7 @@ AC_ARG_ENABLE(dmalloc,

dnl check for availability of the functions we need
if test -n "$CHM_USE_IO64"; then
- AC_CHECK_FUNC(lseek64,,[
+ AC_CHECK_FUNC(lseek,,[
AC_MSG_WARN([64-bit file offsets not available, huge files won't be supported.])
CHM_USE_IO64=""])
fi
@@ -0,0 +1,16 @@
--- thirdparty_unman/chmlib/src/chm_lib.c.orig
+++ thirdparty_unman/chmlib/src/chm_lib.c
@@ -740,10 +740,10 @@ static Int64 _chm_fetch_bytes(struct chmFile *h,
#endif
#else
#ifdef CHM_USE_IO64
- oldOs = lseek64(h->fd, 0, SEEK_CUR);
- lseek64(h->fd, os, SEEK_SET);
+ oldOs = lseek(h->fd, 0, SEEK_CUR);
+ lseek(h->fd, os, SEEK_SET);
readLen = read(h->fd, buf, len);
- lseek64(h->fd, oldOs, SEEK_SET);
+ lseek(h->fd, oldOs, SEEK_SET);
#else
oldOs = lseek(h->fd, 0, SEEK_CUR);
lseek(h->fd, (long)os, SEEK_SET);
1 change: 1 addition & 0 deletions deskutils/coolreader/pkg-plist
Expand Up @@ -74,5 +74,6 @@ share/cr3/textures/tx_sand_dark.jpg
share/cr3/txt.css
%%DOCS%%share/doc/cr3/changelog.gz
share/man/man1/cr3.1.gz
share/metainfo/cr3.appdata.xml
share/pixmaps/cr3.png
share/pixmaps/cr3.xpm

0 comments on commit 4b64cf2

Please sign in to comment.