mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-17 15:34:18 +08:00
Merge branch 'usr-all-2' into 'master'
Wholesale /usr tidyup part II See merge request redox-os/redox!2153
This commit is contained in:
commit
f28060df32
@ -7,9 +7,10 @@ dependencies = [
|
||||
"lua54"
|
||||
]
|
||||
script = """
|
||||
|
||||
DYNAMIC_INIT
|
||||
COOKBOOK_CONFIGURE_FLAGS=(
|
||||
--sysconfdir=$COOKBOOK_SYSROOT
|
||||
--prefix=/usr
|
||||
--sysconfdir=/etc
|
||||
--with-lua-include=$COOKBOOK_SYSROOT/include
|
||||
--with-lua-bin=$COOKBOOK_SYSROOT/bin
|
||||
--with-lua-lib=$COOKBOOK_SYSROOT/lib
|
||||
|
||||
@ -16,15 +16,15 @@ template = "custom"
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
|
||||
export BUILDTIME_RUSTPYTHONPATH=/lib/rustpython
|
||||
export BUILDTIME_RUSTPYTHONPATH=/usr/lib/rustpython
|
||||
export OPENSSL_DIR="${COOKBOOK_SYSROOT}"
|
||||
export ZLIB_STATIC=1
|
||||
cookbook_cargo --features ssl
|
||||
mkdir -p "${COOKBOOK_STAGE}/lib"
|
||||
mkdir -p "${COOKBOOK_STAGE}/usr/lib"
|
||||
rsync -aE \
|
||||
--exclude 'test/' \
|
||||
--exclude '__pycache__/' \
|
||||
--exclude '*.pyc' \
|
||||
--exclude '/README.md' \
|
||||
"${COOKBOOK_SOURCE}"/Lib/ "${COOKBOOK_STAGE}/lib/rustpython"
|
||||
"${COOKBOOK_SOURCE}"/Lib/ "${COOKBOOK_STAGE}/usr/lib/rustpython"
|
||||
"""
|
||||
|
||||
@ -14,36 +14,8 @@ dependencies = [
|
||||
]
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
|
||||
export CFLAGS="${CFLAGS} -I${COOKBOOK_SYSROOT}/include -I${COOKBOOK_SYSROOT}/include/SDL2"
|
||||
export CXXFLAGS="${CXXFLAGS} -I${COOKBOOK_SYSROOT}/include -I${COOKBOOK_SYSROOT}/include/SDL2"
|
||||
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
|
||||
export CPPFLAGS="${CPPFLAGS} -I${COOKBOOK_SYSROOT}/include/SDL2"
|
||||
COOKBOOK_CMAKE_FLAGS+=(
|
||||
-DJPEG_INCLUDE_DIR="${COOKBOOK_SYSROOT}/include"
|
||||
-DJPEG_LIBRARY="-ljpeg"
|
||||
-DPNG_PNG_INCLUDE_DIR="${COOKBOOK_SYSROOT}/include"
|
||||
@ -51,10 +23,8 @@ COOKBOOK_CONFIGURE_FLAGS=(
|
||||
-DSDL2_LIBRARIES="-lSDL2 -lorbital $("${TARGET}-pkg-config" --libs osmesa)"
|
||||
-DZLIB_INCLUDE_DIR="${COOKBOOK_SYSROOT}/include"
|
||||
-DZLIB_LIBRARY="-lz"
|
||||
"${COOKBOOK_SOURCE}"
|
||||
)
|
||||
"${COOKBOOK_CONFIGURE}" "${COOKBOOK_CONFIGURE_FLAGS[@]}"
|
||||
"${COOKBOOK_MAKE}" -j "${COOKBOOK_MAKE_JOBS}" openjk_sp.x86_64
|
||||
mkdir -pv "${COOKBOOK_STAGE}/home/user/JediAcademy"
|
||||
cp -v openjk_sp.x86_64 "${COOKBOOK_STAGE}/home/user/JediAcademy"
|
||||
cookbook_cmake
|
||||
mkdir -pv "${COOKBOOK_STAGE}/usr/games/JediAcademy"
|
||||
cp -v openjk_sp.x86_64 "${COOKBOOK_STAGE}/usr/games/JediAcademy"
|
||||
"""
|
||||
|
||||
@ -13,7 +13,7 @@ COOKBOOK_CONFIGURE_FLAGS=(
|
||||
threads
|
||||
no-dgram
|
||||
"${OS}-${ARCH}"
|
||||
--prefix="/"
|
||||
--prefix=/usr
|
||||
)
|
||||
|
||||
if [ "${COOKBOOK_DYNAMIC}" = "1" ]; then
|
||||
@ -21,10 +21,10 @@ if [ "${COOKBOOK_DYNAMIC}" = "1" ]; then
|
||||
else
|
||||
COOKBOOK_CONFIGURE_FLAGS+=(no-shared)
|
||||
fi
|
||||
|
||||
export CC="${CC_WRAPPER} ${GNU_TARGET}-gcc"
|
||||
# TODO: Sccache regression between 0.11-0.15 preventing us to use ${CC_WRAPPER}
|
||||
export CC="${GNU_TARGET}-gcc"
|
||||
"${COOKBOOK_CONFIGURE}" "${COOKBOOK_CONFIGURE_FLAGS[@]}"
|
||||
"${COOKBOOK_MAKE}" -j"${COOKBOOK_MAKE_JOBS}"
|
||||
"${COOKBOOK_MAKE}" install_sw install_ssldirs DESTDIR="${COOKBOOK_STAGE}"
|
||||
rm -rfv "${COOKBOOK_STAGE}/"{share,ssl}
|
||||
rm -rfv "${COOKBOOK_STAGE}"/usr/{share,ssl}
|
||||
"""
|
||||
|
||||
@ -1,27 +1,15 @@
|
||||
[source]
|
||||
tar = "https://sourceforge.net/projects/sdlgfx/files/SDL_gfx-2.0.25.tar.gz"
|
||||
blake3 = "e6f571a38e51d369b010f4b10eb35b95e3d2edae2edd796241c47ea8376581e6"
|
||||
patches = ["redox.patch"]
|
||||
tar = "https://sourceforge.net/projects/sdlgfx/files/SDL_gfx-2.0.27.tar.gz"
|
||||
blake3 = "6fe0ff88b5084d56e2c9259e50ef2eab14db4c8bc2fa7a4719a3adb4178e266f"
|
||||
script = """
|
||||
GNU_CONFIG_GET config.sub
|
||||
./autogen.sh
|
||||
"""
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
template = "configure"
|
||||
dependencies = [
|
||||
"sdl1",
|
||||
"liborbital",
|
||||
"libiconv",
|
||||
]
|
||||
script = """
|
||||
COOKBOOK_CONFIGURE_FLAGS=(
|
||||
--prefix=/
|
||||
--build="$(gcc -dumpmachine)"
|
||||
--host="${TARGET}"
|
||||
--disable-shared
|
||||
)
|
||||
|
||||
cookbook_configure
|
||||
|
||||
rm -f "${COOKBOOK_STAGE}/lib/"*.la
|
||||
"""
|
||||
@ -1,20 +0,0 @@
|
||||
--- source/config.sub 2013-10-27 23:04:13.000000000 +0100
|
||||
+++ build/config.sub 2019-08-13 10:13:07.072063540 +0200
|
||||
@@ -125,7 +125,7 @@ case $maybe_os in
|
||||
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
|
||||
linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
|
||||
knetbsd*-gnu* | netbsd*-gnu* | \
|
||||
- kopensolaris*-gnu* | \
|
||||
+ kopensolaris*-gnu* | redox* | \
|
||||
storm-chaos* | os2-emx* | rtmk-nova*)
|
||||
os=-$maybe_os
|
||||
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
|
||||
@@ -1346,7 +1346,7 @@ case $os in
|
||||
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
|
||||
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
|
||||
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
|
||||
- | -sym* | -kopensolaris* \
|
||||
+ | -sym* | -kopensolaris* | -redox* \
|
||||
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
|
||||
| -aos* | -aros* \
|
||||
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
|
||||
@ -2,19 +2,16 @@
|
||||
git = "https://gitlab.redox-os.org/redox-os/sdl1.2.git"
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
template = "configure"
|
||||
dependencies = [
|
||||
"liborbital"
|
||||
]
|
||||
script = """
|
||||
COOKBOOK_CONFIGURE_FLAGS+=(
|
||||
--disable-loadso
|
||||
--disable-pulseaudio
|
||||
--disable-video-x11
|
||||
--enable-clock_gettime
|
||||
--enable-pthread-sem
|
||||
--enable-redoxaudio
|
||||
--enable-video-orbital
|
||||
)
|
||||
cookbook_configure
|
||||
"""
|
||||
configure = [
|
||||
"--disable-loadso",
|
||||
"--disable-pulseaudio",
|
||||
"--disable-video-x11",
|
||||
"--enable-clock_gettime",
|
||||
"--enable-pthread-sem",
|
||||
"--enable-redoxaudio",
|
||||
"--enable-video-orbital",
|
||||
]
|
||||
|
||||
@ -16,9 +16,7 @@ script = """
|
||||
DYNAMIC_INIT
|
||||
|
||||
export SDL_LIBS="-lSDL2 -lorbital -lOSMesa -lvorbis -logg -lz -lm -lpthread -lstdc++"
|
||||
COOKBOOK_CONFIGURE_FLAGS=(
|
||||
--prefix=/
|
||||
--host="${TARGET}"
|
||||
COOKBOOK_CONFIGURE_FLAGS+=(
|
||||
--disable-sdltest
|
||||
--enable-music-ogg
|
||||
--disable-music-cmd
|
||||
|
||||
@ -22,10 +22,9 @@ COOKBOOK_CONFIGURE_FLAGS+=(
|
||||
fi
|
||||
|
||||
# libicu uses TARGET for something else
|
||||
unset TARGET
|
||||
cookbook_configure
|
||||
(unset TARGET && cookbook_configure)
|
||||
|
||||
if [ "$TARGET" != "$COOKBOOK_HOST_TARGET" ]; then
|
||||
if [ "$TARGET" = "$COOKBOOK_HOST_TARGET" ]; then
|
||||
# this is not ideal, but there's no other better way
|
||||
rsync -a ./ "${COOKBOOK_STAGE}/usr"
|
||||
fi
|
||||
|
||||
@ -4,3 +4,6 @@ blake3 = "68187400fded667f60b4b020d0fc37fa489ae0de33169fe7b07fcbaf88e7a3f9"
|
||||
|
||||
[build]
|
||||
template = "configure"
|
||||
dev-dependencies = [
|
||||
"host:python312"
|
||||
]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user