aboutsummaryrefslogtreecommitdiff
path: root/games/ags
diff options
context:
space:
mode:
authorTobias Kortkamp <tobik@FreeBSD.org>2017-02-22 11:34:06 +0000
committerTobias Kortkamp <tobik@FreeBSD.org>2017-02-22 11:34:06 +0000
commit7613e8cfd9919cdf6576ac39c9de5133e909f234 (patch)
tree54612ceb60e5e4a85464a3cc1cb82aca327717b5 /games/ags
parent4d1183dc5b42d0b19dab7685f3a20287c0da3c34 (diff)
downloadports-7613e8cfd9919cdf6576ac39c9de5133e909f234.tar.gz
ports-7613e8cfd9919cdf6576ac39c9de5133e909f234.zip
Notes
Diffstat (limited to 'games/ags')
-rw-r--r--games/ags/Makefile45
-rw-r--r--games/ags/distinfo3
-rw-r--r--games/ags/files/patch-Engine_Makefile-defs.linux27
-rw-r--r--games/ags/files/patch-Engine_ac_dynobj_cc__dynamicarray.cpp11
-rw-r--r--games/ags/pkg-descr12
5 files changed, 98 insertions, 0 deletions
diff --git a/games/ags/Makefile b/games/ags/Makefile
new file mode 100644
index 000000000000..9d811a3fd91a
--- /dev/null
+++ b/games/ags/Makefile
@@ -0,0 +1,45 @@
+# $FreeBSD$
+
+PORTNAME= ags
+PORTVERSION= 3.4.1.1
+DISTVERSIONPREFIX= v.
+CATEGORIES= games
+
+MAINTAINER= tobik@FreeBSD.org
+COMMENT= Adventure Game Studio Engine
+
+LICENSE= ART20
+LICENSE_FILE= ${WRKSRC}/License.txt
+
+BUILD_DEPENDS= ${LOCALBASE}/lib/libaldmb.a:audio/dumb-allegro
+LIB_DEPENDS= liballeg.so:devel/allegro \
+ libogg.so:audio/libogg \
+ libtheora.so:multimedia/libtheora \
+ libvorbis.so:audio/libvorbis \
+ libfreetype.so:print/freetype2
+
+USE_GITHUB= yes
+GH_ACCOUNT= adventuregamestudio
+
+USES= gmake localbase pkgconfig tar:xz
+USE_XORG= x11
+
+BUILD_WRKSRC= ${WRKSRC}/Engine
+
+MAKE_ARGS= V=1
+
+PLIST_FILES= bin/ags
+
+post-patch:
+ @${REINPLACE_CMD} 's|<endian.h>|<sys/endian.h>|' \
+ ${WRKSRC}/Common/core/endianness.h
+ @${REINPLACE_CMD} 's|HWND editor_window_handle = NULL;|HWND editor_window_handle = 0;|g' \
+ ${WRKSRC}/Engine/debug/debug.cpp
+ @${REINPLACE_CMD} -e 's|return cd_player|return 0; // cd_player|g' \
+ -e 's|cd_exit|//cd_exit|g' \
+ ${WRKSRC}/Engine/platform/linux/acpllnx.cpp
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/Engine/ags ${STAGEDIR}${PREFIX}/bin
+
+.include <bsd.port.mk>
diff --git a/games/ags/distinfo b/games/ags/distinfo
new file mode 100644
index 000000000000..ba513dd741a6
--- /dev/null
+++ b/games/ags/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1487636863
+SHA256 (adventuregamestudio-ags-v.3.4.1.1_GH0.tar.gz) = cf0cd4d71ab65f18b89b8b241e44656c4322342f802939c47f0d8242fd467b9f
+SIZE (adventuregamestudio-ags-v.3.4.1.1_GH0.tar.gz) = 20145931
diff --git a/games/ags/files/patch-Engine_Makefile-defs.linux b/games/ags/files/patch-Engine_Makefile-defs.linux
new file mode 100644
index 000000000000..325d9f0a29b4
--- /dev/null
+++ b/games/ags/files/patch-Engine_Makefile-defs.linux
@@ -0,0 +1,27 @@
+--- Engine/Makefile-defs.linux.orig 2017-02-07 22:37:22 UTC
++++ Engine/Makefile-defs.linux
+@@ -1,7 +1,7 @@
+ INCDIR = ../Engine ../Common ../Common/libinclude ../Plugins
+ LIBDIR =
+-CFLAGS := -O2 -g -fsigned-char -Wfatal-errors -DNDEBUG -DAGS_RUNTIME_PATCH_ALLEGRO -DAGS_HAS_CD_AUDIO -DAGS_CASE_SENSITIVE_FILESYSTEM -DALLEGRO_STATICLINK -DLINUX_VERSION -DDISABLE_MPEG_AUDIO -DBUILTIN_PLUGINS -DRTLD_NEXT $(shell pkg-config --cflags freetype2) $(CFLAGS)
+-CXXFLAGS := -fno-rtti -Wno-write-strings $(CXXFLAGS)
++CFLAGS += -fsigned-char -Wfatal-errors -DNDEBUG -DAGS_RUNTIME_PATCH_ALLEGRO -DAGS_CASE_SENSITIVE_FILESYSTEM -DALLEGRO_STATICLINK -DLINUX_VERSION -DDISABLE_MPEG_AUDIO -DBUILTIN_PLUGINS -DRTLD_NEXT $(shell pkg-config --cflags freetype2)
++CXXFLAGS += -std=c++11 -fno-rtti -Wno-write-strings
+ LIBS := -rdynamic -laldmb -ldumb -Wl,-Bdynamic
+ LIBS += $(shell pkg-config --libs allegro)
+ LIBS += $(shell pkg-config --libs x11)
+@@ -16,7 +16,7 @@ else
+ endif
+ LIBS += $(shell pkg-config --libs vorbisfile)
+ LIBS += $(shell pkg-config --libs freetype2)
+-LIBS += -ldl -lpthread -lc -lm -lstdc++
++LIBS += -lpthread -lc -lm -lstdc++
+
+ ifeq ($(ALLEGRO_MAGIC_DRV), 1)
+ CFLAGS += -DALLEGRO_MAGIC_DRV
+@@ -44,4 +44,4 @@ platform/linux/acpllnx.cpp \
+ platform/util/pe.c \
+ platform/util/libc.c
+
+-CDA = libsrc/libcda-0.5/linux.c
++# CDA = libsrc/libcda-0.5/linux.c
diff --git a/games/ags/files/patch-Engine_ac_dynobj_cc__dynamicarray.cpp b/games/ags/files/patch-Engine_ac_dynobj_cc__dynamicarray.cpp
new file mode 100644
index 000000000000..857b1ba5291d
--- /dev/null
+++ b/games/ags/files/patch-Engine_ac_dynobj_cc__dynamicarray.cpp
@@ -0,0 +1,11 @@
+--- Engine/ac/dynobj/cc_dynamicarray.cpp.orig 2017-02-21 00:32:02 UTC
++++ Engine/ac/dynobj/cc_dynamicarray.cpp
+@@ -32,7 +32,7 @@ int CCDynamicArray::Dispose(const char *
+ elementCount[0] &= ~ARRAY_MANAGED_TYPE_FLAG;
+ for (int i = 0; i < elementCount[0]; i++)
+ {
+- if (elementCount[2 + i] != NULL)
++ if (elementCount[2 + i] != 0)
+ {
+ ccReleaseObjectReference(elementCount[2 + i]);
+ }
diff --git a/games/ags/pkg-descr b/games/ags/pkg-descr
new file mode 100644
index 000000000000..1fe5a2b8c653
--- /dev/null
+++ b/games/ags/pkg-descr
@@ -0,0 +1,12 @@
+Adventure Game Studio (AGS) is an open source development tool that is
+primarily used to create graphic adventure games like e.g.
+
+- Primordia
+- King's Quest I: Quest for the Crown Enhanced Edition
+- King's Quest II: Romancing the Stones
+- King's Quest III Redux: To Heir is Human
+
+This port provides the runtime only and can be used for running games
+created with AGS.
+
+WWW: http://www.adventuregamestudio.co.uk/