new package: djvulibre

Closes https://github.com/termux/termux-packages/issues/5485.

Note: I have replaced pthread_cancel() with pthread_exit(NULL) as Android
doesn't implement it. Not sure whether package will work correctly. If
there will be a bug, someone need to review source and replace pthread_cancel
with atomic flags in correct places.
This commit is contained in:
Leonid Pliushch 2020-11-05 20:31:45 +00:00
parent 7cc79fcd69
commit 0d713b02b9
2 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,8 @@
TERMUX_PKG_HOMEPAGE=http://djvu.sourceforge.net/
TERMUX_PKG_DESCRIPTION="Suite to create, manipulate and view DjVu ('déjà vu') documents"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_VERSION=3.5.27
TERMUX_PKG_SRCURL=https://downloads.sourceforge.net/project/djvu/DjVuLibre/${TERMUX_PKG_VERSION}/djvulibre-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=e69668252565603875fb88500cde02bf93d12d48a3884e472696c896e81f505f
TERMUX_PKG_DEPENDS="libtiff"
#TERMUX_PKG_BUILD_IN_SRC=true

View File

@ -0,0 +1,12 @@
diff -uNr djvulibre-3.5.27/libdjvu/GThreads.cpp djvulibre-3.5.27.mod/libdjvu/GThreads.cpp
--- djvulibre-3.5.27/libdjvu/GThreads.cpp 2015-02-08 19:30:52.000000000 +0000
+++ djvulibre-3.5.27.mod/libdjvu/GThreads.cpp 2020-11-05 20:29:41.941759223 +0000
@@ -447,7 +447,7 @@
GThread::terminate()
{
if (xentry || xarg)
- pthread_cancel(hthr);
+ pthread_exit(NULL);
}
int