Sat Nov 16 07:41:02 2013 UTC ()
Update to 4.0.6. Changes:

- Rewrite player to use libxmp 4.0
- Give Pulseaudio higher priority than ALSA
- Give ALSA output higher priority than OSS
- Fix native-endian coreaudio output
- Fix module-specifc flags to override built-in quirks
- Fix loop when skipping to first file and it's not playable

- Add commands '<' and '>' to jump to previous/next sequence
- Add command 'z' to toggle the subsong explorer on/off
- Add option -z <num> to play a specified sequence
- Add option -Z to play all sequences in module
- Add option --loop-all to loop over entire module list


(shattered)
diff -r1.37 -r1.38 pkgsrc/audio/xmp/Makefile
diff -r1.13 -r1.14 pkgsrc/audio/xmp/distinfo
diff -r1.2 -r1.3 pkgsrc/audio/xmp/options.mk
diff -r1.1 -r1.2 pkgsrc/audio/xmp/patches/patch-etc_Makefile
diff -r1.1 -r1.2 pkgsrc/audio/xmp/patches/patch-src_drivers_netbsd.c
diff -r0 -r1.1 pkgsrc/audio/xmp/patches/patch-src_sound_oss.c

cvs diff -r1.37 -r1.38 pkgsrc/audio/xmp/Makefile (expand / switch to unified diff)

--- pkgsrc/audio/xmp/Makefile 2013/02/09 22:11:34 1.37
+++ pkgsrc/audio/xmp/Makefile 2013/11/16 07:41:02 1.38
@@ -1,30 +1,30 @@ @@ -1,30 +1,30 @@
1# $NetBSD: Makefile,v 1.37 2013/02/09 22:11:34 ryoon Exp $ 1# $NetBSD: Makefile,v 1.38 2013/11/16 07:41:02 shattered Exp $
2 2
3DISTNAME= xmp-3.4.1 3DISTNAME= xmp-4.0.6
4PKGREVISION= 7 
5CATEGORIES= audio 4CATEGORIES= audio
6MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=xmp/} 5MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=xmp/}
7 6
8MAINTAINER= rxg@NetBSD.org 7MAINTAINER= rxg@NetBSD.org
9HOMEPAGE= http://xmp.sourceforge.net/ 8HOMEPAGE= http://xmp.sourceforge.net/
10COMMENT= Player for many different Amiga and PC module formats 9COMMENT= Player for many different Amiga and PC module formats
11LICENSE= gnu-gpl-v2 10LICENSE= gnu-gpl-v2
12 11
13MAKE_JOBS_SAFE= no 12MAKE_JOBS_SAFE= no
14 13
15GNU_CONFIGURE= yes 14GNU_CONFIGURE= yes
16CONFIGURE_ARGS+=--sysconfdir=${PKG_SYSCONFDIR} 15CONFIGURE_ARGS+=--sysconfdir=${PKG_SYSCONFDIR}
17 16
18USE_TOOLS+= gmake pkg-config 17USE_TOOLS+= gmake pkg-config
19 18
20EGDIR= ${PREFIX}/share/examples/xmp 19EGDIR= ${PREFIX}/share/examples/xmp
21CONF_FILES= ${EGDIR}/modules.conf ${PKG_SYSCONFDIR}/xmp/modules.conf 20CONF_FILES= ${EGDIR}/modules.conf ${PKG_SYSCONFDIR}/xmp/modules.conf
22CONF_FILES+= ${EGDIR}/xmp.conf ${PKG_SYSCONFDIR}/xmp/xmp.conf 21CONF_FILES+= ${EGDIR}/xmp.conf ${PKG_SYSCONFDIR}/xmp/xmp.conf
23 22
24INSTALLATION_DIRS= bin ${PKGMANDIR}/man1 ${EGDIR} 23INSTALLATION_DIRS= bin ${PKGMANDIR}/man1 ${EGDIR}
25 24
26INSTALL_MAKE_FLAGS+= INSTALL=${INSTALL:Q} 25INSTALL_MAKE_FLAGS+= INSTALL=${INSTALL:Q}
27 26
28.include "options.mk" 27.include "options.mk"
29 28
 29.include "../../audio/libxmp/buildlink3.mk"
30.include "../../mk/bsd.pkg.mk" 30.include "../../mk/bsd.pkg.mk"

cvs diff -r1.13 -r1.14 pkgsrc/audio/xmp/distinfo (expand / switch to unified diff)

--- pkgsrc/audio/xmp/distinfo 2011/11/26 21:10:03 1.13
+++ pkgsrc/audio/xmp/distinfo 2013/11/16 07:41:02 1.14
@@ -1,7 +1,8 @@ @@ -1,7 +1,8 @@
1$NetBSD: distinfo,v 1.13 2011/11/26 21:10:03 shattered Exp $ 1$NetBSD: distinfo,v 1.14 2013/11/16 07:41:02 shattered Exp $
2 2
3SHA1 (xmp-3.4.1.tar.gz) = 2883818ddc66ba691b4e7e834be13e800f701021 3SHA1 (xmp-4.0.6.tar.gz) = 61a7d68e4c37e7407bd35c783821bfbc2b639c87
4RMD160 (xmp-3.4.1.tar.gz) = be007df5102cce9dcd3367097d65ecb535b7d25e 4RMD160 (xmp-4.0.6.tar.gz) = 1eb6834cefd450d88de9b018e14ec4f88b8c015b
5Size (xmp-3.4.1.tar.gz) = 858787 bytes 5Size (xmp-4.0.6.tar.gz) = 208541 bytes
6SHA1 (patch-etc_Makefile) = 86844aab3f490f857c92096e088df9463c2617d6 6SHA1 (patch-etc_Makefile) = 5816b82a6253a627b39ff2ca262bfb5675ca97e3
7SHA1 (patch-src_drivers_netbsd.c) = 39196154d1a52d3962540e6f2d175f0e9280449c 7SHA1 (patch-src_drivers_netbsd.c) = eb3b77cafc86dc9fba298c5bdfbeb0b889d9ea9c
 8SHA1 (patch-src_sound_oss.c) = 251a09075ade185e33938be67776e7740473a6a5

cvs diff -r1.2 -r1.3 pkgsrc/audio/xmp/options.mk (expand / switch to unified diff)

--- pkgsrc/audio/xmp/options.mk 2011/04/05 05:22:52 1.2
+++ pkgsrc/audio/xmp/options.mk 2013/11/16 07:41:02 1.3
@@ -1,16 +1,17 @@ @@ -1,16 +1,17 @@
1# $NetBSD: options.mk,v 1.2 2011/04/05 05:22:52 rxg Exp $ 1# $NetBSD: options.mk,v 1.3 2013/11/16 07:41:02 shattered Exp $
2 2
3PKG_OPTIONS_VAR= PKG_OPTIONS.xmp 3PKG_OPTIONS_VAR= PKG_OPTIONS.xmp
 4# XXX configure.ac is broken, you cannot disable oss and alsa at the moment.
4PKG_SUPPORTED_OPTIONS= alsa arts esound nas oss pulseaudio 5PKG_SUPPORTED_OPTIONS= alsa arts esound nas oss pulseaudio
5 6
6.include "../../mk/bsd.prefs.mk" 7.include "../../mk/bsd.prefs.mk"
7 8
8.if ${OPSYS} == "Linux" 9.if ${OPSYS} == "Linux"
9PKG_SUGGESTED_OPTIONS= alsa 10PKG_SUGGESTED_OPTIONS= alsa
10.elif ${OPSYS} == "Darwin" || ${OPSYS} == "Interix" 11.elif ${OPSYS} == "Darwin" || ${OPSYS} == "Interix"
11# No native support for these OS's, so use esound for audio output 12# No native support for these OS's, so use esound for audio output
12PKG_SUGGESTED_OPTIONS= esound 13PKG_SUGGESTED_OPTIONS= esound
13.endif 14.endif
14PKG_SUGGESTED_OPTIONS+= pulseaudio 15PKG_SUGGESTED_OPTIONS+= pulseaudio
15 16
16.include "../../mk/bsd.options.mk" 17.include "../../mk/bsd.options.mk"
@@ -32,24 +33,26 @@ CONFIGURE_ARGS+=--enable-arts @@ -32,24 +33,26 @@ CONFIGURE_ARGS+=--enable-arts
32.if !empty(PKG_OPTIONS:Mesound) 33.if !empty(PKG_OPTIONS:Mesound)
33CONFIGURE_ARGS+=--enable-esd 34CONFIGURE_ARGS+=--enable-esd
34. include "../../audio/esound/buildlink3.mk" 35. include "../../audio/esound/buildlink3.mk"
35.endif 36.endif
36 37
37# Nas support 38# Nas support
38.if !empty(PKG_OPTIONS:Mnas) 39.if !empty(PKG_OPTIONS:Mnas)
39CONFIGURE_ARGS+=--enable-nas 40CONFIGURE_ARGS+=--enable-nas
40. include "../../audio/nas/buildlink3.mk" 41. include "../../audio/nas/buildlink3.mk"
41.endif 42.endif
42 43
43# Oss support 44# Oss support
44.if !empty(PKG_OPTIONS:Moss) 45.if !empty(PKG_OPTIONS:Moss)
45# empty 46. include "../../mk/oss.buildlink3.mk"
 47LIBS+= ${LIBOSSAUDIO}
 48CPPFLAGS+= -DDEVOSSAUDIO="\"${DEVOSSAUDIO}\""
 49CPPFLAGS+= -DDEVOSSSOUND="\"${DEVOSSSOUND}\""
46.else 50.else
47CONFIGURE_ARGS+=--disable-oss 51CONFIGURE_ARGS+=--disable-oss
48CONFIGURE_ARGS+=--disable-oss-sequencer 
49.endif 52.endif
50 53
51# Pulseaudio support 54# Pulseaudio support
52.if !empty(PKG_OPTIONS:Mpulseaudio) 55.if !empty(PKG_OPTIONS:Mpulseaudio)
53CONFIGURE_ARGS+=--enable-pulseaudio 56CONFIGURE_ARGS+=--enable-pulseaudio
54. include "../../audio/pulseaudio/buildlink3.mk" 57. include "../../audio/pulseaudio/buildlink3.mk"
55.endif 58.endif

cvs diff -r1.1 -r1.2 pkgsrc/audio/xmp/patches/patch-etc_Makefile (expand / switch to unified diff)

--- pkgsrc/audio/xmp/patches/patch-etc_Makefile 2011/04/05 05:22:52 1.1
+++ pkgsrc/audio/xmp/patches/patch-etc_Makefile 2013/11/16 07:41:02 1.2
@@ -1,19 +1,28 @@ @@ -1,19 +1,28 @@
1$NetBSD: patch-etc_Makefile,v 1.1 2011/04/05 05:22:52 rxg Exp $ 1$NetBSD: patch-etc_Makefile,v 1.2 2013/11/16 07:41:02 shattered Exp $
2 2
3--- etc/Makefile.orig 2010-01-09 22:34:20.000000000 +0000 3--- src/Makefile.in.orig 2013-05-19 14:44:09.000000000 +0000
4+++ etc/Makefile 4+++ src/Makefile.in
5@@ -4,10 +4,10 @@ ETC_PATH = etc 5@@ -509,18 +509,18 @@ uninstall-man1:
 6 dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir)
 7 install-pkgsysconfDATA: $(pkgsysconf_DATA)
 8 @$(NORMAL_INSTALL)
 9- @list='$(pkgsysconf_DATA)'; test -n "$(pkgsysconfdir)" || list=; \
 10+ @list='$(pkgsysconf_DATA)'; test -n "$(datarootdir)/examples/xmp" || list=; \
 11 if test -n "$$list"; then \
 12- echo " $(MKDIR_P) '$(DESTDIR)$(pkgsysconfdir)'"; \
 13- $(MKDIR_P) "$(DESTDIR)$(pkgsysconfdir)" || exit 1; \
 14+ echo " $(MKDIR_P) '$(DESTDIR)$(datarootdir)/examples/xmp/'"; \
 15+ $(MKDIR_P) "$(DESTDIR)$(datarootdir)/examples/xmp/" || exit 1; \
 16 fi; \
 17 for p in $$list; do \
 18 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
 19 echo "$$d$$p"; \
 20 done | $(am__base_list) | \
 21 while read files; do \
 22- echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgsysconfdir)'"; \
 23- $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgsysconfdir)" || exit $$?; \
 24+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(datarootdir)/examples/xmp/'"; \
 25+ $(INSTALL_DATA) $$files "$(DESTDIR)$(datarootdir)/examples/xmp/" || exit $$?; \
 26 done
6  27
7 install-etc: 28 uninstall-pkgsysconfDATA:
8 @[ -d $(DESTDIR)$(SYSCONFDIR) ] || mkdir -p $(DESTDIR)$(SYSCONFDIR) 
9- @echo "Installing xmp.conf in $(SYSCONFDIR)" 
10- @$(INSTALL_DATA) $(ETC_PATH)/xmp.conf $(DESTDIR)$(SYSCONFDIR)/ 
11- @echo "Installing modules.conf in $(SYSCONFDIR)" 
12- @$(INSTALL_DATA) $(ETC_PATH)/modules.conf $(DESTDIR)$(SYSCONFDIR)/ 
13+ @echo "Installing xmp.conf in ${DESTDIR}$(datarootdir)/examples/xmp" 
14+ @$(INSTALL_DATA) $(ETC_PATH)/xmp.conf $(DESTDIR)$(datarootdir)/examples/xmp/ 
15+ @echo "Installing modules.conf in ${DESTDIR}$(datarootdir)/examples/xmp" 
16+ @$(INSTALL_DATA) $(ETC_PATH)/modules.conf $(DESTDIR)$(datarootdir)/examples/xmp/ 
17  
18 dist-etc: 
19 mkdir -p $(DIST)/$(ETC_PATH) 

cvs diff -r1.1 -r1.2 pkgsrc/audio/xmp/patches/patch-src_drivers_netbsd.c (expand / switch to unified diff)

--- pkgsrc/audio/xmp/patches/patch-src_drivers_netbsd.c 2011/04/05 05:22:52 1.1
+++ pkgsrc/audio/xmp/patches/patch-src_drivers_netbsd.c 2013/11/16 07:41:02 1.2
@@ -1,13 +1,39 @@ @@ -1,13 +1,39 @@
1$NetBSD: patch-src_drivers_netbsd.c,v 1.1 2011/04/05 05:22:52 rxg Exp $ 1$NetBSD: patch-src_drivers_netbsd.c,v 1.2 2013/11/16 07:41:02 shattered Exp $
2 2
3--- src/drivers/netbsd.c.orig 2010-01-09 22:34:20.000000000 +0000 3--- src/sound_netbsd.c.orig 2013-04-06 13:38:02.000000000 +0000
4+++ src/drivers/netbsd.c 4+++ src/sound_netbsd.c
5@@ -174,7 +174,7 @@ static void bufdump(struct xmp_context * 5@@ -68,21 +68,23 @@ static int init(struct options *options)
 6
 7 AUDIO_INITINFO(&ainfo);
 8
 9+ ainfo.mode = AUMODE_PLAY_ALL;
 10 ainfo.play.sample_rate = options->rate;
 11 ainfo.play.channels = options->format & XMP_FORMAT_MONO ? 1 : 2;
 12
 13 if (options->format & XMP_FORMAT_8BIT) {
 14 ainfo.play.precision = 8;
 15- ainfo.play.precision = AUDIO_ENCODING_ULINEAR;
 16+ ainfo.play.encoding = AUDIO_ENCODING_ULINEAR;
 17 options->format |= XMP_FORMAT_UNSIGNED;
 18 } else {
 19 ainfo.play.precision = 16;
 20- ainfo.play.precision = AUDIO_ENCODING_SLINEAR;
 21+ ainfo.play.encoding = AUDIO_ENCODING_SLINEAR;
 22 options->format &= ~XMP_FORMAT_UNSIGNED;
 23 }
 24
 25 ainfo.play.gain = gain;
 26 ainfo.play.buffer_size = bsize;
 27+ ainfo.blocksize = 0;
 28
 29 if (ioctl(audio_fd, AUDIO_SETINFO, &ainfo) == -1) {
 30 close(audio_fd);
 31@@ -99,7 +101,7 @@ static void play(void *b, int i)
6 while (i) { 32 while (i) {
7 if ((j = write(audio_fd, b, i)) > 0) { 33 if ((j = write(audio_fd, b, i)) > 0) {
8 i -= j; 34 i -= j;
9- (char *)b += j; 35- (char *)b += j;
10+ b = (char *)b + j; 36+ b = (char *)b + j;
11 } else 37 } else
12 break; 38 break;
13 } 39 }

File Added: pkgsrc/audio/xmp/patches/patch-src_sound_oss.c
$NetBSD: patch-src_sound_oss.c,v 1.1 2013/11/16 07:41:02 shattered Exp $

--- src/sound_oss.c.orig	2013-04-06 13:38:02.000000000 +0000
+++ src/sound_oss.c
@@ -109,7 +109,7 @@ static void setaudio(int *rate, int *for
 static int init(struct options *options)
 {
 	char **parm = options->driver_parm;
-	static const char *dev_audio[] = { "/dev/dsp", "/dev/sound/dsp" };
+	static const char *dev_audio[] = { DEVOSSAUDIO, "/dev/sound/dsp" };
 	audio_buf_info info;
 	static char buf[80];
 	int i;