[121069] trunk/dports/games/boswars

devans at macports.org devans at macports.org
Mon Jun 16 14:08:37 PDT 2014


Revision: 121069
          https://trac.macports.org/changeset/121069
Author:   devans at macports.org
Date:     2014-06-16 14:08:37 -0700 (Mon, 16 Jun 2014)
Log Message:
-----------
boswars: update to version 2.7, depends on lua51, install fixed images for libpng16 (#42197).

Modified Paths:
--------------
    trunk/dports/games/boswars/Portfile
    trunk/dports/games/boswars/files/patch-SConstruct.diff
    trunk/dports/games/boswars/files/patch-engine_video_graphic.cpp.diff

Added Paths:
-----------
    trunk/dports/games/boswars/files/build_options.py

Removed Paths:
-------------
    trunk/dports/games/boswars/files/patch-build_options.py.diff

Modified: trunk/dports/games/boswars/Portfile
===================================================================
--- trunk/dports/games/boswars/Portfile	2014-06-16 20:02:46 UTC (rev 121068)
+++ trunk/dports/games/boswars/Portfile	2014-06-16 21:08:37 UTC (rev 121069)
@@ -4,8 +4,7 @@
 PortSystem          1.0
 
 name                boswars
-version             2.6.1
-revision            1
+version             2.7
 categories          games
 platforms           darwin
 maintainers         nomaintainer
@@ -22,36 +21,65 @@
                     allow for different strategies.
 
 homepage            http://boswars.org/
-master_sites        ${homepage}dist/releases/
+master_sites        ${homepage}dist/releases:boswars \
+                    http://dev.gentoo.org/~hasufell/distfiles:images
+
+set imagefile       boswars-${version}-fixed-images-for-libpng-1.6.tar.xz
+                    
 distname            ${name}-${version}-src
+distfiles           ${distname}${extract.suffix}:boswars \
+                    ${imagefile}:images
 
-checksums           rmd160  f7c41b3c9276d21aab19e93af0de851646dc4bac \
-                    sha256  6003307692bde9913f6b5c227bf351e43e33d44ffaab198f0d0677e8fef86315
+checksums           ${distname}${extract.suffix} \
+                    rmd160  8a22afb974452d5290e4023f801752b8f2defe04 \
+                    sha256  dc3718f531e9ea413cf37e1333b62a4c5e69f1405502d9c59b9e424635135e3e \
+                    ${imagefile} \
+                    rmd160  4354ab05348d2827ec17eeac472b03e854bcdaa7 \
+                    sha256  87f3ee7f4045c3acfacd884348a2b376e710b42aa0f40acbc212732d0bee9a24
 
-depends_build       port:scons
+depends_extract-append port:xz
 
+depends_build       port:pkgconfig \
+                    port:scons
+
 depends_lib         port:libogg \
                     port:libpng \
                     port:libsdl \
                     port:libtheora \
                     port:libvorbis \
-                    port:lua \
+                    port:lua51 \
                     port:zlib
 
 license_noconflict  scons
 
+extract.only        ${distname}${extract.suffix}
+
+# image files shipped with boswar are built with libpng15
+# replace with fixed images built with libpng16
+
+post-extract {
+    system "cd ${worksrcpath} && \
+            ${prefix}/bin/xz -dc '${prefix}/var/macports/distfiles/${name}/${imagefile}' | /usr/bin/gnutar --no-same-owner --strip-components 1 -xf -"
+}
+
+pre-patch {
+    xinstall ${portpath}/${filesdir}/build_options.py ${worksrcpath}
+}
+
 patchfiles          patch-SConstruct.diff \
-                    patch-build_options.py.diff \
                     patch-engine_video_graphic.cpp.diff
 
 post-patch {
     reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/build_options.py
+    reinplace "s|__CC__|${configure.cc}|g" ${worksrcpath}/build_options.py
+    reinplace "s|__CXX__|${configure.cxx}|g" ${worksrcpath}/build_options.py
 }
 
 use_configure       no
+universal_variant   no
 
 build {
-    system -W ${worksrcpath} "${prefix}/bin/scons debug"
+    system -W ${worksrcpath} "${prefix}/bin/scons"
 }
 
 destroot {
@@ -61,7 +89,7 @@
     # Rename the boswars binary to boswars-bin and install it in destroot so a
     # helper script can be used which automatically sets the path to the
     # boswars files.
-    move ${worksrcpath}/boswars-debug ${destroot}${prefix}/bin/boswars-bin
+    move ${worksrcpath}/build/boswars-release ${destroot}${prefix}/bin/boswars-bin
     # Copy the helper script to ${prefix}/bin.
     xinstall ${portpath}/${filesdir}/boswars ${destroot}${prefix}/bin
     # Set the correct path to the boswars files in the boswars helper script.

Added: trunk/dports/games/boswars/files/build_options.py
===================================================================
--- trunk/dports/games/boswars/files/build_options.py	                        (rev 0)
+++ trunk/dports/games/boswars/files/build_options.py	2014-06-16 21:08:37 UTC (rev 121069)
@@ -0,0 +1,10 @@
+# put lua51 include path before macports in case lua 5.2 is installed
+CPPPATH = ['__PREFIX__/include/lua-5.1', '__PREFIX__/include']
+CPPDEFINES = []
+LIBPATH = ['__PREFIX__/lib']
+CCFLAGS = ['-fsigned-char']
+LINKFLAGS = ['$__RPATH']
+CC = ['__CC__']
+CXX = ['__CXX__']
+MINGWCPPPATH = []
+MINGWLIBPATH = []

Modified: trunk/dports/games/boswars/files/patch-SConstruct.diff
===================================================================
--- trunk/dports/games/boswars/files/patch-SConstruct.diff	2014-06-16 20:02:46 UTC (rev 121068)
+++ trunk/dports/games/boswars/files/patch-SConstruct.diff	2014-06-16 21:08:37 UTC (rev 121069)
@@ -1,11 +1,25 @@
---- SConstruct	2008-01-27 18:27:52.000000000 +0100
-+++ SConstruct	2008-01-27 18:28:00.000000000 +0100
-@@ -303,7 +303,7 @@
+--- SConstruct.orig	2013-06-02 05:41:11.000000000 -0700
++++ SConstruct	2014-06-15 06:55:46.000000000 -0700
+@@ -170,11 +170,11 @@
+ def CheckLuaLib(env, conf):
+   if not 'USE_WIN32' in env['CPPDEFINES']:
+      if env.WhereIs('pkg-config'):
+-        for packagename in ['lua5.1', 'lua51', 'lua']:
++        for packagename in ['lua-5.1', 'lua51', 'lua']:
+            exitcode,_ = ParseConfig(env, 'pkg-config --cflags --libs ' + packagename)
+            if exitcode == 0:
+               break
+-  if conf.CheckLibWithHeader('lua51', 'lua.h', 'c'):
++  if conf.CheckLibWithHeader('lua-5.1', 'lua.h', 'c'):
+     return 1
+   if conf.CheckLibWithHeader('lua5.1', 'lua.h', 'c'):
+     return 1
+@@ -285,7 +285,7 @@
  
- debug = env.Copy()
+ debug = env.Clone()
  debug.Append(CPPDEFINES = 'DEBUG')
 -debug.Append(CCFLAGS = Split('-g -Wsign-compare -Wall -Werror'))
 +debug.Append(CCFLAGS = Split('-g -Wsign-compare -Wall'))
  
- profile = debug.Copy()
+ profile = debug.Clone()
  profile.Append(CCFLAGS = Split('-pg'))

Deleted: trunk/dports/games/boswars/files/patch-build_options.py.diff
===================================================================
--- trunk/dports/games/boswars/files/patch-build_options.py.diff	2014-06-16 20:02:46 UTC (rev 121068)
+++ trunk/dports/games/boswars/files/patch-build_options.py.diff	2014-06-16 21:08:37 UTC (rev 121069)
@@ -1,12 +0,0 @@
---- build_options.py	1970-01-01 01:00:00.000000000 +0100
-+++ build_options.py	2008-01-27 16:42:37.000000000 +0100
-@@ -0,0 +1,9 @@
-+CPPPATH = ['__PREFIX__/include']
-+CPPDEFINES = []
-+LIBPATH = ['__PREFIX__/lib']
-+CCFLAGS = ['-fsigned-char']
-+LINKFLAGS = ['$__RPATH']
-+CC = 'gcc'
-+CXX = 'g++'
-+MINGWCPPPATH = []
-+MINGWLIBPATH = []

Modified: trunk/dports/games/boswars/files/patch-engine_video_graphic.cpp.diff
===================================================================
--- trunk/dports/games/boswars/files/patch-engine_video_graphic.cpp.diff	2014-06-16 20:02:46 UTC (rev 121068)
+++ trunk/dports/games/boswars/files/patch-engine_video_graphic.cpp.diff	2014-06-16 21:08:37 UTC (rev 121069)
@@ -1,6 +1,6 @@
---- engine/video/graphic.cpp	2008-01-27 17:33:20.000000000 +0100
-+++ engine/video/graphic.cpp	2008-01-27 17:33:37.000000000 +0100
-@@ -852,8 +852,8 @@
+--- engine/video/graphic.cpp.orig	2013-06-02 05:41:06.000000000 -0700
++++ engine/video/graphic.cpp	2014-06-16 09:32:13.000000000 -0700
+@@ -986,8 +986,8 @@
  	ckey = f->colorkey;
  
  	glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140616/da3f2f4d/attachment.html>


More information about the macports-changes mailing list