diff --git a/recipes/web/netsurf/recipe.sh b/recipes/web/netsurf/recipe.sh deleted file mode 100644 index bc09116f..00000000 --- a/recipes/web/netsurf/recipe.sh +++ /dev/null @@ -1,32 +0,0 @@ -VERSION=3.10 -TAR=https://download.netsurf-browser.org/netsurf/releases/source-full/netsurf-all-$VERSION.tar.gz -BUILD_DEPENDS=(curl expat libjpeg libpng nghttp2 openssl1 sdl1 zlib freetype2 liborbital libiconv) -DEPENDS="ca-certificates orbital" - -function recipe_version { - echo "$VERSION" - skip=1 -} - -function recipe_build { - export TARGET="framebuffer" - export CFLAGS="-I${COOKBOOK_SYSROOT}/include -I${PWD}/inst-${TARGET}/include" - export LDFLAGS="-L${COOKBOOK_SYSROOT}/lib -L${PWD}/inst-${TARGET}/lib -Wl,--allow-multiple-definition" - # nghttp2 is not linked for some reason - export LDFLAGS="${LDFLAGS} -lcurl -lnghttp2" - "$REDOX_MAKE" PREFIX=/usr V=1 -j"$($NPROC)" - skip=1 -} - -function recipe_clean { - "$REDOX_MAKE" clean - skip=1 -} - -function recipe_stage { - dest="$(realpath "$1")" - "$REDOX_MAKE" DESTDIR="$dest" PREFIX=/usr install - mkdir -pv "$dest/ui/apps" - cp -v "${COOKBOOK_RECIPE}/manifest" "$dest/ui/apps/00_netsurf" - skip=1 -} diff --git a/recipes/web/netsurf/recipe.toml b/recipes/web/netsurf/recipe.toml new file mode 100644 index 00000000..323a419f --- /dev/null +++ b/recipes/web/netsurf/recipe.toml @@ -0,0 +1,56 @@ +[source] +tar = "https://download.netsurf-browser.org/netsurf/releases/source-full/netsurf-all-3.10.tar.gz" +blake3 = "d0f3b4dabf536a39059b156d2ec4633c6f7b71208466e09a3c1ca2a319a44b61" +patches = [ + "./01_redox.patch" +] + +[build] +template = "custom" +dependencies = [ + "curl", + "expat", + "libjpeg", + "libpng", + "nghttp2", + "openssl1", + "sdl1", + "zlib", + "freetype2", + "liborbital", + "libiconv" +] +script = """ +DYNAMIC_INIT + +# Netsurf does not currently support out-of-tree builds :( +rsync -av --delete "${COOKBOOK_SOURCE}/" ./ + +export TARGET="framebuffer" +export CFLAGS="-I${COOKBOOK_SYSROOT}/include -I${PWD}/inst-${TARGET}/include" +export LDFLAGS="-L${COOKBOOK_SYSROOT}/lib -L${PWD}/inst-${TARGET}/lib -Wl,--allow-multiple-definition -Wl,-rpath-link,${COOKBOOK_SYSROOT}/lib" +# nghttp2 is not linked for some reason +export LDFLAGS="${LDFLAGS} -lcurl -lnghttp2" + +"$COOKBOOK_MAKE" PREFIX=/usr V=1 -j"$($NPROC)" +"$COOKBOOK_MAKE" DESTDIR="$COOKBOOK_STAGE" PREFIX=/usr install -j"$($NPROC)" +mkdir -pv "$COOKBOOK_STAGE/ui/apps" +cp -v "${COOKBOOK_RECIPE}/manifest" "$COOKBOOK_STAGE/ui/apps/00_netsurf" +""" + +[package] +shared-deps = [ + # XXX: currently only the following are dynamically linked + "libgcc", + "relibc", + "curl", + "nghttp2", + "libiconv", + "zlib", + "openssl1", + "liborbital", +] +dependencies = [ + "ca-certificates", + "orbital", +]