...
 
Commits (312)
[target.aarch64-unknown-redox]
linker = "aarch64-unknown-redox-gcc"
rustflags = []
[target.x86_64-unknown-redox]
linker = "x86_64-unknown-redox-gcc"
rustflags = []
build
repo
source
source-new
source.tar
stage
stage.sig
......
[submodule "docgen"]
path = docgen
url = https://gitlab.redox-os.org/redox-os/docgen.git
[submodule "pkgutils"]
path = pkgutils
url = https://github.com/redox-os/pkgutils.git
url = https://gitlab.redox-os.org/redox-os/pkgutils.git
branch = master
[submodule "docgen"]
path = docgen
url = https://github.com/redox-os/docgen.git
......@@ -3,81 +3,5 @@ A collection of package recipes for Redox.
[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)
## Setup
### Ubuntu and other Debian based systems
To install the toolchain, run the following commands:
```bash
# Get the Redox OS APT key
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys AA12E97F0881517F
# Install the APT repository
sudo add-apt-repository 'deb https://static.redox-os.org/toolchain/apt /'
# Update your package lists
sudo apt update
# Install the cross compiler
sudo apt install x86-64-unknown-redox-gcc
```
### Arch Linux
To install the toolchain, run the following commands:
```bash
# Clone libc
git clone --recursive git@github.com:redox-os/libc
# Go to the packages
cd libc/packages/arch
# Start with binutils
cd binutils
makepkg -si
# Then autoconf
cd ../autoconf
makepkg -si
# Then gcc-freestanding
cd ../gcc-freestanding
makepkg -si
# Then newlib
cd ../newlib
makepkg -si
# Finally gcc
cd ../gcc
makepkg -si
```
### Gentoo Linux
```bash
# Clone libc
git clone --recursive git@github.com:redox-os/libc
# Install needed tools
emerge -a =sys-devel/autoconf-2.64 =sys-devel/automake-1.11.6-r2
# Run the setup script
cd libc
PREFIX=<your preferred toolchain prefix> ./setup.sh all
# Add the tools to your path
export PATH=$PATH:<toolchain prefix>/bin
```
### Other distros/Mac OS X
To install the toolchain, run the following commands:
```bash
# Clone libc
git clone --recursive git@github.com:redox-os/libc
# Run the setup script
cd libc
./setup.sh all
# Add the tools to your path
export PATH=$PATH:/path/to/libc/build/prefix/bin
```
In order for this repository to be useful, it must be set up with an environment
from the [Redox repository](https://gitlab.redox-os.org/redox-os/redox).
[dependencies.std]
[target.aarch64-unknown-redox.dependencies.std]
features = ["panic_unwind"]
[target.x86_64-unknown-redox.dependencies.std]
features = ["panic_unwind", "backtrace"]
#[dependencies.test]
......
This diff is collapsed.
......@@ -4,4 +4,4 @@ export PKG_CONFIG_PATH=
export PKG_CONFIG_SYSROOT_DIR="${COOKBOOK_RECIPE}/sysroot"
export PKG_CONFIG_LIBDIR="${PKG_CONFIG_SYSROOT_DIR}/lib/pkgconfig"
exec pkg-config "$@"
exec pkg-config --static "$@"
......@@ -2,9 +2,12 @@
set -e
# Configuration
ARCH=x86_64
export TARGET=$ARCH-unknown-redox
HOST=$TARGET
if [ -z "${TARGET}" ]
then
export TARGET=x86_64-unknown-redox
fi
ARCH="${TARGET%%-*}"
HOST="$TARGET"
# Automatic variables
ROOT="$(cd `dirname "$0"` && pwd)"
......@@ -12,19 +15,23 @@ REPO="$ROOT/repo/$TARGET"
export PATH="${ROOT}/bin:$PATH"
export XARGO_HOME="${ROOT}/xargo"
export AR="${HOST}-ar"
export AR="${HOST}-gcc-ar"
export AS="${HOST}-as"
export CC="${HOST}-gcc"
export CXX="${HOST}-g++"
export LD="${HOST}-ld"
export NM="${HOST}-nm"
export NM="${HOST}-gcc-nm"
export OBJCOPY="${HOST}-objcopy"
export OBJDUMP="${HOST}-objdump"
#export PKG_CONFIG="${HOST}-pkg-config"
export RANLIB="${HOST}-ranlib"
export PKG_CONFIG="${HOST}-pkg-config"
export RANLIB="${HOST}-gcc-ranlib"
export READELF="${HOST}-readelf"
export STRIP="${HOST}-strip"
BUILD="$(cc -dumpmachine)"
export PKG_CONFIG_FOR_BUILD="pkg-config"
if [[ "$OSTYPE" == "darwin"* ]]; then
# GNU find
FIND="gfind";
......
......@@ -6,8 +6,10 @@ source config.sh
# Variables to be overriden by recipes
export BINDIR=bin
export CARGOBUILD=rustc
export CARGOFLAGS=
export DEBUG=
export PREPARE_COPY=1
if [ ! "$(uname -s)" = "Redox" ]
then
......@@ -84,6 +86,11 @@ function op {
wget "$TAR" -O source.tar
fi
if [ -n "$TAR_SHA256" ]
then
sha256sum -c <<< "${TAR_SHA256} source.tar"
fi
if [ ! -d source ]
then
mkdir source
......@@ -250,7 +257,12 @@ function op {
fi
rm -rf build
cp -rp source build
if [ "$PREPARE_COPY" -eq "0" ]
then
mkdir build
else
cp -rp source build
fi
for patch in *.patch
do
......@@ -300,7 +312,7 @@ function op {
if [ "$skip" -eq "0" ]
then
cp -p "$ROOT/Xargo.toml" "Xargo.toml"
xargo build --target "$TARGET" $release_flag $CARGOFLAGS
xargo "$CARGOBUILD" --target "$TARGET" $release_flag $CARGOFLAGS
fi
popd > /dev/null
;;
......@@ -341,15 +353,16 @@ function op {
stage)
op $1 unstage
mkdir -p stage
stage="$(realpath stage)"
pushd build > /dev/null
skip=0
if [ "$(type -t recipe_stage)" = "function" ]
then
recipe_stage ../stage
recipe_stage "$stage"
fi
if [ "$skip" -eq "0" ]
then
#TODO xargo install --root "../stage" $CARGOFLAGS
#TODO xargo install --root "$stage" $CARGOFLAGS
if [ "$DEBUG" == 1 ]
then
build=debug
......@@ -358,18 +371,30 @@ function op {
fi
bins="$(find target/$TARGET/$build/ -maxdepth 1 -type f ! -name '*.*')"
if [ -z "$bins" ]
then
example=true
bins="$(find target/$TARGET/$build/examples/ -maxdepth 1 -type f ! -name '*.*' ! -name '*-*' \
2> /dev/null || true)"
fi
if [ -n "$bins" ]
then
mkdir -p "../stage/$BINDIR"
if [ -n "$example" ]
then
echo "$(tput bold)Note$(tput sgr0): No binaries detected, using example binaries"
fi
mkdir -p "$stage/$BINDIR"
for bin in $bins
do
if [ "$DEBUG" == 1 ]
then
cp -v "$bin" "../stage/$BINDIR/$(basename $bin)"
cp -v "$bin" "$stage/$BINDIR/$(basename $bin)"
else
strip -v "$bin" -o "../stage/$BINDIR/$(basename $bin)"
"${STRIP}" -v "$bin" -o "$stage/$BINDIR/$(basename $bin)"
fi
done
else
echo "$(tput bold)Warning$(tput sgr0): Recipe does not have any binaries" >&2
fi
docgen ../source ../stage/ref
......
Subproject commit 67119659a484dba78eb29c1081afc8f8ea7014c3
Subproject commit c9525c4761d814b86af061e4e96cd394da7deaa2
Subproject commit 7c9f14af4391aed4fb8ab09bc2320ec962aba9fe
Subproject commit 4908c5e486afca3371b20245b50a21a9eeeef084
GIT=https://github.com/redox-os/acid.git
GIT=https://gitlab.redox-os.org/redox-os/acid.git
GIT=https://gitlab.redox-os.org/redox-os/audiod.git
......@@ -13,8 +13,8 @@ function recipe_update {
function recipe_build {
wget -O build-aux/config.sub http://git.savannah.gnu.org/cgit/config.git/plain/config.sub
./configure --host=${HOST} --prefix=''
make
./configure --build=${BUILD} --host=${HOST} --prefix=''
make -j"$(nproc)"
skip=1
}
......
......@@ -15,9 +15,9 @@ function recipe_build {
wget -O lib/config.sub http://git.savannah.gnu.org/cgit/config.git/plain/config.sub
sed -i 's|.*/doc/help2man.*|\&\& true|' Makefile.in
sed -i 's|install-info-am install-man|install-info-am|' Makefile.in
./configure --host=${HOST} --prefix=''
make
./configure --build=${BUILD} --host=${HOST} --prefix=''
make -j"$(nproc)"
skip=1
}
......
diff -ru source/general.c source-new/general.c
--- source/general.c 2016-08-11 08:16:56.000000000 -0700
+++ source-new/general.c 2017-08-07 19:55:47.437464359 -0700
@@ -476,6 +476,7 @@
void
check_dev_tty ()
{
+#if 0
int tty_fd;
char *tty;
@@ -490,6 +491,7 @@
}
if (tty_fd >= 0)
close (tty_fd);
+#endif
}
/* Return 1 if PATH1 and PATH2 are the same file. This is kind of
diff -ru source/include/posixwait.h source-new/include/posixwait.h
--- source/include/posixwait.h 2008-08-12 07:03:03.000000000 -0700
+++ source-new/include/posixwait.h 2017-08-07 18:37:29.854754332 -0700
@@ -34,7 +34,7 @@
/* How to get the status of a job. For Posix, this is just an
int, but for other systems we have to crack the union wait. */
-#if !defined (_POSIX_VERSION)
+#if 0
typedef union wait WAIT;
# define WSTATUS(t) (t.w_status)
#else /* _POSIX_VERSION */
@@ -50,7 +50,7 @@
/* More Posix P1003.1 definitions. In the POSIX versions, the parameter is
passed as an `int', in the non-POSIX version, as `union wait'. */
-#if defined (_POSIX_VERSION)
+#if 1
# if !defined (WSTOPSIG)
# define WSTOPSIG(s) ((s) >> 8)
diff -ru source/lib/sh/getcwd.c source-new/lib/sh/getcwd.c
--- source/lib/sh/getcwd.c 2012-03-10 07:48:50.000000000 -0800
+++ source-new/lib/sh/getcwd.c 2017-08-07 19:53:52.379759811 -0700
@@ -20,7 +20,7 @@
#include <config.h>
-#if !defined (HAVE_GETCWD)
+#if 0
#if !defined (__GNUC__) && !defined (HAVE_ALLOCA_H) && defined (_AIX)
#pragma alloca
diff -ru source/lib/sh/oslib.c source-new/lib/sh/oslib.c
--- source/lib/sh/oslib.c 2013-10-14 06:12:57.000000000 -0700
+++ source-new/lib/sh/oslib.c 2017-08-07 19:10:21.375838312 -0700
@@ -236,10 +236,10 @@
#if !defined (HAVE_MKFIFO) && defined (PROCESS_SUBSTITUTION)
int
mkfifo (path, mode)
- char *path;
- int mode;
+ const char *path;
+ mode_t mode;
{
-#if defined (S_IFIFO)
+#if 0
return (mknod (path, (mode | S_IFIFO), 0));
#else /* !S_IFIFO */
return (-1);
diff -ru source/lib/sh/winsize.c source-new/lib/sh/winsize.c
--- source/lib/sh/winsize.c 2016-01-25 10:24:45.000000000 -0800
+++ source-new/lib/sh/winsize.c 2017-08-07 19:14:41.571576687 -0700
@@ -28,7 +28,6 @@
# include <unistd.h>
#endif
-#include <sys/ioctl.h>
/* Try to find the definitions of `struct winsize' and TIOGCWINSZ */
diff -ru source/sig.c source-new/sig.c
--- source/sig.c 2016-02-11 12:02:45.000000000 -0800
+++ source-new/sig.c 2017-08-07 19:56:13.637701224 -0700
@@ -684,7 +684,9 @@
/* Perform OPERATION on NEWSET, perhaps leaving information in OLDSET. */
sigprocmask (operation, newset, oldset)
- int operation, *newset, *oldset;
+ int operation;
+ const sigset_t *newset;
+ sigset_t *oldset;
{
int old, new;
@@ -696,11 +698,11 @@
switch (operation)
{
case SIG_BLOCK:
- old = sigblock (new);
+ //old = sigblock (new);
break;
case SIG_SETMASK:
- old = sigsetmask (new);
+ //old = sigsetmask (new);
break;
default:
diff -ru source/general.c source-new/general.c
--- source/general.c 2016-08-11 08:16:56.000000000 -0700
+++ source-new/general.c 2017-08-07 20:22:31.581566466 -0700
@@ -909,10 +909,10 @@
`:'. If I is 0, then the path has a leading colon. Trailing colons
are handled OK by the `else' part of the if statement; an empty
string is returned in that case. */
- if (i && string[i] == ':')
+ if (i && string[i] == ';')
i++;
- for (start = i; string[i] && string[i] != ':'; i++)
+ for (start = i; string[i] && string[i] != ';'; i++)
;
*p_index = i;
VERSION=4.4
TAR=http://ftp.gnu.org/gnu/bash/bash-$VERSION.tar.gz
BUILD_DEPENDS=(gettext)
function recipe_version {
echo "$VERSION"
......@@ -12,9 +13,17 @@ function recipe_update {
}
function recipe_build {
sysroot="$PWD/../sysroot"
export LDFLAGS="-L$sysroot/lib"
export CPPFLAGS="-I$sysroot/include"
wget -O support/config.sub http://git.savannah.gnu.org/cgit/config.git/plain/config.sub
./configure --host=${HOST} --prefix=/ --disable-readline
make
./configure \
--build=${BUILD} \
--host=${HOST} \
--prefix=/ \
--disable-readline \
bash_cv_getenv_redef=no
make # -j"$(nproc)"
skip=1
}
......
This diff is collapsed.
GIT=https://github.com/redox-os/binutils.git
GIT=https://gitlab.redox-os.org/redox-os/binutils.git
GIT=https://gitlab.redox-os.org/redox-os/bootloader.git
function recipe_version {
echo "0.1.0"
skip=1
}
function recipe_update {
echo "skipping update"
skip=1
}
function recipe_build {
nasm -f bin -o bootloader -D "ARCH_${ARCH}" -i"${ARCH}/" "${ARCH}/disk.asm"
skip=1
}
function recipe_test {
echo "skipping test"
skip=1
}
function recipe_clean {
make clean
skip=1
}
function recipe_stage {
dest="$(realpath $1)"
cp -v bootloader "$dest"
skip=1
}
--- source/make-ca.sh 2018-08-25 17:38:12.512463896 +0200
+++ build/make-ca.sh 2018-09-23 14:45:12.492919202 +0200
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Begin /usr/sbin/make-ca.sh
#
# Script to create OpenSSL certs directory, GnuTLS certificate bundle, NSS
@@ -28,9 +28,9 @@
CERTDATA="certdata.txt"
PKIDIR="/etc/pki"
SSLDIR="/etc/ssl"
-CERTUTIL="/usr/bin/certutil"
-KEYTOOL="/opt/jdk/bin/keytool"
-OPENSSL="/usr/bin/openssl"
+CERTUTIL="certutil"
+KEYTOOL="keytool"
+OPENSSL="openssl"
ANCHORDIR="${PKIDIR}/anchors"
CABUNDLE="${SSLDIR}/ca-bundle.crt"
CERTDIR="${SSLDIR}/certs"
@@ -723,7 +723,7 @@
unset cert
fi
-/usr/bin/c_rehash "${DESTDIR}${CERTDIR}" 2>&1>/dev/null
+c_rehash "${DESTDIR}${CERTDIR}" 2>&1>/dev/null
popd > /dev/null
# Clean up the mess
VERSION="1.16.0"
TAR=https://www.cairographics.org/releases/cairo-$VERSION.tar.xz
BUILD_DEPENDS=(zlib pixman freetype libpng)
function recipe_version {
echo "$VERSION"
skip=1
}
function recipe_update {
echo "skipping update"
skip=1
}
function recipe_build {
#Workaround to disable the not redox compatible tests
printf "all:\n\ninstall:\n" > ./test/Makefile.in
printf "all:\n\ninstall:\n" > ./perf/Makefile.in
sysroot="$(realpath ../sysroot)"
export LDFLAGS="-L$sysroot/lib"
export CPPFLAGS="-I$sysroot/include"
CFLAGS="-DCAIRO_NO_MUTEX=1" ./configure --build=${BUILD} --host=${HOST} --prefix=/ --enable-xlib=no --enable-script=no --enable-interpreter=no
make
skip=1
}
function recipe_test {
echo "skipping test"
skip=1
}
function recipe_clean {
make clean
skip=1
}
function recipe_stage {
echo "skipping stage"
dest="$(realpath $1)"
make DESTDIR="$dest" install
skip=1
}
#include <stdint.h>
#include <math.h>
#include <stdlib.h>
#include <cairo/cairo.h>
#include <orbital.h>
#ifndef M_PI
#define M_PI 3.14159265
#endif
static int width = 800;
static int height = 600;
static void
travel_path (cairo_t *cr)
{
cairo_pattern_t *pat;
pat = cairo_pattern_create_linear (0.0, 0.0, 0.0, 256.0);
cairo_pattern_add_color_stop_rgba (pat, 1, 0, 0, 0, 1);
cairo_pattern_add_color_stop_rgba (pat, 0, 1, 1, 1, 1);
cairo_rectangle (cr, 0, 0, 256, 256);
cairo_set_source (cr, pat);
cairo_fill (cr);
cairo_pattern_destroy (pat);
pat = cairo_pattern_create_radial (115.2, 102.4, 25.6,
102.4, 102.4, 128.0);
cairo_pattern_add_color_stop_rgba (pat, 0, 1, 1, 1, 1);
cairo_pattern_add_color_stop_rgba (pat, 1, 0, 0, 0, 1);
cairo_set_source (cr, pat);
cairo_arc (cr, 128.0, 128.0, 76.8, 0, 2 * M_PI);
cairo_fill (cr);
cairo_pattern_destroy (pat);
double x = 305.6, /* parameters like cairo_rectangle */
y = 25.6,
width = 204.8,
height = 204.8,
aspect = 1.0, /* aspect ratio */
corner_radius = height / 10.0; /* and corner curvature radius */
double radius = corner_radius / aspect;
double degrees = M_PI / 180.0;
cairo_new_sub_path (cr);
cairo_arc (cr, x + width - radius, y + radius, radius, -90 * degrees, 0 * degrees);
cairo_arc (cr, x + width - radius, y + height - radius, radius, 0 * degrees, 90 * degrees);
cairo_arc (cr, x + radius, y + height - radius, radius, 90 * degrees, 180 * degrees);
cairo_arc (cr, x + radius, y + radius, radius, 180 * degrees, 270 * degrees);
cairo_close_path (cr);
cairo_set_source_rgb (cr, 0.5, 0.5, 1);
cairo_fill_preserve (cr);
cairo_set_source_rgba (cr, 0.5, 0, 0, 0.5);
cairo_set_line_width (cr, 10.0);
cairo_stroke (cr);
double xc = 128.0;
double yc = 128.0;
radius = 100.0;
double angle1 = 45.0 * (M_PI/180.0); /* angles are specified */
double angle2 = 180.0 * (M_PI/180.0); /* in radians */
cairo_set_line_width (cr, 10.0);
cairo_arc (cr, xc, yc, radius, angle1, angle2);
cairo_stroke (cr);
/* draw helping lines */
cairo_set_source_rgba (cr, 1, 0.2, 0.2, 0.6);
cairo_set_line_width (cr, 6.0);
cairo_arc (cr, xc, yc, 10.0, 0, 2*M_PI);
cairo_fill (cr);
cairo_arc (cr, xc, yc, radius, angle1, angle1);
cairo_line_to (cr, xc, yc);
cairo_arc (cr, xc, yc, radius, angle2, angle2);
cairo_line_to (cr, xc, yc);
cairo_stroke (cr);
}
static void
draw (cairo_surface_t *surface)
{
cairo_t *cr;
cr = cairo_create (surface);
travel_path (cr);
cairo_destroy (cr);
}
int
main(int argc, char *argv[])
{
void * window = orb_window_new(-1, -1, width, height, "CairoDemo");
//Cairo
uint32_t * frame_data = orb_window_data(window);
cairo_surface_t *surface = cairo_image_surface_create_for_data((uint8_t*) frame_data, CAIRO_FORMAT_ARGB32, width, height, cairo_format_stride_for_width(CAIRO_FORMAT_ARGB32, width));
cairo_create(surface);
draw (surface);
orb_window_sync(window);
char running = 1;
while (running) {
void * event_iter = orb_window_events(window);
OrbEventOption event_option;
do {
event_option = orb_events_next(event_iter);
switch (event_option.tag) {
case OrbEventOption_Quit:
running = 0;
break;
default:
break;
}
} while (running && event_option.tag != OrbEventOption_None);
orb_events_destroy(event_iter);
}
orb_window_destroy(window);
return 0; /* ANSI C requires main to return int. */
}
BUILD_DEPENDS=(liborbital cairo pixman zlib libpng freetype)
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 cairodemo.c source
}
function recipe_build {
sysroot="$(realpath ../sysroot)"
export LDFLAGS="-L$sysroot/lib"
export CPPFLAGS="-I$sysroot/include"
set -x
"${CXX}" -I "$sysroot/include" -L "$sysroot/lib" cairodemo.c -o cairodemo -lorbital -lcairo -lpixman-1 -lfreetype -lpng -lz
set +x
skip=1
}
function recipe_test {
echo "skipping test"
skip=1
}
function recipe_clean {
make clean
skip=1
}
function recipe_stage {
dest="$(realpath $1)"
mkdir -pv "$dest/bin"
cp -v "cairodemo" "$dest/bin/cairodemo"
skip=1
}
GIT=https://github.com/redox-os/cargo.git
GIT=https://gitlab.redox-os.org/redox-os/cargo.git
GIT_UPSTREAM=https://github.com/rust-lang/cargo.git
BRANCH=redox
BUILD_DEPENDS=(openssl zlib)
function recipe_build {
export DEP_OPENSSL_ROOT="$PWD/../sysroot"
export OPENSSL_DIR="$PWD/../sysroot"
export DEP_Z_ROOT="$PWD/../sysroot"
sysroot="$(realpath ../sysroot)"
export DEP_OPENSSL_ROOT="$sysroot"
export OPENSSL_DIR="$sysroot"
export DEP_Z_ROOT="$sysroot"
}
GIT=https://github.com/redox-os/cleye.git
GIT=https://gitlab.redox-os.org/redox-os/cleye.git
GIT_UPSTREAM=https://github.com/evanandrewrose/cleye.git
diff -ru source/cmatrix.c source-new/cmatrix.c
--- source/cmatrix.c 2017-11-18 13:21:42.992870796 -0800
+++ source-new/cmatrix.c 2017-11-18 13:20:45.446407288 -0800
@@ -37,7 +37,7 @@
#ifdef HAVE_NCURSES_H
#include <ncurses.h>
#else
-#include <curses.h>
+#include <ncurses/curses.h>
#endif
#ifdef HAVE_SYS_IOCTL_H
@@ -215,47 +215,49 @@
void handle_sigwinch(int s) {
- char *tty = NULL;
- int fd = 0;
- int result = 0;
- struct winsize win;
-
- tty = ttyname(0);
- if (!tty) {
- return;
- }
- fd = open(tty, O_RDWR);
- if (fd == -1) {
- return;
- }
- result = ioctl(fd, TIOCGWINSZ, &win);
- if (result == -1) {
- return;
- }
-
- COLS = win.ws_col;
- LINES = win.ws_row;
-
- if(LINES <10){
- LINES = 10;
- }
- if(COLS <10){
- COLS = 10;
- }
-
-#ifdef HAVE_RESIZETERM
- resizeterm(LINES, COLS);
-#ifdef HAVE_WRESIZE
- if (wresize(stdscr, LINES, COLS) == ERR) {
- c_die("Cannot resize window!");
- }
-#endif /* HAVE_WRESIZE */
-#endif /* HAVE_RESIZETERM */
-
- var_init();
- /* Do these because width may have changed... */
- clear();
- refresh();
+/*
+ * char *tty = NULL;
+ * int fd = 0;
+ * int result = 0;
+ * struct winsize win;
+ *
+ * tty = ttyname(0);
+ * if (!tty) {
+ * return;
+ * }
+ * fd = open(tty, O_RDWR);
+ * if (fd == -1) {
+ * return;
+ * }
+ * result = ioctl(fd, TIOCGWINSZ, &win);
+ * if (result == -1) {
+ * return;
+ * }
+ *
+ * COLS = win.ws_col;
+ * LINES = win.ws_row;
+ *
+ * if(LINES <10){
+ * LINES = 10;
+ * }
+ * if(COLS <10){
+ * COLS = 10;
+ * }
+ *
+ *#ifdef HAVE_RESIZETERM
+ * resizeterm(LINES, COLS);
+ *#ifdef HAVE_WRESIZE
+ * if (wresize(stdscr, LINES, COLS) == ERR) {
+ * c_die("Cannot resize window!");
+ * }
+ *#endif [> HAVE_WRESIZE <]
+ *#endif [> HAVE_RESIZETERM <]
+ *
+ * var_init();
+ * [> Do these because width may have changed... <]
+ * clear();
+ * refresh();
+ */
}
......@@ -13,11 +13,12 @@ function recipe_update {
}
function recipe_build {
sysroot="${PWD}/../sysroot"
sysroot="$(realpath ../sysroot)"
export LDFLAGS="-L$sysroot/lib"
export CPPFLAGS="-I$sysroot/include"
./configure --host=${HOST} --prefix=/ --without-fonts
make
export CPPFLAGS="-I$sysroot/include -I$sysroot/include/ncurses"
autoreconf -i
./configure --build=${BUILD} --host=${HOST} --prefix=/ --without-fonts
make -j"$(nproc)"
skip=1
}
......@@ -34,6 +35,5 @@ function recipe_clean {
function recipe_stage {
dest="$(realpath $1)"
make DESTDIR="$dest" install
rm -rf $1/share/man
skip=1
}
GIT=https://github.com/redox-os/contain.git
GIT=https://gitlab.redox-os.org/redox-os/contain.git
GIT=https://github.com/redox-os/coreutils.git
GIT=https://gitlab.redox-os.org/redox-os/coreutils.git
GIT=https://gitlab.redox-os.org/redox-os/cpal.git
GIT_UPSTREAM=https://github.com/tomaka/cpal.git
BRANCH=redox
CARGOFLAGS="--example beep"
function recipe_stage {
dest="$(realpath $1)"
mkdir -pv "$dest/bin"
cp -v "target/${TARGET}/release/examples/beep" "$dest/bin/cpal"
skip=1
}
diff -ru source/lib/nonblock.c source-new/lib/nonblock.c
--- source/lib/nonblock.c 2017-08-07 15:42:29.000000000 -0700
+++ source-new/lib/nonblock.c 2017-08-17 10:57:30.123497389 -0700
@@ -47,7 +47,7 @@
int curlx_nonblock(curl_socket_t sockfd, /* operate on this */
int nonblock /* TRUE or FALSE */)
{
-#if defined(USE_BLOCKING_SOCKETS)
+#if 1
return 0; /* returns success */
commit 3cb4bb6b5fb8a936cb69e2e9ea6a4e692122abb9
Author: Jakub Zakrzewski <slither.jz@gmail.com>
Date: Tue Aug 15 13:21:33 2017 -0400
curl-confopts.m4: fix --disable-threaded-resolver
Closes https://github.com/curl/curl/issues/1784
diff --git a/m4/curl-confopts.m4 b/m4/curl-confopts.m4
index d77a884d5..6dcd0f1a6 100644
--- a/m4/curl-confopts.m4
+++ b/m4/curl-confopts.m4
@@ -37,14 +37,14 @@ AC_HELP_STRING([--enable-threaded-resolver],[Enable threaded resolver])
AC_HELP_STRING([--disable-threaded-resolver],[Disable threaded resolver]),
OPT_THRES=$enableval)
case "$OPT_THRES" in
- *)
- dnl configure option not specified
- want_thres="yes"
- ;;
no)
dnl --disable-threaded-resolver option used
want_thres="no"
;;
+ *)
+ dnl configure option not specified
+ want_thres="yes"
+ ;;
esac
AC_MSG_RESULT([$want_thres])
])
TAR=https://curl.haxx.se/download/curl-7.55.1.tar.gz
BRANCH=redox
VERSION="7.62.0"
#TAR=https://curl.haxx.se/download/curl-$VERSION.tar.gz
GIT=https://gitlab.redox-os.org/redox-os/curl.git
GIT_BRANCH=redox
BUILD_DEPENDS=(openssl zlib)
DEPENDS="ca-certificates"
function recipe_version {
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
echo "$VERSION"
skip=1
}
......@@ -14,10 +16,21 @@ function recipe_update {
}
function recipe_build {
sysroot="$(realpath ../sysroot)"
wget -O config.sub http://git.savannah.gnu.org/cgit/config.git/plain/config.sub
autoreconf -i
./configure --prefix=/ --host=${HOST} --disable-tftp --disable-ftp --disable-ntlm-wb --disable-threaded-resolver --with-zlib="$PWD/../sysroot" --with-ssl="$PWD/../sysroot" --with-ca-path=/ssl/certs
make
./configure \
--prefix=/ \
--build=${BUILD} \
--host=${HOST} \
--disable-tftp \
--disable-ftp \
--disable-ntlm-wb \
--disable-threaded-resolver \
--with-zlib="$sysroot" \
--with-ssl="$sysroot" \
--with-ca-path=/ssl/certs
make -j"$(nproc)"
skip=1
}
......@@ -34,6 +47,6 @@ function recipe_clean {
function recipe_stage {
dest="$(realpath $1)"
make DESTDIR="$dest" install
rm -rf "$1"/share
rm -f "$dest/lib/"*.la
skip=1
}
GIT=https://github.com/redox-os/dash.git
GIT=https://gitlab.redox-os.org/redox-os/dash.git
BRANCH=redox
function recipe_version {
......@@ -13,8 +13,8 @@ function recipe_update {
function recipe_build {
./autogen.sh
./configure --host=${HOST} --prefix=/
make
./configure --build=${BUILD} --host=${HOST} --prefix=/ cross_compiling=yes
make -j"$(nproc)"
skip=1
}
......@@ -31,6 +31,6 @@ function recipe_clean {
function recipe_stage {
dest="$(realpath $1)"
make DESTDIR="$dest" install
ln -s "dash" "$1/bin/sh"
ln -s "dash" "$dest/bin/sh"
skip=1
}
diff -ru source/lib/cmpbuf.c source-new/lib/cmpbuf.c
--- source/lib/cmpbuf.c 2017-01-01 03:22:36.000000000 -0800
+++ source-new/lib/cmpbuf.c 2017-07-25 14:12:20.128407130 -0700
diff -ruw source/lib/cmpbuf.c source-new/lib/cmpbuf.c
--- source/lib/cmpbuf.c 2017-01-01 04:22:36.000000000 -0700
+++ source-new/lib/cmpbuf.c 2018-12-29 07:31:43.920193561 -0700
@@ -71,8 +71,8 @@
ancient AIX hosts that set errno to EINTR after uncaught
SIGCONT. See <news:1r77ojINN85n@ftp.UU.NET>
......@@ -12,48 +12,48 @@ diff -ru source/lib/cmpbuf.c source-new/lib/cmpbuf.c
return SIZE_MAX;
}
diff -ru source/lib/getdtablesize.c source-new/lib/getdtablesize.c
--- source/lib/getdtablesize.c 2017-05-18 09:23:32.000000000 -0700
+++ source-new/lib/getdtablesize.c 2017-07-25 14:14:43.353197473 -0700
@@ -109,15 +109,6 @@
diff -ruw source/lib/getdtablesize.c source-new/lib/getdtablesize.c
--- source/lib/getdtablesize.c 2017-05-18 10:23:32.000000000 -0600
+++ source-new/lib/getdtablesize.c 2018-12-29 07:32:31.709586573 -0700
@@ -109,6 +109,7 @@
int
getdtablesize (void)
{
- struct rlimit lim;
-
- if (getrlimit (RLIMIT_NOFILE, &lim) == 0
- && 0 <= lim.rlim_cur && lim.rlim_cur <= INT_MAX
- && lim.rlim_cur != RLIM_INFINITY
- && lim.rlim_cur != RLIM_SAVED_CUR
- && lim.rlim_cur != RLIM_SAVED_MAX)
- return lim.rlim_cur;
-
+#if !defined(__redox__)
struct rlimit lim;
if (getrlimit (RLIMIT_NOFILE, &lim) == 0
@@ -117,6 +118,7 @@
&& lim.rlim_cur != RLIM_SAVED_CUR
&& lim.rlim_cur != RLIM_SAVED_MAX)
return lim.rlim_cur;
+#endif
return INT_MAX;
}
diff -ru source/lib/getprogname.c source-new/lib/getprogname.c
--- source/lib/getprogname.c 2017-01-31 10:36:50.000000000 -0800
+++ source-new/lib/getprogname.c 2017-07-25 14:08:30.219353774 -0700
@@ -43,13 +43,11 @@
# include <string.h>
diff -ruw source/lib/getprogname.c source-new/lib/getprogname.c
--- source/lib/getprogname.c 2017-01-31 11:36:50.000000000 -0700
+++ source-new/lib/getprogname.c 2018-12-29 07:34:15.432575388 -0700
@@ -51,6 +51,14 @@
# include <sys/procfs.h>
#endif
-#ifdef __sgi
# include <string.h>
# include <unistd.h>
# include <stdio.h>
# include <fcntl.h>
-# include <sys/procfs.h>
-#endif
+#if defined(__redox__)
+# include <string.h>
+# include <unistd.h>
+# include <stdio.h>
+# include <fcntl.h>
+# include <limits.h>
+#endif
+
#include "dirname.h"
@@ -178,7 +176,16 @@
#ifndef HAVE_GETPROGNAME /* not Mac OS X, FreeBSD, NetBSD, OpenBSD >= 5.4, Cygwin */
@@ -177,6 +185,17 @@
}
}
return NULL;
# else
-# error "getprogname module not ported to this OS"
+# elif defined(__redox__)
+ char filename[PATH_MAX];
+ int fd = open ("sys:exe", O_RDONLY);
+ if (fd > 0) {
......@@ -64,208 +64,25 @@ diff -ru source/lib/getprogname.c source-new/lib/getprogname.c
+ }
+ }
+ return NULL;
# else
# error "getprogname module not ported to this OS"
# endif
diff -ruw source/lib/sigprocmask.c source-new/lib/sigprocmask.c
--- source/lib/sigprocmask.c 2017-05-18 10:23:32.000000000 -0600
+++ source-new/lib/sigprocmask.c 2018-12-29 07:45:02.610557142 -0700
@@ -126,6 +126,7 @@
return 0;
}
diff -ru source/lib/sigaction.c source-new/lib/sigaction.c
--- source/lib/sigaction.c 2017-05-18 09:23:32.000000000 -0700
+++ source-new/lib/sigaction.c 2017-07-25 14:16:01.860655606 -0700
@@ -1,3 +1,4 @@
+#if 0
/* POSIX compatible signal blocking.
Copyright (C) 2008-2017 Free Software Foundation, Inc.
Written by Eric Blake <ebb9@byu.net>, 2008.
@@ -202,3 +203,4 @@
errno = saved_errno;
return -1;
}
+#endif
diff -ru source/lib/sig-handler.h source-new/lib/sig-handler.h
--- source/lib/sig-handler.h 2017-05-18 09:23:32.000000000 -0700
+++ source-new/lib/sig-handler.h 2017-07-25 14:10:17.137139018 -0700
@@ -28,6 +28,7 @@
# define SIG_HANDLER_INLINE _GL_INLINE
#endif
+#if 0
/* Convenience type when working with signal handlers. */
typedef void (*sa_handler_t) (int);
@@ -48,6 +49,7 @@
#endif
return a->sa_handler;
}
+#endif
_GL_INLINE_HEADER_END
diff -ru source/lib/signal.in.h source-new/lib/signal.in.h
--- source/lib/signal.in.h 2017-05-18 09:23:32.000000000 -0700
+++ source-new/lib/signal.in.h 2017-07-25 14:04:47.960296802 -0700
@@ -1,3 +1,4 @@
+#if 0
/* A GNU-like <signal.h>.
Copyright (C) 2006-2017 Free Software Foundation, Inc.
@@ -461,3 +462,4 @@
#endif /* _@GUARD_PREFIX@_SIGNAL_H */
#endif /* _@GUARD_PREFIX@_SIGNAL_H */
#endif
+#endif
diff -ru source/lib/sigprocmask.c source-new/lib/sigprocmask.c
--- source/lib/sigprocmask.c 2017-05-18 09:23:32.000000000 -0700
+++ source-new/lib/sigprocmask.c 2017-07-25 14:17:19.291432128 -0700
@@ -1,3 +1,4 @@
+#if 0
/* POSIX compatible signal blocking.
Copyright (C) 2006-2017 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
@@ -347,3 +348,4 @@
return 0;
}
#endif
+#endif
diff -ru source/Makefile.am source-new/Makefile.am
--- source/Makefile.am 2017-01-01 03:22:36.000000000 -0800
+++ source-new/Makefile.am 2017-07-25 14:36:08.905866861 -0700
@@ -19,7 +19,7 @@
ALL_RECURSIVE_TARGETS =
EXTRA_DIST = bootstrap exgettext ChangeLog-2008 cfg.mk dist-check.mk
-SUBDIRS = lib src tests doc man po gnulib-tests
+SUBDIRS = lib src tests doc po gnulib-tests
ACLOCAL_AMFLAGS = -I m4
AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS)
diff -ru source/src/sdiff.c source-new/src/sdiff.c
--- source/src/sdiff.c 2017-05-18 10:39:59.000000000 -0700
+++ source-new/src/sdiff.c 2017-07-25 14:31:10.436289463 -0700
@@ -86,7 +86,7 @@
#ifdef SIGPIPE
SIGPIPE,
#endif
- SIGINT
+ //SIGINT
};
enum
{
@@ -226,7 +226,7 @@
static void
cleanup (int signo __attribute__((unused)))
{
-#if HAVE_WORKING_FORK
+#if 0
if (0 < diffpid)
kill (diffpid, SIGPIPE);
#endif
@@ -629,6 +629,7 @@
perror_fatal ("fork");
if (! diffpid)
{
+#if 0
/* Alter the child's SIGINT and SIGPIPE handlers;
this may munge the parent.
The child ignores SIGINT in case the user interrupts the editor.
@@ -636,6 +637,7 @@
if (initial_handler (handler_index_of_SIGINT) != SIG_IGN)
signal_handler (SIGINT, SIG_IGN);
signal_handler (SIGPIPE, SIG_DFL);
+#endif
close (diff_fds[0]);
if (diff_fds[1] != STDOUT_FILENO)
{
@@ -727,11 +729,13 @@
static void
catchsig (int s)
{
+#if 0
#if ! HAVE_SIGACTION
signal (s, SIG_IGN);
#endif
if (! (s == SIGINT && ignore_SIGINT))
signal_received = s;
+#endif
}
#if HAVE_SIGACTION
@@ -748,6 +752,7 @@
static void
trapsigs (void)
{
+#if 0
int i;
#if HAVE_SIGACTION
@@ -772,6 +777,7 @@
/* System V fork+wait does not work if SIGCHLD is ignored. */
signal (SIGCHLD, SIG_DFL);
#endif
+#endif
sigs_trapped = true;
}
@@ -780,6 +786,7 @@
static void
untrapsig (int s)
{
+#if 0
int i;
if (sigs_trapped)
@@ -792,6 +799,7 @@
signal (sigs[i], initial_action[i]);
#endif
}
+#endif
}
/* Exit if a signal has been received. */
diff -ru source/src/util.c source-new/src/util.c
--- source/src/util.c 2017-05-18 10:39:59.000000000 -0700
+++ source-new/src/util.c 2017-07-25 14:24:02.588763499 -0700
@@ -161,6 +161,7 @@
/* The set of signals that are caught. */
+#if 0
static sigset_t caught_signals;
/* If nonzero, the value of the pending fatal signal. */
@@ -192,6 +193,7 @@
if (! interrupt_signal)
stop_signal_count++;
}
+#endif
/* Process any pending signals. If signals are caught, this function
should be called periodically. Ideally there should never be an
unbounded amount of time when signals are not being processed.
@@ -201,6 +203,7 @@
static void
process_signals (void)
+#if !defined(__redox__)
int
sigemptyset (sigset_t *set)
{
+#if 0
while (interrupt_signal || stop_signal_count)
{
int sig;
@@ -235,11 +238,13 @@
/* If execution reaches here, then the program has been
continued (after being suspended). */
}
+#endif
@@ -180,6 +181,7 @@
*set = ((2U << (NSIG - 1)) - 1) & ~ SIGABRT_COMPAT_MASK;
return 0;
}
static void
install_signal_handlers (void)
{
+# if 0
/* The signals that are trapped, and the number of such signals. */
static int const sig[] =
{
@@ -303,6 +308,7 @@
}
#endif
}