aboutsummaryrefslogtreecommitdiffstats
path: root/games/quake3-data/Makefile.include
blob: 798e545a426864bb05dd9bfb912774e81f80ea33 (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
# Makefile for defining variables used by other Doom related ports.

# Set variables.

Q3PKGNAMEPREFIX?=quake3-
Q3DIR?=     ${LOCALBASE}/share/quake3

# Add them to the environment.

MAKE_ENV+=  Q3DIR="${Q3DIR}"
PLIST_SUB+= Q3DIR="${Q3DIR:S/${LOCALBASE}\///}"
SUB_LIST+=  Q3DIR="${Q3DIR}"

# Add the dependency.

.if ${PORTNAME} != "data"
RUN_DEPENDS+=   ${Q3DIR}/baseq3/pak1.pk3:${PORTSDIR}/games/quake3-data
.endif

# DOS to Unix text conversion.

.if defined(USE_CRLF)
.   if defined(USE_ZIP)
EXTRACT_BEFORE_ARGS=    -aqo
.   else
pre-patch:
    @${FIND} ${WRKDIR} -type f -print0 | \
        ${XARGS} -0 ${FILE} | ${GREP} 'CRLF' | \
        ${SED} -e "s/:.*//" | ${SED} -e 's/ /\\ /g' | \
        ${XARGS} ${REINPLACE_CMD} -i "" -e "s/`${PRINTF} '\r'`$$//"
.   endif
.endif