aboutsummaryrefslogtreecommitdiffstats
path: root/games/freecell-solver/Makefile
blob: 31204adfcb636203e06415fd8a76c9286955c04d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# ex:ts=8
# New ports collection makefile for:   freecell-solver
# Date created:                Fab 9, 2001
# Whom:                        Ying-Chieh Liao <ijliao@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=   freecell-solver
PORTVERSION=    2.28.1
CATEGORIES= games
MASTER_SITES=   http://freebsd.unixfreunde.de/sources/ \
        BERLIOS/fc-solve

MAINTAINER= ports@FreeBSD.org
COMMENT=    A program that automatically solves games of Freecell

OPTIONS=    JUDY "Use libJudy for states and stacks storage" off \
        REDBLACK "Use libredblack for states and stacks storage" off

USE_BZIP2=  yes
USE_PERL5_BUILD=    yes
USE_CMAKE=  yes
CMAKE_USE_PTHREAD=  yes
USE_LDCONFIG=   yes

MAN6=   fc-solve-board_gen.6 \
    fc-solve.6 \
    freecell-solver-range-parallel-solve.6 \
    make-aisleriot-freecell-board.6 \
    make-gnome-freecell-board.6 \
    make_pysol_freecell_board.py.6 \
    pi-make-microsoft-freecell-board.6

CFLAGS+=    -I${LOCALBASE}/include

.if defined(WITH_JUDY) && defined(WITH_REDBLACK)
IGNORE=     you cannot enable both JUDY and REDBLACK
.endif

.if defined(WITH_JUDY)
LIB_DEPENDS+=   Judy.1:${PORTSDIR}/devel/judy
CMAKE_ARGS+=    -DFCS_STACK_STORAGE="FCS_STACK_STORAGE_JUDY" \
        -DFCS_STATE_STORAGE="FCS_STATE_STORAGE_JUDY"
.endif

.if defined(WITH_REDBLACK)
LIB_DEPENDS+=   redblack.2:${PORTSDIR}/devel/libredblack
CMAKE_ARGS+=    -DFCS_STACK_STORAGE="FCS_STACK_STORAGE_LIBREDBLACK_TREE" \
        -DFCS_STATE_STORAGE="FCS_STATE_STORAGE_LIBREDBLACK_TREE"
.endif

post-install:
.for file in freecell-solver-fc-pro-range-solve \
    freecell-solver-multi-thread-solve
    ${INSTALL_PROGRAM} ${WRKSRC}/${file} ${PREFIX}/bin
.endfor
.if !defined(NOPORTDOCS)
    @${MKDIR} ${DOCSDIR}
.for file in AUTHORS INSTALL README README.win32.txt TODO USAGE
    ${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}
.endfor
.endif

.include <bsd.port.mk>