mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-11-06 20:47:45 +08:00
Merge branch 'dynamic-games' into 'master'
Push all recipes to be dynamically linked See merge request redox-os/cookbook!595
This commit is contained in:
commit
6e527b4350
@ -8,9 +8,11 @@ dependencies=[
|
||||
]
|
||||
template = "custom"
|
||||
script = """
|
||||
set -x
|
||||
"${CXX}" -O2 -I "${COOKBOOK_SYSROOT}/usr/include" -L "${COOKBOOK_SYSROOT}/usr/lib" "${COOKBOOK_RECIPE}/gears.c" -o gears -static -lorbital $("${PKG_CONFIG}" --libs glu) -lz
|
||||
set +x
|
||||
DYNAMIC_INIT
|
||||
|
||||
${CXX} -O2 -I "${COOKBOOK_SYSROOT}/usr/include" \
|
||||
$LDFLAGS "${COOKBOOK_RECIPE}/gears.c" \
|
||||
-o gears -lorbital $("${PKG_CONFIG}" --libs glu) -lz
|
||||
mkdir -pv "${COOKBOOK_STAGE}/usr/bin"
|
||||
cp -v "gears" "${COOKBOOK_STAGE}/usr/bin/gears"
|
||||
"""
|
||||
"""
|
||||
|
||||
@ -11,6 +11,7 @@ dependencies = [
|
||||
"zlib"
|
||||
]
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
EXAMPLES=(
|
||||
window
|
||||
)
|
||||
@ -21,9 +22,7 @@ do
|
||||
--release \
|
||||
--manifest-path "${COOKBOOK_SOURCE}/glutin_examples/Cargo.toml" \
|
||||
--example "${example}" \
|
||||
-- \
|
||||
-L "${COOKBOK_SYSROOT}/lib" \
|
||||
-C link-args="-Wl,-Bstatic $("${TARGET}-pkg-config" --libs osmesa) -lz -lstdc++ -lc -lgcc"
|
||||
-- -C link-args="$LDFLAGS $("${TARGET}-pkg-config" --libs osmesa) -lz -lstdc++ -lc -lgcc"
|
||||
mkdir -pv "${COOKBOOK_STAGE}/bin"
|
||||
cp -v "target/${TARGET}/release/examples/${example}" "${COOKBOOK_STAGE}/bin/glutin_${example}"
|
||||
done
|
||||
|
||||
@ -8,8 +8,11 @@ dependencies = [
|
||||
"zlib"
|
||||
]
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
|
||||
cp "${COOKBOOK_SOURCE}/../osdemo.c" ./osdemo.c
|
||||
"${CXX}" -O2 -I "${COOKBOOK_SYSROOT}/include" -L "${COOKBOOK_SYSROOT}/lib" osdemo.c -o osdemo -static -lorbital $("${PKG_CONFIG}" --libs glu) -lz
|
||||
${CXX} -O2 -I "${COOKBOOK_SYSROOT}/include" $LDFLAGS osdemo.c -o osdemo \
|
||||
-lorbital $("${PKG_CONFIG}" --libs glu) -lz
|
||||
mkdir -pv "${COOKBOOK_STAGE}/usr/bin"
|
||||
cp -v "osdemo" "${COOKBOOK_STAGE}/usr/bin/osdemo"
|
||||
"""
|
||||
|
||||
@ -16,9 +16,12 @@ dependencies = [
|
||||
"zlib"
|
||||
]
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
cp "${COOKBOOK_SOURCE}/../gears.c" ./gears.c
|
||||
rsync -av --delete --exclude='.git' "${COOKBOOK_SOURCE}/../assets" ./assets
|
||||
"${CXX}" -O2 -I "${COOKBOOK_SYSROOT}/include" -L "${COOKBOOK_SYSROOT}/lib" gears.c -o sdl2_gears -dynamic -lSDL2_image -lSDL2_mixer -lSDL2_ttf -lSDL2 -lorbital $("${PKG_CONFIG}" --libs osmesa) -lfreetype -lpng -ljpeg -lvorbisfile -lvorbis -logg -lz
|
||||
${CXX} -O2 -I "${COOKBOOK_SYSROOT}/include" $LDFLAGS gears.c -o sdl2_gears \
|
||||
-dynamic -lSDL2_image -lSDL2_mixer -lSDL2_ttf -lSDL2 -lorbital \
|
||||
$("${PKG_CONFIG}" --libs osmesa) -lfreetype -lpng -ljpeg -lvorbisfile -lvorbis -logg -lz
|
||||
rm -rf "${COOKBOOK_STAGE}/usr/games/sdl2_gears"
|
||||
mkdir -pv "${COOKBOOK_STAGE}/usr/games/sdl2_gears"
|
||||
cp -v "sdl2_gears" "${COOKBOOK_STAGE}/usr/games/sdl2_gears/sdl2_gears"
|
||||
|
||||
@ -152,7 +152,7 @@ diff -ruwN git-2.13.1/git-compat-util.h source/git-compat-util.h
|
||||
+
|
||||
+#ifndef DEV_NULL
|
||||
+#if defined(__redox__)
|
||||
+#define DEV_NULL "null:"
|
||||
+#define DEV_NULL "/scheme/null"
|
||||
+#else
|
||||
+#define DEV_NULL "/dev/null"
|
||||
+#endif
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
git = "https://gitlab.redox-os.org/redox-os/llvm-project.git"
|
||||
upstream = "https://github.com/rust-lang/llvm-project.git"
|
||||
branch = "redox-2024-05-11"
|
||||
shallow_clone = true
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
@ -30,8 +31,6 @@ case "${TARGET}" in
|
||||
;;
|
||||
esac
|
||||
|
||||
export LDFLAGS="-Wl,-rpath-link,${COOKBOOK_SYSROOT}/lib $LDFLAGS"
|
||||
|
||||
COOKBOOK_CMAKE_FLAGS=(
|
||||
-DCMAKE_CXX_FLAGS="--std=gnu++11"
|
||||
-DBUILD_SHARED_LIBS=False
|
||||
@ -67,7 +66,5 @@ COOKBOOK_CMAKE_FLAGS=(
|
||||
-DLLVM_ENABLE_PROJECTS="llvm"
|
||||
)
|
||||
|
||||
set -x
|
||||
cookbook_cmake "${COOKBOOK_SOURCE}/llvm"
|
||||
set +x
|
||||
"""
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
tar = "https://pkg-config.freedesktop.org/releases/pkg-config-0.29.2.tar.gz"
|
||||
blake3 = "713372b09a1fafeec130dc9bf812a3880f2a90496af5d2194e508d91ccf667d0"
|
||||
script = """
|
||||
wget -O config.sub "https://gitlab.redox-os.org/redox-os/gnu-config/-/raw/master/config.sub?inline=false"
|
||||
GNU_CONFIG_GET config.sub
|
||||
"""
|
||||
|
||||
[build]
|
||||
@ -15,6 +15,5 @@ dependencies = [
|
||||
template = "custom"
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
export LIBS="-lpcre2-8"
|
||||
cookbook_configure
|
||||
"""
|
||||
|
||||
@ -4,7 +4,7 @@ blake3 = "8bc50ffdba20579fb3080a0dca32cb939c8a3c19259aed026482c6ac069b0007"
|
||||
patches = ["01_redox.patch"]
|
||||
script = """
|
||||
./autogen.sh
|
||||
wget -O config.sub "https://gitlab.redox-os.org/redox-os/gnu-config/-/raw/master/config.sub?inline=false"
|
||||
GNU_CONFIG_GET config.sub
|
||||
"""
|
||||
|
||||
[build]
|
||||
@ -14,13 +14,14 @@ dependencies = [
|
||||
]
|
||||
template = "custom"
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
export CFLAGS="-I${COOKBOOK_SYSROOT}/include/SDL"
|
||||
export CPPFLAGS="-I${COOKBOOK_SYSROOT}/include/SDL"
|
||||
export LDFLAGS="-L${COOKBOOK_SYSROOT}/lib -static"
|
||||
export LDFLAGS+=" -lorbital"
|
||||
COOKBOOK_CONFIGURE_FLAGS+=(
|
||||
--disable-opengl
|
||||
--disable-sdltest
|
||||
--with-sdl-prefix="${COOKBOOK_SYSROOT}"
|
||||
--with-sdl
|
||||
)
|
||||
cookbook_configure
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@ tar = "https://downloads.scummvm.org/frs/scummvm/2.0.0/scummvm-2.0.0.tar.xz"
|
||||
blake3 = "02e6791fd43ad3cb4238c07d23350ca1459a0f692689e585dba1d46648f64327"
|
||||
patches = ["redox.patch"]
|
||||
script = """
|
||||
wget -O config.sub "https://gitlab.redox-os.org/redox-os/gnu-config/-/raw/master/config.sub?inline=false"
|
||||
GNU_CONFIG_GET config.sub
|
||||
"""
|
||||
|
||||
[build]
|
||||
@ -16,12 +16,12 @@ dependencies = [
|
||||
"libpng",
|
||||
]
|
||||
script = """
|
||||
export LDFLAGS="-static"
|
||||
DYNAMIC_INIT
|
||||
|
||||
COOKBOOK_CONFIGURE="${COOKBOOK_SOURCE}/configure"
|
||||
export LDFLAGS+=" -lorbital"
|
||||
COOKBOOK_CONFIGURE_FLAGS=(
|
||||
--host="${TARGET}"
|
||||
--prefix=""
|
||||
--prefix="/usr"
|
||||
--with-sdl-prefix="${COOKBOOK_SYSROOT}"
|
||||
--with-freetype2-prefix="${COOKBOOK_SYSROOT}"
|
||||
--with-png-prefix="${COOKBOOK_SYSROOT}"
|
||||
|
||||
@ -29,7 +29,6 @@ env -i \
|
||||
PKG_CONFIG="pkg-config" \
|
||||
"${COOKBOOK_MAKE}" -j"${COOKBOOK_MAKE_JOBS}" ENABLE_FS=stdio mapc sols
|
||||
|
||||
export LDFLAGS+="-L${COOKBOOK_SYSROOT}/lib -z noexecstack"
|
||||
"${COOKBOOK_MAKE}" -j"${COOKBOOK_MAKE_JOBS}" ENABLE_FS=stdio ENABLE_NLS=0 clean-src
|
||||
"${COOKBOOK_MAKE}" -j"${COOKBOOK_MAKE_JOBS}" ENABLE_FS=stdio ENABLE_NLS=0 neverball neverputt
|
||||
|
||||
|
||||
@ -16,17 +16,12 @@ dependencies = [
|
||||
"zlib",
|
||||
]
|
||||
script = """
|
||||
COOKBOOK_CONFIGURE="cmake"
|
||||
DYNAMIC_INIT
|
||||
COOKBOOK_CONFIGURE_FLAGS=(
|
||||
-DCMAKE_VERBOSE_MAKEFILE=On
|
||||
-DCMAKE_CROSSCOMPILING=True
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
-DCMAKE_INSTALL_PREFIX="/usr"
|
||||
-DSDL2_INCLUDE_DIR="${COOKBOOK_SYSROOT}/include/SDL2"
|
||||
-DSDL2_LIBRARY="-lSDL2_mixer -lvorbisfile -lvorbis -logg -lSDL2 -lorbital $("${TARGET}-pkg-config" --libs osmesa)"
|
||||
-DSDL2_MIXER_INCLUDE_DIR="${COOKBOOK_SYSROOT}/include/SDL2"
|
||||
-DSDL2_MIXER_LIBRARY="SDL2_mixer"
|
||||
"${COOKBOOK_SOURCE}"
|
||||
)
|
||||
cookbook_configure
|
||||
cookbook_cmake
|
||||
"""
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
tar = "https://download.gnome.org/sources/atk/2.38/atk-2.38.0.tar.xz"
|
||||
blake3 = "cbc1b7ba03009ee5cc0e646d8a86117e0d65bf8d105f2e8714fbde0299a8012e"
|
||||
script = """
|
||||
wget -O config.sub "https://gitlab.redox-os.org/redox-os/gnu-config/-/raw/master/config.sub?inline=false"
|
||||
GNU_CONFIG_GET config.sub
|
||||
"""
|
||||
|
||||
[build]
|
||||
|
||||
@ -16,14 +16,19 @@ dependencies = [
|
||||
"zlib",
|
||||
]
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
|
||||
export LDFLAGS="$LDFLAGS -lSDL2 -lorbital -lOSMesa -lstdc++"
|
||||
ARCH="${TARGET%%-*}"
|
||||
COOKBOOK_CONFIGURE_FLAGS=(
|
||||
--enable-cross-compile
|
||||
--target-os=redox
|
||||
--arch="${ARCH}"
|
||||
--cross_prefix="${TARGET}-"
|
||||
--prefix=/
|
||||
--prefix=/usr
|
||||
--disable-doc
|
||||
--enable-shared
|
||||
--disable-static
|
||||
--disable-network
|
||||
--enable-sdl2
|
||||
--enable-zlib
|
||||
|
||||
@ -6,18 +6,9 @@ patches = [
|
||||
]
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
GNU_CONFIG_GET config.sub
|
||||
autotools_recursive_regenerate
|
||||
"""
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
COOKBOOK_CONFIGURE_FLAGS=(
|
||||
--host="${GNU_TARGET}"
|
||||
--prefix="/usr"
|
||||
--enable-shared
|
||||
--enable-static
|
||||
)
|
||||
cookbook_configure
|
||||
"""
|
||||
template = "configure"
|
||||
|
||||
@ -4,7 +4,7 @@ blake3 = "36f4bbb48c70975116b00ab0cff577931b96f703b2774ac3b33131d001419435"
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
chmod +w config.sub
|
||||
wget -O config.sub "https://gitlab.redox-os.org/redox-os/gnu-config/-/raw/master/config.sub?inline=false"
|
||||
GNU_CONFIG_GET config.sub
|
||||
autotools_recursive_regenerate
|
||||
"""
|
||||
|
||||
|
||||
@ -3,21 +3,12 @@ tar = "https://github.com/xiph/vorbis/releases/download/v1.3.7/libvorbis-1.3.7.t
|
||||
blake3 = "c67f3f74ec26d93a5571c4404a64eb6e6587d7d77b46b552f7b410f5bc5b1f03"
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
GNU_CONFIG_GET config.sub
|
||||
autotools_recursive_regenerate
|
||||
"""
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
template = "configure"
|
||||
dependencies = [
|
||||
"libogg"
|
||||
]
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
COOKBOOK_CONFIGURE_FLAGS=(
|
||||
--host="${GNU_TARGET}"
|
||||
--prefix="/usr"
|
||||
--enable-shared
|
||||
--enable-static
|
||||
)
|
||||
cookbook_configure
|
||||
"""
|
||||
|
||||
@ -5,6 +5,7 @@ blake3 = "0d1c9fdf53c0ca4bd66ba707d49a079d2dd6f5a960cdec74a56e29952c4ffe73"
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
COOKBOOK_CONFIGURE_FLAGS+=(
|
||||
--disable-db-install
|
||||
--disable-stripping
|
||||
|
||||
@ -15,6 +15,7 @@ dependencies = [
|
||||
]
|
||||
template = "custom"
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
export LIBS="-lvorbis -logg"
|
||||
COOKBOOK_CONFIGURE_FLAGS+=(
|
||||
--enable-music-ogg
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
tar = "http://www.ferzkopp.net/Software/SDL2_gfx/SDL2_gfx-1.0.4.tar.gz"
|
||||
blake3 = "2e9bd2dc0f004349b51418f33219ebf5cd69f25ed0ba660373652a662cbb857c"
|
||||
script = """
|
||||
wget -O config.sub "https://gitlab.redox-os.org/redox-os/gnu-config/-/raw/master/config.sub?inline=false"
|
||||
GNU_CONFIG_GET config.sub
|
||||
"""
|
||||
|
||||
[build]
|
||||
|
||||
@ -28,6 +28,5 @@ COOKBOOK_CONFIGURE_FLAGS=(
|
||||
--disable-music-midi
|
||||
--disable-music-mod
|
||||
)
|
||||
set -x
|
||||
cookbook_configure
|
||||
"""
|
||||
|
||||
@ -6,14 +6,15 @@ git = "https://gitlab.redox-os.org/redox-os/sdl2.git"
|
||||
template = "custom"
|
||||
dependencies = [
|
||||
"liborbital",
|
||||
"llvm18",
|
||||
"mesa",
|
||||
"zlib",
|
||||
]
|
||||
script = """
|
||||
COOKBOOK_CONFIGURE_FLAGS=(
|
||||
--host="${TARGET}"
|
||||
--prefix="/"
|
||||
DYNAMIC_INIT
|
||||
export LDFLAGS="$LDFLAGS -lorbital -lOSMesa -lstdc++"
|
||||
COOKBOOK_CONFIGURE_FLAGS+=(
|
||||
--disable-pulseaudio
|
||||
--disable-shared
|
||||
--disable-video-x11
|
||||
--enable-audio
|
||||
--enable-dummyaudio
|
||||
@ -24,5 +25,5 @@ COOKBOOK_CONFIGURE_FLAGS=(
|
||||
cookbook_configure
|
||||
|
||||
# Hack to add OSMesa
|
||||
sed -i "s/Requires:/Requires: osmesa >= 8.0.0/" "${COOKBOOK_STAGE}/lib/pkgconfig/sdl2.pc"
|
||||
sed -i "s/Requires:/Requires: osmesa >= 8.0.0/" "${COOKBOOK_STAGE}/usr/lib/pkgconfig/sdl2.pc"
|
||||
"""
|
||||
|
||||
@ -13,26 +13,20 @@ dependencies = [
|
||||
]
|
||||
script = """
|
||||
rsync -av --delete "${COOKBOOK_SOURCE}/" ./
|
||||
wget -O config.sub "https://gitlab.redox-os.org/redox-os/gnu-config/-/raw/master/config.sub?inline=false"
|
||||
# FIXME(andypython): dynamically compile
|
||||
GNU_CONFIG_GET config.sub
|
||||
DYNAMIC_INIT
|
||||
autotools_recursive_regenerate
|
||||
COOKBOOK_CONFIGURE="./configure"
|
||||
COOKBOOK_CONFIGURE_FLAGS=(
|
||||
--build="$(cc -dumpmachine)"
|
||||
--host="${TARGET}"
|
||||
--prefix=""
|
||||
COOKBOOK_CONFIGURE_FLAGS+=(
|
||||
--disable-ftp
|
||||
--disable-ipv6
|
||||
--disable-ntlm-wb
|
||||
--disable-tftp
|
||||
--disable-threaded-resolver
|
||||
--enable-shared
|
||||
--enable-static
|
||||
--with-ca-path=/etc/ssl/certs
|
||||
--with-nghttp2="${COOKBOOK_SYSROOT}"
|
||||
--with-ssl="${COOKBOOK_SYSROOT}"
|
||||
--with-zlib="${COOKBOOK_SYSROOT}"
|
||||
--with-nghttp2
|
||||
--with-ssl
|
||||
--with-zlib
|
||||
--without-libpsl
|
||||
)
|
||||
cookbook_configure
|
||||
|
||||
@ -3,7 +3,7 @@ tar = "https://invisible-island.net/archives/vttest/vttest-20140305.tgz"
|
||||
blake3 = "b515b9a5e1f1498ed99e1a1c172fbcfdf2b7a214e185bd2005cc994407ded89e"
|
||||
patches = ["redox.patch"]
|
||||
script = """
|
||||
wget -O config.sub "https://gitlab.redox-os.org/redox-os/gnu-config/-/raw/master/config.sub?inline=false"
|
||||
GNU_CONFIG_GET config.sub
|
||||
"""
|
||||
|
||||
[build]
|
||||
|
||||
@ -6,7 +6,7 @@ dependencies = [
|
||||
"ncurses",
|
||||
]
|
||||
script = """
|
||||
export CPPFLAGS="-I${COOKBOOK_SYSROOT}/include/ncurses"
|
||||
DYNAMIC_INIT
|
||||
cookbook_configure
|
||||
"""
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
[source]
|
||||
tar = "http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.bz2"
|
||||
script = """
|
||||
wget -O config.sub "https://gitlab.redox-os.org/redox-os/gnu-config/-/raw/master/config.sub?inline=false"
|
||||
GNU_CONFIG_GET config.sub
|
||||
"""
|
||||
|
||||
[build]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user