summaryrefslogtreecommitdiff
path: root/spirv-tools/Pkgfile
blob: a0af1bcc1cb26fdad045b43b55c54c62cdcdf76f (plain)
    1 # Description: API and commands for processing SPIR-V modules
    2 # URL: https://www.khronos.org/vulkan/
    3 # Maintainer: Danny Rawlins, crux at romster dot me
    4 # Depends on: python3 spirv-headers
    5 
    6 name=spirv-tools
    7 version=2019.4
    8 commit=3e4abc9ac382b6fc7a88316a700652404b6fb9f7
    9 release=3
   10 source=(
   11 	#https://github.com/KhronosGroup/SPIRV-Tools/archive/v$version/SPIRV-Tools-v$version.tar.gz
   12 	https://github.com/KhronosGroup/SPIRV-Tools/archive/$commit.tar.gz#/$name-$commit.tar.gz
   13 	fix-cmake-install.patch
   14 )
   15 
   16 build() {
   17 #	cd SPIRV-Tools-$version
   18 	cd SPIRV-Tools-$commit
   19 
   20 	patch -p1 -i $SRC/fix-cmake-install.patch
   21 
   22 	mkdir build-{shared,static}
   23 
   24 	local config="
   25 -DCMAKE_INSTALL_PREFIX=/usr \
   26 -DCMAKE_INSTALL_LIBDIR=lib \
   27 -DCMAKE_BUILD_TYPE=Release \
   28 -DSPIRV_WERROR=OFF \
   29 -DSPIRV-Headers_SOURCE_DIR=/usr \
   30 -DPYTHON_EXECUTABLE=/usr/bin/python3 \
   31 -GNinja"
   32 
   33 	(cd build-static
   34 	cmake .. $config -DBUILD_SHARED_LIBS=OFF
   35 	ninja -j ${JOBS:-1}
   36 	)
   37 
   38 	(cd build-shared
   39 	cmake .. $config -DBUILD_SHARED_LIBS=ON
   40 	ninja -j ${JOBS:-1}
   41 	)
   42 
   43 	DESTDIR=$PKG ninja -C build-static install
   44 	DESTDIR=$PKG ninja -C build-shared install
   45 }

Generated by cgit