Browse Source

xap/xchm: Upgraded to xchm-1.31.

current-20191101
Damien Goutte-Gattat 2 years ago
parent
commit
e5bfbb1fae
  1. 4
      xap/xchm/doinst.sh
  2. 21
      xap/xchm/xchm-1.23-wxwidgets-3.0.diff
  3. 1
      xap/xchm/xchm-1.23.tar.gz.sha1
  4. 1
      xap/xchm/xchm-1.31.tar.gz.sha256
  5. 32
      xap/xchm/xchm.SlackBuild
  6. 12
      xap/xchm/xchm.desktop

4
xap/xchm/doinst.sh

@ -0,0 +1,4 @@
#!/bin/sh
if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database ./usr/share/applications 2>/dev/null 2>&1
fi

21
xap/xchm/xchm-1.23-wxwidgets-3.0.diff

@ -1,21 +0,0 @@
diff -Naur xchm-1.23.orig/src/chmframe.cpp xchm-1.23/src/chmframe.cpp
--- xchm-1.23.orig/src/chmframe.cpp 2013-08-30 10:31:38.000000000 +0200
+++ xchm-1.23/src/chmframe.cpp 2013-12-26 23:34:59.412522347 +0100
@@ -265,7 +265,7 @@
enu.EnumerateFacenames();
_normalFonts = new wxArrayString;
-#if wxMAJOR_VERSION == 2 && wxMINOR_VERSION >= 7
+#if wxMAJOR_VERSION == 3 || (wxMAJOR_VERSION == 2 && wxMINOR_VERSION >= 7)
*_normalFonts = enu.GetFacenames();
#else
*_normalFonts = *enu.GetFacenames();
@@ -278,7 +278,7 @@
enu.EnumerateFacenames(wxFONTENCODING_SYSTEM, TRUE);
_fixedFonts = new wxArrayString;
-#if wxMAJOR_VERSION == 2 && wxMINOR_VERSION >= 7
+#if wxMAJOR_VERSION == 3 || (wxMAJOR_VERSION == 2 && wxMINOR_VERSION >= 7)
*_fixedFonts = enu.GetFacenames();
#else
*_fixedFonts = *enu.GetFacenames();

1
xap/xchm/xchm-1.23.tar.gz.sha1

@ -1 +0,0 @@
d0de589775164ee8123b25082c54587f0cc72e1d xchm-1.23.tar.gz

1
xap/xchm/xchm-1.31.tar.gz.sha256

@ -0,0 +1 @@
0e1f6bbcb88e8e8fd200b5531e3486ecc04a614c4234356c397cf188b55f862b xchm-1.31.tar.gz

32
xap/xchm/xchm.SlackBuild

@ -1,6 +1,6 @@
#!/bin/bash
# Build script for Slackware
# Copyright (C) 2008,2010,2011,2013 Damien Goutte-Gattat
# Copyright (C) 2008,2010,2011,2013,2019 Damien Goutte-Gattat
#
# Redistribution and use of this script, with or without modifications,
# is permitted provided that the following conditions are met:
@ -22,15 +22,15 @@
#
# Contact: Damien Goutte-Gattat <dgouttegattat@incenp.org>
#
# Latest xchm sourcecode is available at: <http://xchm.sourceforge.net/>.
# Latest xchm sourcecode is available at: <https://github.com/rzvncj/xCHM>.
#
# Depends: l/wxwidgets-gtk
# Source package infos
NAMESRC=${NAMESRC:-xchm}
VERSION=${VERSION:-1.23}
VERSION=${VERSION:-1.31}
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz}
WGET=${WGET:-http://downloads.sourceforge.net/xchm/$ARCHIVE}
WGET=${WGET:-https://github.com/rzvncj/xCHM/releases/download/$VERSION/$ARCHIVE}
# Build infos
NAMEPKG=${NAMEPKG:-xchm}
@ -75,7 +75,7 @@ if [ ! -r $ARCHIVE ]; then
wget -c -O $ARCHIVE.part "$WGET"
mv $ARCHIVE.part $ARCHIVE
fi
sha1sum -c $ARCHIVE.sha1
sha256sum -c $ARCHIVE.sha256
NAME=$(tar ft $ARCHIVE | head -n 1 | cut -d / -f 1)
# Compile
@ -83,24 +83,32 @@ cd $TMP
echo "Building $ARCHIVE..."
tar xf $CWD/$ARCHIVE
cd $NAME
patch -p 1 < $CWD/xchm-1.23-wxwidgets-3.0.diff
CFLAGS=$CPUOPT \
CXXFLAGS=$CPUOPT \
./configure \
--prefix=/usr \
--mandir=/usr/man \
--enable-optimize \
--disable-dependency-tracking
--disable-dependency-tracking \
--build=$ARCH-slackware-linux
make -j $JOBS
make install-strip DESTDIR=$PKG
# Compress man pages
find $PKG/usr/man -type f -exec gzip -9 {} \;
# Install the documentation
mkdir -p $PKG/usr/doc/$NAME
install -m 644 AUTHORS COPYING ChangeLog NEWS README{,.xmlrpc} \
$PKG/usr/doc/$NAME
install -m 644 AUTHORS COPYING ChangeLog README $PKG/usr/doc/$NAME
# Copy slack-desc and doinst.sh files
install -D -m 644 $CWD/slack-desc $PKG/install/slack-desc
install -m 755 $CWD/doinst.sh $PKG/install/doinst.sh
# Copy slack-desc and desktop files
install -D -m 0644 $CWD/slack-desc $PKG/install/slack-desc
install -D -m 0644 $CWD/xchm.desktop $PKG/usr/share/applications/xchm.desktop
# Add dependency infos
cat <<EOF > $PKG/install/slack-required
wxwidgets-gtk
EOF
# Package the tree
cd $PKG

12
xap/xchm/xchm.desktop

@ -1,12 +0,0 @@
[Desktop Entry]
Name=xCHM
Comment=CHM Viewer
Exec=xchm
Icon=/usr/share/pixmaps/xchm-48.xpm
Terminal=false
Type=Application
Categories=GNOME;GTK;Qt;KDE;Development;Documentation
StartupNotify=false
GenericName=CHM Viewer
X-KDE-StartupNotify=false
X-DCOP-ServiceType=Multi
Loading…
Cancel
Save