summaryrefslogtreecommitdiff
path: root/office/zathura/zathura.SlackBuild
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2018-09-09 17:13:52 -0400
committerDavid Spencer <idlemoor@slackbuilds.org>2018-09-15 19:23:40 +0100
commit76e58af907b06aa2ae45c638391eb3814cd3dcd9 (patch)
treeb51be83975b8da2b3d96b33ee7e61579edba57dd /office/zathura/zathura.SlackBuild
parentaa991108b1b77cfecc77f69a1812c66266678eb5 (diff)
downloadslackbuilds-76e58af907b06aa2ae45c638391eb3814cd3dcd9.tar.gz
office/zathura: Re-enable synctex.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Diffstat (limited to 'office/zathura/zathura.SlackBuild')
-rw-r--r--office/zathura/zathura.SlackBuild33
1 files changed, 26 insertions, 7 deletions
diff --git a/office/zathura/zathura.SlackBuild b/office/zathura/zathura.SlackBuild
index 28e06b3447..7d0e602451 100644
--- a/office/zathura/zathura.SlackBuild
+++ b/office/zathura/zathura.SlackBuild
@@ -23,6 +23,11 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20180909 bkw:
+# - Re-enable building with synctex, since texlive has been fixed. This
+# requires a patch, since this version of zathura was written for an
+# older version of texlive.
+
# 20180903 bkw:
# - Disable building with synctex, since it currently doesn't work due
# to a bug in the texlive package. Will be re-enabled when the texlive
@@ -151,6 +156,17 @@ find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
patch -p1 < $CWD/dlopen_hack.diff
+# synctex API in recent texlive has changed from whatever version
+# zathura was developed with. This is a monkey patch, with me as
+# the monkey: monkey see someone else's patch for something else here:
+# https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=896566;filename=synctex2;msg=10
+# ...and monkey do the same thing to zathura.
+# A while after I did this, I found someone else's patch:
+# http://pk.archive.ubuntu.com/ubuntu/ubuntu/pool/universe/z/zathura/zathura_0.3.9-2.debian.tar.xz
+# ...the portion of the patch that alters synctex.c looks identical to
+# the one I came up with, meaning I could have saved myself some work...
+patch -p1 < $CWD/synctex_fix.diff
+
sed -i "s/-pedantic/$SLKCFLAGS/" config.mk
sed -i '/--dependency-file/d' Makefile
@@ -165,10 +181,16 @@ make \
RSTTOMAN="" \
COLOR=0 \
GLIB_VERSION_CHECK=0 \
- WITH_SYNCTEX=0 \
+ VERBOSE=1 \
all \
install
+# Check & see if synctex was built in, for slack-desc purposes.
+WITH=WITHOUT
+if ldd $PKG/usr/bin/$PRGNAM | grep -q libsynctex; then
+ WITH=WITH
+fi
+
gzip $PKG/usr/man/man?/*.?
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
@@ -194,11 +216,8 @@ rm -rf $PLUGIN-$PLUGINVER
tar xvf $CWD/$PLUGIN-$PLUGINVER.tar.gz
cd $PLUGIN-$PLUGINVER
chown -R root:root .
-find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
- -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
# ZATHURA_VERSION_CHECK=0 is required because zathura.pc isn't installed.
@@ -221,7 +240,7 @@ cat $CWD/$PRGNAM.png > $PKG/usr/share/pixmaps/$PRGNAM.png
echo "Icon=$PRGNAM" >> $PKG/usr/share/applications/$PRGNAM.desktop
mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
+sed "s,@WITH@,$WITH," $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG