added shaderc
This commit is contained in:
		
							parent
							
								
									a44930ad28
								
							
						
					
					
						commit
						ece7ecab26
					
				
					 2 changed files with 59 additions and 0 deletions
				
			
		
							
								
								
									
										36
									
								
								pkgs/shaderc/build.sh
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								pkgs/shaderc/build.sh
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,36 @@ | |||
| pkgname=shaderc | ||||
| pkgver=main | ||||
| 
 | ||||
| fetch() { | ||||
| 	curl -L "https://github.com/google/shaderc/archive/refs/heads/main.tar.gz" -o $pkgname-$pkgver.tar.xz | ||||
| 	tar -xf $pkgname-$pkgver.tar.xz | ||||
| 	cp ../third-party.patch . | ||||
| 	mkdir $pkgname-$pkgver/build | ||||
| 	cd $pkgname-$pkgver | ||||
| 	patch -p1 < ../third-party.patch | ||||
| 	echo \"$pkgver\" > glslc/src/build-version.inc | ||||
| } | ||||
| 
 | ||||
| build() { | ||||
| 	cd $pkgname-$pkgver | ||||
| 	cd build | ||||
| 	cmake -G Ninja ../ \ | ||||
| 		-DCMAKE_BUILD_TYPE=Release \ | ||||
| 		-DCMAKE_INSTALL_PREFIX=/usr \ | ||||
| 		-DCMAKE_INSTALL_LIBDIR=lib \ | ||||
| 		-DSHADERC_SKIP_TESTS=ON \ | ||||
| 		-Dglslang_SOURCE_DIR=/usr/include/glslang | ||||
| 	samu | ||||
| } | ||||
| 
 | ||||
| package() { | ||||
| 	cd $pkgname-$pkgver | ||||
| 	cd build | ||||
| 	DESTDIR=$pkgdir samu install | ||||
| } | ||||
| 
 | ||||
| license() { | ||||
| 	cd $pkgname-$pkgver | ||||
| 	cat LICENSE | ||||
| #	cat COPYING | ||||
| } | ||||
							
								
								
									
										23
									
								
								pkgs/shaderc/third-party.patch
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								pkgs/shaderc/third-party.patch
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,23 @@ | |||
| --- a/CMakeLists.txt
 | ||||
| +++ b/CMakeLists.txt
 | ||||
| @@ -92,7 +92,6 @@ endif(MSVC)
 | ||||
|   | ||||
|  # Configure subdirectories. | ||||
|  # We depend on these for later projects, so they should come first. | ||||
| -add_subdirectory(third_party)
 | ||||
|   | ||||
|  if(SHADERC_ENABLE_SPVC) | ||||
|  add_subdirectory(libshaderc_spvc) | ||||
| @@ -103,11 +102,6 @@ add_subdirectory(libshaderc)
 | ||||
|  add_subdirectory(glslc) | ||||
|  add_subdirectory(examples) | ||||
|   | ||||
| -add_custom_target(build-version
 | ||||
| -  ${PYTHON_EXECUTABLE}
 | ||||
| -  ${CMAKE_CURRENT_SOURCE_DIR}/utils/update_build_version.py
 | ||||
| -  ${shaderc_SOURCE_DIR} ${spirv-tools_SOURCE_DIR} ${glslang_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/build-version.inc
 | ||||
| -  COMMENT "Update build-version.inc in the Shaderc build directory (if necessary).")
 | ||||
|   | ||||
|  function(define_pkg_config_file NAME LIBS) | ||||
|    add_custom_target(${NAME}-pkg-config ALL | ||||
| 
 | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue