Add lame
This commit is contained in:
		
							parent
							
								
									e2a7733951
								
							
						
					
					
						commit
						8e005b17ff
					
				
					 1 changed files with 55 additions and 0 deletions
				
			
		
							
								
								
									
										55
									
								
								scripts.d/50-libmp3lame.sh
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										55
									
								
								scripts.d/50-libmp3lame.sh
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,55 @@
 | 
			
		|||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
LAME_SRC="https://sourceforge.net/projects/lame/files/lame/3.100/lame-3.100.tar.gz/download"
 | 
			
		||||
 | 
			
		||||
ffbuild_enabled() {
 | 
			
		||||
    return 0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
ffbuild_dockerstage() {
 | 
			
		||||
    to_df "ADD $SELF /root/lame.sh"
 | 
			
		||||
    to_df "RUN bash -c 'source /root/lame.sh && ffbuild_dockerbuild && rm /root/lame.sh'"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
ffbuild_dockerbuild() {
 | 
			
		||||
    mkdir lame
 | 
			
		||||
    cd lame
 | 
			
		||||
    wget -O lame.tar.gz "$LAME_SRC" || return -1
 | 
			
		||||
    tar xaf lame.tar.gz || return -1
 | 
			
		||||
    rm lame.tar.gz
 | 
			
		||||
    cd lame*
 | 
			
		||||
 | 
			
		||||
    local myconf=(
 | 
			
		||||
        --prefix="$FFBUILD_PREFIX"
 | 
			
		||||
        --disable-shared
 | 
			
		||||
        --enable-static
 | 
			
		||||
        --enable-nasm
 | 
			
		||||
        --disable-gtktest
 | 
			
		||||
        --disable-cpml
 | 
			
		||||
        --disable-frontend
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    if [[ $TARGET == win* ]]; then
 | 
			
		||||
        myconf+=(
 | 
			
		||||
            --host="$FFBUILD_TOOLCHAIN"
 | 
			
		||||
        )
 | 
			
		||||
    else
 | 
			
		||||
        echo "Unknown target"
 | 
			
		||||
        return -1
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    ./configure "${myconf[@]}" || return -1
 | 
			
		||||
    make -j$(nproc) || return -1
 | 
			
		||||
    make install || return -1
 | 
			
		||||
 | 
			
		||||
    cd ../..
 | 
			
		||||
    rm -rf lame
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
ffbuild_configure() {
 | 
			
		||||
    echo --enable-libmp3lame
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
ffbuild_unconfigure() {
 | 
			
		||||
    echo --disable-libmp3lame
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue