diff options
author | jbeich <jbeich@FreeBSD.org> | 2016-11-03 20:21:56 +0800 |
---|---|---|
committer | jbeich <jbeich@FreeBSD.org> | 2016-11-03 20:21:56 +0800 |
commit | 790b6f689313cb33aa6ac584d86a56897bae72c1 (patch) | |
tree | db6ee24d8e3bbdcf00e8182dc82b65ea7377879d /audio | |
parent | cedb2a294f53907f33238e393e4d5d4756860457 (diff) | |
download | freebsd-ports-graphics-790b6f689313cb33aa6ac584d86a56897bae72c1.tar.gz freebsd-ports-graphics-790b6f689313cb33aa6ac584d86a56897bae72c1.tar.zst freebsd-ports-graphics-790b6f689313cb33aa6ac584d86a56897bae72c1.zip |
audio/timidity: modernize
- Convert to option helpers
- Convert to COPYTREE_SHARE, CONFLICTS_INSTALL
- Turn goemon font into an actual option
- Use TDIR/TCONFIG variables more
Tested by: mtree -k sha256 -cp <before> | mtree -p <after> # is silent
Diffstat (limited to 'audio')
-rw-r--r-- | audio/timidity/Makefile | 55 |
1 files changed, 25 insertions, 30 deletions
diff --git a/audio/timidity/Makefile b/audio/timidity/Makefile index 62cc1ee86ef..5920aefaeae 100644 --- a/audio/timidity/Makefile +++ b/audio/timidity/Makefile @@ -6,39 +6,35 @@ PORTREVISION= 1 CATEGORIES= audio MASTER_SITES+= http://www.onicos.com/staff/iz/timidity/dist/:timidity DISTFILES+= ${DISTNAME}.tar.gz:timidity -EXTRACT_ONLY= ${DISTNAME}.tar.gz MAINTAINER= ports@FreeBSD.org COMMENT= MIDI to PCM software synthesizer -CONFLICTS= timidity++-2.* - LICENSE= GPLv2+ LICENSE_FILE= ${WRKSRC}/COPYING +CONFLICTS_INSTALL= timidity++-2.* + USES= alias ncurses -TIINS= goemon.tgz INSTALL_TARGET= install.all -OPTIONS_DEFINE= GUSPAT -GUSPAT_DESC= Use audio/guspat instead of included sound fonts (goemon) - -.include <bsd.port.options.mk> - -# Set up sound fonts from audio/guspat. -.if ${PORT_OPTIONS:MGUSPAT} -RUN_DEPENDS+= ${LOCALBASE}/share/guspat/power.cfg:audio/guspat -TDIR= ${LOCALBASE}/share/timidity -TCONFIG= timidity.cfg-guspat -PLIST_SUB+= GOEMON="@comment " -.else -# Set up default sound fonts (goemon). -MASTER_SITES+= http://www.anime.net/~goemon/timidity/:tiins -DISTFILES+= ${TIINS}:tiins -TDIR= ${PREFIX}/lib/timidity -TCONFIG= goemon.cfg -PLIST_SUB+= GOEMON="" -.endif +OPTIONS_SINGLE= FONTS +OPTIONS_SINGLE_FONTS= GOEMON GUSPAT +OPTIONS_DEFAULT=GOEMON +OPTIONS_SUB= yes + +FONTS_DESC= Default sound fonts + +GUSPAT_DESC= Use from audio/guspat port +GUSPAT_RUN_DEPENDS= ${LOCALBASE}/share/guspat/power.cfg:audio/guspat +GUSPAT_VARS= TDIR="${LOCALBASE}/share/timidity" \ + TCONFIG=timidity.cfg-guspat + +GOEMON_DESC= Bundle from Goemon's patchkit #' +GOEMON_MASTER_SITES= http://www.anime.net/~goemon/timidity/:tiins +GOEMON_DISTFILES= goemon.tgz:tiins +GOEMON_VARS= TDIR="${PREFIX}/lib/timidity" \ + TCONFIG=goemon.cfg post-patch: ${REINPLACE_CMD} -e 's,machine/soundcard.h,sys/soundcard.h,' \ @@ -46,12 +42,11 @@ post-patch: ${REINPLACE_CMD} -e 's|%%TDIR%%|${TDIR}| ; s|%%TCONFIG%%|${TCONFIG}|' \ ${WRKSRC}/timidity.cfg -post-install: -.if ! ${PORT_OPTIONS:MGUSPAT} - cd ${STAGEDIR}${PREFIX}/lib/timidity && \ - ${TAR} --no-same-owner --no-same-permissions -zxf ${DISTDIR}/${TIINS} && \ - ${REINPLACE_CMD} -i "" -e 's,dir goemon,dir ${PREFIX}/lib/timidity/goemon,' \ - goemon.cfg -.endif +post-patch-GOEMON-on: + ${REINPLACE_CMD} -i '' -e '/^dir/s,goemon,${TDIR}/&,' \ + ${WRKDIR}/${TCONFIG} + +post-install-GOEMON-on: + (cd ${WRKDIR} && ${COPYTREE_SHARE} "goemon*" ${STAGEDIR}${TDIR}) .include <bsd.port.mk> |