aboutsummaryrefslogtreecommitdiff
path: root/games/rlvm
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2018-09-03 00:21:45 +0000
committerJan Beich <jbeich@FreeBSD.org>2018-09-03 00:21:45 +0000
commit5e498e96a22616ea2a9f3d8e373ab54369533d03 (patch)
tree6daef9ed5efb7ede0efd26c8e8dbcdfa9d747933 /games/rlvm
parenta688a5c0b174985f37c860cf1afe2865412afe53 (diff)
downloadports-5e498e96a22616ea2a9f3d8e373ab54369533d03.tar.gz
ports-5e498e96a22616ea2a9f3d8e373ab54369533d03.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)
Notes
Notes: svn path=/head/; revision=478837
Diffstat (limited to 'games/rlvm')
-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
10 files changed, 277 insertions, 0 deletions
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