[beignet] 01/02: Allow build directories containing +

Rebecca Palmer rnpalmer-guest at moszumanska.debian.org
Tue May 19 12:43:33 UTC 2015


This is an automated email from the git hooks/post-receive script.

rnpalmer-guest pushed a commit to branch master
in repository beignet.

commit f669f28f466089bb74ccd2897ae029da020b3a5f
Author: Rebecca N. Palmer <rebecca_palmer at zoho.com>
Date:   Tue May 19 13:37:57 2015 +0100

    Allow build directories containing +
---
 debian/changelog                          |  2 ++
 debian/patches/allow-+-in-directory.patch | 30 ++++++++++++++++++++++++++++++
 debian/patches/series                     |  1 +
 3 files changed, 33 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 6cdb0f9..9418aac 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -16,6 +16,8 @@ beignet (1.0.3+dfsg-1) UNRELEASED; urgency=medium
   * Make libx11-dev dependency explicit.
   * Disable fast atomics, they break too much.
   * Remove non-DFSG gpuocelot code.
+  * Fix build in directories containing +, such as those based on
+    the version number.
 
  -- Rebecca N. Palmer <rebecca_palmer at zoho.com>  Fri, 24 Apr 2015 21:16:12 +0100
 
diff --git a/debian/patches/allow-+-in-directory.patch b/debian/patches/allow-+-in-directory.patch
new file mode 100644
index 0000000..2422989
--- /dev/null
+++ b/debian/patches/allow-+-in-directory.patch
@@ -0,0 +1,30 @@
+Description: Allow + in directory name
+
++ is a special character in a regex, which makes the build fail in
+directories such as beignet_1.0.3+dfsg
+
+--- a/backend/src/libocl/CMakeLists.txt
++++ b/backend/src/libocl/CMakeLists.txt
+@@ -128,11 +128,12 @@ FOREACH(M ${OCL_BASH_GENERATED_MODULES})
+     GENERATE_SOURCE_BASH(${M})
+ ENDFOREACH(M) 
+ 
++STRING(REPLACE "+" "\\+" ESCAPED_LIBOCL_BINARY_DIR ${LIBOCL_BINARY_DIR})
+ 
+ SET (CLANG_OCL_FLAGS -fno-builtin -ffp-contract=off -cl-kernel-arg-info -DGEN7_SAMPLER_CLAMP_BORDER_WORKAROUND "-cl-std=CL1.2")
+ MACRO(ADD_CL_TO_BC_TARGET _file)
+     # CMake seems can not add pattern rule, use MACRO to replace.
+-    STRING(REGEX REPLACE "${LIBOCL_BINARY_DIR}/src/\(o.*\)\\.cl" "${OCL_OBJECT_DIR}/\\1.bc" output_name ${_file})
++    STRING(REGEX REPLACE "${ESCAPED_LIBOCL_BINARY_DIR}/src/\(o.*\)\\.cl" "${OCL_OBJECT_DIR}/\\1.bc" output_name ${_file})
+     ADD_CUSTOM_COMMAND(OUTPUT ${output_name}
+ 	COMMAND mkdir -p ${OCL_OBJECT_DIR}/
+ 	#COMMAND echo ${LLVM_INSTALL_DIR}clang -cc1 ${CLANG_OCL_FLAGS} -I ${LIBOCL_BINARY_DIR}/include/ -emit-llvm-bc -triple spir -o ${output_name} -x cl ${_file}
+@@ -148,7 +149,7 @@ FOREACH(f ${OCL_SOURCE_FILES})
+ ENDFOREACH(f) 
+ 
+ FOREACH(f ${OCL_SOURCE_FILES})
+-    STRING(REGEX REPLACE "${LIBOCL_BINARY_DIR}/src/\(o.*\)\\.cl" "${OCL_OBJECT_DIR}/\\1.bc" bc_name ${f})
++    STRING(REGEX REPLACE "${ESCAPED_LIBOCL_BINARY_DIR}/src/\(o.*\)\\.cl" "${OCL_OBJECT_DIR}/\\1.bc" bc_name ${f})
+     SET(OCL_BC_FILES ${OCL_BC_FILES} ${bc_name})
+ ENDFOREACH(f) 
+
diff --git a/debian/patches/series b/debian/patches/series
index 0beb737..95f292b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -11,3 +11,4 @@ self-test.patch
 disable-broken-fast-atomics.patch
 update-docs.patch
 drop-structural_analysis.patch
+allow-+-in-directory.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opencl/beignet.git



More information about the Pkg-opencl-commits mailing list