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