[87748] trunk/dports/games/sl

raimue at macports.org raimue at macports.org
Sat Dec 3 16:56:11 PST 2011


Revision: 87748
          http://trac.macports.org/changeset/87748
Author:   raimue at macports.org
Date:     2011-12-03 16:56:08 -0800 (Sat, 03 Dec 2011)
Log Message:
-----------
games/sl:
Build fix for more pedantic compilers, add +persistent variant, closes #31208

Modified Paths:
--------------
    trunk/dports/games/sl/Portfile

Added Paths:
-----------
    trunk/dports/games/sl/files/
    trunk/dports/games/sl/files/patch-main.diff

Modified: trunk/dports/games/sl/Portfile
===================================================================
--- trunk/dports/games/sl/Portfile	2011-12-04 00:18:49 UTC (rev 87747)
+++ trunk/dports/games/sl/Portfile	2011-12-04 00:56:08 UTC (rev 87748)
@@ -12,18 +12,44 @@
 platforms           darwin
 master_sites        http://www.tkl.iis.u-tokyo.ac.jp/~toyoda/sl
 
-checksums           md5 cc06b159f78f86bfd2d4e0e16330fbae \
+checksums           sl.tar \
+                    md5 cc06b159f78f86bfd2d4e0e16330fbae \
                     sha1 57e18b4333e05be67faff58c42a06fcbc231def9
 
 distfiles	    sl.tar
-use_configure	    no
 worksrcdir	    sl
 
+depends_lib         port:ncurses
+
 extract.cmd	    tar
 extract.pre_args    -xf
 extract.post_args   ""
-build.target	    sl
-destroot.cmd	    install
-destroot.target	    ""
-destroot.args	    sl ${destroot}${prefix}/bin/sl
-destroot.destdir    ""
+
+patchfiles          patch-main.diff
+
+use_configure	    no
+
+build {
+    system -W ${worksrcpath} \
+        "${configure.cc} ${configure.optflags} [get_canonical_archflags] -I${prefix}/include -L${prefix}/lib \
+        -Wno-implicit-function-declaration -Wno-implicit-int -Wno-return-type \
+        -o sl sl.c -lncurses -ltermcap"
+}
+
+destroot {
+    xinstall -m 755 ${worksrcpath}/sl ${destroot}${prefix}/bin/sl
+}
+
+variant persistent description {Add gates and different trains. Even more annoying!} {
+    # Remove this as it's already included in upstream patch
+    patchfiles-delete   patch-main.diff
+
+    patch_sites-append  http://www.izumix.org.uk/sl/
+    patchfiles-append   sl5-1.patch
+    checksums-append    sl5-1.patch \
+                        sha1    4bad34d817f725626c1f1b655d968290ec78a19a \
+                        rmd160  03feef9ec80e127b0aee3b08b15fa605e9b6aad2
+    patch.pre_args      -p1
+}
+
+variant universal {}

Added: trunk/dports/games/sl/files/patch-main.diff
===================================================================
--- trunk/dports/games/sl/files/patch-main.diff	                        (rev 0)
+++ trunk/dports/games/sl/files/patch-main.diff	2011-12-04 00:56:08 UTC (rev 87748)
@@ -0,0 +1,20 @@
+--- sl.c.orig	2011-12-04 01:42:40.000000000 +0100
++++ sl.c	2011-12-04 01:45:14.000000000 +0100
+@@ -59,7 +59,7 @@
+     }
+ }
+ 
+-void main(int argc, char *argv[])
++int main(int argc, char *argv[])
+ {
+     int x, i;
+ 
+@@ -85,6 +85,8 @@
+     }
+     mvcur(0, COLS - 1, LINES - 1, 0);
+     endwin();
++
++    return 0;
+ }
+ 
+ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20111203/2b43b40b/attachment.html>


More information about the macports-changes mailing list