aboutsummaryrefslogtreecommitdiff
path: root/games/8kingdoms
diff options
context:
space:
mode:
authorJose Alonso Cardenas Marquez <acm@FreeBSD.org>2007-10-07 14:30:07 +0000
committerJose Alonso Cardenas Marquez <acm@FreeBSD.org>2007-10-07 14:30:07 +0000
commitd238e0e6afd4e4c79d99ce4ef6f8f29cb10a5160 (patch)
treec44fc446ff5c98a860ae08108409b9a5a1a5b0b1 /games/8kingdoms
parent9dfb6158ff1573d9fdf5b5ede21ff3aeb5157e24 (diff)
downloadports-d238e0e6afd4e4c79d99ce4ef6f8f29cb10a5160.tar.gz
ports-d238e0e6afd4e4c79d99ce4ef6f8f29cb10a5160.zip
Notes
Diffstat (limited to 'games/8kingdoms')
-rw-r--r--games/8kingdoms/Makefile79
-rw-r--r--games/8kingdoms/distinfo3
-rw-r--r--games/8kingdoms/files/patch-net_server.cpp11
-rw-r--r--games/8kingdoms/files/pkg-message.in17
-rw-r--r--games/8kingdoms/pkg-descr11
5 files changed, 121 insertions, 0 deletions
diff --git a/games/8kingdoms/Makefile b/games/8kingdoms/Makefile
new file mode 100644
index 000000000000..fddcfb943066
--- /dev/null
+++ b/games/8kingdoms/Makefile
@@ -0,0 +1,79 @@
+# New ports collection makefile for: 8kingdoms
+# Date created: 2007-10-06
+# Whom: Jose Alonso Cardenas Marquez <acm@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= 8kingdoms
+PORTVERSION= 1.1.0
+CATEGORIES= games
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
+MASTER_SITE_SUBDIR=kralovstvi
+DISTNAME= ${PORTNAME:S/k/K/}-${PORTVERSION}
+
+MAINTAINER= acm@FreeBSD.org
+COMMENT= 3D turn-based fantasy strategic game
+
+LIB_DEPENDS= expat.6:${PORTSDIR}/textproc/expat2
+
+USE_GMAKE= yes
+USE_GL= yes
+USE_SDL= sdl mixer
+USE_TCL= yes
+GNU_CONFIGURE= yes
+
+CPPFLAGS+= -I${LOCALBASE}/include
+LDFLAGS+= -L${LOCALBASE}/lib ${PTHREAD_LIBS}
+CONFIGURE_ARGS+= --datadir=${DATADIR}
+CONFIGURE_TARGET= --build=${ARCH}-portbld-freebsd${OSREL}
+CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
+
+PLIST= ${WRKDIR}/pkg-plist
+SUB_FILES= pkg-message
+
+post-extract:
+ @${RM} -R ${WRKSRC}/doc/doxygen
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|-ltcl8.4|-ltcl${TCL_VER:S/.//}|g' \
+ ${WRKSRC}/${CONFIGURE_SCRIPT}
+ @${REINPLACE_CMD} -e 1928d ${WRKSRC}/${CONFIGURE_SCRIPT}
+ @${REINPLACE_CMD} -e 16d ${WRKSRC}/common/da.h
+ @${REINPLACE_CMD} -e 's|<tcl.h>|<tcl${TCL_VER}/tcl.h>|g' \
+ ${WRKSRC}/common/TCL/tcl_script.h
+
+pre-install:
+ @${RM} -f ${PLIST}
+ @${ECHO_CMD} "bin/${PORTNAME}" >> ${PLIST}
+ @cd ${WRKSRC}/res && \
+ ${FIND} * -type f | ${SORT} | ${SED} -e 's|^|%%DATADIR%%/res/|' >> ${PLIST} && \
+ ${FIND} * -type d | ${SORT} -r | ${SED} -e 's|^|@dirrm %%DATADIR%%/res/|' >> ${PLIST}
+ @${ECHO_CMD} "@dirrm %%DATADIR%%/res" >> ${PLIST}
+ @${ECHO_CMD} "@dirrm %%DATADIR%%" >> ${PLIST}
+
+.if !defined(NOPORTDOCS)
+ @cd ${WRKSRC}/doc && \
+ ${FIND} * -type f | ${SORT} | ${SED} -e 's|^|%%PORTDOCS%%%%DOCSDIR%%/|' >> ${PLIST} && \
+ ${FIND} * -type d | ${SORT} -r | ${SED} -e 's|^|%%PORTDOCS%%@dirrm %%DOCSDIR%%/|' >> ${PLIST}
+ @${ECHO_CMD} "%%PORTDOCS%%@dirrm %%DOCSDIR%%" >> ${PLIST}
+.endif
+
+do-install:
+ @${MKDIR} ${DATADIR}/res
+ @cd ${WRKSRC}/res && \
+ ${FIND} * -type d -exec ${MKDIR} "${DATADIR}/res/{}" \; && \
+ ${FIND} * -type f -exec ${INSTALL_DATA} "{}" "${DATADIR}/res/{}" \;
+ ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME:S/k/K/} ${PREFIX}/bin/${PORTNAME}
+
+.if !defined(NOPORTDOCS)
+ @${MKDIR} ${DOCSDIR}
+ @cd ${WRKSRC}/doc && \
+ ${FIND} * -type d -exec ${MKDIR} "${DOCSDIR}/{}" \; && \
+ ${FIND} * -type f -exec ${INSTALL_DATA} "{}" "${DOCSDIR}/{}" \;
+.endif
+
+post-install:
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.mk>
diff --git a/games/8kingdoms/distinfo b/games/8kingdoms/distinfo
new file mode 100644
index 000000000000..f93f2aa311b8
--- /dev/null
+++ b/games/8kingdoms/distinfo
@@ -0,0 +1,3 @@
+MD5 (8Kingdoms-1.1.0.tar.gz) = 8409daf3d44e294dcfb50b85e87a3fa1
+SHA256 (8Kingdoms-1.1.0.tar.gz) = e43dee471d727a99cea2a2312da5ce4b86fc3053445641df580c436ec0389885
+SIZE (8Kingdoms-1.1.0.tar.gz) = 22003565
diff --git a/games/8kingdoms/files/patch-net_server.cpp b/games/8kingdoms/files/patch-net_server.cpp
new file mode 100644
index 000000000000..e305e7b80824
--- /dev/null
+++ b/games/8kingdoms/files/patch-net_server.cpp
@@ -0,0 +1,11 @@
+--- net/server.cpp 2007-10-07 03:21:11.000000000 -0500
++++ net/server.cpp 2007-10-07 03:21:57.000000000 -0500
+@@ -415,7 +415,7 @@
+ #ifdef WIN32
+ int sin_size = sizeof(struct sockaddr_in); // Windows chteji do accept int
+ #else
+- size_t sin_size = sizeof(struct sockaddr_in);
++ socklen_t sin_size = sizeof(struct sockaddr_in);
+ #endif
+
+ int s;
diff --git a/games/8kingdoms/files/pkg-message.in b/games/8kingdoms/files/pkg-message.in
new file mode 100644
index 000000000000..017da989c8a5
--- /dev/null
+++ b/games/8kingdoms/files/pkg-message.in
@@ -0,0 +1,17 @@
+###############################################################################
+
+The 8Kingdoms game was installed
+
+1) Run the game using:
+
+ # 8kingdoms
+
+2) The config and log files are stored into the ~/.8Kingdoms directory
+
+3) You can see more information about this game at:
+
+ %%DOCSDIR%%
+
+4) Enjoy it ;)
+
+###############################################################################
diff --git a/games/8kingdoms/pkg-descr b/games/8kingdoms/pkg-descr
new file mode 100644
index 000000000000..b57118d734ec
--- /dev/null
+++ b/games/8kingdoms/pkg-descr
@@ -0,0 +1,11 @@
+Theme of the game 8 Kingdoms is inspirated by the world of fantasy. Players
+play on a fully 3D hex map. They construct buildings, recruit units including
+infantry, mounted units, mages, catapults and finally they attack enemy or
+help allies. Units gain experiences during the battle, each unit can get some
+abilities upgraded to be stronger.
+
+Data are stored in XML and freely accessible from language versions to units
+attributes, moreover map editor with random map generator is included for
+comfortable map editing.
+
+WWW: http://kralovstvi.sourceforge.net/