diff --git a/recipes/dev/cargo/recipe.toml b/recipes/dev/cargo/recipe.toml index 71834b919..8fa7121b7 100644 --- a/recipes/dev/cargo/recipe.toml +++ b/recipes/dev/cargo/recipe.toml @@ -13,6 +13,7 @@ dependencies = [ "zlib", ] script = """ +DYNAMIC_INIT export LIBSSH2_SYS_USE_PKG_CONFIG=1 export LIBZ_SYS_STATIC=1 export DEP_NGHTTP2_ROOT="${COOKBOOK_SYSROOT}" @@ -29,3 +30,14 @@ export DEP_Z_ROOT="${COOKBOOK_SYSROOT}" mkdir -pv "${COOKBOOK_STAGE}/bin" cp -v "target/${TARGET}/release/cargo" "${COOKBOOK_STAGE}/bin/cargo" """ + +[package] +shared-deps = [ + "libgcc", + "curl", + "libssh2", + "nghttp2", + "openssl1", + "zlib", +] + diff --git a/recipes/dev/llvm18-shared/native.cmake b/recipes/dev/llvm18-shared/native.cmake new file mode 100644 index 000000000..4b0abbfa3 --- /dev/null +++ b/recipes/dev/llvm18-shared/native.cmake @@ -0,0 +1,2 @@ +set(CMAKE_C_COMPILER cc) +set(CMAKE_CXX_COMPILER c++) diff --git a/recipes/dev/llvm18-shared/recipe.toml b/recipes/dev/llvm18-shared/recipe.toml new file mode 100644 index 000000000..93b57c996 --- /dev/null +++ b/recipes/dev/llvm18-shared/recipe.toml @@ -0,0 +1,87 @@ +[source] +git = "https://gitlab.redox-os.org/redox-os/llvm-project.git" +upstream = "https://github.com/rust-lang/llvm-project.git" +branch = "redox-2024-05-11" + +[build] +template = "custom" +dependencies = [ + "zlib" +] +script = """ +DYNAMIC_INIT + +cat > CMakeToolchain-x86_64.cmake < { -- inherit_from => [ "BASE_common", asm("aarch64_asm") ], -+### Redox configurations -+ "redox-common" => { -+ inherit_from => [ "BASE_common" ], - cc => "gcc", -- cflags => "-DL_ENDIAN -DOSSL_SSIZE_MAX=LONG_MAX -DNO_SYSLOG -O3 -static -Wall", -+ thread_scheme => "(unknown)", -+ dso_scheme => "dlfcn", -+ shared_target => "linux-shared", -+ shared_cflag => "-fPIC", -+ shared_ldflag => sub { $disabled{pinshared} ? () : "-Wl,-znodelete" }, -+ shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -+ }, -+ "redox-aarch64" => { -+ inherit_from => [ "redox-common", asm("aarch64_asm") ], -+ cflags => "-DL_ENDIAN -DOSSL_SSIZE_MAX=LONG_MAX -DNO_SYSLOG -O3 -Wall", - bn_ops => "SIXTY_FOUR_BIT_LONG", - perlasm_scheme => "elf", -- thread_scheme => "(unknown)", - }, - "redox-i686" => { -- inherit_from => [ "BASE_unix", asm("x86_elf_asm") ], -- cc => "gcc", -- cflags => "-DL_ENDIAN -DNO_SYSLOG -O3 -static -Wall", -+ inherit_from => [ "redox-common", asm("x86_elf_asm") ], -+ cflags => "-DL_ENDIAN -DNO_SYSLOG -O3 -Wall", - bn_ops => "BN_LLONG", -- thread_scheme => "(unknown)", - }, - "redox-x86_64" => { -- inherit_from => [ "BASE_common", asm("x86_64_asm") ], -- cc => "gcc", -- cflags => "-DL_ENDIAN -DOSSL_SSIZE_MAX=LONG_MAX -DNO_SYSLOG -O3 -static -Wall", -+ inherit_from => [ "redox-common", asm("x86_64_asm") ], -+ cflags => "-DL_ENDIAN -DOSSL_SSIZE_MAX=LONG_MAX -DNO_SYSLOG -O3 -Wall", - bn_ops => "SIXTY_FOUR_BIT_LONG", -- thread_scheme => "(unknown)", - }, - - #### Solaris configurations diff --git a/recipes/libs/zlib/recipe.toml b/recipes/libs/zlib/recipe.toml index 0ff21eb5e..303801789 100644 --- a/recipes/libs/zlib/recipe.toml +++ b/recipes/libs/zlib/recipe.toml @@ -1,14 +1,16 @@ [source] tar = "https://www.zlib.net/fossils/zlib-1.3.tar.gz" blake3 = "ec1abc6f672a7a6ee6f49ba544cc9529f73121b478310473be44fee22a140ebf" + [build] template = "custom" script = """ - DYNAMIC_INIT - # See https://stackoverflow.com/questions/21396988/zlib-build-not-configuring-properly-with-cross-compiler-ignores-ar. - CHOST="${TARGET}" "${COOKBOOK_CONFIGURE}" --prefix="" - "${COOKBOOK_MAKE}" -j "$(nproc)" - "${COOKBOOK_MAKE}" install DESTDIR="${COOKBOOK_STAGE}" +DYNAMIC_INIT +# See https://stackoverflow.com/questions/21396988/zlib-build-not-configuring-properly-with-cross-compiler-ignores-ar. +CHOST="${TARGET}" "${COOKBOOK_CONFIGURE}" --prefix="" +"${COOKBOOK_MAKE}" -j "$(nproc)" +"${COOKBOOK_MAKE}" install DESTDIR="${COOKBOOK_STAGE}" +patchelf --set-soname 'libz.so.1.3' "${COOKBOOK_STAGE}/lib/libz.so.1.3" """ [package] diff --git a/recipes/tools/cosmic-term/recipe.toml b/recipes/tools/cosmic-term/recipe.toml index 2afe4c007..73adb4563 100644 --- a/recipes/tools/cosmic-term/recipe.toml +++ b/recipes/tools/cosmic-term/recipe.toml @@ -5,6 +5,7 @@ branch = "master" [build] template = "custom" script = """ +DYNAMIC_INIT cookbook_cargo --no-default-features mkdir -pv "${COOKBOOK_STAGE}/ui/apps" cp -v "${COOKBOOK_RECIPE}/manifest" "${COOKBOOK_STAGE}/ui/apps/10_cosmic-term" @@ -17,3 +18,9 @@ cp -v "${COOKBOOK_SOURCE}/res/${APPID}.metainfo.xml" "${COOKBOOK_STAGE}/usr/shar mkdir -pv "${COOKBOOK_STAGE}/usr/share/icons/" cp -rv "${COOKBOOK_SOURCE}/res/icons/hicolor/" "${COOKBOOK_STAGE}/usr/share/icons/" """ + +[package] +shared-deps = [ + "libgcc" +] +