From 3c6638282c38f618577f621290a59aa93a6a8fca Mon Sep 17 00:00:00 2001 From: GOSIKI Agiri Date: Sat, 20 Jul 2019 10:30:02 +0700 Subject: games/onscripter: Added (Visual Novel Interpreter). Signed-off-by: Willy Sudiarto Raharjo --- games/onscripter/README | 21 ++++ games/onscripter/onscripter-makefile_config.diff | 26 +++++ games/onscripter/onscripter.SlackBuild | 127 +++++++++++++++++++++++ games/onscripter/onscripter.info | 10 ++ games/onscripter/slack-desc | 19 ++++ 5 files changed, 203 insertions(+) create mode 100644 games/onscripter/README create mode 100644 games/onscripter/onscripter-makefile_config.diff create mode 100644 games/onscripter/onscripter.SlackBuild create mode 100644 games/onscripter/onscripter.info create mode 100644 games/onscripter/slack-desc (limited to 'games') diff --git a/games/onscripter/README b/games/onscripter/README new file mode 100644 index 0000000000..d0d646eb4f --- /dev/null +++ b/games/onscripter/README @@ -0,0 +1,21 @@ +ONScripter is a program that interprets a script written for +NScripter visual novel engine in its own way. + +Please note that this is NOT onscripter-en that has seen a wide +adoption in circles translating Japanese visual novels to English; +instead it is the original source by Ogapee that onscripter-en has +been forked from. Please be advised that playing games converted for +specifically for onscripter-en using this engine may result in +unforseen consequences! + +This engine by default builds only the binary capable of playing back +Japanese NScripter games. If you wish to build a binary including the +1-byte character extension support, please pass the ONSTARGET=english +variable to the build script or ONSTARGET=both if you want to have +Japanese and English interpreters installed concurrently - note this +will make build time slightly longer, though, and you may still +experience issues when playing games converted for onscripter-en. + +This script may also install various tools for extracting and +converting NScripter code and resources. If you wish for them to be +built, please pass the ONSTOOLS=yes variable to the build script. diff --git a/games/onscripter/onscripter-makefile_config.diff b/games/onscripter/onscripter-makefile_config.diff new file mode 100644 index 0000000000..4201c54c54 --- /dev/null +++ b/games/onscripter/onscripter-makefile_config.diff @@ -0,0 +1,26 @@ +--- Makefile.Linux.orig 2019-07-19 16:58:43.228052408 +0200 ++++ Makefile.Linux 2019-07-19 17:00:32.528212655 +0200 +@@ -42,16 +42,16 @@ + DEFS += -DUSE_CDROM + + # optional: avifile +-DEFS += -DUSE_AVIFILE +-INCS += `avifile-config --cflags` +-LIBS += `avifile-config --libs` +-TARGET += simple_aviplay$(EXESUFFIX) +-EXT_OBJS += AVIWrapper$(OBJSUFFIX) ++#DEFS += -DUSE_AVIFILE ++#INCS += `avifile-config --cflags` ++#LIBS += `avifile-config --libs` ++#TARGET += simple_aviplay$(EXESUFFIX) ++#EXT_OBJS += AVIWrapper$(OBJSUFFIX) + + # optional: lua + DEFS += -DUSE_LUA +-INCS += -I/usr/include/lua5.1 +-LIBS += -llua5.1 ++INCS += -I/usr/include ++LIBS += -llua + EXT_OBJS += LUAHandler$(OBJSUFFIX) + + # optional: force screen width for PDA diff --git a/games/onscripter/onscripter.SlackBuild b/games/onscripter/onscripter.SlackBuild new file mode 100644 index 0000000000..599311c240 --- /dev/null +++ b/games/onscripter/onscripter.SlackBuild @@ -0,0 +1,127 @@ +#!/bin/sh + +# Slackware build script for onscripter + +# Copyright 2019 GOSIKI Agiri +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +PRGNAM=onscripter +VERSION=${VERSION:-20190527} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +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 {} \; + +# default state of variables +ONSTARGET=${ONSTARGET:-japanese} +ONSTOOLS=${ONSTOOLS:-no} +## tell the user what the config is or crash if no executable is producing +case $ONSTARGET in + japanese) echo "I will build Japanese ONScripter only!"; + versiontag="Japanese games.";; + english) echo "I will build English ONscripter only!"; + versiontag="English games.";; + both) echo "I will build both English and Japanese ONScripter!"; + versiontag="English and Japanese games.";; + *) echo "Please supply ONSTARGET={japanese,english,both} only!"; exit 1;; +esac +if [ $ONSTOOLS == "yes" ]; then + echo "I will build ONScripter tools as well!" +fi + +# apply the changes we need to make this build on a Slackware installation +# this means disable avifile support and fix linking to Lua libraly +patch -p0 < $CWD/onscripter-makefile_config.diff + +# make Japanese binary and install it to /usr/games +if [ $ONSTARGET == "japanese" -o $ONSTARGET == "both" ]; then + make -f Makefile.Linux clean onscripter + install -Dm755 onscripter $PKG/usr/games/onscripter +fi + +# patch with 1-byte character support if necessary and build ONScripter once again +# install it as onscripter_english though +if [ $ONSTARGET == "english" -o $ONSTARGET == "both" ]; then + sed -i Makefile.Linux -e 's/#DEFS += -DENABLE_1BYTE_CHAR/DEFS += -DENABLE_1BYTE_CHAR/' + make -f Makefile.Linux clean onscripter + install -Dm755 onscripter $PKG/usr/games/onscripter_english +fi + +if [ $ONSTOOLS == "yes" ]; then + make -f Makefile.Linux # this will build the rest of the targets in all rule + install -Dm755 {nsa,sar}dec {nsa,sar}conv $PKG/usr/games/ +fi + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + README COPYING www \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +# change versiontag +sed -i $PKG/install/slack-desc -e "s/%versiontag%/$versiontag/" + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/games/onscripter/onscripter.info b/games/onscripter/onscripter.info new file mode 100644 index 0000000000..fc0c93a01e --- /dev/null +++ b/games/onscripter/onscripter.info @@ -0,0 +1,10 @@ +PRGNAM="onscripter" +VERSION="20190527" +HOMEPAGE="https://onscripter.osdn.jp/onscripter.html" +DOWNLOAD="https://onscripter.osdn.jp/onscripter-20190527.tar.gz" +MD5SUM="5ce410908b712b477dce109f777cd6e1" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="smpeg lua" +MAINTAINER="GOSIKI Agiri" +EMAIL="agiri@cocaine.ninja" diff --git a/games/onscripter/slack-desc b/games/onscripter/slack-desc new file mode 100644 index 0000000000..1fdd65bd31 --- /dev/null +++ b/games/onscripter/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +onscripter: onscripter (a GPLv2 NScripter visual novel interpreter) +onscripter: +onscripter: ONScripter is a program that interprets a script written for +onscripter: NScripter visual novel engine in its own way. +onscripter: +onscripter: This version has been build for %versiontag% +onscripter: +onscripter: Homepage: https://onscripter.osdn.jp/onscripter.html +onscripter: +onscripter: +onscripter: -- cgit v1.2.3