aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authorjbeich <jbeich@FreeBSD.org>2018-09-03 08:21:45 +0800
committerjbeich <jbeich@FreeBSD.org>2018-09-03 08:21:45 +0800
commitd914776e868a7b61ca348fd438c232f70ed5e703 (patch)
tree6daef9ed5efb7ede0efd26c8e8dbcdfa9d747933 /games
parent3bab5e7817a0f299ed87bf548ed962843b96e5fc (diff)
downloadfreebsd-ports-gnome-d914776e868a7b61ca348fd438c232f70ed5e703.tar.gz
freebsd-ports-gnome-d914776e868a7b61ca348fd438c232f70ed5e703.tar.zst
freebsd-ports-gnome-d914776e868a7b61ca348fd438c232f70ed5e703.zip
Reorganize some my ports for better discoverability
devel/onscripter{,-1byte} -> games/onscripter{,-1byte} devel/ponscripter-sekai -> games/ponscripter-sekai devel/renpy{,6} -> games/renpy{,6} devel/rlvm -> games/rlvm dns/openmdns -> net/openmdns (where Bonjour and Avahi are)
Diffstat (limited to 'games')
-rw-r--r--games/Makefile6
-rw-r--r--games/katawa-shoujo/Makefile2
-rw-r--r--games/narcissu2/Makefile2
-rw-r--r--games/onscripter-1byte/Makefile19
-rw-r--r--games/onscripter-1byte/pkg-descr6
-rw-r--r--games/onscripter/Makefile60
-rw-r--r--games/onscripter/distinfo3
-rw-r--r--games/onscripter/files/patch-Makefile.Linux48
-rw-r--r--games/onscripter/pkg-descr6
-rw-r--r--games/ponscripter-sekai/Makefile88
-rw-r--r--games/ponscripter-sekai/distinfo3
-rw-r--r--games/ponscripter-sekai/files/patch-doc_ponscr-ext.7.xml105
-rw-r--r--games/ponscripter-sekai/pkg-descr13
-rw-r--r--games/renpy/Makefile114
-rw-r--r--games/renpy/distinfo3
-rw-r--r--games/renpy/files/patch-issue86911
-rw-r--r--games/renpy/pkg-descr7
-rw-r--r--games/renpy6/Makefile28
-rw-r--r--games/renpy6/distinfo3
-rw-r--r--games/renpy6/files/patch-module_ffdecode.c112
-rw-r--r--games/renpy6/files/patch-renpy_display_render.pyx13
-rw-r--r--games/renpy6/files/patch-renpy_gl_gltexture.pyx45
-rw-r--r--games/rlvm/Makefile101
-rw-r--r--games/rlvm/distinfo3
-rw-r--r--games/rlvm/files/extra-patch-disable-nls22
-rw-r--r--games/rlvm/files/extra-patch-disable-test27
-rw-r--r--games/rlvm/files/patch-SConscript.luarlvm20
-rw-r--r--games/rlvm/files/patch-SConstruct46
-rw-r--r--games/rlvm/files/patch-system-test-deps24
-rw-r--r--games/rlvm/files/patch-test_medium__object__promotion.cc19
-rw-r--r--games/rlvm/pkg-descr5
-rw-r--r--games/rlvm/pkg-plist10
32 files changed, 972 insertions, 2 deletions
diff --git a/games/Makefile b/games/Makefile
index b3b4611f7be6..7a299002e26f 100644
--- a/games/Makefile
+++ b/games/Makefile
@@ -722,6 +722,8 @@
SUBDIR += oneisenough
SUBDIR += oneko
SUBDIR += oneko-sakura
+ SUBDIR += onscripter
+ SUBDIR += onscripter-1byte
SUBDIR += oolite
SUBDIR += oonsoo
SUBDIR += open-adventure
@@ -815,6 +817,7 @@
SUBDIR += pokerth
SUBDIR += polyglot
SUBDIR += pongix
+ SUBDIR += ponscripter-sekai
SUBDIR += popstar
SUBDIR += pouetchess
SUBDIR += powder
@@ -899,12 +902,15 @@
SUBDIR += redeclipse-data
SUBDIR += redorblack
SUBDIR += reminiscence
+ SUBDIR += renpy
+ SUBDIR += renpy6
SUBDIR += rescue
SUBDIR += residualvm
SUBDIR += retroarch
SUBDIR += rezerwar
SUBDIR += rfksay
SUBDIR += ri-li
+ SUBDIR += rlvm
SUBDIR += rnd_jue
SUBDIR += robocode
SUBDIR += robocode-naval
diff --git a/games/katawa-shoujo/Makefile b/games/katawa-shoujo/Makefile
index b69ff3f2e778..cbf2b7860c52 100644
--- a/games/katawa-shoujo/Makefile
+++ b/games/katawa-shoujo/Makefile
@@ -19,7 +19,7 @@ COMMENT= Bishoujo-style visual novel about disabled adolescents
LICENSE= CC-BY-NC-ND-3.0
-RUN_DEPENDS= renpy6<6.99.11:devel/renpy6
+RUN_DEPENDS= renpy6<6.99.11:games/renpy6
USES= tar:bz2
NO_ARCH= yes
diff --git a/games/narcissu2/Makefile b/games/narcissu2/Makefile
index 9b5a2dd5aef7..654d730be47c 100644
--- a/games/narcissu2/Makefile
+++ b/games/narcissu2/Makefile
@@ -22,7 +22,7 @@ LICENSE_TEXT= Permission has been granted to anyone to redistribute \
game data are not modified.
LICENSE_PERMS= dist-mirror pkg-mirror auto-accept
-RUN_DEPENDS= ponscr:devel/ponscripter-sekai
+RUN_DEPENDS= ponscr:games/ponscripter-sekai
NO_ARCH= yes
NO_BUILD= yes
diff --git a/games/onscripter-1byte/Makefile b/games/onscripter-1byte/Makefile
new file mode 100644
index 000000000000..27325a4b1204
--- /dev/null
+++ b/games/onscripter-1byte/Makefile
@@ -0,0 +1,19 @@
+# $FreeBSD$
+
+PKGNAMESUFFIX= -1byte
+
+COMMENT= ONScripter with ${ENGLISH_DESC:tl} support
+
+PLIST_FILES= bin/${PKGBASE}
+
+OPTIONS_SLAVE= ENGLISH
+OPTIONS_EXCLUDE=DOCS
+
+MASTERDIR= ${.CURDIR}/../onscripter
+DESCR= ${.CURDIR}/pkg-descr
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} \
+ ${STAGEDIR}${PREFIX}/bin/${PKGBASE}
+
+.include "${MASTERDIR}/Makefile"
diff --git a/games/onscripter-1byte/pkg-descr b/games/onscripter-1byte/pkg-descr
new file mode 100644
index 000000000000..b78a8fdb0fd4
--- /dev/null
+++ b/games/onscripter-1byte/pkg-descr
@@ -0,0 +1,6 @@
+Open source clone of NScripter, a game engine used to create and
+perform visual novels.
+
+This package provides 1-byte version which is able to run English games.
+
+WWW: https://onscripter.osdn.jp/onscripter.html
diff --git a/games/onscripter/Makefile b/games/onscripter/Makefile
new file mode 100644
index 000000000000..e62a6ecf4316
--- /dev/null
+++ b/games/onscripter/Makefile
@@ -0,0 +1,60 @@
+# $FreeBSD$
+
+PORTNAME= onscripter
+PORTVERSION= 20180409
+CATEGORIES= games
+MASTER_SITES= http://onscripter.osdn.jp/
+
+MAINTAINER= jbeich@FreeBSD.org
+COMMENT?= Visual novel engine compatible with NScripter
+
+LICENSE= GPLv2+
+
+LIB_DEPENDS= libsmpeg.so:multimedia/smpeg \
+ libfontconfig.so:x11-fonts/fontconfig
+RUN_DEPENDS= sdl_ttf>=2.0.11_6:graphics/sdl_ttf
+
+USES= gmake jpeg
+USE_SDL= image mixer ttf
+MAKEFILE= Makefile.Linux
+ALL_TARGET= ALL
+MAKE_ARGS= RM="${RM}"
+LDFLAGS+= -Wl,--as-needed # limit jpeg to bin/*conv
+PORTDOCS= *
+PLIST_FILES?= bin/nsaconv \
+ bin/nsadec \
+ bin/onscripter \
+ bin/sarconv \
+ bin/sardec
+
+OPTIONS_DEFINE= DOCS ENGLISH LUA PDA UTF8
+OPTIONS_DEFAULT=LUA UTF8
+OPTIONS_EXCLUDE?=ENGLISH
+
+ENGLISH_DESC= Single-byte character mode
+ENGLISH_CFLAGS?=-DENABLE_1BYTE_CHAR -DFORCE_1BYTE_CHAR
+LUA_USES= lua
+PDA_DESC= Fit window size to screen on small PDA devices
+PDA_CFLAGS?= -DPDA_AUTOSIZE
+UTF8_CFLAGS?= -DUTF8_CAPTION -DUTF8_FILESYSTEM
+
+post-patch:
+ @${REINPLACE_CMD} -e 's/$$(LIBS)/$$(LDFLAGS) &/' \
+ ${WRKSRC}/Makefile.onscripter
+
+post-patch-LUA-off:
+ @${REINPLACE_CMD} '/optional: lua/,/^$$/d' ${WRKSRC}/${MAKEFILE}
+
+.if !target(do-install)
+do-install:
+.for f in ${PLIST_FILES:T}
+ ${INSTALL_PROGRAM} ${WRKSRC}/${f} ${STAGEDIR}${PREFIX}/bin
+.endfor
+
+post-install-DOCS-on:
+ (cd ${WRKSRC}/www && ${COPYTREE_SHARE} \
+ . ${STAGEDIR}${DOCSDIR} \
+ "! -name *.orig ! -name *.bak")
+.endif # do-install
+
+.include <bsd.port.mk>
diff --git a/games/onscripter/distinfo b/games/onscripter/distinfo
new file mode 100644
index 000000000000..92039f95d04e
--- /dev/null
+++ b/games/onscripter/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1523240521
+SHA256 (onscripter-20180409.tar.gz) = 8ee9eb388a3fd5b1877ea5fc93803265f6f0ef566c461c4d9742ab7da86d2e6f
+SIZE (onscripter-20180409.tar.gz) = 245838
diff --git a/games/onscripter/files/patch-Makefile.Linux b/games/onscripter/files/patch-Makefile.Linux
new file mode 100644
index 000000000000..f4d17708f5c9
--- /dev/null
+++ b/games/onscripter/files/patch-Makefile.Linux
@@ -0,0 +1,48 @@
+--- Makefile.Linux~
++++ Makefile.Linux
+@@ -30,28 +30,13 @@ LIBS += `smpeg-config --libs`
+ DEFS += -DUSE_FONTCONFIG
+ LIBS += -lfontconfig
+
+-# recommended: OggVorbis
+-DEFS += -DUSE_OGG_VORBIS
+-LIBS += -logg -lvorbis -lvorbisfile
+-
+-# optional: Integer OggVorbis
+-#DEFS += -DUSE_OGG_VORBIS -DINTEGER_OGG_VORBIS
+-#LIBS += -lvorbisidec
+-
+ # optional: support CD audio
+ DEFS += -DUSE_CDROM
+
+-# optional: avifile
+-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$(LUA_INCDIR)
++LIBS += -llua-$(LUA_VER)
+ EXT_OBJS += LUAHandler$(OBJSUFFIX)
+
+ # optional: force screen width for PDA
+@@ -62,11 +47,10 @@ EXT_OBJS += LUAHandler$(OBJSUFFIX)
+
+
+ # for GNU g++
+-CC = g++
+-LD = g++ -o
++CC = $(CXX)
++LD = $(CXX) -o
+
+-#CFLAGS = -g -Wall -pipe -c $(INCS) $(DEFS)
+-CFLAGS = -O3 -Wall -fomit-frame-pointer -pipe -c $(INCS) $(DEFS)
++CFLAGS += -Wall -c $(INCS) $(DEFS)
+
+ # for GCC on PowerPC specfied
+ #CC = powerpc-unknown-linux-gnu-g++
diff --git a/games/onscripter/pkg-descr b/games/onscripter/pkg-descr
new file mode 100644
index 000000000000..e48fa24e973e
--- /dev/null
+++ b/games/onscripter/pkg-descr
@@ -0,0 +1,6 @@
+Open source clone of NScripter, a game engine used to create and
+perform visual novels.
+
+This package provides the version to run Japanese games.
+
+WWW: https://onscripter.osdn.jp/onscripter.html
diff --git a/games/ponscripter-sekai/Makefile b/games/ponscripter-sekai/Makefile
new file mode 100644
index 000000000000..bc9cd70e307f
--- /dev/null
+++ b/games/ponscripter-sekai/Makefile
@@ -0,0 +1,88 @@
+# $FreeBSD$
+
+PORTNAME= ponscripter-sekai
+PORTVERSION= 0.0.6
+DISTVERSIONPREFIX= v
+PORTREVISION= 5
+CATEGORIES= games
+
+MAINTAINER= jbeich@FreeBSD.org
+COMMENT= NScripter-like novel-game interpreter with Unicode support
+
+LICENSE= GPLv2+
+
+LIB_DEPENDS= libsmpeg2.so:multimedia/smpeg2 \
+ libfreetype.so:print/freetype2
+
+CONFLICTS= ponscripter-[0-9]* # doesn't exist yet
+
+USE_GITHUB= yes
+GH_ACCOUNT= sekaiproject
+GH_PROJECT= ${PORTNAME:S/sekai/fork/}
+
+USES= compiler:c++11-lang gmake shebangfix
+USE_SDL= image2 mixer2
+EXTRACT_AFTER_ARGS=--exclude src/extlib
+SHEBANG_FILES= util/xml-template
+HAS_CONFIGURE= yes
+# XXX Pretend clang is like lang/gcc and can USE_CPU_GFX
+CONFIGURE_ENV= CC_VER="4.8" CC="${CC} ${CFLAGS}" CXX="${CXX} ${CXXFLAGS}" \
+ CPATH="${LOCALBASE}/include" LIBRARY_PATH="${LOCALBASE}/lib"
+CONFIGURE_ARGS= --prefix="${STAGEDIR}${PREFIX}" --unsupported-compiler
+LDFLAGS+= -Wl,--as-needed
+PORTDOCS= BUGS CHANGES MANUAL README TODO
+PLIST_FILES= bin/ponscr \
+ share/emacs/site-lisp/ponscripter-mode.el
+
+OPTIONS_DEFINE= DOCS MANPAGES TREMOR
+OPTIONS_DEFAULT=MANPAGES ${MACHINE_CPU:Msoftfp:C/.+/TREMOR/}
+
+MANPAGES_BUILD_DEPENDS= xmlto:textproc/xmlto
+MANPAGES_PLIST_FILES=\
+ man/man6/ponscr.6.gz \
+ man/man7/ponscr-ext.7.gz \
+ man/man7/ponscr-syntax.7.gz \
+ man/man7/ponscripter.7.gz
+
+TREMOR_LIB_DEPENDS= libvorbisidec.so:audio/libtremor
+TREMOR_CFLAGS= -DINTEGER_OGG_VORBIS
+TREMOR_LIB_DEPENDS_OFF= libvorbisfile.so:audio/libvorbis
+
+post-patch:
+ @${REINPLACE_CMD} -e '/^ifdef DEBUG/,/^$$/d' \
+ -e 's/$$STRIPFLAG/${STRIP}/' \
+ ${WRKSRC}/configure
+ @${REINPLACE_CMD} -e 's/$$(LIBS)/$$(LDFLAGS) &/' \
+ ${WRKSRC}/src/Makefile.ponscripter
+
+post-patch-MANPAGES-off:
+ @${REINPLACE_CMD} -i .manpages.bak \
+ -e '/install-man/d' \
+ -e 's/xmlto/${FALSE}/' \
+ ${WRKSRC}/configure
+
+post-patch-TREMOR-on:
+ @${REINPLACE_CMD} -i .tremor.bak \
+ -e 's/"libogg, libvorbis"/libvorbisidec/' \
+ -e 's,vorbis/vorbisfile,tremor/ivorbisfile,' \
+ -e 's,vorbis/codec,tremor/ivorbiscodec,' \
+ -e '/genlink/ { s/vorbisfile/vorbisidec/; \
+ /ogg/d; /vorbis$$/d; }' \
+ -e 's/ $$LINKogg//; s/ $$LINKvorbis//' \
+ -e 's/LINKvorbisfile/LINKvorbisidec/' \
+ ${WRKSRC}/configure
+
+post-build-MANPAGES-on:
+ # Remove extraneous whitespace to unbreak manpage syntax
+ ${REINPLACE_CMD} -e 's/^[[:space:]]*//; /^$$/d' \
+ ${WRKSRC}/doc/*.[0-9]
+
+post-install:
+ ${INSTALL_DATA} ${WRKSRC}/misc/ponscripter-mode.el \
+ ${STAGEDIR}${PREFIX}/share/emacs/site-lisp
+
+post-install-DOCS-on:
+ (cd ${WRKSRC} && ${COPYTREE_SHARE} \
+ "${PORTDOCS}" ${STAGEDIR}${DOCSDIR})
+
+.include <bsd.port.mk>
diff --git a/games/ponscripter-sekai/distinfo b/games/ponscripter-sekai/distinfo
new file mode 100644
index 000000000000..c20b0b3fd80a
--- /dev/null
+++ b/games/ponscripter-sekai/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1395987047
+SHA256 (sekaiproject-ponscripter-fork-v0.0.6_GH0.tar.gz) = 888a417808fd48f8f55da42c113b04d61396a1237b2b0fed2458e804b8ddf426
+SIZE (sekaiproject-ponscripter-fork-v0.0.6_GH0.tar.gz) = 30562500
diff --git a/games/ponscripter-sekai/files/patch-doc_ponscr-ext.7.xml b/games/ponscripter-sekai/files/patch-doc_ponscr-ext.7.xml
new file mode 100644
index 000000000000..98cd2070372a
--- /dev/null
+++ b/games/ponscripter-sekai/files/patch-doc_ponscr-ext.7.xml
@@ -0,0 +1,105 @@
+--- doc/ponscr-ext.7.xml~
++++ doc/ponscr-ext.7.xml
+@@ -282,47 +282,61 @@ xmlns:xl="http://www.w3.org/1999/xlink">
+ <varlistentry>
+ <term><literal>punctuation</literal></term>
+ <listitem>
+- <simpara>
+-
+-defines the following shortcuts:
+-.IP "" 2
+-.BR ... \ \->
+-ellipsis
+-.br
+-.BR \-\-
+-\-> en dash
+-.br
+-.BR \-\-\-
+-\-> em dash
+-.br
+-.BR (c)
+-\-> copyright symbol
+-.br
+-.BR (r)
+-\-> registered trademark symbol
+-.br
+-.BR (tm)
+-\-> trademark symbol
+-.br
+-.BR ++
+-\-> dagger
+-.br
+-.BR +++
+-\-> double dagger
+-.br
+-.BR **
+-\-> bullet
+-.br
+-.BR %_
+-\-> non-breaking space
+-.br
+-.BR %\-
+-\-> non-breaking hyphen
+-.br
+-.BR %\. \ \->
+-thin space
+-
+- </simpara>
++ <simpara>Defines the following shortcuts:</simpara>
++ <informaltable frame='none'>
++ <tgroup cols='2'>
++ <tbody>
++ <row>
++ <entry><emphasis role="bold">...</emphasis></entry>
++ <entry>ellipsis</entry>
++ </row>
++ <row>
++ <entry><emphasis role="bold">--</emphasis></entry>
++ <entry>en dash</entry>
++ </row>
++ <row>
++ <entry><emphasis role="bold">---</emphasis></entry>
++ <entry>em dash</entry>
++ </row>
++ <row>
++ <entry><emphasis role="bold">(c)</emphasis></entry>
++ <entry>copyright symbol</entry>
++ </row>
++ <row>
++ <entry><emphasis role="bold">(r)</emphasis></entry>
++ <entry>registered trademark symbol</entry>
++ </row>
++ <row>
++ <entry><emphasis role="bold">(tm)</emphasis></entry>
++ <entry>trademark symbol</entry>
++ </row>
++ <row>
++ <entry><emphasis role="bold">++</emphasis></entry>
++ <entry>dagger</entry>
++ </row>
++ <row>
++ <entry><emphasis role="bold">+++</emphasis></entry>
++ <entry>double dagger</entry>
++ </row>
++ <row>
++ <entry><emphasis role="bold">**</emphasis></entry>
++ <entry>bullet</entry>
++ </row>
++ <row>
++ <entry><emphasis role="bold">%_</emphasis></entry>
++ <entry>non-breaking space</entry>
++ </row>
++ <row>
++ <entry><emphasis role="bold">%-</emphasis></entry>
++ <entry>non-breaking hyphen</entry>
++ </row>
++ <row>
++ <entry><emphasis role="bold">%.</emphasis></entry>
++ <entry>thin space</entry>
++ </row>
++ </tbody>
++ </tgroup>
++ </informaltable>
+ </listitem>
+ </varlistentry>
+ </variablelist>
diff --git a/games/ponscripter-sekai/pkg-descr b/games/ponscripter-sekai/pkg-descr
new file mode 100644
index 000000000000..f28bd9eebf98
--- /dev/null
+++ b/games/ponscripter-sekai/pkg-descr
@@ -0,0 +1,13 @@
+Ponscripter is an interpreter for visual-novel-type games, derived from
+the NScripter design but modified significantly to improve support for
+Western languages (at the cost of diminished support for Japanese).
+
+Ponscripter is a fork of ONScripter-En that drops any attempt to remain
+in synch with the upstream source code, and instead concentrates on
+providing the best possible support for Western languages. It is no
+longer fully NScripter-compatible, but remains an easy target to port
+NScripter games to when localising them.
+
+This fork takes advantage of SDL2 and improves Steam integration.
+
+WWW: https://github.com/sekaiproject/ponscripter-fork
diff --git a/games/renpy/Makefile b/games/renpy/Makefile
new file mode 100644
index 000000000000..fb4adefd07b6
--- /dev/null
+++ b/games/renpy/Makefile
@@ -0,0 +1,114 @@
+# $FreeBSD$
+
+PORTNAME= renpy
+PORTVERSION?= 7.0.0
+DISTVERSIONSUFFIX=-sdk
+PORTREVISION?= 0
+CATEGORIES= games devel
+MASTER_SITES= https://www.renpy.org/dl/${PORTVERSION}/
+
+MAINTAINER= jbeich@FreeBSD.org
+COMMENT= Framework for developing visual-novel type games
+
+LICENSE= APACHE20 BSD3CLAUSE DejaVu LGPL21+ MIT OFL11 ZLIB
+LICENSE_COMB= multi
+LICENSE_NAME_DejaVu= Bitstream Vera and Arev fonts license
+LICENSE_FILE_DejaVu= ${WRKSRC}/renpy/common/DejaVuSans.txt
+LICENSE_PERMS_DejaVu= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
+
+BUILD_DEPENDS?= ${PYTHON_PKGNAMEPREFIX}game_sdl2>0:devel/py-game_sdl2@${PY_FLAVOR}
+LIB_DEPENDS= libfribidi.so:converters/fribidi \
+ libpng.so:graphics/png \
+ libavcodec.so:multimedia/ffmpeg \
+ libfreetype.so:print/freetype2
+RUN_DEPENDS?= ${PYTHON_PKGNAMEPREFIX}game_sdl2>=${PORTVERSION}:devel/py-game_sdl2@${PY_FLAVOR}
+
+CONFLICTS_INSTALL?= ${PORTNAME}6-*
+
+# Upstream tends to reroll distfiles before moving under /release/
+PORTSCOUT?= site:http://www.renpy.org/dl/release/
+
+USES= python:2.7 shebangfix tar:bz2
+USE_GL= glew
+USE_PYTHON= autoplist distutils cython
+USE_SDL?= sdl2
+EXCLUDE= gen 'module/*.py[co]' 'renpy/*.py[co]'
+EXTRACT_AFTER_ARGS=${EXCLUDE:S,^,--exclude ,}
+SHEBANG_FILES= renpy.py launcher/game/tkaskdir.py
+TARGET_ORDER_OVERRIDE=610:fix-shebang
+BUILD_WRKSRC= ${WRKSRC}/module
+INSTALL_WRKSRC= ${BUILD_WRKSRC}
+MAKE_ENV+= RENPY_DEPS_INSTALL="${LOCALBASE}" \
+ RENPY_CYTHON=cython-${PYTHON_VER}
+PORTDATA?= gui
+PORTDATA+= launcher renpy renpy.py
+PORTDOCS= *
+PLIST_FILES= bin/${PORTNAME}
+
+DESKTOP_ENTRIES="Ren'Py" \
+ "" \
+ "${DATADIR}/launcher/game/images/logo32.png" \
+ "${PORTNAME} %f" \
+ "Development;Game;AdventureGame;" \
+ ""
+
+OPTIONS_DEFAULT=TKINTER DIST
+OPTIONS_DEFINE= DOCS DIST EXAMPLES TKINTER
+
+DIST_DESC= Distribution runtimes for Windows, OS X, Linux
+DIST_VARS= LICENSE+="ART20 PSFL" \
+ PORTDATA+="lib renpy.app renpy.exe renpy.sh"
+EXAMPLES_VARS= PORTDATA+="the_question tutorial"
+TKINTER_DESC= Install Tkinter to allow choosing Projects Directory
+TKINTER_RUN_DEPENDS=${PYTHON_PKGNAMEPREFIX}tkinter>0:x11-toolkits/py-tkinter@${PY_FLAVOR}
+
+. for lic in FREETYPE LIBJPEG LIBPNG MSVCR90
+DIST_VARS+= LICENSE+=${lic}
+LICENSE_NAME_${lic}= ${lic} license
+LICENSE_FILE_${lic}= ${WRKSRC}/LICENSE.txt
+LICENSE_PERMS_${lic}= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
+. endfor
+
+post-extract:
+ @${FIND} ${WRKSRC}/lib ${WRKSRC}/renpy.app -type d -empty -delete
+
+.if !target(post-patch)
+post-patch:
+ @${REINPLACE_CMD} -e 's,/usr/bin/python,${PYTHON_CMD},' \
+ ${WRKSRC}/launcher/game/choose_directory.rpy
+.endif
+
+post-patch: common-post-patch
+common-post-patch:
+# Avoid having to add -I/usr/include -L/usr/lib
+ @${REINPLACE_CMD} '/library("z")/d' ${BUILD_WRKSRC}/${PYSETUP}
+
+post-build:
+ @${PYTHON_CMD} -m compileall -d ${DATADIR} ${WRKSRC}
+ @${PYTHON_CMD} -O -m compileall -d ${DATADIR} ${WRKSRC}
+
+add-plist-post: add-empty-dirs
+add-empty-dirs:
+# Keep images directory in gui and templates, see renpy@d81ea29
+ ${FIND} ${WRKSRC} -type d -empty \
+ ! \( -name "saves" -or -name "pysdlsound" \) | \
+ ${SED} 's,^${WRKSRC},@dir ${DATADIR},' >>${TMPPLIST}
+
+post-install: common-post-install
+common-post-install:
+ ${FIND} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} -name \*.so \
+ -exec ${STRIP_CMD} {} +
+ ${LN} -fs ../${DATADIR_REL}/renpy.py \
+ ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
+ (cd ${WRKSRC} && ${COPYTREE_SHARE} \
+ "${PORTDATA}" ${STAGEDIR}${DATADIR} \
+ "! -name *.orig ! -name *.bak \
+ ! -name saves ! -name log.txt")
+ ${CHMOD} +x ${STAGEDIR}${DATADIR}/renpy.py
+
+post-install-DOCS-on:
+ (cd ${WRKSRC}/doc && ${COPYTREE_SHARE} \
+ . ${STAGEDIR}${DOCSDIR} \
+ "! -name *.orig ! -name *.bak")
+
+.include <bsd.port.mk>
diff --git a/games/renpy/distinfo b/games/renpy/distinfo
new file mode 100644
index 000000000000..348e2a709d4c
--- /dev/null
+++ b/games/renpy/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1527821217
+SHA256 (renpy-7.0.0-sdk.tar.bz2) = 548561684b4e800c5aa349f9fae0371789c462dc3ede4ffd60ef45d3df1cc384
+SIZE (renpy-7.0.0-sdk.tar.bz2) = 92106485
diff --git a/games/renpy/files/patch-issue869 b/games/renpy/files/patch-issue869
new file mode 100644
index 000000000000..4a4d0c4b7c53
--- /dev/null
+++ b/games/renpy/files/patch-issue869
@@ -0,0 +1,11 @@
+Restore shebang before ecd36ec.
+
+--- renpy.py.orig 2016-01-27 03:31:10 UTC
++++ renpy.py
+@@ -1,4 +1,5 @@
+-#!/usr/bin/env python #@PydevCodeAnalysisIgnore
++#!/usr/bin/env python
++#@PydevCodeAnalysisIgnore
+
+ # This file is part of Ren'Py. The license below applies to Ren'Py only.
+ # Games and other projects that use Ren'Py may use a different license.
diff --git a/games/renpy/pkg-descr b/games/renpy/pkg-descr
new file mode 100644
index 000000000000..b1b1d3525a90
--- /dev/null
+++ b/games/renpy/pkg-descr
@@ -0,0 +1,7 @@
+Ren'Py is a visual novel engine that helps you use words, images, and
+sounds to tell stories with the computer. These can be both visual
+novels and life simulation games. The easy to learn script language
+allows you to efficiently write large visual novels, while its Python
+scripting is enough for complex simulation games.
+
+WWW: https://www.renpy.org/
diff --git a/games/renpy6/Makefile b/games/renpy6/Makefile
new file mode 100644
index 000000000000..3a5b1c9c3f95
--- /dev/null
+++ b/games/renpy6/Makefile
@@ -0,0 +1,28 @@
+# $FreeBSD$
+
+PORTVERSION= 6.18.3
+PORTREVISION= 7
+PKGNAMESUFFIX= 6
+
+CONFLICTS_INSTALL= ${PORTNAME}-[0-9]*
+
+MASTERDIR= ${.CURDIR}/../renpy
+PATCHDIR= ${.CURDIR}/files
+DISTINFO_FILE= ${.CURDIR}/distinfo
+
+PORTSCOUT= limit:^6\.18\.*
+
+BUILD_DEPENDS= ${PYGAME}
+RUN_DEPENDS= ${PYGAME}
+
+USE_SDL= sdl
+PORTDATA= templates
+
+post-patch:
+ @${REINPLACE_CMD} -e 's,/usr/bin/python,${PYTHON_CMD},' \
+ ${WRKSRC}/launcher/game/project.rpy
+
+post-install:
+ ${CHMOD} -R u+w ${STAGEDIR}${DATADIR}/templates
+
+.include "${MASTERDIR}/Makefile"
diff --git a/games/renpy6/distinfo b/games/renpy6/distinfo
new file mode 100644
index 000000000000..cd60be8989e0
--- /dev/null
+++ b/games/renpy6/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1473191823
+SHA256 (renpy-6.18.3-sdk.tar.bz2) = 0b2a45c510b60b07b414592e42590ae5e46f480b08380a257b08c21ca88b7f91
+SIZE (renpy-6.18.3-sdk.tar.bz2) = 46125089
diff --git a/games/renpy6/files/patch-module_ffdecode.c b/games/renpy6/files/patch-module_ffdecode.c
new file mode 100644
index 000000000000..814aefb5a19f
--- /dev/null
+++ b/games/renpy6/files/patch-module_ffdecode.c
@@ -0,0 +1,112 @@
+https://github.com/renpy/renpy/commit/2be0638
+https://github.com/renpy/renpy/commit/4aac7ca
+
+--- module/ffdecode.c.orig 2014-07-06 14:22:40 UTC
++++ module/ffdecode.c
+@@ -23,6 +23,7 @@
+ #include <math.h>
+ #include <limits.h>
+ #include <libavutil/avstring.h>
++#include <libavutil/time.h>
+ #include <libavformat/avformat.h>
+ #include <libavcodec/avcodec.h>
+ #include <libswscale/swscale.h>
+@@ -101,8 +102,8 @@ typedef struct VideoState {
+ compensation */
+
+ #ifndef HAS_RESAMPLE
+- uint8_t audio_buf1[(AVCODEC_MAX_AUDIO_FRAME_SIZE * 3) / 2] __attribute__ ((aligned (16))) ;
+- uint8_t audio_buf2[(AVCODEC_MAX_AUDIO_FRAME_SIZE * 3) / 2] __attribute__ ((aligned (16))) ;
++ uint8_t audio_buf1[(192000 * 3) / 2] __attribute__ ((aligned (16))) ;
++ uint8_t audio_buf2[(192000 * 3) / 2] __attribute__ ((aligned (16))) ;
+ #else
+ uint8_t *audio_buf1;
+ #endif
+@@ -573,7 +574,7 @@ static int video_refresh(void *opaque)
+ video_display(is);
+ }
+
+- av_free(vp->frame);
++ av_frame_free(&vp->frame);
+ vp->frame = NULL;
+
+ is->first_frame = 0;
+@@ -627,13 +628,13 @@ static void alloc_picture(void *opaque,
+
+ pixel = SDL_MapRGBA(surf->format, 1, 2, 3, 4);
+ if (bytes[0] == 4 && bytes[1] == 1) {
+- vp->fmt = PIX_FMT_ARGB;
++ vp->fmt = AV_PIX_FMT_ARGB;
+ } else if (bytes[0] == 4 && bytes[1] == 3) {
+- vp->fmt = PIX_FMT_ABGR;
++ vp->fmt = AV_PIX_FMT_ABGR;
+ } else if (bytes[0] == 1) {
+- vp->fmt = PIX_FMT_RGBA;
++ vp->fmt = AV_PIX_FMT_RGBA;
+ } else {
+- vp->fmt = PIX_FMT_BGRA;
++ vp->fmt = AV_PIX_FMT_BGRA;
+ }
+
+ pixel = SDL_MapRGBA(surf->format, 0, 0, 0, 255);
+@@ -756,7 +757,7 @@ static int video_thread(void *arg)
+ double pts;
+
+ for(;;) {
+- frame = avcodec_alloc_frame();
++ frame = av_frame_alloc();
+
+ while (is->paused && !is->videoq.abort_request) {
+ SDL_Delay(2);
+@@ -816,10 +817,10 @@ static int audio_decode_frame(VideoState
+ int resample_changed, audio_resample;
+
+ if (!is->frame) {
+- if (!(is->frame = avcodec_alloc_frame()))
++ if (!(is->frame = av_frame_alloc()))
+ return AVERROR(ENOMEM);
+ } else
+- avcodec_get_frame_defaults(is->frame);
++ av_frame_unref(is->frame);
+
+ if (flush_complete)
+ break;
+@@ -836,7 +837,7 @@ static int audio_decode_frame(VideoState *is, double *
+
+ if (!got_frame) {
+ /* stop sending empty packets if the decoder is finished */
+- if (!pkt_temp->data && dec->codec->capabilities & CODEC_CAP_DELAY)
++ if (!pkt_temp->data && dec->codec->capabilities & AV_CODEC_CAP_DELAY)
+ flush_complete = 1;
+ continue;
+ }
+@@ -1231,9 +1232,9 @@ static int stream_component_open(VideoSt
+ /* prepare audio output */
+ if (enc->codec_type == AVMEDIA_TYPE_AUDIO) {
+ if (enc->channels > 0) {
+- enc->request_channels = FFMIN(2, enc->channels);
++ enc->request_channel_layout = av_get_default_channel_layout(FFMIN(2, enc->channels));
+ } else {
+- enc->request_channels = 2;
++ enc->request_channel_layout = av_get_default_channel_layout(2);
+ }
+ }
+
+@@ -1242,7 +1243,7 @@ static int stream_component_open(VideoState *is, int s
+ enc->debug = debug;
+ enc->workaround_bugs = workaround_bugs;
+ enc->idct_algo= idct;
+- if(fast) enc->flags2 |= CODEC_FLAG2_FAST;
++ if(fast) enc->flags2 |= AV_CODEC_FLAG2_FAST;
+ enc->skip_frame= skip_frame;
+ enc->skip_idct= skip_idct;
+ enc->skip_loop_filter= skip_loop_filter;
+@@ -1633,7 +1634,7 @@ void ffpy_stream_close(VideoState *is)
+ for(i=0; i<VIDEO_PICTURE_QUEUE_SIZE; i++) {
+ vp = &is->pictq[i];
+ if (vp->frame) {
+- av_free(vp->frame);
++ av_frame_free(&vp->frame);
+ }
+ }
+
diff --git a/games/renpy6/files/patch-renpy_display_render.pyx b/games/renpy6/files/patch-renpy_display_render.pyx
new file mode 100644
index 000000000000..11dbe8757a77
--- /dev/null
+++ b/games/renpy6/files/patch-renpy_display_render.pyx
@@ -0,0 +1,13 @@
+https://github.com/renpy/renpy/commit/ba832e5e3d52
+
+--- renpy/display/render.pyx.orig 2014-10-03 01:16:12 UTC
++++ renpy/display/render.pyx
+@@ -448,7 +448,7 @@ PIXELLATE = 3
+
+ cdef class Render:
+
+- def __init__(Render self, float width, float height, draw_func=None, layer_name=None, bint opaque=None): #@DuplicatedSignature
++ def __init__(Render self, float width, float height, draw_func=None, layer_name=None, bint opaque=False): #@DuplicatedSignature
+ """
+ Creates a new render corresponding to the given widget with
+ the specified width and height.
diff --git a/games/renpy6/files/patch-renpy_gl_gltexture.pyx b/games/renpy6/files/patch-renpy_gl_gltexture.pyx
new file mode 100644
index 000000000000..cc767f8a6c19
--- /dev/null
+++ b/games/renpy6/files/patch-renpy_gl_gltexture.pyx
@@ -0,0 +1,45 @@
+https://github.com/renpy/renpy/commit/ecadc55616f3
+https://github.com/renpy/renpy/commit/e680702e87b8
+
+--- renpy/gl/gltexture.pyx.orig 2014-10-05 01:47:19 UTC
++++ renpy/gl/gltexture.pyx
+@@ -255,7 +255,7 @@ cdef class TextureCore:
+ # The number of the OpenGL texture this texture object
+ # represents.
+ self.generation = 0
+- self.number = -1
++ self.number = 0
+
+ # The format of this texture in the GPU (or 0 if not known).
+ self.format = 0
+@@ -447,7 +447,7 @@ cdef class TextureCore:
+
+ cdef unsigned int texnums[1]
+
+- if self.number != -1:
++ if self.number != 0:
+ return 0
+
+ glGenTextures(1, texnums)
+@@ -468,17 +468,19 @@ cdef class TextureCore:
+
+ global total_texture_size
+
+- if self.number == -1:
++ if self.number == 0:
+ return
+
+ cdef GLuint texnums[1]
+
+ texnums[0] = self.number
+ glDeleteTextures(1, texnums)
++ self.number = 0
+
+- texture_numbers.remove(self.number)
++ texture_numbers.discard(self.number)
+ total_texture_size -= self.width * self.height * 4
+
++
+ class Texture(TextureCore):
+ """
+ We need to be a real python class, not a C extension, to ensure that
diff --git a/games/rlvm/Makefile b/games/rlvm/Makefile
new file mode 100644
index 000000000000..c3e9c9d81f55
--- /dev/null
+++ b/games/rlvm/Makefile
@@ -0,0 +1,101 @@
+# $FreeBSD$
+
+PORTNAME= rlvm
+DISTVERSIONPREFIX= release-
+DISTVERSION= 0.14-67
+DISTVERSIONSUFFIX= -g9350209
+PORTREVISION= 15
+CATEGORIES= games
+
+MAINTAINER= jbeich@FreeBSD.org
+COMMENT= RealLive virtual machine clone
+
+LICENSE= GPLv2 GPLv3 MIT
+LICENSE_COMB= multi
+
+BROKEN_powerpc64= fails to link: gcn_platform.cc: undefined reference to gcn::Exception::Exception
+
+BUILD_DEPENDS= ${LOCALBASE}/include/utf8.h:devel/utf8cpp
+LIB_DEPENDS= libvorbisfile.so:audio/libvorbis \
+ libboost_serialization.so:devel/boost-libs \
+ libguichan.so:devel/guichan
+RUN_DEPENDS= ${LOCALBASE}/share/fonts/dejavu/DejaVuSans.ttf:x11-fonts/dejavu
+
+USE_GITHUB= yes
+GH_ACCOUNT= eglaysher
+
+USES= compiler:c++11-lib pkgconfig scons
+USE_GL= glew glu
+USE_GNOME= gtk20
+USE_SDL= image mixer ttf
+EXCLUDE= GLEW SDL_image SDL_mixer SDL_ttf gmock gtest guichan \
+ luabind utf8cpp # leaving only pygame, xclannad, *.cpp
+EXTRACT_AFTER_ARGS=${EXCLUDE:S,^,--exclude vendor/,}
+CFLAGS+= -D_GLIBCXX_USE_C99 # XXX ports/193528
+LDFLAGS+= -Wl,--as-needed # avoid overlinking (gtk deps)
+MAKE_ARGS= VERBOSE=1
+INSTALLS_ICONS= yes
+PORTDOCS= AUTHORS.TXT NEWS.TXT README.md STATUS.TXT notes
+
+OPTIONS_DEFINE= DEBUG DOCS NLS TEST
+OPTIONS_DEFAULT=MONA
+OPTIONS_MULTI= JAPANESE_FONT
+OPTIONS_MULTI_JAPANESE_FONT=KOCHI MONA SAZANAMI
+OPTIONS_SUB= yes
+
+JAPANESE_FONT_DESC=msgothic.ttc alternatives with verified metrics (unless --font)
+KOCHI_DESC= kochi-gothic-subst.ttf from japanese/font-kochi
+KOCHI_RUN_DEPENDS=${LOCALBASE}/share/fonts/TTF/kochi-gothic-subst.ttf:japanese/font-kochi
+MONA_DESC= mona.ttf from japanese/font-mona-ttf
+MONA_RUN_DEPENDS=${LOCALBASE}/share/fonts/TTF/mona.ttf:japanese/font-mona-ttf
+SAZANAMI_DESC= sazanami-gothic.ttf from japanese/font-sazanami
+SAZANAMI_RUN_DEPENDS=${LOCALBASE}/share/fonts/TTF/sazanami-gothic.ttf:japanese/font-sazanami
+
+DEBUG_MAKE_ARGS_OFF=--release
+NLS_USES= gettext
+NLS_EXTRA_PATCHES_OFF=${FILESDIR}/extra-patch-disable-nls
+TEST_USES= lua:51
+TEST_BUILD_DEPENDS=googletest>=1.7.0:devel/googletest \
+ googlemock>=1.7.0:devel/googlemock \
+ luabind>0:devel/luabind
+TEST_EXTRA_PATCHES_OFF=${FILESDIR}/extra-patch-disable-test
+
+post-patch:
+ @${GREP} -Flr 'utf8cpp/' ${WRKSRC} | ${XARGS} ${REINPLACE_CMD} \
+ -i .bak.utf8cpp -e 's,utf8cpp/,,'
+ @${REINPLACE_CMD} -e 's,/usr/share,${PREFIX}/share,' \
+ ${WRKSRC}/src/platforms/gtk/gtk_rlvm_instance.cc
+ @${REINPLACE_CMD} -e 's,/usr/share,${LOCALBASE}/share,' \
+ -e 's,truetype/ttf-dejavu,dejavu,' \
+ -e 's,truetype/[^/"]*/,TTF/,' \
+ ${WRKSRC}/src/utilities/find_font_file.cc
+
+do-test-TEST-on:
+ (cd ${WRKSRC} && build/${PORTNAME}_unittests)
+
+pre-install-TEST-on: do-test-TEST-on
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/build/${PORTNAME} \
+ ${STAGEDIR}${PREFIX}/bin
+ ${INSTALL_MAN} ${WRKSRC}/debian/${PORTNAME}.6 \
+ ${STAGEDIR}${MAN6PREFIX}/man/man6
+ ${INSTALL_DATA} ${WRKSRC}/src/platforms/gtk/${PORTNAME}.desktop \
+ ${STAGEDIR}${DESKTOPDIR}
+ @(cd ${WRKSRC}/resources && for f in */${PORTNAME}.png; do \
+ ${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/$${f%/*}x$${f%/*}/apps; \
+ ${INSTALL_DATA} -v $$f \
+ ${STAGEDIR}${PREFIX}/share/icons/hicolor/$${f%/*}x$${f%/*}/apps; \
+ done)
+
+post-install-NLS-on:
+ (cd ${WRKSRC}/build/locale && ${COPYTREE_SHARE} \
+ . ${STAGEDIR}${PREFIX}/share/locale)
+
+post-install-DOCS-on:
+ (cd ${WRKSRC} && ${COPYTREE_SHARE} \
+ "${PORTDOCS:Nnotes}" ${STAGEDIR}${DOCSDIR})
+ (cd ${WRKSRC}/doc && ${COPYTREE_SHARE} \
+ notes ${STAGEDIR}${DOCSDIR})
+
+.include <bsd.port.mk>
diff --git a/games/rlvm/distinfo b/games/rlvm/distinfo
new file mode 100644
index 000000000000..a47264ac056c
--- /dev/null
+++ b/games/rlvm/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1475126655
+SHA256 (eglaysher-rlvm-release-0.14-67-g9350209_GH0.tar.gz) = 70a48aeca8e9298c1c5d3e4c7c4d9abd49bfc96e1afad5f2141039feb304df50
+SIZE (eglaysher-rlvm-release-0.14-67-g9350209_GH0.tar.gz) = 1895634
diff --git a/games/rlvm/files/extra-patch-disable-nls b/games/rlvm/files/extra-patch-disable-nls
new file mode 100644
index 000000000000..ab14f72b7fc5
--- /dev/null
+++ b/games/rlvm/files/extra-patch-disable-nls
@@ -0,0 +1,22 @@
+--- SConstruct~
++++ SConstruct
+@@ -38,9 +38,6 @@ env = Environment(
+ CPPDEFINES = [
+ "HAVE_CONFIG_H",
+
+- # We use gettext for translations.
+- "ENABLE_NLS",
+-
+ # This prevents conflicts between SDL and GLEW. I shouldn't have to do
+ # this, but the SDL_opengl.h and glew.h differ in const correctness...
+ "NO_SDL_GLEXT"
+@@ -410,9 +407,3 @@ if GetOption("coverage"):
+ variant_dir="$BUILD_DIR/",
+ duplicate=0,
+ exports='env')
+-
+-# In addition to all that, we also want to build the translation files.
+-env.Command("build/locale/ja/LC_MESSAGES/rlvm.mo",
+- "po/ja.po",
+- ["mkdir -p build/locale/ja/LC_MESSAGES/",
+- "msgfmt -o build/locale/ja/LC_MESSAGES/rlvm.mo po/ja.po"])
diff --git a/games/rlvm/files/extra-patch-disable-test b/games/rlvm/files/extra-patch-disable-test
new file mode 100644
index 000000000000..74d356daffa2
--- /dev/null
+++ b/games/rlvm/files/extra-patch-disable-test
@@ -0,0 +1,27 @@
+--- SConstruct~
++++ SConstruct
+@@ -387,24 +387,6 @@ else:
+ duplicate=0,
+ exports='env')
+
+-# Copy the platform independent SEEN.TXT files to output (we no longer depend
+-# on rldev because I can no longer reliably compile it).
+-env.SConscript("test/SConscript.rlc",
+- variant_dir="build/test",
+- duplicate=0,
+- exports='env')
+-
+-# Build the rlvmTests binary that uses those SEEN.TXT files.
+-env.SConscript("SConscript.test",
+- variant_dir="$BUILD_DIR/",
+- duplicate=0,
+- exports='env')
+-
+-env.SConscript("SConscript.luarlvm",
+- variant_dir="$BUILD_DIR/",
+- duplicate=0,
+- exports='env')
+-
+ if GetOption("coverage"):
+ env.SConscript("SConscript.coverage",
+ variant_dir="$BUILD_DIR/",
diff --git a/games/rlvm/files/patch-SConscript.luarlvm b/games/rlvm/files/patch-SConscript.luarlvm
new file mode 100644
index 000000000000..a334353f1aaa
--- /dev/null
+++ b/games/rlvm/files/patch-SConscript.luarlvm
@@ -0,0 +1,20 @@
+--- SConscript.luarlvm~
++++ SConscript.luarlvm
+@@ -31,7 +31,7 @@ config = test_env.Configure()
+ # Building the luaRlvm test harness requires having lua installed; if we do
+ # have lua installed, go ahead and use it, but don't really worry if this fails
+ # since end users don't use this binary.
+-if config.CheckLibWithHeader('lua5.1', 'lua5.1/lua.h', 'cpp'):
++if config.CheckLibWithHeader('lua-5.1', 'lua51/lua.h', 'cpp'):
+ env['BUILD_LUA_TESTS'] = True
+ else:
+ print "Not building luaRlvm. (Don't worry, it's only a testing tool!)"
+@@ -50,7 +50,7 @@ script_machine_files = [
+ ]
+
+ if env['BUILD_LUA_TESTS'] == True:
+- test_env.Append(CPPPATH = [ "/usr/include/lua5.1" ] )
++ test_env.Append(CPPPATH = [ env['ENV']['LUA_INCDIR'] ] )
+
+ # Build our included copy of luabind.
+ test_env.BuildSubcomponent("luabind")
diff --git a/games/rlvm/files/patch-SConstruct b/games/rlvm/files/patch-SConstruct
new file mode 100644
index 000000000000..8f9335a153ec
--- /dev/null
+++ b/games/rlvm/files/patch-SConstruct
@@ -0,0 +1,46 @@
+--- SConstruct~
++++ SConstruct
+@@ -19,7 +19,12 @@ AddOption('--fullstatic', action='store_
+
+ # Set libraries used by all configurations and all binaries in rlvm.
+ env = Environment(
++ ENV=os.environ,
+ tools = ["default", "rlvm"],
++ **dict((k, v.split()) for k, v in ARGUMENTS.iteritems())
++)
++
++env.Append(
+
+ LIBS = ["z"],
+
+@@ -278,6 +275,7 @@ if not config.CheckGuichan():
+ # Get the configuration from sdl and freetype
+ env.ParseConfig("sdl-config --cflags")
+ env.ParseConfig("freetype-config --cflags --libs")
++config.CheckLibWithHeader('intl', 'libintl.h', "cpp")
+
+ env = config.Finish()
+
+@@ -314,7 +311,6 @@ if GetOption('release'):
+ # Now add release optimizations to the environment
+ env.Append(
+ CPPFLAGS = [
+- "-Os",
+ "-DNDEBUG",
+ "-DBOOST_DISABLE_ASSERTS"
+ ]
+@@ -360,13 +356,7 @@ elif GetOption('pprof'):
+ "profiler"]
+ )
+ else:
+- # Add debugging flags to all binaries here
+- env.Append(
+- CPPFLAGS = [
+- "-g",
+- "-O0"
+- ]
+- )
++ pass
+
+ # Cross platform core of rlvm. Produces librlvm.a and libsystem_sdl.a
+ env.SConscript("SConscript",
diff --git a/games/rlvm/files/patch-system-test-deps b/games/rlvm/files/patch-system-test-deps
new file mode 100644
index 000000000000..45aaf19abe13
--- /dev/null
+++ b/games/rlvm/files/patch-system-test-deps
@@ -0,0 +1,24 @@
+--- SConscript.luarlvm~
++++ SConscript.luarlvm
+@@ -52,8 +52,7 @@ script_machine_files = [
+ if env['BUILD_LUA_TESTS'] == True:
+ test_env.Append(CPPPATH = [ env['ENV']['LUA_INCDIR'] ] )
+
+- # Build our included copy of luabind.
+- test_env.BuildSubcomponent("luabind")
++ test_env.Append(LIBS = ["luabind"])
+
+ test_env.RlvmProgram("lua_rlvm", ['test/lua_rlvm.cc', script_machine_files],
+ use_lib_set = ["SDL", "LUA"],
+--- SConscript.test~
++++ SConscript.test
+@@ -23,8 +23,7 @@ test_env.Append(CPPPATH = ["#/test"])
+ # We need to build gtest/gmock always. Downstream distributors: if you comment
+ # this out and add a ParseConfig, make sure to do it here in |test_env| instead
+ # of one of the environments that could link gtest into the main rlvm binary.
+-test_env.BuildSubcomponent("gtest")
+-test_env.BuildSubcomponent("gmock")
++test_env.Append(LIBS = ["gtest", "gmock"])
+
+ test_case_files = [
+ "test/test_system/test_machine.cc",
diff --git a/games/rlvm/files/patch-test_medium__object__promotion.cc b/games/rlvm/files/patch-test_medium__object__promotion.cc
new file mode 100644
index 000000000000..e42a549f2d83
--- /dev/null
+++ b/games/rlvm/files/patch-test_medium__object__promotion.cc
@@ -0,0 +1,19 @@
+To workaround the following error
+
+ unknown file: Failure
+ C++ exception with description "ExpressionPiece::GetIntegerValue() invalid on object of type 2" thrown in the test body.
+ [ FAILED ] MediumObjectPoromotion/PromotionTest.BgLayerPromotion/49, where GetParam() = ("recMulti", 1, (3, "\"file\"$\xFF\0\0\0\0$\xFF\xFF\0\0\0"), true) (1 ms)
+
+--- test/medium_object_promotion.cc~
++++ test/medium_object_promotion.cc
+@@ -246,10 +246,6 @@ std::vector<PromotionData> data = {
+ 0,
+ TestMachine::Arg("file", 0),
+ SHOULD_PROMOTE_BG),
+- std::make_tuple("recMulti",
+- 1,
+- TestMachine::Arg("file", 0, 255),
+- SHOULD_PROMOTE_BG),
+ std::make_tuple("grpOpen",
+ 0,
+ TestMachine::Arg("file", 0),
diff --git a/games/rlvm/pkg-descr b/games/rlvm/pkg-descr
new file mode 100644
index 000000000000..5e435a8bd0a8
--- /dev/null
+++ b/games/rlvm/pkg-descr
@@ -0,0 +1,5 @@
+rlvm is a Free Software reimplementation of VisualArt's KK's RealLive
+interpreter, used in the games Kanon, Air, CLANNAD, Planetarian,
+Tomoyo After and Little Busters, among many others.
+
+WWW: http://www.rlvm.net/
diff --git a/games/rlvm/pkg-plist b/games/rlvm/pkg-plist
new file mode 100644
index 000000000000..fefcafa9bb54
--- /dev/null
+++ b/games/rlvm/pkg-plist
@@ -0,0 +1,10 @@
+bin/rlvm
+man/man6/rlvm.6.gz
+share/applications/rlvm.desktop
+share/icons/hicolor/128x128/apps/rlvm.png
+share/icons/hicolor/16x16/apps/rlvm.png
+share/icons/hicolor/24x24/apps/rlvm.png
+share/icons/hicolor/256x256/apps/rlvm.png
+share/icons/hicolor/32x32/apps/rlvm.png
+share/icons/hicolor/48x48/apps/rlvm.png
+%%NLS%%share/locale/ja/LC_MESSAGES/rlvm.mo