diff --git a/srcpkgs/intel-gpu-tools/patches/musl-sys_ioctl.patch b/srcpkgs/intel-gpu-tools/patches/musl-sys_ioctl.patch new file mode 100644 index 0000000000..87bd2ccdb0 --- /dev/null +++ b/srcpkgs/intel-gpu-tools/patches/musl-sys_ioctl.patch @@ -0,0 +1,32 @@ +For musl libc instead of including , which leads to +an error when redefining ioctl(3) and close(3), just define the +prototype for ioctl(). + +--- benchmarks/gem_exec_tracer.c 2015-08-17 18:38:30.000000000 +0200 ++++ benchmarks/gem_exec_tracer.c 2015-09-13 17:03:34.768431063 +0200 +@@ -32,7 +32,11 @@ + #include + #include + #include ++#if defined(__GLIBC__) + #include ++#else ++int ioctl(int fd, unsigned long request, ...); ++#endif + #include + #include + #include +--- tools/aubdump.c 2015-09-08 19:01:19.000000000 +0200 ++++ tools/aubdump.c 2015-09-13 17:06:27.850430550 +0200 +@@ -32,7 +32,11 @@ + #include + #include + #include ++#if defined(__GLIBC__) + #include ++#else ++int ioctl(int fd, unsigned long request, ...); ++#endif + #include + #include + #include diff --git a/srcpkgs/intel-gpu-tools/patches/musl.patch b/srcpkgs/intel-gpu-tools/patches/musl.patch deleted file mode 100644 index 5c1affcf11..0000000000 --- a/srcpkgs/intel-gpu-tools/patches/musl.patch +++ /dev/null @@ -1,67 +0,0 @@ -Do not redefine ioctl() and close(), conflicts with the libc declarations. -Fixes musl build. - - --xtraeme - ---- benchmarks/gem_exec_tracer.c.orig 2015-09-12 08:46:22.024640552 +0200 -+++ benchmarks/gem_exec_tracer.c 2015-09-12 08:46:51.737733668 +0200 -@@ -162,7 +162,7 @@ trace_del(uint32_t handle) - } - - int --close(int fd) -+myclose(int fd) - { - if (fd == drm_fd) - drm_fd = -1; -@@ -200,7 +200,7 @@ static int is_i915(int fd) - } - - int --ioctl(int fd, unsigned long request, ...) -+myioctl(int fd, unsigned long request, ...) - { - va_list args; - void *argp; -@@ -281,8 +281,8 @@ ioctl(int fd, unsigned long request, ... - static void __attribute__ ((constructor)) - init(void) - { -- libc_close = dlsym(RTLD_NEXT, "close"); -- libc_ioctl = dlsym(RTLD_NEXT, "ioctl"); -+ libc_close = dlsym(RTLD_NEXT, "myclose"); -+ libc_ioctl = dlsym(RTLD_NEXT, "myioctl"); - fail_if(libc_close == NULL || libc_ioctl == NULL, - "failed to get libc ioctl or close\n"); - } ---- tools/aubdump.c.orig 2015-09-12 08:45:16.921302516 +0200 -+++ tools/aubdump.c 2015-09-12 08:45:51.750828746 +0200 -@@ -398,7 +398,7 @@ remove_bo(int handle) - } - - int --close(int fd) -+myclose(int fd) - { - if (fd == drm_fd) - drm_fd = -1; -@@ -407,7 +407,7 @@ close(int fd) - } - - int --ioctl(int fd, unsigned long request, ...) -+myioctl(int fd, unsigned long request, ...) - { - va_list args; - void *argp; -@@ -532,8 +532,8 @@ init(void) - { - const char *args = getenv("INTEL_AUBDUMP_ARGS"); - -- libc_close = dlsym(RTLD_NEXT, "close"); -- libc_ioctl = dlsym(RTLD_NEXT, "ioctl"); -+ libc_close = dlsym(RTLD_NEXT, "myclose"); -+ libc_ioctl = dlsym(RTLD_NEXT, "myioctl"); - fail_if(libc_close == NULL || libc_ioctl == NULL, - "intel_aubdump: failed to get libc ioctl or close\n"); - diff --git a/srcpkgs/intel-gpu-tools/template b/srcpkgs/intel-gpu-tools/template index 559c5fc2f3..913b814bd8 100644 --- a/srcpkgs/intel-gpu-tools/template +++ b/srcpkgs/intel-gpu-tools/template @@ -1,7 +1,7 @@ # Template file for 'intel-gpu-tools' pkgname=intel-gpu-tools version=1.12 -revision=2 +revision=3 build_style=gnu-configure configure_args="--disable-tests" hostmakedepends="pkg-config swig" @@ -11,7 +11,7 @@ short_desc="Tools for development and testing of the Intel DRM driver" maintainer="Juan RP " license="MIT" homepage="http://cgit.freedesktop.org/xorg/app/intel-gpu-tools/" -distfiles="http://xorg.freedesktop.org/releases/individual/app/${pkgname}-${version}.tar.bz2" +distfiles="${XORG_SITE}/app/${pkgname}-${version}.tar.bz2" checksum=143fe0ae4a52560b9c032aa7592fe8d36b1578abb873fa9b026a75acf7e38be3 lib32disabled=yes