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>
This commit is contained in:
B. Watson 2021-02-22 20:48:36 -05:00 committed by Willy Sudiarto Raharjo
parent 4fdd89e588
commit 8aad737af7
No known key found for this signature in database
GPG key ID: 3F617144D7238786
3 changed files with 33 additions and 29 deletions

View file

@ -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 \

View file

@ -1,8 +1,12 @@
PRGNAM="coolreader"
VERSION="3.2.50"
VERSION="3.2.54"
HOMEPAGE="https://github.com/buggins/coolreader"
DOWNLOAD="https://github.com/buggins/coolreader/archive/cr3.2.50/coolreader-cr3.2.50.tar.gz"
MD5SUM="cb04397695a00defe7dad86c1d654371"
DOWNLOAD="https://github.com/buggins/coolreader/archive/cr3.2.54/coolreader-cr3.2.54.tar.gz \
https://github.com/adah1972/libunibreak/releases/download/libunibreak_4_3/libunibreak-4.3.tar.gz \
https://github.com/fribidi/fribidi/releases/download/v1.0.10/fribidi-1.0.10.tar.xz"
MD5SUM="b1c15673c84f3171fa9a2c471bb0b54e \
f0c4488fad8dc92a11f4523d22c099d3 \
97c87da9930e8e70fbfc8e2bcd031554"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""

View file

@ -1,22 +0,0 @@
--- coolreader-cr3.2.49/cr3qt/src/settings.ui 2020-09-11 07:17:23.000000000 -0400
+++ settings.ui 2020-10-19 12:30:04.557739030 -0400
@@ -1566,7 +1566,7 @@
</item>
<item row="12" column="1">
<widget class="QComboBox" name="cbFontShaping">
- <property name="currentText">
+ <property name="currentText" stdset="0">
<string>Simple (FreeType only, fastest)</string>
</property>
<item>
@@ -1733,8 +1733,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>393</width>
- <height>620</height>
+ <width>387</width>
+ <height>625</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_9">