Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • fabiao/cookbook
  • redox-os/cookbook
  • stratact/cookbook
  • carrot93/cookbook
  • microcolonel/cookbook
  • feliwir/cookbook
  • xTibor/cookbook
  • jD91mZM2/cookbook
  • mpajkowski/cookbook
  • rw_van/cookbook
  • athei/cookbook
  • kblobr/cookbook
  • VitalyAnkh/cookbook
  • sajattack/cookbook
  • sainath14/cookbook
  • ackxolotl/cookbook
  • AdminXVII/cookbook
  • coolreader18/cookbook
  • deepaksirone/cookbook
  • smckay/cookbook
  • 4lDO2/cookbook
  • tomasritter/cookbook
  • alfredoyang/cookbook
  • samuela/cookbook
  • andrewdavidmackenzie/cookbook
  • uuuvn/cookbook
  • josh_williams/cookbook
  • bjorn3/cookbook
  • ids1024/cookbook
  • Chocimier/cookbook
  • bpisch/cookbook
  • willnode/cookbook
  • grnmeira/cookbook
  • andrey.turkin/cookbook
  • cameronbraid/cookbook
  • kamirr/cookbook
  • freewilll/cookbook
  • kivimango/cookbook
  • rukai/cookbook
  • mattmadeofpasta/cookbook
  • jordan_mccallum/cookbook
  • dahc/cookbook
  • Forest0923/cookbook
  • LLeny/cookbook
  • doriancodes/cookbook
  • ashton/cookbook
  • gmacd/cookbook
  • mojo/cookbook
  • wt/cookbook
  • red15/cookbook
  • hasheddan/cookbook
  • dimymark/cookbook
  • andypython/cookbook
  • enygmator/cookbook
  • Ivan/cookbook
  • argslc/cookbook
  • adi-g15/cookbook
  • tfinnegan937/cookbook
  • raffaeleragni/cookbook
  • Lekkit/cookbook
  • bitstr0m/cookbook
  • josh/cookbook
  • zhaozhao/cookbook
  • blueskyson/cookbook
  • Xunjin/cookbook
  • StaringAtEditor/cookbook
  • monk_programmer/cookbook
  • DimitarGj/cookbook
  • njskalski/cookbook
  • DLC/cookbook
70 results
Show changes
Showing
with 27 additions and 1011 deletions
name=Super Mario 64 EX
category=Games
binary=/bin/sm64
icon=/ui/icons/apps/sm64ex.png
......@@ -5,7 +5,7 @@ git = "https://github.com/jackpot51/sm64ex.git"
template = "custom"
dependencies = [
"liborbital",
"llvm",
"llvm18",
"mesa",
"sdl2",
"zlib",
......@@ -15,8 +15,17 @@ rsync -av --delete "${COOKBOOK_SOURCE}/" ./
# You must find your own ROM
cp -v "${COOKBOOK_RECIPE}/baserom.us.z64" baserom.us.z64
#TODO: do this in cook instead
unset AR AS CC CXX LD NM OBJCOPY OBJDUMP RANLIB READELF STRIP
export CROSS="${TARGET}-"
"${COOKBOOK_MAKE}" -j "${COOKBOOK_MAKE_JOBS}"
mkdir -p "${COOKBOOK_STAGE}/bin"
cp -v build/us_pc/sm64.us.f3dex2e "${COOKBOOK_STAGE}/bin/sm64"
mkdir -pv "${COOKBOOK_STAGE}/ui/apps"
cp -v "${COOKBOOK_RECIPE}/manifest" "${COOKBOOK_STAGE}/ui/apps/sm64ex"
mkdir -pv "${COOKBOOK_STAGE}/ui/icons/apps"
wget -O "${COOKBOOK_STAGE}/ui/icons/apps/sm64ex.png" https://evilgames.eu/texture-packs/thumb/sm64-reloaded.png
"""
VERSION=1.8.4
TAR=https://sourceforge.net/projects/sdl-sopwith/files/sdl_sopwith/$VERSION/sopwith-$VERSION.tar.gz
BUILD_DEPENDS=(sdl liborbital libiconv)
TAR="https://github.com/fragglet/sdl-sopwith/releases/download/sdl-sopwith-${VERSION}/sopwith-${VERSION}.tar.gz"
BUILD_DEPENDS=(sdl1 liborbital libiconv)
function recipe_version {
echo "$VERSION"
skip=1
}
function recipe_update {
echo "skipping update"
skip=1
}
function recipe_build {
wget -O autotools/config.sub "https://gitlab.redox-os.org/redox-os/gnu-config/-/raw/master/config.sub?inline=false"
sysroot="$(realpath ../sysroot)"
......@@ -27,11 +22,6 @@ function recipe_build {
skip=1
}
function recipe_test {
echo "skipping test"
skip=1
}
function recipe_clean {
"$REDOX_MAKE" clean
skip=1
......
......@@ -9,10 +9,10 @@ dependencies = [
"libogg",
"liborbital",
"libvorbis",
"llvm",
"llvm18",
"mesa",
"sdl2",
"sdl2_mixer",
"sdl2-mixer",
"zlib",
]
script = """
......@@ -21,16 +21,12 @@ COOKBOOK_CONFIGURE_FLAGS=(
-DCMAKE_VERBOSE_MAKEFILE=On
-DCMAKE_CROSSCOMPILING=True
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_INSTALL_PREFIX="/"
-DCMAKE_INSTALL_PREFIX="/usr"
-DSDL2_INCLUDE_DIR="${COOKBOOK_SYSROOT}/include/SDL2"
-DSDL2_LIBRARY="-lSDL2_mixer -lvorbisfile -lvorbis -logg -lSDL2 -lorbital $("${TARGET}-pkg-config" --libs osmesa)"
-DSDL2_MIXER_INCLUDE_DIR="${COOKBOOK_SYSROOT}/include/SDL2"
-DSDL2_MIXER_LIBRARY="SDL2_mixer"
"${COOKBOOK_SOURCE}"
)
set -x
cookbook_configure
mv -vT "${COOKBOOK_STAGE}"/usr/bin "${COOKBOOK_STAGE}/bin"
rmdir -v "${COOKBOOK_STAGE}"/usr
set +x
"""
VERSION=1.0-rc3
GIT=https://github.com/angelXwind/OpenSyobonAction
BUILD_DEPENDS=(sdl liborbital sdl_mixer sdl_image sdl_gfx sdl_ttf freetype libjpeg libpng zlib libogg libvorbis)
BUILD_DEPENDS=(sdl1 liborbital sdl1-mixer sdl1-image sdl-gfx sdl1-ttf freetype2 libjpeg libpng zlib libogg libvorbis)
function recipe_version {
echo "$VERSION"
skip=1
}
function recipe_update {
echo "skipping update"
skip=1
}
function recipe_build {
sysroot="$(realpath ../sysroot)"
export SDL_CONFIG="${PKG_CONFIG} sdl"
......@@ -21,11 +16,6 @@ function recipe_build {
skip=1
}
function recipe_test {
echo "skipping test"
skip=1
}
function recipe_clean {
"$REDOX_MAKE" clean
skip=1
......
......@@ -2,7 +2,7 @@ VERSION=2.0
GIT=https://github.com/xTibor/VVVVVV
BRANCH=redox
GIT_UPSTREAM=https://github.com/TerryCavanagh/VVVVVV
BUILD_DEPENDS=(sdl2_image sdl2_mixer sdl2 liborbital llvm mesa mesa_glu zlib libogg libvorbis)
BUILD_DEPENDS=(sdl2-image sdl2-mixer sdl2 liborbital llvm18 mesa mesa-glu zlib libogg libvorbis)
function recipe_version {
printf "1.0.0"
......@@ -32,7 +32,7 @@ function recipe_clean {
function recipe_stage {
dest="$(realpath $1)"
mkdir -pv "$1/games/vvvvvv"
cp ./desktop_version/VVVVVV "$1/games/vvvvvv"
mkdir -pv "$1/usr/games/vvvvvv"
cp ./desktop_version/VVVVVV "$1/usr/games/vvvvvv"
skip=1
}
......@@ -3,17 +3,17 @@ GIT=https://github.com/wesnoth/wesnoth.git
BRANCH=$VERSION
BUILD_DEPENDS=(
cairo
freetype
freetype2
glib
libjpeg
liborbital
libpng
libvorbis
llvm
mesa mesa_glu
llvm18
mesa mesa-glu
pcre
pixman
sdl2 sdl2_image sdl2_mixer sdl2_ttf
sdl2 sdl2-image sdl2-mixer sdl2-ttf
zlib
)
......@@ -22,11 +22,6 @@ function recipe_version {
skip=1
}
function recipe_update {
echo "skipping update"
skip=1
}
function recipe_build {
sysroot="$(realpath ../sysroot)"
export CFLAGS="-I$sysroot/include"
......@@ -54,11 +49,6 @@ function recipe_build {
skip=1
}
function recipe_test {
echo "skipping test"
skip=1
}
function recipe_clean {
rm -rf build
skip=1
......
GIT=https://gitlab.redox-os.org/redox-os/gawk.git
GIT_UPSTREAM=https://git.savannah.gnu.org/git/gawk.git
BRANCH=redox
function recipe_update {
echo "skipping update"
skip=1
}
function recipe_build {
./configure --build=${BUILD} --host=${HOST} --prefix=/ ac_cv_func_gethostbyname=no ac_cv_func_connect=no
"$REDOX_MAKE" -j"$($NPROC)"
skip=1
}
function recipe_test {
echo "skipping test"
skip=1
}
function recipe_clean {
"$REDOX_MAKE" clean
skip=1
}
function recipe_stage {
dest="$(realpath $1)"
"$REDOX_MAKE" DESTDIR="$dest" install
skip=1
}
TAR=https://gitlab.redox-os.org/redox-os/gcc/-/archive/redox/gcc-redox.tar.gz
#GIT=https://gitlab.redox-os.org/redox-os/gcc.git
#GIT_UPSTREAM=https://gcc.gnu.org/git/gcc.git
#BRANCH=redox
BUILD_DEPENDS=(relibc)
DEPENDS="gnu-binutils relibc"
function recipe_version {
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
skip=1
}
function recipe_update {
echo "skipping update"
skip=1
}
function recipe_build {
./contrib/download_prerequisites
cp config.sub gmp/config.sub
cp config.sub isl/config.sub
cp config.sub mpfr/config.sub
cp -f config.sub mpc/config.sub
sysroot="$(realpath ../sysroot)"
mkdir -p "$sysroot/usr"
ln -sf "$sysroot/include" "$sysroot/usr/include"
ln -sf "$sysroot/lib" "$sysroot/usr/lib"
export LDFLAGS="--static"
./configure \
--build=${BUILD} \
--host=${HOST} \
--target=${HOST} \
--prefix=/ \
--with-sysroot=/ \
--with-build-sysroot="$sysroot" \
--enable-static \
--enable-shared \
--disable-dlopen \
--disable-nls \
--enable-languages=c,c++ \
--enable-threads=posix
"$REDOX_MAKE" -j "$(nproc)" all-gcc all-target-libgcc all-target-libstdc++-v3
skip=1
}
function recipe_test {
echo "skipping test"
skip=1
}
function recipe_clean {
"$REDOX_MAKE" clean
skip=1
}
function recipe_stage {
dest="$(realpath $1)"
"$REDOX_MAKE" DESTDIR="$dest" install-gcc install-target-libgcc install-target-libstdc++-v3
find "$dest"/{bin,libexec} -exec $STRIP {} ';' 2> /dev/null
ln -s "gcc" "$1/bin/cc"
skip=1
}
VERSION="2.38.1"
TAR="https://ftp.gnome.org/pub/gnome/sources/gdk-pixbuf/${VERSION%.*}/gdk-pixbuf-${VERSION}.tar.xz"
BUILD_DEPENDS=(gettext glib libffi libiconv libjpeg libpng pcre shared-mime-info zlib)
function recipe_version {
echo "$VERSION"
skip=1
}
function recipe_update {
echo "skipping update"
skip=1
}
function recipe_build {
sysroot="$(realpath ../sysroot)"
export LDFLAGS="-static"
# TODO: Fix this annoying shite
echo "[binaries]" > cross_file.txt
echo "c = '${CC}'" >> cross_file.txt
echo "cpp = '${CXX}'" >> cross_file.txt
echo "ar = '${AR}'" >> cross_file.txt
echo "strip = '${STRIP}'" >> cross_file.txt
echo "pkgconfig = '${PKG_CONFIG}'" >> cross_file.txt
echo "[host_machine]" >> cross_file.txt
echo "system = 'redox'" >> cross_file.txt
echo "cpu_family = 'x86_64'" >> cross_file.txt
echo "cpu = 'x86_64'" >> cross_file.txt
echo "endian = 'little'" >> cross_file.txt
echo "[paths]" >> cross_file.txt
echo "prefix = '${sysroot}'" >> cross_file.txt
echo "libdir = 'lib'" >> cross_file.txt
echo "bindir = 'bin'" >> cross_file.txt
unset AR
unset AS
unset CC
unset CXX
unset LD
unset NM
unset OBJCOPY
unset OBJDUMP
unset PKG_CONFIG
unset RANLIB
unset READELF
unset STRIP
meson . _build \
--cross-file cross_file.txt \
--buildtype release \
--strip \
-Ddefault_library=static \
-Dprefix=/ \
-Dlibdir=lib \
-Dbuiltin_loaders=all \
-Dgir=false \
-Dx11=false
ninja -C _build -v
skip=1
}
function recipe_test {
echo "skipping test"
skip=1
}
function recipe_clean {
"$REDOX_MAKE" clean
skip=1
}
function recipe_stage {
dest="$(realpath $1)"
DESTDIR="$dest" ninja -C _build -v install
rm -f "$dest/lib/"*.la
skip=1
}
BUILD_DEPENDS=(liborbital llvm mesa mesa_glu zlib)
function recipe_version {
printf "1.0.0"
skip=1
}
function recipe_update {
echo "skipping update"
skip=1
}
function recipe_prepare {
rm -rf source
mkdir source
cp gears.c source
}
function recipe_build {
sysroot="$(realpath ../sysroot)"
set -x
"${CXX}" -O2 -I "$sysroot/include" -L "$sysroot/lib" gears.c -o gears -static -lorbital $("${PKG_CONFIG}" --libs glu) -lz
set +x
skip=1
}
function recipe_test {
echo "skipping test"
skip=1
}
function recipe_clean {
"$REDOX_MAKE" clean
skip=1
}
function recipe_stage {
dest="$(realpath $1)"
mkdir -pv "$dest/bin"
cp -v "gears" "$dest/bin/gears"
skip=1
}
VERSION=2.13.1
TAR=https://www.kernel.org/pub/software/scm/git/git-$VERSION.tar.xz
BUILD_DEPENDS=(zlib curl openssl expat nghttp2)
DEPENDS="ca-certificates"
MAKEFLAGS=(
NEEDS_SSL_WITH_CURL=1
NEEDS_CRYPTO_WITH_SSL=1
NO_IPV6=1
NO_PREAD=1
NO_MMAP=1
NO_SETITIMER=1
NO_UNIX_SOCKETS=1
NEEDS_LIBICONV=
NEEDS_LIBRT=
BLK_SHA1=1
V=1
)
function recipe_version {
echo "$VERSION"
skip=1
}
function recipe_update {
echo "skipping update"
skip=1
}
function recipe_build {
sysroot="$(realpath ../sysroot)"
export LDFLAGS="-L$sysroot/lib -static"
export CPPFLAGS="-I$sysroot/include"
export CURL_CONFIG="$sysroot/bin/curl-config"
./configure \
--build="${BUILD}" \
--host="${HOST}" \
--prefix=/ \
ac_cv_fread_reads_directories=yes \
ac_cv_snprintf_returns_bogus=yes \
ac_cv_lib_curl_curl_global_init=yes
"$REDOX_MAKE" "${MAKEFLAGS[@]}" -j"$($NPROC)"
skip=1
}
function recipe_test {
echo "skipping test"
skip=1
}
function recipe_clean {
"$REDOX_MAKE" clean
skip=1
}
function recipe_stage {
dest="$(realpath $1)"
"$REDOX_MAKE" DESTDIR="$dest" "${MAKEFLAGS[@]}" install
${STRIP} $1/bin/* || true
${STRIP} $1/libexec/git-core/* || true
rm -rf $1/share/man
skip=1
}
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_update {
echo "skipping update"
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_test {
echo "skipping test"
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 -ruwN source/configure.ac source-new/configure.ac
--- source/configure.ac 2018-12-23 06:10:41.000000000 -0700
+++ source-new/configure.ac 2019-01-05 10:59:22.924421938 -0700
@@ -981,7 +981,7 @@
[int qclass = C_IN;])],
[AC_MSG_RESULT([yes])
NAMESER_COMPAT_INCLUDE="#include <arpa/nameser_compat.h>"],
- [AC_MSG_ERROR([could not compile test program either way])])])])
+ [AC_MSG_WARN([could not compile test program either way])])])])
AC_SUBST(NAMESER_COMPAT_INCLUDE)
# We can't just use AC_CHECK_FUNC/AC_CHECK_LIB here. Bug 586150
@@ -1009,7 +1009,7 @@
[res_query("test", 0, 0, (void *)0, 0);],
[AC_MSG_RESULT([in -lbind])
NETWORK_LIBS="-lbind $NETWORK_LIBS"],
- [AC_MSG_ERROR(not found)])])
+ [AC_MSG_WARN(not found)])])
LIBS="$save_libs"])
AC_CHECK_FUNC(socket, :, AC_CHECK_LIB(socket, socket,
[NETWORK_LIBS="-lsocket $NETWORK_LIBS"],
diff -ruwN source/gio/glocalfileinfo.c source-new/gio/glocalfileinfo.c
--- source/gio/glocalfileinfo.c 2018-12-23 06:10:41.000000000 -0700
+++ source-new/gio/glocalfileinfo.c 2019-01-05 14:18:02.435425946 -0700
@@ -1217,11 +1217,13 @@
lookup_gid_name (gid_t gid)
{
char *name;
+#if !defined(__redox__)
#if defined (HAVE_GETGRGID_R)
char buffer[4096];
struct group gbuf;
#endif
struct group *gbufp;
+#endif
if (gid_cache == NULL)
gid_cache = g_hash_table_new_full (NULL, NULL, NULL, (GDestroyNotify)g_free);
@@ -1231,6 +1233,7 @@
if (name)
return name;
+#if !defined(__redox__)
#if defined (HAVE_GETGRGID_R)
getgrgid_r (gid, &gbuf, buffer, sizeof(buffer), &gbufp);
#else
@@ -1242,6 +1245,7 @@
gbufp->gr_name[0] != 0)
name = convert_pwd_string_to_utf8 (gbufp->gr_name);
else
+#endif
name = g_strdup_printf("%d", (int)gid);
g_hash_table_replace (gid_cache, GINT_TO_POINTER (gid), name);
diff -ruwN source/gio/gnetworking.h.in source-new/gio/gnetworking.h.in
--- source/gio/gnetworking.h.in 2018-12-23 06:10:41.000000000 -0700
+++ source-new/gio/gnetworking.h.in 2019-01-13 10:46:34.304980440 -0700
@@ -41,13 +41,19 @@
#include <netdb.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
+#if !defined(__redox__)
#include <resolv.h>
+#endif
#include <sys/socket.h>
#include <sys/un.h>
+#if !defined(__redox__)
#include <net/if.h>
+#endif
#include <arpa/inet.h>
+#if !defined(__redox__)
#include <arpa/nameser.h>
+#endif
@NAMESER_COMPAT_INCLUDE@
#ifndef T_SRV
diff -ruwN source/gio/gsocket.c source-new/gio/gsocket.c
--- source/gio/gsocket.c 2018-12-23 06:10:41.000000000 -0700
+++ source-new/gio/gsocket.c 2019-01-05 13:34:30.178211038 -0700
@@ -1539,6 +1539,7 @@
g_return_val_if_fail (G_IS_SOCKET (socket), 0);
+#if !defined(__redox__)
if (socket->priv->family == G_SOCKET_FAMILY_IPV4)
{
g_socket_get_option (socket, IPPROTO_IP, IP_TTL,
@@ -1550,6 +1551,7 @@
&value, &error);
}
else
+#endif
g_return_val_if_reached (0);
if (error)
@@ -1580,6 +1582,7 @@
g_return_if_fail (G_IS_SOCKET (socket));
+#if !defined(__redox__)
if (socket->priv->family == G_SOCKET_FAMILY_IPV4)
{
g_socket_set_option (socket, IPPROTO_IP, IP_TTL,
@@ -1593,6 +1596,7 @@
ttl, &error);
}
else
+#endif
g_return_if_reached ();
if (error)
@@ -1688,6 +1692,7 @@
g_return_val_if_fail (G_IS_SOCKET (socket), FALSE);
+#if !defined(__redox__)
if (socket->priv->family == G_SOCKET_FAMILY_IPV4)
{
g_socket_get_option (socket, IPPROTO_IP, IP_MULTICAST_LOOP,
@@ -1699,6 +1704,7 @@
&value, &error);
}
else
+#endif
g_return_val_if_reached (FALSE);
if (error)
@@ -1733,6 +1739,7 @@
loopback = !!loopback;
+#if !defined(__redox__)
if (socket->priv->family == G_SOCKET_FAMILY_IPV4)
{
g_socket_set_option (socket, IPPROTO_IP, IP_MULTICAST_LOOP,
@@ -1746,6 +1753,7 @@
loopback, &error);
}
else
+#endif
g_return_if_reached ();
if (error)
@@ -1777,6 +1785,7 @@
g_return_val_if_fail (G_IS_SOCKET (socket), 0);
+#if !defined(__redox__)
if (socket->priv->family == G_SOCKET_FAMILY_IPV4)
{
g_socket_get_option (socket, IPPROTO_IP, IP_MULTICAST_TTL,
@@ -1788,6 +1797,7 @@
&value, &error);
}
else
+#endif
g_return_val_if_reached (FALSE);
if (error)
@@ -1819,6 +1829,7 @@
g_return_if_fail (G_IS_SOCKET (socket));
+#if !defined(__redox__)
if (socket->priv->family == G_SOCKET_FAMILY_IPV4)
{
g_socket_set_option (socket, IPPROTO_IP, IP_MULTICAST_TTL,
@@ -1832,6 +1843,7 @@
ttl, &error);
}
else
+#endif
g_return_if_reached ();
if (error)
@@ -2191,6 +2203,7 @@
return FALSE;
native_addr = g_inet_address_to_bytes (group);
+#if !defined(__redox__)
if (g_inet_address_get_family (group) == G_SOCKET_FAMILY_IPV4)
{
#ifdef HAVE_IP_MREQN
@@ -2252,6 +2265,7 @@
&mc_req_ipv6, sizeof (mc_req_ipv6));
}
else
+#endif
g_return_val_if_reached (FALSE);
if (result < 0)
@@ -2912,6 +2926,7 @@
if (!check_timeout (socket, error))
return FALSE;
+#if !defined(__redox__)
if (!g_socket_get_option (socket, SOL_SOCKET, SO_ERROR, &value, error))
{
g_prefix_error (error, _("Unable to get pending error: "));
@@ -2929,6 +2944,7 @@
}
return FALSE;
}
+#endif
socket->priv->connected_read = TRUE;
socket->priv->connected_write = TRUE;
@@ -3001,7 +3017,7 @@
{
#ifdef G_OS_WIN32
if (ioctlsocket (socket->priv->fd, FIONREAD, &avail) < 0)
-#else
+#elif !defined(__redox__)
if (ioctl (socket->priv->fd, FIONREAD, &avail) < 0)
#endif
avail = -1;
@@ -4316,7 +4332,7 @@
#endif
}
-#ifndef G_OS_WIN32
+#if !defined(G_OS_WIN32) && !defined(__redox__)
/* Unfortunately these have to be macros rather than inline functions due to
* using alloca(). */
@@ -4673,7 +4689,9 @@
vectors = &one_vector;
}
-#ifndef G_OS_WIN32
+#if defined(__redox__)
+ return -1;
+#elif !defined(G_OS_WIN32)
{
GOutputMessage output_message;
struct msghdr msg;
@@ -5138,7 +5156,9 @@
vectors = &one_vector;
}
-#ifndef G_OS_WIN32
+#if defined(__redox__)
+ return -1;
+#elif !defined(G_OS_WIN32)
{
GInputMessage input_message;
struct msghdr msg;
@@ -5910,4 +5930,3 @@
#endif
return FALSE;
}
-
diff -ruwN source/gio/gthreadedresolver.c source-new/gio/gthreadedresolver.c
--- source/gio/gthreadedresolver.c 2018-12-23 06:10:41.000000000 -0700
+++ source-new/gio/gthreadedresolver.c 2019-01-13 10:47:33.441032953 -0700
@@ -289,6 +289,12 @@
gpointer task_data,
GCancellable *cancellable)
{
+#if defined(__redox__)
+ g_task_return_new_error (task,
+ G_RESOLVER_ERROR,
+ G_RESOLVER_ERROR_INTERNAL,
+ _("do_lookup_by_address not implemented on Redox"));
+#else
GInetAddress *address = task_data;
struct sockaddr_storage sockaddr;
gsize sockaddr_size;
@@ -319,6 +325,7 @@
gai_strerror (retval));
g_free (phys);
}
+#endif
}
static gchar *
@@ -369,7 +376,7 @@
}
-#if defined(G_OS_UNIX)
+#if defined(G_OS_UNIX) && !defined(__redox__)
#if defined __BIONIC__ && !defined BIND_4_COMPAT
/* Copy from bionic/libc/private/arpa_nameser_compat.h
@@ -920,6 +927,12 @@
gpointer task_data,
GCancellable *cancellable)
{
+#if defined(__redox__)
+ g_task_return_new_error (task,
+ G_RESOLVER_ERROR,
+ G_RESOLVER_ERROR_INTERNAL,
+ _("do_lookup_records not implemented on Redox"));
+#else
LookupRecordsData *lrd = task_data;
GList *records;
GError *error = NULL;
@@ -1005,6 +1018,7 @@
g_task_return_pointer (task, records, (GDestroyNotify) free_records);
else
g_task_return_error (task, error);
+#endif
}
static GList *
diff -ruwN source/gio/gunixfdmessage.c source-new/gio/gunixfdmessage.c
--- source/gio/gunixfdmessage.c 2018-12-23 06:10:41.000000000 -0700
+++ source-new/gio/gunixfdmessage.c 2019-01-05 14:22:53.097587821 -0700
@@ -53,6 +53,10 @@
#include "gnetworking.h"
#include "gioerror.h"
+#if defined(__redox__)
+#define SCM_RIGHTS 1
+#endif
+
struct _GUnixFDMessagePrivate
{
GUnixFDList *list;
diff -ruwN source/gio/gunixmounts.c source-new/gio/gunixmounts.c
--- source/gio/gunixmounts.c 2018-12-23 06:10:41.000000000 -0700
+++ source-new/gio/gunixmounts.c 2019-01-05 14:25:31.846709810 -0700
@@ -949,6 +949,21 @@
return return_list;
}
+/* Redox {{{2 */
+#elif defined(__redox__)
+
+static const char *
+get_mtab_monitor_file (void)
+{
+ return NULL;
+}
+
+static GList *
+_g_get_unix_mounts (void)
+{
+ return NULL;
+}
+
/* Common code {{{2 */
#else
#error No _g_get_unix_mounts() implementation for system
@@ -1465,7 +1480,7 @@
return g_list_reverse (return_list);
}
/* Interix {{{2 */
-#elif defined(__INTERIX)
+#elif defined(__INTERIX) || defined(__redox__)
static GList *
_g_get_unix_mount_points (void)
{
diff -ruwN source/glib/gthread-posix.c source-new/glib/gthread-posix.c
--- source/glib/gthread-posix.c 2018-12-23 06:10:41.000000000 -0700
+++ source-new/glib/gthread-posix.c 2019-01-05 11:40:57.454759289 -0700
@@ -660,6 +660,7 @@
#elif defined (HAVE_PTHREAD_CONDATTR_SETCLOCK) && defined (CLOCK_MONOTONIC)
if G_UNLIKELY ((status = pthread_condattr_setclock (&attr, CLOCK_MONOTONIC)) != 0)
g_thread_abort (status, "pthread_condattr_setclock");
+#elif defined(__redox__)
#else
#error Cannot support GCond on your platform.
#endif
@@ -896,7 +897,7 @@
if ((status = pthread_cond_timedwait_relative_np (g_cond_get_impl (cond), g_mutex_get_impl (mutex), &ts)) == 0)
return TRUE;
}
-#elif defined (HAVE_PTHREAD_CONDATTR_SETCLOCK) && defined (CLOCK_MONOTONIC)
+#elif (defined (HAVE_PTHREAD_CONDATTR_SETCLOCK) && defined (CLOCK_MONOTONIC)) || defined(__redox__)
/* This is the exact check we used during init to set the clock to
* monotonic, so if we're in this branch, timedwait() will already be
* expecting a monotonic clock.
GIT=https://gitlab.redox-os.org/redox-os/glium.git
GIT_UPSTREAM=https://github.com/glium/glium.git
BUILD_DEPENDS=(llvm mesa zlib)
BRANCH=redox
CARGOFLAGS="--example teapot"
function recipe_build {
sysroot="$(realpath ../sysroot)"
set -x
cargo rustc --target "$TARGET" --release ${CARGOFLAGS} \
-- \
-L "${sysroot}/lib" \
-C link-args="-Wl,-Bstatic $("${PKG_CONFIG}" --libs osmesa) -lz -lstdc++ -lc -lgcc"
set +x
skip=1
}
function recipe_stage {
dest="$(realpath $1)"
mkdir -pv "$dest/bin"
cp -v "target/${TARGET}/release/examples/teapot" "$dest/bin/glium"
skip=1
}
GIT=https://gitlab.redox-os.org/redox-os/glutin.git
GIT_UPSTREAM=https://github.com/tomaka/glutin.git
BUILD_DEPENDS=(llvm mesa zlib)
BRANCH=redox
CARGOFLAGS="--example window"
function recipe_build {
sysroot="$(realpath ../sysroot)"
set -x
cargo rustc --target "$TARGET" --release ${CARGOFLAGS} \
-- \
-L "${sysroot}/lib" \
-C link-args="-Wl,-Bstatic $("${PKG_CONFIG}" --libs osmesa) -lz -lstdc++ -lc -lgcc"
set +x
skip=1
}
function recipe_stage {
dest="$(realpath $1)"
mkdir -pv "$dest/bin"
cp -v "target/${TARGET}/release/examples/window" "$dest/bin/glutin"
skip=1
}
GIT=https://gitlab.redox-os.org/redox-os/binutils-gdb.git
BRANCH=redox
GIT_UPSTREAM=git://sourceware.org/git/binutils-gdb.git
BUILD_DEPENDS=(expat libgmp)
function recipe_version {
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
skip=1
}
function recipe_update {
echo "skipping update"
skip=1
}
function recipe_build {
sysroot="$(realpath ../sysroot)"
mkdir -p "$sysroot/usr"
ln -sf "$sysroot/include" "$sysroot/usr/include"
ln -sf "$sysroot/lib" "$sysroot/usr/lib"
export CPPFLAGS="-I$sysroot/include -pie -fPIC -g"
export LDFLAGS="-L$sysroot/lib --static -g"
./configure \
--build=${BUILD} \
--host=${HOST} \
--target=${HOST} \
--prefix=/ \
--with-sysroot=/ \
--with-build-sysroot="$sysroot" \
--enable-gdb \
--with-expat \
--with-multilib \
--with-interwork \
--enable-targets=x86_64-unknown-redox \
--disable-nls \
--disable-werror
"$REDOX_MAKE" -j"$($NPROC)"
skip=1
}
function recipe_test {
echo "skipping test"
skip=1
}
function recipe_clean {
"$REDOX_MAKE" clean
skip=1
}
function recipe_stage {
dest="$(realpath $1)"
"$REDOX_MAKE" DESTDIR="$dest" install
find "$dest/bin" -exec $STRIP {} ';' 2> /dev/null
skip=1
}
diff -ru make-4.2/config/config.sub make-4.2-new/config/config.sub
--- make-4.2/config/config.sub 2018-11-16 21:11:15.392794814 -0700
+++ make-4.2-new/config/config.sub 2018-11-16 21:11:37.922637742 -0700
@@ -1376,7 +1376,7 @@
-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* | -plan9* \
+ | -sym* | -kopensolaris* | -plan9* | -redox* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
| -aos* | -aros* | -cloudabi* | -sortix* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
diff -ru make-4.2/getopt1.c make-4.2-new/getopt1.c
--- make-4.2/getopt1.c 2018-11-16 21:11:15.408796156 -0700
+++ make-4.2-new/getopt1.c 2018-11-16 21:11:37.922637742 -0700
@@ -48,6 +48,8 @@
#endif
#endif
+#define ELIDE_CODE
+
#ifndef ELIDE_CODE
diff -ru make-4.2/getopt.c make-4.2-new/getopt.c
--- make-4.2/getopt.c 2018-11-16 21:11:15.384794143 -0700
+++ make-4.2-new/getopt.c 2018-11-16 21:11:37.922637742 -0700
@@ -56,6 +56,8 @@
# endif
#endif
+#define ELIDE_CODE
+
#ifndef ELIDE_CODE
diff -ru make-4.2/glob/fnmatch.c make-4.2-new/glob/fnmatch.c
--- make-4.2/glob/fnmatch.c 2018-11-16 21:11:15.384794143 -0700
+++ make-4.2-new/glob/fnmatch.c 2018-11-16 21:11:53.311846128 -0700
@@ -477,6 +477,7 @@
}
+/*
int
fnmatch (pattern, string, flags)
const char *pattern;
@@ -485,5 +486,6 @@
{
return internal_fnmatch (pattern, string, flags & FNM_PERIOD, flags);
}
+*/
#endif /* _LIBC or not __GNU_LIBRARY__. */
diff -ru make-4.2/glob/glob.c make-4.2-new/glob/glob.c
--- make-4.2/glob/glob.c 2018-11-16 21:11:15.384794143 -0700
+++ make-4.2-new/glob/glob.c 2018-11-16 21:11:37.926638062 -0700
@@ -625,9 +625,9 @@
#else
const char *home_dir = getenv ("HOME");
#endif
-# ifdef _AMIGA
+# if 1
if (home_dir == NULL || home_dir[0] == '\0')
- home_dir = "SYS:";
+ home_dir = "/home/user";
# else
# ifdef WINDOWS32
if (home_dir == NULL || home_dir[0] == '\0')
@@ -717,7 +717,7 @@
dirname = newp;
}
}
-# if !defined _AMIGA && !defined WINDOWS32 && !defined VMS
+# if 0
else
{
char *end_name = strchr (dirname, '/');
diff -ru make-4.2/job.c make-4.2-new/job.c
--- make-4.2/job.c 2018-11-16 21:11:15.380793809 -0700
+++ make-4.2-new/job.c 2018-11-16 21:11:37.926638062 -0700
@@ -1038,7 +1038,7 @@
void
block_sigs (void)
{
-#ifdef POSIX
+#if 0
(void) sigprocmask (SIG_BLOCK, &fatal_signal_set, (sigset_t *) 0);
#else
# ifdef HAVE_SIGSETMASK
@@ -1051,9 +1051,11 @@
void
unblock_sigs (void)
{
+/*
sigset_t empty;
sigemptyset (&empty);
sigprocmask (SIG_SETMASK, &empty, (sigset_t *) 0);
+*/
}
#endif
diff -ru make-4.2/read.c make-4.2-new/read.c
--- make-4.2/read.c 2018-11-16 21:11:15.384794143 -0700
+++ make-4.2-new/read.c 2018-11-16 21:11:37.926638062 -0700
@@ -2937,7 +2937,7 @@
free (home_dir);
home_dir = getenv ("HOME");
}
-# if !defined(_AMIGA) && !defined(WINDOWS32)
+# if 0
if (home_dir == 0 || home_dir[0] == '\0')
{
char *logname = getlogin ();
@@ -2958,7 +2958,7 @@
return new;
}
}
-# if !defined(_AMIGA) && !defined(WINDOWS32)
+# if 0
else
{
struct passwd *pwent;
VERSION=4.2.1
TAR=https://ftp.gnu.org/gnu/make/make-$VERSION.tar.gz
function recipe_version {
echo "$VERSION"
skip=1
}
function recipe_update {
echo "skipping update"
skip=1
}
function recipe_build {
export CFLAGS="-DPOSIX -DNO_ARCHIVES -DNO_OUTPUT_SYNC"
export LDFLAGS="-static"
./configure \
--build=${BUILD} \
--host=${HOST} \
--prefix=/ \
--without-guile
"$REDOX_MAKE" -j"$($NPROC)"
skip=1
}
function recipe_test {
echo "skipping test"
skip=1
}
function recipe_clean {
"$REDOX_MAKE" clean
skip=1
}
function recipe_stage {
dest="$(realpath $1)"
"$REDOX_MAKE" DESTDIR="$dest" install
skip=1
}