From d3225d91ea8902b269bec145c2783c6106493133 Mon Sep 17 00:00:00 2001 From: Jeremy Soller <jackpot51@gmail.com> Date: Tue, 6 Dec 2022 15:13:02 -0700 Subject: [PATCH] Update glib and harfbuzz to use new recipe format --- recipes/glib/recipe.sh | 35 ------------------------------- recipes/glib/recipe.toml | 26 +++++++++++++++++++++++ recipes/harfbuzz/recipe.sh | 40 ------------------------------------ recipes/harfbuzz/recipe.toml | 22 ++++++++++++++++++++ 4 files changed, 48 insertions(+), 75 deletions(-) delete mode 100644 recipes/glib/recipe.sh create mode 100644 recipes/glib/recipe.toml delete mode 100644 recipes/harfbuzz/recipe.sh create mode 100644 recipes/harfbuzz/recipe.toml diff --git a/recipes/glib/recipe.sh b/recipes/glib/recipe.sh deleted file mode 100644 index dede5aee8..000000000 --- a/recipes/glib/recipe.sh +++ /dev/null @@ -1,35 +0,0 @@ -VERSION=2.59.0 -TAR=https://download.gnome.org/sources/glib/${VERSION%.*}/glib-$VERSION.tar.xz -BUILD_DEPENDS=(gettext libffi libiconv pcre 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" - glib_cv_stack_grows=no glib_cv_uscore=no ./autogen.sh \ - --build=${BUILD} \ - --host=${HOST} \ - --prefix=/ \ - --disable-shared \ - --enable-static - sed -i 's/#define HAVE_SYS_RESOURCE_H 1/#undef HAVE_SYS_RESOURCE_H/' 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 - rm -f "$dest/lib/"*.la - skip=1 -} diff --git a/recipes/glib/recipe.toml b/recipes/glib/recipe.toml new file mode 100644 index 000000000..bcb6abe6e --- /dev/null +++ b/recipes/glib/recipe.toml @@ -0,0 +1,26 @@ +[source] +tar = "https://download.gnome.org/sources/glib/2.59/glib-2.59.0.tar.xz" +patches = [ + "redox.patch" +] + +[build] +template = "custom" +dependencies = [ + "gettext", + "libffi", + "libiconv", + "pcre", + "zlib", +] +script = """ +"${COOKBOOK_SOURCE}/autogen.sh" \ + "${COOKBOOK_CONFIGURE_FLAGS[@]}" \ + glib_cv_stack_grows=no \ + glib_cv_uscore=no + +sed -i 's/#define HAVE_SYS_RESOURCE_H 1/#undef HAVE_SYS_RESOURCE_H/' config.h + +COOKBOOK_CONFIGURE="true" +cookbook_configure +""" diff --git a/recipes/harfbuzz/recipe.sh b/recipes/harfbuzz/recipe.sh deleted file mode 100644 index d61f70786..000000000 --- a/recipes/harfbuzz/recipe.sh +++ /dev/null @@ -1,40 +0,0 @@ -VERSION=2.3.0 -TAR=https://www.freedesktop.org/software/harfbuzz/release/harfbuzz-$VERSION.tar.bz2 -BUILD_DEPENDS=(freetype gettext glib libiconv libpng pcre 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" - #wget -O build-aux/config.sub "https://gitlab.redox-os.org/redox-os/gnu-config/-/raw/master/config.sub?inline=false" - FREETYPE_CFLAGS="$("${PKG_CONFIG}" --cflags freetype2)" - FREETYPE_LIBS="$("${PKG_CONFIG}" --libs freetype2)" - ./configure \ - --build=${BUILD} \ - --host=${HOST} \ - --prefix=/ \ - --disable-shared \ - --enable-static \ - --with-glib=yes \ - --with-freetype=yes \ - --with-icu=no - "$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/harfbuzz/recipe.toml b/recipes/harfbuzz/recipe.toml new file mode 100644 index 000000000..f0e35352d --- /dev/null +++ b/recipes/harfbuzz/recipe.toml @@ -0,0 +1,22 @@ +[source] +tar = "https://www.freedesktop.org/software/harfbuzz/release/harfbuzz-2.3.0.tar.bz2" + +[build] +template = "custom" +dependencies = [ + "freetype", + "gettext", + "glib", + "libiconv", + "libpng", + "pcre", + "zlib" +] +script = """ +COOKBOOK_CONFIGURE_FLAGS+=( + --with-glib=yes + --with-freetype=yes + --with-icu=no +) +cookbook_configure +""" -- GitLab