From 208683cd3da0583ff92d591c10c3b9f733a56130 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= Date: Tue, 24 Mar 2020 18:29:08 +0100 Subject: [PATCH] beignet: fix musl build Use cl_uint instead of uint which is not a standard type w/ musl libc. --- srcpkgs/beignet/patches/cl_uint.patch | 22 ++++++++++++++++++++++ srcpkgs/beignet/template | 4 ---- 2 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 srcpkgs/beignet/patches/cl_uint.patch diff --git a/srcpkgs/beignet/patches/cl_uint.patch b/srcpkgs/beignet/patches/cl_uint.patch new file mode 100644 index 00000000000..27f247cf009 --- /dev/null +++ b/srcpkgs/beignet/patches/cl_uint.patch @@ -0,0 +1,22 @@ +--- src/cl_api_kernel.c 2017-09-22 10:05:22.000000000 +0200 ++++ src/cl_api_kernel.c 2020-03-24 18:27:40.186485887 +0100 +@@ -151,7 +151,7 @@ + fixed_local_sz[0] = 16; + fixed_local_sz[1] = 1; + } else { +- uint j, maxDimSize = 64 /* from 64? */, maxGroupSize = 256; //MAX_WORK_GROUP_SIZE may too large ++ cl_uint j, maxDimSize = 64 /* from 64? */, maxGroupSize = 256; //MAX_WORK_GROUP_SIZE may too large + size_t realGroupSize = 1; + for (i = 0; i < work_dim; i++) { + for (j = maxDimSize; j > 1; j--) { +--- src/cl_enqueue.c 2017-09-22 10:05:22.000000000 +0200 ++++ src/cl_enqueue.c 2020-03-24 18:30:12.031479833 +0100 +@@ -494,7 +494,7 @@ + cl_int cl_enqueue_svm_free(enqueue_data *data, cl_int status) { + int i; + void **pointers = data->pointers; +- uint num_svm_ptrs = data->size; ++ cl_uint num_svm_ptrs = data->size; + cl_int err = CL_SUCCESS; + + if (status != CL_COMPLETE) diff --git a/srcpkgs/beignet/template b/srcpkgs/beignet/template index 5b166f795a3..c132335da37 100644 --- a/srcpkgs/beignet/template +++ b/srcpkgs/beignet/template @@ -15,10 +15,6 @@ homepage="http://www.freedesktop.org/wiki/Software/Beignet/" distfiles="https://01.org/sites/default/files/${pkgname}-${version}-source.tar.gz" checksum=c555edba149de23243965a703f39f79fa06f15bcff5a3762b5544b0925010b43 -if [ "$XBPS_TARGET_LIBC" = "musl" ]; then - broken="/builddir/Beignet-1.3.2-Source/src/cl_api_kernel.c:154:9: error: unknown type name 'uint'; did you mean 'int'?" -fi - post_install() { # remove CL headers, we do use opencl-headers instead. rm -r ${DESTDIR}/usr/include