blob: 4ae94dc6a8a41c46cedb3082838bfb51cd2cfcac (
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
77
78
79
80
81
82
83
84
|
# New ports collection makefile for: galaxyhack
# Date created: 10 Aug 2005
# Whom: Alejandro Pulver <alejandro@varnet.biz>
#
# $FreeBSD$
#
PORTNAME= galaxyhack
PORTVERSION= 1.55.2
CATEGORIES= games
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
DISTFILES= ${PORTNAME}-${PORTVERSION}-src${EXTRACT_SUFX} \
${PORTNAME}-1.5-data${EXTRACT_SUFX}
MAINTAINER= alejandro@varnet.biz
COMMENT= AI script based strategy game
LIB_DEPENDS= boost_filesystem.3:${PORTSDIR}/devel/boost \
freetype.9:${PORTSDIR}/print/freetype2
WRKSRC= ${WRKDIR}/src
USE_BZIP2= yes
USE_GMAKE= yes
USE_SDL= gfx image mixer sdl
USE_REINPLACE= yes
OPTIONS= OPTIMIZED_CFLAGS "Enable compilation optimizations" on
ALL_TARGET= ${PORTNAME}
SUB_FILES= ${PORTNAME}-sh
DATADIRS= graphics fleets music gamedata standardpictures
post-extract:
# Remove CVS directories
@${FIND} ${WRKDIR}/${PORTNAME} -type d -name CVS -print0 | \
${XARGS} -0 ${RM} -rf
# Convert DOS text files to UNIX
@${FIND} -E ${WRKSRC} -type f -iregex "(.*Makefile.*|.*\.(cpp|h))" -print0 | \
${XARGS} -0 ${REINPLACE_CMD} -e 's/[[:cntrl:]]*$$//'
do-install:
# Script
@${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME}-sh ${PREFIX}/bin/${PORTNAME}
# Program
@${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/libexec
# Data
@${MKDIR} ${DATADIR}
@${INSTALL_DATA} ${WRKDIR}/${PORTNAME}/settings.dat ${DATADIR}
.for d in ${DATADIRS}
@${CP} -R ${WRKDIR}/${PORTNAME}/${d} ${DATADIR}
.endfor
post-install:
# Fix permissions
@${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${DATADIR}
@${FIND} ${DATADIR} -type f -print0 | \
${XARGS} -0 ${CHMOD} ${SHAREMODE}
@${FIND} ${DATADIR} -type d -print0 | \
${XARGS} -0 ${CHMOD} ${BINMODE}
.include <bsd.port.pre.mk>
.if ${ARCH} == "i386" && ${OSVERSION} < 500000
BROKEN= "Does not compile on < 5.x"
.endif
post-patch:
# Fix Makefile
@${REINPLACE_CMD} -e 's|sdl-config|${SDL_CONFIG}|' \
${WRKSRC}/${MAKEFILE}
# Enable/disable compilation optimizations
.if !defined(WITH_OPTIMIZED_CFLAGS)
@${REINPLACE_CMD} -e 's|-O3||' ${WRKSRC}/${MAKEFILE}
.endif
.include <bsd.port.post.mk>
|