source: trunk/dports/games/crafty/Portfile

Last change on this file was 152363, checked in by khindenburg@…, 11 months ago

crafty: use correct macports master_sites

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.2 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 152363 2016-09-05 14:25:14Z ryandesign@macports.org $
3
4PortSystem          1.0
5
6name                crafty
7categories          games
8version             25.0.1
9platforms           darwin
10license             Restrictive Noncommercial
11maintainers         khindenburg openmaintainer
12description         Crafty is a chess program, that can be interfaced with xboard.
13
14long_description    \
15    Crafty is the derivative of Cray Blitz, a computer chess program. It is \
16    a very strong one, and its current peak ICC ratings are 3286 (bullet), \
17    3388 (blitz) and 2792 (standard). It can be used with xboard just like \
18    gnuchess.
19
20# Original author retired Fall 2016 - not clear on "official" site now
21homepage            http://www.craftychess.com
22master_sites        macports_distfiles
23
24set dist_srczip     ${name}-${version}.zip
25set dist_book1      book.bin
26set dist_book2      bookc.bin
27set dist_book3      books.bin
28set dist_ascii      ${name}.doc.ascii
29set dist_ps         ${name}.doc.ps
30set dist_man        ${name}.man
31
32distfiles           ${dist_srczip} \
33                    ${dist_book1} \
34                    ${dist_book2} \
35                    ${dist_book3} \
36                    ${dist_ascii} \
37                    ${dist_ps} \
38                    ${dist_man}
39
40checksums \
41    ${dist_srczip} \
42        rmd160  7df915f428b311f5ac027a0351147e0d27eae3b6 \
43        sha256  a86a3be9bc422d0a9d25900a7cd81a4149cf593248e300145c8fb679b0900f2b \
44    ${dist_book1} \
45        rmd160  0254f07781ea9a096feae892bd7343e401e4b413 \
46        sha256  67a41dda9a477912b570cc5583fe5fac4f93fb2dba9db436f77f5f95217279b2 \
47    ${dist_book2} \
48        rmd160  532ec57508ebd3bb6db052d853d1be549faeb859 \
49        sha256  746a343dc9cda2bcf9ded95aa5b9503c8d629d3463ee7709bd06bd852932fc41 \
50    ${dist_book3} \
51        rmd160  b2b5d8f9b2be351373b734e9f3ca3d34c2aa2438 \
52        sha256  c81be5033aeb43decfa82604eebf7f16026131e9aedd7d1f0aa1b5e19863a744 \
53    ${dist_ascii} \
54        rmd160  f0c8304efcaa93a14a37da96d22bb25cda8d1bf5 \
55        sha256  be291c0f4c7e7d64404ec58b9e92c2455c4342d3c96c721ba21a80fce8332e83 \
56    ${dist_ps} \
57        rmd160  10001918bfc54a9c456b4572037b9fa640491d7b \
58        sha256  887eb54de05f3371ef95adc38629a0f1f2cad66d1ca1b14fc426b87f5b13a9ab \
59    ${dist_man} \
60        rmd160  ccfedc1511a0ae523e16f94d9818abb29b1ea188 \
61        sha256  7c6c217431abb178ed53a6f9f949a2412a9bf30be856077b30dfbc13d426ca0e
62
63use_zip             yes
64extract.mkdir       yes
65extract.only        ${dist_srczip}
66
67patchfiles          patch-dirs.diff \
68                    patch-Makefile.diff
69
70post-patch {
71    reinplace "s|@@PREFIX@@|${prefix}|" ${worksrcpath}/chess.h
72
73    reinplace "s|@@CC@@|${configure.cc}|g" ${worksrcpath}/Makefile
74    reinplace "s|@@CXX@@|${configure.cxx}|g" ${worksrcpath}/Makefile
75    reinplace "s|@@CFLAGS@@|${configure.cflags} [get_canonical_archflags cc]|g" ${worksrcpath}/Makefile
76    reinplace "s|@@CXFLAGS@@|${configure.cxxflags} [get_canonical_archflags cxx]|g" ${worksrcpath}/Makefile
77    reinplace "s|@@LDFLAGS@@|${configure.ldflags} [get_canonical_archflags ld]|g" ${worksrcpath}/Makefile
78}
79
80use_configure       no
81
82# asm errors building +universal
83#variant universal {}
84
85build.target        unix-gcc
86
87destroot {
88    # copy the executable
89    xinstall -m 755 -d ${destroot}${prefix}/bin
90    file copy ${worksrcpath}/${name} ${destroot}${prefix}/bin/
91
92    # copy the book files
93    xinstall -m 755 -d ${destroot}${prefix}/share/${name}
94    file copy ${distpath}/${dist_book1} \
95              ${distpath}/${dist_book2} \
96              ${distpath}/${dist_book3} \
97              ${destroot}${prefix}/share/${name}/
98
99    # create endgame tablebase folder
100    xinstall -m 755 -d ${destroot}${prefix}/share/${name}/TB
101
102    # copy the docs
103    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
104    file copy ${distpath}/${dist_ascii} \
105              ${distpath}/${dist_ps} \
106              ${destroot}${prefix}/share/doc/${name}
107
108    # copy the manpage, renaming the extension
109    file copy ${distpath}/${dist_man} \
110              ${destroot}${prefix}/share/man/man1/${name}.1
111}
112destroot.keepdirs   ${destroot}${prefix}/share/${name}/TB
113
114livecheck.type      none
Note: See TracBrowser for help on using the repository browser.