summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authoryjun2021-02-13 14:37:51 +0800
committeryjun2021-02-13 14:37:51 +0800
commit70e6ae9f882c8521c394a0b0e43316eb1fd0e4d1 (patch)
tree0867530efb61acf04e22b33d9c0b744a05141a58
downloadaur-70e6ae9f882c8521c394a0b0e43316eb1fd0e4d1.tar.gz
initial commit
-rw-r--r--.SRCINFO32
-rw-r--r--PKGBUILD56
-rw-r--r--avifile-remove.patch36
-rw-r--r--onscripter-gbk-gcc-6.2.patch13
-rw-r--r--target-optimizing.patch22
5 files changed, 159 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..58b39265fc0
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,32 @@
+pkgbase = onscripter-gbk-git
+ pkgdesc = A GBK version of ONScripter, a game scripting engine
+ pkgver = 3.382ec29
+ pkgrel = 1
+ url = https://github.com/shouhuanxiaoji/ONScripter-GBK-Linux
+ arch = x86_64
+ arch = i686
+ arch = aarch64
+ arch = armv7h
+ license = GPL2
+ depends = bzip2
+ depends = sdl_image
+ depends = sdl_mixer
+ depends = sdl_ttf
+ depends = lua51
+ depends = fontconfig
+ depends = libjpeg-turbo
+ depends = libvorbis
+ depends = smpeg
+ provides = onscripter-gbk
+ conflicts = onscripter-gbk
+ source = onscripter-gbk-git::git+https://github.com/shouhuanxiaoji/ONScripter-GBK-Linux
+ source = onscripter-gbk-gcc-6.2.patch
+ source = avifile-remove.patch
+ source = target-optimizing.patch
+ md5sums = SKIP
+ md5sums = ffb513b2784747bea73591f48ee9737f
+ md5sums = 33749eb33188e06f8731213acc7cd70e
+ md5sums = 2b7556bac039f28b6d73f01a7df74956
+
+pkgname = onscripter-gbk-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..771fb416252
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,56 @@
+# Maintainer: yjun <jerrysteve1101 at gmail dot com>
+
+pkgname=onscripter-gbk-git
+_gitname=${pkgname%g-git}
+pkgver=3.382ec29
+pkgrel=1
+pkgdesc="A GBK version of ONScripter, a game scripting engine"
+arch=('x86_64' 'i686' 'aarch64' 'armv7h')
+url="https://github.com/shouhuanxiaoji/ONScripter-GBK-Linux"
+license=('GPL2')
+depends=('bzip2'
+ 'sdl_image'
+ 'sdl_mixer'
+ 'sdl_ttf'
+ 'lua51'
+ 'fontconfig'
+ 'libjpeg-turbo'
+ 'libvorbis'
+ 'smpeg')
+provides=("onscripter-gbk")
+conflicts=("onscripter-gbk")
+source=("${_gitname}::git+${url}"
+ "onscripter-gbk-gcc-6.2.patch"
+ "avifile-remove.patch"
+ "target-optimizing.patch")
+md5sums=('SKIP'
+ 'ffb513b2784747bea73591f48ee9737f'
+ '33749eb33188e06f8731213acc7cd70e'
+ '2b7556bac039f28b6d73f01a7df74956')
+
+pkgver() {
+ cd "$_gitname"
+
+ echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
+}
+
+prepare() {
+ cd "$_gitname"
+
+ patch -p1 < ${srcdir}/onscripter-gbk-gcc-6.2.patch
+ patch -p1 < ${srcdir}/avifile-remove.patch
+ patch -p1 < ${srcdir}/target-optimizing.patch
+}
+
+build() {
+ cd "$_gitname"
+
+ make -f Makefile.Linux
+}
+
+package() {
+ install -Dm755 ${_gitname}/onscripter $pkgdir/usr/bin/onscripter-gbk
+}
+
+# vim: set sw=2 ts=2 et:
+
diff --git a/avifile-remove.patch b/avifile-remove.patch
new file mode 100644
index 00000000000..3d65803371a
--- /dev/null
+++ b/avifile-remove.patch
@@ -0,0 +1,36 @@
+--- onscripter-jh/Makefile.Linux 2021-02-12 13:14:09.938453749 +0800
++++ onscripter-jh.new/Makefile.Linux 2021-02-12 13:16:52.760381455 +0800
+@@ -9,11 +9,12 @@
+ .SUFFIXES:
+ .SUFFIXES: $(OBJSUFFIX) .cpp .h
+
++TARGET = onscripter$(EXESUFFIX)
+ TARGET = onscripter$(EXESUFFIX) \
+- sardec$(EXESUFFIX) \
+- nsadec$(EXESUFFIX) \
+- sarconv$(EXESUFFIX) \
+- nsaconv$(EXESUFFIX)
++# sardec$(EXESUFFIX) \
++# nsadec$(EXESUFFIX) \
++# sarconv$(EXESUFFIX) \
++# nsaconv$(EXESUFFIX)
+ EXT_OBJS =
+
+ # mandatory: SDL, SDL_ttf, SDL_image, SDL_mixer, bzip2, libjpeg
+@@ -42,11 +43,11 @@
+ 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
diff --git a/onscripter-gbk-gcc-6.2.patch b/onscripter-gbk-gcc-6.2.patch
new file mode 100644
index 00000000000..23f2df364cd
--- /dev/null
+++ b/onscripter-gbk-gcc-6.2.patch
@@ -0,0 +1,13 @@
+diff --git a/ScriptHandler.cpp b/ScriptHandler.cpp
+index 534e256..97fae49 100644
+--- a/ScriptHandler.cpp
++++ b/ScriptHandler.cpp
+@@ -1003,7 +1003,7 @@ int ScriptHandler::readScript( char *path )
+
+ int ScriptHandler::readScriptSub( FILE *fp, char **buf, int encrypt_mode )
+ {
+- char magic[5] = {0x79, 0x57, 0x0d, 0x80, 0x04 };
++ unsigned char magic[5] = {0x79, 0x57, 0x0d, 0x80, 0x04 };
+ int magic_counter = 0;
+ bool newline_flag = true;
+ bool cr_flag = false;
diff --git a/target-optimizing.patch b/target-optimizing.patch
new file mode 100644
index 00000000000..6649c5b06a0
--- /dev/null
+++ b/target-optimizing.patch
@@ -0,0 +1,22 @@
+--- onscripter-jh/Makefile.Linux 2021-02-12 13:19:35.333287357 +0800
++++ onscripter-jh.new/Makefile.Linux 2021-02-12 13:18:28.066124344 +0800
+@@ -55,6 +55,19 @@
+ LIBS += -llua5.1
+ EXT_OBJS += LUAHandler$(OBJSUFFIX)
+
++# optional: SIMD optimizing
++DEFS += -DUSE_SIMD -DUSE_SIMD_X86_SSE2
++ARCH = $(shell uname -m)
++DEFS += -DUSE_SIMD
++ifneq ($(filter i686 x86_64,$(ARCH)),)
++DEFS += -DUSE_SIMD_X86_SSE2
++else
++ifneq ($(filter armv7h armv7l,$(ARCH)),)
++DEFS += -DUSE_SIMD_ARM_NEON
++EXT_FLAGS += -mfpu=neon
++endif
++endif
++
+ # optional: force screen width for PDA
+ #DEFS += -DPDA_WIDTH=640
+