summaryrefslogtreecommitdiff
path: root/office/coolreader/coolreader.SlackBuild
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2021-02-22 20:48:36 -0500
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2021-02-27 08:24:36 +0700
commit8aad737af7a3d1b4c92caa125d9066fb7061c356 (patch)
treef2627cfc23700626b656bc31d5faf8e01899a3a6 /office/coolreader/coolreader.SlackBuild
parent4fdd89e588c4fba2a9ced83d35a20e65202201f5 (diff)
downloadslackbuilds-8aad737af7a3d1b4c92caa125d9066fb7061c356.tar.gz
office/coolreader: Updated for version 3.2.54.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'office/coolreader/coolreader.SlackBuild')
-rw-r--r--office/coolreader/coolreader.SlackBuild30
1 files changed, 26 insertions, 4 deletions
diff --git a/office/coolreader/coolreader.SlackBuild b/office/coolreader/coolreader.SlackBuild
index c1a6a928e0..4464360dad 100644
--- a/office/coolreader/coolreader.SlackBuild
+++ b/office/coolreader/coolreader.SlackBuild
@@ -23,6 +23,10 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20210222 bkw: update for v3.2.54. Upstream no longer ships libunibreak
+# and fribidi source, so add them to DOWNLOAD. Replace qt4_settings_ui.diff
+# with a more robust sed command. Add -fpermissive. Sigh.
+
# 20201102 bkw:
# - update for v3.2.50.
# - embiggen the default window size.
@@ -43,7 +47,7 @@
# - save/load settings (.ini file) to ~/.cr3, not /usr/share/cr3.
PRGNAM=coolreader
-VERSION=${VERSION:-3.2.50}
+VERSION=${VERSION:-3.2.54}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -76,15 +80,32 @@ fi
set -e
+FBDVER=${FBDVER:-1.0.10}
+LUBVER=${LUBVER:-4.3}
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-cr$VERSION
tar xvf $CWD/$PRGNAM-cr$VERSION.tar.gz
cd $PRGNAM-cr$VERSION
+( cd thirdparty
+ tar xvf $CWD/fribidi-$FBDVER.tar.xz
+ tar xvf $CWD/libunibreak-$LUBVER.tar.gz )
find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
+# Apply coolreader-specific patches to thirdparty libs.
+( cd thirdparty/fribidi-$FBDVER
+ for i in ../../thirdparty_repo/patches/fribidi/*.patch; do
+ patch -p1 < $i
+ done )
+
+( cd thirdparty/libunibreak-$LUBVER
+ for i in ../../thirdparty_repo/patches/libunibreak/*.patch; do
+ patch -p1 < $i
+ done )
+
# FFS, it's 2020, we don't need GUI apps hardcoded to start at
# 640x400 window size. Honestly we don't need them hardcoded at
# all, but since that's what coolreader does, pick a size that's
@@ -101,7 +122,7 @@ sed -i -e '/find_package(libunibreak)/d' \
# Install the docs in the right place for Slackware.
sed -i "s,share/doc/cr3,doc/$PRGNAM-$VERSION," cr3qt/CMakeLists.txt
-# The settings patch for qt4 was made by loading cr3qt/src/settings.ui
+# The settings sed for qt4 was made by loading cr3qt/src/settings.ui
# into Qt Designer and saving it again. Needed because upstream's
# using a different (older?) version of qt4.
@@ -109,7 +130,8 @@ GUI=${GUI:-QT}
GUI="$( echo $GUI | tr a-z A-Z )"
case "$GUI" in
QT) UI=Qt4
- patch -p1 < $CWD/qt4_settings_ui.diff ;;
+ sed -i '/<property name="currentText"/s,>, stdset="0">,' cr3qt/src/settings.ui
+ ;;
QT5) UI=Qt5 ;;
WX) # Either 2.8.x or 3.0.x works, be specific in the slack-desc.
UI="wxWidgets $( wx-config --version | cut -d. -f1,2)" ;;
@@ -140,7 +162,7 @@ cd build
cmake \
-D USE_UNRAR=1 \
-D CMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
- -D CMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -D CMAKE_CXX_FLAGS:STRING="$SLKCFLAGS -fpermissive" \
-D CMAKE_INSTALL_PREFIX=/usr \
-D LIB_SUFFIX=${LIBDIRSUFFIX} \
-D CMAKE_BUILD_TYPE=Release \