summaryrefslogtreecommitdiffstats
path: root/games/rogue
diff options
context:
space:
mode:
Diffstat (limited to 'games/rogue')
-rw-r--r--games/rogue/ncurses.patch10
-rw-r--r--games/rogue/rogue.SlackBuild19
2 files changed, 26 insertions, 3 deletions
diff --git a/games/rogue/ncurses.patch b/games/rogue/ncurses.patch
new file mode 100644
index 0000000000..b0e8735914
--- /dev/null
+++ b/games/rogue/ncurses.patch
@@ -0,0 +1,10 @@
+--- ./mdport.c 2016-07-23 11:24:54.000000000 +0900
++++ ./mdport.c 2021-04-10 21:46:28.000004331 +0900
+@@ -84,6 +84,7 @@
+ #include <curses.h> /* AIX requires curses.h be included before term.h */
+
+ #if defined(HAVE_TERM_H)
++#define NCURSES_INTERNALS
+ #include <term.h>
+ #elif defined(HAVE_NCURSES_TERM_H)
+ #include <ncurses/term.h>
diff --git a/games/rogue/rogue.SlackBuild b/games/rogue/rogue.SlackBuild
index a175d9f61a..95da05d7ce 100644
--- a/games/rogue/rogue.SlackBuild
+++ b/games/rogue/rogue.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for Rogue
@@ -22,10 +22,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=rogue
VERSION=${VERSION:-5.4.4}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,7 +38,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,6 +79,9 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+# Patching for ncurses include statement
+patch -p1 < $CWD/ncurses.patch
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
@@ -103,4 +116,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