summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron>2012-05-28 22:46:40 +0000
committertron <tron>2012-05-28 22:46:40 +0000
commit65b07b81e501dbec1de64a4e3a8a31ed129a6a6f (patch)
tree085863f791cbec4a91726cd44eae3952c88cb4fe
parent297fc21cdaeca72ffb376194c8169d129db9eb1c (diff)
downloadpkgsrc-65b07b81e501dbec1de64a4e3a8a31ed129a6a6f.tar.gz
Pullup ticket #3811 - requested by abs
audio/arts: build fix Revisions pulled up: - audio/arts/distinfo 1.55 - audio/arts/patches/patch-ab 1.6 --- Module Name: pkgsrc Committed By: abs Date: Tue May 15 13:18:43 UTC 2012 Modified Files: pkgsrc/audio/arts: distinfo pkgsrc/audio/arts/patches: patch-ab Log Message: Conditionalise old ioctl() usage on __NetBSD_Version__ < 600000000 or __NetBSD_Version__ > 699000000 && __NetBSD_Version__ < 699000700
-rw-r--r--audio/arts/distinfo4
-rw-r--r--audio/arts/patches/patch-ab44
2 files changed, 23 insertions, 25 deletions
diff --git a/audio/arts/distinfo b/audio/arts/distinfo
index 192eb28fd76..0608916a08d 100644
--- a/audio/arts/distinfo
+++ b/audio/arts/distinfo
@@ -1,10 +1,10 @@
-$NetBSD: distinfo,v 1.53 2012/04/02 12:16:29 markd Exp $
+$NetBSD: distinfo,v 1.53.2.1 2012/05/28 22:46:40 tron Exp $
SHA1 (arts-1.5.10.tar.bz2) = 2e5507f64a4a4a9ad446cc987dff157e38f98274
RMD160 (arts-1.5.10.tar.bz2) = 8c237ebd06ac82b88cf7394722fb8da459902ee7
Size (arts-1.5.10.tar.bz2) = 973382 bytes
SHA1 (patch-aa) = ff582ade3d9913440cd20d92b342a5357991f555
-SHA1 (patch-ab) = 73c4ec5360ce671f69b6de4e226cda9478d098ee
+SHA1 (patch-ab) = 504a24a916c0d10b377a618de0766fc87fbeafbf
SHA1 (patch-ac) = de22843493a184f4aa8c20e011aa2a73ad794728
SHA1 (patch-ad) = c3d9b718a0da1cb9c4ee31a05f4f415ce4df310f
SHA1 (patch-ae) = a933c3dcf7dd9162a0f15df462f0d396a04e2ee1
diff --git a/audio/arts/patches/patch-ab b/audio/arts/patches/patch-ab
index f87a560ee5c..d2362eb2d33 100644
--- a/audio/arts/patches/patch-ab
+++ b/audio/arts/patches/patch-ab
@@ -1,12 +1,15 @@
-$NetBSD: patch-ab,v 1.5 2004/02/04 13:35:52 markd Exp $
+$NetBSD: patch-ab,v 1.5.70.1 2012/05/28 22:46:40 tron Exp $
---- artsc/artsdsp.c.orig 2003-07-17 07:18:09.000000000 +1200
+--- artsc/artsdsp.c.orig 2007-10-08 09:47:09.000000000 +0000
+++ artsc/artsdsp.c
-@@ -133,6 +133,14 @@ int munmap(void *start, size_t length);
+@@ -133,6 +133,17 @@ int munmap(void *start, size_t length);
static void artsdsp_doinit()
{
-+# ifdef RTLD_NEXT
++# if defined(__NetBSD__) && !defined(OPEN_SOUND_SYSTEM)
++# define OPEN_GLOBAL() handle = dlopen(NULL, DL_LAZY)
++# define CLOSE_GLOBAL() (void)dlclose(handle)
++# elif defined(RTLD_NEXT)
+# define OPEN_GLOBAL() handle = RTLD_NEXT;
+# define CLOSE_GLOBAL() ;
+# else
@@ -17,7 +20,7 @@ $NetBSD: patch-ab,v 1.5 2004/02/04 13:35:52 markd Exp $
const char *env;
artsdsp_init = 1;
-@@ -145,15 +153,31 @@ static void artsdsp_doinit()
+@@ -145,15 +156,17 @@ static void artsdsp_doinit()
mmapemu = env && !strcmp(env,"1");
/* resolve original symbols */
@@ -30,19 +33,6 @@ $NetBSD: patch-ab,v 1.5 2004/02/04 13:35:52 markd Exp $
- orig_munmap = (orig_munmap_ptr)dlsym(RTLD_NEXT,"munmap");
- orig_fopen = (orig_fopen_ptr)dlsym(RTLD_NEXT,"fopen");
- orig_access = (orig_access_ptr)dlsym(RTLD_NEXT,"access");
-+#if defined(__NetBSD__) && !defined(OPEN_SOUND_SYSTEM)
-+ handle = dlopen(NULL, DL_LAZY);
-+ orig_open = (orig_open_ptr)dlsym(handle,"open");
-+ orig_close = (orig_close_ptr)dlsym(handle,"close");
-+ orig_write = (orig_write_ptr)dlsym(handle,"write");
-+ orig_read = (orig_read_ptr)dlsym(handle,"read");
-+ orig_ioctl = (orig_ioctl_ptr)dlsym(handle,"ioctl");
-+ orig_mmap = (orig_mmap_ptr)dlsym(handle,"mmap");
-+ orig_munmap = (orig_munmap_ptr)dlsym(handle,"munmap");
-+ orig_fopen = (orig_fopen_ptr)dlsym(handle,"fopen");
-+ orig_access = (orig_access_ptr)dlsym(handle,"access");
-+ (void) dlclose(handle);
-+#else
+ OPEN_GLOBAL();
+ orig_open = (orig_open_ptr)dlsym(handle,"open");
+ orig_close = (orig_close_ptr)dlsym(handle,"close");
@@ -54,15 +44,23 @@ $NetBSD: patch-ab,v 1.5 2004/02/04 13:35:52 markd Exp $
+ orig_fopen = (orig_fopen_ptr)dlsym(handle,"fopen");
+ orig_access = (orig_access_ptr)dlsym(handle,"access");
+ CLOSE_GLOBAL();
-+#endif
}
static void
-@@ -258,10 +282,15 @@ int open (const char *pathname, int flag
+@@ -258,10 +271,24 @@ int open (const char *pathname, int flag
return sndfd;
}
-+#if defined(__NetBSD__) && !defined(OPEN_SOUND_SYSTEM)
++/* NetBSD < 6 and 6.99.0 - 6.99.6 used a different ioctl() definition */
++#if defined(__NetBSD__)
++# include <sys/param.h>
++# if __NetBSD_Version__ < 600000000 || \
++ (__NetBSD_Version__ > 699000000 && __NetBSD_Version__ < 699000700)
++# define OLD_NETBSD_IOCTL_CALL
++# endif
++#endif
++
++#if defined(OLD_NETBSD_IOCTL_CALL) && !defined(OPEN_SOUND_SYSTEM)
+int _oss_ioctl (int fd, unsigned long request, void *argp)
+#else
int ioctl (int fd, ioctl_request_t request, ...)
@@ -70,11 +68,11 @@ $NetBSD: patch-ab,v 1.5 2004/02/04 13:35:52 markd Exp $
{
int space, size, latency, odelay;
-+#if !defined(__NetBSD__) || defined(OPEN_SOUND_SYSTEM)
++#if !defined(OLD_NETBSD_IOCTL_CALL) || defined(OPEN_SOUND_SYSTEM)
/*
* FreeBSD needs ioctl with varargs. However I have no idea how to "forward"
* the variable args ioctl to the orig_ioctl routine. So I expect the ioctl
-@@ -273,6 +302,7 @@ int ioctl (int fd, ioctl_request_t reque
+@@ -273,6 +300,7 @@ int ioctl (int fd, ioctl_request_t reque
va_start(args,request);
argp = va_arg(args, void *);
va_end(args);