From 2e70b905741e0039fed52d1f49578cad616d25fd Mon Sep 17 00:00:00 2001 From: bra1nwave Date: Fri, 10 Apr 2020 08:16:22 +0200 Subject: [PATCH 1/2] calibre: update to 4.14.0. - orphan package --- .../calibre/patches/disable-unrar-test.patch | 27 ------------------- srcpkgs/calibre/template | 16 ++++++----- 2 files changed, 10 insertions(+), 33 deletions(-) delete mode 100644 srcpkgs/calibre/patches/disable-unrar-test.patch diff --git a/srcpkgs/calibre/patches/disable-unrar-test.patch b/srcpkgs/calibre/patches/disable-unrar-test.patch deleted file mode 100644 index bcbe25335a3..00000000000 --- a/srcpkgs/calibre/patches/disable-unrar-test.patch +++ /dev/null @@ -1,27 +0,0 @@ -Source: Debian - ---- - src/calibre/test_build.py | 5 +++++ - 1 file changed, 5 insertions(+) - ---- src/calibre/test_build.py -+++ src/calibre/test_build.py -@@ -17,6 +17,10 @@ from polyglot.builtins import iteritems, - - is_ci = os.environ.get('CI', '').lower() == 'true' - -+try: -+ import unrardll -+except: -+ unrardll = None - - class BuildTest(unittest.TestCase): - -@@ -265,6 +269,7 @@ class BuildTest(unittest.TestCase): - from calibre.gui2.win_file_dialogs import test - test() - -+ @unittest.skipUnless(unrardll, 'Module unrardll is missing') - def test_unrar(self): - from calibre.utils.unrar import test_basic - test_basic() diff --git a/srcpkgs/calibre/template b/srcpkgs/calibre/template index f9ae0a5923b..f9814bc3b22 100644 --- a/srcpkgs/calibre/template +++ b/srcpkgs/calibre/template @@ -1,7 +1,7 @@ # Template file for 'calibre' pkgname=calibre -version=4.13.0 -revision=3 +version=4.14.0 +revision=1 build_style=python2-module pycompile_dirs="/usr/lib/calibre/" hostmakedepends="pkg-config python-BeautifulSoup4 python-Pillow python-PyQt5-svg @@ -18,13 +18,14 @@ depends="desktop-file-utils optipng poppler-utils python-BeautifulSoup4 python-dnspython python-feedparser python-html5-parser python-mechanize python-msgpack python-netifaces python-psutil python-regex python-html2text qt5-webengine" +checkdepends="$depends libjpeg-turbo-tools jxrlib" short_desc="Ebook management application" -maintainer="bra1nwave " +maintainer="Orphaned " license="GPL-3.0-only" homepage="https://calibre-ebook.com" changelog="https://raw.githubusercontent.com/kovidgoyal/calibre/master/Changelog.yaml" distfiles="https://download.calibre-ebook.com/${version}/calibre-${version}.tar.xz" -checksum=f9587dea4f9ea76c6a5ec11b04ee66d0199d4ab3a4aad8c87966fed8ee76e1f6 +checksum=1c0dd818f602d76724aa8512a23f51101bf385233e2e5cc1cd31cae4a90f0e21 nocross=yes do_configure() { @@ -44,9 +45,12 @@ do_build() { python2 setup.py rapydscript } -# requires an X11 environment... do_check() { - : + # qt test crashes without any error messages + # disabled for now + python2 setup.py test \ + --exclude-test-name unrar \ + --exclude-test-name qt } do_install() { From d77a6993256916309c6c97a98da0c620dc3f2d9c Mon Sep 17 00:00:00 2001 From: bra1nwave Date: Fri, 10 Apr 2020 13:43:37 +0200 Subject: [PATCH 2/2] New package: jxrlib-0.2.2 --- common/shlibs | 2 + srcpkgs/jxrlib-devel | 1 + srcpkgs/jxrlib/patches/usecmake.patch | 143 ++++++++++++++++++++++++++ srcpkgs/jxrlib/template | 20 ++++ 4 files changed, 166 insertions(+) create mode 120000 srcpkgs/jxrlib-devel create mode 100644 srcpkgs/jxrlib/patches/usecmake.patch create mode 100644 srcpkgs/jxrlib/template diff --git a/common/shlibs b/common/shlibs index 5f1a09de8dc..1f9463758ff 100644 --- a/common/shlibs +++ b/common/shlibs @@ -3862,3 +3862,5 @@ libstk-4.6.1.so libstk-4.6.1_1 libc++utilities.so.5 cpp-utilities-5.2.0_1 libtagparser.so.9 tagparser-9.1.2_1 libqtutilities.so.6 qtutilities-6.0.4_1 +libjpegxr.so.0 jxrlib-0.2.2_1 +libjxrglue.so.0 jxrlib-0.2.2_1 diff --git a/srcpkgs/jxrlib-devel b/srcpkgs/jxrlib-devel new file mode 120000 index 00000000000..1f1ea142a5f --- /dev/null +++ b/srcpkgs/jxrlib-devel @@ -0,0 +1 @@ +jxrlib/ \ No newline at end of file diff --git a/srcpkgs/jxrlib/patches/usecmake.patch b/srcpkgs/jxrlib/patches/usecmake.patch new file mode 100644 index 00000000000..ef2e7de79b5 --- /dev/null +++ b/srcpkgs/jxrlib/patches/usecmake.patch @@ -0,0 +1,143 @@ +Description: Prefer a cmake based build system +Author: Mathieu Malaterre +Forwarded: https://jxrlib.codeplex.com/discussions/440294 + +Index: jxrlib-1.1/CMakeLists.txt +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ CMakeLists.txt 2014-03-26 17:05:04.429637801 +0100 +@@ -0,0 +1,134 @@ ++# Copyright Mathieu Malaterre ++# BSD (Same as jxrlib) ++cmake_minimum_required(VERSION 2.8) ++project(jxrlib C) ++ ++# Need shared libs for ABI ++set(BUILD_SHARED_LIBS ON) ++ ++# helper macro to preserve original Makefile convention ++macro(JXR_MAKE_OBJ SET_NAME) ++ foreach(src ${SRC_${SET_NAME}}) ++ list(APPEND OBJ_${SET_NAME} ${DIR_${SET_NAME}}/${src}) ++ endforeach() ++endmacro() ++ ++include(TestBigEndian) ++test_big_endian(ISBIGENDIAN) ++if(ISBIGENDIAN) ++ set(DEF_ENDIAN _BIG__ENDIAN_) ++endif() ++ ++set(DIR_SYS image/sys) ++set(DIR_DEC image/decode) ++set(DIR_ENC image/encode) ++ ++set(DIR_GLUE jxrgluelib) ++set(DIR_TEST jxrtestlib) ++set(DIR_EXEC jxrencoderdecoder) ++ ++if(NOT JXRLIB_INSTALL_BIN_DIR) ++ set(JXRLIB_INSTALL_BIN_DIR "bin") ++endif() ++ ++if(NOT JXRLIB_INSTALL_LIB_DIR) ++ set(JXRLIB_INSTALL_LIB_DIR "lib") ++endif() ++ ++if(NOT JXRLIB_INSTALL_INCLUDE_DIR) ++ set(JXRLIB_INSTALL_INCLUDE_DIR "include/jxrlib") ++endif() ++ ++include_directories( ++ common/include ++ ${DIR_SYS} ++ ${DIR_GLUE} ++ ${DIR_TEST} ++) ++ ++# where is strlcpy ? ++include(CheckSymbolExists) ++check_symbol_exists(strlcpy "string.h" HAVE_STRLCPY) ++#set(CMAKE_REQUIRED_LIBRARIES bsd) ++#CHECK_SYMBOL_EXISTS(strlcpy "string.h" HAVE_STRLCPY4) ++# on linux, strlcpy is in -lbsd: ++#if(NOT HAVE_STRLCPY) ++# include(CheckLibraryExists) ++# find_library(BSD_LIBRARY bsd) ++# check_library_exists(bsd "strlcpy" ${BSD_LIBRARY} HAVE_STRLCPY_BSD) ++#endif() ++ ++# JPEG-XR ++set(SRC_SYS adapthuff.c image.c strcodec.c strPredQuant.c strTransform.c perfTimerANSI.c) ++JXR_MAKE_OBJ(SYS) ++set(SRC_DEC decode.c postprocess.c segdec.c strdec.c strInvTransform.c strPredQuantDec.c JXRTranscode.c) ++JXR_MAKE_OBJ(DEC) ++set(SRC_ENC encode.c segenc.c strenc.c strFwdTransform.c strPredQuantEnc.c) ++JXR_MAKE_OBJ(ENC) ++ ++add_library(jpegxr ${OBJ_ENC} ${OBJ_DEC} ${OBJ_SYS}) ++set_property(TARGET jpegxr ++ PROPERTY COMPILE_DEFINITIONS __ANSI__ DISABLE_PERF_MEASUREMENT ${DEF_ENDIAN} ++) ++set_property(TARGET jpegxr PROPERTY LINK_INTERFACE_LIBRARIES "") ++set_property(TARGET jpegxr PROPERTY COMPILE_FLAGS -w) ++# VERSION/SOVERSION ++set_property(TARGET jpegxr PROPERTY VERSION 1.1) ++set_property(TARGET jpegxr PROPERTY SOVERSION 0) ++install(TARGETS jpegxr ++ EXPORT JXRLibTargets ++ RUNTIME DESTINATION ${JXRLIB_INSTALL_BIN_DIR} COMPONENT Applications ++ LIBRARY DESTINATION ${JXRLIB_INSTALL_LIB_DIR} COMPONENT Libraries ++) ++ ++# JXR-GLUE ++set(SRC_GLUE JXRGlue.c JXRMeta.c JXRGluePFC.c JXRGlueJxr.c) ++JXR_MAKE_OBJ(GLUE) ++set(SRC_TEST JXRTest.c JXRTestBmp.c JXRTestHdr.c JXRTestPnm.c JXRTestTif.c JXRTestYUV.c) ++JXR_MAKE_OBJ(TEST) ++ ++add_library(jxrglue ${OBJ_GLUE} ${OBJ_TEST}) ++set_property(TARGET jxrglue ++ PROPERTY COMPILE_DEFINITIONS __ANSI__ DISABLE_PERF_MEASUREMENT ${DEF_ENDIAN} ++) ++set_property(TARGET jxrglue PROPERTY LINK_INTERFACE_LIBRARIES "") ++set_property(TARGET jxrglue PROPERTY COMPILE_FLAGS -w) ++# VERSION/SOVERSION ++set_property(TARGET jxrglue PROPERTY VERSION 1.1) ++set_property(TARGET jxrglue PROPERTY SOVERSION 0) ++install(TARGETS jxrglue ++ EXPORT JXRLibTargets ++ RUNTIME DESTINATION ${JXRLIB_INSTALL_BIN_DIR} COMPONENT Applications ++ LIBRARY DESTINATION ${JXRLIB_INSTALL_LIB_DIR} COMPONENT Libraries ++) ++#if(HAVE_STRLCPY_BSD) ++# target_link_libraries(jxrglue ${BSD_LIBRARY}) ++#endif() ++target_link_libraries(jxrglue jpegxr m) ++# Enc app files ++set(ENCAPP JxrEncApp) ++add_executable(${ENCAPP} ${DIR_EXEC}/${ENCAPP}.c) ++set_property(TARGET ${ENCAPP} ++ PROPERTY COMPILE_DEFINITIONS __ANSI__ DISABLE_PERF_MEASUREMENT ${DEF_ENDIAN} ++) ++set_property(TARGET ${ENCAPP} PROPERTY COMPILE_FLAGS -w) ++target_link_libraries(${ENCAPP} jxrglue) # jpegxr) ++install(TARGETS ${ENCAPP} RUNTIME DESTINATION ${JXRLIB_INSTALL_BIN_DIR}) ++# Dec app files ++set(DECAPP JxrDecApp) ++add_executable(${DECAPP} ${DIR_EXEC}/${DECAPP}.c) ++set_property(TARGET ${DECAPP} ++ PROPERTY COMPILE_DEFINITIONS __ANSI__ DISABLE_PERF_MEASUREMENT ${DEF_ENDIAN} ++) ++set_property(TARGET ${DECAPP} PROPERTY COMPILE_FLAGS -w) ++target_link_libraries(${DECAPP} jxrglue) # jpegxr) ++install(TARGETS ${DECAPP} RUNTIME DESTINATION ${JXRLIB_INSTALL_BIN_DIR}) ++ ++# install rules ++install(FILES jxrgluelib/JXRGlue.h jxrgluelib/JXRMeta.h jxrtestlib/JXRTest.h ++ image/sys/windowsmediaphoto.h ++ DESTINATION ${JXRLIB_INSTALL_INCLUDE_DIR} COMPONENT Headers ++) ++install(DIRECTORY common/include/ DESTINATION ${JXRLIB_INSTALL_INCLUDE_DIR} ++ FILES_MATCHING PATTERN "*.h" ++) diff --git a/srcpkgs/jxrlib/template b/srcpkgs/jxrlib/template new file mode 100644 index 00000000000..48f02dceab6 --- /dev/null +++ b/srcpkgs/jxrlib/template @@ -0,0 +1,20 @@ +# Template file for 'jxrlib' +pkgname=jxrlib +version=0.2.2 +revision=1 +build_style=cmake +short_desc="Open source implementation of jpegxr" +maintainer="bra1nwave " +license="GPL-2.0-or-later" +homepage="https://github.com/glencoesoftware/jxrlib" +distfiles="${homepage}/archive/v${version}.tar.gz" +checksum=d1fbc5759a665949e7cb82de03c3258788bd07323f195a9e8ea9322504627cc3 + +jxrlib-devel_package() { + short_desc+=" - development files" + depends="${sourcepkg}>=${version}_${revision}" + pkg_install() { + vmove usr/include + vmove "usr/lib/*.so" + } +}