ports/154058: Create new megaglest port
Rusty Nejdl
rnejdl at ringofsaturn.com
Sun Jan 16 15:50:12 UTC 2011
>Number: 154058
>Category: ports
>Synopsis: Create new megaglest port
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Sun Jan 16 15:50:12 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Rusty Nejdl
>Release: FreeBSD 8.2-PRERELEASE amd64
>Organization:
>Environment:
System: FreeBSD tethys.ringofsaturn.com 8.2-PRERELEASE FreeBSD 8.2-PRERELEASE #4: Fri Dec 24 11:10:16 CST 2010 root at tethys.ringofsaturn.com:/usr/obj/usr/src/sys/SATURN amd64
>Description:
Create a new megaglest and megaglest-data port, similar to the glest* ports.
>How-To-Repeat:
Create a new megaglest and megaglest-data port, similar to the glest* ports.
>Fix:
--- megaglest.shar begins here ---
# This is a shell archive. Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file". Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
# megaglest
# megaglest/files
# megaglest/files/megaglest-wrapper.in
# megaglest/files/pkg-message.in
# megaglest/Makefile
# megaglest/distinfo
# megaglest/pkg-descr
# megaglest/pkg-plist
# megaglest-data
# megaglest-data/Makefile
# megaglest-data/distinfo
# megaglest-data/pkg-descr
# megaglest-data/LIST}
#
echo c - megaglest
mkdir -p megaglest > /dev/null 2>&1
echo c - megaglest/files
mkdir -p megaglest/files > /dev/null 2>&1
echo x - megaglest/files/megaglest-wrapper.in
sed 's/^X//' >megaglest/files/megaglest-wrapper.in << '308eb471367bb99278cd61356cd6c739'
X#!/bin/sh
X
X# The executable needs to be run from its data directory, and needs to store
X# configuration in it. We therefore mirror the data directory hierarchy in
X# ~/.glest, and create symlinks to the data files.
X
Xif [ -d ~/.glest ]
Xthen
X echo "Using existing ~/.glest directory."
Xelse
X echo "Creating ~/.glest directory."
X cd %%DATADIR%% || exit 1
X find * -type d -exec mkdir -p ~/.glest/{} \;
X find * -type f -exec ln -s %%DATADIR%%/{} ~/.glest/{} \; 2>/dev/null
X mkdir -p ~/.glest/screens
X mkdir -p ~/.glest/shaders/standard
X touch ~/.glest/glest.log
X rm ~/.glest/glest.ini ~/.glest/glest ~/.glest/servers.ini
X cp -f %%DATADIR%%/glest.ini ~/.glest/
X cp -f %%DATADIR%%/servers.ini ~/.glest/
X chmod 640 ~/.glest/glest.ini ~/.glest/servers.ini
Xfi
X
Xcd ~/.glest || exit 1
Xexec %%DATADIR%%/glest.bin "$@"
308eb471367bb99278cd61356cd6c739
echo x - megaglest/files/pkg-message.in
sed 's/^X//' >megaglest/files/pkg-message.in << '4bd19d518555d813587371be8ff8d703'
X###############################################################################
X
XThe megaglest game was installed
X
X1) You can see the megaglest configuration files into your ~/.glest directory
X
X2) If you choose install megaglest map editor, you can run it using :
X
X # glest_editor
X
X3) If you have problems to run megaglest, please you should remove your ~/glest
X directory and try again
X
X4) Enjoy it ;)
X
X###############################################################################
4bd19d518555d813587371be8ff8d703
echo x - megaglest/Makefile
sed 's/^X//' >megaglest/Makefile << '22a96243364cc23145ffe096a51871a8'
X# New ports collection makefile for: megaglest
X# Date created: 2011-01-09
X# Whom: Rusty Nejdl <rnejdl at ringofsaturn.com>
X#
X# $FreeBSD: ports/games/megaglest/Makefile,v 1.31 2010/12/04 07:31:44 ade Exp $
X#
X
XPORTNAME= megaglest
XPORTVERSION= 3.3.7.2
XCATEGORIES= games
XMASTER_SITES= SF/${PORTNAME}/current_release
XDISTNAME= ${PORTNAME}-source-${PORTVERSION}
XDIST_SUBDIR= ${PORTNAME}
XEXTRACT_SUFX= .tar.bz2
X
XMAINTAINER= rnejdl at ringofsaturn.com
XCOMMENT= Free 3d real-time customizable strategy game
X
XCONFLICTS= glest-*
XLIB_DEPENDS= xerces-c.27:${PORTSDIR}/textproc/xerces-c2 \
X vorbis.4:${PORTSDIR}/audio/libvorbis
XBUILD_DEPENDS= jam:${PORTSDIR}/devel/jam
XRUN_DEPENDS= ${DATADIR}/servers.ini:${PORTSDIR}/games/megaglest-data
X
XUSE_AUTOTOOLS= automake:env autoconf:env
XUSE_OPENAL= al alut
XUSE_DOS2UNIX= yes
XUSE_LUA= 5.1
XUSE_SDL= yes
XUSE_GL= yes
XGNU_CONFIGURE= yes
XCONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include ${PTHREAD_CFLAGS}" \
X LIBS="-L${LOCALBASE}/lib ${PTHREAD_LIBS}"
XCONFIGURE_ARGS= --with-libxerces=${LOCALBASE} \
X --with-libOpenAL=${LOCALBASE} \
X --with-libLibPng=${LOCALBASE} \
X --with-libLibJPEG=${LOCALBASE} \
X --with-libLibCurl=${LOCALBASE} \
X --with-libLibX11=${LOCALBASE} \
X --with-ogg-includes=${LOCALBASE} \
X --with-vorbis=${LOCALBASE} \
X --with-ogg=${LOCALBASE} \
X --with-ogg-libraries=${LOCALBASE}/lib \
X --with-ogg-includes=${LOCALBASE}/include \
X --with-wx-config=${LOCALBASE}/bin/wxgtk2u-2.8-config
X
XSUB_FILES= megaglest-wrapper pkg-message
X
XJAM_CMD= ${LOCALBASE}/bin/jam -qa
X
XOPTIONS= EDITOR "Build map editor" off
X
X.include <bsd.port.pre.mk>
X
X.if defined(WITH_EDITOR)
XUSE_WX= 2.6+
XWX_CONF_ARGS= relative
XWANT_UNICODE= yes
XPLIST_SUB+= EDITOR=""
XHAVE_EDITOR= true
X.else
XPLIST_SUB+= EDITOR="@comment "
X.endif
X
Xpre-extract:
X @${MKDIR} ${WRKDIR}/${DISTNAME}
X
Xpost-patch:
X @${FIND} -E ${WRKDIR} -type f -name '*.bak' -o -name '*.orig' | ${XARGS} ${RM}
X
Xdo-build:
X @cd ${WRKSRC} && ${JAM_CMD}
X
Xdo-install:
X.if !defined(NOPORTDOCS)
X @${MKDIR} ${DOCSDIR}
X ${INSTALL_DATA} ${WRKSRC}/code_license.txt ${DOCSDIR}/code_license.txt
X.endif
X @${MKDIR} ${DATADIR}
X ${INSTALL_PROGRAM} ${WRKSRC}/glest.bin ${DATADIR}
X ${INSTALL_DATA} ${WRKSRC}/glest.ini ${DATADIR}
X ${INSTALL_SCRIPT} ${WRKDIR}/megaglest-wrapper ${PREFIX}/bin/${PORTNAME}
X
X.if defined(HAVE_EDITOR)
X ${INSTALL_PROGRAM} ${WRKSRC}/glest_editor ${PREFIX}/bin/
X.endif
X
Xpost-install:
X @${CAT} ${PKGMESSAGE}
X
X.include <bsd.port.post.mk>
22a96243364cc23145ffe096a51871a8
echo x - megaglest/distinfo
sed 's/^X//' >megaglest/distinfo << '8d22f86bfa255e10c286691ee713f418'
XSHA256 (megaglest/megaglest-source-3.3.7.2.tar.bz2) = ab7339eda3928b37fceea8433f649046c476862c2fe4b3b98554bcabce2490fa
XSIZE (megaglest/megaglest-source-3.3.7.2.tar.bz2) = 728825
8d22f86bfa255e10c286691ee713f418
echo x - megaglest/pkg-descr
sed 's/^X//' >megaglest/pkg-descr << 'c7802852462edac5cdbbcd872b1ce15f'
XMegaGlest is an open source 3D-real-time strategy game, where you control the armies of one of six different factions: Tech, Magic, Egyptians, Indians, Norsemen or Persian. The game is setup in one of 14 naturally looking settings, which -like the unit models- are crafted with great appreciation for detail.
X
XMegaglest is a fork of the Glest code and brings many enhancements and new factions than were available.
X
XWWW: http://www.megaglest.org/
c7802852462edac5cdbbcd872b1ce15f
echo x - megaglest/pkg-plist
sed 's/^X//' >megaglest/pkg-plist << '085de6f891c513877aab8b9a0d6e2726'
Xbin/megaglest
X%%EDITOR%%bin/glest_editor
X%%DATADIR%%/glest.bin
X%%DATADIR%%/glest.ini
X%%PORTDOCS%%@dirrmtry %%DOCSDIR%%
X at dirrmtry %%DATADIR%%
085de6f891c513877aab8b9a0d6e2726
echo c - megaglest-data
mkdir -p megaglest-data > /dev/null 2>&1
echo x - megaglest-data/Makefile
sed 's/^X//' >megaglest-data/Makefile << 'c60268649f466fc6d6290d043c1c1de1'
X# New ports collection makefile for: megaglest-data
X# Date created: 2011-01-09
X# Whom: Rusty Nejdl <rnejdl at ringofsaturn.com>
X#
X# $FreeBSD: ports/games/megaglest-data/Makefile,v 1.0 2011/01/09 00:22:12 amdmi3 Exp $
X#
X
XPORTNAME= data
XPORTVERSION= 3.3.7.2
XCATEGORIES= games
XMASTER_SITES= SF/megaglest/current_release
XPKGNAMEPREFIX= megaglest-
XDISTNAME= ${PKGNAMEPREFIX}${PORTNAME}-${PORTVERSION}
XDIST_SUBDIR= megaglest
X
XMAINTAINER= rnejdl at ringofsaturn.com
XCOMMENT= MegaGlest data files
X
XCONFLICTS= glest-data-*
X
XLICENSE= GPLv2
X
XEXTRACT_SUFX= .7z
XEXTRACT_DEPENDS= p7zip:${PORTSDIR}/archivers/p7zip
XEXTRACT_CMD= 7z
XEXTRACT_BEFORE_ARGS= x -o${WRKSRC}
XEXTRACT_AFTER_ARGS= >/dev/null
X
XUSE_DOS2UNIX= *.log *.ini *.html *.txt *.lng
XNO_BUILD= yes
X
XPLIST= ${WRKDIR}/pkg-plist
XWRKSRC= ${WRKDIR}/megaglest_game
X
XDATADIR= share/${PKGNAMEPREFIX:S/-//}
XDOCSDIR= share/doc/${PKGNAMEPREFIX:S/-//}
XGLESTDATADIRE= data maps scenarios techs tilesets tutorials
X
Xpost-extract:
X @${MV} ${WRKSRC}/docs/license.txt ${WRKSRC}/docs/license-data.txt
X
Xpre-install:
X @${RM} -f ${PLIST}
X
X. for FILE in megaglest.ico servers.ini glestkeys.ini
X @${ECHO_CMD} "%%DATADIR%%/${FILE}" >> ${PLIST}
X. endfor
X
X. for DIRE in ${GLESTDATADIRE}
X @cd ${WRKSRC} && \
X ${FIND} ${DIRE} -type f | ${SORT} | ${SED} -e 's|^|%%DATADIR%%/|' >> ${PLIST} && \
X ${FIND} ${DIRE} -type d | ${SORT} -r | ${SED} -e 's|^|@dirrm %%DATADIR%%/|' >> ${PLIST}
X. endfor
X @${ECHO_CMD} "@dirrmtry %%DATADIR%%" >> ${PLIST}
X
X. if !defined(NOPORTDOCS)
X @cd ${WRKSRC}/docs && \
X ${FIND} * -type f | ${SORT} | ${SED} -e 's|^|%%PORTDOCS%%%%DOCSDIR%%/|' >> ${PLIST} && \
X ${FIND} * -type d | ${SORT} -r | ${SED} -e 's|^|%%PORTDOCS%%@dirrm %%DOCSDIR%%/|' >> ${PLIST}
X @${ECHO_CMD} "%%PORTDOCS%%@dirrmtry %%DOCSDIR%%" >> ${PLIST}
X. endif
X
Xdo-install:
X.if !defined(NOPORTDOCS)
X @${MKDIR} ${PREFIX}/${DOCSDIR}
X ${INSTALL_DATA} ${WRKSRC}/docs/license-data.txt ${PREFIX}/${DOCSDIR}
X ${INSTALL_DATA} ${WRKSRC}/docs/readme.txt ${PREFIX}/${DOCSDIR}/readme.txt
X.endif
X @${MKDIR} ${PREFIX}/${DATADIR}
X.for FILE in megaglest.ico servers.ini glestkeys.ini
X ${INSTALL_DATA} ${WRKSRC}/${FILE} ${PREFIX}/${DATADIR}
X.endfor
X
X.for DIRE in ${GLESTDATADIRE}
X @cd ${WRKSRC} && \
X ${FIND} ${DIRE} -type d -exec ${MKDIR} "${PREFIX}/${DATADIR}/{}" \; && \
X ${FIND} ${DIRE} -type f -exec ${INSTALL_DATA} "{}" "${PREFIX}/${DATADIR}/{}" \;
X.endfor
X
X. if !defined(NOPORTDOCS)
X @echo "Installing docs..."
X @cd ${WRKSRC}/docs && \
X ${FIND} . -type d -exec ${MKDIR} ${PREFIX}/${DOCSDIR}/{} \; ; \
X ${FIND} . -type f -exec ${INSTALL_DATA} {} ${PREFIX}/${DOCSDIR}/{} \;
X. endif
X
X.include <bsd.port.mk>
c60268649f466fc6d6290d043c1c1de1
echo x - megaglest-data/distinfo
sed 's/^X//' >megaglest-data/distinfo << '392edb33742b055303a65bde9cc7ec1e'
XSHA256 (megaglest/megaglest-data-3.3.7.2.7z) = 8414b14a2433385e4244c61bbed83ea63b567baec2bce0c7d313fc125d795ee3
XSIZE (megaglest/megaglest-data-3.3.7.2.7z) = 154227546
392edb33742b055303a65bde9cc7ec1e
echo x - megaglest-data/pkg-descr
sed 's/^X//' >megaglest-data/pkg-descr << 'f15a8f80ec1009269500b8e6a673d942'
XThe glest data files.
X
XThis port install the data files needed to run glest a free 3d real-time
Xcustomizable strategy game
X
XWWW: http://www.glest.org/
f15a8f80ec1009269500b8e6a673d942
echo x - megaglest-data/LIST}
sed 's/^X//' >megaglest-data/LIST} << 'bcbf2ae9f8fcb87dc722a53a7a13cb0d'
X%%PORTDOCS%%@dirrmtry %%DOCSDIR%%
X%%PORTDOCS%%@dirrmtry %%DOCSDIR%%
X%%PORTDOCS%%@dirrmtry %%DOCSDIR%%
X%%PORTDOCS%%@dirrmtry %%DOCSDIR%%
X%%PORTDOCS%%@dirrmtry %%DOCSDIR%%
bcbf2ae9f8fcb87dc722a53a7a13cb0d
exit
--- megaglest.shar ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list