diff --git a/recipes/demos/cmatrix/recipe.sh b/recipes/demos/cmatrix/recipe.sh deleted file mode 100644 index eac097f3b..000000000 --- a/recipes/demos/cmatrix/recipe.sh +++ /dev/null @@ -1,34 +0,0 @@ -GIT=https://github.com/abishekvashok/cmatrix -BUILD_DEPENDS=(ncurses) -DEPENDS=(terminfo) - -function recipe_version { - printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" - skip=1 -} - -function recipe_build { - sysroot="$(realpath ../sysroot)" - export LDFLAGS="-L$sysroot/lib -static" - export CPPFLAGS="-I$sysroot/include -I$sysroot/include/ncurses" - autoreconf -i - ./configure \ - --build=${BUILD} \ - --host=${HOST} \ - --prefix=/ \ - --without-fonts - sed -i'' -e 's|#define USE_TIOCSTI 1|/* #undef USE_TIOCSTI */|g' config.h - "$REDOX_MAKE" -j"$($NPROC)" - skip=1 -} - -function recipe_clean { - "$REDOX_MAKE" clean - skip=1 -} - -function recipe_stage { - dest="$(realpath $1)" - "$REDOX_MAKE" DESTDIR="$dest" install - skip=1 -} diff --git a/recipes/demos/cmatrix/recipe.toml b/recipes/demos/cmatrix/recipe.toml new file mode 100644 index 000000000..603bd8154 --- /dev/null +++ b/recipes/demos/cmatrix/recipe.toml @@ -0,0 +1,30 @@ +[source] +git = "https://github.com/abishekvashok/cmatrix" +script = """ +autoreconf -i +""" + +[build] +template = "custom" +dependencies = [ + "ncursesw" +] +script = """ +export LIBS="-lncursesw" + +COOKBOOK_CONFIGURE_FLAGS+=( + --without-fonts +) + +"${COOKBOOK_CONFIGURE}" "${COOKBOOK_CONFIGURE_FLAGS[@]}" + +sed -i -e 's|#define USE_TIOCSTI 1|/* #undef USE_TIOCSTI */|g' config.h + +"${COOKBOOK_MAKE}" -j "${COOKBOOK_MAKE_JOBS}" +"${COOKBOOK_MAKE}" install DESTDIR="${COOKBOOK_STAGE}" +""" + +[package] +dependencies = [ + "terminfo" +] \ No newline at end of file diff --git a/recipes/demos/dynamic-example/recipe.sh b/recipes/demos/dynamic-example/recipe.sh deleted file mode 100644 index 29b01daec..000000000 --- a/recipes/demos/dynamic-example/recipe.sh +++ /dev/null @@ -1,2 +0,0 @@ -GIT=https://gitlab.redox-os.org/redox-os/dynamic-example.git -CARGOFLAGS="-- -C target-feature=-crt-static" diff --git a/recipes/demos/dynamic-example/recipe.toml b/recipes/demos/dynamic-example/recipe.toml new file mode 100644 index 000000000..20358b17c --- /dev/null +++ b/recipes/demos/dynamic-example/recipe.toml @@ -0,0 +1,9 @@ +[source] +git = "https://gitlab.redox-os.org/redox-os/dynamic-example.git" + +[build] +template = "custom" +script = """ +DYNAMIC_INIT +cookbook_cargo +""" \ No newline at end of file diff --git a/recipes/demos/pixelcannon/recipe.sh b/recipes/demos/pixelcannon/recipe.sh deleted file mode 100644 index 82c6393a1..000000000 --- a/recipes/demos/pixelcannon/recipe.sh +++ /dev/null @@ -1,10 +0,0 @@ -GIT=https://github.com/jackpot51/pixelcannon.git -BINDIR=/usr/bin -DEPENDS="orbital" - -function recipe_stage { - mkdir -pv "$1/apps/pixelcannon" - cp -Rv assets "$1/apps/pixelcannon" - mkdir -pv "$1/ui/apps" - cp -v manifest "$1/ui/apps/pixelcannon" -} diff --git a/recipes/demos/pixelcannon/recipe.toml b/recipes/demos/pixelcannon/recipe.toml new file mode 100644 index 000000000..709e3d977 --- /dev/null +++ b/recipes/demos/pixelcannon/recipe.toml @@ -0,0 +1,19 @@ +[source] +git = "https://github.com/jackpot51/pixelcannon.git" + +[build] +template = "custom" +script = """ +cookbook_cargo + +mkdir -pv "${COOKBOOK_STAGE}/apps/pixelcannon" +cp -Rv "${COOKBOOK_SOURCE}/assets" "${COOKBOOK_STAGE}/apps/pixelcannon" + +mkdir -pv "${COOKBOOK_STAGE}/ui/apps" +cp -v "${COOKBOOK_SOURCE}/manifest" "${COOKBOOK_STAGE}/ui/apps/pixelcannon" +""" + +[package] +dependencies = [ + "orbital", +] diff --git a/recipes/dev/patch/01-no-rlimit.patch b/recipes/dev/patch/01_no_rlimit.patch similarity index 100% rename from recipes/dev/patch/01-no-rlimit.patch rename to recipes/dev/patch/01_no_rlimit.patch diff --git a/recipes/dev/patch/02-no-chown.patch b/recipes/dev/patch/02_no_chown.patch similarity index 100% rename from recipes/dev/patch/02-no-chown.patch rename to recipes/dev/patch/02_no_chown.patch diff --git a/recipes/dev/patch/recipe.sh b/recipes/dev/patch/recipe.sh deleted file mode 100644 index bcf14cce9..000000000 --- a/recipes/dev/patch/recipe.sh +++ /dev/null @@ -1,29 +0,0 @@ -VERSION=2.7.6 -TAR=https://ftp.gnu.org/gnu/patch/patch-$VERSION.tar.xz - -function recipe_version { - echo "$VERSION" - skip=1 -} - -function recipe_build { - export LDFLAGS="-static" - wget -O build-aux/config.sub "https://gitlab.redox-os.org/redox-os/gnu-config/-/raw/master/config.sub?inline=false" - autoreconf - ./configure --build=${BUILD} --host=${HOST} --prefix=/ - "$REDOX_MAKE" -j"$($NPROC)" - skip=1 -} - -function recipe_clean { - "$REDOX_MAKE" clean - skip=1 -} - -function recipe_stage { - dest="$(realpath $1)" - "$REDOX_MAKE" DESTDIR="$dest" install - $HOST-strip $1/bin/* - rm -rf "$1/"{share,lib} - skip=1 -} diff --git a/recipes/dev/patch/recipe.toml b/recipes/dev/patch/recipe.toml new file mode 100644 index 000000000..7daf66d75 --- /dev/null +++ b/recipes/dev/patch/recipe.toml @@ -0,0 +1,27 @@ +[source] +tar = "https://ftp.gnu.org/gnu/patch/patch-2.7.6.tar.xz" +blake3 = "d46d14c12aa4ea51e356bf92091c368fd871e1d770b94bc29027886737aecd5f" +patches = [ + "01_no_rlimit.patch", + "02_no_chown.patch", +] +script = """ +wget -O build-aux/config.sub "https://gitlab.redox-os.org/redox-os/gnu-config/-/raw/master/config.sub?inline=false" +autoreconf +""" + +[build] +template = "custom" +script = """ +COOKBOOK_CONFIGURE="${COOKBOOK_SOURCE}/configure" +COOKBOOK_CONFIGURE_FLAGS=( + --host="${TARGET}" + --prefix="/" + --build="$(gcc -dumpmachine)" +) + +cookbook_configure + +${TARGET}-strip "${COOKBOOK_STAGE}/bin/"* +rm -rf "${COOKBOOK_STAGE}/share" "${COOKBOOK_STAGE}/lib" +""" \ No newline at end of file diff --git a/recipes/emulators/rustual-boy/recipe.sh b/recipes/emulators/rustual-boy/recipe.sh deleted file mode 100755 index 1d5f222f2..000000000 --- a/recipes/emulators/rustual-boy/recipe.sh +++ /dev/null @@ -1,12 +0,0 @@ -GIT=https://gitlab.redox-os.org/redox-os/rustual-boy.git -GIT_UPSTREAM=https://github.com/emu-rs/rustual-boy.git -BRANCH="redox" -DEPENDS="orbital" - -function recipe_build { - cd rustual-boy-cli -} - -function recipe_stage { - mv rustual-boy-cli/target target -} diff --git a/recipes/emulators/rustual-boy/recipe.toml b/recipes/emulators/rustual-boy/recipe.toml new file mode 100755 index 000000000..076e1ee5c --- /dev/null +++ b/recipes/emulators/rustual-boy/recipe.toml @@ -0,0 +1,16 @@ +[source] +git = "https://gitlab.redox-os.org/redox-os/rustual-boy.git" +upstream = "https://github.com/emu-rs/rustual-boy.git" +branch = "redox" + +[build] +template = "custom" +script = """ +COOKBOOK_SOURCE="${COOKBOOK_SOURCE}/rustual-boy-cli" +cookbook_cargo +""" + +[package] +dependencies = [ + "orbital", +] \ No newline at end of file diff --git a/recipes/emulators/scummvm/recipe.sh b/recipes/emulators/scummvm/recipe.sh deleted file mode 100644 index 3ce8b729b..000000000 --- a/recipes/emulators/scummvm/recipe.sh +++ /dev/null @@ -1,37 +0,0 @@ -VERSION=2.0.0 -TAR=https://downloads.scummvm.org/frs/scummvm/$VERSION/scummvm-$VERSION.tar.xz -TAR_SHA256=9784418d555ba75822d229514a05cf226b8ce1a751eec425432e6b7e128fca60 -BUILD_DEPENDS=(sdl1 liborbital freetype2 zlib libpng) - -function recipe_version { - echo "$VERSION" - skip=1 -} - -function recipe_build { - wget -O config.sub "https://gitlab.redox-os.org/redox-os/gnu-config/-/raw/master/config.sub?inline=false" - sysroot="$(realpath ../sysroot)" - export LDFLAGS="-static" - ./configure \ - --host=${HOST} \ - --prefix='' \ - --with-sdl-prefix="$sysroot" \ - --with-freetype2-prefix="$sysroot" \ - --with-png-prefix="$sysroot" \ - --with-zlib-prefix="$sysroot" \ - --disable-timidity \ - --disable-mt32emu - "$REDOX_MAKE" -j"$($NPROC)" - skip=1 -} - -function recipe_clean { - "$REDOX_MAKE" clean - skip=1 -} - -function recipe_stage { - dest="$(realpath $1)" - "$REDOX_MAKE" DESTDIR="$dest" install - skip=1 -} diff --git a/recipes/emulators/scummvm/recipe.toml b/recipes/emulators/scummvm/recipe.toml new file mode 100644 index 000000000..0ec2f0052 --- /dev/null +++ b/recipes/emulators/scummvm/recipe.toml @@ -0,0 +1,34 @@ +[source] +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" +""" + +[build] +template = "custom" +dependencies = [ + "sdl1", + "liborbital", + "freetype2", + "zlib", + "libpng", +] +script = """ +export LDFLAGS="-static" + +COOKBOOK_CONFIGURE="${COOKBOOK_SOURCE}/configure" +COOKBOOK_CONFIGURE_FLAGS=( + --host="${TARGET}" + --prefix="" + --with-sdl-prefix="${COOKBOOK_SYSROOT}" + --with-freetype2-prefix="${COOKBOOK_SYSROOT}" + --with-png-prefix="${COOKBOOK_SYSROOT}" + --with-zlib-prefix="${COOKBOOK_SYSROOT}" + --disable-timidity + --disable-mt32emu +) + +cookbook_configure +""" \ No newline at end of file diff --git a/recipes/emulators/scummvm/01_redox.patch b/recipes/emulators/scummvm/redox.patch similarity index 100% rename from recipes/emulators/scummvm/01_redox.patch rename to recipes/emulators/scummvm/redox.patch diff --git a/recipes/fonts/ttf-hack/recipe.sh b/recipes/fonts/ttf-hack/recipe.sh deleted file mode 100644 index 94bf53c83..000000000 --- a/recipes/fonts/ttf-hack/recipe.sh +++ /dev/null @@ -1,25 +0,0 @@ -VERSION=3.003 -TAR="https://github.com/source-foundry/Hack/releases/download/v$VERSION/Hack-v$VERSION-ttf.tar.xz" - -function recipe_version { - echo "$VERSION" - skip=1 -} - -function recipe_build { - echo "skipping build" - skip=1 -} - -function recipe_clean { - echo "skipping clean" - skip=1 -} - -function recipe_stage { - dest="$(realpath "$1")" - for file in *.ttf; do - install -D -m 644 "$file" "$dest/ui/fonts/Mono/Hack/$file" - done - skip=1 -} diff --git a/recipes/fonts/ttf-hack/recipe.toml b/recipes/fonts/ttf-hack/recipe.toml new file mode 100644 index 000000000..428dabd70 --- /dev/null +++ b/recipes/fonts/ttf-hack/recipe.toml @@ -0,0 +1,11 @@ +[source] +tar = "https://github.com/source-foundry/Hack/releases/download/v3.003/Hack-v3.003-ttf.tar.xz" +blake3 = "acd40f61f6f512b0808d4bf530ab4aeb5a8ec3aa1f65bf5a1d08964d1bc3d044" + +[build] +template = "custom" +script = """ +for file in "${COOKBOOK_SOURCE}"/*.ttf; do + install -D -m 644 "$file" "${COOKBOOK_STAGE}/ui/fonts/Mono/Hack/$(basename "$file")" +done +""" \ No newline at end of file diff --git a/recipes/games/gigalomania/recipe.sh b/recipes/games/gigalomania/recipe.sh deleted file mode 100644 index 77890f7bd..000000000 --- a/recipes/games/gigalomania/recipe.sh +++ /dev/null @@ -1,39 +0,0 @@ -VERSION=1.0.1 -GIT=https://gitlab.redox-os.org/redox-os/gigalomania.git -BRANCH=master -BUILD_DEPENDS=(sdl1-mixer sdl1-image sdl1 liborbital libogg libpng libjpeg libvorbis zlib) - -function recipe_version { - echo "$VERSION" - skip=1 -} - -function recipe_build { - export CPPHOST=${HOST}-g++ - sysroot="$(realpath ../sysroot)" - export LDFLAGS="-L$sysroot/lib -rdynamic" - export CPPFLAGS="-I$sysroot/include" - "$REDOX_MAKE" all -j"$($NPROC)" - skip=1 -} - -function recipe_clean { - "$REDOX_MAKE" clean - skip=1 -} - -function recipe_stage { - dest="$(realpath $1)" - bundledir="$dest/bundle" - - "$REDOX_MAKE" VERBOSE=1 DESTDIR="$dest/usr" install - rm -rf "$bundledir" - - mkdir -pv "$1/ui/apps" - cp -v "${COOKBOOK_RECIPE}/manifest" "$1/ui/apps/gigalomania" - - mkdir -pv "$1/ui/icons/apps" - cp -v "gigalomania64.png" "$1/ui/icons/apps/gigalomania.png" - - skip=1 -} diff --git a/recipes/games/gigalomania/recipe.toml b/recipes/games/gigalomania/recipe.toml new file mode 100644 index 000000000..399661b10 --- /dev/null +++ b/recipes/games/gigalomania/recipe.toml @@ -0,0 +1,36 @@ +[source] +git = "https://gitlab.redox-os.org/redox-os/gigalomania.git" +branch = "master" + +[build] +template = "custom" +dependencies = [ + "sdl1-mixer", + "sdl1-image", + "sdl1", + "liborbital", + "libogg", + "libpng", + "libjpeg", + "libvorbis", + "zlib" +] +script = """ +rsync -av --delete "${COOKBOOK_SOURCE}/" ./ + +export CPPHOST="${TARGET}-g++" +export LDFLAGS="-L${COOKBOOK_SYSROOT}/lib --static" +export CPPFLAGS="-I${COOKBOOK_SYSROOT}/include" + +"${REDOX_MAKE}" all -j"$(${NPROC})" + +"${REDOX_MAKE}" VERBOSE=1 DESTDIR="${COOKBOOK_STAGE}/usr" install + +rm -rf "${COOKBOOK_STAGE}/bundle" + +mkdir -pv "${COOKBOOK_STAGE}/ui/apps" +cp -v "${COOKBOOK_RECIPE}/manifest" "${COOKBOOK_STAGE}/ui/apps/gigalomania" + +mkdir -pv "${COOKBOOK_STAGE}/ui/icons/apps" +cp -v "gigalomania64.png" "${COOKBOOK_STAGE}/ui/icons/apps/gigalomania.png" +""" \ No newline at end of file diff --git a/recipes/games/openttd-opengfx/recipe.sh b/recipes/games/openttd-opengfx/recipe.sh deleted file mode 100644 index a68b27b94..000000000 --- a/recipes/games/openttd-opengfx/recipe.sh +++ /dev/null @@ -1,22 +0,0 @@ -GIT=https://gitlab.redox-os.org/redox-os/openttd-opengfx.git - -function recipe_version { - echo "0.5.2" - skip=1 -} - -function recipe_build { - echo "skipping build" - skip=1 -} - -function recipe_clean { - echo "skipping clean" - skip=1 -} - -function recipe_stage { - mkdir -pv "$1/share/games/openttd/baseset/opengfx" - cp -Rv ./* "$1/share/games/openttd/baseset/opengfx" - skip=1 -} diff --git a/recipes/games/openttd-opengfx/recipe.toml b/recipes/games/openttd-opengfx/recipe.toml new file mode 100644 index 000000000..7e51cacf4 --- /dev/null +++ b/recipes/games/openttd-opengfx/recipe.toml @@ -0,0 +1,9 @@ +[source] +git = "https://gitlab.redox-os.org/redox-os/openttd-opengfx.git" + +[build] +template = "custom" +script = """ +mkdir -pv "${COOKBOOK_STAGE}/share/games/openttd/baseset/opengfx" +cp -Rv "${COOKBOOK_SOURCE}"/* "${COOKBOOK_STAGE}/share/games/openttd/baseset/opengfx" +""" \ No newline at end of file diff --git a/recipes/games/openttd-openmsx/recipe.sh b/recipes/games/openttd-openmsx/recipe.sh deleted file mode 100644 index 7af78cbb1..000000000 --- a/recipes/games/openttd-openmsx/recipe.sh +++ /dev/null @@ -1,22 +0,0 @@ -GIT=https://gitlab.redox-os.org/redox-os/openttd-openmsx.git - -function recipe_version { - echo "0.3.1" - skip=1 -} - -function recipe_build { - echo "skipping build" - skip=1 -} - -function recipe_clean { - echo "skipping clean" - skip=1 -} - -function recipe_stage { - mkdir -pv "$1/share/games/openttd/baseset/openmsx" - cp -Rv ./* "$1/share/games/openttd/baseset/openmsx" - skip=1 -} diff --git a/recipes/games/openttd-openmsx/recipe.toml b/recipes/games/openttd-openmsx/recipe.toml new file mode 100644 index 000000000..0030209ef --- /dev/null +++ b/recipes/games/openttd-openmsx/recipe.toml @@ -0,0 +1,9 @@ +[source] +git = "https://gitlab.redox-os.org/redox-os/openttd-openmsx.git" + +[build] +template = "custom" +script = """ +mkdir -pv "${COOKBOOK_STAGE}/share/games/openttd/baseset/openmsx" +cp -Rv "${COOKBOOK_SOURCE}"/* "${COOKBOOK_STAGE}/share/games/openttd/baseset/openmsx" +""" \ No newline at end of file diff --git a/recipes/games/openttd-opensfx/recipe.sh b/recipes/games/openttd-opensfx/recipe.sh deleted file mode 100644 index c8219d68d..000000000 --- a/recipes/games/openttd-opensfx/recipe.sh +++ /dev/null @@ -1,22 +0,0 @@ -GIT=https://gitlab.redox-os.org/redox-os/openttd-opensfx.git - -function recipe_version { - echo "0.2.3" - skip=1 -} - -function recipe_build { - echo "skipping build" - skip=1 -} - -function recipe_clean { - echo "skipping clean" - skip=1 -} - -function recipe_stage { - mkdir -pv "$1/share/games/openttd/baseset/opensfx" - cp -Rv ./* "$1/share/games/openttd/baseset/opensfx" - skip=1 -} diff --git a/recipes/games/openttd-opensfx/recipe.toml b/recipes/games/openttd-opensfx/recipe.toml new file mode 100644 index 000000000..1527275ba --- /dev/null +++ b/recipes/games/openttd-opensfx/recipe.toml @@ -0,0 +1,9 @@ +[source] +git = "https://gitlab.redox-os.org/redox-os/openttd-opensfx.git" + +[build] +template = "custom" +script = """ +mkdir -pv "${COOKBOOK_STAGE}/share/games/openttd/baseset/opensfx" +cp -Rv "${COOKBOOK_SOURCE}"/* "${COOKBOOK_STAGE}/share/games/openttd/baseset/opensfx" +""" \ No newline at end of file diff --git a/recipes/games/openttd/recipe.sh b/recipes/games/openttd/recipe.sh deleted file mode 100644 index c08ccf8f3..000000000 --- a/recipes/games/openttd/recipe.sh +++ /dev/null @@ -1,40 +0,0 @@ -VERSION=1.8 -GIT=https://github.com/OpenTTD/OpenTTD.git -BRANCH=release/$VERSION -BUILD_DEPENDS=(freetype2 liborbital libpng sdl1 xz zlib) - -function recipe_version { - echo "$VERSION" - skip=1 -} - -function recipe_build { - sysroot="$(realpath ../sysroot)" - export CFLAGS="-I$sysroot/include" - export LDFLAGS="-L$sysroot/lib --static" - ./configure \ - --build=${BUILD} \ - --host=${HOST} \ - --prefix='' \ - --enable-static \ - --without-liblzo2 \ - --disable-network \ - --without-threads - "$REDOX_MAKE" VERBOSE=1 -j"$($NPROC)" - skip=1 -} - -function recipe_clean { - "$REDOX_MAKE" clean - skip=1 -} - -function recipe_stage { - dest="$(realpath $1)" - bundledir="$dest/bundle" - - "$REDOX_MAKE" VERBOSE=1 ROOT_DIR="$dest/../build/" BUNDLE_DIR="$bundledir" INSTALL_DIR="$dest/usr" install - rm -rf "$bundledir" - - skip=1 -} diff --git a/recipes/games/openttd/recipe.toml b/recipes/games/openttd/recipe.toml new file mode 100644 index 000000000..4e2a61bc3 --- /dev/null +++ b/recipes/games/openttd/recipe.toml @@ -0,0 +1,43 @@ +[source] +git = "https://github.com/OpenTTD/OpenTTD.git" +branch = "release/1.8" +patches = ["redox.patch"] + +[build] +template = "custom" +dependencies = [ + "freetype2", + "liborbital", + "libpng", + "sdl1", + "xz", + "zlib", +] +script = """ +rsync -av --delete "${COOKBOOK_SOURCE}/" ./ + +# Unsure if the bundle dir is necessary +# Or why the installation differs +# Could be unnecessary +./configure \\ + --build="$(gcc -dumpmachine)" \\ + --host="${TARGET}" \\ + --prefix="" \\ + --enable-static \\ + --without-liblzo2 \\ + --disable-network \\ + --without-threads + +make VERBOSE=1 -j"$(nproc)" + +dest="${COOKBOOK_STAGE}" +bundledir="$dest/bundle" + +make VERBOSE=1 ROOT_DIR="./" BUNDLE_DIR="$bundledir" INSTALL_DIR="$dest/usr" install +rm -rf "$bundledir" + +if [ -d "${COOKBOOK_STAGE}/usr/bin" ] +then + find "${COOKBOOK_STAGE}/usr/bin" -type f -exec "${TARGET}-strip" -v {} ';' +fi +""" \ No newline at end of file diff --git a/recipes/games/openttd/01_redox.patch b/recipes/games/openttd/redox.patch similarity index 100% rename from recipes/games/openttd/01_redox.patch rename to recipes/games/openttd/redox.patch diff --git a/recipes/games/sopwith/recipe.sh b/recipes/games/sopwith/recipe.sh deleted file mode 100644 index a5ea97832..000000000 --- a/recipes/games/sopwith/recipe.sh +++ /dev/null @@ -1,34 +0,0 @@ -VERSION=1.8.4 -TAR="https://github.com/fragglet/sdl-sopwith/releases/download/sdl-sopwith-${VERSION}/sopwith-${VERSION}.tar.gz" -BUILD_DEPENDS=(sdl1 liborbital libiconv) - -function recipe_version { - echo "$VERSION" - skip=1 -} - -function recipe_build { - wget -O autotools/config.sub "https://gitlab.redox-os.org/redox-os/gnu-config/-/raw/master/config.sub?inline=false" - sysroot="$(realpath ../sysroot)" - export CFLAGS="-I$sysroot/include -I$sysroot/include/SDL" - export LDFLAGS="-L$sysroot/lib -static" - export LIBS="-lSDL -lorbital" # TODO: Uses sdl-config instead of pkg-config - ./configure \ - --build=${BUILD} \ - --host=${HOST} \ - --prefix='' \ - --with-sdl-prefix="$sysroot" - "$REDOX_MAKE" -j"$($NPROC)" - skip=1 -} - -function recipe_clean { - "$REDOX_MAKE" clean - skip=1 -} - -function recipe_stage { - dest="$(realpath $1)" - "$REDOX_MAKE" DESTDIR="$dest" install - skip=1 -} diff --git a/recipes/games/sopwith/recipe.toml b/recipes/games/sopwith/recipe.toml new file mode 100644 index 000000000..60bdad06d --- /dev/null +++ b/recipes/games/sopwith/recipe.toml @@ -0,0 +1,32 @@ +[source] +tar = "https://github.com/fragglet/sdl-sopwith/releases/download/sdl-sopwith-1.8.4/sopwith-1.8.4.tar.gz" +blake3 = "44e1404a9c4bea257d7778d2a4b1512231603a74b0a7b18eac5d18f36730ed3e" + +[build] +template = "custom" +dependencies = [ + "sdl1", + "liborbital", + "libiconv", +] +script = """ +export CFLAGS="-I${COOKBOOK_SYSROOT}/include -I${COOKBOOK_SYSROOT}/include/SDL" +export LDFLAGS="-L${COOKBOOK_SYSROOT}/lib -static" +export LIBS="-lSDL -lorbital" # TODO: Uses sdl-config instead of pkg-config + +# For some reason, cook_configure breaks spectacularly on this +# We will just copy instead +rsync -av --delete "${COOKBOOK_SOURCE}/" ./ + +wget -O autotools/config.sub "https://gitlab.redox-os.org/redox-os/gnu-config/-/raw/master/config.sub?inline=false" + +./configure \\ + --build="$(gcc -dumpmachine)" \\ + --host="${TARGET}" \\ + --prefix="" \\ + --with-sdl-prefix="${COOKBOOK_SYSROOT}" + +make -j"$(nproc)" + +make DESTDIR="${COOKBOOK_STAGE}" install +""" \ No newline at end of file diff --git a/recipes/libs/duktape/recipe.sh b/recipes/libs/duktape/recipe.sh deleted file mode 100644 index 30beb7763..000000000 --- a/recipes/libs/duktape/recipe.sh +++ /dev/null @@ -1,25 +0,0 @@ -VERSION=2.7.0 -TAR=https://duktape.org/duktape-$VERSION.tar.xz - -function recipe_version { - echo "$VERSION" - skip=1 -} - -function recipe_build { - sed -i "s/= gcc/= $TARGET-gcc/g" Makefile.cmdline - "$REDOX_MAKE" -f Makefile.cmdline -j"$($NPROC)" - skip=1 -} - -function recipe_clean { - "$REDOX_MAKE" clean - skip=1 -} - -function recipe_stage { - mkdir -pv "$1/bin" - cp ./duk "$1/bin/duk" - - skip=1 -} diff --git a/recipes/libs/duktape/recipe.toml b/recipes/libs/duktape/recipe.toml new file mode 100644 index 000000000..13b3f1781 --- /dev/null +++ b/recipes/libs/duktape/recipe.toml @@ -0,0 +1,16 @@ +[source] +tar = "https://duktape.org/duktape-2.7.0.tar.xz" +blake3 = "b0a17da888847bc9c73624ae3ba7f858ec327a9bbce9d287aee6a2489e518448" + +[build] +template = "custom" +script = """ +rsync -av --delete "${COOKBOOK_SOURCE}/" ./ + +sed -i "s/= gcc/= ${TARGET}-gcc/g" Makefile.cmdline + +"${COOKBOOK_MAKE}" -f Makefile.cmdline -j"$($NPROC)" + +mkdir -pv "${COOKBOOK_STAGE}/usr/bin" +cp ./duk "${COOKBOOK_STAGE}/usr/bin/duk" +""" \ No newline at end of file diff --git a/recipes/libs/duktape/redox.patch b/recipes/libs/duktape/redox.patch deleted file mode 100644 index bfbc53e83..000000000 --- a/recipes/libs/duktape/redox.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ruwN source/src/duk_config.h source-new/src/duk_config.h ---- source/src/duk_config.h 2017-09-22 19:06:08.000000000 -0600 -+++ source-new/src/duk_config.h 2022-11-12 08:05:16.384212164 -0700 -@@ -786,7 +786,7 @@ - /* --- Generic UNIX --- */ - #define DUK_USE_DATE_NOW_GETTIMEOFDAY - #define DUK_USE_DATE_TZO_GMTIME_R --#define DUK_USE_DATE_PRS_STRPTIME -+#undef DUK_USE_DATE_PRS_STRPTIME - #define DUK_USE_DATE_FMT_STRFTIME - #include - #include diff --git a/recipes/libs/sdl-gfx/recipe.sh b/recipes/libs/sdl-gfx/recipe.sh deleted file mode 100644 index 8b4460ac7..000000000 --- a/recipes/libs/sdl-gfx/recipe.sh +++ /dev/null @@ -1,30 +0,0 @@ -VERSION=2.0.25 -TAR=https://sourceforge.net/projects/sdlgfx/files/SDL_gfx-$VERSION.tar.gz -BUILD_DEPENDS=(sdl1 liborbital libiconv) - -function recipe_version { - echo "$VERSION" - skip=1 -} - -function recipe_build { - sysroot="$(realpath ../sysroot)" - export CFLAGS="-I$sysroot/include" - export LDFLAGS="-L$sysroot/lib" - ./autogen.sh - ./configure --prefix=/ --build=${BUILD} --host=${HOST} --disable-shared - "$REDOX_MAKE" -j"$($NPROC)" - skip=1 -} - -function recipe_clean { - "$REDOX_MAKE" clean - skip=1 -} - -function recipe_stage { - dest="$(realpath $1)" - "$REDOX_MAKE" DESTDIR="$dest" install - rm -f "$dest/lib/"*.la - skip=1 -} diff --git a/recipes/libs/sdl-gfx/recipe.toml b/recipes/libs/sdl-gfx/recipe.toml new file mode 100644 index 000000000..1ba2b3542 --- /dev/null +++ b/recipes/libs/sdl-gfx/recipe.toml @@ -0,0 +1,30 @@ +[source] +tar = "https://sourceforge.net/projects/sdlgfx/files/SDL_gfx-2.0.25.tar.gz" +blake3 = "e6f571a38e51d369b010f4b10eb35b95e3d2edae2edd796241c47ea8376581e6" +patches = ["redox.patch"] +script = """ +./autogen.sh +""" + +[build] +template = "custom" +dependencies = [ + "sdl1", + "liborbital", + "libiconv", +] +script = """ +export CFLAGS="-I${COOKBOOK_SYSROOT}/include" +export LDFLAGS="-L${COOKBOOK_SYSROOT}/lib" + +COOKBOOK_CONFIGURE_FLAGS=( + --prefix=/ + --build="$(gcc -dumpmachine)" + --host="${TARGET}" + --disable-shared +) + +cookbook_configure + +rm -f "${COOKBOOK_STAGE}/lib/"*.la +""" \ No newline at end of file diff --git a/recipes/libs/sdl-gfx/01_redox.patch b/recipes/libs/sdl-gfx/redox.patch similarity index 100% rename from recipes/libs/sdl-gfx/01_redox.patch rename to recipes/libs/sdl-gfx/redox.patch diff --git a/recipes/libs/sdl1-image/recipe.sh b/recipes/libs/sdl1-image/recipe.sh deleted file mode 100644 index 76791fa7e..000000000 --- a/recipes/libs/sdl1-image/recipe.sh +++ /dev/null @@ -1,30 +0,0 @@ -VERSION=1.2.12 -TAR=https://www.libsdl.org/projects/SDL_image/release/SDL_image-$VERSION.tar.gz -BUILD_DEPENDS=(sdl1 liborbital libiconv libjpeg libpng zlib) - -function recipe_version { - echo "$VERSION" - skip=1 -} - -function recipe_build { - sysroot="$(realpath ../sysroot)" - export CFLAGS="-I$sysroot/include" - export LDFLAGS="-L$sysroot/lib" - ./autogen.sh - ./configure --prefix=/ --build=${BUILD} --host=${HOST} --disable-shared --disable-sdltest --enable-png --enable-jpg - "$REDOX_MAKE" -j"$($NPROC)" - skip=1 -} - -function recipe_clean { - "$REDOX_MAKE" clean - skip=1 -} - -function recipe_stage { - dest="$(realpath $1)" - "$REDOX_MAKE" DESTDIR="$dest" install - rm -f "$dest/lib/"*.la - skip=1 -} diff --git a/recipes/libs/sdl1-image/recipe.toml b/recipes/libs/sdl1-image/recipe.toml new file mode 100644 index 000000000..ee73b9214 --- /dev/null +++ b/recipes/libs/sdl1-image/recipe.toml @@ -0,0 +1,26 @@ +[source] +tar = "https://www.libsdl.org/projects/SDL_image/release/SDL_image-1.2.12.tar.gz" +blake3 = "731a6f8cad9fff22c82394bd1c0c34ce4aa60fa8923f3755a3e3239f1e269389" +patches = ["redox.patch"] +script = """ +./autogen.sh +""" + +[build] +template = "custom" +dependencies = [ + "sdl1", + "liborbital", + "libiconv", + "libjpeg", + "libpng", + "zlib" +] +script = """ +COOKBOOK_CONFIGURE_FLAGS+=( + --disable-sdltest + --enable-png + --enable-jpg +) +cookbook_configure +""" \ No newline at end of file diff --git a/recipes/libs/sdl1-image/01_redox.patch b/recipes/libs/sdl1-image/redox.patch similarity index 100% rename from recipes/libs/sdl1-image/01_redox.patch rename to recipes/libs/sdl1-image/redox.patch diff --git a/recipes/libs/sdl1-ttf/recipe.sh b/recipes/libs/sdl1-ttf/recipe.sh deleted file mode 100644 index 9e77728b1..000000000 --- a/recipes/libs/sdl1-ttf/recipe.sh +++ /dev/null @@ -1,30 +0,0 @@ -VERSION=2.0.11 -TAR=https://www.libsdl.org/projects/SDL_ttf/release/SDL_ttf-$VERSION.tar.gz -BUILD_DEPENDS=(sdl1 liborbital freetype2 libpng zlib) - -function recipe_version { - echo "$VERSION" - skip=1 -} - -function recipe_build { - sysroot="$(realpath ../sysroot)" - export CFLAGS="-I$sysroot/include -I$sysroot/include/freetype2" - export LDFLAGS="-L$sysroot/lib" - ./autogen.sh - ./configure --prefix=/ --build=${BUILD} --host=${HOST} --disable-shared - "$REDOX_MAKE" -j"$($NPROC)" - skip=1 -} - -function recipe_clean { - "$REDOX_MAKE" clean - skip=1 -} - -function recipe_stage { - dest="$(realpath $1)" - "$REDOX_MAKE" DESTDIR="$dest" install - rm -f "$dest/lib/"*.la - skip=1 -} diff --git a/recipes/libs/sdl1-ttf/recipe.toml b/recipes/libs/sdl1-ttf/recipe.toml new file mode 100644 index 000000000..7c335b023 --- /dev/null +++ b/recipes/libs/sdl1-ttf/recipe.toml @@ -0,0 +1,32 @@ +[source] +tar = "https://www.libsdl.org/projects/SDL_ttf/release/SDL_ttf-2.0.11.tar.gz" +blake3 = "a684e57553e43b55ab28b064d1d5d44b8749299f259da31a62d671fc1d5505ee" +patches = ["redox.patch"] +script = """ +./autogen.sh +""" + +[build] +template = "custom" +dependencies = [ + "sdl1", + "liborbital", + "freetype2", + "libpng", + "zlib", +] +script = """ +export CFLAGS="-I${COOKBOOK_SYSROOT}/include -I${COOKBOOK_SYSROOT}/include/freetype2" +export LDFLAGS="-L${COOKBOOK_SYSROOT}/lib" + +COOKBOOK_CONFIGURE_FLAGS=( + --prefix=/ + --build="$(gcc -dumpmachine)" + --host="${TARGET}" + --disable-shared +) + +cookbook_configure + +rm -f "${COOKBOOK_STAGE}/lib/"*.la +""" \ No newline at end of file diff --git a/recipes/libs/sdl1-ttf/01_redox.patch b/recipes/libs/sdl1-ttf/redox.patch similarity index 100% rename from recipes/libs/sdl1-ttf/01_redox.patch rename to recipes/libs/sdl1-ttf/redox.patch diff --git a/recipes/other/generaluser-gs/recipe.sh b/recipes/other/generaluser-gs/recipe.sh deleted file mode 100644 index 6ce7fa849..000000000 --- a/recipes/other/generaluser-gs/recipe.sh +++ /dev/null @@ -1,23 +0,0 @@ -VERSION=1.471 -GIT=https://gitlab.redox-os.org/redox-os/generaluser-gs.git - -function recipe_version { - echo "$VERSION" - skip=1 -} - -function recipe_build { - echo "skipping build" - skip=1 -} - -function recipe_clean { - echo "skipping clean" - skip=1 -} - -function recipe_stage { - mkdir -pv "$1/share/generaluser-gs" - cp -Rv ./* "$1/share/generaluser-gs" - skip=1 -} diff --git a/recipes/other/generaluser-gs/recipe.toml b/recipes/other/generaluser-gs/recipe.toml new file mode 100644 index 000000000..24aae0d32 --- /dev/null +++ b/recipes/other/generaluser-gs/recipe.toml @@ -0,0 +1,9 @@ +[source] +git = "https://gitlab.redox-os.org/redox-os/generaluser-gs.git" + +[build] +template = "custom" +script = """ +mkdir -pv "${COOKBOOK_STAGE}/usr/share/generaluser-gs" +cp -Rv "${COOKBOOK_SOURCE}"/* "${COOKBOOK_STAGE}/usr/share/generaluser-gs" +""" diff --git a/recipes/sound/timidity/recipe.sh b/recipes/sound/timidity/recipe.sh deleted file mode 100644 index 6e3b8765d..000000000 --- a/recipes/sound/timidity/recipe.sh +++ /dev/null @@ -1,40 +0,0 @@ -VERSION=2.15.0 -GIT=https://gitlab.redox-os.org/redox-os/timidity.git -BRANCH=redox -DEPENDS="generaluser-gs" - -function recipe_version { - echo "$VERSION" - skip=1 -} - -function recipe_build { - export LDFLAGS="-static" - autoreconf -f -i - wget -O autoconf/config.sub "https://gitlab.redox-os.org/redox-os/gnu-config/-/raw/master/config.sub?inline=false" - ./configure \ - --build=${BUILD} \ - --host=${HOST} \ - --prefix='' \ - --enable-vt100 - "$REDOX_MAKE" -j"$($NPROC)" - skip=1 -} - -function recipe_clean { - "$REDOX_MAKE" clean - skip=1 -} - -function recipe_stage { - dest="$(realpath $1)" - "$REDOX_MAKE" DESTDIR="$dest" install - - mkdir -pv "$1/etc/timidity" - echo "soundfont /share/generaluser-gs/generaluser-gs.sf2" >> "$1/etc/timidity/timidity.cfg" - - mkdir -pv "$1/share/timidity" - echo "soundfont /share/generaluser-gs/generaluser-gs.sf2" >> "$1/share/timidity/timidity.cfg" - - skip=1 -} diff --git a/recipes/sound/timidity/recipe.toml b/recipes/sound/timidity/recipe.toml new file mode 100644 index 000000000..98c254961 --- /dev/null +++ b/recipes/sound/timidity/recipe.toml @@ -0,0 +1,35 @@ +[source] +git = "https://gitlab.redox-os.org/redox-os/timidity.git" +branch = "redox" +script = """ +autoreconf -f -i + +wget -O autoconf/config.sub "https://gitlab.redox-os.org/redox-os/gnu-config/-/raw/master/config.sub?inline=false" +""" + +[build] +template = "custom" +script = """ +export LDFLAGS="-static" + +COOKBOOK_CONFIGURE_FLAGS=( + --build="$(gcc -dumpmachine)" + --host="${TARGET}" + --prefix="" + --enable-vt100 +) + +cookbook_configure + +# Create configuration files +mkdir -pv "${COOKBOOK_STAGE}/etc/timidity" +echo "soundfont /share/generaluser-gs/generaluser-gs.sf2" >> "${COOKBOOK_STAGE}/etc/timidity/timidity.cfg" + +mkdir -pv "${COOKBOOK_STAGE}/share/timidity" +echo "soundfont /share/generaluser-gs/generaluser-gs.sf2" >> "${COOKBOOK_STAGE}/share/timidity/timidity.cfg" +""" + +[package] +dependencies = [ + "generaluser-gs", +] \ No newline at end of file diff --git a/recipes/tests/vttest/recipe.sh b/recipes/tests/vttest/recipe.sh deleted file mode 100644 index 004be8969..000000000 --- a/recipes/tests/vttest/recipe.sh +++ /dev/null @@ -1,29 +0,0 @@ -VERSION=20140305 -TAR="https://invisible-island.net/archives/vttest/vttest-${VERSION}.tgz" - -function recipe_version { - echo "$VERSION" - skip=1 -} - -function recipe_build { - export LDFLAGS="-static" - wget -O config.sub "https://gitlab.redox-os.org/redox-os/gnu-config/-/raw/master/config.sub?inline=false" - ./configure \ - --build=${BUILD} \ - --host=${HOST} \ - --prefix='' - "$REDOX_MAKE" -j"$($NPROC)" - skip=1 -} - -function recipe_clean { - "$REDOX_MAKE" clean - skip=1 -} - -function recipe_stage { - dest="$(realpath $1)" - "$REDOX_MAKE" DESTDIR="$dest" install - skip=1 -} diff --git a/recipes/tests/vttest/recipe.toml b/recipes/tests/vttest/recipe.toml new file mode 100644 index 000000000..22716635f --- /dev/null +++ b/recipes/tests/vttest/recipe.toml @@ -0,0 +1,21 @@ +[source] +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" +""" + +[build] +template = "custom" +script = """ +export LDFLAGS="-static" + +COOKBOOK_CONFIGURE_FLAGS=( + --build="$(gcc -dumpmachine)" + --host="${TARGET}" + --prefix="" +) + +cookbook_configure +""" \ No newline at end of file diff --git a/recipes/tests/vttest/vttest.patch b/recipes/tests/vttest/redox.patch similarity index 100% rename from recipes/tests/vttest/vttest.patch rename to recipes/tests/vttest/redox.patch diff --git a/recipes/tools/gnu-grep/recipe.sh b/recipes/tools/gnu-grep/recipe.sh deleted file mode 100644 index 1731a3b1c..000000000 --- a/recipes/tools/gnu-grep/recipe.sh +++ /dev/null @@ -1,27 +0,0 @@ -VERSION=3.1 -TAR=https://ftp.gnu.org/gnu/grep/grep-$VERSION.tar.xz - -function recipe_version { - echo "$VERSION" - skip=1 -} - -function recipe_build { - export LDFLAGS="-static" - ./configure --build=${BUILD} --host=${HOST} --prefix=/ - "$REDOX_MAKE" -j"$($NPROC)" - skip=1 -} - -function recipe_clean { - "$REDOX_MAKE" clean - skip=1 -} - -function recipe_stage { - dest="$(realpath $1)" - "$REDOX_MAKE" DESTDIR="$dest" install - $HOST-strip "$1"/bin/grep - rm -rf "$1"/{lib,share} - skip=1 -} diff --git a/recipes/tools/gnu-grep/recipe.toml b/recipes/tools/gnu-grep/recipe.toml new file mode 100644 index 000000000..16a4763aa --- /dev/null +++ b/recipes/tools/gnu-grep/recipe.toml @@ -0,0 +1,17 @@ +[source] +tar = "https://ftp.gnu.org/gnu/grep/grep-3.1.tar.xz" +blake3 = "46b6e24dfa1b0f309f4eae3c450d612396c8faa6510b53a55f629e4f4c70b4a3" +patches = ["grep.patch"] + +[build] +template = "custom" +script = """ +COOKBOOK_CONFIGURE_FLAGS+=( + --prefix=/ +) +cookbook_configure + +"${TARGET}-strip" "${COOKBOOK_STAGE}/bin/grep" + +rm -rf "${COOKBOOK_STAGE}"/{lib,share} +""" \ No newline at end of file diff --git a/recipes/tools/libc-bench/recipe.sh b/recipes/tools/libc-bench/recipe.sh deleted file mode 100644 index df203cea0..000000000 --- a/recipes/tools/libc-bench/recipe.sh +++ /dev/null @@ -1,24 +0,0 @@ -VERSION=20110206 -TAR=https://www.etalabs.net/releases/libc-bench-$VERSION.tar.gz - -function recipe_version { - echo "$VERSION" - skip=1 -} - -function recipe_build { - "$REDOX_MAKE" -j"$($NPROC)" - skip=1 -} - -function recipe_clean { - "$REDOX_MAKE" clean - skip=1 -} - -function recipe_stage { - dest="$(realpath $1)" - mkdir -v "$dest/bin" - cp -v "libc-bench" "$dest/bin" - skip=1 -} diff --git a/recipes/tools/libc-bench/recipe.toml b/recipes/tools/libc-bench/recipe.toml new file mode 100644 index 000000000..89c8ebfad --- /dev/null +++ b/recipes/tools/libc-bench/recipe.toml @@ -0,0 +1,15 @@ +[source] +tar = "https://www.etalabs.net/releases/libc-bench-20110206.tar.gz" +blake3 = "64093102f29faa76da455f55a7b4be25b6d74d5c3d6fe88dbbc38aaae185182f" +patches = ["redox.patch"] + +[build] +template = "custom" +script = """ +rsync -av --delete "${COOKBOOK_SOURCE}/" ./ + +"${COOKBOOK_MAKE}" -j"$(${NPROC})" + +mkdir -pv "${COOKBOOK_STAGE}/usr/bin" +cp -v "libc-bench" "${COOKBOOK_STAGE}/usr/bin" +""" \ No newline at end of file diff --git a/recipes/tools/periodictable/recipe.sh b/recipes/tools/periodictable/recipe.sh deleted file mode 100644 index e364766e7..000000000 --- a/recipes/tools/periodictable/recipe.sh +++ /dev/null @@ -1,10 +0,0 @@ -GIT=https://gitlab.redox-os.org/redox-os/periodictable.git -BINDIR="/usr/bin" -DEPENDS="orbital" - -function recipe_stage { - mkdir -pv "$1/ui/apps" - cp -v pkg/manifest "$1/ui/apps/periodictable" - mkdir -pv "$1/ui/icons" - cp -v pkg/icon.png "$1/ui/icons/periodictable.png" -} diff --git a/recipes/tools/periodictable/recipe.toml b/recipes/tools/periodictable/recipe.toml new file mode 100644 index 000000000..cfdfcb69e --- /dev/null +++ b/recipes/tools/periodictable/recipe.toml @@ -0,0 +1,16 @@ +[source] +git = "https://gitlab.redox-os.org/redox-os/periodictable.git" + +[build] +template = "custom" +script = """ +mkdir -pv "${COOKBOOK_STAGE}/ui/apps" +cp -v "${COOKBOOK_SOURCE}/pkg/manifest" "${COOKBOOK_STAGE}/ui/apps/periodictable" +mkdir -pv "${COOKBOOK_STAGE}/ui/icons" +cp -v "${COOKBOOK_SOURCE}/pkg/icon.png" "${COOKBOOK_STAGE}/ui/icons/periodictable.png" +""" + +[package] +dependencies = [ + "orbital", +] \ No newline at end of file diff --git a/recipes/tools/schismtracker/recipe.sh b/recipes/tools/schismtracker/recipe.sh deleted file mode 100644 index 5cb035648..000000000 --- a/recipes/tools/schismtracker/recipe.sh +++ /dev/null @@ -1,31 +0,0 @@ -VERSION=20181223 -TAR=https://github.com/schismtracker/schismtracker/archive/$VERSION.tar.gz -TAR_SHA256=fc32930c611fdb78face87dbe8a3c62e70088fd8d4ad803140e0b9a0b2e72ad7 -BUILD_DEPENDS=(sdl1 liborbital libiconv) - -function recipe_version { - echo "$VERSION" - skip=1 -} - -function recipe_build { - sysroot="${PWD}/../sysroot" - export CFLAGS="-I$sysroot/include -I$sysroot/include/SDL" - export LDFLAGS="-L$sysroot/lib -static" - export SDL_CONFIG="$sysroot/bin/sdl-config" - autoreconf -i - ./configure --build=${BUILD} --host=${HOST} --prefix='' --with-sdl-prefix="$sysroot" - "$REDOX_MAKE" -j"$($NPROC)" - skip=1 -} - -function recipe_clean { - "$REDOX_MAKE" clean - skip=1 -} - -function recipe_stage { - dest="$(realpath $1)" - "$REDOX_MAKE" DESTDIR="$dest" install - skip=1 -} diff --git a/recipes/tools/schismtracker/recipe.toml b/recipes/tools/schismtracker/recipe.toml new file mode 100644 index 000000000..aea391eaf --- /dev/null +++ b/recipes/tools/schismtracker/recipe.toml @@ -0,0 +1,29 @@ +[source] +tar = "https://github.com/schismtracker/schismtracker/archive/20181223.tar.gz" +blake3 = "057e973f4f84cf898e2240d67c0e92f25086d8b9ffdc7e0c7ef81dd8dc81bc70" +patches = ["redox.patch"] +script = """ +autoreconf -i +""" + +[build] +template = "custom" +dependencies = [ + "sdl1", + "liborbital", + "libiconv", +] +script = """ +export CFLAGS="-I${COOKBOOK_SYSROOT}/include -I${COOKBOOK_SYSROOT}/include/SDL" +export LDFLAGS="-L${COOKBOOK_SYSROOT}/lib -static" +export SDL_CONFIG="${COOKBOOK_SYSROOT}/bin/sdl-config" + +COOKBOOK_CONFIGURE_FLAGS=( + --build="$(gcc -dumpmachine)" + --host="${TARGET}" + --prefix="" + --with-sdl-prefix="${COOKBOOK_SYSROOT}" +) + +cookbook_configure +""" \ No newline at end of file diff --git a/recipes/tools/schismtracker/01_redox.patch b/recipes/tools/schismtracker/redox.patch similarity index 100% rename from recipes/tools/schismtracker/01_redox.patch rename to recipes/tools/schismtracker/redox.patch diff --git a/recipes/tui/mdp/recipe.sh b/recipes/tui/mdp/recipe.sh deleted file mode 100644 index ed9236bdd..000000000 --- a/recipes/tui/mdp/recipe.sh +++ /dev/null @@ -1,27 +0,0 @@ -GIT=https://github.com/visit1985/mdp.git -BUILD_DEPENDS=(ncursesw) -DEPENDS="terminfo" - -function recipe_version { - printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" - skip=1 -} - -function recipe_build { - sysroot="$(realpath ../sysroot)" - export CFLAGS="-I$sysroot/include -I$sysroot/include/ncursesw" - export LDFLAGS="-L$sysroot/lib" - "$REDOX_MAKE" -j"$($NPROC)" - skip=1 -} - -function recipe_clean { - "$REDOX_MAKE" clean - skip=1 -} - -function recipe_stage { - dest="$(realpath $1)" - "$REDOX_MAKE" DESTDIR="$dest" PREFIX="" install - skip=1 -} diff --git a/recipes/tui/mdp/recipe.toml b/recipes/tui/mdp/recipe.toml new file mode 100644 index 000000000..a78e477fe --- /dev/null +++ b/recipes/tui/mdp/recipe.toml @@ -0,0 +1,20 @@ +[source] +git = "https://github.com/visit1985/mdp.git" + +[build] +template = "custom" +dependencies = [ + "ncursesw", + "terminfo" +] +script = """ +rsync -av --delete --exclude='.git' "${COOKBOOK_SOURCE}/" ./ + +export CFLAGS="-I${COOKBOOK_SYSROOT}/include -I${COOKBOOK_SYSROOT}/include/ncursesw" +export LDFLAGS="-L${COOKBOOK_SYSROOT}/lib" + +"${COOKBOOK_MAKE}" -j"$(${NPROC})" + +# Install +"${REDOX_MAKE}" DESTDIR="${COOKBOOK_STAGE}" PREFIX="" install +""" \ No newline at end of file