[145040] trunk/dports/games/crafty

khindenburg at macports.org khindenburg at macports.org
Sat Jan 23 19:32:49 PST 2016


Revision: 145040
          https://trac.macports.org/changeset/145040
Author:   khindenburg at macports.org
Date:     2016-01-23 19:32:49 -0800 (Sat, 23 Jan 2016)
Log Message:
-----------
crafty: update to 25.0.1
    attempt to use the right compiler - universal fails  to build#45178
    add folder for endgame tablebase

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

Added Paths:
-----------
    trunk/dports/games/crafty/files/
    trunk/dports/games/crafty/files/patch-Makefile.diff
    trunk/dports/games/crafty/files/patch-dirs.diff

Modified: trunk/dports/games/crafty/Portfile
===================================================================
--- trunk/dports/games/crafty/Portfile	2016-01-24 02:50:01 UTC (rev 145039)
+++ trunk/dports/games/crafty/Portfile	2016-01-24 03:32:49 UTC (rev 145040)
@@ -5,8 +5,7 @@
 
 name                crafty
 categories          games
-version             24.1
-revision            1
+version             25.0.1
 platforms           darwin
 license             Unknown
 maintainers         khindenburg openmaintainer
@@ -23,9 +22,6 @@
                     http://cis.uab.edu/hyatt/crafty/documentation:doc \
                     http://cis.uab.edu/hyatt/crafty/book:book
 
-# handle stealth update - remove when new version is released
-dist_subdir         ${name}/${version}_1
-
 set dist_srczip     ${name}-${version}.zip
 set dist_book1      book.bin
 set dist_book2      bookc.bin
@@ -33,7 +29,6 @@
 set dist_ascii      ${name}.doc.ascii
 set dist_ps         ${name}.doc.ps
 set dist_man        ${name}.man
-dist_subdir         ${name}/${version}
 
 distfiles           ${dist_srczip}:src \
                     ${dist_book1}:book \
@@ -45,8 +40,8 @@
 
 checksums \
     ${dist_srczip} \
-        rmd160  d3b00532e1fd0bd744a1d2956cf6162588ec99b9 \
-        sha256  a29d25d9a26a5a958f07a075d1f76f52c12d287ad16ee7aadb224a0dfee40659 \
+        rmd160  7df915f428b311f5ac027a0351147e0d27eae3b6 \
+        sha256  a86a3be9bc422d0a9d25900a7cd81a4149cf593248e300145c8fb679b0900f2b \
     ${dist_book1} \
         rmd160  0254f07781ea9a096feae892bd7343e401e4b413 \
         sha256  67a41dda9a477912b570cc5583fe5fac4f93fb2dba9db436f77f5f95217279b2 \
@@ -67,21 +62,28 @@
         sha256  7c6c217431abb178ed53a6f9f949a2412a9bf30be856077b30dfbc13d426ca0e
 
 use_zip             yes
+extract.mkdir       yes
 extract.only        ${dist_srczip}
 
+patchfiles          patch-dirs.diff \
+                    patch-Makefile.diff
+
 post-patch {
-    reinplace "s|IPHONE|__APPLE__|g" ${worksrcpath}/chess.h
-    reinplace -E "s|BOOKDIR \+\".\"|BOOKDIR \"${prefix}/share/crafty\"|g" ${worksrcpath}/chess.h
+    reinplace "s|@@PREFIX@@|${prefix}|" ${worksrcpath}/chess.h
+
+    reinplace "s|@@CC@@|${configure.cc}|g" ${worksrcpath}/Makefile
+    reinplace "s|@@CXX@@|${configure.cxx}|g" ${worksrcpath}/Makefile
+    reinplace "s|@@CFLAGS@@|${configure.cflags} [get_canonical_archflags cc]|g" ${worksrcpath}/Makefile
+    reinplace "s|@@CXFLAGS@@|${configure.cxxflags} [get_canonical_archflags cxx]|g" ${worksrcpath}/Makefile
+    reinplace "s|@@LDFLAGS@@|${configure.ldflags} [get_canonical_archflags ld]|g" ${worksrcpath}/Makefile
 }
 
 use_configure       no
 
+# asm errors building +universal
+#variant universal {}
+
 build.target        unix-gcc
-# in a next version, point crafty to the default location for books
-# for the moment use the classic bookpath switch when launching it
-# should you want to use endgame tables, put them into the TBDIR
-# build.args	    -DBOOKDIR=${prefix}/share/${name}/ \
-#		    -DTBDIR=${prefix}/share/${name}/TB/
 
 destroot {
     # copy the executable
@@ -95,6 +97,9 @@
               ${distpath}/${dist_book3} \
               ${destroot}${prefix}/share/${name}/
 
+    # create endgame tablebase folder
+    xinstall -m 755 -d ${destroot}${prefix}/share/${name}/TB
+
     # copy the docs
     xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
     file copy ${distpath}/${dist_ascii} \
@@ -105,6 +110,7 @@
     file copy ${distpath}/${dist_man} \
               ${destroot}${prefix}/share/man/man1/${name}.1
 }
+destroot.keepdirs   ${destroot}${prefix}/share/${name}/TB
 
 livecheck.type      regex
 livecheck.url       http://cis.uab.edu/hyatt/crafty/source

Added: trunk/dports/games/crafty/files/patch-Makefile.diff
===================================================================
--- trunk/dports/games/crafty/files/patch-Makefile.diff	                        (rev 0)
+++ trunk/dports/games/crafty/files/patch-Makefile.diff	2016-01-24 03:32:49 UTC (rev 145040)
@@ -0,0 +1,20 @@
+--- Makefile	2016-01-10 15:41:46.000000000 -0500
++++ Makefile	2016-01-23 14:01:43.000000000 -0500
+@@ -83,13 +83,11 @@
+ 
+ unix-gcc:
+ 	$(MAKE) -j target=UNIX \
+-		CC=gcc CXX=g++ \
++		CC=@@CC@@ CXX=@@CXX@@ \
+ 		opt='-DTEST -DINLINEASM -DPOPCNT -DCPUS=4' \
+-		CFLAGS='-Wall -Wno-array-bounds -pipe -O3 -fprofile-use \
+-		-fprofile-correction -pthread' \
+-		CXFLAGS='-Wall -Wno-array-bounds -pipe -O3 -fprofile-use \
+-		-fprofile-correction -pthread' \
+-		LDFLAGS='$(LDFLAGS) -fprofile-use -pthread -lstdc++' \
++		CFLAGS='@@CFLAGS@@' \
++		CXFLAGS='@@CXFLAGS@@' \
++		LDFLAGS='@@LDFLAGS@@' \
+ 		crafty-make
+ 
+ unix-gcc-profile:

Added: trunk/dports/games/crafty/files/patch-dirs.diff
===================================================================
--- trunk/dports/games/crafty/files/patch-dirs.diff	                        (rev 0)
+++ trunk/dports/games/crafty/files/patch-dirs.diff	2016-01-24 03:32:49 UTC (rev 145040)
@@ -0,0 +1,18 @@
+--- chess.h	2016-01-01 22:44:42.000000000 -0500
++++ chess.h	2016-01-01 22:49:54.000000000 -0500
+@@ -63,13 +63,13 @@
+ #    endif
+ #  endif
+ #  if !defined(BOOKDIR)
+-#    define   BOOKDIR      "."
++#    define   BOOKDIR      "@@PREFIX@@/share/crafty"
+ #  endif
+ #  if !defined(LOGDIR)
+ #    define   LOGDIR       "."
+ #  endif
+ #  if !defined(TBDIR)
+-#    define   TBDIR        "./TB"
++#    define   TBDIR        "@@PREFIX@@/share/crafty/TB"
+ #  endif
+ #  if !defined(RCDIR)
+ #    define   RCDIR        "."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160123/8d1d45cf/attachment-0001.html>


More information about the macports-changes mailing list