Push many recipes to be dynamically linked

This commit is contained in:
Wildan M 2025-08-23 18:33:13 +07:00
parent 23cb794b6b
commit 6d505a649c
23 changed files with 40 additions and 62 deletions

View File

@ -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"
"""
"""

View File

@ -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

View File

@ -9,7 +9,7 @@ dependencies = [
]
script = """
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" -L "${COOKBOOK_SYSROOT}/lib" osdemo.c -o osdemo -static -lorbital $("${PKG_CONFIG}" --libs glu) -lz
mkdir -pv "${COOKBOOK_STAGE}/usr/bin"
cp -v "osdemo" "${COOKBOOK_STAGE}/usr/bin/osdemo"
"""

View File

@ -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"

View File

@ -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"

View File

@ -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]

View File

@ -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]

View File

@ -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

View File

@ -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
"""

View File

@ -1,5 +1,3 @@
[source]
git = "https://gitlab.redox-os.org/redox-os/orbital.git"
[build]
template = "cargo"

View File

@ -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]

View File

@ -16,14 +16,18 @@ dependencies = [
"zlib",
]
script = """
DYNAMIC_INIT
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

View File

@ -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"

View File

@ -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
"""

View File

@ -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
"""

View File

@ -5,6 +5,7 @@ blake3 = "0d1c9fdf53c0ca4bd66ba707d49a079d2dd6f5a960cdec74a56e29952c4ffe73"
[build]
template = "custom"
script = """
DYNAMIC_INIT
COOKBOOK_CONFIGURE_FLAGS+=(
--disable-db-install
--disable-stripping

View File

@ -15,6 +15,7 @@ dependencies = [
]
template = "custom"
script = """
DYNAMIC_INIT
export LIBS="-lvorbis -logg"
COOKBOOK_CONFIGURE_FLAGS+=(
--enable-music-ogg

View File

@ -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]

View File

@ -28,6 +28,5 @@ COOKBOOK_CONFIGURE_FLAGS=(
--disable-music-midi
--disable-music-mod
)
set -x
cookbook_configure
"""

View File

@ -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

View File

@ -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]

View File

@ -6,7 +6,7 @@ dependencies = [
"ncurses",
]
script = """
export CPPFLAGS="-I${COOKBOOK_SYSROOT}/include/ncurses"
DYNAMIC_INIT
cookbook_configure
"""

View File

@ -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]