mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-18 13:54:58 +08:00
Use provided I915_HEADERS_DIR in osv style builds
Related-To: NEO-5838 Signed-off-by: Pawel Cieslak <pawel.cieslak@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
4c05a54c2b
commit
cf66060533
@@ -480,7 +480,7 @@ if(UNIX)
|
||||
endif()
|
||||
message(STATUS "i915 prelim headers detection: ${NEO_ENABLE_i915_PRELIM_DETECTION}")
|
||||
endif()
|
||||
if(NOT DEFINED I915_HEADERS_DIR)
|
||||
if(NOT DEFINED I915_HEADERS_DIR OR I915_HEADERS_DIR STREQUAL "")
|
||||
get_filename_component(I915_HEADERS_DIR "${NEO_SOURCE_DIR}/third_party${BRANCH_DIR_SUFFIX}uapi" ABSOLUTE)
|
||||
endif()
|
||||
message(STATUS "i915 includes dir: ${I915_HEADERS_DIR}")
|
||||
|
||||
@@ -61,6 +61,11 @@ if [ "${BUILD_SRPM}" == "1" ]; then
|
||||
cp $COPYRIGHT $BUILD_DIR/SOURCES/
|
||||
cp $SPEC_SRC $BUILD_DIR/SPECS/
|
||||
|
||||
if [ -d "$I915_HEADERS_DIR" ]; then
|
||||
tar -c -I 'xz -6 -T0' -f $BUILD_DIR/SOURCES/uapi.tar.xz -C $REPO_DIR --transform "s,${I915_HEADERS_DIR:1},uapi," $I915_HEADERS_DIR
|
||||
perl -pi -e "s;^%global I915_HEADERS_DIR .*;%global I915_HEADERS_DIR %{_builddir}/uapi;" $SPEC
|
||||
fi
|
||||
|
||||
PATCH_SPEC="${REPO_DIR}/scripts/packaging/${BRANCH_SUFFIX}/patch_spec.sh"
|
||||
|
||||
if [ -f "$PATCH_SPEC" ]; then
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
%global rel xxx
|
||||
%global build_id xxx
|
||||
%global NEO_RELEASE_WITH_REGKEYS FALSE
|
||||
%global I915_HEADERS_DIR %{nil}
|
||||
|
||||
%define _source_payload w5T16.xzdio
|
||||
%define _binary_payload w5T16.xzdio
|
||||
@@ -17,6 +18,9 @@ License: MIT
|
||||
URL: https://github.com/intel/compute-runtime
|
||||
Source0: %{url}/archive/%{version}/compute-runtime.tar.xz
|
||||
Source1: copyright
|
||||
%if "%{I915_HEADERS_DIR}" != ""
|
||||
Source2: uapi.tar.xz
|
||||
%endif
|
||||
|
||||
BuildRequires: libva-devel gcc-c++ cmake ninja-build make
|
||||
BuildRequires: intel-gmmlib-devel
|
||||
@@ -36,7 +40,11 @@ exposing hardware capabilities to applications.
|
||||
%define debug_package %{nil}
|
||||
|
||||
%prep
|
||||
%if "%{I915_HEADERS_DIR}" == ""
|
||||
%autosetup -p1 -n compute-runtime
|
||||
%else
|
||||
%autosetup -p1 -n compute-runtime -b 2
|
||||
%endif
|
||||
|
||||
%build
|
||||
mkdir build
|
||||
@@ -51,7 +59,8 @@ cd build
|
||||
-DRELEASE_WITH_REGKEYS=%{NEO_RELEASE_WITH_REGKEYS} \
|
||||
-DL0_INSTALL_UDEV_RULES=1 \
|
||||
-DUDEV_RULES_DIR=/etc/udev/rules.d/ \
|
||||
-DCMAKE_VERBOSE_MAKEFILE=FALSE
|
||||
-DCMAKE_VERBOSE_MAKEFILE=FALSE \
|
||||
-DI915_HEADERS_DIR=$(realpath %{I915_HEADERS_DIR})
|
||||
%ninja_build
|
||||
|
||||
%install
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
%global rel xxx
|
||||
%global build_id xxx
|
||||
%global NEO_RELEASE_WITH_REGKEYS FALSE
|
||||
%global I915_HEADERS_DIR %{nil}
|
||||
|
||||
%define gmmlib_sover 12
|
||||
%define igc_sover 1
|
||||
@@ -26,6 +27,9 @@ License: MIT
|
||||
URL: https://github.com/intel/compute-runtime
|
||||
Source0: %{url}/archive/%{version}/compute-runtime.tar.xz
|
||||
Source1: copyright
|
||||
%if "%{I915_HEADERS_DIR}" != ""
|
||||
Source2: uapi.tar.xz
|
||||
%endif
|
||||
|
||||
ExclusiveArch: x86_64
|
||||
BuildRequires: cmake gcc-c++ ninja make
|
||||
@@ -48,7 +52,11 @@ exposing hardware capabilities to applications.
|
||||
%debug_package %{nil}
|
||||
|
||||
%prep
|
||||
%if "%{I915_HEADERS_DIR}" == ""
|
||||
%autosetup -p1 -n compute-runtime
|
||||
%else
|
||||
%autosetup -p1 -n compute-runtime -b 2
|
||||
%endif
|
||||
|
||||
%build
|
||||
%cmake .. \
|
||||
@@ -61,7 +69,8 @@ exposing hardware capabilities to applications.
|
||||
-DRELEASE_WITH_REGKEYS=%{NEO_RELEASE_WITH_REGKEYS} \
|
||||
-DL0_INSTALL_UDEV_RULES=1 \
|
||||
-DUDEV_RULES_DIR=/etc/udev/rules.d/ \
|
||||
-DCMAKE_VERBOSE_MAKEFILE=FALSE
|
||||
-DCMAKE_VERBOSE_MAKEFILE=FALSE \
|
||||
-DI915_HEADERS_DIR=$(realpath %{I915_HEADERS_DIR})
|
||||
%ninja_build
|
||||
|
||||
%install
|
||||
|
||||
@@ -61,20 +61,26 @@ if [ "${BUILD_SRPM}" == "1" ]; then
|
||||
cp $COPYRIGHT $BUILD_DIR/SOURCES/
|
||||
cp $SPEC_SRC $BUILD_DIR/SPECS/
|
||||
|
||||
if [ -d "$I915_HEADERS_DIR" ]; then
|
||||
tar -c -I 'xz -6 -T0' -f $BUILD_DIR/SOURCES/uapi.tar.xz -C $REPO_DIR --transform "s,${I915_HEADERS_DIR:1},uapi," $I915_HEADERS_DIR
|
||||
perl -pi -e "s;^%global I915_HEADERS_DIR .*;%global I915_HEADERS_DIR %{_builddir}/uapi;" $SPEC
|
||||
fi
|
||||
|
||||
PATCH_SPEC="${REPO_DIR}/scripts/packaging/${BRANCH_SUFFIX}/patch_spec.sh"
|
||||
|
||||
if [ -f "$PATCH_SPEC" ]; then
|
||||
source "$PATCH_SPEC"
|
||||
fi
|
||||
|
||||
if [ -z "${BRANCH_SUFFIX}" ]; then
|
||||
sed -i '/^Epoch: /d' ${SPEC}
|
||||
fi
|
||||
|
||||
# Update spec file with new version
|
||||
perl -pi -e "s/^%global NEO_OCL_VERSION_MAJOR .*/%global NEO_OCL_VERSION_MAJOR ${NEO_OCL_VERSION_MAJOR}/" $BUILD_DIR/SPECS/opencl.spec
|
||||
perl -pi -e "s/^%global NEO_OCL_VERSION_MINOR .*/%global NEO_OCL_VERSION_MINOR ${NEO_OCL_VERSION_MINOR}/" $BUILD_DIR/SPECS/opencl.spec
|
||||
perl -pi -e "s/^%global NEO_OCL_VERSION_BUILD .*/%global NEO_OCL_VERSION_BUILD ${NEO_OCL_VERSION_BUILD}/" $BUILD_DIR/SPECS/opencl.spec
|
||||
perl -pi -e "s/^%global NEO_RELEASE_WITH_REGKEYS .*/%global NEO_RELEASE_WITH_REGKEYS ${RELEASE_WITH_REGKEYS}/" $BUILD_DIR/SPECS/opencl.spec
|
||||
perl -pi -e "s/^%global NEO_OCL_VERSION_MAJOR .*/%global NEO_OCL_VERSION_MAJOR ${NEO_OCL_VERSION_MAJOR}/" $SPEC
|
||||
perl -pi -e "s/^%global NEO_OCL_VERSION_MINOR .*/%global NEO_OCL_VERSION_MINOR ${NEO_OCL_VERSION_MINOR}/" $SPEC
|
||||
perl -pi -e "s/^%global NEO_OCL_VERSION_BUILD .*/%global NEO_OCL_VERSION_BUILD ${NEO_OCL_VERSION_BUILD}/" $SPEC
|
||||
perl -pi -e "s/^%global NEO_RELEASE_WITH_REGKEYS .*/%global NEO_RELEASE_WITH_REGKEYS ${RELEASE_WITH_REGKEYS}/" $SPEC
|
||||
perl -pi -e "s/^%global rel .*/%global rel ${RELEASE}/" $SPEC
|
||||
perl -pi -e "s/^%global ver .*/%global ver ${VERSION}/" $SPEC
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
%global NEO_OCL_VERSION_MINOR xxx
|
||||
%global NEO_OCL_VERSION_BUILD xxx
|
||||
%global NEO_RELEASE_WITH_REGKEYS FALSE
|
||||
%global I915_HEADERS_DIR %{nil}
|
||||
|
||||
%define _source_payload w5T16.xzdio
|
||||
%define _binary_payload w5T16.xzdio
|
||||
@@ -20,6 +21,9 @@ License: MIT
|
||||
URL: https://github.com/intel/compute-runtime
|
||||
Source0: %{url}/archive/%{version}/compute-runtime.tar.xz
|
||||
Source1: copyright
|
||||
%if "%{I915_HEADERS_DIR}" != ""
|
||||
Source2: uapi.tar.xz
|
||||
%endif
|
||||
|
||||
Requires: intel-gmmlib
|
||||
Requires: intel-igc-opencl
|
||||
@@ -40,7 +44,11 @@ Intel(R) Graphics Compute Runtime for OpenCL(TM) is a open source project to con
|
||||
%define debug_package %{nil}
|
||||
|
||||
%prep
|
||||
%if "%{I915_HEADERS_DIR}" == ""
|
||||
%autosetup -p1 -n compute-runtime
|
||||
%else
|
||||
%autosetup -p1 -n compute-runtime -b 2
|
||||
%endif
|
||||
|
||||
%build
|
||||
mkdir build
|
||||
@@ -55,7 +63,8 @@ cd build
|
||||
-DNEO_SKIP_UNIT_TESTS=TRUE \
|
||||
-DNEO_ENABLE_i915_PRELIM_DETECTION=TRUE \
|
||||
-DRELEASE_WITH_REGKEYS=%{NEO_RELEASE_WITH_REGKEYS} \
|
||||
-DCMAKE_VERBOSE_MAKEFILE=FALSE
|
||||
-DCMAKE_VERBOSE_MAKEFILE=FALSE \
|
||||
-DI915_HEADERS_DIR=$(realpath %{I915_HEADERS_DIR})
|
||||
%ninja_build
|
||||
|
||||
%install
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
%global NEO_OCL_VERSION_MINOR xxx
|
||||
%global NEO_OCL_VERSION_BUILD xxx
|
||||
%global NEO_RELEASE_WITH_REGKEYS FALSE
|
||||
%global I915_HEADERS_DIR %{nil}
|
||||
|
||||
%define gmmlib_sover 12
|
||||
%define igc_sover 1
|
||||
@@ -28,6 +29,9 @@ Group: System Environment/Libraries
|
||||
Url: https://github.com/intel/compute-runtime
|
||||
Source0: %{url}/archive/%{version}/compute-runtime.tar.xz
|
||||
Source1: copyright
|
||||
%if "%{I915_HEADERS_DIR}" != ""
|
||||
Source2: uapi.tar.xz
|
||||
%endif
|
||||
|
||||
ExclusiveArch: x86_64
|
||||
BuildRequires: cmake gcc-c++ ninja make
|
||||
@@ -50,7 +54,11 @@ Summary: ocloc package for opencl
|
||||
%debug_package %{nil}
|
||||
|
||||
%prep
|
||||
%if "%{I915_HEADERS_DIR}" == ""
|
||||
%autosetup -p1 -n compute-runtime
|
||||
%else
|
||||
%autosetup -p1 -n compute-runtime -b 2
|
||||
%endif
|
||||
|
||||
%build
|
||||
%cmake .. \
|
||||
@@ -63,7 +71,8 @@ Summary: ocloc package for opencl
|
||||
-DNEO_SKIP_UNIT_TESTS=TRUE \
|
||||
-DNEO_ENABLE_i915_PRELIM_DETECTION=TRUE \
|
||||
-DRELEASE_WITH_REGKEYS=%{NEO_RELEASE_WITH_REGKEYS} \
|
||||
-DCMAKE_VERBOSE_MAKEFILE=FALSE
|
||||
-DCMAKE_VERBOSE_MAKEFILE=FALSE \
|
||||
-DI915_HEADERS_DIR=$(realpath %{I915_HEADERS_DIR})
|
||||
%ninja_build
|
||||
|
||||
%install
|
||||
|
||||
Reference in New Issue
Block a user