Skip to content

Commit

Permalink
games/glob2: reinstate from attic
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxBrazhnikov committed Nov 16, 2023
1 parent edb746e commit 5eb3ea6
Show file tree
Hide file tree
Showing 6 changed files with 1,854 additions and 1 deletion.
1 change: 0 additions & 1 deletion MOVED
Expand Up @@ -5443,7 +5443,6 @@ devel/mongo-cxx-driver||2021-01-02|Has expired: Uses Python 2.7 version of scons
emulators/gem5||2021-01-02|Has expired: Uses Python 2.7 version of scons, and Python 2.7 which is EOLed upstream
emulators/nonpareil||2021-01-02|Has expired: Uses Python 2.7 version of scons, and Python 2.7 which is EOLed upstream
games/freera||2021-01-02|Has expired: Uses Python 2.7 version of scons, and Python 2.7 which is EOLed upstream
games/glob2||2021-01-02|Has expired: Uses Python 2.7 version of scons, and Python 2.7 which is EOLed upstream
games/marsnomercy||2021-01-02|Has expired: Uses Python 2.7 version of scons, and Python 2.7 which is EOLed upstream
games/netpanzer||2021-01-02|Has expired: Uses Python 2.7 version of scons, and Python 2.7 which is EOLed upstream
graphics/sk1libs||2021-01-02|Has expired: Uses Python 2.7 which is EOLed upstream
Expand Down
1 change: 1 addition & 0 deletions games/Makefile
Expand Up @@ -327,6 +327,7 @@
SUBDIR += glest-data
SUBDIR += glightoff
SUBDIR += glmaze
SUBDIR += glob2
SUBDIR += glsfcave
SUBDIR += gltron
SUBDIR += gmastermind
Expand Down
80 changes: 80 additions & 0 deletions games/glob2/Makefile
@@ -0,0 +1,80 @@
# Created by: thierry@pompo.net
# $FreeBSD$

PORTNAME= glob2
PORTVERSION= 0.9.4.4
PORTREVISION= 29
CATEGORIES= games
MASTER_SITES= SAVANNAH/${PORTNAME}/${PORTVERSION:R}/

MAINTAINER= ports@FreeBSD.org
COMMENT= Globulation 2, free and innovative strategy game

LICENSE= GPLv3+
LICENSE_FILE= ${WRKSRC}/COPYING

LIB_DEPENDS= libvorbis.so:audio/libvorbis \
libspeex.so:audio/speex \
libfribidi.so:converters/fribidi \
libboost_thread.so:devel/boost-libs \
libfreetype.so:print/freetype2

OPTIONS_DEFINE= DOCS PORTAUDIO

USES= compiler:c++11-lang gl gnome pkgconfig scons:python2 sdl
USE_SDL= image net sdl ttf
USE_GL= gl glu
MAKE_ARGS= CCFLAGS="${CFLAGS}" \
LINKFLAGS="${LDFLAGS}" \
BINDIR="${STAGEDIR}${PREFIX}/bin" \
INSTALLDIR="${STAGEDIR}${PREFIX}/share" \
DATADIR="${DATADIR}"
INSTALLS_ICONS= yes

CFLAGS+= -I${LOCALBASE}/include -Wno-return-type
LDFLAGS+= -lpthread -L${LOCALBASE}/lib

PORTDOCS= README
SUB_FILES= pkg-message

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MPORTAUDIO}
LIB_DEPENDS+= libportaudio.so:audio/portaudio
MAKE_ARGS+= --portaudio=true
.else
MAKE_ARGS+= --portaudio=false
.endif

pre-configure:
${REINPLACE_CMD} -e \
's|"-g"|""|' \
${WRKSRC}/SConstruct
${REINPLACE_CMD} -e \
'/^Icon/s|=.*|=${PORTNAME}|' \
${WRKSRC}/data/${PORTNAME}.desktop
${REINPLACE_CMD} -e \
'/(PACKAGE_SOURCE_DIR)/s|^|//|' \
${WRKSRC}/libgag/src/FileManager.cpp

manual-regression-test:
# Don't enable these tests on pointyhat, they take too long.
.if defined(MAINTAINER_MODE)
(cd ${WRKSRC}/src && ./glob2 -test-games)
.else
(cd ${WRKSRC}/src && ./glob2 -test-games-nox)
.endif

post-install:
.for s in 16 24 32 48 64 128
${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}x${s}/apps
(cd ${WRKSRC}/data/icons && ${INSTALL_DATA} glob2-icon-${s}x${s}.png \
${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}x${s}/apps/${PORTNAME}.png)
.endfor
${RLN} ${STAGEDIR}${PREFIX}/share/icons/hicolor/48x48/apps/${PORTNAME}.png \
${STAGEDIR}${PREFIX}/share/pixmaps
${MKDIR} ${STAGEDIR}${DOCSDIR}
(cd ${WRKSRC} && ${INSTALL_DATA} README ${STAGEDIR}${DOCSDIR})
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/glob2

.include <bsd.port.mk>
15 changes: 15 additions & 0 deletions games/glob2/files/patch-src__ConfigFiles.h
@@ -0,0 +1,15 @@
--- ./src/ConfigFiles.h.orig 2009-06-14 12:11:34.000000000 +0200
+++ ./src/ConfigFiles.h 2013-10-28 01:26:26.000000000 +0100
@@ -178,7 +178,11 @@
else
{
std::cerr << "ConfigVector::get(" << static_cast<unsigned int>(id) << ") : warning : id is not valid, returning default" << std::endl;
- assert(false);
+ // FreeBSD: patch impoted from glob2's CVS
+ // assert(false);
+ // I commented the assert because it crashed glob2
+ // sometimes, when a building was repaired.
+ // This has to be really fixed!
return &defaultEntry;
}
}
12 changes: 12 additions & 0 deletions games/glob2/pkg-descr
@@ -0,0 +1,12 @@
Globulation 2 is an innovative high quality Real-Time Strategy [RTS],
which minimizes micro-management by automatically assigning tasks to
the units. The player has to choose the number of units he wants for
the different tasks, and the units will do their best to satisfy the
requests. This allows to manage more units and to focus on the strategy.

It can be played alone, through your Local Area Network [LAN], or through
Internet thanks to Ysagoon Online Game [YOG], a meta-server. It also
features a scripting language for versatile gameplay or tutorials and an
integrated map editor.

WWW: http://globulation2.org/

0 comments on commit 5eb3ea6

Please sign in to comment.