Add libglvnd
This commit is contained in:
		
							parent
							
								
									4bb38fd65a
								
							
						
					
					
						commit
						3938a661be
					
				
					 1 changed files with 46 additions and 0 deletions
				
			
		
							
								
								
									
										46
									
								
								scripts.d/45-x11/60-libglvnd.sh
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										46
									
								
								scripts.d/45-x11/60-libglvnd.sh
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,46 @@
 | 
			
		|||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
GLVND_REPO="https://gitlab.freedesktop.org/glvnd/libglvnd.git"
 | 
			
		||||
GLVND_COMMIT="8f3c5b17a21e2222ab3e5fd38870b915815aca49"
 | 
			
		||||
 | 
			
		||||
ffbuild_enabled() {
 | 
			
		||||
    [[ $TARGET != linux* ]] && return -1
 | 
			
		||||
    return 0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
ffbuild_dockerbuild() {
 | 
			
		||||
    git-mini-clone "$GLVND_REPO" "$GLVND_COMMIT" glvnd
 | 
			
		||||
    cd glvnd
 | 
			
		||||
 | 
			
		||||
    mkdir build && cd build
 | 
			
		||||
 | 
			
		||||
    local myconf=(
 | 
			
		||||
        --prefix="$FFBUILD_PREFIX"
 | 
			
		||||
        --buildtype=release
 | 
			
		||||
        --default-library=static
 | 
			
		||||
        -Dasm=enabled
 | 
			
		||||
        -Dx11=enabled
 | 
			
		||||
        -Degl=true
 | 
			
		||||
        -Dglx=enabled
 | 
			
		||||
        -Dgles1=true
 | 
			
		||||
        -Dgles2=true
 | 
			
		||||
        -Dheaders=true
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    if [[ $TARGET == linux* ]]; then
 | 
			
		||||
        myconf+=(
 | 
			
		||||
            --cross-file=/cross.meson
 | 
			
		||||
        )
 | 
			
		||||
    else
 | 
			
		||||
        echo "Unknown target"
 | 
			
		||||
        return -1
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    export LDFLAGS="$LDFLAGS -lxcb -lXau"
 | 
			
		||||
 | 
			
		||||
    meson "${myconf[@]}" ..
 | 
			
		||||
    ninja -j"$(nproc)"
 | 
			
		||||
    ninja install
 | 
			
		||||
 | 
			
		||||
    rm "$FFBUILD_PREFIX"/lib/lib*.so*
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue