mirror of
https://github.com/Ryujinx/SDL2-CS.git
synced 2024-12-23 04:05:30 +00:00
Merge pull request #2 from Xyene/linux-libsdl-build
Add Docker-based build for building SDL on Linux
This commit is contained in:
commit
12c4d809ef
30
.github/workflows/build.yml
vendored
Normal file
30
.github/workflows/build.yml
vendored
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
name: build-linux
|
||||||
|
on: [push]
|
||||||
|
# schedule:
|
||||||
|
# - cron: '0 0 * * *'
|
||||||
|
jobs:
|
||||||
|
build-linux:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Build i386 binaries
|
||||||
|
run: |
|
||||||
|
mkdir /tmp/i386
|
||||||
|
cd linux-build
|
||||||
|
docker build -t sdl2-i386 -f Dockerfile.i386 .
|
||||||
|
docker run -v `pwd`/compile:/entry -v /tmp/i386:/io sdl2-i386
|
||||||
|
cp /tmp/i386/lib/libSDL2-2.0.so.0 ../native/linux-x86
|
||||||
|
- name: Build amd64 binaries
|
||||||
|
run: |
|
||||||
|
mkdir /tmp/amd64
|
||||||
|
cd linux-build
|
||||||
|
docker build -t sdl2-amd64 -f Dockerfile.amd64 .
|
||||||
|
docker run -v `pwd`/compile:/entry -v /tmp/amd64:/io sdl2-amd64
|
||||||
|
cp /tmp/amd64/lib/libSDL2-2.0.so.0 ../native/linux-x64
|
||||||
|
- name: Create pull request
|
||||||
|
uses: peter-evans/create-pull-request@v2
|
||||||
|
with:
|
||||||
|
commit-message: 'Update Linux SDL binaries'
|
||||||
|
body: This PR has been auto-generated to update the Linux SDL binaries.
|
||||||
|
branch: update-linux-binaries
|
||||||
|
|
19
linux-build/Dockerfile.amd64
Normal file
19
linux-build/Dockerfile.amd64
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
FROM debian:jessie
|
||||||
|
|
||||||
|
# We build on Jessie, but libwayland-dev and wayland-protocols are only in
|
||||||
|
# Stretch and later.
|
||||||
|
COPY stretch-package-pins /etc/apt/preferences.d/stretch
|
||||||
|
|
||||||
|
# Packages are from https://hg.libsdl.org/SDL/file/default/docs/README-linux.md
|
||||||
|
RUN echo deb http://deb.debian.org/debian/ stretch main > /etc/apt/sources.list.d/stretch.list && \
|
||||||
|
echo deb http://security.debian.org/debian-security stretch/updates main >> /etc/apt/sources.list.d/stretch.list && \
|
||||||
|
apt-get update && \
|
||||||
|
apt-get install -y build-essential mercurial make cmake autoconf automake \
|
||||||
|
libtool libasound2-dev libpulse-dev libaudio-dev libx11-dev libxext-dev \
|
||||||
|
libxrandr-dev libxcursor-dev libxi-dev libxinerama-dev libxxf86vm-dev \
|
||||||
|
libxss-dev libgl1-mesa-dev libesd0-dev libdbus-1-dev libudev-dev \
|
||||||
|
libgles1-mesa-dev libgles2-mesa-dev libegl1-mesa-dev libibus-1.0-dev \
|
||||||
|
fcitx-libs-dev libsamplerate0-dev libsndio-dev libwayland-dev \
|
||||||
|
libxkbcommon-dev wayland-protocols
|
||||||
|
|
||||||
|
ENTRYPOINT ["/entry"]
|
19
linux-build/Dockerfile.i386
Normal file
19
linux-build/Dockerfile.i386
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
FROM i386/debian:jessie
|
||||||
|
|
||||||
|
# We build on Jessie, but libwayland-dev and wayland-protocols are only in
|
||||||
|
# Stretch and later.
|
||||||
|
COPY stretch-package-pins /etc/apt/preferences.d/stretch
|
||||||
|
|
||||||
|
# Packages are from https://hg.libsdl.org/SDL/file/default/docs/README-linux.md
|
||||||
|
RUN echo deb http://deb.debian.org/debian/ stretch main > /etc/apt/sources.list.d/stretch.list && \
|
||||||
|
echo deb http://security.debian.org/debian-security stretch/updates main >> /etc/apt/sources.list.d/stretch.list && \
|
||||||
|
apt-get update && \
|
||||||
|
apt-get install -y build-essential mercurial make cmake autoconf automake \
|
||||||
|
libtool libasound2-dev libpulse-dev libaudio-dev libx11-dev libxext-dev \
|
||||||
|
libxrandr-dev libxcursor-dev libxi-dev libxinerama-dev libxxf86vm-dev \
|
||||||
|
libxss-dev libgl1-mesa-dev libesd0-dev libdbus-1-dev libudev-dev \
|
||||||
|
libgles1-mesa-dev libgles2-mesa-dev libegl1-mesa-dev libibus-1.0-dev \
|
||||||
|
fcitx-libs-dev libsamplerate0-dev libsndio-dev libwayland-dev \
|
||||||
|
libxkbcommon-dev wayland-protocols
|
||||||
|
|
||||||
|
ENTRYPOINT ["/entry"]
|
11
linux-build/compile
Executable file
11
linux-build/compile
Executable file
|
@ -0,0 +1,11 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -euf -o pipefail
|
||||||
|
|
||||||
|
hg clone https://hg.libsdl.org/SDL SDL
|
||||||
|
cd SDL
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
../configure --prefix=/io
|
||||||
|
make -j$(nproc)
|
||||||
|
make install
|
27
linux-build/stretch-package-pins
Normal file
27
linux-build/stretch-package-pins
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
Package: *
|
||||||
|
Pin: release n=stretch
|
||||||
|
Pin-Priority: 50
|
||||||
|
|
||||||
|
Package: libwayland-dev
|
||||||
|
Pin: release n=stretch
|
||||||
|
Pin-Priority: 800
|
||||||
|
|
||||||
|
Package: libwayland-bin
|
||||||
|
Pin: release n=stretch
|
||||||
|
Pin-Priority: 800
|
||||||
|
|
||||||
|
Package: libwayland-client0
|
||||||
|
Pin: release n=stretch
|
||||||
|
Pin-Priority: 800
|
||||||
|
|
||||||
|
Package: libwayland-cursor0
|
||||||
|
Pin: release n=stretch
|
||||||
|
Pin-Priority: 800
|
||||||
|
|
||||||
|
Package: libwayland-server0
|
||||||
|
Pin: release n=stretch
|
||||||
|
Pin-Priority: 800
|
||||||
|
|
||||||
|
Package: wayland-protocols
|
||||||
|
Pin: release n=stretch
|
||||||
|
Pin-Priority: 800
|
BIN
native/linux-x64/libSDL2-2.0.so.0
Executable file
BIN
native/linux-x64/libSDL2-2.0.so.0
Executable file
Binary file not shown.
BIN
native/linux-x86/libSDL2-2.0.so.0
Executable file
BIN
native/linux-x86/libSDL2-2.0.so.0
Executable file
Binary file not shown.
Loading…
Reference in a new issue