diff -Naur sigil-0.8.7/0001-Set-environment-variable-for-Sigil-dictionaries.patch sigil-0.9.0/0001-Set-environment-variable-for-Sigil-dictionaries.patch --- sigil-0.8.7/0001-Set-environment-variable-for-Sigil-dictionaries.patch 1969-12-31 19:00:00.000000000 -0500 +++ sigil-0.9.0/0001-Set-environment-variable-for-Sigil-dictionaries.patch 2015-10-30 17:06:10.850374550 -0400 @@ -0,0 +1,52 @@ +From 7e4a8770a8a0b011f99dd7d4228915f98f65efba Mon Sep 17 00:00:00 2001 +From: Eli Schwartz +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..1720dfe 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 Sigil share directory 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 + diff -Naur sigil-0.8.7/PKGBUILD sigil-0.9.0/PKGBUILD --- sigil-0.8.7/PKGBUILD 2015-11-07 20:03:17.364911118 -0500 +++ sigil-0.9.0/PKGBUILD 2015-11-07 20:01:40.888563431 -0500 @@ -1,44 +1,61 @@ # $Id$ # Maintainer: Giovanni Scafora +# Contributor: Eli Schwartz # Contributor: Larry Hajali pkgname=sigil -pkgver=0.8.7 -pkgrel=2 -pkgdesc="WYSIWYG ebook editor" +pkgver=0.9.0 +pkgrel=1 +pkgdesc="A WYSIWYG ebook editor" arch=('i686' 'x86_64') -url="https://github.com/user-none/Sigil/" +url="https://github.com/Sigil-Ebook/Sigil" license=('GPL3') -depends=('qt5-webkit' 'boost-libs' 'python' 'hicolor-icon-theme') -makedepends=('qt5-multimedia' 'qt5-tools' 'qt5-svg' 'cmake' 'boost') +depends=('qt5-webkit' 'hunspell' 'desktop-file-utils' 'minizip' + 'gtk-update-icon-cache' 'python-lxml' 'python-six') +makedepends=('qt5-tools' 'qt5-svg' 'cmake') +optdepends=('hunspell-en: for English dictionary support' + 'hyphen-en: for English hyphenation support in plugins' + 'python-html5lib: recommended for plugins' + 'python-chardet: recommended for plugins' + 'python-cssselect: recommended for plugins' + 'python-cssutils: recommended for plugins' + 'python-pillow: recommended for plugins' + 'python-regex: recommended for plugins') install=sigil.install -source=("https://github.com/user-none/Sigil/releases/download/${pkgver}/Sigil-${pkgver}-Code.zip") -md5sums=('1eae1cc28f46f3d0fad185a3b5e34025') +source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz" + "0001-Set-environment-variable-for-Sigil-dictionaries.patch") +sha256sums=('39887e1f76236e796d29c679f327c7183907c47b522794a00090eb1aa04dac92' + '94bc03892a30506308c67bba11dc7e9e375447fa1b42f328850771dd80d4df36') -build() { +prepare() { cd "${srcdir}/Sigil-${pkgver}" - mkdir build - cd build + # 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 +} +build() { + mkdir -p "${srcdir}/Sigil-${pkgver}/build" + cd "${srcdir}/Sigil-${pkgver}/build" cmake -G "Unix Makefiles" \ + -DUSE_SYSTEM_LIBS=1 \ + -DSYSTEM_LIBS_REQUIRED=1 \ + -DINSTALL_BUNDLED_DICTS=0 \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_C_FLAGS:STRING="${CFLAGS}" \ -DCMAKE_CXX_FLAGS:STRING="${CXXFLAGS}" \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_SKIP_RPATH=ON .. - make } package() { - cd "${srcdir}"/Sigil-${pkgver}/build + cd "${srcdir}/Sigil-${pkgver}/build" make install DESTDIR="${pkgdir}" for _pic in 16 32 48 128 256; do - install -D -m 0644 ../src/Sigil/Resource_Files/icon/app_icon_${_pic}.png \ - "${pkgdir}"/usr/share/icons/hicolor/${_pic}x${_pic}/apps/${pkgname}.png + install -D -m 0644 ../src/Resource_Files/icon/app_icon_${_pic}.png \ + "${pkgdir}"/usr/share/icons/hicolor/${_pic}x${_pic}/apps/sigil.png done - install -Dm644 ../src/Sigil/Resource_Files/icon/app_icon_128.png \ - "$pkgdir/usr/share/pixmaps/$pkgname.png" } diff -Naur sigil-0.8.7/sigil.install sigil-0.9.0/sigil.install --- sigil-0.8.7/sigil.install 2015-11-07 20:03:17.366911166 -0500 +++ sigil-0.9.0/sigil.install 2015-10-30 17:06:19.371574657 -0400 @@ -1,6 +1,6 @@ post_install() { update-desktop-database -q - xdg-icon-resource forceupdate --theme hicolor &> /dev/null + gtk-update-icon-cache -q -t -f usr/share/icons/hicolor } post_upgrade() {