Add rav1e
This commit is contained in:
		
							parent
							
								
									c01082bb28
								
							
						
					
					
						commit
						37fe9aca94
					
				
					 1 changed files with 45 additions and 0 deletions
				
			
		
							
								
								
									
										45
									
								
								scripts.d/50-rav1e.sh
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										45
									
								
								scripts.d/50-rav1e.sh
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
					@ -0,0 +1,45 @@
 | 
				
			||||||
 | 
					#!/bin/bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					RAV1E_SRC_PREFIX="https://github.com/xiph/rav1e/releases/download/p20200901"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ffbuild_enabled() {
 | 
				
			||||||
 | 
					    [[ $TARGET == win32 ]] && return -1
 | 
				
			||||||
 | 
					    return 0
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ffbuild_dockerstage() {
 | 
				
			||||||
 | 
					    to_df "ADD $SELF /stage.sh"
 | 
				
			||||||
 | 
					    to_df "RUN run_stage"
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ffbuild_dockerbuild() {
 | 
				
			||||||
 | 
					    mkdir rav1e && cd rav1e
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if [[ $TARGET == win64 ]]; then
 | 
				
			||||||
 | 
					        wget -O rav1e.zip "${RAV1E_SRC_PREFIX}/rav1e-windows-gnu.zip"
 | 
				
			||||||
 | 
					    else
 | 
				
			||||||
 | 
					        echo "Unknown target"
 | 
				
			||||||
 | 
					        return -1
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    unzip rav1e.zip
 | 
				
			||||||
 | 
					    cd rav1e-*
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    rm -r bin lib/*.dll.a
 | 
				
			||||||
 | 
					    sed -i "s|^prefix=.*|prefix=${FFBUILD_PREFIX}|" lib/pkgconfig/rav1e.pc
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    mkdir -p "$FFBUILD_PREFIX"/{include,lib/pkgconfig}
 | 
				
			||||||
 | 
					    cp -r include/. "$FFBUILD_PREFIX"/include/.
 | 
				
			||||||
 | 
					    cp -r lib/. "$FFBUILD_PREFIX"/lib/.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    cd ..
 | 
				
			||||||
 | 
					    rm -rf rav1e
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ffbuild_configure() {
 | 
				
			||||||
 | 
					    echo --enable-librav1e
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ffbuild_unconfigure() {
 | 
				
			||||||
 | 
					    echo --disable-librav1e
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue