diff --git a/recipes/libs/freeglut/recipe.sh b/recipes/libs/freeglut/recipe.sh deleted file mode 100644 index b9e4b08b2681ce9d6d6d1d0a4465e6cc6b9c407b..0000000000000000000000000000000000000000 --- a/recipes/libs/freeglut/recipe.sh +++ /dev/null @@ -1,34 +0,0 @@ -TAR=https://cytranet.dl.sourceforge.net/project/freeglut/freeglut/3.0.0/freeglut-3.0.0.tar.gz - -BUILD_DEPENDS=(mesa mesa-glu) - -function recipe_version { - echo "3.0.0" - skip=1 -} - -function recipe_build { - sysroot="$(realpath ../sysroot)" - export CFLAGS="-I$sysroot/include" - export CPPFLAGS="-I$sysroot/include" - export LDFLAGS="-L$sysroot/lib" - cmake \ - -D CMAKE_TOOLCHAIN_FILE=../redox_cross_toolchain.cmake \ - -D CMAKE_INSTALL_PREFIX=/ \ - -D FREEGLUT_GLES=0 \ - . - #./configure --host="${HOST}" --prefix=/ --enable-osmesa - "$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/libs/freeglut/redox_cross_toolchain.cmake b/recipes/libs/freeglut/redox_cross_toolchain.cmake deleted file mode 100644 index d2a3fb7b68ce2e049f2325a5da85b2204627e02c..0000000000000000000000000000000000000000 --- a/recipes/libs/freeglut/redox_cross_toolchain.cmake +++ /dev/null @@ -1 +0,0 @@ -SET(CMAKE_SYSTEM_NAME Redox) diff --git a/recipes/wip/freeglut/recipe.toml b/recipes/wip/freeglut/recipe.toml new file mode 100644 index 0000000000000000000000000000000000000000..cda38252169745b5bcb04feb175b8c2410b93171 --- /dev/null +++ b/recipes/wip/freeglut/recipe.toml @@ -0,0 +1,49 @@ +[source] +tar = "https://cytranet.dl.sourceforge.net/project/freeglut/freeglut/3.0.0/freeglut-3.0.0.tar.gz" +blake3 = "08c8874d6ddad5be4860813865d4d4e2a84c294da0f3cf82a29e43920806b0da" + +[build] +dependencies = [ + "mesa", + "mesa-glu", +] +template = "custom" +script = """ +export CFLAGS="-I${COOKBOOK_SYSROOT}/include" +export CPPFLAGS="-I${COOKBOOK_SYSROOT}/include" +export CXXFLAGS="-I${COOKBOOK_SYSROOT}/include" +export LDFLAGS="-L${COOKBOOK_SYSROOT}/lib" + +cat > redox.cmake <<EOF +# the name of the target operating system +set(CMAKE_SYSTEM_NAME Generic) +set(CMAKE_SYSTEM_PROCESSOR "${TARGET%%-*}") + +# which compilers to use for C and C++ +set(CMAKE_C_COMPILER "${TARGET}-gcc") +set(CMAKE_CXX_COMPILER "${TARGET}-g++") + +# where is the target environment located +set(CMAKE_FIND_ROOT_PATH "${COOKBOOK_SYSROOT}") + +# adjust the default behavior of the FIND_XXX() commands: +# search programs in the host environment +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) + +# search headers, libraries, and packages in the target environment +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) +EOF + +COOKBOOK_CONFIGURE=cmake +COOKBOOK_CONFIGURE_FLAGS=( + -DCMAKE_BUILD_TYPE=Release + -DCMAKE_INSTALL_PREFIX=/ + -DCMAKE_TOOLCHAIN_FILE=redox.cmake + -DCMAKE_VERBOSE_MAKEFILE=On + -DFREEGLUT_GLES=0 + "${COOKBOOK_SOURCE}" +) +cookbook_configure +"""