- Update to build13rc

- Take maintainership
- Use SF macro
- Improve plist generation

PR:		128743
Submitted by:	myself
Approved by:	Bartosz Fabianowski <freebsd at chillt dot de> (maintainer)
This commit is contained in:
Dmitry Marakasov 2008-11-10 12:58:56 +00:00
parent 876c9eea2a
commit 3024f52ace
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=222683
5 changed files with 71 additions and 77 deletions

View File

@ -6,60 +6,56 @@
#
PORTNAME= widelands
DISTVERSION= build10
PORTREVISION= 2
DISTVERSION= build13rc
CATEGORIES= games
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_EXTENDED}
MASTER_SITE_SUBDIR= ${PORTNAME}
DISTNAME= ${PORTNAME}-${DISTVERSION}-source
MASTER_SITES= SFE
DISTNAME= ${PORTNAME}-${DISTVERSION:C/^b/B/}-src
MAINTAINER= freebsd@chillt.de
MAINTAINER= amdmi3@FreeBSD.org
COMMENT= Realtime strategy game inspired by Settlers II
LIB_DEPENDS= png.5:${PORTSDIR}/graphics/png
LIB_DEPENDS= png.5:${PORTSDIR}/graphics/png \
boost_thread.4:${PORTSDIR}/devel/boost
WRKSRC= ${WRKDIR}/widelands
PLIST= ${WRKDIR}/pkg-plist
USE_BZIP2= yes
USE_PYTHON_BUILD= 2.4+
USE_GETTEXT= yes
USE_SDL= mixer image net ttf
USE_SDL= sdl mixer image net ttf gfx
USE_GCC= 4.2+
PLIST_FILES= bin/widelands
WRKSRC= ${WRKDIR}/widelands
SCONS_ARGS= CXXFLAGS="${CXXFLAGS}" LINKFLAGS="${LDFLAGS}" \
CPPPATH=${LOCALBASE}/include LIBPATH=${LOCALBASE}/lib \
CC="${CC}" CXX="${CXX}" \
install_prefix=${PREFIX} bindir=bin datadir=share/widelands
install_prefix=${PREFIX} bindir=bin datadir=share/widelands \
localedir=share/widelands/locale build=release
post-extract:
@cd ${WRKSRC}/utils && ${TAR} xf scons-local-1.0.1.tar.gz
post-patch:
@${REINPLACE_CMD} -e 's|, True||' ${WRKSRC}/worlds/SConscript
@${RM} -f ${WRKSRC}/worlds/SConscript.bak
@${REINPLACE_CMD} -e '/prefer_localdata/ s|True|False|' \
${WRKSRC}/worlds/SConscript
@${REINPLACE_CMD} -e '/ifndef/ s|__APPLE__|__FreeBSD__|' \
${WRKSRC}/src/backtrace.cc
@${REINPLACE_CMD} -e 's|/usr/bin/python|${PYTHON_CMD}|' \
${WRKSRC}/utils/buildlocale.py
@${REINPLACE_CMD} -e 's|revstring=.*|return "${DISTVERSION}-FreeBSD"|' \
${WRKSRC}/build/scons-tools/detect_revision.py
do-build:
@cd ${WRKSRC} && \
(cd utils && ${TAR} xf scons-local-0.96.1.tar.gz) && \
${PYTHON_CMD} utils/scons.py ${SCONS_ARGS}
pre-install:
@${RM} -f ${PLIST}
@${ECHO_CMD} bin/widelands > ${PLIST}
@for f in COPYING CREDITS ChangeLog README developers editor_readme ; do \
${ECHO_CMD} %%DATADIR%%/doc/$$f >> ${PLIST} ; \
done
@cd ${WRKSRC} && for d in campaigns maps ; do \
${LS} -1d $$d/*.wmf | ${SORT} | ${SED} -e 's|^|%%DATADIR%%/|' >> ${PLIST} ; \
done
@cd ${WRKSRC} && for d in fonts game_server music pics sound tribes worlds ; do \
${FIND} $$d -type f \! -name SConscript | ${SORT} | ${SED} -e 's|^|%%DATADIR%%/|' >> ${PLIST} ; \
done
@for d in doc campaigns maps ; do \
${ECHO_CMD} "@dirrm %%DATADIR%%/$$d" >> ${PLIST} ; \
done
@cd ${WRKSRC} && for d in fonts game_server music pics sound tribes worlds ; do \
${FIND} $$d -type d | ${SORT} -r | ${SED} -e 's|^|@dirrm %%DATADIR%%/|' >> ${PLIST} ; \
done
@${ECHO_CMD} "@dirrm %%DATADIR%%" >> ${PLIST}
@cd ${WRKSRC} && ${PYTHON_CMD} utils/scons.py ${SCONS_ARGS}
do-install:
@cd ${WRKSRC} && ${PYTHON_CMD} utils/scons.py ${SCONS_ARGS} install
post-install:
@${FIND} ${DATADIR} -type f | \
${SED} -e 's|^${PREFIX}/||' >> ${TMPPLIST}
@${FIND} ${DATADIR} -type d | ${SORT} -r | \
${SED} -e 's|^${PREFIX}/|@dirrm |' >> ${TMPPLIST}
.include <bsd.port.mk>

View File

@ -1,3 +1,3 @@
MD5 (widelands-build10-source.tar.bz2) = 9e452baf7b8f22a27b4e371e2150e017
SHA256 (widelands-build10-source.tar.bz2) = f67508066db1739839945f8c814a71a0e4a43904ff4a7f4e7cd3c269bcda18af
SIZE (widelands-build10-source.tar.bz2) = 28526726
MD5 (widelands-Build13rc-src.tar.bz2) = 8639ce8e357346daa5b60a7ac905f1d9
SHA256 (widelands-Build13rc-src.tar.bz2) = 50a3a2eefd3f2b19bd5a6e643d1ef0091780b037af0df4d54cafd352153a3bc1
SIZE (widelands-Build13rc-src.tar.bz2) = 45349994

View File

@ -1,23 +1,11 @@
--- SConstruct.orig Mon Mar 12 21:39:30 2007
+++ SConstruct Sat Jun 2 03:49:26 2007
@@ -122,9 +122,11 @@
#
# Create configuration objects
--- SConstruct.orig 2008-10-06 21:43:03.000000000 +0400
+++ SConstruct 2008-11-09 18:44:06.000000000 +0300
@@ -101,7 +101,7 @@
+SConsignFile('build/scons-signatures')
+
opts=cli_options()
-env=Environment(options=opts)
+env=Environment(options=opts, **dict((k, v.split()) for k, v in ARGUMENTS.iteritems()))
env.Help(opts.GenerateHelpText(env))
conf=env.Configure(conf_dir='#/build/sconf_temp',log_file='#build/config.log',
@@ -287,7 +289,6 @@
################################################################### Build things
-SConsignFile('build/scons-signatures')
BUILDDIR='build/'+TARGET+'-'+env['build']
Export('env', 'Glob', 'BUILDDIR', 'PhonyTarget')
+env=Environment(options=opts, ENV=os.environ, **dict((k, v.split()) for k, v in ARGUMENTS.iteritems()))
env.Tool("ctags", toolpath=['build/scons-tools'])
env.Tool("PNGShrink", toolpath=['build/scons-tools'])
env.Tool("astyle", toolpath=['build/scons-tools'])

View File

@ -0,0 +1,29 @@
--- build/scons-tools/scons_configure.py.orig 2008-10-05 18:59:26.000000000 +0400
+++ build/scons-tools/scons_configure.py 2008-11-10 01:24:38.000000000 +0300
@@ -439,16 +439,16 @@
conf.CheckCompilerFlag('-fbounds-check', env)
conf.CheckCompilerFlag('-pipe', env)
- if env.optimize:
- # !!!! -fomit-frame-pointer breaks execeptions !!!!
- conf.CheckCompilerFlag('-fexpensive-optimizations', env)
- conf.CheckCompilerFlag('-finline-functions', env)
- conf.CheckCompilerFlag('-ffast-math', env)
- conf.CheckCompilerFlag('-funroll-loops', env)
- conf.CheckCompilerFlag('-O3', env)
- else:
- conf.CheckCompilerFlag('-O0', env)
- conf.CheckCompilerFlag('-funit-at-a-time', env)
+# if env.optimize:
+# # !!!! -fomit-frame-pointer breaks execeptions !!!!
+# conf.CheckCompilerFlag('-fexpensive-optimizations', env)
+# conf.CheckCompilerFlag('-finline-functions', env)
+# conf.CheckCompilerFlag('-ffast-math', env)
+# conf.CheckCompilerFlag('-funroll-loops', env)
+# conf.CheckCompilerFlag('-O3', env)
+# else:
+# conf.CheckCompilerFlag('-O0', env)
+# conf.CheckCompilerFlag('-funit-at-a-time', env)
if env.profile:
conf.CheckCompilerFlag('-pg', env)

View File

@ -1,19 +0,0 @@
--- src/SConscript.orig Mon Feb 19 19:33:47 2007
+++ src/SConscript Sat Jun 2 02:47:39 2007
@@ -5,7 +5,7 @@
SRC=Glob('*.cc')
-srcenv=env.Copy()
+srcenv=env.Copy(CPPPATH=[], LIBPATH=[])
srcenv.Append(CPPPATH=[
'#/src',
@@ -22,6 +22,7 @@
srcenv.Append(LIBS='editor', LIBPATH='editor')
srcenv.Append(LIBS='editoruimenus', LIBPATH='editor/ui_menus')
srcenv.Append(LIBS='editortools', LIBPATH='editor/tools')
+srcenv.Append(CPPPATH=env['CPPPATH'], LIBPATH=env['LIBPATH'])
SConscript('editor/SConscript')
SConscript('ui/ui_basic/SConscript')