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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
|
# New ports collection makefile for: mplayer gui skins
# Date created: Sat Jan 12 10:59:45 BRST 2002
# Whom: Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>
#
# $FreeBSD$
#
PORTNAME= mplayer
PORTVERSION= 1.0.2
CATEGORIES= graphics
MASTER_SITES= http://www.mplayerhq.hu/MPlayer/Skin/ \
http://ftp.mplayerhq.hu/MPlayer/Skin/ \
http://www2.mplayerhq.hu/MPlayer/Skin/ \
http://ftp2.mplayerhq.hu/MPlayer/Skin/
PKGNAMESUFFIX= -skins
DISTFILES=
EXTRACT_ONLY=
DIST_SUBDIR= mplayer
MAINTAINER= riggs@rrr.de
USE_SUBMAKE= yes
USE_BZIP2= yes
NO_WRKSUBDIR= yes
NO_BUILD= yes
SCRIPTS_ENV= WRKDIRPREFIX="${WRKDIRPREFIX}"
PLIST_SUB= myDATADIR="${myDATADIR}" \
TOP_myDATADIR="${myDATADIR:S!Skin/$!!}" \
PKGNAME="${PKGNAME}"
INSTALL_DIR= ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755
SORT?= /usr/bin/sort
myDATADIR= share/${PORTNAME}/Skin/
# Used by other ports to detect if this is installed
SKIN_DETECTION_FILE= ${LOCALBASE}/${myDATADIR}/${PKGNAME}
# port style based on apsfilter by Andreas Klemm <andreas@FreeBSD.org>
#
# XXX - needs improvement
# We could fetch only those skins chosen for installation.
# However, this breaks both checksum and makesum targets.
# Ideas?
.if defined(BATCH)
WITH_SKIN_DEFAULT=yes
.endif # BATCH
.if !defined(BATCH)
pre-fetch:
@${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc
@${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/choice
post-clean:
@${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc
.if exists(${WRKDIRPREFIX}${.CURDIR}/Makefile.inc)
.include "${WRKDIRPREFIX}${.CURDIR}/Makefile.inc"
.endif
.endif
# hint: you can now draw the following decisions for batch mode
# - WITH_SKIN_ALL install all skins
#
# Build and install all skins (rather expensive)
#
.if defined(WITH_SKIN_ALL)
WITH_SKIN_DEFAULT=yes
WITH_SKIN_ALIENMIND=yes
WITH_SKIN_AVIFILE=yes
WITH_SKIN_BLUEHEART=yes
WITH_SKIN_CORNERMP=yes
WITH_SKIN_CORNERMP_AGUA=yes
WITH_SKIN_CUBICPLAYER=yes
WITH_SKIN_CYRUS=yes
WITH_SKIN_HWSW_SKIN=yes
WITH_SKIN_MENTALIC=yes
WITH_SKIN_MIDNIGHTLOVE=yes
WITH_SKIN_NETSCAPE4=yes
WITH_SKIN_NEUTRON=yes
WITH_SKIN_PHONY=yes
WITH_SKIN_PLASTIC=yes
WITH_SKIN_PROTON=yes
WITH_SKIN_SLIM=yes
WITH_SKIN_WINDOWSMEDIAPLAYER6=yes
WITH_SKIN_XANIM=yes
WITH_SKIN_XINE_LCD=yes
. endif # WITH_SKIN_ALL
#
# files to fetch
#
DISTFILES+= default.tar.bz2
.ifdef(WITH_SKIN_DEFAULT)
EXTRACT_ONLY+= default.tar.bz2
PLIST_SUB+= DEFAULT=""
.else
PLIST_SUB+= DEFAULT="@comment "
.endif
DISTFILES+= AlienMind.tar.bz2
.ifdef(WITH_SKIN_ALIENMIND)
EXTRACT_ONLY+= AlienMind.tar.bz2
PLIST_SUB+= ALIENMIND=""
.else
PLIST_SUB+= ALIENMIND="@comment "
.endif
DISTFILES+= avifile.tar.bz2
.ifdef(WITH_SKIN_AVIFILE)
EXTRACT_ONLY+= avifile.tar.bz2
PLIST_SUB+= AVIFILE=""
.else
PLIST_SUB+= AVIFILE="@comment "
.endif
DISTFILES+= BlueHeart.tar.bz2
.ifdef(WITH_SKIN_BLUEHEART)
EXTRACT_ONLY+= BlueHeart.tar.bz2
PLIST_SUB+= BLUEHEART=""
.else
PLIST_SUB+= BLUEHEART="@comment "
.endif
DISTFILES+= CornerMP.tar.bz2
.ifdef(WITH_SKIN_CORNERMP)
EXTRACT_ONLY+= CornerMP.tar.bz2
PLIST_SUB+= CORNERMP=""
.else
PLIST_SUB+= CORNERMP="@comment "
.endif
DISTFILES+= CornerMP-aqua.tar.bz2
.ifdef(WITH_SKIN_CORNERMP_AGUA)
EXTRACT_ONLY+= CornerMP-aqua.tar.bz2
PLIST_SUB+= CORNERMP_AGUA=""
.else
PLIST_SUB+= CORNERMP_AGUA="@comment "
.endif
DISTFILES+= CubicPlayer.tar.bz2
.ifdef(WITH_SKIN_CUBICPLAYER)
EXTRACT_ONLY+= CubicPlayer.tar.bz2
PLIST_SUB+= CUBICPLAYER=""
.else
PLIST_SUB+= CUBICPLAYER="@comment "
.endif
DISTFILES+= Cyrus.tar.bz2
.ifdef(WITH_SKIN_CYRUS)
EXTRACT_ONLY+= Cyrus.tar.bz2
PLIST_SUB+= CYRUS=""
.else
PLIST_SUB+= CYRUS="@comment "
.endif
DISTFILES+= hwswskin.tar.bz2
.ifdef(WITH_SKIN_HWSW_SKIN)
EXTRACT_ONLY+= hwswskin.tar.bz2
PLIST_SUB+= HWSW_SKIN=""
.else
PLIST_SUB+= HWSW_SKIN="@comment "
.endif
DISTFILES+= mentalic.tar.bz2
.ifdef(WITH_SKIN_MENTALIC)
EXTRACT_ONLY+= mentalic.tar.bz2
PLIST_SUB+= MENTALIC=""
.else
PLIST_SUB+= MENTALIC="@comment "
.endif
DISTFILES+= MidnightLove.tar.bz2
.ifdef(WITH_SKIN_MIDNIGHTLOVE)
EXTRACT_ONLY+= MidnightLove.tar.bz2
PLIST_SUB+= MIDNIGHTLOVE=""
.else
PLIST_SUB+= MIDNIGHTLOVE="@comment "
.endif
DISTFILES+= netscape4.tar.bz2
.ifdef(WITH_SKIN_NETSCAPE4)
EXTRACT_ONLY+= netscape4.tar.bz2
PLIST_SUB+= NETSCAPE4=""
.else
PLIST_SUB+= NETSCAPE4="@comment "
.endif
DISTFILES+= neutron.tar.bz2
.ifdef(WITH_SKIN_NEUTRON)
EXTRACT_ONLY+= neutron.tar.bz2
PLIST_SUB+= NEUTRON=""
.else
PLIST_SUB+= NEUTRON="@comment "
.endif
DISTFILES+= phony.tar.bz2
.ifdef(WITH_SKIN_PHONY)
EXTRACT_ONLY+= phony.tar.bz2
PLIST_SUB+= PHONY=""
.else
PLIST_SUB+= PHONY="@comment "
.endif
DISTFILES+= plastic.tar.bz2
.ifdef(WITH_SKIN_PLASTIC)
EXTRACT_ONLY+= plastic.tar.bz2
PLIST_SUB+= PLASTIC=""
.else
PLIST_SUB+= PLASTIC="@comment "
.endif
DISTFILES+= proton.tar.bz2
.ifdef(WITH_SKIN_PROTON)
EXTRACT_ONLY+= proton.tar.bz2
PLIST_SUB+= PROTON=""
.else
PLIST_SUB+= PROTON="@comment "
.endif
DISTFILES+= slim.tar.bz2
.ifdef(WITH_SKIN_SLIM)
EXTRACT_ONLY+= slim.tar.bz2
PLIST_SUB+= SLIM=""
.else
PLIST_SUB+= SLIM="@comment "
.endif
DISTFILES+= WindowsMediaPlayer6.tar.bz2
.ifdef(WITH_SKIN_WINDOWSMEDIAPLAYER6)
EXTRACT_ONLY+= WindowsMediaPlayer6.tar.bz2
PLIST_SUB+= WINDOWSMEDIAPLAYER6=""
.else
PLIST_SUB+= WINDOWSMEDIAPLAYER6="@comment "
.endif
DISTFILES+= xanim.tar.bz2
.ifdef(WITH_SKIN_XANIM)
EXTRACT_ONLY+= xanim.tar.bz2
PLIST_SUB+= XANIM=""
.else
PLIST_SUB+= XANIM="@comment "
.endif
DISTFILES+= xine-lcd.tar.bz2
.ifdef(WITH_SKIN_XINE_LCD)
EXTRACT_ONLY+= xine-lcd.tar.bz2
PLIST_SUB+= XINE_LCD=""
.else
PLIST_SUB+= XINE_LCD="@comment "
.endif
pre-install:
# marker file
@${CP} /dev/null ${WRKSRC}/${PKGNAME}
# Following idea borrowed from halflifeserver port
# Parses PLIST
# creates dirs from @dirrm entries
# copies files from non ^@ entries
do-install: install-parse-plist install-run-scripts
# kaboom, ashes to ashes, .... The problem is dead :)
# Contributed by <lioux@FreeBSD.org>
install-parse-plist: generate-plist
@${PERL} -e 'open(FHANDLER,"${TMPPLIST}");' \
-e 'open(FDIR,">${WRKDIR}/dirs.sh.tmp");' \
-e 'open(FFILES,">${WRKDIR}/files.sh");' \
-e 'while (!eof(FHANDLER)) {' \
-e 'chop($$file = <FHANDLER>);' \
-e '$$dir = $$file_partial = $$file;' \
-e '$$file_partial =~ s!^${myDATADIR}!!;' \
-e 'print FDIR "${INSTALL_DIR}", \
" ", "\"${PREFIX}/$$dir\"", \
"\n" if $$dir =~ s!(^\@dirrm\s+)!!;' \
-e 'print FFILES "${INSTALL_DATA}", \
" ", "\"${WRKDIR}/$$file_partial\"", \
" ", "\"${PREFIX}/$$file\"", \
"\n" if ($$file !~ m!^\@!);' \
-e '}' \
-e 'close(FFILES);' \
-e 'close(FDIR);' \
-e 'close(FHANDLER);'
# we want it sorted
@${SORT} ${WRKDIR}/dirs.sh.tmp > ${WRKDIR}/dirs.sh
install-run-scripts:
.for script in dirs files
@${SH} ${WRKDIR}/${script}.sh
.endfor
.include <bsd.port.mk>
|