aboutsummaryrefslogtreecommitdiffstats
path: root/games/fgfs-base/Makefile
blob: df3b104911fabfddd27b8766896c6db058afff56 (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
66
67
68
69
70
71
72
73
74
75
76
# New ports collection makefile for:    flightgear
# Version required: 0.6.1
# Date created:     26 June 1999
# Whom:         Brian Buchanan <brian@CSUA.Berkeley.EDU>
#
# $Id: Makefile,v 1.2 1999/07/08 06:11:20 cpiazza Exp $
#

DISTNAME=       FlightGear-${FLIGHTGEAR_VERSION}
CATEGORIES=     games
MASTER_SITES=       ftp://ftp.flightgear.org/pub/fgfs/Source/ \
            ftp://ftp.flightgear.org/pub/fgfs/Shared/
DISTFILES=      ${DISTNAME}.tar.gz \
            fgfs-base-${FLIGHTGEAR_VERSION}.tar.gz

MAINTAINER=     brian@CSUA.Berkeley.EDU

BUILD_DEPENDS=      ${X11BASE}/lib/libsl.a:${PORTSDIR}/x11-toolkits/plib
RUN_DEPENDS=        mpg123:${PORTSDIR}/audio/mpg123

EXTRACT_ONLY=       ${DISTNAME}.tar.gz

FLIGHTGEAR_VERSION= 0.6.1

.include <bsd.port.pre.mk>

.if ${OSVERSION} < 400003
BUILD_DEPENDS+=     eg++:${PORTSDIR}/lang/egcs
CXX=            eg++
.endif

.if defined(BUILD_SCENERY_TOOLS)
MASTER_SITES+=      ftp://ftp.cs.man.ac.uk/pub/amurta/
DISTFILES+=     gfc-0.8.8.1b.tar.gz gpc231.tar.Z
EXTRACT_ONLY+=      gfc-0.8.8.1b.tar.gz gpc231.tar.Z
NO_PACKAGE=     "gpc's license conflicts with the GPL"
CONFIGURE_ENV+=     CPPFLAGS=-I${WRKSRC}/gfcgpc/include \
            LDFLAGS=-L${WRKSRC}/gfcgpc/lib
ADDPATCHES=     ${MASTERDIR}/patches.tools/gfc-patch-aa

pre-configure:
    @(cd ${WRKDIR}/gfc-0.8.8.1b; ./configure --prefix=${WRKSRC}/gfcgpc; \
      ${GMAKE}; ${GMAKE} install; \
      ${CP} ${MASTERDIR}/patches.tools/Makefile.gpc \
            ${WRKDIR}/gpc231/Makefile; \
      cd ${WRKDIR}/gpc231; ${GMAKE}; \
      ${GMAKE} PREFIX=${WRKSRC}/gfcgpc install)
.else
PLIST=      ${MASTERDIR}/pkg/PLIST.notools
ADDPATCHES= ${MASTERDIR}/patches.tools/disable-tools
USE_AUTOCONF=   yes
.endif

GNU_CONFIGURE=  yes
CONFIGURE_ARGS+=--bindir=${PREFIX}/FlightGear/bin
USE_GMAKE=  yes

pre-patch:
    @( cd ${WRKDIR}; \
       for i in ${ADDPATCHES} ; do \
        ${PATCH} -s < $${i}; \
       done )

post-configure:
    @(cd ${WRKSRC};touch Makefile.in */Makefile.in */*/Makefile.in \
                         */*/*/Makefile.in; \
      ./config.status)

pre-install:
    cd ${PREFIX}; \
    ${TAR} xzf ${DISTDIR}/fgfs-base-${FLIGHTGEAR_VERSION}.tar.gz

post-install:
    ${MV} ${PREFIX}/FlightGear/bin/runfgfs ${PREFIX}/bin

.include <bsd.port.post.mk>