Lines 2-63
Link Here
|
2 |
# $FreeBSD: head/games/uhexen2/Makefile 327730 2013-09-20 17:36:33Z bapt $ |
2 |
# $FreeBSD: head/games/uhexen2/Makefile 327730 2013-09-20 17:36:33Z bapt $ |
3 |
|
3 |
|
4 |
PORTNAME= uhexen2 |
4 |
PORTNAME= uhexen2 |
5 |
PORTVERSION= 1.5.1 |
5 |
PORTVERSION= 1.5.6 |
6 |
PORTREVISION= 1 |
|
|
7 |
CATEGORIES= games |
6 |
CATEGORIES= games |
8 |
MASTER_SITES= SF/${PORTNAME}/Hammer%20of%20Thyrion/${PORTVERSION}/Source |
7 |
MASTER_SITES= SF/${PORTNAME}/Hammer%20of%20Thyrion/${PORTVERSION}/Source \ |
|
|
8 |
SF/${PORTNAME}/Hexen2%20GameData/gamedata-1.28:data |
9 |
DISTNAME= hexen2source-${PORTVERSION} |
9 |
DISTNAME= hexen2source-${PORTVERSION} |
10 |
EXTRACT_SUFX= .tgz |
10 |
EXTRACT_SUFX= .tgz |
11 |
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} |
11 |
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \ |
|
|
12 |
gamedata-all-1.28${EXTRACT_SUFX}:data |
12 |
DIST_SUBDIR= ${PORTNAME} |
13 |
DIST_SUBDIR= ${PORTNAME} |
13 |
|
14 |
|
14 |
MAINTAINER= ports@FreeBSD.org |
15 |
MAINTAINER= ports@FreeBSD.org |
15 |
COMMENT= Hexen II source port supporting Linux/FreeBSD/Unix/Windows |
16 |
COMMENT= Hexen II source port supporting Linux/FreeBSD/Unix/Windows |
16 |
|
17 |
|
17 |
LIB_DEPENDS= mad.2:${PORTSDIR}/audio/libmad |
18 |
LICENSE= GPLv2 # (or later) |
18 |
|
19 |
|
19 |
LICENSE_= GPLv2 GPLv3 |
20 |
LIB_DEPENDS= libmad.so:${PORTSDIR}/audio/libmad \ |
20 |
LICENSE_COMB= dual |
21 |
libvorbis.so:${PORTSDIR}/audio/libvorbis |
21 |
|
|
|
22 |
USE_GMAKE= yes |
23 |
USE_GL= yes |
24 |
USE_SDL= sdl mixer |
25 |
WANT_GNOME= yes |
26 |
MAKE_JOBS_UNSAFE= yes |
27 |
|
22 |
|
28 |
OPTIONS_MULTI= BIN |
23 |
OPTIONS_MULTI= BIN |
29 |
OPTIONS_MULTI_BIN= HEXEN2 HW |
24 |
OPTIONS_MULTI_BIN= HEXEN2 HW |
30 |
OPTIONS_DEFINE= DEMO LAUNCHER_GTK1 LAUNCHER_GTK2 X86_ASM DOCS |
25 |
OPTIONS_DEFINE= LAUNCHER_GTK1 LAUNCHER_GTK2 LAUNCHER_GTK3 DOCS |
31 |
OPTIONS_DEFAULT= HEXEN2 HW LAUNCHER_GTK1 X86_ASM |
26 |
OPTIONS_DEFAULT= HEXEN2 HW LAUNCHER_GTK2 |
32 |
DEMO_DESC= Install demo version of the game data |
27 |
OPTIONS_DEFINE_i386= ASM |
33 |
HEXEN2_DESC= Build Hexen II clients and servers |
28 |
OPTIONS_DEFAULT_i386= ASM |
34 |
HW_DESC= Build HexenWorld clients and servers |
29 |
|
|
|
30 |
HEXEN2_DESC= Build Hexen II clients and servers |
31 |
HW_DESC= Build HexenWorld clients and servers |
35 |
LAUNCHER_GTK1_DESC= Build graphical (GTK1) game launcher |
32 |
LAUNCHER_GTK1_DESC= Build graphical (GTK1) game launcher |
36 |
LAUNCHER_GTK2_DESC= Build graphical (GTK2) game launcher |
33 |
LAUNCHER_GTK2_DESC= Build graphical (GTK2) game launcher |
37 |
X86_ASM_DESC= Enable use of optimized x86 assembly code |
34 |
LAUNCHER_GTK3_DESC= Build graphical (GTK3) game launcher |
38 |
|
35 |
|
39 |
PORTSCOUT= skipb:yes |
36 |
USES= gmake pkgconfig |
|
|
37 |
USE_SDL= sdl |
38 |
USE_GL= gl |
39 |
MAKE_ENV= X11BASE="${LOCALBASE}" |
40 |
MAKE_JOBS_UNSAFE=yes |
40 |
|
41 |
|
41 |
NO_STAGE= yes |
42 |
SUB_FILES= pkg-message |
42 |
.include <bsd.port.pre.mk> |
|
|
43 |
|
43 |
|
44 |
.if ${PORT_OPTIONS:MDEMO} |
44 |
PORTSCOUT= skipb:yes |
45 |
MASTER_SITES+= SF/${PORTNAME}/Hammer%20of%20Thyrion/${PORTVERSION}/Linux-demo-version:demo |
45 |
|
46 |
DISTFILES+= hexen2demo-${PORTVERSION}-linux-i586${EXTRACT_SUFX}:demo |
46 |
.include <bsd.port.options.mk> |
47 |
MAKE_ENV+= DEMO=yes |
|
|
48 |
PLIST_SUB+= DEMO="" \ |
49 |
FULL="@comment " |
50 |
UH2_DATA= default.cfg hexen.rc pak0.pak progs.dat |
51 |
UH2_DATADIR= ${WRKDIR}/hexen2demo-${PORTVERSION} |
52 |
.else |
53 |
MASTER_SITES+= SF/${PORTNAME}/Hexen2%20GameData/gamedata-1.20:data |
54 |
DISTFILES+= gamedata-all-1.20${EXTRACT_SUFX}:data |
55 |
PLIST_SUB+= DEMO="@comment " \ |
56 |
FULL="" |
57 |
SUB_FILES+= pkg-message |
58 |
UH2_DATA= default.cfg hexen.rc progs.dat progs2.dat strings.txt |
59 |
UH2_DATADIR= ${WRKDIR} |
60 |
.endif |
61 |
|
47 |
|
62 |
.if ${PORT_OPTIONS:MHEXEN2} |
48 |
.if ${PORT_OPTIONS:MHEXEN2} |
63 |
MAKE_ENV+= BUILD_HEXEN2=yes |
49 |
MAKE_ENV+= BUILD_HEXEN2=yes |
Lines 69-83
Link Here
|
69 |
.endif |
55 |
.endif |
70 |
|
56 |
|
71 |
.if ${PORT_OPTIONS:MHW} |
57 |
.if ${PORT_OPTIONS:MHW} |
72 |
. if empty(PORT_OPTIONS:MDEMO) |
|
|
73 |
MASTER_SITES+= SF/${PORTNAME}/Hexen2%20GameData/hexenworld-pakfiles:hw |
58 |
MASTER_SITES+= SF/${PORTNAME}/Hexen2%20GameData/hexenworld-pakfiles:hw |
74 |
DISTFILES+= hexenworld-pakfiles-0.15${EXTRACT_SUFX}:hw |
59 |
DISTFILES+= hexenworld-pakfiles-0.15${EXTRACT_SUFX}:hw |
75 |
. endif |
|
|
76 |
MAKE_ENV+= BUILD_HW=yes |
60 |
MAKE_ENV+= BUILD_HW=yes |
77 |
PLIST_SUB+= HW="" |
61 |
PLIST_SUB+= HW="" |
78 |
UH2_BIN+= engine/hexenworld/client/glhwcl \ |
62 |
UH2_BIN+= engine/hexenworld/client/glhwcl \ |
|
|
63 |
engine/hexenworld/client/hwcl \ |
79 |
engine/hexenworld/server/hwsv \ |
64 |
engine/hexenworld/server/hwsv \ |
80 |
engine/hexenworld/client/hwcl |
65 |
hw_utils/hwmaster/hwmaster |
81 |
.else |
66 |
.else |
82 |
PLIST_SUB+= HW="@comment " |
67 |
PLIST_SUB+= HW="@comment " |
83 |
.endif |
68 |
.endif |
Lines 98-143
Link Here
|
98 |
PLIST_SUB+= LAUNCHER_GTK2="@comment " |
83 |
PLIST_SUB+= LAUNCHER_GTK2="@comment " |
99 |
.endif |
84 |
.endif |
100 |
|
85 |
|
101 |
.if ${PORT_OPTIONS:MX86_ASM} && ${ARCH} == "i386" |
86 |
.if ${PORT_OPTIONS:MLAUNCHER_GTK3} |
|
|
87 |
USE_GNOME+= gtk30 |
88 |
MAKE_ENV+= BUILD_LAUNCHER_GTK3=yes |
89 |
PLIST_SUB+= LAUNCHER_GTK3="" |
90 |
.else |
91 |
PLIST_SUB+= LAUNCHER_GTK3="@comment " |
92 |
.endif |
93 |
|
94 |
.if ${PORT_OPTIONS:MASM} |
102 |
BUILD_DEPENDS+= nasm:${PORTSDIR}/devel/nasm |
95 |
BUILD_DEPENDS+= nasm:${PORTSDIR}/devel/nasm |
103 |
MAKE_ENV+= USE_X86_ASM=yes |
96 |
MAKE_ENV+= USE_X86_ASM=yes |
|
|
97 |
.else |
98 |
MAKE_ENV+= USE_X86_ASM=no |
104 |
.endif |
99 |
.endif |
105 |
|
100 |
|
106 |
post-extract: |
101 |
post-extract: |
107 |
@${CP} ${FILESDIR}/${MAKEFILE} ${WRKSRC} |
102 |
@${CP} ${FILESDIR}/${MAKEFILE} ${WRKSRC} |
108 |
|
103 |
|
|
|
104 |
post-patch: |
105 |
.for f in engine/hexen2/Makefile engine/hexenworld/client/Makefile \ |
106 |
engine/hexenworld/server/Makefile hw_utils/hwmaster/Makefile \ |
107 |
launcher/Makefile libs/timidity/Makefile |
108 |
@${REINPLACE_CMD} -e \ |
109 |
'/^USE_X86_ASM/s|^|#| ; \ |
110 |
/^CPU_X86/s|^|#| ; \ |
111 |
/^CFLAGS/s| -g | | ; \ |
112 |
/^CFLAGS/s| -O2 | | ; \ |
113 |
/^PTHREAD_LIBS/s|-lpthread|-pthread|' ${WRKSRC}/${f} |
114 |
.endfor |
115 |
.for f in engine/h2shared/cd_bsd.c |
116 |
@${REINPLACE_CMD} -e \ |
117 |
's|"acd0"|"cd0"|' ${WRKSRC}/${f} |
118 |
.endfor |
119 |
.for f in engine/hexen2/sys_unix.c engine/hexenworld/client/sys_unix.c |
120 |
@${REINPLACE_CMD} -e \ |
121 |
'/parms.basedir/s|= cwd;|= "${DATADIR}";|' ${WRKSRC}/${f} |
122 |
.endfor |
123 |
|
109 |
do-install: |
124 |
do-install: |
110 |
.for f in ${UH2_BIN} |
125 |
.for f in ${UH2_BIN} |
111 |
${INSTALL_PROGRAM} ${WRKSRC}/${f} ${PREFIX}/bin |
126 |
${INSTALL_PROGRAM} ${WRKSRC}/${f} ${STAGEDIR}${PREFIX}/bin |
112 |
.endfor |
127 |
.endfor |
113 |
${MKDIR} ${DATADIR}/data1 |
128 |
${MKDIR} ${STAGEDIR}${DATADIR}/data1 |
114 |
.for f in ${UH2_DATA} |
129 |
.for f in default.cfg hexen.rc progs.dat progs2.dat strings.txt |
115 |
${INSTALL_DATA} ${UH2_DATADIR}/data1/${f} ${DATADIR}/data1 |
130 |
${INSTALL_DATA} ${WRKDIR}/data1/${f} ${STAGEDIR}${DATADIR}/data1 |
116 |
.endfor |
131 |
.endfor |
117 |
.if empty(PORT_OPTIONS:MDEMO) |
132 |
${INSTALL_DATA} ${WRKDIR}/patchdat/data1/* ${STAGEDIR}${DATADIR}/data1 |
118 |
${INSTALL_DATA} ${WRKDIR}/patchdat/data1/* ${DATADIR}/data1 |
133 |
@(cd ${WRKDIR} && ${COPYTREE_SHARE} portals ${STAGEDIR}${DATADIR}) |
119 |
${CP} -R ${WRKDIR}/portals ${DATADIR} |
|
|
120 |
.endif |
121 |
.if ${PORT_OPTIONS:MHW} |
134 |
.if ${PORT_OPTIONS:MHW} |
122 |
${MKDIR} ${DATADIR}/hw |
135 |
${MKDIR} ${STAGEDIR}${DATADIR}/hw |
123 |
${INSTALL_DATA} ${UH2_DATADIR}/hw/* ${DATADIR}/hw |
136 |
${INSTALL_DATA} ${WRKDIR}/hw/* ${STAGEDIR}${DATADIR}/hw |
124 |
.endif |
137 |
.endif |
125 |
.if ${PORT_OPTIONS:MLAUNCHER_GTK1} |
138 |
.if ${PORT_OPTIONS:MLAUNCHER_GTK1} |
126 |
${INSTALL_PROGRAM} ${WRKSRC}/launcher/h2launcher.gtk1 ${PREFIX}/bin |
139 |
${INSTALL_PROGRAM} ${WRKSRC}/launcher/h2launcher.gtk1 \ |
|
|
140 |
${STAGEDIR}${PREFIX}/bin |
127 |
.endif |
141 |
.endif |
128 |
.if ${PORT_OPTIONS:MLAUNCHER_GTK2} |
142 |
.if ${PORT_OPTIONS:MLAUNCHER_GTK2} |
129 |
${INSTALL_PROGRAM} ${WRKSRC}/launcher/h2launcher.gtk2 ${PREFIX}/bin |
143 |
${INSTALL_PROGRAM} ${WRKSRC}/launcher/h2launcher.gtk2 \ |
|
|
144 |
${STAGEDIR}${PREFIX}/bin |
130 |
.endif |
145 |
.endif |
131 |
.if ${PORT_OPTIONS:MDOCS} |
146 |
.if ${PORT_OPTIONS:MLAUNCHER_GTK3} |
132 |
${MKDIR} ${DOCSDIR} |
147 |
${INSTALL_PROGRAM} ${WRKSRC}/launcher/h2launcher.gtk3 \ |
133 |
${INSTALL_DATA} ${WRKSRC}/docs/* ${DOCSDIR} |
148 |
${STAGEDIR}${PREFIX}/bin |
134 |
.endif |
|
|
135 |
|
136 |
.if empty(PORT_OPTIONS:MDEMO) |
137 |
post-install: |
138 |
@${ECHO_CMD} |
139 |
@${CAT} ${PKGMESSAGE} |
140 |
@${ECHO_CMD} |
141 |
.endif |
149 |
.endif |
|
|
150 |
${MKDIR} ${STAGEDIR}${DOCSDIR} |
151 |
${INSTALL_DATA} ${WRKSRC}/docs/* ${STAGEDIR}${DOCSDIR} |
142 |
|
152 |
|
143 |
.include <bsd.port.post.mk> |
153 |
.include <bsd.port.mk> |