blob: 3c1672a3822ca35242384ce5003214f50f8c99a6 (
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
85
86
87
88
89
90
91
92
93
94
95
96
|
# Created by: Elias Mandouvalos <ocean@mail.gr>
# $FreeBSD$
PORTNAME= karaoke
PORTVERSION= 0.7.5
PORTREVISION= 10
CATEGORIES= audio python
MASTER_SITES= SF/py${PORTNAME}/py${PORTNAME}/${PORTVERSION}
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
DISTNAME= py${PORTNAME}-${PORTVERSION}
MAINTAINER= ports@FreeBSD.org
COMMENT= Python karaoke application (Plays CD+G, MP3+G, OGG+G files)
LICENSE= LGPL21+
BUILD_DEPENDS= ${PYGAME} \
${LOCALBASE}/libdata/pkgconfig/pthread-stubs.pc:devel/libpthread-stubs
LIB_DEPENDS= libaa.so:graphics/aalib
RUN_DEPENDS= dejavu>0:x11-fonts/dejavu \
${PYGAME} \
${PYNUMPY}
USES= compiler:c++11-lib desktop-file-utils iconv python:2 zip
USE_SDL= sdl
USE_XORG= x11 xau xcb xdmcp
USE_WX= 3.0+
WX_COMPS= python:lib
USE_PYTHON= distutils autoplist
DATADIR= ${PREFIX}/share/py${PORTNAME}
PLIST_FILES= ${BIN_SCRIPTS:S,^,bin/,} \
${DATA_FONTS:S,^,%%DATADIR%%/fonts/,}
OPTIONS_DEFINE= MUTAGEN
MUTAGEN_DESC= Mutagen support
MUTAGEN_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}mutagen>0:audio/py-mutagen
BIN_SCRIPTS= cdg2mpg pycdg pykar pykaraoke pykaraoke_mini pympg
DATA_FONTS= DejaVuSans.ttf DejaVuSansCondensed.ttf \
DejaVuSansCondensed-Bold.ttf
.include <bsd.port.pre.mk>
.if ${OPSYS} == FreeBSD && ${CHOSEN_COMPILER_TYPE} == gcc
MAKE_ENV+= LD_LIBRARY_PATH="${LOCALBASE}/lib/${CC}:$$LD_LIBRARY_PATH"
.endif
post-patch:
@${REINPLACE_CMD} -e \
's|%%LOCALBASE%%|${LOCALBASE}|' ${WRKSRC}/setup.cfg
@${REINPLACE_CMD} -e \
'/if /s|==|=|' ${WRKSRC}/install/cdg2mpg
.for i in pykaraoke.desktop pykaraoke_mini.desktop
@${REINPLACE_CMD} -e \
'/^Encodings=/d ; \
/^Icon=/s|/usr/share/pykaraoke|${DATADIR}| ; \
/^MimeType=/s|audio/midi$$|audio/midi;| ; \
/^Categories=/s|Application;||' ${WRKSRC}/install/${i}
.endfor
post-build:
@${MKDIR} ${WRKDIR}/wrappers
.for i in ${BIN_SCRIPTS}
@${ECHO_CMD} -n \
>> ${WRKDIR}/wrappers/${i}
@${ECHO_CMD} '#!/bin/sh' \
>> ${WRKDIR}/wrappers/${i}
.if ${OPSYS} == FreeBSD && ${CHOSEN_COMPILER_TYPE} == gcc
@${ECHO_CMD} 'LD_LIBRARY_PATH="${LOCALBASE}/lib/${CC}:$$LD_LIBRARY_PATH"' \
>> ${WRKDIR}/wrappers/${i}
@${ECHO_CMD} 'export LD_LIBRARY_PATH' \
>> ${WRKDIR}/wrappers/${i}
@${ECHO_CMD} \
>> ${WRKDIR}/wrappers/${i}
.endif
@${ECHO_CMD} 'exec ${PREFIX}/libexec/${i} "$$@"' \
>> ${WRKDIR}/wrappers/${i}
.endfor
post-install:
.for i in ${BIN_SCRIPTS}
(cd ${WRKDIR}/wrappers && ${INSTALL_SCRIPT} ${i} \
${STAGEDIR}${PREFIX}/bin)
.endfor
@${MKDIR} ${STAGEDIR}${DATADIR}/fonts
.for i in ${DATA_FONTS}
@${LN} -sf ${LOCALBASE}/share/fonts/dejavu/${i} \
${STAGEDIR}${DATADIR}/fonts
.endfor
@${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/_pycdgAux.so
.include <bsd.port.post.mk>
|