diff options
author | lioux <lioux@FreeBSD.org> | 2006-04-07 18:18:07 +0000 |
---|---|---|
committer | lioux <lioux@FreeBSD.org> | 2006-04-07 18:18:07 +0000 |
commit | f89f6a9b06bbf3039ae30b3c9d82e30ad6b69b1c (patch) | |
tree | 61f86d73cc273b9852d56a1b7162e54474114ff1 /audio/picard/Makefile | |
parent | 8893686c400a1bde40a42e9a408cad0de1cf3ff3 (diff) | |
download | FreeBSD-ports-f89f6a9b06bbf3039ae30b3c9d82e30ad6b69b1c.zip FreeBSD-ports-f89f6a9b06bbf3039ae30b3c9d82e30ad6b69b1c.tar.gz |
New port picard version 0.6.0: Next generation MusicBrainzTagger
Diffstat (limited to 'audio/picard/Makefile')
-rw-r--r-- | audio/picard/Makefile | 96 |
1 files changed, 96 insertions, 0 deletions
diff --git a/audio/picard/Makefile b/audio/picard/Makefile new file mode 100644 index 0000000..215a470 --- /dev/null +++ b/audio/picard/Makefile @@ -0,0 +1,96 @@ +# New ports collection makefile for: picard +# Date created: Sat Aug 20 15:26:15 UTC 2005 +# Whom: Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org> +# +# $FreeBSD$ +# + +PORTNAME= picard +DISTVERSION= 0.6.0 +CATEGORIES= audio python +MASTER_SITES= #https://helixcommunity.org/ + +MAINTAINER= lioux@FreeBSD.org +COMMENT= Next generation MusicBrainzTagger + +RUN_DEPENDS= \ + ${PYTHON_SITELIBDIR}/tunepimp/__init__.py:${PORTSDIR}/audio/py-libtunepimp \ + ${PYTHON_SITELIBDIR}/musicbrainz.py:${PORTSDIR}/audio/py-musicbrainz \ + ${PYTHON_SITELIBDIR}/wx-2.6-gtk2-unicode/wxPython/__init__.py:${PORTSDIR}/x11-toolkits/py-wxPython26-unicode + +USE_PYTHON= yes +USE_PYDISTUTILS=yes + +SOURCEFILE= ${DISTNAME}${EXTRACT_SUFX} +PICARD_MODULES= browser lib ui + +post-extract: +# build a fake module directory structure + @${MKDIR} ${WRKSRC}/${PORTNAME} +.for dir in ${PICARD_MODULES} + @${MV} ${WRKSRC}/${dir} ${WRKSRC}/${PORTNAME} +.endfor +# use a locally made __init__.py to enable the fake +# directory structure to work + @${SED} -E \ + -e 's|%%VERSION%%|${DISTVERSION}|' \ + ${FILESDIR}/__init__.py \ + > ${WRKSRC}/${PORTNAME}/__init__.py +# use a locally made setup + @${CP} ${FILESDIR}/setup.py ${WRKSRC} + +post-patch: +# avoid using such a generic script name + @${MV} ${WRKSRC}/tagger.py ${WRKSRC}/mb_tagger.py +# update the launch script + @${REINPLACE_CMD} -E \ + -e 's|/usr/bin/env python|${PYTHON_CMD}|' \ + -e 's|tagger.py|${PREFIX}/bin/mb_tagger.py|' \ + ${WRKSRC}/MBTagger +# update modules to the fake module directory structure +.for module in ${PICARD_MODULES} + @${FIND} ${WRKSRC}/ -type f -name "*py" \ + -print0 | ${XARGS} -0 -n 1 \ + ${REINPLACE_CMD} -E \ + -e 's|^from[[:space:]]+(${module})|from ${PORTNAME}.\1|' +.endfor + +post-install: + @${LN} -sf MBTagger ${PREFIX}/bin/${PORTNAME} + +pre-everything:: +.ifndef(WITHOUT_PSYCO) + @${ECHO_MSG} '===> Define WITHOUT_PSYCO to disable devel/py-psyco optimization' +.endif + +.include <bsd.port.pre.mk> + +.if ${OSVERSION} < 500000 +IGNORE= Systems prior to FreeBSD 5.0 do not support Unicode +.endif + +.if ${ARCH} != "i386" +WITHOUT_PSYCO= yes +.endif + +.ifndef(WITHOUT_PSYCO) +RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/psyco/_psyco.so:${PORTSDIR}/devel/py-psyco + +EXTRA_PATCHES+= ${FILESDIR}/extra-psyco-patch-tagger.py +.endif + +## idea taken from ports/java/jdk14/Makefile written by +## Alexey Zelkin <phantom@FreeBSD.org> +# +# Check for sources +.if !exists(${DISTDIR}/${SOURCEFILE}) && !defined(PACKAGE_BUILDING) +ECHO_MSG=/usr/bin/printf +IGNORE= :\n\ +Because of licensing restrictions, you must fetch the source distribution\n\ +manually. Please access http://musicbrainz.org/wd/PicardDownload\n\ +with a web browser and download the \"Linux tarball\" ${SOURCEFILE}\n\ +just below \"Download Picard\" title.\n\ +Please place this file in ${DISTDIR}.\n +.endif + +.include <bsd.port.post.mk> |