aboutsummaryrefslogtreecommitdiff
path: root/audio/xmcd
diff options
context:
space:
mode:
authorMichael Gmelin <grembo@FreeBSD.org>2014-05-26 10:10:55 +0000
committerMichael Gmelin <grembo@FreeBSD.org>2014-05-26 10:10:55 +0000
commit43ef32944a4b0583656d6ed2fd17b7a1ba0ac9de (patch)
tree857882d530e06e5e0919b3a02718b802e9cad46b /audio/xmcd
parentf78ab020cbd0c6b8273369d157823c7a71a0ecaf (diff)
downloadports-43ef32944a4b0583656d6ed2fd17b7a1ba0ac9de.tar.gz
ports-43ef32944a4b0583656d6ed2fd17b7a1ba0ac9de.zip
Notes
Diffstat (limited to 'audio/xmcd')
-rw-r--r--audio/xmcd/Makefile40
-rw-r--r--audio/xmcd/files/pkg-message.in8
-rw-r--r--audio/xmcd/pkg-plist4
3 files changed, 44 insertions, 8 deletions
diff --git a/audio/xmcd/Makefile b/audio/xmcd/Makefile
index 1832a8856a6b..733bf580ba88 100644
--- a/audio/xmcd/Makefile
+++ b/audio/xmcd/Makefile
@@ -15,15 +15,12 @@ LIB_DEPENDS+= libvorbis.so:${PORTSDIR}/audio/libvorbis \
RUN_DEPENDS+= lame:${PORTSDIR}/audio/lame
USES= imake motif
-NO_STAGE= yes
USE_XORG= x11 xext xaw xmu xp xpm xt sm ice
-MAN1= cda.1 xmcd.1
-MANCOMPRESSED= no
PLIST_SUB+= RELEASE=${OSREL:R:R} ARCH=${ARCH}
SUB_FILES= pkg-message
PKGMESSAGE= ${WRKDIR}/pkg-message
-LIBBINDIR= ${PREFIX}/lib/X11/xmcd/bin-FreeBSD_${OSREL:R:R}-${ARCH}
+LIBBINDIR= ${STAGEDIR}${PREFIX}/lib/X11/xmcd/bin-FreeBSD_${OSREL:R:R}-${ARCH}
post-extract:
@${CHMOD} -R u+w ${WRKSRC}
@@ -32,19 +29,48 @@ pre-patch:
@${CP} ${WRKSRC}/xmcd_d/XMcd.ad ${WRKSRC}/xmcd_d/XMcd.ad.in
post-patch:
- @${SED} -e "s;@PREFIX@;${PREFIX};g" ${WRKSRC}/xmcd_d/XMcd.ad.in \
+ @${SED} -e "s;@PREFIX@;${STAGDIR}${PREFIX};g" ${WRKSRC}/xmcd_d/XMcd.ad.in \
> ${WRKSRC}/xmcd_d/XMcd.ad
@${FIND} ${WRKSRC} -name Makefile -o -name Imakefile | \
${XARGS} ${REINPLACE_CMD} \
-e 's|_CFLAGS= -pthread|_CFLAGS= ${PTHREAD_CFLAGS}|g; \
s|_LDFLAGS= -pthread|_LDFLAGS= ${PTHREAD_LIBS}|g'
+post-configure:
+ @${REINPLACE_CMD} \
+ -e 's: BINDIR .*:BINDIR=${STAGEDIR}${PREFIX}/bin:' \
+ -e 's: LIBDIR .*:LIBDIR=${STAGEDIR}${PREFIX}/lib/X11:' \
+ -e 's: MANDIR .*:MANDIR=${STAGEDIR}${PREFIX}/man/man1:' \
+ -e 's: MANSUFFIX .*:MANSUFFIX=1:' \
+ -e 's/^Makefile::/^Makefile:/' \
+ ${WRKSRC}/Makefile
+ @${REINPLACE_CMD} \
+ -e 's/^XBINPERM=4711/XBINPERM=711/' \
+ -e "s/^(id \| fgrep 'uid=0(root)')/true/" >/dev/null 2>&1 \
+ ${WRKSRC}/install.sh
+
post-install:
@${STRIP_CMD} ${LIBBINDIR}/cda
@${STRIP_CMD} ${LIBBINDIR}/gobrowser
@${STRIP_CMD} ${LIBBINDIR}/has_alsa
@${STRIP_CMD} ${LIBBINDIR}/xmcd
- @${CAT} ${PKGMESSAGE}
- @${CP} ${WRKSRC}/xmcd_d/XMcd.ad ${PREFIX}/lib/X11/app-defaults/XMcd
+ @${CP} ${WRKSRC}/xmcd_d/XMcd.ad ${STAGEDIR}${PREFIX}/lib/X11/app-defaults/XMcd
+ @${RM} ${STAGEDIR}${PREFIX}/bin/xmcd
+ @${RM} ${STAGEDIR}${PREFIX}/bin/cda
+ @${LN} -sf .xmcd_start ${STAGEDIR}${PREFIX}/bin/xmcd
+ @${LN} -sf .xmcd_start ${STAGEDIR}${PREFIX}/bin/cda
+ @${REINPLACE_CMD} \
+ -e 's:^BINDIR=.*:XMCDLIB=${PREFIX}/bin:' \
+ -e 's:^XMCDLIB=.*:XMCDLIB=${PREFIX}/lib/X11/xmcd:' \
+ -e 's:^DISCOGDIR=.*:DISCOGDIR=${PREFIX}/lib/X11/xmcd/discog:' \
+ -e 's:XMCD_LIBDIR=.*:XMCD_LIBDIR=${PREFIX}/lib/X11/xmcd:' \
+ ${STAGEDIR}${PREFIX}/lib/X11/xmcd/scripts/genidx \
+ ${STAGEDIR}${PREFIX}/bin/.xmcd_start
+ @${REINPLACE_CMD} \
+ -e 's:${STAGEDIR}::' \
+ ${STAGEDIR}${PREFIX}/lib/X11/xmcd/discog/discog.html \
+ ${STAGEDIR}${PREFIX}/lib/X11/xmcd/config/config.sh \
+ ${STAGEDIR}${PREFIX}/lib/X11/xmcd/bin-FreeBSD_9-amd64/README
+ @${FIND} ${STAGEDIR} -name \*.bak -delete
.include <bsd.port.mk>
diff --git a/audio/xmcd/files/pkg-message.in b/audio/xmcd/files/pkg-message.in
index b92f700bb988..a7ff62b834ce 100644
--- a/audio/xmcd/files/pkg-message.in
+++ b/audio/xmcd/files/pkg-message.in
@@ -7,4 +7,12 @@ If you would like to submit data to CDDB you will need
to install mail/mailx or add something similar to
the following line in your Xdefaults:
XMcd.cddbMailCmd: mail -s '%S' %A <%F >/dev/null 2>&1
+
+xmcd and cda are not suid anymore, so if you want
+to allow non-root users to use xmcd or cda, either
+set the suid bit yourself, or even better, allow
+access to /dev/cd0 in /etc/devfs.conf, e.g.
+
+perm /dev/cd0 0664
+
*******************************************************
diff --git a/audio/xmcd/pkg-plist b/audio/xmcd/pkg-plist
index cfed3c1f4a7f..300906e6ad5b 100644
--- a/audio/xmcd/pkg-plist
+++ b/audio/xmcd/pkg-plist
@@ -287,9 +287,11 @@ lib/X11/xmcd/pixmaps/xmcd_a.px
lib/X11/xmcd/pixmaps/xmcd_b.px
lib/X11/xmcd/pixmaps/xmcd.xpm
lib/X11/xmcd/scripts/genidx
+man/man1/cda.1.gz
+man/man1/xmcd.1.gz
@dirrm lib/X11/xmcd/app-defaults
@dirrm lib/X11/xmcd/bin-FreeBSD_%%RELEASE%%-%%ARCH%%
-@unexec rm -rf %D/lib/X11/xmcd/lib-FreeBSD_%%RELEASE%%-%%ARCH%% 2>&1 >/dev/null || true
+@dirrmtry lib/X11/xmcd/lib-FreeBSD_%%RELEASE%%-%%ARCH%%
@dirrm lib/X11/xmcd/config/.tbl
@dirrm lib/X11/xmcd/config
@dirrm lib/X11/xmcd/discog/Blues/General_Blues