summaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authorshattered <shattered@pkgsrc.org>2009-01-09 20:43:53 +0000
committershattered <shattered@pkgsrc.org>2009-01-09 20:43:53 +0000
commit9dd267ac854ff23d205f9b496b89a1a79477d026 (patch)
treead9f23376f0461c2337d6c2eddee628e75433872 /audio
parent4e9777c612b3ddf705d490016ad7072eae0c1ac0 (diff)
downloadpkgsrc-9dd267ac854ff23d205f9b496b89a1a79477d026.tar.gz
Update to 2.5.1, from PR 38499. May also solve PR 38712.
6 years passed since 2.0.4, too much changes happened to list here. Most of them seem to fix various playback accuracy issues. Many patches were merged upstream. Major change -- X11 frontend (xxmp) is missing, there's nothing in change log about that. pkgsrc change: pulseaudio support (default on). OK by wiz@.
Diffstat (limited to 'audio')
-rw-r--r--audio/xmp/Makefile15
-rw-r--r--audio/xmp/PLIST4
-rw-r--r--audio/xmp/distinfo27
-rw-r--r--audio/xmp/patches/patch-aa15
-rw-r--r--audio/xmp/patches/patch-ab22
-rw-r--r--audio/xmp/patches/patch-ac23
-rw-r--r--audio/xmp/patches/patch-ad13
-rw-r--r--audio/xmp/patches/patch-ae23
-rw-r--r--audio/xmp/patches/patch-af27
-rw-r--r--audio/xmp/patches/patch-ag10
-rw-r--r--audio/xmp/patches/patch-ah12
-rw-r--r--audio/xmp/patches/patch-ai12
-rw-r--r--audio/xmp/patches/patch-aj12
-rw-r--r--audio/xmp/patches/patch-ak13
-rw-r--r--audio/xmp/patches/patch-al10
-rw-r--r--audio/xmp/patches/patch-am153
-rw-r--r--audio/xmp/patches/patch-an159
17 files changed, 46 insertions, 504 deletions
diff --git a/audio/xmp/Makefile b/audio/xmp/Makefile
index 290feec6a5f..9e9f6d60be4 100644
--- a/audio/xmp/Makefile
+++ b/audio/xmp/Makefile
@@ -1,10 +1,8 @@
-# $NetBSD: Makefile,v 1.20 2007/01/26 18:23:30 joerg Exp $
+# $NetBSD: Makefile,v 1.21 2009/01/09 20:43:53 shattered Exp $
-DISTNAME= xmp-2.0.4
-PKGREVISION= 3
+DISTNAME= xmp-2.5.1
CATEGORIES= audio
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=xmp/}
-EXTRACT_SUFX= .tar.bz2
MAINTAINER= rxg@NetBSD.org
HOMEPAGE= http://xmp.sourceforge.net/
@@ -14,7 +12,7 @@ GNU_CONFIGURE= yes
CONFIGURE_ARGS+=--disable-alsa \
--disable-oss \
--disable-xmms \
- --sysconfdir=${PKG_SYSCONFDIR:Q}
+ --sysconfdir=${PKG_SYSCONFDIR}
USE_TOOLS+= gmake
@@ -22,6 +20,7 @@ EGDIR= ${PREFIX}/share/examples/xmp
CONF_FILES= ${EGDIR}/xmp-modules.conf ${PKG_SYSCONFDIR}/xmp-modules.conf
CONF_FILES+= ${EGDIR}/xmp.conf ${PKG_SYSCONFDIR}/xmp.conf
+.include "options.mk"
.include "../../mk/bsd.prefs.mk"
.if ${OPSYS} == "Darwin" || ${OPSYS} == "Interix"
@@ -32,10 +31,4 @@ CONF_FILES+= ${EGDIR}/xmp.conf ${PKG_SYSCONFDIR}/xmp.conf
pre-install:
${INSTALL_DATA_DIR} ${EGDIR}
-BUILDLINK_DEPMETHOD.libXt?= build
-
-.include "../../x11/libX11/buildlink3.mk"
-.include "../../x11/libXext/buildlink3.mk"
-.include "../../x11/libXt/buildlink3.mk"
-.include "../../x11/xextproto/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/audio/xmp/PLIST b/audio/xmp/PLIST
index 7c902840f34..cdef4a03192 100644
--- a/audio/xmp/PLIST
+++ b/audio/xmp/PLIST
@@ -1,8 +1,6 @@
-@comment $NetBSD: PLIST,v 1.2 2002/12/22 17:05:51 jmmv Exp $
+@comment $NetBSD: PLIST,v 1.3 2009/01/09 20:43:53 shattered Exp $
bin/xmp
-bin/xxmp
man/man1/xmp.1
-man/man1/xxmp.1
share/examples/xmp/xmp-modules.conf
share/examples/xmp/xmp.conf
@dirrm share/examples/xmp
diff --git a/audio/xmp/distinfo b/audio/xmp/distinfo
index 0a087add0b3..9321ddd6b13 100644
--- a/audio/xmp/distinfo
+++ b/audio/xmp/distinfo
@@ -1,19 +1,10 @@
-$NetBSD: distinfo,v 1.9 2006/06/30 12:54:37 tron Exp $
+$NetBSD: distinfo,v 1.10 2009/01/09 20:43:53 shattered Exp $
-SHA1 (xmp-2.0.4.tar.bz2) = 35c1578f2f6728aa2ec92f34ada050e328694167
-RMD160 (xmp-2.0.4.tar.bz2) = c1c0c3af63d1f3e43fe6b47ca55725e0922fe2f1
-Size (xmp-2.0.4.tar.bz2) = 314820 bytes
-SHA1 (patch-aa) = e5ce08ae036f947c2486dcf5def72bc0a65a6600
-SHA1 (patch-ab) = 9d4732f57cf045a3904b8d9627ccb866d39e0fb0
-SHA1 (patch-ac) = 0efcb2f094f149c56da96a6ba7ba9a59ed06dc4d
-SHA1 (patch-ad) = 7b2c1f5c10b4b8a766bcca7bc4d7d9f538e89db1
-SHA1 (patch-ae) = e136083ec69df5b32cb741bb14173f58fa613574
-SHA1 (patch-af) = 96743b9d31adec688a0bcab05bd8b32a9e162a54
-SHA1 (patch-ag) = 431875a9a1889e0c63620c04a78473116c090fae
-SHA1 (patch-ah) = d6119a1d0ef33bf58bd443b2f18d72cb9ea1956a
-SHA1 (patch-ai) = 7882313a892f2043a051fdc2b49161ae209824ba
-SHA1 (patch-aj) = 5364b5135e8e2bd60bbf6cbcd00adac99611f2ce
-SHA1 (patch-ak) = 93a9abfc66a526d52bd62ece5b9d8cd727f816e7
-SHA1 (patch-al) = 902a0c5311f560d5bf01e3946d785bca932131d3
-SHA1 (patch-am) = 601b55de29ca76ab4671fc3470181544b5770f1a
-SHA1 (patch-an) = bd021634555751a78cc1f5af61aa83c4d1e3287f
+SHA1 (xmp-2.5.1.tar.gz) = 20ce22f453e49adb590b3cbd3ae3e812eb7de4ee
+RMD160 (xmp-2.5.1.tar.gz) = 5fcd7f62b34424e5848806244485d5960a068cc8
+Size (xmp-2.5.1.tar.gz) = 772595 bytes
+SHA1 (patch-ac) = e6db4ff056954cf25030160cf12c30e45b24fda1
+SHA1 (patch-ag) = 813d3c73334cb025b2900d398fb8be8ec2b42d22
+SHA1 (patch-ah) = 0807af0d328f578cacf121d12370cd59841d9924
+SHA1 (patch-al) = d909468c772325acf3d5e16daeaf7e62a36c7582
+SHA1 (patch-am) = d22d3310225f070327ec891046bd5113b6352251
diff --git a/audio/xmp/patches/patch-aa b/audio/xmp/patches/patch-aa
deleted file mode 100644
index b8dca8f51dd..00000000000
--- a/audio/xmp/patches/patch-aa
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-aa,v 1.3 2002/12/22 17:05:51 jmmv Exp $
-
---- Makefile.orig Sat Jan 20 02:51:28 2001
-+++ Makefile Mon Jan 28 15:30:21 2002
-@@ -43,8 +44,8 @@
-
- install::
- @echo
-- @echo " Installation complete. To customize, copy /etc/xmp.conf to"
-- @echo " \$$HOME/.xmp/xmp.conf and /etc/xmp-modules.conf to \$$HOME/.xmp/modules.conf"
-+ @echo " Installation complete. To customize, copy ${ETC_DIR}/xmp.conf to"
-+ @echo " \$$HOME/.xmp/xmp.conf and ${ETC_DIR}/xmp-modules.conf to \$$HOME/.xmp/modules.conf"
- @echo
- @echo " Please report bugs to xmp-bugs@helllabs.org."
- @echo
diff --git a/audio/xmp/patches/patch-ab b/audio/xmp/patches/patch-ab
deleted file mode 100644
index 4613f0a5b32..00000000000
--- a/audio/xmp/patches/patch-ab
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD: patch-ab,v 1.3 2002/12/22 17:05:52 jmmv Exp $
-
---- src/player/readrc.c.orig Wed Jan 3 11:50:08 2001
-+++ src/player/readrc.c Mon Jan 28 15:28:59 2002
-@@ -58,7 +58,7 @@
- if ((rc = fopen (myrc2, "r")) == NULL) {
- if ((rc = fopen (myrc, "r")) == NULL) {
- #ifndef __EMX__
-- if ((rc = fopen ("/etc/xmp.conf", "r")) == NULL) {
-+ if ((rc = fopen (ETC_DIR "/xmp.conf", "r")) == NULL) {
- #else
- if ((rc = fopen ("xmp.conf", "r")) == NULL) {
- #endif
-@@ -206,7 +206,7 @@
- myrc = malloc ((home ? strlen (home) : 0) + 20);
- #ifndef __EMX__
- sprintf (myrc, "%s/.xmp/modules.conf", home);
-- parse_modconf (ctl, "/etc/xmp-modules.conf", crc, size);
-+ parse_modconf (ctl, ETC_DIR "/xmp-modules.conf", crc, size);
- #else
- sprintf (myrc, "%s\\.xmp\\modules.conf", home);
- parse_modconf (ctl, "xmp-modules.conf", crc, size);
diff --git a/audio/xmp/patches/patch-ac b/audio/xmp/patches/patch-ac
index 89f9894e65c..5e44161719d 100644
--- a/audio/xmp/patches/patch-ac
+++ b/audio/xmp/patches/patch-ac
@@ -1,19 +1,14 @@
-$NetBSD: patch-ac,v 1.3 2002/12/22 17:05:52 jmmv Exp $
+$NetBSD: patch-ac,v 1.4 2009/01/09 20:43:53 shattered Exp $
---- etc/Makefile.orig Fri Dec 29 19:06:28 2000
+--- etc/Makefile.orig 2007-10-23 11:28:30.000000000 +0000
+++ etc/Makefile
-@@ -13,12 +13,6 @@ subdist:: all
- include ../Makefile.rules
+@@ -14,7 +14,6 @@ subdist:: all
+ include $(TOPDIR)/Makefile.rules
install::
-- @echo Installing xmp.conf and xmp-modules.conf in $(DEST_DIR)...
-- @if [ -f $(DEST_DIR)/etc/xmp.conf ]; then \
-- mv -f $(DEST_DIR)/etc/xmp.conf $(DEST_DIR)/etc/xmp.conf.old; \
-- fi
-- @if [ -f $(DEST_DIR)/etc/xmp-modules.conf ]; then \
-- mv -f $(DEST_DIR)/etc/xmp-modules.conf $(DEST_DIR)/etc/xmp-modules.conf.old; \
-- fi
-- $(INSTALL) -m644 xmp.conf xmp-modules.conf $(DEST_DIR)/etc
-+ @echo Installing xmp.conf and xmp-modules.conf in $(datadir)/examples/xmp...
-+ $(INSTALL) -m644 xmp.conf xmp-modules.conf $(datadir)/examples/xmp
+- @echo Installing xmp.conf and xmp-modules.conf in $(SYSCONFDIR)...
+- @[ -d $(DESTDIR)$(SYSCONFDIR) ] || mkdir -p $(DESTDIR)$(SYSCONFDIR)
+- $(INSTALL) -m644 xmp.conf xmp-modules.conf $(DESTDIR)$(SYSCONFDIR)/
++ @echo Installing xmp.conf and xmp-modules.conf in $(datarootdir)/examples/xmp...
++ $(INSTALL) -m644 xmp.conf xmp-modules.conf $(datarootdir)/examples/xmp
diff --git a/audio/xmp/patches/patch-ad b/audio/xmp/patches/patch-ad
deleted file mode 100644
index 2daf0e595cb..00000000000
--- a/audio/xmp/patches/patch-ad
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ad,v 1.2 2002/01/29 07:41:28 martti Exp $
-
---- src/main/Makefile.orig Tue Jan 16 01:54:02 2001
-+++ src/main/Makefile Mon Jan 28 15:32:24 2002
-@@ -7,7 +7,7 @@
- XDEPS =
- BINS = xmp $(X_XMP)
- XLIBS = -L../../lib -lxmp -lm #-lefence
--X11LIBS = -lX11 -lXext
-+X11LIBS = -lX11 -lXext -Wl,-R${X11BASE}/lib
- XPMS = bg1.xpm bg2.xpm bg3.xpm
- DFILES = Makefile $(OBJS:.o=.c) $(X11OBJS:.o=.c) main.c xpanel.h $(XPMS) \
- simple.c
diff --git a/audio/xmp/patches/patch-ae b/audio/xmp/patches/patch-ae
deleted file mode 100644
index b359b676638..00000000000
--- a/audio/xmp/patches/patch-ae
+++ /dev/null
@@ -1,23 +0,0 @@
-$NetBSD: patch-ae,v 1.2 2004/05/16 17:11:30 danw Exp $
-
---- Makefile.rules.in.orig Fri Jan 19 20:51:53 2001
-+++ Makefile.rules.in
-@@ -7,14 +7,16 @@ DATE = Fri Jan 19 23:51:53 BRST 2001
- DEST_DIR=
- prefix = $(DEST_DIR)@prefix@
- exec_prefix= $(DEST_DIR)@prefix@
-+datadir = @datadir@
-+ETC_DIR = @sysconfdir@
- BIN_DIR = @bindir@
- LIB_DIR = @libdir@
- MAN_DIR = @mandir@/man1
-
- CC = @CC@
--CFLAGS = -c @CFLAGS@ @DEFS@ @CINCS@
-+CFLAGS = -c @CFLAGS@ @DEFS@ @CINCS@ -DETC_DIR=\"${ETC_DIR}\"
- LD = @CC@
--LDFLAGS = -o$@ @LDFLAGS@
-+LDFLAGS = -o $@ @LDFLAGS@
- RANLIB = @RANLIB@
- INSTALL = @INSTALL@
- LIBS = @LIBS@ $(XLIBS)
diff --git a/audio/xmp/patches/patch-af b/audio/xmp/patches/patch-af
deleted file mode 100644
index 664750fac33..00000000000
--- a/audio/xmp/patches/patch-af
+++ /dev/null
@@ -1,27 +0,0 @@
-$NetBSD: patch-af,v 1.1 2003/09/22 09:30:05 tron Exp $
-
---- src/loaders/it_load.c.orig 2000-12-29 19:08:28.000000000 +0100
-+++ src/loaders/it_load.c 2003-09-22 11:27:16.000000000 +0200
-@@ -327,14 +327,14 @@
-
- #define BUILD_ENV(X) { \
- fread (&env, 1, sizeof (env), f); \
-- xxih[i].##X##ei.flg = env.flg & IT_ENV_ON ? XXM_ENV_ON : 0; \
-- xxih[i].##X##ei.flg |= env.flg & IT_ENV_LOOP ? XXM_ENV_LOOP : 0; \
-- xxih[i].##X##ei.flg |= env.flg & IT_ENV_SLOOP ? XXM_ENV_SUS : 0; \
-- xxih[i].##X##ei.npt = env.num; \
-- xxih[i].##X##ei.sus = env.slb; \
-- xxih[i].##X##ei.sue = env.sle; \
-- xxih[i].##X##ei.lps = env.lpb; \
-- xxih[i].##X##ei.lpe = env.lpe; \
-+ xxih[i].X##ei.flg = env.flg & IT_ENV_ON ? XXM_ENV_ON : 0; \
-+ xxih[i].X##ei.flg |= env.flg & IT_ENV_LOOP ? XXM_ENV_LOOP : 0; \
-+ xxih[i].X##ei.flg |= env.flg & IT_ENV_SLOOP ? XXM_ENV_SUS : 0; \
-+ xxih[i].X##ei.npt = env.num; \
-+ xxih[i].X##ei.sus = env.slb; \
-+ xxih[i].X##ei.sue = env.sle; \
-+ xxih[i].X##ei.lps = env.lpb; \
-+ xxih[i].X##ei.lpe = env.lpe; \
- if (env.num) xx##X##e[i] = calloc (4, env.num); \
- for (j = 0; j < env.num; j++) { \
- L_ENDIAN16 (env.node[j].x); \
diff --git a/audio/xmp/patches/patch-ag b/audio/xmp/patches/patch-ag
index b55f3e25148..292dd0fe0c2 100644
--- a/audio/xmp/patches/patch-ag
+++ b/audio/xmp/patches/patch-ag
@@ -1,12 +1,12 @@
-$NetBSD: patch-ag,v 1.1 2004/05/16 17:11:30 danw Exp $
+$NetBSD: patch-ag,v 1.2 2009/01/09 20:43:53 shattered Exp $
---- configure.orig Sat May 15 09:48:55 2004
+--- configure.orig 2007-12-03 00:32:25.000000000 +0000
+++ configure
-@@ -593,7 +593,6 @@ CINCS="${CPPFLAGS}"
- PLUGIN=""
+@@ -1851,7 +1851,6 @@ CINCS="${CPPFLAGS}"
+ PLUGINS=""
-LDFLAGS=""
- X_XMP="xxmp"
+ DRIVERS=""
diff --git a/audio/xmp/patches/patch-ah b/audio/xmp/patches/patch-ah
index b2d9b4c0828..93a7ddfbd2e 100644
--- a/audio/xmp/patches/patch-ah
+++ b/audio/xmp/patches/patch-ah
@@ -1,12 +1,12 @@
-$NetBSD: patch-ah,v 1.1 2004/05/16 17:11:30 danw Exp $
+$NetBSD: patch-ah,v 1.2 2009/01/09 20:43:53 shattered Exp $
---- src/Makefile.orig Sat May 15 10:09:32 2004
+--- src/Makefile.orig 2007-10-21 12:59:15.000000000 +0000
+++ src/Makefile
-@@ -2,7 +2,7 @@
-
+@@ -4,7 +4,7 @@
+ TOPDIR = ../
DFILES = Makefile
- _DIRS = drivers include loaders player misc main
--DDIRS = $(_DIRS) os2 xmms
+ _DIRS = drivers include loaders prowizard player misc main plugin
+-DDIRS = $(_DIRS) os2
+DDIRS = $(_DIRS)
CFILES =
DCFILES =
diff --git a/audio/xmp/patches/patch-ai b/audio/xmp/patches/patch-ai
deleted file mode 100644
index 7b345dba508..00000000000
--- a/audio/xmp/patches/patch-ai
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD: patch-ai,v 1.1 2005/12/11 20:20:34 joerg Exp $
-
---- src/loaders/ac1d_load.c.orig 2005-12-11 20:07:34.000000000 +0000
-+++ src/loaders/ac1d_load.c
-@@ -150,6 +150,7 @@ int ac1d_load (FILE *f)
- case 0x0a:
- event->fxt = 0x00;
- case 0x0f:
-+ break;
- }
- }
- }
diff --git a/audio/xmp/patches/patch-aj b/audio/xmp/patches/patch-aj
deleted file mode 100644
index f8195bcc6a3..00000000000
--- a/audio/xmp/patches/patch-aj
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD: patch-aj,v 1.1 2005/12/11 20:20:34 joerg Exp $
-
---- src/loaders/pp10_load.c.orig 2005-12-11 20:08:22.000000000 +0000
-+++ src/loaders/pp10_load.c
-@@ -226,6 +226,7 @@ int pha_load (FILE *f)
- case 0x0a:
- event->fxt = 0x00;
- case 0x0f:
-+ break;
- }
- }
-
diff --git a/audio/xmp/patches/patch-ak b/audio/xmp/patches/patch-ak
deleted file mode 100644
index fa6ca4be397..00000000000
--- a/audio/xmp/patches/patch-ak
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ak,v 1.1 2006/06/30 12:54:38 tron Exp $
-
---- src/drivers/file.c.orig 2000-12-29 18:08:07.000000000 +0000
-+++ src/drivers/file.c 2006-06-30 11:43:38.000000000 +0100
-@@ -91,7 +91,7 @@
- while (i) {
- if ((j = write (audio_fd, b, i)) > 0) {
- i -= j;
-- (char *)b += j;
-+ b = (char *)b + j;
- } else
- break;
- };
diff --git a/audio/xmp/patches/patch-al b/audio/xmp/patches/patch-al
index 2e1d4820c23..ad781d60a0e 100644
--- a/audio/xmp/patches/patch-al
+++ b/audio/xmp/patches/patch-al
@@ -1,8 +1,8 @@
-$NetBSD: patch-al,v 1.1 2006/06/30 12:54:38 tron Exp $
+$NetBSD: patch-al,v 1.2 2009/01/09 20:43:53 shattered Exp $
---- src/drivers/netbsd.c.orig 2000-12-29 18:08:08.000000000 +0000
-+++ src/drivers/netbsd.c 2006-06-30 12:11:46.000000000 +0100
-@@ -182,7 +182,7 @@
+--- src/drivers/netbsd.c.orig 2007-11-11 16:06:52.000000000 +0000
++++ src/drivers/netbsd.c
+@@ -182,7 +182,7 @@ static void bufdump(struct xmp_context *
while (i) {
if ((j = write (audio_fd, b, i)) > 0) {
i -= j;
@@ -10,4 +10,4 @@ $NetBSD: patch-al,v 1.1 2006/06/30 12:54:38 tron Exp $
+ b = (char *)b + j;
} else
break;
- };
+ }
diff --git a/audio/xmp/patches/patch-am b/audio/xmp/patches/patch-am
index cb750c22ba1..68ed675042f 100644
--- a/audio/xmp/patches/patch-am
+++ b/audio/xmp/patches/patch-am
@@ -1,155 +1,16 @@
-$NetBSD: patch-am,v 1.1 2006/06/30 12:54:38 tron Exp $
+$NetBSD: patch-am,v 1.2 2009/01/09 20:43:53 shattered Exp $
---- src/loaders/mdl_load.c.orig 2000-12-29 18:08:33.000000000 +0000
-+++ src/loaders/mdl_load.c 2006-06-30 12:57:09.000000000 +0100
-@@ -35,6 +35,35 @@
- static struct mdl_envelope *v_env;
- static struct mdl_envelope *p_env;
-
-+static void *
-+get_uint16_le(void *p, uint16_t *x16)
-+{
-+ uint8_t *bp;
-+
-+ bp = p;
-+ *x16 = bp[0] | (bp[1] << 8);
-+ return bp + sizeof(uint16);
-+}
-+
-+static void *
-+get_uint16_le_int(void *p, int *ip)
-+{
-+ uint8_t *bp;
-+
-+ bp = p;
-+ *ip = bp[0] | (bp[1] << 8);
-+ return bp + sizeof(uint16);
-+}
-+
-+static void *
-+get_uint32_le_int(void *p, int *ip)
-+{
-+ uint8_t *bp;
-+
-+ bp = p;
-+ *ip = bp[0] | (bp[1] << 8) | (bp[2] << 16) | (bp[3] << 24);
-+ return bp + sizeof(uint32);
-+}
-
- /* Effects 1-6 (note effects) can only be entered in the first effect
- * column, G-L (volume-effects) only in the second column.
-@@ -130,7 +159,8 @@
+--- src/loaders/mdl_load.c.orig 2007-11-12 22:12:40.000000000 +0000
++++ src/loaders/mdl_load.c
+@@ -181,8 +181,9 @@ static unsigned int get_bits(char i, uin
unsigned int x;
if (i == 0) {
-- b = *((uint32 *)(*buf))++;
+- b = *((uint32 *)(*buf));
+- *buf += 4; *len -= 4;
+ (void)memcpy(&b, *buf, sizeof(b));
+ *buf += sizeof(b);
++ *len -= sizeof(b);
n = 32;
return 0;
}
-@@ -268,8 +298,7 @@
-
- buffer += 16; /* Skip pattern name */
- for (j = 0; j < chn; j++) {
-- x16 = *((uint16 *)buffer)++;
-- L_ENDIAN16 (x16);
-+ buffer = get_uint16_le(buffer, &x16);
- xxp[i]->info[j].index = x16;
- }
- if (V (0))
-@@ -297,8 +326,7 @@
- xxp[i]->rows = 64;
-
- for (j = 0; j < 32; j++) {
-- x16 = *((uint16 *)buffer)++;
-- L_ENDIAN16 (x16);
-+ buffer = get_uint16_le(buffer, &x16);
- if (j < xxh->chn)
- xxp[i]->info[j].index = x16;
- }
-@@ -315,7 +343,8 @@
- int i, j, k, row, len;
- struct xxm_track *track;
-
-- xxh->trk = *((uint16 *) buffer)++ + 1;
-+ buffer = get_uint16_le_int(buffer, &xxh->trk);
-+ xxh->trk++;
-
- if (V (0))
- report ("Stored tracks : %d ", xxh->trk);
-@@ -330,7 +359,7 @@
-
- for (i = 1; i < xxh->trk; i++) {
- /* Length of the track in bytes */
-- len = *((uint16 *) buffer)++;
-+ buffer = get_uint16_le_int(buffer, &len);
-
- memset (track, 0, sizeof (struct xxm_track) +
- sizeof (struct xxm_event) * 256);
-@@ -449,7 +478,7 @@
- xxih[i].rls = *(uint16 *)buffer;
- L_ENDIAN32 (xxih[i].rls);
- }
-- ((uint16 *)buffer)++;
-+ buffer += sizeof(uint16);
-
- xxi[i][j].vra = *buffer++;
- xxi[i][j].vde = *buffer++;
-@@ -498,15 +527,12 @@
- buffer += 32; /* Sample name */
- buffer += 8; /* Sample filename */
-
-- c2spd[i] = *((uint32 *)buffer)++;
-+ (void)memcpy(&c2spd[i], buffer, sizeof(c2spd[i]));
-+ buffer += sizeof(c2spd[i]);
-
-- xxs[i].len = *((uint32 *)buffer)++;
-- xxs[i].lps = *((uint32 *)buffer)++;
-- xxs[i].lpe = *((uint32 *)buffer)++;
--
-- L_ENDIAN32 (xxs[i].len);
-- L_ENDIAN32 (xxs[i].lps);
-- L_ENDIAN32 (xxs[i].lpe);
-+ buffer = get_uint32_le_int(buffer, &xxs[i].len);
-+ buffer = get_uint32_le_int(buffer, &xxs[i].lps);
-+ buffer = get_uint32_le_int(buffer, &xxs[i].lpe);
-
- xxs[i].flg = xxs[i].lpe > 0 ? WAVE_LOOPING : 0;
- xxs[i].lpe = xxs[i].lps + xxs[i].lpe;
-@@ -579,16 +605,11 @@
- buffer += 32; /* Sample name */
- buffer += 8; /* Sample filename */
-
-- c2spd[i] = *((uint16 *)buffer)++;
-- L_ENDIAN16 (c2spd[i]);
-+ buffer = get_uint16_le_int(buffer, &c2spd[i]);
-
-- xxs[i].len = *((uint32 *)buffer)++;
-- xxs[i].lps = *((uint32 *)buffer)++;
-- xxs[i].lpe = *((uint32 *)buffer)++;
--
-- L_ENDIAN32 (xxs[i].len);
-- L_ENDIAN32 (xxs[i].lps);
-- L_ENDIAN32 (xxs[i].lpe);
-+ buffer = get_uint32_le_int(buffer, &xxs[i].len);
-+ buffer = get_uint32_le_int(buffer, &xxs[i].lps);
-+ buffer = get_uint32_le_int(buffer, &xxs[i].lpe);
-
- xxs[i].flg = xxs[i].lpe > 0 ? WAVE_LOOPING : 0;
- xxs[i].lpe = xxs[i].lps + xxs[i].lpe;
-@@ -648,12 +669,12 @@
- buffer += xxs[i].len;
- break;
- case 1:
-- len = *((uint32 *)buffer)++;
-+ buffer = get_uint32_le_int(buffer, &len);
- unpack_sample8 (smpbuf, buffer, xxs[i].len);
- buffer += len;
- break;
- case 2:
-- len = *((uint32 *)buffer)++;
-+ buffer = get_uint32_le_int(buffer, &len);
- unpack_sample16 ((uint16 *)smpbuf, buffer, xxs[i].len >> 1);
- buffer += len;
- break;
diff --git a/audio/xmp/patches/patch-an b/audio/xmp/patches/patch-an
deleted file mode 100644
index e5e1d05f25d..00000000000
--- a/audio/xmp/patches/patch-an
+++ /dev/null
@@ -1,159 +0,0 @@
-$NetBSD: patch-an,v 1.1 2006/06/30 12:54:38 tron Exp $
-
---- src/loaders/med_load.c.orig 2001-01-13 19:58:02.000000000 +0000
-+++ src/loaders/med_load.c 2006-06-30 13:48:59.000000000 +0100
-@@ -31,6 +31,25 @@
-
- static int bpmon, bpmlen;
-
-+static void big_endian_uint16_t(void *p)
-+{
-+ uint16 *x16p, x16;
-+
-+ x16p = p;
-+ x16 = *x16p;
-+ B_ENDIAN16(x16);
-+ *x16p = x16;
-+}
-+
-+static void big_endian_uint32_t(void *p)
-+{
-+ uint32 *x32p, x32;
-+
-+ x32p = p;
-+ x32 = *x32p;
-+ B_ENDIAN32(x32);
-+ *x32p = x32;
-+}
-
- static void xlat_fx (uint8 *fxt, uint8 *fxp)
- {
-@@ -136,11 +155,11 @@
-
- header = (struct MMD0 *)mmd;
-
-- B_ENDIAN32 ((uint32)header->modlen);
-- B_ENDIAN32 ((uint32)header->song);
-- B_ENDIAN32 ((uint32)header->blockarr);
-- B_ENDIAN32 ((uint32)header->smplarr);
-- B_ENDIAN32 ((uint32)header->expdata);
-+ big_endian_uint32_t(&header->modlen);
-+ big_endian_uint32_t(&header->song);
-+ big_endian_uint32_t(&header->blockarr);
-+ big_endian_uint32_t(&header->smplarr);
-+ big_endian_uint32_t(&header->expdata);
-
- song = (struct MMD0song *)(mmd + (uint32)header->song);
- song2 = (struct MMD2song *)(mmd + (uint32)header->song);
-@@ -148,21 +167,21 @@
- (uint32)header->expdata) : NULL;
-
- if (expdata) {
-- B_ENDIAN32 ((uint32)expdata->nextmod);
-- B_ENDIAN32 ((uint32)expdata->exp_smp);
-- B_ENDIAN16 ((uint16)expdata->s_ext_entries);
-- B_ENDIAN16 ((uint16)expdata->s_ext_entrsz);
-- B_ENDIAN32 ((uint32)expdata->annotxt);
-- B_ENDIAN32 ((uint32)expdata->annolen);
-- B_ENDIAN32 ((uint32)expdata->iinfo);
-- B_ENDIAN16 ((uint16)expdata->i_ext_entries);
-- B_ENDIAN16 ((uint16)expdata->i_ext_entrsz);
-- B_ENDIAN32 ((uint32)expdata->jumpmask);
-- B_ENDIAN32 ((uint32)expdata->rgbtable);
-- B_ENDIAN32 ((uint32)expdata->n_info);
-- B_ENDIAN32 ((uint32)expdata->songname);
-- B_ENDIAN32 ((uint32)expdata->songnamelen);
-- B_ENDIAN32 ((uint32)expdata->dumps);
-+ big_endian_uint32_t(&expdata->nextmod);
-+ big_endian_uint32_t(&expdata->exp_smp);
-+ big_endian_uint16_t(&expdata->s_ext_entries);
-+ big_endian_uint16_t(&expdata->s_ext_entrsz);
-+ big_endian_uint32_t(&expdata->annotxt);
-+ big_endian_uint32_t(&expdata->annolen);
-+ big_endian_uint32_t(&expdata->iinfo);
-+ big_endian_uint16_t(&expdata->i_ext_entries);
-+ big_endian_uint16_t(&expdata->i_ext_entrsz);
-+ big_endian_uint32_t(&expdata->jumpmask);
-+ big_endian_uint32_t(&expdata->rgbtable);
-+ big_endian_uint32_t(&expdata->n_info);
-+ big_endian_uint32_t(&expdata->songname);
-+ big_endian_uint32_t(&expdata->songnamelen);
-+ big_endian_uint32_t(&expdata->dumps);
- }
-
- for (i = 0; i < 63; i++) {
-@@ -198,7 +217,7 @@
-
- for (i = 0; i < xxh->ins; i++) {
- bytecopy(&instr, mmd + (uint32)header->smplarr + i * 4, 4);
-- B_ENDIAN32 ((uint32)instr);
-+ big_endian_uint32_t(&instr);
- if (!instr)
- continue;
- instr = (struct InstrHdr *)(mmd + (uint32)instr);
-@@ -225,16 +244,16 @@
- if (ver < 2) {
- memcpy (xxo, song->playseq, xxh->len);
- } else {
-- B_ENDIAN32 ((uint32)song2->playseqtable);
-+ big_endian_uint32_t(&song2->playseqtable);
- playseq = (struct PlaySeq **)(mmd + (uint32)song2->playseqtable);
-- B_ENDIAN32 ((uint32)playseq[0]);
-+ big_endian_uint32_t(&playseq[0]);
- playseq[0] = (struct PlaySeq *)(mmd + (uint32)playseq[0]);
-- B_ENDIAN16 ((uint16)playseq[0]->length);
-+ big_endian_uint16_t(&playseq[0]->length);
- xxh->len = playseq[0]->length;
- if (xxh->len > 0xff)
- xxh->len = 0xff;
- for (i = 0; i < xxh->len; i++) {
-- B_ENDIAN16 ((uint16)playseq[0]->seq[i]);
-+ big_endian_uint16_t(&playseq[0]->seq[i]);
- xxo[i] = playseq[0]->seq[i];
- }
- }
-@@ -243,7 +262,7 @@
-
- for (i = 0; i < xxh->pat; i++) {
- bytecopy(&block0, mmd + (uint32)header->blockarr + i * 4, 4);
-- B_ENDIAN32 ((uint32)block0);
-+ big_endian_uint32_t(&block0);
- block0 = (struct MMD0Block *)(mmd + (uint32)block0);
- block1 = (struct MMD1Block *)block0;
-
-@@ -283,7 +302,7 @@
-
- for (i = 0; i < xxh->pat; i++) {
- bytecopy(&block0, mmd + (uint32)header->blockarr + i * 4, 4);
-- B_ENDIAN32 ((uint32)block0);
-+ big_endian_uint32_t(&block0);
- block0 = (struct MMD0Block *)(mmd + (uint32)block0);
- block1 = (struct MMD1Block *)block0;
-
-@@ -345,7 +364,7 @@
-
- for (smp_idx = i = 0; i < xxh->ins; i++) {
- bytecopy(&instr, mmd + (uint32)header->smplarr + i * 4, 4);
-- B_ENDIAN32 ((uint32)instr);
-+ big_endian_uint32_t(&instr);
- if (!instr)
- continue;
- instr = (struct InstrHdr *)(mmd + (uint32)instr);
-@@ -381,7 +400,7 @@
- xxih[i].vts = synth->volspeed;
- xxih[i].wts = synth->wfspeed;
-
-- B_ENDIAN32 ((uint32)synth->wf[0]);
-+ big_endian_uint32_t(&synth->wf[0]);
- instr = (struct InstrHdr *)((char *)synth + (uint32)synth->wf[0]);
- B_ENDIAN32 (instr->length);
- B_ENDIAN16 (instr->type);
-@@ -438,7 +457,7 @@
- xxih[i].wts = synth->wfspeed;
-
- for (j = 0; j < synth->wforms; j++) {
-- B_ENDIAN32 ((uint32)synth->wf[j]);
-+ big_endian_uint32_t(&synth->wf[j]);
-
- xxi[i][j].pan = 0x80;
- xxi[i][j].vol = song->sample[i].svol;