mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 19:02:44 +00:00 
			
		
		
		
	 adf85c719a
			
		
	
	
		adf85c719a
		
	
	
	
	
		
			
			On Arch Linux, the build was picking up the system libsamplerate, which is undesirable. Unlikely that it is needed on Serenity, so disabling it is a good workaround.
		
			
				
	
	
		
			30 lines
		
	
	
	
		
			941 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable file
		
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
	
		
			941 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable file
		
	
	
	
	
| #!/usr/bin/env -S bash ../.port_include.sh
 | |
| port='SDL2'
 | |
| version='2.24.0'
 | |
| useconfigure='true'
 | |
| auth_type='sha256'
 | |
| files="https://github.com/libsdl-org/SDL/releases/download/release-${version}/SDL2-${version}.tar.gz SDL2-${version}.tar.gz 91e4c34b1768f92d399b078e171448c6af18cafda743987ed2064a28954d6d97"
 | |
| configopts=(
 | |
|     "-DCMAKE_TOOLCHAIN_FILE=${SERENITY_BUILD_DIR}/CMakeToolchain.txt"
 | |
|     "-DPULSEAUDIO=OFF"
 | |
|     "-DJACK=OFF"
 | |
|     "-DSDL_LIBSAMPLERATE=OFF" # Disabled to prevent potential collision with host libsamplerate
 | |
|     "-DEXTRA_LDFLAGS=-laudio;-liconv;-ldl"
 | |
| )
 | |
| depends=("libiconv")
 | |
| 
 | |
| configure() {
 | |
|     mkdir -p "${PORT_BUILD_DIR}/SDL2-${version}-build"
 | |
|     cd "${PORT_BUILD_DIR}/SDL2-${version}-build"
 | |
|     cmake "${configopts[@]}" "${PORT_BUILD_DIR}/SDL2-${version}"
 | |
| }
 | |
| 
 | |
| build() {
 | |
|     cd "${PORT_BUILD_DIR}/SDL2-${version}-build"
 | |
|     make "${makeopts[@]}"
 | |
| }
 | |
| 
 | |
| install() {
 | |
|     cd "${PORT_BUILD_DIR}/SDL2-${version}-build"
 | |
|     make install
 | |
| }
 |