mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-23 18:14:51 +08:00
sigil: update to 0.9.3
This commit is contained in:
parent
3def8008c2
commit
a9b075072d
@ -0,0 +1,52 @@
|
||||
From 5a16d1119dab001cd58492b1bb76a43245e0641f Mon Sep 17 00:00:00 2001
|
||||
From: Eli Schwartz <eschwartz93@gmail.com>
|
||||
Date: Sat, 24 Oct 2015 20:16:52 -0400
|
||||
Subject: [PATCH] Set environment variable for Sigil dictionaries.
|
||||
|
||||
Needed to teach Sigil where the system dictionaries are located when not
|
||||
using vendored copies. Upstream apparently does NOT want the build
|
||||
system to be capable of setting this automatically.
|
||||
|
||||
See: https://github.com/Sigil-Ebook/Sigil/pull/139 where I tried to
|
||||
rework things to teach Sigil to use the system dictionaries -- and in
|
||||
the process have the install script configured *automatically*.
|
||||
|
||||
But environment variables are apparently preferred (while keeping the
|
||||
vendored location built into the executable).
|
||||
The build script was at least taught to stop installing the dictionaries
|
||||
via an option (separate from USE_SYSTEM_LIBS) but the aspect of my PR
|
||||
which configured the launch script automatically (because the plugin
|
||||
launcher *definitely* needs the env var) was not utilized at all.
|
||||
|
||||
Per: https://github.com/Sigil-Ebook/Sigil/commit/ce862ebb236721e21a5620eef2e815e70cff9d35
|
||||
"They are commonly set by manually editing Sigil's launch script [...]"
|
||||
|
||||
I guess this patch will have to do instead.
|
||||
---
|
||||
src/Resource_Files/bash/sigil-sh_install | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/Resource_Files/bash/sigil-sh_install b/src/Resource_Files/bash/sigil-sh_install
|
||||
index 08fd266..c8287a1 100755
|
||||
--- a/src/Resource_Files/bash/sigil-sh_install
|
||||
+++ b/src/Resource_Files/bash/sigil-sh_install
|
||||
@@ -18,6 +18,11 @@ if [ -z "$SIGIL_SHARE_PREFIX" ]; then
|
||||
export SIGIL_SHARE_PREFIX
|
||||
fi
|
||||
|
||||
+# Create an environment var for the system dictionaries location.
|
||||
+if [ -z "$SIGIL_DICTIONARIES" ]; then
|
||||
+ export SIGIL_DICTIONARIES="/usr/share/hunspell:/usr/share/hyphen"
|
||||
+fi
|
||||
+
|
||||
# Not really needed anymore but left in for fringe cases
|
||||
#if [ -z "$SIGIL_EXTRA_ROOT" ]; then
|
||||
# SIGIL_EXTRA_ROOT="${SIGIL_SHARE_ROOT}"
|
||||
@@ -27,4 +32,3 @@ fi
|
||||
export LD_LIBRARY_PATH
|
||||
|
||||
exec ${CMAKE_INSTALL_PREFIX}/lib/sigil/sigil "$@"
|
||||
-
|
||||
--
|
||||
2.6.2
|
||||
|
@ -1,27 +1,53 @@
|
||||
pkgname=sigil
|
||||
_pkgname=Sigil
|
||||
pkgver=0.8.7
|
||||
pkgver=0.9.3
|
||||
pkgrel=1
|
||||
pkgdesc="A multi-platform WYSIWYG ebook editor. It is designed to edit books in ePub format."
|
||||
arch=('x86_64')
|
||||
url="http://sigil-ebook.com/"
|
||||
license=('GPL3')
|
||||
depends=('qt5-webkit' 'boost-libs' 'hicolor-icon-theme')
|
||||
makedepends=('qt5-tools' 'qt5-svg' 'cmake' 'boost' 'qt5-multimedia')
|
||||
depends=('qt5-webkit' 'python3' 'hicolor-icon-theme' 'python3-lxml>=3.5.0' 'python3-six')
|
||||
makedepends=('qt5-tools' 'qt5-svg' 'cmake')
|
||||
optdepends=('hunspell-en: for English dictionary support'
|
||||
'hyphen-en: for English hyphenation support in plugins'
|
||||
'python3-html5lib: recommended for plugins'
|
||||
'python3-chardet: recommended for plugins'
|
||||
'python3-cssselect: recommended for plugins'
|
||||
'python3-cssutils: recommended for plugins'
|
||||
'python3-pillow: recommended for plugins'
|
||||
'python3-regex: recommended for plugins')
|
||||
categories=('office')
|
||||
install=sigil.install
|
||||
screenshot=('http://1.bp.blogspot.com/-K2Q-tdVbPRI/UI08v7LhzHI/AAAAAAAAABY/vZ5LHjM6nb4/s1600/Screen+Shot+2012-10-28+at+10.07.03+AM.png')
|
||||
source=("https://github.com/user-none/Sigil/releases/download/${pkgver}/${_pkgname}-${pkgver}-Code.zip")
|
||||
sha512sums=('a7068c0abcb21b827b5990ed55e72739d347dd294b4042ae3fb075bf5ca5fa27ce7e18a45ae028ae6c21d6a7cd842e3b9a660214130080690efb84f22e3f82b8')
|
||||
source=("https://github.com/user-none/Sigil/releases/download/${pkgver}/${_pkgname}-${pkgver}-Code.zip"
|
||||
"0001-Set-environment-variable-for-Sigil-dictionaries.patch")
|
||||
sha256sums=('af8596fe7f235a3da240afc042efe8f8ff049ca063c72ae975716931cbb06406'
|
||||
'8a1d6085c1ba2c2a919581096af20d0851a6a7a70c4c001a3d30881a511e52c6')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}"
|
||||
|
||||
# Upstream would prefer we *manually* set this env var when using the
|
||||
# build option "-DINSTALL_BUNDLED_DICTS=0"
|
||||
patch -p1 < ../0001-Set-environment-variable-for-Sigil-dictionaries.patch
|
||||
|
||||
if [[ "${_localepurge}" != "" ]]; then
|
||||
for trans in src/Resource_Files/ts/*; do
|
||||
if [[ "$(basename $trans | sed -r 's/(_.*)_.*/\1/g')" != "sigil_${_localepurge}" ]]; then
|
||||
rm $trans
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/Sigil-${pkgver}"
|
||||
cd "${srcdir}"
|
||||
|
||||
mkdir -p build
|
||||
cd build
|
||||
|
||||
cmake -G "Unix Makefiles" \
|
||||
cmake -G "Unix Makefiles" \
|
||||
-DINSTALL_BUNDLED_DICTS=0 \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_C_FLAGS:STRING="$CFLAGS" \
|
||||
-DCMAKE_CXX_FLAGS:STRING="$CXXFLAGS" \
|
||||
@ -31,17 +57,19 @@ build() {
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/Sigil-${pkgver}/build"
|
||||
cd "${srcdir}/build"
|
||||
|
||||
make DESTDIR=$pkgdir install
|
||||
|
||||
install -Dm0644 $srcdir/${_pkgname}-${pkgver}/src/$_pkgname/Resource_Files/freedesktop/$pkgname.desktop \
|
||||
install -Dm0644 $srcdir/src/Resource_Files/freedesktop/$pkgname.desktop \
|
||||
$pkgdir/usr/share/applications/$pkgname.desktop
|
||||
|
||||
for _pic in 16 32 48 128 256; do
|
||||
install -Dm0644 ../src/Sigil/Resource_Files/icon/app_icon_$_pic.png \
|
||||
install -Dm0644 ../src/Resource_Files/icon/app_icon_$_pic.png \
|
||||
$pkgdir/usr/share/icons/hicolor/${_pic}x${_pic}/apps/$pkgname.png
|
||||
done
|
||||
install -Dm644 ../src/Sigil/Resource_Files/icon/app_icon_512.png \
|
||||
install -Dm644 ../src/Resource_Files/icon/app_icon_512.png \
|
||||
"$pkgdir/usr/share/pixmaps/$pkgname.png"
|
||||
python3 -m compileall "${pkgdir}"/usr/share/sigil/{plugin_launchers/python/,python3lib}
|
||||
python3 -O -m compileall "${pkgdir}"/usr/share/sigil/{plugin_launchers/python/,python3lib}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user