aboutsummaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authormarino <marino@FreeBSD.org>2015-10-10 18:13:50 +0800
committermarino <marino@FreeBSD.org>2015-10-10 18:13:50 +0800
commitdbbe3fe58aba3be48976cfd39fb85f39cb97e6b1 (patch)
tree726c89497b6955844c34761c791c0b1b25ff22a5 /audio
parentd0b20201ef53a357efc8aaa0c258314898829f53 (diff)
downloadfreebsd-ports-gnome-dbbe3fe58aba3be48976cfd39fb85f39cb97e6b1.tar.gz
freebsd-ports-gnome-dbbe3fe58aba3be48976cfd39fb85f39cb97e6b1.tar.zst
freebsd-ports-gnome-dbbe3fe58aba3be48976cfd39fb85f39cb97e6b1.zip
audio/py-karaoke: Fix runtime error on F9
PR: 199216 Submitted by: ports fury
Diffstat (limited to 'audio')
-rw-r--r--audio/py-karaoke/Makefile52
-rw-r--r--audio/py-karaoke/files/patch-setup.py8
-rw-r--r--audio/py-karaoke/pkg-plist3
3 files changed, 51 insertions, 12 deletions
diff --git a/audio/py-karaoke/Makefile b/audio/py-karaoke/Makefile
index 4f2cdb7231cd..044e81101c2a 100644
--- a/audio/py-karaoke/Makefile
+++ b/audio/py-karaoke/Makefile
@@ -3,7 +3,7 @@
PORTNAME= karaoke
PORTVERSION= 0.7.5
-PORTREVISION= 8
+PORTREVISION= 9
CATEGORIES= audio python
MASTER_SITES= SF/py${PORTNAME}/py${PORTNAME}/${PORTVERSION}
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@@ -14,14 +14,14 @@ COMMENT= Python karaoke application (Plays CD+G, MP3+G, OGG+G files)
LICENSE= LGPL21 # (or later)
-BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}game>0:${PORTSDIR}/devel/py-game
+BUILD_DEPENDS= ${PYGAME}
LIB_DEPENDS= libpthread-stubs.so:${PORTSDIR}/devel/libpthread-stubs \
libaa.so:${PORTSDIR}/graphics/aalib
-RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}game>0:${PORTSDIR}/devel/py-game \
- dejavu>0:${PORTSDIR}/x11-fonts/dejavu \
+RUN_DEPENDS= dejavu>0:${PORTSDIR}/x11-fonts/dejavu \
+ ${PYGAME} \
${PYNUMPY}
-USES= desktop-file-utils iconv python:2 zip
+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+
@@ -31,11 +31,24 @@ USE_PYTHON= distutils autoplist
DATADIR= ${PREFIX}/share/py${PORTNAME}
-OPTIONS_DEFINE= MUTAGEN
+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:${PORTSDIR}/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
@@ -49,12 +62,35 @@ post-patch:
/^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 DejaVuSans.ttf DejaVuSansCondensed-Bold.ttf DejaVuSansCondensed.ttf
+.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.mk>
+.include <bsd.port.post.mk>
diff --git a/audio/py-karaoke/files/patch-setup.py b/audio/py-karaoke/files/patch-setup.py
index 1183adc89e91..a1d701f51f8c 100644
--- a/audio/py-karaoke/files/patch-setup.py
+++ b/audio/py-karaoke/files/patch-setup.py
@@ -1,6 +1,6 @@
--- setup.py.orig 2011-06-15 03:59:31.000000000 +0900
+++ setup.py 2012-09-28 07:03:50.000000000 +0900
-@@ -61,12 +61,7 @@
+@@ -61,17 +61,12 @@
'icons/microphone.ico',
'icons/microphone.png',
'icons/pykaraoke.xpm',
@@ -14,3 +14,9 @@
# These data files only make sense on Unix-like systems.
if env != ENV_WINDOWS:
+ data_files += [
+- ('bin', ['install/pykaraoke',
++ ('libexec', ['install/pykaraoke',
+ 'install/pykaraoke_mini',
+ 'install/pycdg',
+ 'install/pykar',
diff --git a/audio/py-karaoke/pkg-plist b/audio/py-karaoke/pkg-plist
deleted file mode 100644
index bdf0d7b90c63..000000000000
--- a/audio/py-karaoke/pkg-plist
+++ /dev/null
@@ -1,3 +0,0 @@
-%%DATADIR%%/fonts/DejaVuSans.ttf
-%%DATADIR%%/fonts/DejaVuSansCondensed-Bold.ttf
-%%DATADIR%%/fonts/DejaVuSansCondensed.ttf