summaryrefslogtreecommitdiffstats
path: root/games/asc
diff options
context:
space:
mode:
Diffstat (limited to 'games/asc')
-rw-r--r--games/asc/asc.SlackBuild26
-rw-r--r--games/asc/asc.info2
-rw-r--r--games/asc/libphysfs-3.0.1.patch50
3 files changed, 72 insertions, 6 deletions
diff --git a/games/asc/asc.SlackBuild b/games/asc/asc.SlackBuild
index 816bf1100f..739fbb9009 100644
--- a/games/asc/asc.SlackBuild
+++ b/games/asc/asc.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for asc
@@ -22,10 +22,16 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20200906 bkw: modified by SlackBuilds.org: added patch to support
+# physfs 3.0.1.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=asc
VERSION=${VERSION:-2.6.1.0}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,7 +41,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -69,12 +82,15 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+# 20200906 bkw: Patch borrowed from Debian, with thanks.
+patch -p1 < $CWD/libphysfs-3.0.1.patch
+
# convert asc logo icon .gif to .png format
convert data/icon_asc.gif $PRGNAM.png
CXX="g++ -std=c++11" \
CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS -Wno-narrowing" \
./configure \
--prefix=/usr \
--sysconfdir=/etc \
@@ -107,4 +123,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/games/asc/asc.info b/games/asc/asc.info
index 595474d67c..ec8227639c 100644
--- a/games/asc/asc.info
+++ b/games/asc/asc.info
@@ -5,6 +5,6 @@ DOWNLOAD="https://downloads.sourceforge.net/project/asc-hq/ASC%20Source/2.6.1/as
MD5SUM="b8668c378e730e982458d5c082e7e0ca"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="lua wxPython physfs SDL_sound"
+REQUIRES="lua wxPython physfs"
MAINTAINER="Dimitris Zlatanidis"
EMAIL="d.zlatanidis@gmail.com"
diff --git a/games/asc/libphysfs-3.0.1.patch b/games/asc/libphysfs-3.0.1.patch
new file mode 100644
index 0000000000..7e1cd12782
--- /dev/null
+++ b/games/asc/libphysfs-3.0.1.patch
@@ -0,0 +1,50 @@
+From: Markus Koschany <apo@debian.org>
+Date: Fri, 17 Nov 2017 19:08:04 +0100
+Subject: libphysfs 3.0.1
+
+Bug-Debian: https://bugs.debian.org/881998
+Forwarded: http://battle-planet.de/pbp/board/viewtopic.php?f=128&t=6717
+---
+ source/libs/paragui/src/core/physfsrwops.h | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/source/libs/paragui/src/core/physfsrwops.h b/source/libs/paragui/src/core/physfsrwops.h
+index 91ff2eb..a259622 100644
+--- a/source/libs/paragui/src/core/physfsrwops.h
++++ b/source/libs/paragui/src/core/physfsrwops.h
+@@ -39,7 +39,7 @@ extern "C" {
+ * @return A valid SDL_RWops structure on success, NULL on error. Specifics
+ * of the error can be gleaned from PHYSFS_getLastError().
+ */
+-__EXPORT__ SDL_RWops *PHYSFSRWOPS_openRead(const char *fname);
++PHYSFS_DECL SDL_RWops *PHYSFSRWOPS_openRead(const char *fname);
+
+ /**
+ * Open a platform-independent filename for writing, and make it accessible
+@@ -51,7 +51,7 @@ __EXPORT__ SDL_RWops *PHYSFSRWOPS_openRead(const char *fname);
+ * @return A valid SDL_RWops structure on success, NULL on error. Specifics
+ * of the error can be gleaned from PHYSFS_getLastError().
+ */
+-__EXPORT__ SDL_RWops *PHYSFSRWOPS_openWrite(const char *fname);
++PHYSFS_DECL SDL_RWops *PHYSFSRWOPS_openWrite(const char *fname);
+
+ /**
+ * Open a platform-independent filename for appending, and make it accessible
+@@ -63,7 +63,7 @@ __EXPORT__ SDL_RWops *PHYSFSRWOPS_openWrite(const char *fname);
+ * @return A valid SDL_RWops structure on success, NULL on error. Specifics
+ * of the error can be gleaned from PHYSFS_getLastError().
+ */
+-__EXPORT__ SDL_RWops *PHYSFSRWOPS_openAppend(const char *fname);
++PHYSFS_DECL SDL_RWops *PHYSFSRWOPS_openAppend(const char *fname);
+
+ /**
+ * Make a SDL_RWops from an existing PhysicsFS file handle. You should
+@@ -75,7 +75,7 @@ __EXPORT__ SDL_RWops *PHYSFSRWOPS_openAppend(const char *fname);
+ * @return A valid SDL_RWops structure on success, NULL on error. Specifics
+ * of the error can be gleaned from PHYSFS_getLastError().
+ */
+-__EXPORT__ SDL_RWops *PHYSFSRWOPS_makeRWops(PHYSFS_file *handle);
++PHYSFS_DECL SDL_RWops *PHYSFSRWOPS_makeRWops(PHYSFS_file *handle);
+
+ #ifdef __cplusplus
+ }