academic/sword: Updated for version 1.7.5a1.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Tim Dickson 2016-09-30 19:33:50 +07:00 committed by Willy Sudiarto Raharjo
parent cbdf5e312c
commit a002aa8fc0
No known key found for this signature in database
GPG Key ID: 887B8374D7333381
4 changed files with 17 additions and 77 deletions

View File

@ -1,22 +0,0 @@
diff -Naur sword-1.6.2.orig/src/mgr/curlftpt.cpp sword-1.6.2.new/src/mgr/curlftpt.cpp
--- sword-1.6.2.orig/src/mgr/curlftpt.cpp 2011-07-27 00:41:40.000000000 +0200
+++ sword-1.6.2.new/src/mgr/curlftpt.cpp 2011-07-27 00:42:05.000000000 +0200
@@ -26,7 +26,6 @@
#include <fcntl.h>
#include <curl/curl.h>
-#include <curl/types.h>
#include <curl/easy.h>
#include <swlog.h>
diff -Naur sword-1.6.2.orig/src/mgr/curlhttpt.cpp sword-1.6.2.new/src/mgr/curlhttpt.cpp
--- sword-1.6.2.orig/src/mgr/curlhttpt.cpp 2011-07-27 00:41:40.000000000 +0200
+++ sword-1.6.2.new/src/mgr/curlhttpt.cpp 2011-07-27 00:42:45.000000000 +0200
@@ -25,7 +25,6 @@
#include <cctype>
#include <curl/curl.h>
-#include <curl/types.h>
#include <curl/easy.h>
#include <swlog.h>

View File

@ -1,39 +0,0 @@
--- sword-1.6.2/include/multimapwdef.h 2004-05-04 23:01:39.000000000 +0200
+++ /usr/include/sword/multimapwdef.h 2012-06-02 13:37:47.816457345 +0200
@@ -7,26 +7,26 @@
// multmap that still lets you use [] to reference FIRST
// entry of a key if multiples exist
-template <class Key, class T, class Compare>
-class multimapwithdefault : public std::multimap<Key, T, Compare> {
+template < class Key, class T, class Compare >
+class multimapwithdefault : public std::multimap< Key, T, Compare > {
public:
- typedef std::pair<const Key, T> value_type;
+ typedef std::pair< const Key, T > value_type;
T& getWithDefault(const Key& k, const T& defaultValue) {
- if (find(k) == this->end()) {
- insert(value_type(k, defaultValue));
+ if (this->find(k) == this->end()) {
+ this->insert(value_type(k, defaultValue));
}
return (*(find(k))).second;
}
T& operator[](const Key& k) {
- if (find(k) == this->end()) {
- insert(value_type(k, T()));
+ if (this->find(k) == this->end()) {
+ this->insert(value_type(k, T()));
}
- return (*(find(k))).second;
+ return (*(this->find(k))).second;
}
bool has(const Key& k, const T &val) const {
- typename std::multimap<Key, T, Compare>::const_iterator start = lower_bound(k);
- typename std::multimap<Key, T, Compare>::const_iterator end = upper_bound(k);
+ typename std::multimap< Key, T, Compare >::const_iterator start = this->lower_bound(k);
+ typename std::multimap< Key, T, Compare >::const_iterator end = this->upper_bound(k);
for (; start!=end; start++) {
if (start->second == val)
return true;

View File

@ -5,7 +5,7 @@
# Copyright 2008-2011 Heinz Wiesinger, Amsterdam, The Netherlands
# All rights reserved.
#
# changes updating to v1.7.4 Copyright 2015 Tim Dickson, Scotland
# changes updating to v1.7.5a1 Copyright 2015-20166 Tim Dickson, Scotland
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
@ -25,13 +25,13 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=sword
VERSION=${VERSION:-1.7.4}
VERSION=${VERSION:-1.7.5a1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@ -42,8 +42,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@ -61,20 +61,23 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
#rm -rf $PRGNAM-$VERSION #line changed because source directory doesn't follow its own version number
rm -rf "${PRGNAM}-1.7.5"
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
#cd $PRGNAM-$VERSION 'the source extracted folder is different from it's version
cd "${PRGNAM}-1.7.5"
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 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
#these patches don't appear to be needed for slackware 14.1 but
#have been left in the package just in case someone descovers they are required.
#patch -p1 < $CWD/curl.patch
#patch -p1 < $CWD/multimap.patch
#now patch the automake stuff so it doesn't error on slackware's newer version
#thanks to aur.archlinux.org for the information
#sed -i 's/AM_INIT_AUTOMAKE$/AM_INIT_AUTOMAKE\(\[subdir\-objects\]\)/g' configure.ac
sed -i 's/ftemplate-depth-25/ftemplate-depth\=125/g' configure.ac
./autogen.sh
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
@ -85,10 +88,8 @@ CXXFLAGS="$SLKCFLAGS" \
--disable-static \
--with-icu \
--build=$ARCH-slackware-linux
make
make install-strip DESTDIR=$PKG
mv $PKG/etc/sword.conf $PKG/etc/sword.conf.new
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION

View File

@ -1,8 +1,8 @@
PRGNAM="sword"
VERSION="1.7.4"
VERSION="1.7.5a1"
HOMEPAGE="http://www.crosswire.org/sword"
DOWNLOAD="http://crosswire.org/ftpmirror/pub/sword/source/v1.7/sword-1.7.4.tar.gz"
MD5SUM="1677f02a86cbf07713d4e1d4c39791e6"
DOWNLOAD="http://crosswire.org/ftpmirror/pub/sword/source/v1.7/sword-1.7.5a1.tar.gz"
MD5SUM="3b9f7c483dd6c73c1911e695490e69e3"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""