From 6a03423232e3338f544903c370a0291158ec74b1 Mon Sep 17 00:00:00 2001 From: Ella-0 <23418164+Ella-0@users.noreply.github.com> Date: Sun, 19 Sep 2021 04:34:45 +0000 Subject: [PATCH 001/151] openssh: move to base --- {extra => base}/openssh/build.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {extra => base}/openssh/build.sh (100%) diff --git a/extra/openssh/build.sh b/base/openssh/build.sh similarity index 100% rename from extra/openssh/build.sh rename to base/openssh/build.sh From 2b886990483e0b71957c445dd610f13918d7a2fd Mon Sep 17 00:00:00 2001 From: Ella-0 <23418164+Ella-0@users.noreply.github.com> Date: Sun, 26 Sep 2021 11:43:51 +0000 Subject: [PATCH 002/151] replace flex as default lex --- README.md | 1 - {extra => base}/flex/build.sh | 0 {base => old}/reflex/build.sh | 0 3 files changed, 1 deletion(-) rename {extra => base}/flex/build.sh (100%) rename {base => old}/reflex/build.sh (100%) diff --git a/README.md b/README.md index ea3d7c2..eee51a0 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,6 @@ at build time and for this reason we are working on a stub implementation. |libstdc++ | libc++ | C++ standard library | |libgcc | libunwind | stack unwinding | |libgcc | complier-rt | compiler builtins | -|flex | reflex | POSIX lex | |bison | byacc | POSIX yacc | |coreutils | toybox+busybox | POSIX utilities | |gcc | clang | C++ compiler | diff --git a/extra/flex/build.sh b/base/flex/build.sh similarity index 100% rename from extra/flex/build.sh rename to base/flex/build.sh diff --git a/base/reflex/build.sh b/old/reflex/build.sh similarity index 100% rename from base/reflex/build.sh rename to old/reflex/build.sh From 7186587583a26809bb139d9cc997a24a30dbc690 Mon Sep 17 00:00:00 2001 From: Ella-0 <23418164+Ella-0@users.noreply.github.com> Date: Sun, 26 Sep 2021 11:44:30 +0000 Subject: [PATCH 003/151] linux: update and fix aarch64 --- linux/linux/build.sh | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/linux/linux/build.sh b/linux/linux/build.sh index b154dc0..af424b2 100644 --- a/linux/linux/build.sh +++ b/linux/linux/build.sh @@ -1,4 +1,4 @@ -pkgver=5.13.8 +pkgver=5.14.7 pkgname=linux pkgrel=1 ext="dev" @@ -10,39 +10,45 @@ fetch() { cd $pkgname-$pkgver # use Alpine's kernel config so we don't have to maintain one - curl "https://git.alpinelinux.org/aports/plain/community/linux-edge/config-edge.$(uname -m)" -o .config + # curl "https://git.alpinelinux.org/aports/plain/community/linux-edge/config-edge.$(uname -m)" -o .config patch -p1 < ../kernel-no-perl.patch patch -p1 < ../../kernel-byacc.patch - patch -p1 < ../../reflex.patch + # patch -p1 < ../../reflex.patch } +_arch=$ARCH +case $_arch in +aarch64*) _arch="arm64" ;; +esac + build() { cd $pkgname-$pkgver - # gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 defconfig - gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ LEX=reflex YACC=yacc LLVM_IAS=1 olddefconfig + gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 ARCH=$_arch defconfig + gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 ARCH=$_arch localmodconfig # gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ LEX=lex YACC=yacc LLVM_IAS=1 menuconfig # cp .config ../../$(uname -m).config.new sed -i 's/CONFIG_UNWINDER_ORC=y/# CONFIG_UNWINDER_ORC is not set/g' .config sed -i 's/# CONFIG_UNWINDER_FRAME_POINTER is not set/CONFIG_UNWINDER_FRAME_POINTER=y/g' .config - gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ LEX=reflex YACC=yacc LLVM_IAS=1 + gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 ARCH=$_arch } package() { cd $pkgname-$pkgver install -d $pkgdir/boot - gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 INSTALL_PATH=$pkgdir/boot install - gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 INSTALL_MOD_PATH=$pkgdir/ modules_install + gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 ARCH=$_arch INSTALL_PATH=$pkgdir/boot install + gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 ARCH=$_arch INSTALL_MOD_PATH=$pkgdir/ modules_install } package_dev() { cd $pkgname-$pkgver if stat /usr/bin/rsync 2>/dev/null /dev/null; then - gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 INSTALL_HDR_PATH=$pkgdir/usr headers_install + gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 ARCH=$_arch INSTALL_HDR_PATH=$pkgdir/usr headers_install else - gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 headers + gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 ARCH=$_arch headers find -name '.*' -exec rm {} \; rm usr/include/Makefile - cp -r usr/include $pkgdir/usr + install -d $pkgdir/usr/ + cp -r usr/include $pkgdir/usr/ fi } From 58f0d1a3e54516689981fa717aa195fd6fc79aeb Mon Sep 17 00:00:00 2001 From: Ella-0 <23418164+Ella-0@users.noreply.github.com> Date: Sun, 26 Sep 2021 11:44:47 +0000 Subject: [PATCH 004/151] busybox: update --- linux/busybox/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux/busybox/build.sh b/linux/busybox/build.sh index 345db0c..825e40b 100644 --- a/linux/busybox/build.sh +++ b/linux/busybox/build.sh @@ -1,4 +1,4 @@ -pkgver=1.33.1 +pkgver=1.34.0 pkgname=busybox bad=gmake deps="musl" From dbd979f86c5338daad4a48cadf76fd4e8428c3f3 Mon Sep 17 00:00:00 2001 From: Ella-0 <23418164+Ella-0@users.noreply.github.com> Date: Sun, 26 Sep 2021 11:45:14 +0000 Subject: [PATCH 005/151] toybox: fix xxd -i --- base/toybox/build.sh | 1 + base/toybox/xxd-i.patch | 30 +++++++ base/toybox/xxd.c | 188 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 219 insertions(+) create mode 100644 base/toybox/xxd-i.patch create mode 100644 base/toybox/xxd.c diff --git a/base/toybox/build.sh b/base/toybox/build.sh index 62eb73b..6baa91f 100644 --- a/base/toybox/build.sh +++ b/base/toybox/build.sh @@ -9,6 +9,7 @@ fetch() { cd $pkgname-$pkgver patch -p1 < ../../ls-colour.patch patch -p1 < ../../mksh-make.patch + patch -p1 < ../../xxd-i.patch } build() { diff --git a/base/toybox/xxd-i.patch b/base/toybox/xxd-i.patch new file mode 100644 index 0000000..cb8b121 --- /dev/null +++ b/base/toybox/xxd-i.patch @@ -0,0 +1,30 @@ +--- a/toys/other/xxd.c ++++ b/toys/other/xxd.c +@@ -80,7 +80,12 @@ + int c = 1, i, len; + + // The original xxd outputs a header/footer if given a filename (not stdin). +- // We don't, which means that unlike the original we can implement -ri. ++ // We don't, which means that unlike the original we can implement -ri ++ printf("unsigned char %s", isdigit(name[0]) ? "__": ""); ++ for (char *n = name; *n; n++) ++ putchar(*n == '.' ? '_' : *n); ++ puts("[] = {"); ++ + while ((len = read(fd, toybuf, sizeof(toybuf))) > 0) { + total += len; + for (i = 0; i < len; ++i) { +@@ -91,6 +96,13 @@ + } + } + } ++ puts("};"); ++ printf("unsigned int %s", isdigit(name[0]) ? "__": ""); ++ for (char *n = name; *n; n++) ++ putchar(*n == '.' ? '_' : *n); ++ ++ printf("_len = %lld;\n", total); ++ + if (len < 0) perror_msg_raw(name); + if (c > 1) xputc('\n'); + } diff --git a/base/toybox/xxd.c b/base/toybox/xxd.c new file mode 100644 index 0000000..3816237 --- /dev/null +++ b/base/toybox/xxd.c @@ -0,0 +1,188 @@ +/* xxd.c - hexdump. + * + * Copyright 2015 The Android Open Source Project + * + * No obvious standard. + * Regular output: + * "00000000: 4c69 6e75 7820 7665 7273 696f 6e20 342e Linux version 4." + * xxd -i "include" or "initializer" output: + * " 0x4c, 0x69, 0x6e, 0x75, 0x78, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f," + * xxd -p "plain" output: + * "4c696e75782076657273696f6e20342e392e302d342d616d643634202864" + +USE_XXD(NEWTOY(xxd, ">1c#l#o#g#<1=2iprs#[!rs]", TOYFLAG_USR|TOYFLAG_BIN)) + +config XXD + bool "xxd" + default y + help + usage: xxd [-c n] [-g n] [-i] [-l n] [-o n] [-p] [-r] [-s n] [file] + + Hexdump a file to stdout. If no file is listed, copy from stdin. + Filename "-" is a synonym for stdin. + + -c n Show n bytes per line (default 16) + -g n Group bytes by adding a ' ' every n bytes (default 2) + -i Include file output format (comma-separated hex byte literals) + -l n Limit of n bytes before stopping (default is no limit) + -o n Add n to display offset + -p Plain hexdump (30 bytes/line, no grouping) + -r Reverse operation: turn a hexdump into a binary file + -s n Skip to offset n +*/ + +#define FOR_xxd +#include "toys.h" + +GLOBALS( + long s, g, o, l, c; +) + +static void do_xxd(int fd, char *name) +{ + long long pos = 0; + long long limit = TT.l; + int i, len, space; + + if (toys.optflags&FLAG_s) { + xlseek(fd, TT.s, SEEK_SET); + pos = TT.s; + if (limit) limit += TT.s; + } + + while (0<(len = readall(fd, toybuf, + (limit && limit-pos=' ' && toybuf[i]<='~') ? toybuf[i] : '.'); + } + putchar('\n'); + } + if (len<0) perror_exit("read"); +} + +static void do_xxd_include(int fd, char *name) +{ + long long total = 0; + int c = 1, i, len; + + // The original xxd outputs a header/footer if given a filename (not stdin). + // We don't, which means that unlike the original we can implement -ri + printf("unsigned char %s", isdigit(name[0]) ? "__": ""); + for (char *n = name; *n; n++) + putc(*n == '.' ? '_' : *n); + puts("[] {"); + + while ((len = read(fd, toybuf, sizeof(toybuf))) > 0) { + total += len; + for (i = 0; i < len; ++i) { + printf("%s%#.02x", c > 1 ? ", " : " ", toybuf[i]); + if (c++ == TT.c) { + xprintf(",\n"); + c = 1; + } + } + } + puts("};"); + printf("unsigned int %s", isdigit(name[0]) ? "__": ""); + for (char *n = name; *n; n++) + putc(*n == '.' ? '_' : *n); + + printf(" = %d;\n", len); + + if (len < 0) perror_msg_raw(name); + if (c > 1) xputc('\n'); +} + +static int dehex(char ch) +{ + if (ch >= '0' && ch <= '9') return ch - '0'; + if (ch >= 'a' && ch <= 'f') return ch - 'a' + 10; + if (ch >= 'A' && ch <= 'F') return ch - 'A' + 10; + return (ch == '\n') ? -2 : -1; +} + +static void do_xxd_reverse(int fd, char *name) +{ + FILE *fp = xfdopen(fd, "r"); + int tmp; + + if (toys.optflags&FLAG_i) { + // -ri is a very easy special case. + while (fscanf(fp, " 0x%02x,", &tmp) == 1) { + fputc(tmp & 0xff, stdout); + } + } else { + while (!feof(fp)) { + int col = 0; + + // Each line of a regular hexdump starts with an offset/address. + // Each line of a plain hexdump just goes straight into the bytes. + if (!(toys.optflags&FLAG_p)) { + long long pos; + + if (fscanf(fp, "%llx: ", &pos) == 1) { + if (fseek(stdout, pos, SEEK_SET) != 0) { + // TODO: just write out zeros if non-seekable? + perror_exit("%s: seek failed", name); + } + } + } + + // A plain hexdump can have as many bytes per line as you like, + // but a non-plain hexdump assumes garbage after it's seen the + // specified number of bytes. + while (toys.optflags&FLAG_p || col < TT.c) { + int n1, n2; + + // If we're at EOF or EOL or we read some non-hex... + if ((n1 = n2 = dehex(fgetc(fp))) < 0 || (n2 = dehex(fgetc(fp))) < 0) { + // If we're at EOL, start on that line. + if (n1 == -2 || n2 == -2) continue; + // Otherwise, skip to the next line. + break; + } + + fputc((n1 << 4) | (n2 & 0xf), stdout); + col++; + + // Is there any grouping going on? Ignore a single space. + tmp = fgetc(fp); + if (tmp != ' ') ungetc(tmp, fp); + } + + // Skip anything else on this line (such as the ASCII dump). + while ((tmp = fgetc(fp)) != EOF && tmp != '\n') + ; + } + } + + if (ferror(fp)) perror_msg_raw(name); + fclose(fp); +} + +void xxd_main(void) +{ + if (TT.c < 0 || TT.c > 256) error_exit("invalid -c: %ld", TT.c); + if (TT.c == 0) TT.c = (toys.optflags&FLAG_i)?12:16; + + // Plain style is 30 bytes/line, no grouping. + if (toys.optflags&FLAG_p) TT.c = TT.g = 30; + + loopfiles(toys.optargs, + toys.optflags&FLAG_r ? do_xxd_reverse + : (toys.optflags&FLAG_i ? do_xxd_include : do_xxd)); +} From 223f33fb05b6d1ecccd7b5ca1c428da3712a4180 Mon Sep 17 00:00:00 2001 From: Ella-0 <23418164+Ella-0@users.noreply.github.com> Date: Sun, 26 Sep 2021 11:45:45 +0000 Subject: [PATCH 006/151] fontconfig: remove gperf; fix build --- gui/fontconfig/build.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/gui/fontconfig/build.sh b/gui/fontconfig/build.sh index d1f9608..4fce02c 100644 --- a/gui/fontconfig/build.sh +++ b/gui/fontconfig/build.sh @@ -1,20 +1,27 @@ pkgname=fontconfig -pkgver=2.13.93 +pkgver=2.13.94 fetch() { - curl "https://www.freedesktop.org/software/fontconfig/release/fontconfig-2.13.93.tar.gz" -o $pkgname-$pkgver.tar.xz + curl "https://www.freedesktop.org/software/fontconfig/release/$pkgname-$pkgver.tar.gz" -o $pkgname-$pkgver.tar.xz tar -xf $pkgname-$pkgver.tar.xz cp ../fcobjshash.h $pkgname-$pkgver/src mkdir $pkgname-$pkgver/build + cd $pkgname-$pkgver + sed -i 's/fcobjshash\.h/fcjunk.h/' src/meson.build + sed -i "s/find_program(\'gperf/find_program(\'true/" meson.build } build() { cd $pkgname-$pkgver + cd build meson .. \ --buildtype=release \ --prefix=/usr \ - --libexecdir=lib + --libexecdir=lib \ + -Ddocs=disabled \ + -Dnls=disabled \ + -Dtests=disabled samu } From 7a53d74d6b45daf7d806a19021b70dfc35270d52 Mon Sep 17 00:00:00 2001 From: Ella-0 <23418164+Ella-0@users.noreply.github.com> Date: Sun, 26 Sep 2021 11:46:14 +0000 Subject: [PATCH 007/151] add make_ext4fs --- linux/make_ext4fs/build.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 linux/make_ext4fs/build.sh diff --git a/linux/make_ext4fs/build.sh b/linux/make_ext4fs/build.sh new file mode 100644 index 0000000..6b283dd --- /dev/null +++ b/linux/make_ext4fs/build.sh @@ -0,0 +1,24 @@ +pkgname=make_ext4fs +pkgver=main + +fetch() { + curl -L "https://github.com/iglunix/make_ext4fs/archive/refs/heads/main.tar.gz" -o $pkgname-$pkgver.tar.gz + tar -xf $pkgname-$pkgver.tar.gz +} + +build() { + cd $pkgname-$pkgver + make +} + +package() { + cd $pkgname-$pkgver + install -d $pkgdir/sbin + install -Dm755 ./make_ext4fs $pkgdir/sbin/mkfs.ext4 +} + +license() { + cd $pkgname-$pkgver + cat LICENSE +# cat COPYING +} From 59eb971fbfed56b867b522c7bebf9317074ce175 Mon Sep 17 00:00:00 2001 From: Ella-0 <23418164+Ella-0@users.noreply.github.com> Date: Sun, 26 Sep 2021 11:47:14 +0000 Subject: [PATCH 008/151] add install-pi script --- scripts/install-pi.sh | 115 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100755 scripts/install-pi.sh diff --git a/scripts/install-pi.sh b/scripts/install-pi.sh new file mode 100755 index 0000000..0d8a034 --- /dev/null +++ b/scripts/install-pi.sh @@ -0,0 +1,115 @@ +#!/bin/sh + + +DIR=$(realpath $(dirname $0)/..) +echo $DIR +cd $DIR + +function install_pkg { + echo Installing $2 + cd $DIR/$1/$2/ + stat $DIR/$1/$2/out/*.tar.* > /dev/null 2> /dev/null && echo "Already built $2" + stat $DIR/$1/$2/out/*.tar.* > /dev/null 2> /dev/null || iglupkg + + stat $DIR/out/usr/share/iglupkg/$2 > /dev/null 2> /dev/null && echo "Already installed $2" + stat $DIR/out/usr/share/iglupkg/$2 > /dev/null 2> /dev/null || tar -C $DIR/out -xf $DIR/$1/$2/out/$2.*.tar.zst -I zstd + + stat $DIR/$1/$2/out/$2-dev.tar.zst > /dev/null 2> /dev/null || return + stat $DIR/out/usr/share/iglupkg/$2-dev > /dev/null 2> /dev/null && echo "Already installed $2-dev" + stat $DIR/out/usr/share/iglupkg/$2-dev > /dev/null 2> /dev/null || tar -C $DIR/out -xf $DIR/$1/$2/out/$2-dev.*.tar.zst -I zstd + + cd $DIR +} + +# install_pkg linux raspberrypi-linux +install_pkg linux raspberrypi-firmware +install_pkg linux linux-firmware +install_pkg linux make_ext4fs +install_pkg linux musl +install_pkg linux busybox + +install_pkg base bmake +install_pkg base byacc +install_pkg base ca-certificates +install_pkg base cmake +install_pkg base curl +install_pkg base expat +install_pkg base fakeroot +install_pkg base gettext-tiny +install_pkg base git +install_pkg base go +install_pkg base iglunix +install_pkg base kakoune +install_pkg base kati +install_pkg base lc-make +install_pkg base libexecinfo +install_pkg base libffi +install_pkg base libnl-tiny +install_pkg base llvm +install_pkg base meson +install_pkg base mksh +install_pkg base netbsd-curses +install_pkg base om4 +install_pkg base openpam +install_pkg base openssh +install_pkg base openssl +install_pkg base pci-ids +install_pkg base pfetch +install_pkg base pkgconf +install_pkg base python +install_pkg base python-mako +install_pkg base python-setuptools +install_pkg base flex +install_pkg base rust +install_pkg base samurai +install_pkg base toybox +install_pkg base wpa_supplicant +install_pkg base zig +install_pkg base zlib-ng +install_pkg base zstd + +exit 1 + +function install + +linux/raspberrypi-linux +linux/raspberrypi-firmware +linux/busybox + +base/bmake +base/byacc +base/ca-certificates +base/cmake +base/curl +base/expat +base/gettext-tiny +base/git +base/go +base/iglunix +base/kakoune +base/kati +base/lc-make +base/libexecinfo +base/libffi +base/libnl-tiny +base/llvm +base/meson +base/mksh +base/netbsd-curses +base/om4 +base/openpam +base/openssl +base/pci-ids +base/pfetch +base/pkgconf +base/python +base/python-mako +base/python-setuptools +base/reflex +base/rust +base/samurai +base/toybox +base/wpa_supplicant +base/zig +base/zlib-ng +base/zstd From 40ce59bed314ad116efc6e2cb6b0790c9f49e846 Mon Sep 17 00:00:00 2001 From: Ella-0 <23418164+Ella-0@users.noreply.github.com> Date: Sun, 26 Sep 2021 11:48:19 +0000 Subject: [PATCH 009/151] add install-pc script --- scripts/install-pc.sh | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 scripts/install-pc.sh diff --git a/scripts/install-pc.sh b/scripts/install-pc.sh new file mode 100644 index 0000000..7edaf98 --- /dev/null +++ b/scripts/install-pc.sh @@ -0,0 +1,3 @@ +#!/bin/sh +# TODO: +# should create x86_64 compatible, bios booting ISO From 10cb00dca1e395d47792ddef9af7192e6fd99c96 Mon Sep 17 00:00:00 2001 From: Ella-0 <23418164+Ella-0@users.noreply.github.com> Date: Sun, 26 Sep 2021 12:19:02 +0000 Subject: [PATCH 010/151] add note about make_ext4fs --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index eee51a0..077630b 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,7 @@ at build time and for this reason we are working on a stub implementation. |Linux PAM | Open PAM | Pluggable Authentication Modules | |sudo | doas | privalidge esculation | |pkg-config | pkgconf | package configuration tool | +|e2fsprogs | make_ext4fs | Make an ext4 file system | From 815c729478d3cf65def5d0cc568f7520804e3640 Mon Sep 17 00:00:00 2001 From: Ella-0 <23418164+Ella-0@users.noreply.github.com> Date: Sun, 26 Sep 2021 12:19:30 +0000 Subject: [PATCH 011/151] move e2fsprogs to old --- {pkgs => old}/e2fsprogs/build.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {pkgs => old}/e2fsprogs/build.sh (100%) diff --git a/pkgs/e2fsprogs/build.sh b/old/e2fsprogs/build.sh similarity index 100% rename from pkgs/e2fsprogs/build.sh rename to old/e2fsprogs/build.sh From 41fc569409f4fe60910fd4ff205e70c2d8809503 Mon Sep 17 00:00:00 2001 From: Ella-0 <23418164+Ella-0@users.noreply.github.com> Date: Sun, 26 Sep 2021 15:18:58 +0000 Subject: [PATCH 012/151] moving packages --- {pkgs => base}/doas/build.ninja | 0 {pkgs => base}/doas/build.sh | 0 {pkgs => base}/man-pages-posix/build.sh | 0 {pkgs => extra}/exa/build.sh | 0 {pkgs => extra}/extra-cmake-modules/build.sh | 0 {pkgs => extra}/heirloom-doctools/build.sh | 0 {pkgs => extra}/heirloom-doctools/mk.config | 0 {pkgs => gui}/pipewire/build.sh | 0 {pkgs => gui}/pipewire/no-dbus.patch | 0 {pkgs => old}/kbd/build.sh | 0 {pkgs => old}/rawk/build.sh | 0 {pkgs => old}/rawk/cp-u.patch | 0 {pkgs => old}/rsync/build.sh | 0 {pkgs => old}/tiny-linux-bootloader/bsect.patch | 0 {pkgs => old}/tiny-linux-bootloader/build.patch | 0 {pkgs => old}/tiny-linux-bootloader/build.sh | 0 {pkgs => old}/tiny-linux-bootloader/fstab | 0 {pkgs => old}/tiny-linux-bootloader/remove-dead.patch | 0 {pkgs => old}/toolchain-aarch64/build.sh | 0 {pkgs => old}/util-linux/build.sh | 0 20 files changed, 0 insertions(+), 0 deletions(-) rename {pkgs => base}/doas/build.ninja (100%) rename {pkgs => base}/doas/build.sh (100%) rename {pkgs => base}/man-pages-posix/build.sh (100%) rename {pkgs => extra}/exa/build.sh (100%) rename {pkgs => extra}/extra-cmake-modules/build.sh (100%) rename {pkgs => extra}/heirloom-doctools/build.sh (100%) rename {pkgs => extra}/heirloom-doctools/mk.config (100%) rename {pkgs => gui}/pipewire/build.sh (100%) rename {pkgs => gui}/pipewire/no-dbus.patch (100%) rename {pkgs => old}/kbd/build.sh (100%) rename {pkgs => old}/rawk/build.sh (100%) rename {pkgs => old}/rawk/cp-u.patch (100%) rename {pkgs => old}/rsync/build.sh (100%) rename {pkgs => old}/tiny-linux-bootloader/bsect.patch (100%) rename {pkgs => old}/tiny-linux-bootloader/build.patch (100%) rename {pkgs => old}/tiny-linux-bootloader/build.sh (100%) rename {pkgs => old}/tiny-linux-bootloader/fstab (100%) rename {pkgs => old}/tiny-linux-bootloader/remove-dead.patch (100%) rename {pkgs => old}/toolchain-aarch64/build.sh (100%) rename {pkgs => old}/util-linux/build.sh (100%) diff --git a/pkgs/doas/build.ninja b/base/doas/build.ninja similarity index 100% rename from pkgs/doas/build.ninja rename to base/doas/build.ninja diff --git a/pkgs/doas/build.sh b/base/doas/build.sh similarity index 100% rename from pkgs/doas/build.sh rename to base/doas/build.sh diff --git a/pkgs/man-pages-posix/build.sh b/base/man-pages-posix/build.sh similarity index 100% rename from pkgs/man-pages-posix/build.sh rename to base/man-pages-posix/build.sh diff --git a/pkgs/exa/build.sh b/extra/exa/build.sh similarity index 100% rename from pkgs/exa/build.sh rename to extra/exa/build.sh diff --git a/pkgs/extra-cmake-modules/build.sh b/extra/extra-cmake-modules/build.sh similarity index 100% rename from pkgs/extra-cmake-modules/build.sh rename to extra/extra-cmake-modules/build.sh diff --git a/pkgs/heirloom-doctools/build.sh b/extra/heirloom-doctools/build.sh similarity index 100% rename from pkgs/heirloom-doctools/build.sh rename to extra/heirloom-doctools/build.sh diff --git a/pkgs/heirloom-doctools/mk.config b/extra/heirloom-doctools/mk.config similarity index 100% rename from pkgs/heirloom-doctools/mk.config rename to extra/heirloom-doctools/mk.config diff --git a/pkgs/pipewire/build.sh b/gui/pipewire/build.sh similarity index 100% rename from pkgs/pipewire/build.sh rename to gui/pipewire/build.sh diff --git a/pkgs/pipewire/no-dbus.patch b/gui/pipewire/no-dbus.patch similarity index 100% rename from pkgs/pipewire/no-dbus.patch rename to gui/pipewire/no-dbus.patch diff --git a/pkgs/kbd/build.sh b/old/kbd/build.sh similarity index 100% rename from pkgs/kbd/build.sh rename to old/kbd/build.sh diff --git a/pkgs/rawk/build.sh b/old/rawk/build.sh similarity index 100% rename from pkgs/rawk/build.sh rename to old/rawk/build.sh diff --git a/pkgs/rawk/cp-u.patch b/old/rawk/cp-u.patch similarity index 100% rename from pkgs/rawk/cp-u.patch rename to old/rawk/cp-u.patch diff --git a/pkgs/rsync/build.sh b/old/rsync/build.sh similarity index 100% rename from pkgs/rsync/build.sh rename to old/rsync/build.sh diff --git a/pkgs/tiny-linux-bootloader/bsect.patch b/old/tiny-linux-bootloader/bsect.patch similarity index 100% rename from pkgs/tiny-linux-bootloader/bsect.patch rename to old/tiny-linux-bootloader/bsect.patch diff --git a/pkgs/tiny-linux-bootloader/build.patch b/old/tiny-linux-bootloader/build.patch similarity index 100% rename from pkgs/tiny-linux-bootloader/build.patch rename to old/tiny-linux-bootloader/build.patch diff --git a/pkgs/tiny-linux-bootloader/build.sh b/old/tiny-linux-bootloader/build.sh similarity index 100% rename from pkgs/tiny-linux-bootloader/build.sh rename to old/tiny-linux-bootloader/build.sh diff --git a/pkgs/tiny-linux-bootloader/fstab b/old/tiny-linux-bootloader/fstab similarity index 100% rename from pkgs/tiny-linux-bootloader/fstab rename to old/tiny-linux-bootloader/fstab diff --git a/pkgs/tiny-linux-bootloader/remove-dead.patch b/old/tiny-linux-bootloader/remove-dead.patch similarity index 100% rename from pkgs/tiny-linux-bootloader/remove-dead.patch rename to old/tiny-linux-bootloader/remove-dead.patch diff --git a/pkgs/toolchain-aarch64/build.sh b/old/toolchain-aarch64/build.sh similarity index 100% rename from pkgs/toolchain-aarch64/build.sh rename to old/toolchain-aarch64/build.sh diff --git a/pkgs/util-linux/build.sh b/old/util-linux/build.sh similarity index 100% rename from pkgs/util-linux/build.sh rename to old/util-linux/build.sh From 28b6b47c2305e63789f41a06754c07570c638c08 Mon Sep 17 00:00:00 2001 From: Ella-0 <23418164+Ella-0@users.noreply.github.com> Date: Thu, 30 Sep 2021 13:45:58 +0100 Subject: [PATCH 013/151] added autoconf --- bad/autoconf/autoconf.sh.patch | 23 +++++++++++ bad/autoconf/autoheader.sh.patch | 11 +++++ bad/autoconf/build.sh | 31 ++++++++++++++ bad/autoconf/makefile-m4f.patch | 70 ++++++++++++++++++++++++++++++++ 4 files changed, 135 insertions(+) create mode 100644 bad/autoconf/autoconf.sh.patch create mode 100644 bad/autoconf/autoheader.sh.patch create mode 100644 bad/autoconf/build.sh create mode 100644 bad/autoconf/makefile-m4f.patch diff --git a/bad/autoconf/autoconf.sh.patch b/bad/autoconf/autoconf.sh.patch new file mode 100644 index 0000000..6be3138 --- /dev/null +++ b/bad/autoconf/autoconf.sh.patch @@ -0,0 +1,23 @@ +--- a/autoconf.sh ++++ b/autoconf.sh +@@ -115,13 +115,14 @@ + # Use the frozen version of Autoconf if available. + r= f= + # Some non-GNU m4's don't reject the --help option, so give them /dev/null. +-case `$M4 --help < /dev/null 2>&1` in +-*reload-state*) test -r $AC_MACRODIR/autoconf.m4f && { r=--reload f=f; } ;; +-*traditional*) ;; +-*) echo Autoconf requires GNU m4 1.1 or later >&2; rm -f $tmpin; exit 1 ;; +-esac ++# case `$M4 --help < /dev/null 2>&1` in ++# *reload-state*) test -r $AC_MACRODIR/autoconf.m4f && { r=--reload f=f; } ;; ++# *traditional*) ;; ++# *) echo Autoconf requires GNU m4 1.1 or later >&2; rm -f $tmpin; exit 1 ;; ++# esac + +-$M4 -I$AC_MACRODIR $use_localdir $r autoconf.m4$f $infile > $tmpout || ++# $M4 -I$AC_MACRODIR $use_localdir $r autoconf.m4$f $infile > $tmpout || ++$M4 -g -D__GNU__ -I$AC_MACRODIR $use_localdir autoconf.m4 $infile -> $tmpout || + { rm -f $tmpin $tmpout; exit 2; } + + # You could add your own prefixes to pattern if you wanted to check for diff --git a/bad/autoconf/autoheader.sh.patch b/bad/autoconf/autoheader.sh.patch new file mode 100644 index 0000000..599293a --- /dev/null +++ b/bad/autoconf/autoheader.sh.patch @@ -0,0 +1,11 @@ +--- autoconf-2.13/autoheader.sh ++++ old/autoheader.sh +@@ -122,7 +122,7 @@ + # Extract assignments of SYMS, TYPES, FUNCS, HEADERS, and LIBS from the + # modified autoconf processing of the input file. The sed hair is + # necessary to win for multi-line macro invocations. +-eval "`$M4 -I$AC_MACRODIR $use_localdir $r autoheader.m4$f $infile | ++eval "`$M4 -g -D__gnu__ -I$AC_MACRODIR $use_localdir autoheader.m4 $infile | + sed -n -e ' + : again + /^@@@.*@@@$/s/^@@@\(.*\)@@@$/\1/p diff --git a/bad/autoconf/build.sh b/bad/autoconf/build.sh new file mode 100644 index 0000000..a33eb96 --- /dev/null +++ b/bad/autoconf/build.sh @@ -0,0 +1,31 @@ +pkgname=autoconf +pkgver=2.13 + +fetch() { + curl "https://ftp.gnu.org/gnu/autoconf/autoconf-$pkgver.tar.gz" -o $pkgname-$pkgver.tar.gz + tar -xf $pkgname-$pkgver.tar.gz + cd $pkgname-$pkgver + patch -p1 < ../../makefile-m4f.patch + patch -p1 < ../../autoconf.sh.patch + patch -p1 < ../../autoheader.sh.patch +} + +build() { + cd $pkgname-$pkgver + ./configure \ + --prefix=/usr \ + --build=$TRIPLE \ + --host=$TRIPLE + + make +} + +package() { + cd $pkgname-$pkgver + make install DESTDIR=$pkgdir +} + +license() { + cd $pkgname-$pkgver + cat COPYING +} diff --git a/bad/autoconf/makefile-m4f.patch b/bad/autoconf/makefile-m4f.patch new file mode 100644 index 0000000..1de0172 --- /dev/null +++ b/bad/autoconf/makefile-m4f.patch @@ -0,0 +1,70 @@ +--- src/autoconf-2.13/Makefile.in ++++ Makefile.in +@@ -33,8 +33,8 @@ + # Programs that are ALWAYS installed (and are created in the build dir). + ASCRIPTS = autoconf autoheader autoreconf autoupdate ifnames + +-# M4 input that is frozen. +-M4FROZEN = autoconf.m4f autoheader.m4f ++# Don't freeze anything with OpenBSD m4 ++M4FROZEN = + + # All programs, including those only installed if you have perl. + SCRIPTS = $(ASCRIPTS) @SCRIPTS@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -137,23 +137,23 @@ + cd testsuite && ${MAKE} AUTOCONF=${bindir}/autoconf $@ + + installdirs: +- $(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(infodir) $(acdatadir) ++ $(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)/$(bindir) $(DESTDIR)/$(acdatadir) + + install: all $(M4FILES) acconfig.h installdirs install-info + for p in $(ASCRIPTS); do \ +- $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed '$(transform)'`; \ ++ $(INSTALL_PROGRAM) $$p $(DESTDIR)/$(bindir)/`echo $$p|sed '$(transform)'`; \ + done + for i in $(M4FROZEN); do \ +- $(INSTALL_DATA) $$i $(acdatadir)/$$i; \ ++ $(INSTALL_DATA) $$i $(DESTDIR)/$(acdatadir)/$$i; \ + done + for i in $(M4FILES) acconfig.h; do \ +- $(INSTALL_DATA) $(srcdir)/$$i $(acdatadir)/$$i; \ ++ $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)/$(acdatadir)/$$i; \ + done + -if test -f autoscan; then \ +- $(INSTALL_PROGRAM) autoscan $(bindir)/`echo autoscan|sed '$(transform)'`; \ ++ $(INSTALL_PROGRAM) autoscan $(DESTDIR)/$(bindir)/`echo autoscan|sed '$(transform)'`; \ + for i in acfunctions acheaders acidentifiers acprograms \ + acmakevars; do \ +- $(INSTALL_DATA) $(srcdir)/$$i $(acdatadir)/$$i; \ ++ $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)/$(acdatadir)/$$i; \ + done; \ + else :; fi + +@@ -161,11 +161,11 @@ + install-info: info installdirs + if test -f autoconf.info; then \ + for i in *.info*; do \ +- $(INSTALL_DATA) $$i $(infodir)/$$i; \ ++ $(INSTALL_DATA) $$i $(DESTDIR)/$(infodir)/$$i; \ + done; \ + else \ + for i in $(srcdir)/*.info*; do \ +- $(INSTALL_DATA) $$i $(infodir)/`echo $$i | sed 's|^$(srcdir)/||'`; \ ++ $(INSTALL_DATA) $$i $(DESTDIR)/$(infodir)/`echo $$i | sed 's|^$(srcdir)/||'`; \ + done; \ + fi + +--- a/Makefile.in ++++ b/Makefile.in +@@ -139,7 +139,7 @@ + installdirs: + $(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)/$(bindir) $(DESTDIR)/$(infodir) $(DESTDIR)/$(acdatadir) + +-install: all $(M4FILES) acconfig.h installdirs install-info ++install: all $(M4FILES) acconfig.h installdirs + for p in $(ASCRIPTS); do \ + $(INSTALL_PROGRAM) $$p $(DESTDIR)/$(bindir)/`echo $$p|sed '$(transform)'`; \ + done From fddec8071ac844855542d6ce8afd2ded5db67eb1 Mon Sep 17 00:00:00 2001 From: Ella-0 <23418164+Ella-0@users.noreply.github.com> Date: Thu, 30 Sep 2021 14:06:21 +0100 Subject: [PATCH 014/151] avoid circular dependency of lex and m4 --- base/om4/build.sh | 2 + base/om4/m4-hand-written-lexer.patch | 327 +++++++++++++++++++++++++++ 2 files changed, 329 insertions(+) create mode 100644 base/om4/m4-hand-written-lexer.patch diff --git a/base/om4/build.sh b/base/om4/build.sh index e3334a7..c034dc4 100644 --- a/base/om4/build.sh +++ b/base/om4/build.sh @@ -8,6 +8,8 @@ ext="doc" fetch() { curl -L "https://github.com/ibara/m4/releases/download/om4-6.7/om4-6.7.tar.gz" -o $pkgname-$pkgver.tar.xz tar -xf $pkgname-$pkgver.tar.xz + cd $pkgname-$pkgver + patch -p1 < ../../m4-hand-written-lexer.patch } build() { diff --git a/base/om4/m4-hand-written-lexer.patch b/base/om4/m4-hand-written-lexer.patch new file mode 100644 index 0000000..307cf10 --- /dev/null +++ b/base/om4/m4-hand-written-lexer.patch @@ -0,0 +1,327 @@ +From edf250c633bef40e7e37dafc9fc393dd2ad9074f Mon Sep 17 00:00:00 2001 +From: Michael Forney +Date: Tue, 10 Apr 2018 13:37:14 -0700 +Subject: [PATCH] m4: Use hand-written lexer to avoid cycle in bootstrap + +--- + tokenizer.c | 191 +++++++++++++++++++++++++++++++++++++++++ + tokenizer.l | 109 ----------------------- + 2 files changed, 191 insertions(+), 109 deletions(-) + create mode 100644 tokenizer.c + delete mode 100644 tokenizer.l + +diff --git a/tokenizer.c b/tokenizer.c +new file mode 100644 +index 00000000000..fa19fc65035 +--- /dev/null ++++ b/tokenizer.c +@@ -0,0 +1,191 @@ ++/* $OpenBSD: tokenizer.l,v 1.10 2017/06/17 01:55:16 bcallah Exp $ */ ++/* ++ * Copyright (c) 2004 Marc Espie ++ * ++ * Permission to use, copy, modify, and distribute this software for any ++ * purpose with or without fee is hereby granted, provided that the above ++ * copyright notice and this permission notice appear in all copies. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES ++ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF ++ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ++ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ++ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ++ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF ++ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ++ */ ++#include "parser.h" ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++extern void m4_warnx(const char *, ...); ++extern int mimic_gnu; ++extern int32_t yylval; ++static const char *yypos; ++ ++void ++yy_scan_string(const char *s) ++{ ++ yypos = s; ++} ++ ++static int32_t ++number(const char *yytext, size_t yylen) ++{ ++ long l; ++ ++ errno = 0; ++ l = strtol(yytext, NULL, 0); ++ if (((l == LONG_MAX || l == LONG_MIN) && errno == ERANGE) || ++ l > INT32_MAX || l < INT32_MIN) ++ m4_warnx("numeric overflow in expr: %.*s", (int)yylen, yytext); ++ return l; ++} ++ ++static int32_t ++parse_radix(const char *yytext, size_t yylen) ++{ ++ long base; ++ char *next; ++ long l; ++ int d; ++ ++ l = 0; ++ base = strtol(yytext+2, &next, 0); ++ if (base > 36 || next == NULL) { ++ m4_warnx("error in number %.*s", (int)yylen, yytext); ++ } else { ++ next++; ++ while (*next != 0) { ++ if (*next >= '0' && *next <= '9') ++ d = *next - '0'; ++ else if (*next >= 'a' && *next <= 'z') ++ d = *next - 'a' + 10; ++ else { ++ assert(*next >= 'A' && *next <= 'Z'); ++ d = *next - 'A' + 10; ++ } ++ if (d >= base) { ++ m4_warnx("error in number %.*s", (int)yylen, yytext); ++ return 0; ++ } ++ l = base * l + d; ++ next++; ++ } ++ } ++ return l; ++} ++ ++static int ++isodigit(int c) ++{ ++ return c >= '0' && c <= '7'; ++} ++ ++int yylex(void) ++{ ++ const char *start; ++ ++next: ++ start = yypos; ++ switch (*yypos) { ++ case ' ': ++ case '\t': ++ case '\n': ++ ++yypos; ++ goto next; ++ case '<': ++ switch (yypos[1]) { ++ case '=': ++ yypos += 2; ++ return LE; ++ case '<': ++ yypos += 2; ++ return LSHIFT; ++ } ++ break; ++ case '>': ++ switch (yypos[1]) { ++ case '=': ++ yypos += 2; ++ return GE; ++ case '>': ++ yypos += 2; ++ return RSHIFT; ++ } ++ break; ++ case '=': ++ if (yypos[1] != '=') ++ break; ++ yypos += 2; ++ return EQ; ++ case '!': ++ if (yypos[1] != '=') ++ break; ++ yypos += 2; ++ return NE; ++ case '&': ++ if (yypos[1] != '&') ++ break; ++ yypos += 2; ++ return LAND; ++ case '|': ++ if (yypos[1] != '|') ++ break; ++ yypos += 2; ++ return LOR; ++ case '*': ++ if (!mimic_gnu || yypos[1] != '*') ++ break; ++ yypos += 2; ++ return EXPONENT; ++ case '0': ++ switch (*++yypos) { ++ case 'x': ++ case 'X': ++ if (!isxdigit(*++yypos)) ++ return ERROR; ++ do ++yypos; ++ while (isxdigit(*yypos)); ++ break; ++ case 'r': ++ case 'R': ++ if (!mimic_gnu) ++ break; ++ if (!isdigit(*++yypos)) ++ return ERROR; ++ do ++yypos; ++ while (isdigit(*yypos)); ++ if (*yypos != ':') ++ return ERROR; ++ if (!isalnum(*++yypos)) ++ return ERROR; ++ do ++yypos; ++ while (isalnum(*yypos)); ++ yylval = parse_radix(start, yypos - start); ++ return NUMBER; ++ default: ++ do ++yypos; ++ while (isodigit(*yypos)); ++ break; ++ } ++ yylval = number(start, yypos - start); ++ return NUMBER; ++ case '\0': ++ return '\0'; ++ } ++ if (isdigit(*yypos)) { ++ do ++yypos; ++ while (isdigit(*yypos)); ++ yylval = number(start, yypos - start); ++ return NUMBER; ++ } ++ ++ return *yypos++; ++} +diff --git a/tokenizer.l b/tokenizer.l +deleted file mode 100644 +index 94f02fb6085..00000000000 +--- a/tokenizer.l ++++ /dev/null +@@ -1,109 +0,0 @@ +-%{ +-/* $OpenBSD: tokenizer.l,v 1.10 2017/06/17 01:55:16 bcallah Exp $ */ +-/* +- * Copyright (c) 2004 Marc Espie +- * +- * Permission to use, copy, modify, and distribute this software for any +- * purpose with or without fee is hereby granted, provided that the above +- * copyright notice and this permission notice appear in all copies. +- * +- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +- */ +-#include "parser.h" +-#include +-#include +-#include +-#include +-#include +- +-extern void m4_warnx(const char *, ...); +-extern int mimic_gnu; +-extern int32_t yylval; +- +-int32_t number(void); +-int32_t parse_radix(void); +-%} +- +-delim [ \t\n] +-ws {delim}+ +-hex 0[xX][0-9a-fA-F]+ +-oct 0[0-7]* +-dec [1-9][0-9]* +-radix 0[rR][0-9]+:[0-9a-zA-Z]+ +- +-%option noyywrap +- +-%% +-{ws} {/* just skip it */} +-{hex}|{oct}|{dec} { yylval = number(); return(NUMBER); } +-{radix} { if (mimic_gnu) { +- yylval = parse_radix(); return(NUMBER); +- } else { +- return(ERROR); +- } +- } +-"<=" { return(LE); } +-">=" { return(GE); } +-"<<" { return(LSHIFT); } +-">>" { return(RSHIFT); } +-"==" { return(EQ); } +-"!=" { return(NE); } +-"&&" { return(LAND); } +-"||" { return(LOR); } +-"**" { if (mimic_gnu) { return (EXPONENT); } } +-. { return yytext[0]; } +-%% +- +-int32_t +-number() +-{ +- long l; +- +- errno = 0; +- l = strtol(yytext, NULL, 0); +- if (((l == LONG_MAX || l == LONG_MIN) && errno == ERANGE) || +- l > INT32_MAX || l < INT32_MIN) +- m4_warnx("numeric overflow in expr: %s", yytext); +- return l; +-} +- +-int32_t +-parse_radix() +-{ +- long base; +- char *next; +- long l; +- int d; +- +- l = 0; +- base = strtol(yytext+2, &next, 0); +- if (base > 36 || next == NULL) { +- m4_warnx("error in number %s", yytext); +- } else { +- next++; +- while (*next != 0) { +- if (*next >= '0' && *next <= '9') +- d = *next - '0'; +- else if (*next >= 'a' && *next <= 'z') +- d = *next - 'a' + 10; +- else { +- assert(*next >= 'A' && *next <= 'Z'); +- d = *next - 'A' + 10; +- } +- if (d >= base) { +- m4_warnx("error in number %s", yytext); +- return 0; +- } +- l = base * l + d; +- next++; +- } +- } +- return l; +-} +- +-- +2.17.0 + From 44f3573897fe424411ffc1805bc917869fa0817c Mon Sep 17 00:00:00 2001 From: Ella-0 <23418164+Ella-0@users.noreply.github.com> Date: Thu, 30 Sep 2021 14:35:51 +0100 Subject: [PATCH 015/151] switch to using bad prefix --- bad/autoconf/build.sh | 2 +- bad/bad/build.sh | 23 +++++++++++++++++++++++ bad/gmake/build.sh | 18 +++++++++--------- 3 files changed, 33 insertions(+), 10 deletions(-) create mode 100644 bad/bad/build.sh diff --git a/bad/autoconf/build.sh b/bad/autoconf/build.sh index a33eb96..a9a60ef 100644 --- a/bad/autoconf/build.sh +++ b/bad/autoconf/build.sh @@ -13,7 +13,7 @@ fetch() { build() { cd $pkgname-$pkgver ./configure \ - --prefix=/usr \ + --prefix=/usr/bad/autoconf/ \ --build=$TRIPLE \ --host=$TRIPLE diff --git a/bad/bad/build.sh b/bad/bad/build.sh new file mode 100644 index 0000000..add79d4 --- /dev/null +++ b/bad/bad/build.sh @@ -0,0 +1,23 @@ +pkgname=bad +pkgver=main + +fetch() { + curl -L "https://github.com/iglunix/bad/archive/refs/heads/main.tar.gz" -o $pkgname-$pkgver.tar.gz + tar -xf $pkgname-$pkgver.tar.gz +} + +build() { + cd $pkgname-$pkgver + make +} + +package() { + cd $pkgname-$pkgver + make install DESTDIR=$pkgdir PREFIX=/usr +} + +license() { + cd $pkgname-$pkgver + cat LICENSE +# cat COPYING +} diff --git a/bad/gmake/build.sh b/bad/gmake/build.sh index eee32e9..dc0ebf0 100644 --- a/bad/gmake/build.sh +++ b/bad/gmake/build.sh @@ -6,7 +6,7 @@ bad="gmake" ext="doc:dev" fetch() { - curl "https://ftp.gnu.org/gnu/make/make-4.3.tar.gz" -o $pkgname-$pkgver.tar.gz + curl "https://ftp.gnu.org/gnu/make/make-$pkgver.tar.gz" -o $pkgname-$pkgver.tar.gz tar -xf $pkgname-$pkgver.tar.gz mv make-$pkgver $pkgname-$pkgver } @@ -14,7 +14,7 @@ fetch() { build() { cd $pkgname-$pkgver ./configure \ - --prefix=/usr \ + --prefix=/usr/bad/gmake \ --program-prefix=g \ --disable-nls make @@ -23,22 +23,22 @@ build() { package() { cd $pkgname-$pkgver ./make install DESTDIR=$pkgdir - rm -r $pkgdir/usr/share - rm -r $pkgdir/usr/include + rm -r $pkgdir/usr/bad/gmake/share + rm -r $pkgdir/usr/bad/gmake/include } package_doc() { cd $pkgname-$pkgver ./make install DESDIR=$pkgdir - rm -r $pkgdir/usr/bin - rm -r $pkgdir/usr/share/info - rm -r $pkgdir/usr/include + rm -r $pkgdir/usr/bad/gmake/bin + rm -r $pkgdir/usr/bad/gmake/share/info + rm -r $pkgdir/usr/bad/gmake/include } package_dev() { cd $pkgname-$pkgver ./make install DESTDIR=$pkgdir - rm -r $pkgdir/usr/bin - rm -r $pkgdir/usr/share + rm -r $pkgdir/usr/bad/gmake/bin + rm -r $pkgdir/usr/bad/gmake/share } license() { From b2877c417930e935b4797050c529730723d9decb Mon Sep 17 00:00:00 2001 From: Ella-0 <23418164+Ella-0@users.noreply.github.com> Date: Thu, 30 Sep 2021 15:01:41 +0100 Subject: [PATCH 016/151] switch to using bad utility in base packages --- base/ca-certificates/build.sh | 4 ++-- base/cmake/build.sh | 4 ++-- base/git/build.sh | 8 ++++---- base/kati/build.sh | 2 +- base/libffi/build.sh | 6 +++--- base/libnl-tiny/build.sh | 4 ++-- base/toybox/build.sh | 6 +++--- base/wpa_supplicant/build.sh | 2 +- base/zstd/build.sh | 4 ++-- 9 files changed, 20 insertions(+), 20 deletions(-) diff --git a/base/ca-certificates/build.sh b/base/ca-certificates/build.sh index 2b43120..4306cc1 100644 --- a/base/ca-certificates/build.sh +++ b/base/ca-certificates/build.sh @@ -17,7 +17,7 @@ fetch(){ build() { cd $pkgname-$pkgver - gmake + bad --gmake gmake } package() { @@ -28,7 +28,7 @@ package() { mkdir -p $pkgdir/etc/ca-certificates/update.d mkdir -p $pkgdir/usr/share/ca-certificates/ - gmake install DESTDIR="$pkgdir" + bad --gmake gmake install DESTDIR="$pkgdir" ( echo "# Automatically generated by ${pkgname}-${pkgver}-${pkgrel}" diff --git a/base/cmake/build.sh b/base/cmake/build.sh index 4e33871..6f28e96 100644 --- a/base/cmake/build.sh +++ b/base/cmake/build.sh @@ -32,14 +32,14 @@ package() { package_doc() { cd $pkgname-$pkgver - gmake install DESDIR=$pkgdir + DESDIR=$pkgdir samu install rm -r $pkgdir/usr/bin rm -r $pkgdir/usr/share/info rm -r $pkgdir/usr/include } package_dev() { cd $pkgname-$pkgver - gmake install DESTDIR=$pkgdir + DESTDIR=$pkgdir samu install rm -r $pkgdir/usr/bin rm -r $pkgdir/usr/share } diff --git a/base/git/build.sh b/base/git/build.sh index 929911e..f97627a 100644 --- a/base/git/build.sh +++ b/base/git/build.sh @@ -14,22 +14,22 @@ fetch() { build() { cd $pkgname-$pkgver # gmake NO_PERL=1 NO_REGEX=NeedsStartEnd NO_TCLTK=1 NO_MSGFMT_EXTENDED_OPTIONS=1 prefix=/usr gitexecdir=lib/gitcore INSTALL_SYMLINKS=1 - gmake NO_REGEX=NeedsStartEnd NO_TCLTK=1 NO_MSGFMT_EXTENDED_OPTIONS=1 prefix=/usr gitexecdir=lib/gitcore INSTALL_SYMLINKS=1 + bad --gmake gmake NO_REGEX=NeedsStartEnd NO_TCLTK=1 NO_MSGFMT_EXTENDED_OPTIONS=1 prefix=/usr gitexecdir=lib/gitcore INSTALL_SYMLINKS=1 # Need to run twice for it to work ¯\_(ツ)_/¯ # Some issue with `msgfmt` 'cause I'm using gettext-tiny but idk why it works on the second run # gmake NO_PERL=1 NO_REGEX=NeedsStartEnd NO_TCLTK=1 NO_MSGFMT_EXTENDED_OPTIONS=1 prefix=/usr gitexecdir=lib/gitcore INSTALL_SYMLINKS=1 - gmake NO_REGEX=NeedsStartEnd NO_TCLTK=1 NO_MSGFMT_EXTENDED_OPTIONS=1 prefix=/usr gitexecdir=lib/gitcore INSTALL_SYMLINKS=1 + bad --gmake gmake NO_REGEX=NeedsStartEnd NO_TCLTK=1 NO_MSGFMT_EXTENDED_OPTIONS=1 prefix=/usr gitexecdir=lib/gitcore INSTALL_SYMLINKS=1 } package() { cd $pkgname-$pkgver # gmake NO_PERL=1 NO_REGEX=NeedsStartEnd NO_TCLTK=1 NO_MSGFMT_EXTENDED_OPTIONS=1 install prefix=/usr gitexecdir=lib/gitcore DESTDIR=$pkgdir INSTALL_SYMLINKS=1 - gmake NO_REGEX=NeedsStartEnd NO_TCLTK=1 NO_MSGFMT_EXTENDED_OPTIONS=1 install prefix=/usr gitexecdir=lib/gitcore DESTDIR=$pkgdir INSTALL_SYMLINKS=1 + bad --gmake gmake NO_REGEX=NeedsStartEnd NO_TCLTK=1 NO_MSGFMT_EXTENDED_OPTIONS=1 install prefix=/usr gitexecdir=lib/gitcore DESTDIR=$pkgdir INSTALL_SYMLINKS=1 } package_doc() { # gmake NO_PERL=1 NO_REGEX=NeedsStartEnd NO_TCLTK=1 NO_MSGFMT_EXTENDED_OPTIONS=1 install-man prefix=/usr DESTDIR=$pkgdir INSTALL_SYMLINKS=1 - gmake NO_REGEX=NeedsStartEnd NO_TCLTK=1 NO_MSGFMT_EXTENDED_OPTIONS=1 install-man prefix=/usr DESTDIR=$pkgdir INSTALL_SYMLINKS=1 + bad --gmake gmake NO_REGEX=NeedsStartEnd NO_TCLTK=1 NO_MSGFMT_EXTENDED_OPTIONS=1 install-man prefix=/usr DESTDIR=$pkgdir INSTALL_SYMLINKS=1 } license() { diff --git a/base/kati/build.sh b/base/kati/build.sh index 0530753..c64348d 100644 --- a/base/kati/build.sh +++ b/base/kati/build.sh @@ -9,7 +9,7 @@ fetch() { build() { cd $pkgname-$pkgver - gmake + bad --gmake gmake } package() { diff --git a/base/libffi/build.sh b/base/libffi/build.sh index 80f9484..47a93b1 100644 --- a/base/libffi/build.sh +++ b/base/libffi/build.sh @@ -11,17 +11,17 @@ fetch() { build() { cd $pkgname-$pkgver ./configure --prefix=/usr - gmake + bad --gmake gmake } package() { cd $pkgname-$pkgver - gmake install DESTDIR=$pkgdir + bad --gmake gmake install DESTDIR=$pkgdir } package_dev() { cd $pkgname-$pkgver - gmake install DESTDIR=$pkgdir + bad --gmake gmake install DESTDIR=$pkgdir } license() { diff --git a/base/libnl-tiny/build.sh b/base/libnl-tiny/build.sh index 4620f55..30702f9 100644 --- a/base/libnl-tiny/build.sh +++ b/base/libnl-tiny/build.sh @@ -9,12 +9,12 @@ fetch() { build() { cd $pkgname-$pkgver - gmake prefix=/usr all CC=cc + bad --gmake gmake prefix=/usr all CC=cc } package() { cd $pkgname-$pkgver - gmake prefix=/usr DESTDIR=$pkgdir install + bad --gmake gmake prefix=/usr DESTDIR=$pkgdir install } license() { diff --git a/base/toybox/build.sh b/base/toybox/build.sh index 6baa91f..caf27cd 100644 --- a/base/toybox/build.sh +++ b/base/toybox/build.sh @@ -14,8 +14,8 @@ fetch() { build() { cd $pkgname-$pkgver - CPUS=1 gmake defconfig - CPUS=1 gmake + CPUS=1 bad --gmake gmake defconfig + CPUS=1 bad --gmake gmake } package() { @@ -27,7 +27,7 @@ package() { # install -d $pkgdir/usr/bin # ln -sr $pkgdir/bin/toybox $pkgdir/usr/bin/install # ln -sr $pkgdir/bin/toybox $pkgdir/usr/bin/lspci - gmake PREFIX=$pkgdir install + bad --gmake gmake PREFIX=$pkgdir install # Provided by NetBSD Curses rm $pkgdir/usr/bin/clear diff --git a/base/wpa_supplicant/build.sh b/base/wpa_supplicant/build.sh index 1eb62b0..c2efaf7 100644 --- a/base/wpa_supplicant/build.sh +++ b/base/wpa_supplicant/build.sh @@ -25,7 +25,7 @@ build() { package() { cd $pkgname-$pkgver cd $pkgname - gmake install DESTDIR=$pkgdir BINDIR=/usr/sbin + bad --gmake gmake install DESTDIR=$pkgdir BINDIR=/usr/sbin } license() { diff --git a/base/zstd/build.sh b/base/zstd/build.sh index f0872bb..f92f308 100644 --- a/base/zstd/build.sh +++ b/base/zstd/build.sh @@ -9,12 +9,12 @@ fetch() { build() { cd $pkgname-$pkgver - gmake + bad --gmake gmake } package() { cd $pkgname-$pkgver - gmake install PREFIX=/usr DESTDIR=$pkgdir + bad --gmake gmake install PREFIX=/usr DESTDIR=$pkgdir } license() { From 1b869812b8da3541cf5461cead8016705bd1e68a Mon Sep 17 00:00:00 2001 From: 404dcd Date: Sat, 9 Oct 2021 18:36:36 +0100 Subject: [PATCH 017/151] Couple typos (#4) --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 077630b..a86f91d 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ To create an ISO from a non-iglunix OS please see https://github.com/iglunix/igl ## Is this GNU/Linux No, GNU currently contributes roughly 10 MiB of code in the base system whilst, -LLVM and Linux both contribute aproximately 1 GiB each. Instead we suggest that +LLVM and Linux both contribute approximately 1 GiB each. Instead we suggest that one should refer to Igluinx running on the Linux kernel as LLVM/Musl/Linux. LLVM and Linux because they are the two largest packages and make up the majority of the base system, and Musl to be explicit about the C library, @@ -34,8 +34,8 @@ Because of this I haven't got far at all porting Iglunix to Darwin based systems such as MacOS and PureDarwin. ## Web Browsers -Iglunix currently has qtwebengine running (with sandboxing broken on atleast -aarch64). This does require 3 extra GNU dependencies ontop of GNU Make: +Iglunix currently has qtwebengine running (with sandboxing broken on at least +aarch64). This does require 3 extra GNU dependencies on top of GNU Make: `gperf`, `gm4`, `bison`. This also requires dbus however it is only needed at build time and for this reason we are working on a stub implementation. @@ -44,22 +44,22 @@ at build time and for this reason we are working on a stub implementation. |standard tool | iglunix tool | use | |--------------|--------------------|----------------------------------| |glibc | musl | libc | -|glibc | libexecinfo | backtrace functions | +|glibc | libexecinfo | Backtrace functions | |libstdc++ | libc++ | C++ standard library | -|libgcc | libunwind | stack unwinding | -|libgcc | complier-rt | compiler builtins | +|libgcc | libunwind | Stack unwinding | +|libgcc | complier-rt | Compiler builtins | |bison | byacc | POSIX yacc | |coreutils | toybox+busybox | POSIX utilities | |gcc | clang | C++ compiler | -|zlib | zlib-ng | compression library | +|zlib | zlib-ng | Compression library | |gmake | bmake, others | POSIX Make implementation | |ninja | samurai | Ninja build implementation | |GNU M4 | OpenBSD M4 | POSIX M4 implementation | |ncurses | netbsd-curses | X/Open Curses implementation | |bash | mksh | Shell | |Linux PAM | Open PAM | Pluggable Authentication Modules | -|sudo | doas | privalidge esculation | -|pkg-config | pkgconf | package configuration tool | +|sudo | doas | Privilege escalation | +|pkg-config | pkgconf | Package configuration tool | |e2fsprogs | make_ext4fs | Make an ext4 file system | From 64ec36b51aeaa93a478de35571b16abeca691df7 Mon Sep 17 00:00:00 2001 From: Ella-0 <23418164+Ella-0@users.noreply.github.com> Date: Mon, 11 Oct 2021 17:30:08 +0100 Subject: [PATCH 018/151] musl: build without gnu make --- linux/musl/bits.meson.build | 28 ++++++++ linux/musl/build.sh | 36 ++++++---- linux/musl/crt.meson.build | 45 ++++++++++++ linux/musl/glob.sh | 23 ++++++ linux/musl/globbits.sh | 13 ++++ linux/musl/meson.build | 136 ++++++++++++++++++++++++++++++++++++ linux/musl/version_h.sh | 2 + 7 files changed, 271 insertions(+), 12 deletions(-) create mode 100644 linux/musl/bits.meson.build create mode 100644 linux/musl/crt.meson.build create mode 100755 linux/musl/glob.sh create mode 100755 linux/musl/globbits.sh create mode 100644 linux/musl/meson.build create mode 100755 linux/musl/version_h.sh diff --git a/linux/musl/bits.meson.build b/linux/musl/bits.meson.build new file mode 100644 index 0000000..5a40c05 --- /dev/null +++ b/linux/musl/bits.meson.build @@ -0,0 +1,28 @@ +alltypes_h = custom_target( + 'alltypes.h', + output : 'alltypes.h', + input : [ + meson.project_source_root() + '/tools/mkalltypes.sed', + meson.project_source_root() + '/arch/'+arch+'/bits/alltypes.h.in', + meson.project_source_root() + '/include/alltypes.h.in' + ], + command : ['sed', '-f', '@INPUT0@', '@INPUT1@', '@INPUT2@'], + capture : true +) + +syscall_h_in = custom_target( + 'syscall.in', + output : 'syscall.in', + input : meson.project_source_root() + '/arch/'+arch+'/bits/syscall.h.in', + command : ['sed', '-n', '-e', 's/__NR_/SYS_/p', '@INPUT@'], + capture : true +) + +syscall_h = custom_target( + 'syscall.h', + output : 'syscall.h', + input : [ meson.project_source_root() + '/arch/'+arch+'/bits/syscall.h.in', syscall_h_in ], + command : ['cat', '@INPUT0@', '@INPUT1@'], + capture : true +) + diff --git a/linux/musl/build.sh b/linux/musl/build.sh index 9330ded..de64617 100644 --- a/linux/musl/build.sh +++ b/linux/musl/build.sh @@ -8,35 +8,47 @@ ext="dev" fetch() { curl "https://musl.libc.org/releases/$pkgname-$pkgver.tar.gz" -o $pkgname-$pkgver.tar.gz tar -xf $pkgname-$pkgver.tar.gz + cd $pkgname-$pkgver + cp ../../meson.build . + cp ../../glob.sh . + cp ../../globbits.sh . + cp ../../version_h.sh . + cp ../../crt.meson.build crt/meson.build + mkdir bits + cp ../../bits.meson.build bits/meson.build + mkdir build } build() { cd $pkgname-$pkgver - ./configure \ - --prefix=/usr \ - --build=$(uname -m)-unknown-linux-musl \ - --host=$(uname -m)-unknown-linux-musl \ - --enable-wrapper=no - gmake + cd build + meson .. -Dprefix=/usr + + samu } package() { cd $pkgname-$pkgver - gmake install DESTDIR=$pkgdir - rm -r $pkgdir/usr/include + cd build + DESTDIR=$pkgdir samu install + + cd .. + + rm -rf $pkgdir/usr/include + install -d $pkgdir/usr/bin + install -d $pkgdir/lib - rm $pkgdir/lib/ld-musl-$(uname -m).so.1 mv $pkgdir/usr/lib/libc.so $pkgdir/lib/ld-musl-$(uname -m).so.1 - ln -sr $pkgdir/lib/ld-musl-$(uname -m).so.1 $pkgdir/usr/lib/libc.so - ln -sr $pkgdir/lib/ld-musl-$(uname -m).so.1 $pkgdir/usr/bin/ldd } package_dev() { cd $pkgname-$pkgver - gmake install DESTDIR=$pkgdir + cd build + DESTDIR=$pkgdir samu install + rm $pkgdir/usr/lib/*.so rm -rf $pkgdir/lib } diff --git a/linux/musl/crt.meson.build b/linux/musl/crt.meson.build new file mode 100644 index 0000000..23c4b25 --- /dev/null +++ b/linux/musl/crt.meson.build @@ -0,0 +1,45 @@ +Scrt1 = custom_target('Scrt1.o', + output : 'Scrt1.o', + input : 'Scrt1.c', + command : [ cc.cmd_array(), inc_dir_flags, c_args, '-DCRT', '-c', '-o', '@OUTPUT@', '@INPUT@' ], + depends : [ alltypes_h, syscall_h, version_h ], + install : true, + install_dir: 'lib' +) + +rcrt1 = custom_target('rcrt1.o', + output : 'rcrt1.o', + input : 'rcrt1.c', + command : [ cc.cmd_array(), inc_dir_flags, c_args, '-DCRT', '-c', '-o', '@OUTPUT@', '@INPUT@' ], + depends : [ alltypes_h, syscall_h, version_h ], + install : true, + install_dir: 'lib' +) + +crt1 = custom_target('crt1.o', + output : 'crt1.o', + input : 'crt1.c', + command : [ cc.cmd_array(), inc_dir_flags, c_args, '-DCRT', '-c', '-o', '@OUTPUT@', '@INPUT@' ], + depends : [ alltypes_h, syscall_h, version_h ], + install : true, + install_dir: 'lib' +) + +crti = custom_target('crti.o', + output : 'crti.o', + input : target_machine.cpu_family() + '/crti.s', + command : [ cc.cmd_array(), inc_dir_flags, c_args, '-DCRT', '-c', '-o', '@OUTPUT@', '@INPUT@' ], + depends : [ alltypes_h, syscall_h, version_h ], + install : true, + install_dir: 'lib' +) + +crtn = custom_target('crtn.o', + output : 'crtn.o', + input : target_machine.cpu_family() + '/crtn.s', + command : [ cc.cmd_array(), inc_dir_flags, c_args, '-DCRT', '-c', '-o', '@OUTPUT@', '@INPUT@' ], + depends : [ alltypes_h, syscall_h, version_h ], + install : true, + install_dir: 'lib' +) + diff --git a/linux/musl/glob.sh b/linux/musl/glob.sh new file mode 100755 index 0000000..959e6a2 --- /dev/null +++ b/linux/musl/glob.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +ARCH=$1 +MALLOC_IMPL=mallocng + +ARCH_FILES=src/*/x86_64/*.[csS] + +HAVE=$(echo $ARCH_FILES | tr ' ' '\n' | sed 's|'$ARCH/'||g' | cut -d'.' -f 1) +echo $ARCH_FILES | tr ' ' '\n' + +FILES=$(echo src/*/*.[csS] | tr ' ' '\n') +for have in $HAVE; do + FILES=$(echo $FILES | tr ' ' '\n' | grep -v $have'.[csS]') +done + +echo $FILES | tr ' ' '\n' + +echo src/malloc/$MALLOC_IMPL/*.[csS] | tr ' ' '\n' + +#find src/*/ -maxdepth 1 -name '*.[csS]' + +#find src/*/$ARCH -maxdepth 1 -name '*.[csS]' + diff --git a/linux/musl/globbits.sh b/linux/musl/globbits.sh new file mode 100755 index 0000000..a6d4a20 --- /dev/null +++ b/linux/musl/globbits.sh @@ -0,0 +1,13 @@ +#!/bin/sh +ARCH=$1 + +ARCH_INC=arch/$ARCH/bits/*.h +echo $ARCH_INC | tr ' ' '\n' + +HAVE=$(echo $ARCH_INC | tr ' ' '\n' | sed 's|'$ARCH'|generic|g') + +INCLUDES=arch/generic/bits/*.h +for inc in $HAVE; do + INCLUDES=$(echo $INCLUDES | tr ' ' '\n' | grep -v $inc) +done +echo $INCLUDES | tr ' ' '\n' diff --git a/linux/musl/meson.build b/linux/musl/meson.build new file mode 100644 index 0000000..8ec8604 --- /dev/null +++ b/linux/musl/meson.build @@ -0,0 +1,136 @@ +project('musl', 'c', version : '1.2.2', license : 'MIT') + +cc = meson.get_compiler('c') +cmd = cc.cmd_array() +cmd += '--print-libgcc-file-name' +libgcc = run_command(cmd) +libgcc = libgcc.stdout().strip() +message('libgcc: ', libgcc) + +globbed_sources = run_command(meson.project_source_root() + '/glob.sh', target_machine.cpu_family()) +newline= ''' +''' +globbed_sources = globbed_sources.stdout().strip().split(newline) + +globbed_headers = run_command(meson.project_source_root() + '/globbits.sh', target_machine.cpu_family()) + +newline= ''' +''' +globbed_headers = globbed_headers.stdout().strip().split(newline) + +install_headers(globbed_headers, subdir: 'bits') +install_headers( + run_command('find', meson.project_source_root() + '/include/', '-name', '*.h').stdout().strip().split(newline) +) +install_headers( + run_command('find', meson.project_source_root() + '/include/net', '-name', '*.h').stdout().strip().split(newline), + subdir: 'net' +) +install_headers( + run_command('find', meson.project_source_root() + '/include/netpacket', '-name', '*.h').stdout().strip().split(newline), + subdir: 'netpacket' +) +install_headers( + run_command('find', meson.project_source_root() + '/include/sys', '-name', '*.h').stdout().strip().split(newline), + subdir: 'sys' +) +install_headers( + run_command('find', meson.project_source_root() + '/include/scsi', '-name', '*.h').stdout().strip().split(newline), + subdir: 'scsi' +) +install_headers( + run_command('find', meson.project_source_root() + '/include/arpa', '-name', '*.h').stdout().strip().split(newline), + subdir: 'arpa' +) +install_headers( + run_command('find', meson.project_source_root() + '/include/netinet', '-name', '*.h').stdout().strip().split(newline), + subdir: 'netinet' +) + +message(globbed_headers) + +c_args = [ + '-pipe', + '-fomit-frame-pointer', + '-fno-unwind-tables', + '-fno-asynchronous-unwind-tables', + '-ffunction-sections', + '-fdata-sections', + '-std=c99', '-ffreestanding', '-nostdinc', + '-D_XOPEN_SOURCE=700', + '-fno-stack-protector', + '-fPIC' +] + +ld_args = [ + '-nostdlib', + '-Wl,--dynamic-list='+meson.project_source_root()+'/dynamic.list', + '-Wl,-e,_dlstart', + libgcc +] + +arch = target_machine.cpu() + +inc_dir_flags = [ + '-I'+meson.project_source_root()+'/arch/' + arch, + '-I'+meson.project_source_root()+'/arch/generic', + '-I'+meson.project_source_root()+'/src/internal', + '-I'+meson.project_source_root()+'/src/include', + '-I'+meson.project_source_root()+'/include', + '-I'+meson.project_build_root() +] + +inc_dirs = include_directories( + 'arch/' + arch, + 'arch/generic', + 'src/internal', + 'src/include', + 'include' +) + +subdir('bits/') + +ldso_sources = [ + 'ldso/dlstart.c', + 'ldso/dynlink.c', +] + +version_h = custom_target( + 'version.h', + output : 'version.h', + command : [ meson.project_source_root()+'/version_h.sh' ], + capture : true +) + +shared_library('c', + ldso_sources, + globbed_sources, + alltypes_h, + syscall_h, + version_h, + c_args: c_args, link_args: ld_args, + include_directories: inc_dirs, + install: true +) + +static_library('c', + ldso_sources, + globbed_sources, + alltypes_h, + syscall_h, + version_h, + c_args: c_args, link_args: ld_args, + include_directories: inc_dirs, + install: true +) + +static_library('crypt', install: true) +static_library('dl', install: true) +static_library('m', install: true) +static_library('rt', install: true) +static_library('pthread', install: true) +static_library('util', install: true) +static_library('xnet', install: true) + +subdir('crt') + diff --git a/linux/musl/version_h.sh b/linux/musl/version_h.sh new file mode 100755 index 0000000..3e88631 --- /dev/null +++ b/linux/musl/version_h.sh @@ -0,0 +1,2 @@ +#!/bin/sh +printf '#define VERSION "%s"\n' $(sh ./tools/version.sh) From b3fa8f77d8f6e3ca2d0a25c2de3511c44238ab2a Mon Sep 17 00:00:00 2001 From: Ella-0 <23418164+Ella-0@users.noreply.github.com> Date: Mon, 11 Oct 2021 17:40:06 +0100 Subject: [PATCH 019/151] musl: fix install of syscall.h and alltypes.h --- linux/musl/bits.meson.build | 8 ++++++-- linux/musl/meson.build | 11 +++++++---- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/linux/musl/bits.meson.build b/linux/musl/bits.meson.build index 5a40c05..3e3bd59 100644 --- a/linux/musl/bits.meson.build +++ b/linux/musl/bits.meson.build @@ -7,7 +7,9 @@ alltypes_h = custom_target( meson.project_source_root() + '/include/alltypes.h.in' ], command : ['sed', '-f', '@INPUT0@', '@INPUT1@', '@INPUT2@'], - capture : true + capture : true, + install : true, + install_dir : 'include/bits/' ) syscall_h_in = custom_target( @@ -23,6 +25,8 @@ syscall_h = custom_target( output : 'syscall.h', input : [ meson.project_source_root() + '/arch/'+arch+'/bits/syscall.h.in', syscall_h_in ], command : ['cat', '@INPUT0@', '@INPUT1@'], - capture : true + capture : true, + install : true, + install_dir : 'include/bits/' ) diff --git a/linux/musl/meson.build b/linux/musl/meson.build index 8ec8604..483817d 100644 --- a/linux/musl/meson.build +++ b/linux/musl/meson.build @@ -5,6 +5,10 @@ cmd = cc.cmd_array() cmd += '--print-libgcc-file-name' libgcc = run_command(cmd) libgcc = libgcc.stdout().strip() + +arch = target_machine.cpu() + + message('libgcc: ', libgcc) globbed_sources = run_command(meson.project_source_root() + '/glob.sh', target_machine.cpu_family()) @@ -12,10 +16,9 @@ newline= ''' ''' globbed_sources = globbed_sources.stdout().strip().split(newline) + globbed_headers = run_command(meson.project_source_root() + '/globbits.sh', target_machine.cpu_family()) -newline= ''' -''' globbed_headers = globbed_headers.stdout().strip().split(newline) install_headers(globbed_headers, subdir: 'bits') @@ -47,6 +50,8 @@ install_headers( subdir: 'netinet' ) +subdir('bits/') + message(globbed_headers) c_args = [ @@ -69,7 +74,6 @@ ld_args = [ libgcc ] -arch = target_machine.cpu() inc_dir_flags = [ '-I'+meson.project_source_root()+'/arch/' + arch, @@ -88,7 +92,6 @@ inc_dirs = include_directories( 'include' ) -subdir('bits/') ldso_sources = [ 'ldso/dlstart.c', From 5c6531dc76f1387843ed5dba2ce53b4486d6926d Mon Sep 17 00:00:00 2001 From: Ella-0 <23418164+Ella-0@users.noreply.github.com> Date: Mon, 25 Oct 2021 11:26:07 +0000 Subject: [PATCH 020/151] lots of package moving --- {base => extra}/go/build.sh | 0 {base => extra}/libexecinfo/build.sh | 0 {base => extra}/openpam/build.sh | 0 {base => extra}/pfetch/build.sh | 0 {base => extra}/rust/abyss-install-template-shebang.patch | 0 {base => extra}/rust/abyss-libunwind.patch | 0 {base => extra}/rust/alpine-crt.patch | 0 {base => extra}/rust/alpine-move-py.patch | 0 {base => extra}/rust/build.sh | 0 {base => extra}/rust/libexec.patch | 0 {base => extra}/rust/libressl.patch | 0 {base => extra}/rust/llvm_crt.patch | 0 {base => extra}/rust/unfreeze.patch | 0 {base => extra}/rust/vendored-ssl.patch | 0 {base => extra}/zig/build.sh | 0 {base => extra}/zig/llvm-req-arch.patch | 0 {extra => old}/bin86/build.sh | 0 {extra => old}/dropbear/build.sh | 0 {extra => old}/glibr/build.sh | 0 {linux => old}/lilo/build.sh | 0 {linux => old}/lilo/checkit.patch | 0 21 files changed, 0 insertions(+), 0 deletions(-) rename {base => extra}/go/build.sh (100%) rename {base => extra}/libexecinfo/build.sh (100%) rename {base => extra}/openpam/build.sh (100%) rename {base => extra}/pfetch/build.sh (100%) rename {base => extra}/rust/abyss-install-template-shebang.patch (100%) rename {base => extra}/rust/abyss-libunwind.patch (100%) rename {base => extra}/rust/alpine-crt.patch (100%) rename {base => extra}/rust/alpine-move-py.patch (100%) rename {base => extra}/rust/build.sh (100%) rename {base => extra}/rust/libexec.patch (100%) rename {base => extra}/rust/libressl.patch (100%) rename {base => extra}/rust/llvm_crt.patch (100%) rename {base => extra}/rust/unfreeze.patch (100%) rename {base => extra}/rust/vendored-ssl.patch (100%) rename {base => extra}/zig/build.sh (100%) rename {base => extra}/zig/llvm-req-arch.patch (100%) rename {extra => old}/bin86/build.sh (100%) rename {extra => old}/dropbear/build.sh (100%) rename {extra => old}/glibr/build.sh (100%) rename {linux => old}/lilo/build.sh (100%) rename {linux => old}/lilo/checkit.patch (100%) diff --git a/base/go/build.sh b/extra/go/build.sh similarity index 100% rename from base/go/build.sh rename to extra/go/build.sh diff --git a/base/libexecinfo/build.sh b/extra/libexecinfo/build.sh similarity index 100% rename from base/libexecinfo/build.sh rename to extra/libexecinfo/build.sh diff --git a/base/openpam/build.sh b/extra/openpam/build.sh similarity index 100% rename from base/openpam/build.sh rename to extra/openpam/build.sh diff --git a/base/pfetch/build.sh b/extra/pfetch/build.sh similarity index 100% rename from base/pfetch/build.sh rename to extra/pfetch/build.sh diff --git a/base/rust/abyss-install-template-shebang.patch b/extra/rust/abyss-install-template-shebang.patch similarity index 100% rename from base/rust/abyss-install-template-shebang.patch rename to extra/rust/abyss-install-template-shebang.patch diff --git a/base/rust/abyss-libunwind.patch b/extra/rust/abyss-libunwind.patch similarity index 100% rename from base/rust/abyss-libunwind.patch rename to extra/rust/abyss-libunwind.patch diff --git a/base/rust/alpine-crt.patch b/extra/rust/alpine-crt.patch similarity index 100% rename from base/rust/alpine-crt.patch rename to extra/rust/alpine-crt.patch diff --git a/base/rust/alpine-move-py.patch b/extra/rust/alpine-move-py.patch similarity index 100% rename from base/rust/alpine-move-py.patch rename to extra/rust/alpine-move-py.patch diff --git a/base/rust/build.sh b/extra/rust/build.sh similarity index 100% rename from base/rust/build.sh rename to extra/rust/build.sh diff --git a/base/rust/libexec.patch b/extra/rust/libexec.patch similarity index 100% rename from base/rust/libexec.patch rename to extra/rust/libexec.patch diff --git a/base/rust/libressl.patch b/extra/rust/libressl.patch similarity index 100% rename from base/rust/libressl.patch rename to extra/rust/libressl.patch diff --git a/base/rust/llvm_crt.patch b/extra/rust/llvm_crt.patch similarity index 100% rename from base/rust/llvm_crt.patch rename to extra/rust/llvm_crt.patch diff --git a/base/rust/unfreeze.patch b/extra/rust/unfreeze.patch similarity index 100% rename from base/rust/unfreeze.patch rename to extra/rust/unfreeze.patch diff --git a/base/rust/vendored-ssl.patch b/extra/rust/vendored-ssl.patch similarity index 100% rename from base/rust/vendored-ssl.patch rename to extra/rust/vendored-ssl.patch diff --git a/base/zig/build.sh b/extra/zig/build.sh similarity index 100% rename from base/zig/build.sh rename to extra/zig/build.sh diff --git a/base/zig/llvm-req-arch.patch b/extra/zig/llvm-req-arch.patch similarity index 100% rename from base/zig/llvm-req-arch.patch rename to extra/zig/llvm-req-arch.patch diff --git a/extra/bin86/build.sh b/old/bin86/build.sh similarity index 100% rename from extra/bin86/build.sh rename to old/bin86/build.sh diff --git a/extra/dropbear/build.sh b/old/dropbear/build.sh similarity index 100% rename from extra/dropbear/build.sh rename to old/dropbear/build.sh diff --git a/extra/glibr/build.sh b/old/glibr/build.sh similarity index 100% rename from extra/glibr/build.sh rename to old/glibr/build.sh diff --git a/linux/lilo/build.sh b/old/lilo/build.sh similarity index 100% rename from linux/lilo/build.sh rename to old/lilo/build.sh diff --git a/linux/lilo/checkit.patch b/old/lilo/checkit.patch similarity index 100% rename from linux/lilo/checkit.patch rename to old/lilo/checkit.patch From 0fa4d5617cf277dc6f7d1f2b89870f6c810c0e4f Mon Sep 17 00:00:00 2001 From: Ella-0 <23418164+Ella-0@users.noreply.github.com> Date: Mon, 25 Oct 2021 11:26:47 +0000 Subject: [PATCH 021/151] add nodejs --- extra/nodejs/build.sh | 38 +++++++++++++++++++++++++++++++ extra/nodejs/remove-latomic.patch | 27 ++++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 extra/nodejs/build.sh create mode 100644 extra/nodejs/remove-latomic.patch diff --git a/extra/nodejs/build.sh b/extra/nodejs/build.sh new file mode 100644 index 0000000..8e54976 --- /dev/null +++ b/extra/nodejs/build.sh @@ -0,0 +1,38 @@ +pkgname=nodejs +pkgver=16.6.1 + +fetch() { + curl -L "https://nodejs.org/dist/v$pkgver/node-v$pkgver.tar.gz" -o $pkgname-$pkgver.tar.xz + tar -xf $pkgname-$pkgver.tar.xz + mv node-v$pkgver $pkgname-$pkgver + cd $pkgname-$pkgver + sed -i 's/-latomic//' node.gyp +} + +build() { + cd $pkgname-$pkgver + ./configure \ + --shared-zlib \ + --shared-openssl \ + --with-intl=none \ + --without-etw \ + --without-dtrace \ + --without-report \ + --without-node-snapshot \ + --without-node-code-cache \ + --ninja + + samu -C out/Release +} + +package() { + cd $pkgname-$pkgver + + ./tools/install.py install $pkgdir /usr +} + +license() { + cd $pkgname-$pkgver + cat LICENSE +# cat COPYING +} diff --git a/extra/nodejs/remove-latomic.patch b/extra/nodejs/remove-latomic.patch new file mode 100644 index 0000000..81e2f69 --- /dev/null +++ b/extra/nodejs/remove-latomic.patch @@ -0,0 +1,27 @@ +From 8dbc49deefb50f4af05710d3e6ad1ca7ff6dbfac Mon Sep 17 00:00:00 2001 +From: Ishimoto Shinobu +Date: Sun, 21 Feb 2021 09:43:21 +0900 +Subject: [PATCH] remove -latomic library + +Signed-off-by: Ishimoto Shinobu +--- + node.gyp | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/node.gyp b/node.gyp +index 131461de..051d2816 100644 +--- a/node.gyp ++++ b/node.gyp +@@ -343,9 +343,6 @@ + '-Wl,-bnoerrmsg', + ], + }], +- ['OS == "linux" and llvm_version != "0.0"', { +- 'libraries': ['-latomic'], +- }], + ], + }, + +-- +2.29.2 + From 32d66a7f568484a141d904160f283f683c65730c Mon Sep 17 00:00:00 2001 From: Firas Khalil Khana Date: Thu, 9 Dec 2021 22:31:48 +0200 Subject: [PATCH 022/151] Fix typo (#6) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a86f91d..147a94c 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ at build time and for this reason we are working on a stub implementation. |glibc | libexecinfo | Backtrace functions | |libstdc++ | libc++ | C++ standard library | |libgcc | libunwind | Stack unwinding | -|libgcc | complier-rt | Compiler builtins | +|libgcc | compiler-rt | Compiler builtins | |bison | byacc | POSIX yacc | |coreutils | toybox+busybox | POSIX utilities | |gcc | clang | C++ compiler | From b859e777d08df73bb09a509db3b0dbd1860d16f5 Mon Sep 17 00:00:00 2001 From: Ella Stanforth <23418164+Ella-0@users.noreply.github.com> Date: Sun, 26 Dec 2021 12:40:14 +0000 Subject: [PATCH 023/151] lots of stuff --- base/bmake/build.sh | 9 +- base/bmake/no-test.patch | 10 +- base/byacc/build.sh | 10 +- base/ca-certificates/build.sh | 59 --- .../libressl-update-rehash.patch | 14 - base/curl/build.sh | 5 +- base/curl/f | Bin 0 -> 4390 bytes base/doas/build.sh | 3 +- base/fakeroot/build.sh | 30 ++ base/fakeroot/no64.patch | 17 + base/fakeroot/stdint.patch | 34 ++ base/flex/build.sh | 1 + base/llvm/build.sh | 2 +- base/meson/build.sh | 7 +- base/openssh/build.sh | 10 +- base/openssl/build.sh | 14 +- base/openssl/update-ca.sh | 4 + base/perl/build.sh | 8 +- base/python/build.sh | 2 +- base/toybox/build.sh | 12 +- base/toybox/mksh-make.patch | 24 +- base/toybox/xxd-i.patch | 16 + extra/json-c/build.sh | 30 ++ extra/pcre/build.sh | 32 ++ extra/pcre2/build.sh | 31 ++ extra/rust/build.sh | 11 +- gui/autotiling-rs/build.sh | 30 ++ gui/foot/build.sh | 36 ++ gui/freetype-harbuzz/build.sh | 98 +++++ gui/freetype-harbuzz/ft_meson.patch | 11 + gui/freetype-harbuzz/meson.build | 411 ++++++++++++++++++ gui/freetype/build.sh | 6 +- gui/harfbuzz/build.sh | 6 +- gui/i3status-rs/build.sh | 30 ++ gui/libdrm/build.sh | 8 +- gui/libpng/build.sh | 5 + gui/libudev-zero/build.sh | 7 +- gui/mesa/build.sh | 6 +- gui/mesa/v3d.patch | 10 + gui/mesa/v3dx_format_table.c | 364 ++++++++++++++++ gui/pango/build.sh | 46 ++ gui/pango/no-fribidi.patch | 228 ++++++++++ gui/pipewire/build.sh | 53 ++- gui/pipewire/no-dbus.patch | 84 ---- gui/seatd/build.sh | 6 +- gui/sway/build.sh | 30 +- gui/swaybg/build.sh | 30 ++ gui/vulkan-headers/build.sh | 4 +- gui/wayland-protocols/build.sh | 20 +- gui/wayland/build.sh | 15 +- gui/wlroots/build.sh | 21 +- gui/xkeyboard-config/build.sh | 30 ++ linux/busybox/build.sh | 11 +- linux/busybox/clang-fix.patch | 1 + linux/busybox/modprobe.patch | 0 linux/linux/build.sh | 31 +- linux/linux/v3d-enable.patch | 30 ++ linux/raspberrypi-linux/build.sh | 18 +- linux/rpi-linux-rev2/build.sh | 50 +++ linux/rpi-linux-rev2/kernel-byacc.patch | 35 ++ {gui => old}/alacritty/build.sh | 0 {gui => old}/graphicsmagick/build.sh | 0 {gui => old}/imagemagick/build.sh | 0 {base => old}/pci-ids/build.sh | 0 {gui => old}/river/build.sh | 0 {gui => old}/sqlite/build.sh | 0 {gui => old}/swc/build.sh | 0 {gui => old}/swc/config.mk | 0 {gui => old}/swvkc/build.sh | 0 {gui => old}/velox/build.sh | 0 {gui => old}/velox/config.mk | 0 {gui => old}/velox/velox.conf | 0 {gui => old}/webkit/build.sh | 0 {gui => old}/wld/build.sh | 0 pkgs/cava/build.sh | 28 ++ pkgs/imv/build.sh | 32 ++ pkgs/kak-lsp/build.sh | 24 - pkgs/libslirp/build.sh | 31 ++ pkgs/qtbase/build.sh | 37 -- pkgs/qtbase/musl-socket.patch | 11 - pkgs/qtbase/qplatformdefs.h | 95 ---- pkgs/qtwayland/build.sh | 26 -- pkgs/ribidi/build.sh | 30 -- pkgs/strace/build.sh | 28 ++ pkgs/vulkan-validation-layers/build.sh | 34 ++ scripts/buildbase.sh | 4 + scripts/iglu.sh | 2 +- scripts/iglupkg | 125 ++++++ scripts/iglupkg.sh | 9 +- scripts/install.sh | 5 +- templates/simple.build.sh | 1 + 91 files changed, 2156 insertions(+), 532 deletions(-) delete mode 100644 base/ca-certificates/build.sh delete mode 100644 base/ca-certificates/libressl-update-rehash.patch create mode 100644 base/curl/f create mode 100644 base/fakeroot/build.sh create mode 100644 base/fakeroot/no64.patch create mode 100644 base/fakeroot/stdint.patch create mode 100755 base/openssl/update-ca.sh create mode 100644 extra/json-c/build.sh create mode 100644 extra/pcre/build.sh create mode 100644 extra/pcre2/build.sh create mode 100644 gui/autotiling-rs/build.sh create mode 100644 gui/foot/build.sh create mode 100644 gui/freetype-harbuzz/build.sh create mode 100644 gui/freetype-harbuzz/ft_meson.patch create mode 100644 gui/freetype-harbuzz/meson.build create mode 100644 gui/i3status-rs/build.sh create mode 100644 gui/mesa/v3d.patch create mode 100644 gui/mesa/v3dx_format_table.c create mode 100644 gui/pango/build.sh create mode 100644 gui/pango/no-fribidi.patch delete mode 100644 gui/pipewire/no-dbus.patch create mode 100644 gui/swaybg/build.sh create mode 100644 gui/xkeyboard-config/build.sh create mode 100644 linux/busybox/clang-fix.patch create mode 100644 linux/busybox/modprobe.patch create mode 100644 linux/linux/v3d-enable.patch create mode 100644 linux/rpi-linux-rev2/build.sh create mode 100644 linux/rpi-linux-rev2/kernel-byacc.patch rename {gui => old}/alacritty/build.sh (100%) rename {gui => old}/graphicsmagick/build.sh (100%) rename {gui => old}/imagemagick/build.sh (100%) rename {base => old}/pci-ids/build.sh (100%) rename {gui => old}/river/build.sh (100%) rename {gui => old}/sqlite/build.sh (100%) rename {gui => old}/swc/build.sh (100%) rename {gui => old}/swc/config.mk (100%) rename {gui => old}/swvkc/build.sh (100%) rename {gui => old}/velox/build.sh (100%) rename {gui => old}/velox/config.mk (100%) rename {gui => old}/velox/velox.conf (100%) rename {gui => old}/webkit/build.sh (100%) rename {gui => old}/wld/build.sh (100%) create mode 100644 pkgs/cava/build.sh create mode 100644 pkgs/imv/build.sh create mode 100644 pkgs/libslirp/build.sh delete mode 100644 pkgs/ribidi/build.sh create mode 100644 pkgs/strace/build.sh create mode 100644 pkgs/vulkan-validation-layers/build.sh create mode 100755 scripts/buildbase.sh create mode 100755 scripts/iglupkg diff --git a/base/bmake/build.sh b/base/bmake/build.sh index 00a1563..ead906d 100644 --- a/base/bmake/build.sh +++ b/base/bmake/build.sh @@ -1,8 +1,7 @@ -pkgver=20210420 +pkgver=20211024 pkgname=bmake mkdeps="" deps="" -ext="doc" fetch() { curl http://www.crufty.net/ftp/pub/sjg/bmake-$pkgver.tar.gz -o $pkgname-$pkgver.tar.gz @@ -23,12 +22,10 @@ package() { cd $pkgname-$pkgver ./bmake -m ./mk install DESTDIR=$pkgdir ln -sr $pkgdir/usr/bin/bmake $pkgdir/usr/bin/make - rm -r $pkgdir/usr/share/man } -package_doc() { - cd $pkgname-$pkgver - install -Dm644 ./bmake.1 $pkgdir/usr/share/man/man1/bmake.1 +backup() { + return } license() { diff --git a/base/bmake/no-test.patch b/base/bmake/no-test.patch index 1ad8ab7..afbf474 100644 --- a/base/bmake/no-test.patch +++ b/base/bmake/no-test.patch @@ -1,11 +1,11 @@ ---- ../bmakeb/bmake/boot-strap 2020-11-13 21:47:25.000000000 +0000 -+++ boot-strap 2020-12-27 17:26:13.126598658 +0000 -@@ -431,7 +431,7 @@ +--- a/boot-strap ++++ b/boot-strap +@@ -420,7 +420,7 @@ op_test() { [ -x bmake ] || op_build -- Bmake test || exit 1 -+ #Bmake test || exit 1 +- Bmake test "$@" || exit 1 ++ #Bmake test "$@" || exit 1 } op_clean() { diff --git a/base/byacc/build.sh b/base/byacc/build.sh index 9226c89..a127bad 100644 --- a/base/byacc/build.sh +++ b/base/byacc/build.sh @@ -1,9 +1,8 @@ -pkgver=20210802 +pkgver=20210808 pkgname=byacc deps="" mkdeps="bmake" bad="" -ext="doc" fetch() { curl https://invisible-island.net/datafiles/release/byacc.tar.gz -o $pkgname-$pkgver.tar.gz @@ -26,13 +25,10 @@ package() { cd $pkgname-$pkgver make install DESTDIR=$pkgdir ln -sr $pkgdir/usr/bin/byacc $pkgdir/usr/bin/yacc - rm -r $pkgdir/usr/share } -package_doc() { - cd $pkgname-$pkgver - make install DESTDIR=$pkgdir - rm -r $pkgdir/usr/bin +backup() { + } license() { diff --git a/base/ca-certificates/build.sh b/base/ca-certificates/build.sh deleted file mode 100644 index 4306cc1..0000000 --- a/base/ca-certificates/build.sh +++ /dev/null @@ -1,59 +0,0 @@ -pkgname=ca-certificates -pkgver=202200601 -pkgrel=2 -ext=doc -mkdeps="gmake" -deps="libressl" -bad="gmake" - -fetch(){ - curl http://ftp.debian.org/debian/pool/main/c/ca-certificates/ca-certificates_20200601~deb10u2.tar.xz -o $pkgname-$pkgver.tar.gz - tar -xf $pkgname-$pkgver.tar.gz - mv work $pkgname-$pkgver - cd $pkgname-$pkgver - #patch -p1 < ../../libressl-update-rehash.patch -} - - -build() { - cd $pkgname-$pkgver - bad --gmake gmake -} - -package() { - cd $pkgname-$pkgver - mkdir -p $pkgdir/usr/bin - mkdir -p $pkgdir/usr/sbin - mkdir -p $pkgdir/etc/ssl/ - mkdir -p $pkgdir/etc/ca-certificates/update.d - mkdir -p $pkgdir/usr/share/ca-certificates/ - - bad --gmake gmake install DESTDIR="$pkgdir" - - ( - echo "# Automatically generated by ${pkgname}-${pkgver}-${pkgrel}" - echo "# $(date -u)" - echo "# Do not edit." - cd "$pkgdir"/usr/share/ca-certificates - find . -name '*.crt' | sort | cut -b3- - ) > "$pkgdir"/etc/ca-certificates.conf - - cat > "$pkgdir"/etc/ca-certificates/update.d/certhash <<-EOF - #!/bin/sh - exec openssl certhash /etc/ssl/certs - EOF - - cat "$pkgdir"/usr/share/ca-certificates/mozilla/*.crt > $pkgdir/etc/ssl/cert.pem - chmod +x "$pkgdir"/etc/ca-certificates/update.d/certhash -} - -package_doc() { - cd $pkgname-$pkgver - install -d $pkgdir/usr/share/man/man8 - install -Dm644 ./sbin/update-ca-certificates.8 $pkgdir/usr/share/man/man8 -} - -license() { - cd $pkgname-$pkgver - cat debian/copyright -} diff --git a/base/ca-certificates/libressl-update-rehash.patch b/base/ca-certificates/libressl-update-rehash.patch deleted file mode 100644 index 566deb6..0000000 --- a/base/ca-certificates/libressl-update-rehash.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/sbin/update-ca-certificates -+++ b/sbin/update-ca-certificates -@@ -183,9 +183,9 @@ - done - if [ "$verbose" = 0 ] - then -- openssl rehash . > /dev/null -+ openssl certhash . > /dev/null - else -- openssl rehash -v . -+ openssl certhash -v . - fi - fi - diff --git a/base/curl/build.sh b/base/curl/build.sh index 64336f7..2783973 100644 --- a/base/curl/build.sh +++ b/base/curl/build.sh @@ -1,4 +1,4 @@ -pkgver=7.77.0 +pkgver=7.79.0 pkg_ver=$(echo $pkgver | tr '.' '_') pkgname=curl pkgrel=1 @@ -19,8 +19,7 @@ build() { cmake -G Ninja ../ \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DCURL_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt + -DCMAKE_INSTALL_LIBDIR=lib samu } diff --git a/base/curl/f b/base/curl/f new file mode 100644 index 0000000000000000000000000000000000000000..080b82adc5a23c04e73fa44bd46967caf49cda8a GIT binary patch literal 4390 zcmV+>5!vn^iwFn+00002|6+A!W@U0|Zf7kpE;BAPE@N_GbY%eTTWeF>NVCpo{fb#r zmDnjEY`~B;+0-#cA$p709NQ$Dq9`+##}^J`Y{*mcbBr90-SvWXJ*$-^lQap>!f_C zLDeg93k)5lnYv%nSt*qRG;jmkOC02Pt}!@DuU~JyHo~Z+tIOHM$?lw3EwkM-;qpS$ z&K+^R>4>Qa91+;Ah%U6@Z7hH#=mm1tN;GEfc_!T;khYxO4t#Eh5(fVbu*4I5%h)PD z0)gi&Rx_$_OA_kbgL`q92=*NqjRcRA5SifHs1w*W4Jc{KOGN@ zhZz6Ygv{;g_I7rjhR|BAx?BCV;{PvtY_R?ZtH<73Cnkgc&9i>zW3z9ynkOe;*s<9* zyUo6N#16l(Ra28-ar&*KqQNE z5tE~o5f2=A5=ju?CUj%LE-^@6vSLgH3bC9?SQf_E&{O#hS5_7V!*FZFZe_xT!gIy7 zKm|kbDgtIqgdqs(25`@fNOU&!1c!`7=RAP7-6(>9%g5XeqFA8=?zZXiV7z6M)U#w| zq`Y2*0^Ssk8zZ(e;zJ;G!$XvTD_Y4Ev=H1cKu8b)Jf3?cAfzB8XWT zf$|f3!h9K`xp)NGVd#kpDH7juc-Se;!jw58mw zEu`+{BEraPh`HCPn0U_d&&R{_e>&}+l*c{&-}ZjJ2L0b|wO)t*Z+9Q_|Mvb)^|}B1 z2?vBXmW4NVqQai0wICos_dkJjVOQ98wf075a}i!^LYAQs5u}hvgxA6`G_4DH3zCvM zOek7oszJJtB_o-HwxByhH^Ar(q1umhmC_+<*B*4)2xa*71SS0~)Dj<+a0IE5OE$$Km_)|IXKp|MF znj`JRhYEm@1zPaV7T_+irh$ShhA05_(+p!W482$opEPO0lHO)t`jIHiXx=~mAt*q`~K%ZPrGKX$2whReLOv}fEZBk zHrsv6?CH#Ew@%KEtoE_afBTYimo-m{NpxAg%on}^nk)&D|* zytn#o+CRG8U zPWKBEMGOdhoqhgb!u>7+N=P*kf*v5&>KBG-zz+cI7j$H8^Z3MqhN@+vG##Y!+3J}U zu$9%r0hVI>xd}YaNM*DUNTtzf!DDr@B(vVL=Fuk$#ZCu8&J; zWT}~%Y`8#n`Mz#xt{ShBaPo<#09F_^eP z++ZDQncgON3*P&#X|6x@koGEmH`vd!euFimt{A;NPu^T)LZHGecmom;hnDgtQ(7%S z1T29bEc9+E*YcRN_;#B1<~BTqj3&NLp)!gvuki>GfL4t~*jW;NL}C;m1&Oa}p*Oq~pJ^Zezzd0Vq&`uZhwuvp!r=^8d zFVJZ$;(>Zreu*AMn!U`eSx|x=rw#EcW_}Xm(!|4<4&bfwOCM{2oH<^t6d)V6Mu;8= zf%q`Qr)akb*yX^@xambS$q6e3Zp0`b0Bv|r`l6iQs2nV^?+R$)19pks|0Q#ABIVLB z7mGEhz2^m+@Te$Q4#7}LZ>=bX3ooH8m1PO09*4<1V@ng@5dr8gaY2{MqEIov z606`M$>yf)dJ&PvD*1@}ym(j#+7lj()e@RWEj z#~&-6;|0tsI0GM2C!WC3AR)wBZ59)9t*p^(EmYb_NoTmqn=V`?flZAdt-4|q%2tV| zk~}yl0x=XL8LAG*<58URz`$EnTu~}I(Sp(nD+8x!t};DXh=i3@vptP3suf|IN)bwO z0;qyI*SNBZ?G+E5bj90;_7RPw6j=-tnW0w6>j6i=m_5WC2kT5sfv+;JHxgIo%cDyn zCt_xyHPZ(sN3sHUigAyU7+vE)a!4#Gx*|%vc+I3)ut$bMYQLGg9;~!4Nr35YS+AnR zk5ey&ypX?ez#30mw$w}{5hQ-fpNc6HuHU}m8LQ(^-e8I=r`hR~u-_(c-n~n6c=i}1 z%tpL?#W63kg^@h~*jXGyN>yfM5b`A{3aG4-3IL#wD9Z-^A>;ZywkPa$G+)fj3Ywf{ zqmk2IE}m{nk;0r0ygDJ5tz1F!>%#Sy}tQa{FUA>?U_TLR}I51CJu}xXzq&#TIC5z&usNLqTgru&vi9q?R&c# z9F=x8kR#SNHY9KwZD!U}qX!ri8mo-_qx}q0yo=9L_i_!XONN_6j{V3Ag|TTFgUv83 z2D4Q&$ivwOw4sD@gopTLbiRKXj58lXAs0km)zx_US2+R#!oG4?D$W-Cm5R!5Wast1 zTkL;8(cjLi2Q2z_QCXPvShGHm&>W5L2igj!yrVNC^&Z=7-D^Iz2o6;-c9&VFl=npp zzd2)imsFz38~i+a&AmjdGat<$V1)l6($A-v_1)DA>%$hR>kB#Yx5tC&~sP&+|@o!SBsvMm+ug1mKJIjy(>@61?QSu z(W@-gF@;K7<%`Fblym&^Ch#AWmyaU2y41Xn)c1!KjY|c=16vvbdPO&LcNejW>p$ru zmIRs=4NzJWVNxuaG?gwQG#!`)>}ED72iOOa(;g z*Tq}FvC+r}HyVFaFACR@`8C!L-LV-sE)Vn*NI#xX7vEC?8|TRVB2yJF(lv#FFCZ*9 z<;4{Rgkgw*c%khr6gD-TZR>1DXS+J9>ugVF`#O80v)^@At6mg3ZlpJIL*N++{Ng;o zwi{@xR==9OIbgdNv*AP4mM^_gF_PdW?G*qIN{_4%OS~+6fY$ZO?7c^=n`! z*d=a7xMYxl6OXuZwQG6giLWjcWja*7Mxb7gr;?K>*_UYCIE1nghioAS zR8Vq6hEkDwLa2Gu9a-2xFnKM)3FeAOGDqT$EXwQjalpl`SW{Q1jb|Ks5{zttu&<1w zDr%eU3T2?%i9?sZEHK)HyE(6d!7SoNd$VleBq8_Iz$jNH31}Z!!5k#E0tWZI@sWsc zXFYDJ_{bHWLtD~#);iowX#0A$j|}>ZltEtDrvni;TxEc22pYCH`^-%ZcZwwG*xJP1 z=nQvOk8nM02+7TnBHw97df?i<{+$9K0M0^>HcN zU!QIC22&xU893CygX`iKI8eY~oj|B<@lejnFh)lXq;hN8t|rw-E99+|O$AXV7x^AJ zqP}PpwWDt+=*J6?3-NOi!fA80LL;+}UK|{RwP29zk>@MN8*$eomx9~}dJzjKdFJE* zysvRDKlOdcCQ-Zkm;!5x7K~j04IL79))~+%fGI+%hLzXCoWLJr5ctqqdJYKY&9>rk z`jG=}K=<8mia5@s)MaV21Ns!Q^Wj-*W?yh7!WPfT{}c~f1Uz(QL~|kyFYnVW>U3#x z`b|PMInwRxnrRSkjy0{|)=A4Kk+*(PSI{`(~377p` z#UvkLFxI>VsL3SRR(ZrL3qLCKWEbh=%~p(mXx^fbcLzb3JbCa@4vzDHcqBmzuOrmg zQ$O1in#ZEFOG$;teg8_z62$L~bCPHPw!{mX&gCRP(+-r=W0aq7Wmf(m;9ySWEbg)! zep^&eEGQ@DRhuofP55;hn(k30Qv{a|umQvC1MTi{I6d)N^UE<){js|WplEz<=4F2Wc|5j_YrQiSV zJpcap=NuSSN@F)JHPQf6iYB}US0%o?y)U-y+Wz*)sn?v}`ObE2xaV*&a>U+nThyK5 go9(?fzn8S<8UK7dAJ510@#`J`2ltJNzW_=A0Hz&oVgLXD literal 0 HcmV?d00001 diff --git a/base/doas/build.sh b/base/doas/build.sh index d8aa530..d0e856d 100644 --- a/base/doas/build.sh +++ b/base/doas/build.sh @@ -13,7 +13,8 @@ fetch() { build() { cd $pkgname-$pkgver - ./configure --prefix=/usr + ./configure --prefix=/usr \ + --without-pam gmake } diff --git a/base/fakeroot/build.sh b/base/fakeroot/build.sh new file mode 100644 index 0000000..6209b03 --- /dev/null +++ b/base/fakeroot/build.sh @@ -0,0 +1,30 @@ +pkgname=fakeroot +pkgver=1.26 + +fetch() { + curl "https://deb.debian.org/debian/pool/main/f/fakeroot/fakeroot_$pkgver.orig.tar.gz" -o $pkgname-$pkgver.tar.xz + tar -xf $pkgname-$pkgver.tar.xz + patch -p1 < ../../no64.patch + patch -p1 < ../../stdint.patch +} + +build() { + cd $pkgname-$pkgver + ./configure \ + --prefix=/usr \ + --build=$TRIPLE \ + --host=$TRIPLE + + gmake +} + +package() { + cd $pkgname-$pkgver + gmake install DESTDIR=$pkgdir +} + +license() { + cd $pkgname-$pkgver + cat LICENSE +# cat COPYING +} diff --git a/base/fakeroot/no64.patch b/base/fakeroot/no64.patch new file mode 100644 index 0000000..ff95f96 --- /dev/null +++ b/base/fakeroot/no64.patch @@ -0,0 +1,17 @@ +--- a/libfakeroot.c ++++ b/libfakeroot.c +@@ -81,12 +81,14 @@ + #define SEND_STAT64(a,b,c) send_stat64(a,b,c) + #define SEND_GET_STAT(a,b) send_get_stat(a,b) + #define SEND_GET_STAT64(a,b) send_get_stat64(a,b) ++#define SEND_GET_XATTR(a,b,c) send_get_xattr(a,b,c) + #define SEND_GET_XATTR64(a,b,c) send_get_xattr64(a,b,c) + #else + #define SEND_STAT(a,b,c) send_stat(a,b) + #define SEND_STAT64(a,b,c) send_stat64(a,b) + #define SEND_GET_STAT(a,b) send_get_stat(a) + #define SEND_GET_STAT64(a,b) send_get_stat64(a) ++#define SEND_GET_XATTR(a,b,c) send_get_xattr(a,b) + #define SEND_GET_XATTR64(a,b,c) send_get_xattr64(a,b) + #endif + diff --git a/base/fakeroot/stdint.patch b/base/fakeroot/stdint.patch new file mode 100644 index 0000000..efe227d --- /dev/null +++ b/base/fakeroot/stdint.patch @@ -0,0 +1,34 @@ +--- a/faked.c ++++ b/faked.c +@@ -514,11 +514,11 @@ + + #ifdef FAKEROOT_DB_PATH + if (find_path(i->buf.dev, i->buf.ino, roots, path)) +- fprintf(f,"mode=%llo,uid=%llu,gid=%llu,nlink=%llu,rdev=%llu %s\n", ++ fprintf(f,"mode=%"PRIo64",uid=%"PRIu64",gid=%"PRIu64",nlink=%"PRIu64",rdev=%"PRIu64" %s\n", + (uint64_t) i->buf.mode,(uint64_t) i->buf.uid,(uint64_t) i->buf.gid, + (uint64_t) i->buf.nlink,(uint64_t) i->buf.rdev,path); + #else +- fprintf(f,"dev=%llx,ino=%llu,mode=%llo,uid=%llu,gid=%llu,nlink=%llu,rdev=%llu\n", ++ fprintf(f,"dev=%"PRIx64",ino=%"PRIu64",mode=%"PRIo64",uid=%"PRIu64",gid=%"PRIu64",nlink=%"PRIu64",rdev=%"PRIu64"\n", + (uint64_t) i->buf.dev,(uint64_t) i->buf.ino,(uint64_t) i->buf.mode, + (uint64_t) i->buf.uid,(uint64_t) i->buf.gid,(uint64_t) i->buf.nlink, + (uint64_t) i->buf.rdev); +@@ -544,7 +544,7 @@ + + while(1){ + #ifdef FAKEROOT_DB_PATH +- r=scanf("mode=%llo,uid=%llu,gid=%llu,nlink=%llu,rdev=%llu "DB_PATH_SCAN"\n", ++ r=scanf("mode=%"PRIo64",uid=%"PRIu64",gid=%"PRIu64",nlink=%"PRIu64",rdev=%"PRIu64" "DB_PATH_SCAN"\n", + &stmode, &stuid, &stgid, &stnlink, &strdev, &path); + if (r != 6) + break; +@@ -559,7 +559,7 @@ + stdev = path_st.st_dev; + stino = path_st.st_ino; + #else +- r=scanf("dev=%llx,ino=%llu,mode=%llo,uid=%llu,gid=%llu,nlink=%llu,rdev=%llu\n", ++ r=scanf("dev=%"PRIx64",ino=%"PRIu64",mode=%"PRIo64",uid=%"PRIu64",gid=%"PRIu64",nlink=%"PRIu64",rdev=%"PRIu64"\n", + &stdev, &stino, &stmode, &stuid, &stgid, &stnlink, &strdev); + if (r != 7) + break; diff --git a/base/flex/build.sh b/base/flex/build.sh index 39472bb..c8eced7 100644 --- a/base/flex/build.sh +++ b/base/flex/build.sh @@ -19,6 +19,7 @@ build() { package() { cd $pkgname-$pkgver make install DESTDIR=$pkgdir + ln -sr $pkgdir/usr/bin/flex $pkgdir/usr/bin/lex } license() { diff --git a/base/llvm/build.sh b/base/llvm/build.sh index 25c4cbf..c546f18 100644 --- a/base/llvm/build.sh +++ b/base/llvm/build.sh @@ -1,4 +1,4 @@ -pkgver=12.0.1 +pkgver=13.0.0 pkgname=llvm bad="" ext="dev" diff --git a/base/meson/build.sh b/base/meson/build.sh index 51a2f83..9f1a025 100644 --- a/base/meson/build.sh +++ b/base/meson/build.sh @@ -1,8 +1,7 @@ -pkgver=0.58.1 +pkgver=0.60.2 pkgname=meson deps=python bad="" -ext="doc" fetch() { curl -L "https://github.com/mesonbuild/meson/releases/download/$pkgver/meson-$pkgver.tar.gz" -o $pkgname-$pkgver.tar.gz @@ -22,8 +21,8 @@ package() { python setup.py install --prefix=/usr --root=$pkgdir } -package_doc() { - echo $pkgdir +backup() { + return } license() { diff --git a/base/openssh/build.sh b/base/openssh/build.sh index 155094a..aa7d761 100644 --- a/base/openssh/build.sh +++ b/base/openssh/build.sh @@ -1,5 +1,5 @@ pkgname=openssh -pkgver=8.6p1 +pkgver=8.8p1 fetch() { curl "https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-$pkgver.tar.gz" -o $pkgname-$pkgver.tar.xz @@ -10,8 +10,8 @@ build() { cd $pkgname-$pkgver ./configure \ --prefix=/usr \ - --build=x86_64-unknown-linux-musl \ - --host=x86_64-unknown-linux-musl \ + --build=$TRIPLE \ + --host=$TRIPLE \ --libexecdir=/usr/lib make @@ -22,6 +22,10 @@ package() { make install DESTDIR=$pkgdir } +backup() { + return +} + license() { cd $pkgname-$pkgver cat LICENCE diff --git a/base/openssl/build.sh b/base/openssl/build.sh index 199bcb3..29b3eeb 100644 --- a/base/openssl/build.sh +++ b/base/openssl/build.sh @@ -21,20 +21,14 @@ build() { no-seed no-weak-ssl-ciphers \ -Wa,--noexecstack - make + make CC=cc } package() { cd $pkgname-$pkgver - make install_sw DESTDIR=$pkgdir - rm -rf $pkgdir/usr/lib/pkgconf - rm -rf $pkgdir/usr/include -} - -package_dev() { - cd $pkgname-$pkgver - make install_sw DESTDIR=$pkgdir - rm -rf $pkgdir/usr/bin + make install_sw install_ssldir DESTDIR=$pkgdir + install -d $pkgdir/usr/sbin + install -Dm755 ../../update-ca.sh $pkgdir/usr/sbin/update-ca } license() { diff --git a/base/openssl/update-ca.sh b/base/openssl/update-ca.sh new file mode 100755 index 0000000..4517ee9 --- /dev/null +++ b/base/openssl/update-ca.sh @@ -0,0 +1,4 @@ +#!/bin/sh +cd /etc/ssl && { + curl -LO https://curl.haxx.se/ca/cacert.pem -o /etc/ssl/certs/ca-certificates.crt +} diff --git a/base/perl/build.sh b/base/perl/build.sh index c346ec9..19fd417 100644 --- a/base/perl/build.sh +++ b/base/perl/build.sh @@ -1,8 +1,8 @@ pkgname=perl -pkgver=5.32.1 +pkgver=5.34.0 fetch() { - curl "https://www.cpan.org/src/5.0/perl-5.32.1.tar.gz" -o $pkgname-$pkgver.tar.xz + curl "https://www.cpan.org/src/5.0/perl-$pkgver.tar.gz" -o $pkgname-$pkgver.tar.xz tar -xf $pkgname-$pkgver.tar.xz } @@ -47,6 +47,10 @@ package() { rm -rf $pkgdir/usr/share/man } +backup() { + return +} + license() { cd $pkgname-$pkgver cat Copying diff --git a/base/python/build.sh b/base/python/build.sh index 3842b35..d1edb31 100644 --- a/base/python/build.sh +++ b/base/python/build.sh @@ -1,5 +1,5 @@ pkgname=python -pkgver=3.9.6 +pkgver=3.9.7 bad="" ext="doc" diff --git a/base/toybox/build.sh b/base/toybox/build.sh index caf27cd..d558bee 100644 --- a/base/toybox/build.sh +++ b/base/toybox/build.sh @@ -1,11 +1,12 @@ -pkgver=0.8.5 +pkgver=0.8.6 pkgname=toybox pkgrel=1 -deps="musl:pci-ids" +deps="musl" fetch() { curl "http://www.landley.net/toybox/downloads/$pkgname-$pkgver.tar.gz" -o $pkgname-$pkgver.tar.gz tar -xf $pkgname-$pkgver.tar.gz + curl "https://pci-ids.ucw.cz/v2.2/pci.ids" -o pci.ids cd $pkgname-$pkgver patch -p1 < ../../ls-colour.patch patch -p1 < ../../mksh-make.patch @@ -18,7 +19,14 @@ build() { CPUS=1 bad --gmake gmake } +backup() { + return +} + package() { + install -d $pkgdir/usr/share/misc + install -Dm 644 pci.ids $pkgdir/usr/share/misc + cd $pkgname-$pkgver # install -d $pkgdir/bin # install -Dm755 ./toybox $pkgdir/bin/ diff --git a/base/toybox/mksh-make.patch b/base/toybox/mksh-make.patch index ddd6241..4305543 100644 --- a/base/toybox/mksh-make.patch +++ b/base/toybox/mksh-make.patch @@ -1,5 +1,3 @@ -diff --git a/scripts/make.sh b/scripts/make.sh -index 5b2d5d81..2c5e4b93 100755 --- a/scripts/make.sh +++ b/scripts/make.sh @@ -106,8 +106,7 @@ genbuildsh() @@ -12,3 +10,25 @@ index 5b2d5d81..2c5e4b93 100755 then echo -n "Library probe" +--- a/scripts/genconfig.sh ++++ b/scripts/genconfig.sh +@@ -16,7 +16,7 @@ probecc() + # Symbol name is first argument, flags second, feed C file to stdin + probesymbol() + { +- probecc "${@:2}" 2>/dev/null && DEFAULT=y || DEFAULT=n ++ probecc $2 2>/dev/null && DEFAULT=y || DEFAULT=n + rm a.out 2>/dev/null + echo -e "config $1\n\tbool" || exit 1 + echo -e "\tdefault $DEFAULT\n" || exit 1 +--- a/scripts/make.sh ++++ b/scripts/make.sh +@@ -15,7 +15,7 @@ if [ ! -z "$ASAN" ]; then + fi + + # Centos 7 bug workaround, EOL June 30 2024. +-DASHN=-n; wait -n 2>/dev/null; [ $? -eq 2 ] && unset DASHN ++unset DASHN + + export LANG=c + export LC_ALL=C diff --git a/base/toybox/xxd-i.patch b/base/toybox/xxd-i.patch index cb8b121..fb1bc77 100644 --- a/base/toybox/xxd-i.patch +++ b/base/toybox/xxd-i.patch @@ -1,5 +1,21 @@ --- a/toys/other/xxd.c +++ b/toys/other/xxd.c +@@ -77,11 +77,13 @@ static void do_xxd(int fd, char *name) + + static void do_xxd_include(int fd, char *name) + { ++ long long total = 0; + int c = 1, i, len; + + // The original xxd outputs a header/footer if given a filename (not stdin). + // We don't, which means that unlike the original we can implement -ri. + while ((len = read(fd, toybuf, sizeof(toybuf))) > 0) { ++ total += len; + for (i = 0; i < len; ++i) { + printf("%s%#.02x", c > 1 ? ", " : " ", toybuf[i]); + if (c++ == TT.c) { +--- a/toys/other/xxd.c ++++ b/toys/other/xxd.c @@ -80,7 +80,12 @@ int c = 1, i, len; diff --git a/extra/json-c/build.sh b/extra/json-c/build.sh new file mode 100644 index 0000000..5a15c94 --- /dev/null +++ b/extra/json-c/build.sh @@ -0,0 +1,30 @@ +pkgname=json-c +pkgver=0.15 + +fetch() { + curl -L "https://s3.amazonaws.com/json-c_releases/releases/json-c-$pkgver.tar.gz" -o $pkgname-$pkgver.tar.xz + tar -xf $pkgname-$pkgver.tar.xz + mkdir $pkgname-$pkgver/build +} + +build() { + cd $pkgname-$pkgver + cd build + cmake -G Ninja ../ \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib + samu +} + +package() { + cd $pkgname-$pkgver + cd build + DESTDIR=$pkgdir samu install +} + +license() { + cd $pkgname-$pkgver + cat LICENSE +# cat COPYING +} diff --git a/extra/pcre/build.sh b/extra/pcre/build.sh new file mode 100644 index 0000000..52b52e2 --- /dev/null +++ b/extra/pcre/build.sh @@ -0,0 +1,32 @@ +pkgname=pcre +pkgver=8.45 + +fetch() { + curl "https://ftp.pcre.org/pub/pcre/pcre-$pkgver.tar.gz" -o $pkgname-$pkgver.tar.gz + tar -xf $pkgname-$pkgver.tar.gz +} + +build() { + cd $pkgname-$pkgver + ./configure \ + --prefix=/usr \ + --build=$TRIPLE \ + --host=$TRIPLE + + make +} + +package() { + cd $pkgname-$pkgver + make install DESTDIR=$pkgdir +} + +backup() { + return +} + +license() { + cd $pkgname-$pkgver + cat LICENSE +# cat COPYING +} diff --git a/extra/pcre2/build.sh b/extra/pcre2/build.sh new file mode 100644 index 0000000..c853b18 --- /dev/null +++ b/extra/pcre2/build.sh @@ -0,0 +1,31 @@ +pkgname=pcre2 +pkgver=10.39 + +fetch() { + curl -L "https://github.com/PhilipHazel/pcre2/releases/download/pcre2-10.39/pcre2-$pkgver.tar.bz2" -o $pkgname-$pkgver.tar.gz + tar -xf $pkgname-$pkgver.tar.gz +} + +build() { + cd $pkgname-$pkgver + ./configure \ + --prefix=/usr \ + --build=$TRIPLE \ + --host=$TRIPLE + + make +} + +package() { + cd $pkgname-$pkgver + make install DESTDIR=$pkgdir +} + +backup() { + return +} + +license() { + cd $pkgname-$pkgver + cat COPYING +} diff --git a/extra/rust/build.sh b/extra/rust/build.sh index cd47012..3f42c61 100644 --- a/extra/rust/build.sh +++ b/extra/rust/build.sh @@ -33,13 +33,13 @@ fetch() { cp ../*.patch . cd $pkgname-$pkgver - patch -p1 < ../alpine-move-py.patch - patch -p1 < ../abyss-install-template-shebang.patch + # patch -p1 < ../alpine-move-py.patch + # patch -p1 < ../abyss-install-template-shebang.patch patch -p1 < ../alpine-crt.patch patch -p1 < ../libexec.patch patch -p1 < ../llvm_crt.patch patch -p1 < ../unfreeze.patch - patch -p1 < ../libresslssl.patch + # patch -p1 < ../libresslssl.patch sed -i /LD_LIBRARY_PATH/d src/bootstrap/bootstrap.py _clear_vendor_checksums libc @@ -53,18 +53,19 @@ fetch() { build() { cd $pkgname-$pkgver + # --tools="cargo,rls,rustfmt,src" \ OPENSSL_LIB_DIR=/usr/lib/ ./configure \ --build="$TRIPLE" \ --host="$TRIPLE" \ --target="$TRIPLE" \ --prefix="/usr" \ --musl-root="/usr" \ - --release-channel="beta" \ + --release-channel="nightly" \ --enable-local-rust \ --local-rust-root=$RUSTROOT \ --disable-docs \ --enable-extended \ - --tools="cargo,rls,rustfmt,src" \ + --tools="cargo,rustfmt,rls,src" \ --enable-vendor \ --disable-locked-deps \ --enable-option-checking \ diff --git a/gui/autotiling-rs/build.sh b/gui/autotiling-rs/build.sh new file mode 100644 index 0000000..b789ec9 --- /dev/null +++ b/gui/autotiling-rs/build.sh @@ -0,0 +1,30 @@ +pkgname=autotiling-rs +pkgver=0.1.3 + +_clear_vendor_checksums() { + sed -i 's/\("files":{\)[^}]*/\1/' vendor/$1/.cargo-checksum.json +} + +fetch() { + curl -L "https://github.com/ammgws/autotiling-rs/archive/refs/tags/v$pkgver.tar.gz" -o $pkgname-$pkgver.tar.xz + tar -xf $pkgname-$pkgver.tar.xz + cd $pkgname-$pkgver + mkdir -p .cargo + /usr/src/rust-bootstrap/build/rust-root/bin/cargo vendor > .cargo/config +} + +build() { + cd $pkgname-$pkgver + cargo build --release --locked --all-features +} + +package() { + cd $pkgname-$pkgver + install -Dm755 target/release/$pkgname $pkgdir/usr/bin/$pkgname +} + +license() { + cd $pkgname-$pkgver + cat LICENSE +# cat COPYING +} diff --git a/gui/foot/build.sh b/gui/foot/build.sh new file mode 100644 index 0000000..25029a0 --- /dev/null +++ b/gui/foot/build.sh @@ -0,0 +1,36 @@ +pkgname=foot +pkgver=1.10.3 + +fetch() { + curl -L "https://codeberg.org/dnkl/foot/archive/$pkgver.tar.gz" -o $pkgname-$pkgver.tar.xz + tar -xf $pkgname-$pkgver.tar.xz + mv $pkgname $pkgname-$pkgver + mkdir $pkgname-$pkgver/build +} + +build() { + cd $pkgname-$pkgver + cd build + meson .. \ + --buildtype=release \ + --prefix=/usr \ + --libexecdir=lib \ + -Dterminfo=disabled \ + -Ddefault-terminfo=xterm + samu +} + +backup() { + return +} + +package() { + cd $pkgname-$pkgver + cd build + DESTDIR=$pkgdir samu install +} + +license() { + cd $pkgname-$pkgver + cat LICENSE +} diff --git a/gui/freetype-harbuzz/build.sh b/gui/freetype-harbuzz/build.sh new file mode 100644 index 0000000..6ae76e7 --- /dev/null +++ b/gui/freetype-harbuzz/build.sh @@ -0,0 +1,98 @@ +f_pkgver=2.11.0 +h_pkgver=3.0.0 + +pkgname=freetype-harfbuzz +pkgver=$f_pkgver+$h_pkgver + +fetch() { + curl "https://download-mirror.savannah.gnu.org/releases/freetype/freetype-$f_pkgver.tar.xz" \ + -o freetype-$f_pkgver.tar.xz + + tar -xf freetype-$f_pkgver.tar.xz + mkdir -p freetype-$f_pkgver/build + + curl -L "https://github.com/harfbuzz/harfbuzz/releases/download/$h_pkgver/harfbuzz-$h_pkgver.tar.xz" \ + -o harfbuzz-$h_pkgver.tar.xz + + tar -xf harfbuzz-$h_pkgver.tar.xz + mkdir -p harfbuzz-$h_pkgver/build +} + +build() { + mkdir tmp_install + export DESTDIR=$(pwd)/tmp_install + mkdir -p $DESTDIR/usr/include/harfbuzz + # cp harfbuzz-$h_pkgver/src/hb-ft.h $DESTDIR/usr/include/harfbuzz + + # Point Freetype to the Harfbuzz files. + export CFLAGS="$CFLAGS -I$DESTDIR/usr/include/harfbuzz" + export CFLAGS="$CFLAGS -L$DESTDIR/usr/lib " + export PKG_CONFIG_PATH=$DESTDIR/usr/lib/pkgconfig + + # Point Harfbuzz to the Freetype files. + export CXXFLAGS="$CXXFLAGS -I$DESTDIR/usr/include/freetype2" + export CXXFLAGS="$CXXFLAGS -L$DESTDIR/usr/lib" + + cd freetype-$f_pkgver/build + meson .. \ + --buildtype=release \ + --prefix=/usr \ + --libexecdir=lib \ + -Dbzip2=disabled \ + -Dzlib=disabled \ + -Dharbuzz=disabled + + samu + + samu install + + cd ../../ + + cd harfbuzz-$h_pkgver/ + + ./configure \ + --prefix=/usr \ + --with-bzip2=no \ + --with-png=no \ + --with-brotli=no + + bad --gmake gmake + bad --gmake gmake install + + cd .. + + cd freetype-$f_pkgver/build + meson .. \ + --buildtype=release \ + --prefix=/usr \ + --libexecdir=lib \ + -Dbzip2=disabled \ + -Dzlib=disabled \ + -Dharfbuzz=enabled + --reconfigure + + samu +} + + + +package() { + cd freetype-$f_pkgver + cd build + DESTDIR=$pkgdir samu install + cd ../../ + cd harfbuzz-$h_pkgver + cd build + DESTDIR=$pkgdir samu install +} + +backup() { + return +} + +license() { + cd freetype-$f_pkgver + cat LICENSE + cd harfbuzz-$h_pkgver + cat COPYING +} diff --git a/gui/freetype-harbuzz/ft_meson.patch b/gui/freetype-harbuzz/ft_meson.patch new file mode 100644 index 0000000..349f4ec --- /dev/null +++ b/gui/freetype-harbuzz/ft_meson.patch @@ -0,0 +1,11 @@ +--- src/freetype-2.11.0/meson.build ++++ meson.build +@@ -276,6 +276,8 @@ + if libpng_dep.found() + ftoption_command += ['--enable=FT_CONFIG_OPTION_USE_PNG'] + ft2_deps += [libpng_dep] ++else ++ ftoption_command += ['--disable=FT_CONFIG_OPTION_USE_PNG'] + endif + + # Harfbuzz support diff --git a/gui/freetype-harbuzz/meson.build b/gui/freetype-harbuzz/meson.build new file mode 100644 index 0000000..023e650 --- /dev/null +++ b/gui/freetype-harbuzz/meson.build @@ -0,0 +1,411 @@ +# +# Meson project file for FreeType 2 +# + +# Copyright (C) 2020-2021 by +# David Turner, Robert Wilhelm, and Werner Lemberg. +# +# This file is part of the FreeType project, and may only be used, modified, +# and distributed under the terms of the FreeType project license, +# LICENSE.TXT. By continuing to use, modify, or distribute this file you +# indicate that you have read the license and understand and accept it +# fully. + +# +# Say +# +# meson configure +# +# to see all configuration options and their default values. For example, +# to build only a shared version of FreeType, override the default value +# with +# +# meson setup -Ddefault_library=shared +# + +project('freetype2', 'c', + meson_version: '>= 0.55.0', + default_options: ['default_library=both'], + version: run_command('builds/meson/extract_freetype_version.py', + 'include/freetype/freetype.h').stdout().strip(), +) + + +# Only meson >= 0.57 can read a file and assign its contents to a +# variable; we thus use an external command to have this functionality +# with older versions, too. + +python = import('python') +python_exe = python.find_installation(required: true) + +ft2_so_version = run_command(python_exe, + files('builds/meson/extract_libtool_version.py'), + '--soversion', + files('builds/unix/configure.raw')).stdout().strip() + +ft2_pkgconfig_version = run_command(python_exe, + files('builds/meson/extract_libtool_version.py'), + files('builds/unix/configure.raw')).stdout().strip() + +ft2_includes = include_directories('include') + + +# Generate a custom `ftmodule.h` version based on the content of +# `modules.cfg`. + +ftmodule_h = custom_target('ftmodule.h', + output: 'ftmodule.h', + input: 'modules.cfg', + command: [python_exe, files('builds/meson/parse_modules_cfg.py'), + '--format=ftmodule.h', '@INPUT@', '--output', '@OUTPUT@'], + install: true, + install_dir: 'include/freetype2/freetype/config', +) +ft2_sources = [ftmodule_h] + + +# FreeType 2 modules. + +ft_main_modules = run_command(python_exe, + files('builds/meson/parse_modules_cfg.py'), + '--format=main-modules', + files('modules.cfg')).stdout().strip().split() + +ft2_sources += files([ + 'src/base/ftbase.c', + 'src/base/ftinit.c', +]) + +foreach mod: ft_main_modules + source = mod + if mod == 'winfonts' + source = 'winfnt' + elif mod == 'cid' + source = 'type1cid' + endif + ft2_sources += 'src/@0@/@1@.c'.format(mod, source) +endforeach + +# NOTE: The `gzip` and `bzip2` aux modules are handled through options. +ft_aux_modules = run_command(python_exe, + files('builds/meson/parse_modules_cfg.py'), + '--format=aux-modules', + files('modules.cfg')).stdout().strip().split() + +foreach auxmod: ft_aux_modules + source = auxmod + # Most sources are named `src//.c`, but there are a few + # exceptions handled here. + if auxmod == 'cache' + source = 'ftcache' + elif auxmod == 'lzw' + source = 'ftlzw' + elif auxmod == 'gzip' or auxmod == 'bzip2' + # Handled through options instead, see below. + continue + endif + ft2_sources += 'src/@0@/@1@.c'.format(auxmod, source) +endforeach + + +# FreeType 2 base extensions. +# To be configured in `modules.cfg`. + +base_extensions = run_command(python_exe, + files('builds/meson/parse_modules_cfg.py'), + '--format=base-extensions-list', + files('modules.cfg')).stdout().split() + +foreach ext: base_extensions + ft2_sources += files('src/base/' + ext) +endforeach + + +# Header files. + +ft2_public_headers = files([ + 'include/freetype/freetype.h', + 'include/freetype/ftadvanc.h', + 'include/freetype/ftbbox.h', + 'include/freetype/ftbdf.h', + 'include/freetype/ftbitmap.h', + 'include/freetype/ftbzip2.h', + 'include/freetype/ftcache.h', + 'include/freetype/ftchapters.h', + 'include/freetype/ftcid.h', + 'include/freetype/ftcolor.h', + 'include/freetype/ftdriver.h', + 'include/freetype/fterrdef.h', + 'include/freetype/fterrors.h', + 'include/freetype/ftfntfmt.h', + 'include/freetype/ftgasp.h', + 'include/freetype/ftglyph.h', + 'include/freetype/ftgxval.h', + 'include/freetype/ftgzip.h', + 'include/freetype/ftimage.h', + 'include/freetype/ftincrem.h', + 'include/freetype/ftlcdfil.h', + 'include/freetype/ftlist.h', + 'include/freetype/ftlzw.h', + 'include/freetype/ftmac.h', + 'include/freetype/ftmm.h', + 'include/freetype/ftmodapi.h', + 'include/freetype/ftmoderr.h', + 'include/freetype/ftotval.h', + 'include/freetype/ftoutln.h', + 'include/freetype/ftparams.h', + 'include/freetype/ftpfr.h', + 'include/freetype/ftrender.h', + 'include/freetype/ftsizes.h', + 'include/freetype/ftsnames.h', + 'include/freetype/ftstroke.h', + 'include/freetype/ftsynth.h', + 'include/freetype/ftsystem.h', + 'include/freetype/fttrigon.h', + 'include/freetype/fttypes.h', + 'include/freetype/ftwinfnt.h', + 'include/freetype/t1tables.h', + 'include/freetype/ttnameid.h', + 'include/freetype/tttables.h', + 'include/freetype/tttags.h', +]) + +ft2_config_headers = files([ + 'include/freetype/config/ftconfig.h', + 'include/freetype/config/ftheader.h', + 'include/freetype/config/ftstdlib.h', + 'include/freetype/config/integer-types.h', + 'include/freetype/config/mac-support.h', + 'include/freetype/config/public-macros.h', +]) + +ft2_defines = ['-DFT2_BUILD_LIBRARY=1'] + + +# System support file. + +cc = meson.get_compiler('c') + +# NOTE: msys2 on Windows has `unistd.h` and `fcntl.h` but not `sys/mman.h`! +has_unistd_h = cc.has_header('unistd.h') +has_fcntl_h = cc.has_header('fcntl.h') +has_sys_mman_h = cc.has_header('sys/mman.h') + +mmap_option = get_option('mmap') + +use_unix_ftsystem_c = false +if mmap_option.disabled() + ft2_sources += files(['src/base/ftsystem.c',]) +elif host_machine.system() == 'windows' + ft2_sources += files(['builds/windows/ftsystem.c',]) +else + if has_unistd_h and has_fcntl_h and has_sys_mman_h + # This version of `ftsystem.c` uses `mmap` to read input font files. + ft2_sources += files(['builds/unix/ftsystem.c',]) + use_unix_ftsystem_c = true + elif mmap_option.enabled() + error('mmap was enabled via options but is not available,' + + ' required headers were not found!') + else + ft2_sources += files(['src/base/ftsystem.c',]) + endif +endif + + +# Debug support file +# +# NOTE: Some specialized versions exist for other platforms not supported by +# Meson. Most implementation differences are extremely minor, i.e., in the +# implementation of `FT_Message` and `FT_Panic`, and getting the `FT2_DEBUG` +# value from the environment, when this is supported. A smaller refactor +# might make these platform-specific files much smaller, and could be moved +# into `ftsystem.c` as well. +# +if host_machine.system() == 'windows' + winmod = import('windows') + ft2_sources += [ + 'builds/windows/ftdebug.c', + winmod.compile_resources('src/base/ftver.rc'), + ] +else + ft2_sources += 'src/base/ftdebug.c' +endif + +ft2_deps = [] + + +# Generate `ftoption.h` based on available dependencies. + +process_header_command = [python_exe, + files('builds/meson/process_ftoption_h.py'), + '@INPUT@', '--output=@OUTPUT@'] +ftoption_command = process_header_command + + +# GZip support +zlib_dep = dependency('zlib', + required: get_option('zlib'), + fallback: 'zlib') + +if zlib_dep.found() + ftoption_command += [ + '--enable=FT_CONFIG_OPTION_USE_ZLIB', + '--enable=FT_CONFIG_OPTION_SYSTEM_ZLIB', + ] + ft2_sources += files(['src/gzip/ftgzip.c',]) + ft2_deps += [zlib_dep] +else + ftoption_command += ['--disable=FT_CONFIG_OPTION_USE_ZLIB'] +endif + +# BZip2 support +bzip2_dep = cc.find_library('bz2', + required: get_option('bzip2')) + +if bzip2_dep.found() + ftoption_command += ['--enable=FT_CONFIG_OPTION_USE_BZIP2'] + ft2_sources += files(['src/bzip2/ftbzip2.c',]) + ft2_deps += [bzip2_dep] +endif + +# PNG support +libpng_dep = dependency('libpng', + required: get_option('png'), + fallback: 'libpng') + +if libpng_dep.found() + ftoption_command += ['--enable=FT_CONFIG_OPTION_USE_PNG'] + ft2_deps += [libpng_dep] +else + ftoption_command += ['--disable=FT_CONFIG_OPTION_USE_PNG'] +endif + +# Harfbuzz support +harfbuzz_dep = dependency('harfbuzz', + version: '>= 2.0.0', + required: get_option('harfbuzz')) + +if harfbuzz_dep.found() + ftoption_command += ['--enable=FT_CONFIG_OPTION_USE_HARFBUZZ'] + ft2_deps += [harfbuzz_dep] +endif + +# Brotli decompression support +brotli_dep = dependency('libbrotlidec', + required: get_option('brotli')) + +if brotli_dep.found() + ftoption_command += ['--enable=FT_CONFIG_OPTION_USE_BROTLI'] + ft2_deps += [brotli_dep] +endif + +# We can now generate `ftoption.h`. +ftoption_h = custom_target('ftoption.h', + input: 'include/freetype/config/ftoption.h', + output: 'ftoption.h', + command: ftoption_command, + install: true, + install_dir: 'include/freetype2/freetype/config', +) +ft2_sources += ftoption_h +ft2_defines += ['-DFT_CONFIG_OPTIONS_H='] + +if host_machine.system() == 'windows' + ft2_defines += ['-DDLL_EXPORT=1'] +endif + + +# Generate `ftconfig.h`. + +ftconfig_command = process_header_command +if has_unistd_h + ftconfig_command += '--enable=HAVE_UNISTD_H' +endif +if has_fcntl_h + ftconfig_command += '--enable=HAVE_FCNTL_H' +endif + +if use_unix_ftsystem_c + ftconfig_h_in = files('builds/unix/ftconfig.h.in') + ftconfig_h = custom_target('ftconfig.h', + input: ftconfig_h_in, + output: 'ftconfig.h', + command: ftconfig_command, + install: true, + install_dir: 'include/freetype2/freetype/config', + ) + ft2_sources += ftconfig_h + ft2_defines += ['-DFT_CONFIG_CONFIG_H='] +endif + + +ft2_lib = library('freetype', + sources: ft2_sources + [ftmodule_h], + c_args: ft2_defines, + gnu_symbol_visibility: 'hidden', + include_directories: ft2_includes, + dependencies: ft2_deps, + install: true, + version: ft2_so_version, +) + + +# To be used by other projects including this one through `subproject`. +freetype_dep = declare_dependency( + include_directories: ft2_includes, + link_with: ft2_lib, + version: ft2_pkgconfig_version) + +meson.override_dependency('freetype2', freetype_dep) + + +# NOTE: Using both `install_dir` and `subdir` doesn't seem to work below, +# i.e., the subdir value seems to be ignored, contrary to examples in the +# Meson documentation. +install_headers('include/ft2build.h', + install_dir: 'include/freetype2') +install_headers(ft2_public_headers, + install_dir: 'include/freetype2/freetype') +install_headers(ft2_config_headers, + install_dir: 'include/freetype2/freetype/config') + + +pkgconfig = import('pkgconfig') + +pkgconfig.generate(ft2_lib, + filebase: 'freetype2', + name: 'FreeType 2', + description: 'A free, high-quality, and portable font engine.', + url: 'https://freetype.org', + subdirs: 'freetype2', + version: ft2_pkgconfig_version, +) + +if get_option('tests').enabled() + subdir('tests') +endif + +# NOTE: Unlike the old `make refdoc` command, this generates the +# documentation under `$BUILD/docs/` since Meson doesn't support modifying +# the source root directory (which is a good thing). +gen_docs = custom_target('freetype2 reference documentation', + output: 'docs', + input: ft2_public_headers + ft2_config_headers, + command: [python_exe, + files('builds/meson/generate_reference_docs.py'), + '--version=' + meson.project_version(), + '--input-dir=' + meson.source_root(), + '--output-dir=@OUTPUT@' + ], +) + + +summary({'OS': host_machine.system(), + 'Zlib': zlib_dep.found() ? 'yes' : 'no', + 'Bzip2': bzip2_dep.found() ? 'yes' : 'no', + 'Png': libpng_dep.found() ? 'yes' : 'no', + 'Harfbuzz': harfbuzz_dep.found() ? 'yes' : 'no', + 'Brotli': brotli_dep.found() ? 'yes' : 'no', + }, section: 'Configuration Options Summary:') + +# EOF diff --git a/gui/freetype/build.sh b/gui/freetype/build.sh index c1fb57e..1d14ff7 100644 --- a/gui/freetype/build.sh +++ b/gui/freetype/build.sh @@ -1,5 +1,5 @@ pkgname=freetype -pkgver=2.10.4 +pkgver=2.11.0 fetch() { curl "https://download-mirror.savannah.gnu.org/releases/freetype/freetype-$pkgver.tar.xz" -o $pkgname-$pkgver.tar.xz @@ -24,6 +24,10 @@ package() { DESTDIR=$pkgdir samu install } +backup() { + return +} + license() { cd $pkgname-$pkgver cat LICENSE diff --git a/gui/harfbuzz/build.sh b/gui/harfbuzz/build.sh index 2765085..b4d4215 100644 --- a/gui/harfbuzz/build.sh +++ b/gui/harfbuzz/build.sh @@ -1,8 +1,8 @@ pkgname=harfbuzz -pkgver=2.7.4 +pkgver=3.0.0 fetch() { - curl -L "https://github.com/harfbuzz/harfbuzz/releases/download/2.7.4/harfbuzz-2.7.4.tar.xz" -o $pkgname-$pkgver.tar.xz + curl -L "https://github.com/harfbuzz/harfbuzz/releases/download/$pkgver/harfbuzz-$pkgver.tar.xz" -o $pkgname-$pkgver.tar.xz tar -xf $pkgname-$pkgver.tar.xz mkdir $pkgname-$pkgver/build } @@ -10,7 +10,7 @@ fetch() { build() { cd $pkgname-$pkgver cd build - meson .. \ + CFLAGS="$CFLAGS -Wunused-but-set-variable" meson .. \ --buildtype=release \ --prefix=/usr \ --libexecdir=lib \ diff --git a/gui/i3status-rs/build.sh b/gui/i3status-rs/build.sh new file mode 100644 index 0000000..eb4c0b8 --- /dev/null +++ b/gui/i3status-rs/build.sh @@ -0,0 +1,30 @@ +pkgname=i3status-rust +pkgver=0.20.4 + +_clear_vendor_checksums() { + sed -i 's/\("files":{\)[^}]*/\1/' vendor/$1/.cargo-checksum.json +} + +fetch() { + curl -L "https://github.com/greshake/i3status-rust/archive/refs/tags/v$pkgver.tar.gz" -o $pkgname-$pkgver.tar.xz + tar -xf $pkgname-$pkgver.tar.xz + cd $pkgname-$pkgver + mkdir -p .cargo + /usr/src/rust-bootstrap/build/rust-root/bin/cargo vendor > .cargo/config +} + +build() { + cd $pkgname-$pkgver + cargo build --release --locked --all-features +} + +package() { + cd $pkgname-$pkgver + install -Dm755 target/release/i3status-rs $pkgdir/usr/bin/i3status-rs +} + +license() { + cd $pkgname-$pkgver + cat LICENSE +# cat COPYING +} diff --git a/gui/libdrm/build.sh b/gui/libdrm/build.sh index 9cf740e..8e5be2c 100644 --- a/gui/libdrm/build.sh +++ b/gui/libdrm/build.sh @@ -1,8 +1,7 @@ -pkgver=2.4.106 +pkgver=2.4.109 pkgname=libdrm dep="libpciaccess" bad="" -ext="dev" fetch() { curl -L "https://dri.freedesktop.org/libdrm/libdrm-$pkgver.tar.xz" -o $pkgname-$pkgver.tar.gz @@ -20,9 +19,8 @@ package() { DESTDIR=$pkgdir samu -C build install } -package_dev() { - cd $pkgname-$pkgver - DESTDIR=$pkgdir samu -C build install +backup() { + return } license() { diff --git a/gui/libpng/build.sh b/gui/libpng/build.sh index 99d31f1..57ec63c 100644 --- a/gui/libpng/build.sh +++ b/gui/libpng/build.sh @@ -10,6 +10,7 @@ build() { cd $pkgname-$pkgver ./configure \ --prefix=/usr \ + --with-zlib-prefix=/usr \ --build=$TRIPLE \ --host=$TRIPLE @@ -21,6 +22,10 @@ package() { make install DESTDIR=$pkgdir } +backup() { + return +} + license() { cd $pkgname-$pkgver cat LICENSE diff --git a/gui/libudev-zero/build.sh b/gui/libudev-zero/build.sh index d0ccab6..3f2c92e 100644 --- a/gui/libudev-zero/build.sh +++ b/gui/libudev-zero/build.sh @@ -1,5 +1,5 @@ pkgname=libudev-zero -pkgver=0.5.2 +pkgver=1.0.0 fetch() { curl -L "https://github.com/illiliti/libudev-zero/archive/$pkgver.tar.gz" -o $pkgname-$pkgver.tar.xz @@ -18,7 +18,10 @@ package() { make install PREFIX=/usr DESTDIR=$pkgdir install -d $pkgdir/usr/sbin install -Dm755 ./contrib/libudev-zero-hotplug-helper $pkgdir/usr/sbin/ - install -Dm755 ./contrib/helper.sh $pkgdir/usr/sbin/libudev-zero-hotplug-helper.sh +} + +backup() { + return } license() { diff --git a/gui/mesa/build.sh b/gui/mesa/build.sh index 36266c3..48bfdf9 100644 --- a/gui/mesa/build.sh +++ b/gui/mesa/build.sh @@ -1,12 +1,12 @@ pkgname=mesa #pkgver=21.2.1 -pkgver=v3dv-vk-ext-vertex-attribute-divisor +pkgver=main deps="musl:wayland:wayland-protocols:llvm:zlib-ng:expat:libffi:libdrm:python-mako" ext=dev fetch() { - curl "https://archive.mesa3d.org/$pkgname-$pkgver.tar.xz" -o $pkgname-$pkgver.tar.gz - curl "https://gitlab.freedesktop.org/Ella-0/mesa/-/archive/v3dv-vk-ext-vertex-attribute-divisor/mesa-v3dv-vk-ext-vertex-attribute-divisor.tar.gz" -o $pkgname-$pkgver.tar.gz +# curl "https://archive.mesa3d.org/$pkgname-$pkgver.tar.xz" -o $pkgname-$pkgver.tar.gz + curl "https://gitlab.freedesktop.org/mesa/mesa/-/archive/main/mesa-main.tar.gz" -o $pkgname-$pkgver.tar.gz tar -xf $pkgname-$pkgver.tar.gz mkdir $pkgname-$pkgver/build cp ../byacc-out-mid-build.patch . diff --git a/gui/mesa/v3d.patch b/gui/mesa/v3d.patch new file mode 100644 index 0000000..21d85a5 --- /dev/null +++ b/gui/mesa/v3d.patch @@ -0,0 +1,10 @@ +--- a/src/gallium/drivers/v3d/v3dx_format_table.c ++++ b/src/gallium/drivers/v3d/v3dx_format_table.c +@@ -70,6 +70,7 @@ + FORMAT(R8G8B8A8_SNORM, NO, RGBA8_SNORM, SWIZ_XYZW, 16, 0), + FORMAT(R8G8B8X8_SNORM, NO, RGBA8_SNORM, SWIZ_XYZ1, 16, 0), + FORMAT(R10G10B10A2_UNORM, RGB10_A2, RGB10_A2, SWIZ_XYZW, 16, 0), ++ FORMAT(R10G10B10X2_UNORM, RGB10_A2, RGB10_A2, SWIZ_XYZW, 16, 0), + FORMAT(R10G10B10A2_UINT, RGB10_A2UI, RGB10_A2UI, SWIZ_XYZW, 16, 0), + + FORMAT(A4B4G4R4_UNORM, ABGR4444, RGBA4, SWIZ_XYZW, 16, 0), diff --git a/gui/mesa/v3dx_format_table.c b/gui/mesa/v3dx_format_table.c new file mode 100644 index 0000000..ed4ab51 --- /dev/null +++ b/gui/mesa/v3dx_format_table.c @@ -0,0 +1,364 @@ +/* + * Copyright © 2014-2018 Broadcom + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +#include "util/format/u_format.h" + +#include "v3d_context.h" +#include "broadcom/cle/v3dx_pack.h" +#include "broadcom/common/v3d_macros.h" +#include "v3d_format_table.h" + +#define SWIZ(x,y,z,w) { \ + PIPE_SWIZZLE_##x, \ + PIPE_SWIZZLE_##y, \ + PIPE_SWIZZLE_##z, \ + PIPE_SWIZZLE_##w \ +} + +#define FORMAT(pipe, rt, tex, swiz, return_size, return_channels) \ + [PIPE_FORMAT_##pipe] = { \ + true, \ + V3D_OUTPUT_IMAGE_FORMAT_##rt, \ + TEXTURE_DATA_FORMAT_##tex, \ + swiz, \ + return_size, \ + return_channels, \ + } + +#define SWIZ_X001 SWIZ(X, 0, 0, 1) +#define SWIZ_XY01 SWIZ(X, Y, 0, 1) +#define SWIZ_XYZ1 SWIZ(X, Y, Z, 1) +#define SWIZ_XYZW SWIZ(X, Y, Z, W) +#define SWIZ_YZWX SWIZ(Y, Z, W, X) +#define SWIZ_YZW1 SWIZ(Y, Z, W, 1) +#define SWIZ_ZYXW SWIZ(Z, Y, X, W) +#define SWIZ_ZYX1 SWIZ(Z, Y, X, 1) +#define SWIZ_XXXY SWIZ(X, X, X, Y) +#define SWIZ_XXX1 SWIZ(X, X, X, 1) +#define SWIZ_XXXX SWIZ(X, X, X, X) +#define SWIZ_000X SWIZ(0, 0, 0, X) + +static const struct v3d_format format_table[] = { + FORMAT(B8G8R8A8_UNORM, RGBA8, RGBA8, SWIZ_ZYXW, 16, 0), + FORMAT(B8G8R8X8_UNORM, RGBA8, RGBA8, SWIZ_ZYX1, 16, 0), + FORMAT(B8G8R8A8_SRGB, SRGB8_ALPHA8, RGBA8, SWIZ_ZYXW, 16, 0), + FORMAT(B8G8R8X8_SRGB, SRGB8_ALPHA8, RGBA8, SWIZ_ZYX1, 16, 0), + FORMAT(R8G8B8A8_UNORM, RGBA8, RGBA8, SWIZ_XYZW, 16, 0), + FORMAT(R8G8B8X8_UNORM, RGBA8, RGBA8, SWIZ_XYZ1, 16, 0), + FORMAT(R8G8B8A8_SRGB, SRGB8_ALPHA8, RGBA8, SWIZ_XYZW, 16, 0), + FORMAT(R8G8B8X8_SRGB, SRGB8_ALPHA8, RGBA8, SWIZ_XYZ1, 16, 0), + FORMAT(R8G8B8A8_SNORM, NO, RGBA8_SNORM, SWIZ_XYZW, 16, 0), + FORMAT(R8G8B8X8_SNORM, NO, RGBA8_SNORM, SWIZ_XYZ1, 16, 0), + FORMAT(R10G10B10A2_UNORM, RGB10_A2, RGB10_A2, SWIZ_XYZW, 16, 0), + FORMAT(R10G10B10X2_UNORM, RGB10_A2, RGB10_A2, SWIZ_XYZW, 16, 0), + FORMAT(R10G10B10A2_UINT, RGB10_A2UI, RGB10_A2UI, SWIZ_XYZW, 16, 0), + + FORMAT(A4B4G4R4_UNORM, ABGR4444, RGBA4, SWIZ_XYZW, 16, 0), + + FORMAT(A1B5G5R5_UNORM, ABGR1555, RGB5_A1, SWIZ_XYZW, 16, 0), + FORMAT(X1B5G5R5_UNORM, ABGR1555, RGB5_A1, SWIZ_XYZ1, 16, 0), + FORMAT(B5G6R5_UNORM, BGR565, RGB565, SWIZ_XYZ1, 16, 0), + + FORMAT(R8_UNORM, R8, R8, SWIZ_X001, 16, 0), + FORMAT(R8_SNORM, NO, R8_SNORM, SWIZ_X001, 16, 0), + FORMAT(R8G8_UNORM, RG8, RG8, SWIZ_XY01, 16, 0), + FORMAT(R8G8_SNORM, NO, RG8_SNORM, SWIZ_XY01, 16, 0), + + FORMAT(R16_UNORM, NO, R16, SWIZ_X001, 32, 1), + FORMAT(R16_SNORM, NO, R16_SNORM, SWIZ_X001, 32, 1), + FORMAT(R16_FLOAT, R16F, R16F, SWIZ_X001, 16, 0), + FORMAT(R32_FLOAT, R32F, R32F, SWIZ_X001, 32, 1), + + FORMAT(R16G16_UNORM, NO, RG16, SWIZ_XY01, 32, 2), + FORMAT(R16G16_SNORM, NO, RG16_SNORM, SWIZ_XY01, 32, 2), + FORMAT(R16G16_FLOAT, RG16F, RG16F, SWIZ_XY01, 16, 0), + FORMAT(R32G32_FLOAT, RG32F, RG32F, SWIZ_XY01, 32, 2), + + FORMAT(R16G16B16A16_UNORM, NO, RGBA16, SWIZ_XYZW, 32, 4), + FORMAT(R16G16B16A16_SNORM, NO, RGBA16_SNORM, SWIZ_XYZW, 32, 4), + FORMAT(R16G16B16A16_FLOAT, RGBA16F, RGBA16F, SWIZ_XYZW, 16, 0), + FORMAT(R32G32B32A32_FLOAT, RGBA32F, RGBA32F, SWIZ_XYZW, 32, 4), + + /* If we don't have L/A/LA16, mesa/st will fall back to RGBA16. */ + FORMAT(L16_UNORM, NO, R16, SWIZ_XXX1, 32, 1), + FORMAT(L16_SNORM, NO, R16_SNORM, SWIZ_XXX1, 32, 1), + FORMAT(I16_UNORM, NO, R16, SWIZ_XXXX, 32, 1), + FORMAT(I16_SNORM, NO, R16_SNORM, SWIZ_XXXX, 32, 1), + FORMAT(A16_UNORM, NO, R16, SWIZ_000X, 32, 1), + FORMAT(A16_SNORM, NO, R16_SNORM, SWIZ_000X, 32, 1), + FORMAT(L16A16_UNORM, NO, RG16, SWIZ_XXXY, 32, 2), + FORMAT(L16A16_SNORM, NO, RG16_SNORM, SWIZ_XXXY, 32, 2), + + FORMAT(A8_UNORM, NO, R8, SWIZ_000X, 16, 0), + FORMAT(L8_UNORM, NO, R8, SWIZ_XXX1, 16, 0), + FORMAT(I8_UNORM, NO, R8, SWIZ_XXXX, 16, 0), + FORMAT(L8A8_UNORM, NO, RG8, SWIZ_XXXY, 16, 0), + + FORMAT(R8_SINT, R8I, R8I, SWIZ_X001, 16, 0), + FORMAT(R8_UINT, R8UI, R8UI, SWIZ_X001, 16, 0), + FORMAT(R8G8_SINT, RG8I, RG8I, SWIZ_XY01, 16, 0), + FORMAT(R8G8_UINT, RG8UI, RG8UI, SWIZ_XY01, 16, 0), + FORMAT(R8G8B8A8_SINT, RGBA8I, RGBA8I, SWIZ_XYZW, 16, 0), + FORMAT(R8G8B8A8_UINT, RGBA8UI, RGBA8UI, SWIZ_XYZW, 16, 0), + + FORMAT(R16_SINT, R16I, R16I, SWIZ_X001, 16, 0), + FORMAT(R16_UINT, R16UI, R16UI, SWIZ_X001, 16, 0), + FORMAT(R16G16_SINT, RG16I, RG16I, SWIZ_XY01, 16, 0), + FORMAT(R16G16_UINT, RG16UI, RG16UI, SWIZ_XY01, 16, 0), + FORMAT(R16G16B16A16_SINT, RGBA16I, RGBA16I, SWIZ_XYZW, 16, 0), + FORMAT(R16G16B16A16_UINT, RGBA16UI, RGBA16UI, SWIZ_XYZW, 16, 0), + + FORMAT(R32_SINT, R32I, R32I, SWIZ_X001, 32, 1), + FORMAT(R32_UINT, R32UI, R32UI, SWIZ_X001, 32, 1), + FORMAT(R32G32_SINT, RG32I, RG32I, SWIZ_XY01, 32, 2), + FORMAT(R32G32_UINT, RG32UI, RG32UI, SWIZ_XY01, 32, 2), + FORMAT(R32G32B32A32_SINT, RGBA32I, RGBA32I, SWIZ_XYZW, 32, 4), + FORMAT(R32G32B32A32_UINT, RGBA32UI, RGBA32UI, SWIZ_XYZW, 32, 4), + + FORMAT(A8_SINT, R8I, R8I, SWIZ_000X, 16, 0), + FORMAT(A8_UINT, R8UI, R8UI, SWIZ_000X, 16, 0), + FORMAT(A16_SINT, R16I, R16I, SWIZ_000X, 16, 0), + FORMAT(A16_UINT, R16UI, R16UI, SWIZ_000X, 16, 0), + FORMAT(A32_SINT, R32I, R32I, SWIZ_000X, 32, 1), + FORMAT(A32_UINT, R32UI, R32UI, SWIZ_000X, 32, 1), + + FORMAT(R11G11B10_FLOAT, R11F_G11F_B10F, R11F_G11F_B10F, SWIZ_XYZ1, 16, 0), + FORMAT(R9G9B9E5_FLOAT, NO, RGB9_E5, SWIZ_XYZ1, 16, 0), + +#if V3D_VERSION >= 40 + FORMAT(S8_UINT_Z24_UNORM, D24S8, DEPTH24_X8, SWIZ_XXXX, 32, 1), + FORMAT(X8Z24_UNORM, D24S8, DEPTH24_X8, SWIZ_XXXX, 32, 1), + FORMAT(S8X24_UINT, S8, RGBA8UI, SWIZ_XXXX, 16, 1), + FORMAT(Z32_FLOAT, D32F, DEPTH_COMP32F, SWIZ_XXXX, 32, 1), + FORMAT(Z16_UNORM, D16, DEPTH_COMP16,SWIZ_XXXX, 32, 1), + + /* Pretend we support this, but it'll be separate Z32F depth and S8. */ + FORMAT(Z32_FLOAT_S8X24_UINT, D32F, DEPTH_COMP32F, SWIZ_XXXX, 32, 1), + FORMAT(X32_S8X24_UINT, S8, R8UI, SWIZ_XXXX, 16, 1), +#else + FORMAT(S8_UINT_Z24_UNORM, ZS_DEPTH24_STENCIL8, DEPTH24_X8, SWIZ_XXXX, 32, 1), + FORMAT(X8Z24_UNORM, ZS_DEPTH24_STENCIL8, DEPTH24_X8, SWIZ_XXXX, 32, 1), + FORMAT(S8X24_UINT, NO, R32F, SWIZ_XXXX, 32, 1), + FORMAT(Z32_FLOAT, ZS_DEPTH_COMPONENT32F, R32F, SWIZ_XXXX, 32, 1), + FORMAT(Z16_UNORM, ZS_DEPTH_COMPONENT16, DEPTH_COMP16, SWIZ_XXXX, 32, 1), + + /* Pretend we support this, but it'll be separate Z32F depth and S8. */ + FORMAT(Z32_FLOAT_S8X24_UINT, ZS_DEPTH_COMPONENT32F, R32F, SWIZ_XXXX, 32, 1), +#endif + + FORMAT(ETC2_RGB8, NO, RGB8_ETC2, SWIZ_XYZ1, 16, 0), + FORMAT(ETC2_SRGB8, NO, RGB8_ETC2, SWIZ_XYZ1, 16, 0), + FORMAT(ETC2_RGB8A1, NO, RGB8_PUNCHTHROUGH_ALPHA1, SWIZ_XYZW, 16, 0), + FORMAT(ETC2_SRGB8A1, NO, RGB8_PUNCHTHROUGH_ALPHA1, SWIZ_XYZW, 16, 0), + FORMAT(ETC2_RGBA8, NO, RGBA8_ETC2_EAC, SWIZ_XYZW, 16, 0), + FORMAT(ETC2_SRGBA8, NO, RGBA8_ETC2_EAC, SWIZ_XYZW, 16, 0), + FORMAT(ETC2_R11_UNORM, NO, R11_EAC, SWIZ_X001, 16, 0), + FORMAT(ETC2_R11_SNORM, NO, SIGNED_R11_EAC, SWIZ_X001, 16, 0), + FORMAT(ETC2_RG11_UNORM, NO, RG11_EAC, SWIZ_XY01, 16, 0), + FORMAT(ETC2_RG11_SNORM, NO, SIGNED_RG11_EAC, SWIZ_XY01, 16, 0), + + FORMAT(DXT1_RGB, NO, BC1, SWIZ_XYZ1, 16, 0), + FORMAT(DXT1_SRGB, NO, BC1, SWIZ_XYZ1, 16, 0), + FORMAT(DXT1_RGBA, NO, BC1, SWIZ_XYZW, 16, 0), + FORMAT(DXT1_SRGBA, NO, BC1, SWIZ_XYZW, 16, 0), + FORMAT(DXT3_RGBA, NO, BC2, SWIZ_XYZW, 16, 0), + FORMAT(DXT3_SRGBA, NO, BC2, SWIZ_XYZW, 16, 0), + FORMAT(DXT5_RGBA, NO, BC3, SWIZ_XYZW, 16, 0), + FORMAT(DXT5_SRGBA, NO, BC3, SWIZ_XYZW, 16, 0), +}; + +const struct v3d_format * +v3dX(get_format_desc)(enum pipe_format f) +{ + if (f < ARRAY_SIZE(format_table) && format_table[f].present) + return &format_table[f]; + else + return NULL; +} + +void +v3dX(get_internal_type_bpp_for_output_format)(uint32_t format, + uint32_t *type, + uint32_t *bpp) +{ + switch (format) { + case V3D_OUTPUT_IMAGE_FORMAT_RGBA8: +#if V3D_VERSION < 41 + case V3D_OUTPUT_IMAGE_FORMAT_RGBX8: +#endif + case V3D_OUTPUT_IMAGE_FORMAT_RGB8: + case V3D_OUTPUT_IMAGE_FORMAT_RG8: + case V3D_OUTPUT_IMAGE_FORMAT_R8: + case V3D_OUTPUT_IMAGE_FORMAT_ABGR4444: + case V3D_OUTPUT_IMAGE_FORMAT_BGR565: + case V3D_OUTPUT_IMAGE_FORMAT_ABGR1555: + *type = V3D_INTERNAL_TYPE_8; + *bpp = V3D_INTERNAL_BPP_32; + break; + + case V3D_OUTPUT_IMAGE_FORMAT_RGBA8I: + case V3D_OUTPUT_IMAGE_FORMAT_RG8I: + case V3D_OUTPUT_IMAGE_FORMAT_R8I: + *type = V3D_INTERNAL_TYPE_8I; + *bpp = V3D_INTERNAL_BPP_32; + break; + + case V3D_OUTPUT_IMAGE_FORMAT_RGBA8UI: + case V3D_OUTPUT_IMAGE_FORMAT_RG8UI: + case V3D_OUTPUT_IMAGE_FORMAT_R8UI: + *type = V3D_INTERNAL_TYPE_8UI; + *bpp = V3D_INTERNAL_BPP_32; + break; + + case V3D_OUTPUT_IMAGE_FORMAT_SRGB8_ALPHA8: + case V3D_OUTPUT_IMAGE_FORMAT_SRGB: + case V3D_OUTPUT_IMAGE_FORMAT_RGB10_A2: + case V3D_OUTPUT_IMAGE_FORMAT_R11F_G11F_B10F: +#if V3D_VERSION < 41 + case V3D_OUTPUT_IMAGE_FORMAT_SRGBX8: +#endif + case V3D_OUTPUT_IMAGE_FORMAT_RGBA16F: + /* Note that sRGB RTs are stored in the tile buffer at 16F, + * and the conversion to sRGB happens at tilebuffer + * load/store. + */ + *type = V3D_INTERNAL_TYPE_16F; + *bpp = V3D_INTERNAL_BPP_64; + break; + + case V3D_OUTPUT_IMAGE_FORMAT_RG16F: + case V3D_OUTPUT_IMAGE_FORMAT_R16F: + *type = V3D_INTERNAL_TYPE_16F; + /* Use 64bpp to make sure the TLB doesn't throw away the alpha + * channel before alpha test happens. + */ + *bpp = V3D_INTERNAL_BPP_64; + break; + + case V3D_OUTPUT_IMAGE_FORMAT_RGBA16I: + *type = V3D_INTERNAL_TYPE_16I; + *bpp = V3D_INTERNAL_BPP_64; + break; + case V3D_OUTPUT_IMAGE_FORMAT_RG16I: + case V3D_OUTPUT_IMAGE_FORMAT_R16I: + *type = V3D_INTERNAL_TYPE_16I; + *bpp = V3D_INTERNAL_BPP_32; + break; + + case V3D_OUTPUT_IMAGE_FORMAT_RGB10_A2UI: + case V3D_OUTPUT_IMAGE_FORMAT_RGBA16UI: + *type = V3D_INTERNAL_TYPE_16UI; + *bpp = V3D_INTERNAL_BPP_64; + break; + case V3D_OUTPUT_IMAGE_FORMAT_RG16UI: + case V3D_OUTPUT_IMAGE_FORMAT_R16UI: + *type = V3D_INTERNAL_TYPE_16UI; + *bpp = V3D_INTERNAL_BPP_32; + break; + + case V3D_OUTPUT_IMAGE_FORMAT_RGBA32I: + *type = V3D_INTERNAL_TYPE_32I; + *bpp = V3D_INTERNAL_BPP_128; + break; + case V3D_OUTPUT_IMAGE_FORMAT_RG32I: + *type = V3D_INTERNAL_TYPE_32I; + *bpp = V3D_INTERNAL_BPP_64; + break; + case V3D_OUTPUT_IMAGE_FORMAT_R32I: + *type = V3D_INTERNAL_TYPE_32I; + *bpp = V3D_INTERNAL_BPP_32; + break; + + case V3D_OUTPUT_IMAGE_FORMAT_RGBA32UI: + *type = V3D_INTERNAL_TYPE_32UI; + *bpp = V3D_INTERNAL_BPP_128; + break; + case V3D_OUTPUT_IMAGE_FORMAT_RG32UI: + *type = V3D_INTERNAL_TYPE_32UI; + *bpp = V3D_INTERNAL_BPP_64; + break; + case V3D_OUTPUT_IMAGE_FORMAT_R32UI: + *type = V3D_INTERNAL_TYPE_32UI; + *bpp = V3D_INTERNAL_BPP_32; + break; + + case V3D_OUTPUT_IMAGE_FORMAT_RGBA32F: + *type = V3D_INTERNAL_TYPE_32F; + *bpp = V3D_INTERNAL_BPP_128; + break; + case V3D_OUTPUT_IMAGE_FORMAT_RG32F: + *type = V3D_INTERNAL_TYPE_32F; + *bpp = V3D_INTERNAL_BPP_64; + break; + case V3D_OUTPUT_IMAGE_FORMAT_R32F: + *type = V3D_INTERNAL_TYPE_32F; + *bpp = V3D_INTERNAL_BPP_32; + break; + + default: + /* Provide some default values, as we'll be called at RB + * creation time, even if an RB with this format isn't + * supported. + */ + *type = V3D_INTERNAL_TYPE_8; + *bpp = V3D_INTERNAL_BPP_32; + break; + } +} + +bool +v3dX(tfu_supports_tex_format)(enum V3DX(Texture_Data_Formats) format, + bool for_mipmap) +{ + switch (format) { + case TEXTURE_DATA_FORMAT_R8: + case TEXTURE_DATA_FORMAT_R8_SNORM: + case TEXTURE_DATA_FORMAT_RG8: + case TEXTURE_DATA_FORMAT_RG8_SNORM: + case TEXTURE_DATA_FORMAT_RGBA8: + case TEXTURE_DATA_FORMAT_RGBA8_SNORM: + case TEXTURE_DATA_FORMAT_RGB565: + case TEXTURE_DATA_FORMAT_RGBA4: + case TEXTURE_DATA_FORMAT_RGB5_A1: + case TEXTURE_DATA_FORMAT_RGB10_A2: + case TEXTURE_DATA_FORMAT_R16: + case TEXTURE_DATA_FORMAT_R16_SNORM: + case TEXTURE_DATA_FORMAT_RG16: + case TEXTURE_DATA_FORMAT_RG16_SNORM: + case TEXTURE_DATA_FORMAT_RGBA16: + case TEXTURE_DATA_FORMAT_RGBA16_SNORM: + case TEXTURE_DATA_FORMAT_R16F: + case TEXTURE_DATA_FORMAT_RG16F: + case TEXTURE_DATA_FORMAT_RGBA16F: + case TEXTURE_DATA_FORMAT_R11F_G11F_B10F: + case TEXTURE_DATA_FORMAT_R4: + return true; + case TEXTURE_DATA_FORMAT_RGB9_E5: + case TEXTURE_DATA_FORMAT_R32F: + case TEXTURE_DATA_FORMAT_RG32F: + case TEXTURE_DATA_FORMAT_RGBA32F: + return !for_mipmap; + default: + return false; + } +} diff --git a/gui/pango/build.sh b/gui/pango/build.sh new file mode 100644 index 0000000..3938f94 --- /dev/null +++ b/gui/pango/build.sh @@ -0,0 +1,46 @@ +pkgname=pango +_pkgver=1.48 +pkgver=$_pkgver.10 + +fetch() { + curl -L "https://download.gnome.org/sources/pango/$_pkgver/pango-$pkgver.tar.xz" -o $pkgname-$pkgver.tar.xz + tar -xf $pkgname-$pkgver.tar.xz + mkdir $pkgname-$pkgver/build + cd $pkgname-$pkgver + rm -rf subprojects + : > tests/meson.build + : > examples/meson.build + : > docs/meson.build + patch -p1 < ../../no-fribidi.patch +} + +build() { + cd $pkgname-$pkgver + cd build + meson .. \ + --buildtype=release \ + --prefix=/usr \ + --libexecdir=lib \ + -Dgir=false \ + -Dgtk_doc=false \ + -Dxft=disabled \ + -Dintrospection=disabled \ + -Dinstall_tests=false + samu +} + +package() { + cd $pkgname-$pkgver + cd build + DESTDIR=$pkgdir samu install +} + +backup() { + return +} + +license() { + cd $pkgname-$pkgver + cat LICENSE +# cat COPYING +} diff --git a/gui/pango/no-fribidi.patch b/gui/pango/no-fribidi.patch new file mode 100644 index 0000000..33737c7 --- /dev/null +++ b/gui/pango/no-fribidi.patch @@ -0,0 +1,228 @@ +diff --git a/meson.build b/meson.build +index 6d8de0b..93141b0 100644 +--- a/meson.build ++++ b/meson.build +@@ -191,7 +191,6 @@ endif + pango_deps = [] + + glib_req_version = '>= 2.62' +-fribidi_req_version = '>= 1.0.6' + libthai_req_version = '>= 0.1.9' + harfbuzz_req_version = '>= 2.2.0' + fontconfig_req_version = '>= 2.11.91' +@@ -211,10 +210,6 @@ gio_dep = dependency('gio-2.0', version: glib_req_version, + fallback: ['glib', 'libgio_dep']) + pango_deps += [glib_dep, gobject_dep, gio_dep] + +-fribidi_dep = dependency('fribidi', version: fribidi_req_version, +- fallback: ['fribidi', 'libfribidi_dep'], +- default_options: ['docs=false']) +-pango_deps += fribidi_dep + + thai_dep = dependency('libthai', version: libthai_req_version, required: get_option('libthai')) + if thai_dep.found() +diff --git a/pango/pango-bidi-type.c b/pango/pango-bidi-type.c +index 32858f7..ca8adfc 100644 +--- a/pango/pango-bidi-type.c ++++ b/pango/pango-bidi-type.c +@@ -23,13 +23,20 @@ + + #include + +-#include +- + #undef PANGO_DISABLE_DEPRECATED + + #include "pango-bidi-type.h" + #include "pango-utils.h" + ++typedef uint32_t FriBidiChar; ++typedef uint32_t FriBidiCharType; ++typedef uint32_t FriBidiBracketType; ++typedef int FriBidiStrIndex; ++typedef int FriBidiParType; ++typedef signed char FriBidiLevel; ++ ++#define FRIBIDI_PAR_LTR (0x00000010L | 0x00000100L) ++ + /** + * pango_bidi_type_for_unichar: + * @ch: a Unicode character +@@ -48,40 +55,7 @@ + PangoBidiType + pango_bidi_type_for_unichar (gunichar ch) + { +- FriBidiCharType fribidi_ch_type; +- +- G_STATIC_ASSERT (sizeof (FriBidiChar) == sizeof (gunichar)); +- +- fribidi_ch_type = fribidi_get_bidi_type (ch); +- +- switch (fribidi_ch_type) +- { +- case FRIBIDI_TYPE_LTR: return PANGO_BIDI_TYPE_L; +- case FRIBIDI_TYPE_LRE: return PANGO_BIDI_TYPE_LRE; +- case FRIBIDI_TYPE_LRO: return PANGO_BIDI_TYPE_LRO; +- case FRIBIDI_TYPE_RTL: return PANGO_BIDI_TYPE_R; +- case FRIBIDI_TYPE_AL: return PANGO_BIDI_TYPE_AL; +- case FRIBIDI_TYPE_RLE: return PANGO_BIDI_TYPE_RLE; +- case FRIBIDI_TYPE_RLO: return PANGO_BIDI_TYPE_RLO; +- case FRIBIDI_TYPE_PDF: return PANGO_BIDI_TYPE_PDF; +- case FRIBIDI_TYPE_EN: return PANGO_BIDI_TYPE_EN; +- case FRIBIDI_TYPE_ES: return PANGO_BIDI_TYPE_ES; +- case FRIBIDI_TYPE_ET: return PANGO_BIDI_TYPE_ET; +- case FRIBIDI_TYPE_AN: return PANGO_BIDI_TYPE_AN; +- case FRIBIDI_TYPE_CS: return PANGO_BIDI_TYPE_CS; +- case FRIBIDI_TYPE_NSM: return PANGO_BIDI_TYPE_NSM; +- case FRIBIDI_TYPE_BN: return PANGO_BIDI_TYPE_BN; +- case FRIBIDI_TYPE_BS: return PANGO_BIDI_TYPE_B; +- case FRIBIDI_TYPE_SS: return PANGO_BIDI_TYPE_S; +- case FRIBIDI_TYPE_WS: return PANGO_BIDI_TYPE_WS; +- case FRIBIDI_TYPE_ON: return PANGO_BIDI_TYPE_ON; +- case FRIBIDI_TYPE_LRI: return PANGO_BIDI_TYPE_LRI; +- case FRIBIDI_TYPE_RLI: return PANGO_BIDI_TYPE_RLI; +- case FRIBIDI_TYPE_FSI: return PANGO_BIDI_TYPE_FSI; +- case FRIBIDI_TYPE_PDI: return PANGO_BIDI_TYPE_PDI; +- default: +- return PANGO_BIDI_TYPE_ON; +- } ++ return PANGO_BIDI_TYPE_L; + } + + /* Some bidi-related functions */ +@@ -116,36 +90,12 @@ pango_log2vis_get_embedding_levels (const gchar *text, + glong n_chars, i; + guint8 *embedding_levels_list; + const gchar *p; +- FriBidiParType fribidi_base_dir; + FriBidiCharType *bidi_types; + FriBidiBracketType *bracket_types; +- FriBidiLevel max_level; +- FriBidiCharType ored_types = 0; +- FriBidiCharType anded_strongs = FRIBIDI_TYPE_RLE; + + G_STATIC_ASSERT (sizeof (FriBidiLevel) == sizeof (guint8)); + G_STATIC_ASSERT (sizeof (FriBidiChar) == sizeof (gunichar)); + +- switch (*pbase_dir) +- { +- case PANGO_DIRECTION_LTR: +- case PANGO_DIRECTION_TTB_RTL: +- fribidi_base_dir = FRIBIDI_PAR_LTR; +- break; +- case PANGO_DIRECTION_RTL: +- case PANGO_DIRECTION_TTB_LTR: +- fribidi_base_dir = FRIBIDI_PAR_RTL; +- break; +- case PANGO_DIRECTION_WEAK_RTL: +- fribidi_base_dir = FRIBIDI_PAR_WRTL; +- break; +- case PANGO_DIRECTION_WEAK_LTR: +- case PANGO_DIRECTION_NEUTRAL: +- default: +- fribidi_base_dir = FRIBIDI_PAR_WLTR; +- break; +- } +- + if (length < 0) + length = strlen (text); + +@@ -157,20 +107,11 @@ pango_log2vis_get_embedding_levels (const gchar *text, + + for (i = 0, p = text; p < text + length; p = g_utf8_next_char(p), i++) + { +- gunichar ch = g_utf8_get_char (p); +- FriBidiCharType char_type = fribidi_get_bidi_type (ch); +- + if (i == n_chars) + break; + +- bidi_types[i] = char_type; +- ored_types |= char_type; +- if (FRIBIDI_IS_STRONG (char_type)) +- anded_strongs &= char_type; +- if (G_UNLIKELY(bidi_types[i] == FRIBIDI_TYPE_ON)) +- bracket_types[i] = fribidi_get_bracket (ch); +- else +- bracket_types[i] = FRIBIDI_NO_BRACKET; ++ bidi_types[i] = FRIBIDI_PAR_LTR; ++ bracket_types[i] = 0; + } + + /* Short-circuit (malloc-expensive) FriBidi call for unidirectional +@@ -187,56 +128,12 @@ pango_log2vis_get_embedding_levels (const gchar *text, + * o base_dir doesn't have an RTL taste. + * o there are letters, and base_dir is weak. + */ +- if (!FRIBIDI_IS_ISOLATE (ored_types) && +- !FRIBIDI_IS_RTL (ored_types) && +- !FRIBIDI_IS_ARABIC (ored_types) && +- (!FRIBIDI_IS_RTL (fribidi_base_dir) || +- (FRIBIDI_IS_WEAK (fribidi_base_dir) && +- FRIBIDI_IS_LETTER (ored_types)) +- )) +- { +- /* all LTR */ +- fribidi_base_dir = FRIBIDI_PAR_LTR; + memset (embedding_levels_list, 0, n_chars); +- goto resolved; +- } +- /* The case that all resolved levels will be RTL is much more complex. +- * No isolates, no numbers, all strongs are RTL, and one of +- * the following: +- * +- * o base_dir has an RTL taste (may be weak). +- * o there are letters, and base_dir is weak. +- */ +- else if (!FRIBIDI_IS_ISOLATE (ored_types) && +- !FRIBIDI_IS_NUMBER (ored_types) && +- FRIBIDI_IS_RTL (anded_strongs) && +- (FRIBIDI_IS_RTL (fribidi_base_dir) || +- (FRIBIDI_IS_WEAK (fribidi_base_dir) && +- FRIBIDI_IS_LETTER (ored_types)) +- )) +- { +- /* all RTL */ +- fribidi_base_dir = FRIBIDI_PAR_RTL; +- memset (embedding_levels_list, 1, n_chars); +- goto resolved; +- } +- +- +- max_level = fribidi_get_par_embedding_levels_ex (bidi_types, bracket_types, n_chars, +- &fribidi_base_dir, +- (FriBidiLevel*)embedding_levels_list); +- +- if (G_UNLIKELY(max_level == 0)) +- { +- /* fribidi_get_par_embedding_levels() failed. */ +- memset (embedding_levels_list, 0, length); +- } + +-resolved: + g_free (bidi_types); + g_free (bracket_types); + +- *pbase_dir = (fribidi_base_dir == FRIBIDI_PAR_LTR) ? PANGO_DIRECTION_LTR : PANGO_DIRECTION_RTL; ++ *pbase_dir = PANGO_DIRECTION_LTR; + + return embedding_levels_list; + } +@@ -260,17 +157,6 @@ resolved: + PangoDirection + pango_unichar_direction (gunichar ch) + { +- FriBidiCharType fribidi_ch_type; +- +- G_STATIC_ASSERT (sizeof (FriBidiChar) == sizeof (gunichar)); +- +- fribidi_ch_type = fribidi_get_bidi_type (ch); +- +- if (!FRIBIDI_IS_STRONG (fribidi_ch_type)) +- return PANGO_DIRECTION_NEUTRAL; +- else if (FRIBIDI_IS_RTL (fribidi_ch_type)) +- return PANGO_DIRECTION_RTL; +- else + return PANGO_DIRECTION_LTR; + } + diff --git a/gui/pipewire/build.sh b/gui/pipewire/build.sh index 4ee4f5e..0549167 100644 --- a/gui/pipewire/build.sh +++ b/gui/pipewire/build.sh @@ -1,14 +1,10 @@ pkgname=pipewire -pkgver=0.3.27 +pkgver=0.3.42 fetch() { - curl "https://gitlab.freedesktop.org/pipewire/pipewire/-/archive/$pkgver/pipewire-$pkgver.tar.bz2" -o $pkgname-$pkgver.tar.xz - tar -xf $pkgname-$pkgver.tar.xz + curl "https://gitlab.freedesktop.org/pipewire/pipewire/-/archive/$pkgver/pipewire-$pkgver.tar.bz2" -o $pkgname-$pkgver.tar.bz2 + tar -xf $pkgname-$pkgver.tar.bz2 mkdir $pkgname-$pkgver/build - - cp ../no-dbus.patch . - cd $pkgname-$pkgver - patch -p1 < ../no-dbus.patch } build() { @@ -18,13 +14,44 @@ build() { --buildtype=release \ --prefix=/usr \ --libexecdir=lib \ - -Dbluez5=disabled \ - -Dlibcamera=disabled \ + -Ddocs=disabled \ -Dexamples=disabled \ + -Dman=disabled \ + -Dinstalled_tests=disabled \ -Dgstreamer=disabled \ + -Dsystemd=disabled \ + -Dpipewire-jack=disabled \ + -Dpipewire-alsa=enabled \ + -Dpipewire-v4l2=disabled \ + -Dspa-plugins=enabled \ + -Dalsa=enabled \ + -Daudiomixer=enabled \ + -Dbluez5=disabled \ + -Dcontrol=enabled \ + -Daudiotestsrc=enabled \ + -Dffmpeg=disabled \ + -Djack=disabled \ + -Dsupport=enabled \ + -Devl=disabled \ + -Dv4l2=disabled \ + -Ddbus=enabled \ + -Dlibcamera=disabled \ + -Dvideoconvert=disabled \ + -Dvideotestsrc=disabled \ + -Dvolume=enabled \ + -Dvulkan=disabled \ + -Dpw-cat=disabled \ + -Dudev=disabled \ + -Dsdl2=disabled \ + -Dsndfile=disabled \ -Dlibpulse=disabled \ - -Dmedia-session=enabled \ - -Dpw-cat=enabled + -Droc=disabled \ + -Davahi=disabled \ + -Dlibusb=disabled \ + -Draop=disabled \ + -Dlv2=disabled \ + -Dsession-managers="[]" + samu } @@ -34,6 +61,10 @@ package() { DESTDIR=$pkgdir samu install } +backup() { + return +} + license() { cd $pkgname-$pkgver cat COPYING diff --git a/gui/pipewire/no-dbus.patch b/gui/pipewire/no-dbus.patch deleted file mode 100644 index 54b363e..0000000 --- a/gui/pipewire/no-dbus.patch +++ /dev/null @@ -1,84 +0,0 @@ ---- a/meson.build -+++ b/meson.build -@@ -306,7 +306,7 @@ - rt_lib = cc.find_library('rt', required : false) # clock_gettime - dl_lib = cc.find_library('dl', required : false) - pthread_lib = dependency('threads') --dbus_dep = dependency('dbus-1') -+dbus_dep = dependency('dbus-1', required : false) - sdl_dep = dependency('sdl2', required : get_option('sdl2')) - ncurses_dep = dependency('ncursesw', required : false) - sndfile_dep = dependency('sndfile', version : '>= 1.0.20', required : get_option('sndfile')) ---- a/src/modules/meson.build -+++ b/src/modules/meson.build -@@ -110,30 +110,30 @@ - dependencies : pipewire_module_protocol_deps, - ) - --pipewire_module_protocol_pulse_deps = pipewire_module_protocol_deps -- - if dbus_dep.found() -+ pipewire_module_protocol_pulse_deps = pipewire_module_protocol_deps -+ - pipewire_module_protocol_pulse_deps += dbus_dep --endif - --pipewire_module_protocol_pulse = shared_library('pipewire-module-protocol-pulse', -- [ 'module-protocol-pulse.c', -- 'module-protocol-pulse/manager.c', -- 'module-protocol-pulse/pulse-server.c', -- 'module-protocol-pulse/modules/module-loopback.c', -- 'module-protocol-pulse/modules/module-native-protocol-tcp.c', -- 'module-protocol-pulse/modules/module-null-sink.c', -- 'module-protocol-pulse/modules/module-remap-sink.c', -- 'module-protocol-pulse/modules/module-remap-source.c', -- 'module-protocol-pulse/modules/module-simple-protocol-tcp.c', -- ], -- c_args : pipewire_module_c_args, -- include_directories : [configinc, spa_inc], -- install : true, -- install_dir : modules_install_dir, -- install_rpath: modules_install_dir, -- dependencies : pipewire_module_protocol_pulse_deps, --) -+ pipewire_module_protocol_pulse = shared_library('pipewire-module-protocol-pulse', -+ [ 'module-protocol-pulse.c', -+ 'module-protocol-pulse/manager.c', -+ 'module-protocol-pulse/pulse-server.c', -+ 'module-protocol-pulse/modules/module-loopback.c', -+ 'module-protocol-pulse/modules/module-native-protocol-tcp.c', -+ 'module-protocol-pulse/modules/module-null-sink.c', -+ 'module-protocol-pulse/modules/module-remap-sink.c', -+ 'module-protocol-pulse/modules/module-remap-source.c', -+ 'module-protocol-pulse/modules/module-simple-protocol-tcp.c', -+ ], -+ c_args : pipewire_module_c_args, -+ include_directories : [configinc, spa_inc], -+ install : true, -+ install_dir : modules_install_dir, -+ install_rpath: modules_install_dir, -+ dependencies : pipewire_module_protocol_pulse_deps, -+ ) -+endif - - pipewire_module_protocol_simple = shared_library('pipewire-module-protocol-simple', - [ 'module-protocol-simple.c' ], ---- a/spa/plugins/support/meson.build -+++ b/spa/plugins/support/meson.build -@@ -32,6 +32,7 @@ - install_dir : spa_plugindir / 'support') - endif - -+if dbus_dep.found() - spa_dbus_sources = ['dbus.c'] - - spa_dbus_lib = shared_library('spa-dbus', -@@ -40,7 +41,7 @@ - dependencies : [dbus_dep, ], - install : true, - install_dir : spa_plugindir / 'support') -- -+endif - - if systemd_dep.found() - spa_journal_sources = ['journal.c'] diff --git a/gui/seatd/build.sh b/gui/seatd/build.sh index f36f1f2..cfcb640 100644 --- a/gui/seatd/build.sh +++ b/gui/seatd/build.sh @@ -1,5 +1,5 @@ pkgname=seatd -pkgver=0.5.0 +pkgver=0.6.3 fetch() { curl "https://git.sr.ht/~kennylevinsen/seatd/archive/$pkgver.tar.gz" -o $pkgname-$pkgver.tar.xz @@ -25,6 +25,10 @@ package() { DESTDIR=$pkgdir samu install } +backup() { + return +} + license() { cd $pkgname-$pkgver cat LICENSE diff --git a/gui/sway/build.sh b/gui/sway/build.sh index f0daca6..a819564 100644 --- a/gui/sway/build.sh +++ b/gui/sway/build.sh @@ -2,33 +2,28 @@ pkgname=sway pkgver=master fetch() { - curl -L "https://github.com/DCVIII/sway/archive/refs/heads/master.tar.gz" -o $pkgname-$pkgver.tar.gz - # local wlroots isn't new enough - curl -L "https://github.com/swaywm/wlroots/archive/refs/heads/master.tar.gz" -o wlroots-master.tar.gz + # curl -L "https://github.com/swaywm/sway/releases/download/$pkgver/sway-$pkgver.tar.gz" -o $pkgname-$pkgver.tar.xz + curl -L "https://github.com/swaywm/sway/archive/refs/heads/master.tar.gz" -o $pkgname-$pkgver.tar.gz tar -xf $pkgname-$pkgver.tar.gz - tar -xf wlroots-master.tar.gz - mkdir $pkgname-$pkgver/subprojects - mv wlroots-master $pkgname-$pkgver/subprojects/wlroots mkdir $pkgname-$pkgver/build + cd $pkgname-$pkgver } build() { cd $pkgname-$pkgver cd build - CFLAGS=-'Wno-unused-const-variable -Wno-unused-function -Wno-error' \ meson .. \ --buildtype=release \ --prefix=/usr \ --libexecdir=lib \ - -Dexamples=false \ + -Ddefault-wallpaper=true \ + -Dzsh-completions=true \ + -Dbash-completions=false \ + -Dfish-completions=false \ -Dxwayland=disabled \ - -Dxcb-errors=disabled \ - -Dxcb-icccm=disbeld \ - -Dwlroots:examples=false \ - -Dwlroots:xcb-errors=disabled \ - -Dwlroots:x11-backend=disabled \ - -Dwlroots:default_library=static - + -Dtray=disabled \ + -Dgdk-pixbuf=disabled \ + -Dman-pages=disabled samu } @@ -36,9 +31,10 @@ package() { cd $pkgname-$pkgver cd build DESTDIR=$pkgdir samu install +} - rm -rf $pkgdir/usr/lib/ - rm -rf $pkgdir/usr/include/ +backup() { + echo /etc/sway/config } license() { diff --git a/gui/swaybg/build.sh b/gui/swaybg/build.sh new file mode 100644 index 0000000..23896e4 --- /dev/null +++ b/gui/swaybg/build.sh @@ -0,0 +1,30 @@ +pkgname=swaybg +pkgver=1.1 + +fetch() { + curl -L "https://github.com/swaywm/swaybg/releases/download/v$pkgver/swaybg-$pkgver.tar.gz" -o $pkgname-$pkgver.tar.gz + tar -xf $pkgname-$pkgver.tar.gz + mkdir $pkgname-$pkgver/build +} + +build() { + cd $pkgname-$pkgver + cd build + meson .. \ + --buildtype=release \ + --prefix=/usr \ + --libexecdir=lib + samu +} + +package() { + cd $pkgname-$pkgver + cd build + DESTDIR=$pkgdir samu install +} + +license() { + cd $pkgname-$pkgver + cat LICENSE +# cat COPYING +} diff --git a/gui/vulkan-headers/build.sh b/gui/vulkan-headers/build.sh index 3bd47f4..29189c6 100644 --- a/gui/vulkan-headers/build.sh +++ b/gui/vulkan-headers/build.sh @@ -1,8 +1,8 @@ pkgname=vulkan-headers -pkgver=1.2.182 +pkgver=1.2.196 fetch() { - curl -L "https://github.com/KhronosGroup/Vulkan-Headers/archive/v1.2.182.tar.gz" -o $pkgname-$pkgver.tar.xz + curl -L "https://github.com/KhronosGroup/Vulkan-Headers/archive/v$pkgver.tar.gz" -o $pkgname-$pkgver.tar.xz tar -xf $pkgname-$pkgver.tar.xz mv Vulkan-Headers-$pkgver $pkgname-$pkgver mkdir $pkgname-$pkgver/build diff --git a/gui/wayland-protocols/build.sh b/gui/wayland-protocols/build.sh index 2239f7f..8f5483a 100644 --- a/gui/wayland-protocols/build.sh +++ b/gui/wayland-protocols/build.sh @@ -1,21 +1,31 @@ pkgname=wayland-protocols -pkgver=1.21 -deps="pkgconf:wayland" +pkgver=1.24 +deps="musl:pkgconf:wayland" fetch() { curl "https://wayland.freedesktop.org/releases/wayland-protocols-$pkgver.tar.xz" -o $pkgname-$pkgver.tar.xz tar -xf $pkgname-$pkgver.tar.xz + mkdir $pkgname-$pkgver/build } build() { cd $pkgname-$pkgver - ./configure --prefix=/usr - make + cd build + meson .. \ + --buildtype=release \ + --prefix=/usr \ + --libexecdir=lib + samu } package() { cd $pkgname-$pkgver - make DESTDIR=$pkgdir install + cd build + DESTDIR=$pkgdir samu install +} + +backup() { + return } license() { diff --git a/gui/wayland/build.sh b/gui/wayland/build.sh index 6c8bcba..ce68c57 100644 --- a/gui/wayland/build.sh +++ b/gui/wayland/build.sh @@ -1,9 +1,8 @@ pkgname=wayland -pkgver=1.19.0 -deps="libxml2" +pkgver=1.20.0 fetch() { - curl "https://wayland.freedesktop.org/releases/wayland-1.19.0.tar.xz" -o $pkgname-$pkgver.tar.xz + curl "https://wayland.freedesktop.org/releases/wayland-$pkgver.tar.xz" -o $pkgname-$pkgver.tar.xz tar -xf $pkgname-$pkgver.tar.xz mkdir $pkgname-$pkgver/build } @@ -14,7 +13,11 @@ build() { meson .. \ --buildtype=release \ --prefix=/usr \ - -Ddocumentation=false + -Dlibraries=true \ + -Dscanner=true \ + -Dtests=false \ + -Ddocumentation=false \ + -Ddtd_validation=false samu } @@ -24,6 +27,10 @@ package() { DESTDIR=$pkgdir samu install } +backup() { + return +} + license() { cd $pkgname-$pkgver cat COPYING diff --git a/gui/wlroots/build.sh b/gui/wlroots/build.sh index fd9793e..8cfdbd9 100644 --- a/gui/wlroots/build.sh +++ b/gui/wlroots/build.sh @@ -1,9 +1,8 @@ pkgname=wlroots -pkgver=0.14.0 -ext="dev" +pkgver=0.15.0 fetch() { - curl -L "https://github.com/swaywm/wlroots/releases/download/$pkgver/wlroots-$pkgver.tar.gz" -o $pkgname-$pkgver.tar.xz + curl -L "https://gitlab.freedesktop.org/wlroots/wlroots/-/archive/$pkgver/wlroots-$pkgver.tar.gz" -o $pkgname-$pkgver.tar.xz tar -xf $pkgname-$pkgver.tar.xz mkdir $pkgname-$pkgver/build } @@ -15,7 +14,11 @@ build() { --buildtype=release \ --prefix=/usr \ --libexecdir=lib \ - -Dlibseat=enabled + -Dxcb-errors=disabled \ + -Dxwayland=disabled \ + -Dexamples=false \ + -Drenderers="['gles2', 'vulkan']" \ + -Dbackends="['drm', 'libinput']" samu } @@ -23,16 +26,10 @@ package() { cd $pkgname-$pkgver cd build DESTDIR=$pkgdir samu install - rm -r $pkgdir/usr/include - rm -r $pkgdir/usr/lib/pkgconfig } -package_dev() { - cd $pkgname-$pkgver - cd build - DESTDIR=$pkgdir samu install - rm $pkgdir/usr/lib/*.so - rm $pkgdir/usr/lib/*.so.* +backup() { + return } license() { diff --git a/gui/xkeyboard-config/build.sh b/gui/xkeyboard-config/build.sh new file mode 100644 index 0000000..9b1e031 --- /dev/null +++ b/gui/xkeyboard-config/build.sh @@ -0,0 +1,30 @@ +pkgname=xkeyboard-config +pkgver=2.33 + +fetch() { + curl "https://xorg.freedesktop.org/archive/individual/data/$pkgname/$pkgname-$pkgver.tar.bz2" -o $pkgname-$pkgver.tar.xz + tar -xf $pkgname-$pkgver.tar.xz + mkdir $pkgname-$pkgver/build +} + +build() { + cd $pkgname-$pkgver + cd build + meson .. \ + --buildtype=release \ + --prefix=/usr \ + --libexecdir=lib + samu +} + +package() { + cd $pkgname-$pkgver + cd build + DESTDIR=$pkgdir samu install +} + +license() { + cd $pkgname-$pkgver + cat LICENSE +# cat COPYING +} diff --git a/linux/busybox/build.sh b/linux/busybox/build.sh index 825e40b..f7427e4 100644 --- a/linux/busybox/build.sh +++ b/linux/busybox/build.sh @@ -1,4 +1,4 @@ -pkgver=1.34.0 +pkgver=1.34.1 pkgname=busybox bad=gmake deps="musl" @@ -7,14 +7,17 @@ pkgrel=1 fetch() { curl "https://busybox.net/downloads/busybox-$pkgver.tar.bz2" -o $pkgname-$pkgver.tar.gz tar -xf $pkgname-$pkgver.tar.gz + cd $pkgname-$pkgver + patch -p1 < ../../clang-fix.patch + patch -p1 < ../../modprobe.patch # cp ../man.sh . } build() { cd $pkgname-$pkgver - gmake HOSTCC=cc CC=cc CFLAGS=-O0 defconfig - gmake HOSTCC=cc CC=cc CFLAGS=-O0 - gmake HOSTCC=cc CC=cc CFLAGS=-O0 install + gmake HOSTCC=cc CC=cc defconfig + gmake HOSTCC=cc CC=cc + gmake HOSTCC=cc CC=cc install } package() { diff --git a/linux/busybox/clang-fix.patch b/linux/busybox/clang-fix.patch new file mode 100644 index 0000000..ce77652 --- /dev/null +++ b/linux/busybox/clang-fix.patch @@ -0,0 +1 @@ +You are being redirected. \ No newline at end of file diff --git a/linux/busybox/modprobe.patch b/linux/busybox/modprobe.patch new file mode 100644 index 0000000..e69de29 diff --git a/linux/linux/build.sh b/linux/linux/build.sh index af424b2..806ad8e 100644 --- a/linux/linux/build.sh +++ b/linux/linux/build.sh @@ -1,18 +1,20 @@ -pkgver=5.14.7 +pkgver=5.15 pkgname=linux pkgrel=1 ext="dev" fetch() { - curl "https://raw.githubusercontent.com/kisslinux/website/master/site/dist/kernel-no-perl.patch" -o kernel-no-perl.patch + return + # curl "https://raw.githubusercontent.com/kisslinux/website/master/site/dist/kernel-no-perl.patch" -o kernel-no-perl.patch curl "https://cdn.kernel.org/pub/linux/kernel/v5.x/$pkgname-$pkgver.tar.xz" -o $pkgname-$pkgver.tar.xz tar -xf $pkgname-$pkgver.tar.xz cd $pkgname-$pkgver # use Alpine's kernel config so we don't have to maintain one # curl "https://git.alpinelinux.org/aports/plain/community/linux-edge/config-edge.$(uname -m)" -o .config - patch -p1 < ../kernel-no-perl.patch + # patch -p1 < ../kernel-no-perl.patch patch -p1 < ../../kernel-byacc.patch + patch -p1 < ../../v3d-enable.patch # patch -p1 < ../../reflex.patch } @@ -23,28 +25,27 @@ esac build() { cd $pkgname-$pkgver - gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 ARCH=$_arch defconfig - gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 ARCH=$_arch localmodconfig + return + bad --gmake gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 ARCH=$_arch defconfig + bad --gmake gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 ARCH=$_arch localmodconfig # gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ LEX=lex YACC=yacc LLVM_IAS=1 menuconfig # cp .config ../../$(uname -m).config.new sed -i 's/CONFIG_UNWINDER_ORC=y/# CONFIG_UNWINDER_ORC is not set/g' .config sed -i 's/# CONFIG_UNWINDER_FRAME_POINTER is not set/CONFIG_UNWINDER_FRAME_POINTER=y/g' .config - gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 ARCH=$_arch + bad --gmake gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 ARCH=$_arch } package() { cd $pkgname-$pkgver install -d $pkgdir/boot - gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 ARCH=$_arch INSTALL_PATH=$pkgdir/boot install - gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 ARCH=$_arch INSTALL_MOD_PATH=$pkgdir/ modules_install -} + bad --gmake gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 ARCH=$_arch INSTALL_PATH=$pkgdir/boot install + bad --gmake gmake CC=cc HOSTCC=cc LEX=flex YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch INSTALL_DTBS_PATH=$pkgdir/boot dtbs_install + bad --gmake gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 ARCH=$_arch INSTALL_MOD_PATH=$pkgdir/ modules_install -package_dev() { - cd $pkgname-$pkgver if stat /usr/bin/rsync 2>/dev/null /dev/null; then - gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 ARCH=$_arch INSTALL_HDR_PATH=$pkgdir/usr headers_install + bad --gmake gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 ARCH=$_arch INSTALL_HDR_PATH=$pkgdir/usr headers_install else - gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 ARCH=$_arch headers + bad --gmake gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 ARCH=$_arch headers find -name '.*' -exec rm {} \; rm usr/include/Makefile install -d $pkgdir/usr/ @@ -52,6 +53,10 @@ package_dev() { fi } +backup() { + return +} + license() { cd $pkgname-$pkgver cat COPYING diff --git a/linux/linux/v3d-enable.patch b/linux/linux/v3d-enable.patch new file mode 100644 index 0000000..e9d1e54 --- /dev/null +++ b/linux/linux/v3d-enable.patch @@ -0,0 +1,30 @@ +From 24662c14b45852c2d5fc4721b1494bce8345319d Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Thu, 15 Aug 2019 12:02:34 +0100 +Subject: [PATCH] configs: arm64/bcm2711: Enable V3D + +Enable the V3D driver, which depends on BCM2835_POWER. + +Originally submitted by GitHub user 'phire' in a slightly different +form. + +See: https://github.com/raspberrypi/linux/pull/3063 + +Signed-off-by: Phil Elwell +--- + drivers/gpu/drm/v3d/Kconfig | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/gpu/drm/v3d/Kconfig b/drivers/gpu/drm/v3d/Kconfig +index 9a5c44606337e..b0e0486979642 100644 +--- a/drivers/gpu/drm/v3d/Kconfig ++++ b/drivers/gpu/drm/v3d/Kconfig +@@ -1,7 +1,7 @@ + # SPDX-License-Identifier: GPL-2.0-only + config DRM_V3D + tristate "Broadcom V3D 3.x and newer" +- depends on ARCH_BCM || ARCH_BCMSTB || COMPILE_TEST ++ depends on ARCH_BCM || ARCH_BCMSTB || ARCH_BCM2835 || COMPILE_TEST + depends on DRM + depends on COMMON_CLK + depends on MMU diff --git a/linux/raspberrypi-linux/build.sh b/linux/raspberrypi-linux/build.sh index 575306c..459dd64 100644 --- a/linux/raspberrypi-linux/build.sh +++ b/linux/raspberrypi-linux/build.sh @@ -1,15 +1,12 @@ -pkgver=1.20210303-1 +pkgver=1.20211007 pkgname=raspberrypi-linux -ext="dev" fetch() { - curl "https://raw.githubusercontent.com/kisslinux/website/master/site/dist/kernel-no-perl.patch" -o kernel-no-perl.patch - curl -L "https://github.com/raspberrypi/linux/archive/refs/tags/raspberrypi-kernel_$pkgver.tar.gz" -o $pkgname-$pkgver.tar.gz + curl -L "https://github.com/raspberrypi/linux/archive/refs/tags/$pkgver.tar.gz" -o $pkgname-$pkgver.tar.gz tar -xf $pkgname-$pkgver.tar.gz mv linux-raspberrypi-kernel_$pkgver $pkgname-$pkgver cd $pkgname-$pkgver - patch -p1 < ../kernel-no-perl.patch patch -p1 < ../../kernel-byacc.patch # patch -p1 < ../../reflex.patch } @@ -30,20 +27,23 @@ package() { mv $pkgdir/boot/broadcom/* $pkgdir/boot/ rmdir $pkgdir/boot/broadcom -} -package_dev() { - cd $pkgname-$pkgver if stat /usr/bin/rsync 2>/dev/null /dev/null; then + echo "using rsync" gmake ARCH=arm64 CC=cc HOSTCC=cc LEX=flex YACC=yacc LLVM=1 LLVM_IAS=1 INSTALL_HDR_PATH=$pkgdir/usr headers_install else gmake ARCH=arm64 CC=cc HOSTCC=cc LEX=flex YACC=yacc LLVM=1 LLVM_IAS=1 headers find -name '.*' -exec rm {} \; rm usr/include/Makefile - cp -r usr/include $pkgdir/usr + install -d $pkgdir/usr/ + cp -r usr/include $pkgdir/usr/ fi } +backup() { + return +} + license() { cd $pkgname-$pkgver cat COPYING diff --git a/linux/rpi-linux-rev2/build.sh b/linux/rpi-linux-rev2/build.sh new file mode 100644 index 0000000..aee5e3d --- /dev/null +++ b/linux/rpi-linux-rev2/build.sh @@ -0,0 +1,50 @@ +pkgver=rpi-5.10.y +pkgname=linux +pkgrel=1 +ext="dev" + +fetch() { + fetch_tar "$pkgname-$pkgver.tar.gz" f633fabf55892cf19fc9173d2b8df779 "https://github.com/raspberrypi/linux/archive/refs/heads/$pkgver.tar.gz" + cd $pkgname-$pkgver + + patch -p1 < ../../kernel-byacc.patch + curl 'https://cgit.freedesktop.org/drm/drm/patch/?id=26a4dc29b74a137f45665089f6d3d633fcc9b662' | patch -p1 +} + +_arch=$ARCH +case $_arch in +aarch64*) _arch="arm64" ;; +esac + +build() { + cd $pkgname-$pkgver + bad --gmake gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 ARCH=$_arch bcm2711_defconfig + bad --gmake gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 ARCH=$_arch +} + +package() { + cd $pkgname-$pkgver + install -d $pkgdir/boot + bad --gmake gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 ARCH=$_arch INSTALL_PATH=$pkgdir/boot install + bad --gmake gmake CC=cc HOSTCC=cc LEX=flex YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch INSTALL_DTBS_PATH=$pkgdir/boot dtbs_install + bad --gmake gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 ARCH=$_arch INSTALL_MOD_PATH=$pkgdir/ modules_install + + if stat /usr/bin/rsync 2>/dev/null /dev/null; then + bad --gmake gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 ARCH=$_arch INSTALL_HDR_PATH=$pkgdir/usr headers_install + else + bad --gmake gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 ARCH=$_arch headers + find -name '.*' -exec rm {} \; + rm usr/include/Makefile + install -d $pkgdir/usr/ + cp -r usr/include $pkgdir/usr/ + fi +} + +backup() { + return +} + +license() { + cd $pkgname-$pkgver + cat COPYING +} diff --git a/linux/rpi-linux-rev2/kernel-byacc.patch b/linux/rpi-linux-rev2/kernel-byacc.patch new file mode 100644 index 0000000..b2aa286 --- /dev/null +++ b/linux/rpi-linux-rev2/kernel-byacc.patch @@ -0,0 +1,35 @@ +diff --git a/scripts/Makefile.host b/scripts/Makefile.host +index 4c51c95d40f4..64e98e1d4825 100644 +--- a/scripts/Makefile.host ++++ b/scripts/Makefile.host +@@ -11,7 +11,7 @@ $(obj)/%.lex.c: $(src)/%.l FORCE + # YACC + # --------------------------------------------------------------------------- + quiet_cmd_bison = YACC $(basename $@).[ch] +- cmd_bison = $(YACC) -o $(basename $@).c --defines=$(basename $@).h -t -l $< ++ cmd_bison = $(YACC) -b $(basename $(basename $@)) -d -t -l $< + + $(obj)/%.tab.c $(obj)/%.tab.h: $(src)/%.y FORCE + $(call if_changed,bison) +--- a/scripts/genksyms/Makefile ++++ b/scripts/genksyms/Makefile +@@ -14,7 +14,7 @@ + ifeq ($(findstring 1,$(KBUILD_EXTRA_WARN)),) + + quiet_cmd_bison_no_warn = $(quiet_cmd_bison) +- cmd_bison_no_warn = $(YACC) --version >/dev/null; \ ++ cmd_bison_no_warn = $(YACC) -V >/dev/null; \ + $(cmd_bison) 2>/dev/null + + $(obj)/pars%.tab.c $(obj)/pars%.tab.h: $(src)/pars%.y FORCE +--- a/scripts/genksyms/lex.l ++++ b/scripts/genksyms/lex.l +@@ -19,6 +19,8 @@ + #include "genksyms.h" + #include "parse.tab.h" + ++extern YYSTYPE yylval; ++ + /* We've got a two-level lexer here. We let flex do basic tokenization + and then we categorize those basic tokens in the second stage. */ + #define YY_DECL static int yylex1(void) diff --git a/gui/alacritty/build.sh b/old/alacritty/build.sh similarity index 100% rename from gui/alacritty/build.sh rename to old/alacritty/build.sh diff --git a/gui/graphicsmagick/build.sh b/old/graphicsmagick/build.sh similarity index 100% rename from gui/graphicsmagick/build.sh rename to old/graphicsmagick/build.sh diff --git a/gui/imagemagick/build.sh b/old/imagemagick/build.sh similarity index 100% rename from gui/imagemagick/build.sh rename to old/imagemagick/build.sh diff --git a/base/pci-ids/build.sh b/old/pci-ids/build.sh similarity index 100% rename from base/pci-ids/build.sh rename to old/pci-ids/build.sh diff --git a/gui/river/build.sh b/old/river/build.sh similarity index 100% rename from gui/river/build.sh rename to old/river/build.sh diff --git a/gui/sqlite/build.sh b/old/sqlite/build.sh similarity index 100% rename from gui/sqlite/build.sh rename to old/sqlite/build.sh diff --git a/gui/swc/build.sh b/old/swc/build.sh similarity index 100% rename from gui/swc/build.sh rename to old/swc/build.sh diff --git a/gui/swc/config.mk b/old/swc/config.mk similarity index 100% rename from gui/swc/config.mk rename to old/swc/config.mk diff --git a/gui/swvkc/build.sh b/old/swvkc/build.sh similarity index 100% rename from gui/swvkc/build.sh rename to old/swvkc/build.sh diff --git a/gui/velox/build.sh b/old/velox/build.sh similarity index 100% rename from gui/velox/build.sh rename to old/velox/build.sh diff --git a/gui/velox/config.mk b/old/velox/config.mk similarity index 100% rename from gui/velox/config.mk rename to old/velox/config.mk diff --git a/gui/velox/velox.conf b/old/velox/velox.conf similarity index 100% rename from gui/velox/velox.conf rename to old/velox/velox.conf diff --git a/gui/webkit/build.sh b/old/webkit/build.sh similarity index 100% rename from gui/webkit/build.sh rename to old/webkit/build.sh diff --git a/gui/wld/build.sh b/old/wld/build.sh similarity index 100% rename from gui/wld/build.sh rename to old/wld/build.sh diff --git a/pkgs/cava/build.sh b/pkgs/cava/build.sh new file mode 100644 index 0000000..edeed0a --- /dev/null +++ b/pkgs/cava/build.sh @@ -0,0 +1,28 @@ +pkgname=cava +pkgver=0.7.4 + +fetch() { + curl -L "https://github.com/karlstav/cava/archive/refs/tags/$pkgver.tar.gz" -o $pkgname-$pkgver.tar.xz + tar -xf $pkgname-$pkgver.tar.xz +} + +build() { + cd $pkgname-$pkgver + ./configure \ + --prefix=/usr \ + --build=$TRIPLE \ + --host=$TRIPLE + + make +} + +package() { + cd $pkgname-$pkgver + make install DESTDIR=$pkgdir +} + +license() { + cd $pkgname-$pkgver + cat LICENSE +# cat COPYING +} diff --git a/pkgs/imv/build.sh b/pkgs/imv/build.sh new file mode 100644 index 0000000..03c14b1 --- /dev/null +++ b/pkgs/imv/build.sh @@ -0,0 +1,32 @@ +pkgname=imv +pkgver=4.2.0 + +fetch() { + curl -L "https://github.com/eXeC64/imv/archive/refs/tags/v$pkgver.tar.gz" -o $pkgname-$pkgver.tar.xz + tar -xf $pkgname-$pkgver.tar.xz + mkdir $pkgname-$pkgver/build +} + +build() { + cd $pkgname-$pkgver + cd build + meson .. \ + --buildtype=release \ + --prefix=/usr \ + --libexecdir=lib \ + -Dlibrsvg=disabled \ + -Dwindows=wayland + samu +} + +package() { + cd $pkgname-$pkgver + cd build + DESTDIR=$pkgdir samu install +} + +license() { + cd $pkgname-$pkgver + cat LICENSE +# cat COPYING +} diff --git a/pkgs/kak-lsp/build.sh b/pkgs/kak-lsp/build.sh index 5b5f296..e69de29 100644 --- a/pkgs/kak-lsp/build.sh +++ b/pkgs/kak-lsp/build.sh @@ -1,24 +0,0 @@ -pkgname=kak-lsp -pkgver=9.0.0 - -fetch() { - curl -L "https://github.com/kak-lsp/kak-lsp/archive/v$pkgver.tar.gz" -o $pkgname-$pkgver.tar.xz - tar -xf $pkgname-$pkgver.tar.xz -} - -build() { - cd $pkgname-$pkgver - cargo build --release --locked --all-features -} - -package() { - cd $pkgname-$pkgver - install -Dm755 target/release/$pkgname $pkgdir/usr/bin/ - install -Dm644 rc/lsp.kak $pkgdir/usr/share/kak-lsp/rc/ - install -Dm644 kak-lsp.toml $pkgdir/usr/share/kak-lsp/examples/ -} - -license() { - cd $pkgname-$pkgver - cat UNLICENSE -} diff --git a/pkgs/libslirp/build.sh b/pkgs/libslirp/build.sh new file mode 100644 index 0000000..fa3d8c7 --- /dev/null +++ b/pkgs/libslirp/build.sh @@ -0,0 +1,31 @@ +pkgname=libslirp +pkgver=4.6.1 + +fetch() { + curl "https://gitlab.freedesktop.org/slirp/libslirp/-/archive/v$pkgver/libslirp-v$pkgver.tar.bz2" -o $pkgname-$pkgver.tar.bz2 + tar -xf $pkgname-$pkgver.tar.bz2 + mv $pkgname-v$pkgver $pkgname-$pkgver + mkdir $pkgname-$pkgver/build +} + +build() { + cd $pkgname-$pkgver + cd build + meson .. \ + --buildtype=release \ + --prefix=/usr \ + --libexecdir=lib + samu +} + +package() { + cd $pkgname-$pkgver + cd build + DESTDIR=$pkgdir samu install +} + +license() { + cd $pkgname-$pkgver + cat LICENSE +# cat COPYING +} diff --git a/pkgs/qtbase/build.sh b/pkgs/qtbase/build.sh index 0cef6bf..e69de29 100644 --- a/pkgs/qtbase/build.sh +++ b/pkgs/qtbase/build.sh @@ -1,37 +0,0 @@ -pkgname=qtbase -pkgver=5.12 - -fetch() { - curl "https://invent.kde.org/qt/qt/qtbase/-/archive/$pkgver/qtbase-$pkgver.tar.gz" -o $pkgname-$pkgver.tar.xz - tar -xf $pkgname-$pkgver.tar.xz - mkdir $pkgname-$pkgver/build - mkdir $pkgname-$pkgver/.git -} - -build() { - cd $pkgname-$pkgver - cd build - - ../configure \ - -opensource \ - -confirm-license \ - -nomake examples \ - -nomake tests \ - -platform linux-clang-libc++ \ - -no-openssl \ - -prefix /usr - - gmake -} - -package() { - cd $pkgname-$pkgver - cd build - gmake INSTALL_ROOT=$pkgdir install -} - -license() { - cd $pkgname-$pkgver - cat LICENSE* -# cat COPYING -} diff --git a/pkgs/qtbase/musl-socket.patch b/pkgs/qtbase/musl-socket.patch index 11b9181..e69de29 100644 --- a/pkgs/qtbase/musl-socket.patch +++ b/pkgs/qtbase/musl-socket.patch @@ -1,11 +0,0 @@ ---- a/mkspecs/linux-clang/qplatformdefs.h -+++ b/mkspecs/linux-clang/qplatformdefs.h -@@ -81,7 +81,7 @@ - - #undef QT_SOCKLEN_T - --#if defined(__GLIBC__) && (__GLIBC__ >= 2) -+#if defined(__GLIBC__) && (__GLIBC__ >= 2) || !defined(__GLIBC__) - #define QT_SOCKLEN_T socklen_t - #else - #define QT_SOCKLEN_T int diff --git a/pkgs/qtbase/qplatformdefs.h b/pkgs/qtbase/qplatformdefs.h index f5d0562..e69de29 100644 --- a/pkgs/qtbase/qplatformdefs.h +++ b/pkgs/qtbase/qplatformdefs.h @@ -1,95 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the qmake spec of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QPLATFORMDEFS_H -#define QPLATFORMDEFS_H - -// Get Qt defines/settings - -#include "qglobal.h" - -// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs - -// 1) need to reset default environment if _BSD_SOURCE is defined -// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0 -// 3) it seems older glibc need this to include the X/Open stuff -#ifndef _GNU_SOURCE -# define _GNU_SOURCE -#endif - -#include - -// We are hot - unistd.h should have turned on the specific APIs we requested - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define QT_USE_XOPEN_LFS_EXTENSIONS -#include "../common/posix/qplatformdefs.h" - -#undef QT_SOCKLEN_T - -#if defined(__GLIBC__) && (__GLIBC__ >= 2) || !defined(__GLIBC__) -#define QT_SOCKLEN_T socklen_t -#else -#define QT_SOCKLEN_T int -#endif - -#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500) -#define QT_SNPRINTF ::snprintf -#define QT_VSNPRINTF ::vsnprintf -#endif - -#endif // QPLATFORMDEFS_H diff --git a/pkgs/qtwayland/build.sh b/pkgs/qtwayland/build.sh index ed1ebcc..e69de29 100644 --- a/pkgs/qtwayland/build.sh +++ b/pkgs/qtwayland/build.sh @@ -1,26 +0,0 @@ -pkgname=qtwayland -pkgver=5.12 - -fetch() { - curl "https://invent.kde.org/qt/qt/$pkgname/-/archive/$pkgver/$pkgname-$pkgver.tar.gz" -o $pkgname-$pkgver.tar.xz - tar -xf $pkgname-$pkgver.tar.xz - mkdir $pkgname-$pkgver/.git -} - -build() { - cd $pkgname-$pkgver - - qmake - gmake -} - -package() { - cd $pkgname-$pkgver - gmake INSTALL_ROOT=$pkgdir install -} - -license() { - cd $pkgname-$pkgver - cat LICENSE -# cat COPYING -} diff --git a/pkgs/ribidi/build.sh b/pkgs/ribidi/build.sh deleted file mode 100644 index f32a601..0000000 --- a/pkgs/ribidi/build.sh +++ /dev/null @@ -1,30 +0,0 @@ -pkgname=ribidi -pkgver=main - -fetch() { - curl -L "https://github.com/iglunix/ribidi/archive/refs/heads/main.tar.gz" -o $pkgname-$pkgver.tar.xz - tar -xf $pkgname-$pkgver.tar.xz -} - -build() { - cd $pkgname-$pkgver - cargo build --release --all-features -} - -package() { - cd $pkgname-$pkgver - install -Dm755 target/release/lib$pkgname.so $pkgdir/usr/lib/ - install -Dm644 include/ribidi.h $pkgdir/usr/include/ribidi/ - install -d $pkgdir/usr/include/fribidi - ln -sr $pkgdir/usr/include/ribidi/ribidi.h $pkgdir/usr/include/fribidi/fribidi.h - - - install -Dm644 $pkgname.pc $pkgdir/usr/lib/pkgconfig/ - install -Dm644 f$pkgname.pc $pkgdir/usr/lib/pkgconfig/ -} - -license() { - cd $pkgname-$pkgver - cat LICENSE -# cat COPYING -} diff --git a/pkgs/strace/build.sh b/pkgs/strace/build.sh new file mode 100644 index 0000000..017059c --- /dev/null +++ b/pkgs/strace/build.sh @@ -0,0 +1,28 @@ +pkgname=strace +pkgver=5.13 + +fetch() { + curl "https://strace.io/files/$pkgver/strace-$pkgver.tar.xz" -o $pkgname-$pkgver.tar.xz + tar -xf $pkgname-$pkgver.tar.xz +} + +build() { + cd $pkgname-$pkgver + ./configure \ + --prefix=/usr \ + --build=$TRIPLE \ + --host=$TRIPLE + + make +} + +package() { + cd $pkgname-$pkgver + make install DESTDIR=$pkgdir +} + +license() { + cd $pkgname-$pkgver + cat LICENSE +# cat COPYING +} diff --git a/pkgs/vulkan-validation-layers/build.sh b/pkgs/vulkan-validation-layers/build.sh new file mode 100644 index 0000000..fde01bd --- /dev/null +++ b/pkgs/vulkan-validation-layers/build.sh @@ -0,0 +1,34 @@ +pkgname=vulkan-validation-layers +pkgver=1.2.184 + +fetch() { + curl -L "https://github.com/KhronosGroup/Vulkan-ValidationLayers/archive/refs/tags/v$pkgver.tar.gz" -o $pkgname-$pkgver.tar.xz + tar -xf $pkgname-$pkgver.tar.xz + mv Vulkan-ValidationLayers-$pkgver $pkgname-$pkgver + mkdir $pkgname-$pkgver/build +} + +build() { + cd $pkgname-$pkgver + cd build + ../scripts/update_deps.py + cmake -G Ninja ../ \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DBUILD_WSI_XLIB_SUPPORT=OFF \ + -DBUILD_WSI_XCB_SUPPORT=OFF + samu +} + +package() { + cd $pkgname-$pkgver + cd build + DESTDIR=$pkgdir samu install +} + +license() { + cd $pkgname-$pkgver + cat LICENSE +# cat COPYING +} diff --git a/scripts/buildbase.sh b/scripts/buildbase.sh new file mode 100755 index 0000000..dde13c9 --- /dev/null +++ b/scripts/buildbase.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +cd base + diff --git a/scripts/iglu.sh b/scripts/iglu.sh index 0de0116..b0ed380 100755 --- a/scripts/iglu.sh +++ b/scripts/iglu.sh @@ -187,7 +187,7 @@ elif [ "$i" = "1" ]; then deps=$(grep deps /tmp/iglunix/$bname_we/usr/share/iglupkg/$bname | tr '=' '\n' | grep -v deps | tr ':' '\n') for dep in $deps; do stat /usr/share/iglupkg/$dep > /dev/null 2> /dev/null || dep_not_found $dep - done + done tar -I zstd -xf $1 -C / rm -r /tmp/iglunix/$bname_we elif [ "$f" = "1" ]; then diff --git a/scripts/iglupkg b/scripts/iglupkg new file mode 100755 index 0000000..42146d9 --- /dev/null +++ b/scripts/iglupkg @@ -0,0 +1,125 @@ +#!/bin/sh +export JOBS="$(nproc)" + +#export RUSTFLAGS="-C target-cpu=native" +export CC=clang +export CXX=clang++ +export ARCH=$(uname -m) +export KERN=linux +export ABI=musl +export TRIPLE=$ARCH-unknown-$KERN-$ABI + +#export CFLAGS="-march=native" +#export CXXFLAGS="-march=native" + +stat /etc/iglupkg.conf > /dev/null 2> /dev/null && . /etc/iglupkg.conf + +export SAMUFLAGS=-j$JOBS + +. ./build.sh +dir=$(pwd) +stat out > /dev/null && rm -rf out +mkdir out + +srcdir=$(pwd)/src + +function do_fetch() { + mkdir -p src + cd src + srcdir=$(pwd) + srcdir=$srcdir fetch + touch $srcdir/.fetched +} + +function do_build() { + srcdir=$(pwd) + srcdir=$srcdir build + touch $srcdir/.built +} + +stat src/.fetched > /dev/null 2>/dev/null || do_fetch +stat src/.fetched > /dev/null 2>/dev/null && echo '========================' +stat src/.fetched > /dev/null 2>/dev/null && echo 'Warning: Already Fetched' +stat src/.fetched > /dev/null 2>/dev/null && echo '========================' + +cd $srcdir +MAKEFLAGS=-j$JOBS stat .built > /dev/null 2> /dev/null || build + +stat .built > /dev/null 2>/dev/null && echo '========================' +stat .built > /dev/null 2>/dev/null && echo ' Warning: Already Built ' +stat .built > /dev/null 2>/dev/null && echo '========================' + +cd $srcdir + +echo " +. $dir/build.sh +mkdir -p $dir/out/$pkgname +pkgdir=$dir/out/$pkgname package + + +mkdir -p $dir/out/$pkgname/usr/share/iglupkg + +cat > $dir/out/$pkgname/usr/share/iglupkg/$pkgname << EOF +[pkg] +name=$pkgname +ver=$pkgver +deps=$deps + +[license] +EOF + +chmod 644 $dir/out/$pkgname/usr/share/iglupkg/$pkgname +cd $srcdir +license >> $dir/out/$pkgname/usr/share/iglupkg/$pkgname + +echo >> $dir/out/$pkgname/usr/share/iglupkg/$pkgname +echo [fs] >> $dir/out/$pkgname/usr/share/iglupkg/$pkgname + +cd $dir/out/$pkgname/ +find * >> $dir/out/$pkgname/usr/share/iglupkg/$pkgname + +cd $dir/out/$pkgname +tar -I zstd -cf ../$pkgname.$pkgver.tar.zst * +if [ $ext ]; then + +echo $ext | tr ':' '\n' | while read e; do + echo \$e + + cd $srcdir + mkdir -p $dir/out/$pkgname-\$e + pkgdir=$dir/out/$pkgname-\$e + + package_\$(echo \$e | tr '-' '_') + + mkdir -p $dir/out/$pkgname-\$e/usr/share/iglupkg + + cat > $dir/out/$pkgname-\$e/usr/share/iglupkg/$pkgname-\$e << EOF +[pkg] +name=$pkgname-\$e +ver=$pkgver +deps=$pkgname + +[license] +EOF + + chmod 644 $dir/out/$pkgname-\$e/usr/share/iglupkg/$pkgname-\$e + cd $srcdir + license >> $dir/out/$pkgname-\$e/usr/share/iglupkg/$pkgname-\$e + + echo >> $dir/out/$pkgname-\$e/usr/share/iglupkg/$pkgname-\$e + echo [fs] >> $dir/out/$pkgname-\$e/usr/share/iglupkg/$pkgname-\$e + + cd $dir/out/$pkgname-\$e + + find * >> $dir/out/$pkgname-\$e/usr/share/iglupkg/$pkgname-\$e + + cd $dir/out/$pkgname-\$e + tar -I zstd -cf ../$pkgname-\$e.$pkgver.tar.zst * + +done + +fi + + +" | sh +cd $dir diff --git a/scripts/iglupkg.sh b/scripts/iglupkg.sh index aae71c0..b64e3ae 100755 --- a/scripts/iglupkg.sh +++ b/scripts/iglupkg.sh @@ -25,13 +25,14 @@ function do_fetch() { mkdir -p src cd src srcdir=$(pwd) fetch + touch .fetched } srcdir=$(pwd)/src -stat src > /dev/null 2>/dev/null || do_fetch -stat src > /dev/null 2>/dev/null && echo '==========================================' -stat src > /dev/null 2>/dev/null && echo 'Warning: `./src/` found: not running fetch' -stat src > /dev/null 2>/dev/null && echo '==========================================' +stat src/.fetched > /dev/null 2>/dev/null || do_fetch +stat src/.fetched > /dev/null 2>/dev/null && echo '========================' +stat src/.fetched > /dev/null 2>/dev/null && echo 'Warning: Already Fetched' +stat src/.fetched > /dev/null 2>/dev/null && echo '========================' cd $srcdir diff --git a/scripts/install.sh b/scripts/install.sh index b720226..b2b349f 100644 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -1,5 +1,4 @@ #!/bin/sh -. ./build_utils -packages=(musl mksh bmake gmake llvm libressl cmake curl rsync flex byacc om4 zlib samurai libffi python ca-certificates expat gettext-tiny git kati netbsd-curses kakoune iglunix rust toybox busybox less pci-ids heirloom-doctools) -cp_packages /mnt + + diff --git a/templates/simple.build.sh b/templates/simple.build.sh index ddbebfb..54abde0 100644 --- a/templates/simple.build.sh +++ b/templates/simple.build.sh @@ -10,6 +10,7 @@ build() { cd $pkgname-$pkgver ./configure \ --prefix=/usr \ + --sysconfdir=/etc \ --build=$TRIPLE \ --host=$TRIPLE From 513d7d5ceb94f0814debb304fd818e5d847a61ec Mon Sep 17 00:00:00 2001 From: Ella Stanforth <23418164+Ella-0@users.noreply.github.com> Date: Sun, 26 Dec 2021 13:49:49 +0000 Subject: [PATCH 024/151] add yasm --- extra/yasm/build.sh | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 extra/yasm/build.sh diff --git a/extra/yasm/build.sh b/extra/yasm/build.sh new file mode 100644 index 0000000..5c7e6bd --- /dev/null +++ b/extra/yasm/build.sh @@ -0,0 +1,32 @@ +pkgname=yasm +pkgver=1.3.0 + +fetch() { + curl -L "https://github.com/yasm/yasm/releases/download/v$pkgver/yasm-$pkgver.tar.gz" -o $pkgname-$pkgver.tar.xz + tar -xf $pkgname-$pkgver.tar.xz +} + +build() { + cd $pkgname-$pkgver + ./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + # --build=$TRIPLE \ + # --host=$TRIPLE + + make +} + +package() { + cd $pkgname-$pkgver + make install DESTDIR=$pkgdir +} + +backup() { + return +} + +license() { + cd $pkgname-$pkgver + cat COPYING +} From 8a3779d20716e94fff36c62b8c3124541a7ed457 Mon Sep 17 00:00:00 2001 From: Ella Stanforth <23418164+Ella-0@users.noreply.github.com> Date: Sun, 26 Dec 2021 13:50:44 +0000 Subject: [PATCH 025/151] add gnome group --- gnome/glib/.2.68.4.tar.zst | Bin 0 -> 124 bytes gnome/glib/build.sh | 38 +++++++++++++++++++++++++++++++++++++ gnome/pango/build.sh | 31 ++++++++++++++++++++++++++++++ 3 files changed, 69 insertions(+) create mode 100644 gnome/glib/.2.68.4.tar.zst create mode 100644 gnome/glib/build.sh create mode 100644 gnome/pango/build.sh diff --git a/gnome/glib/.2.68.4.tar.zst b/gnome/glib/.2.68.4.tar.zst new file mode 100644 index 0000000000000000000000000000000000000000..8ea37bdffac203c0300087a049f78b4469da0f29 GIT binary patch literal 124 zcmV-?0E7Q1wJ-eySbYNk@&phRkf&`#qQcj2mAmU9yL;`1#qLFAYGrph%AnAMBKWZY zO9DKWn~pI{LM%Dlgo0A-bxQqZ+E7>YA5s6G#&QP`0QXZWfB}pFl>p2!VB&2+r3Z)z eU;;564Nx!?4uJ3nARDXz;8?i~Pe2Qn2(>nuSu>Xa literal 0 HcmV?d00001 diff --git a/gnome/glib/build.sh b/gnome/glib/build.sh new file mode 100644 index 0000000..d088f4a --- /dev/null +++ b/gnome/glib/build.sh @@ -0,0 +1,38 @@ +pkgname=glib +_pkgver=2.68 +pkgver=$_pkgver.4 + +fetch() { + curl -L "https://download.gnome.org/sources/glib/$_pkgver/glib-$pkgver.tar.xz" -o $pkgname-$pkgver.tar.xz + tar -xf $pkgname-$pkgver.tar.xz + mkdir $pkgname-$pkgver/build +} + +build() { + cd $pkgname-$pkgver + cd build + meson .. \ + --buildtype=release \ + --prefix=/usr \ + --libexecdir=lib \ + -Dtests=false \ + -Dnls=disabled + samu +} + +package() { + cd $pkgname-$pkgver + cd build + DESTDIR=$pkgdir samu install + + rm -rf $pkgdir/usr/share/bash-completion + rm -rf $pkgdir/usr/share/gdb + + rm -rf $pkgdir/usr/bin/gdbus* +} + +license() { + cd $pkgname-$pkgver + cat LICENSE +# cat COPYING +} diff --git a/gnome/pango/build.sh b/gnome/pango/build.sh new file mode 100644 index 0000000..2e0721b --- /dev/null +++ b/gnome/pango/build.sh @@ -0,0 +1,31 @@ +pkgname=pango +_pkgver=1.49 +pkgver=$_pkgver.1 + +fetch() { + curl -L "https://download.gnome.org/sources/pango/$_pkgver/pango-$pkgver.tar.xz" -o $pkgname-$pkgver.tar.xz + tar -xf $pkgname-$pkgver.tar.xz + mkdir $pkgname-$pkgver/build +} + +build() { + cd $pkgname-$pkgver + cd build + meson .. \ + --buildtype=release \ + --prefix=/usr \ + --libexecdir=lib + samu +} + +package() { + cd $pkgname-$pkgver + cd build + DESTDIR=$pkgdir samu install +} + +license() { + cd $pkgname-$pkgver + cat LICENSE +# cat COPYING +} From f0e77247b7fcc03705c00a2f743c68711e06754f Mon Sep 17 00:00:00 2001 From: Ella Stanforth <23418164+Ella-0@users.noreply.github.com> Date: Sun, 26 Dec 2021 13:51:50 +0000 Subject: [PATCH 026/151] update bad readme --- bad/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bad/README.md b/bad/README.md index fe39dc0..7412a30 100644 --- a/bad/README.md +++ b/bad/README.md @@ -2,3 +2,6 @@ Bad packages are packages included that we want to remove our dependency on. All of these packages should eventually be removed. + + - `autoconf` is required for building `firefox` + - `gmake` is required for building a number of packages From 4de0af80de2b02d2735de2bf2f236640d74ef1b9 Mon Sep 17 00:00:00 2001 From: Ella Stanforth <23418164+Ella-0@users.noreply.github.com> Date: Sun, 26 Dec 2021 13:52:25 +0000 Subject: [PATCH 027/151] add editorconfig --- .editorconfig | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..1d8a5be --- /dev/null +++ b/.editorconfig @@ -0,0 +1,8 @@ +root = true +[*] +insert_final_newline = true +trim_trailing_whitespace = true + +[*.{c,h,sh}] +indent_style = tab +tab_width = 4 From fb7ee2330bfe679037d6b4ac37622ab5b1a16fa5 Mon Sep 17 00:00:00 2001 From: Ella Stanforth <23418164+Ella-0@users.noreply.github.com> Date: Sun, 26 Dec 2021 14:30:09 +0000 Subject: [PATCH 028/151] add bootstrap packages --- bootstrap/README.md | 3 +++ bootstrap/rust/boot.sh | 49 +++++++++++++++++++++++++++++++++++++++++ bootstrap/rust/build.sh | 36 ++++++++++++++++++++++++++++++ 3 files changed, 88 insertions(+) create mode 100644 bootstrap/README.md create mode 100755 bootstrap/rust/boot.sh create mode 100644 bootstrap/rust/build.sh diff --git a/bootstrap/README.md b/bootstrap/README.md new file mode 100644 index 0000000..36853bf --- /dev/null +++ b/bootstrap/README.md @@ -0,0 +1,3 @@ +# Bootstrap +These packages are not meant to be used in a complete Iglunix system but are +ment as a stepping stone to build the full packages. diff --git a/bootstrap/rust/boot.sh b/bootstrap/rust/boot.sh new file mode 100755 index 0000000..3cc417e --- /dev/null +++ b/bootstrap/rust/boot.sh @@ -0,0 +1,49 @@ +#!/bin/sh + +ARCH=aarch64 +CHAN=beta +LIBUNWIND=/usr/lib/libunwind.so.1 + +mkdir -p build + +echo 'Downloading rust tar' +stat build/rust.tar > /dev/null 2> /dev/null \ +|| curl "https://static.rust-lang.org/dist/rust-$CHAN-$ARCH-unknown-linux-musl.tar.gz" -o build/rust.tar + +echo 'Extracting rust tar' +stat build/rust-$CHAN-$ARCH-unknown-linux-musl > /dev/null 2> /dev/null \ +|| tar -xf build/rust.tar -C build + +echo 'Building libgcc_s.so' +stat build/libgcc_s.so > /dev/null 2> /dev/null \ +|| clang -shared -o build/libgcc_s.so \ +-Wl,--allow-multiple-definition -Wl,--whole-archive \ +$(clang -print-libgcc-file-name) + +mkdir -p build/rust-root + +echo 'Installing rust to rust-root' + +stat build/rust-root/lib/rustlib/uninstall.sh > /dev/null 2> /dev/null \ +|| ./build/rust-$CHAN-$ARCH-unknown-linux-musl/install.sh \ +--disable-ldconfig \ +--destdir=$(pwd)/build/rust-root \ +--prefix=/ + +# Can't just symlink here 'cause rustc needs __clear_cache which isn't exposed +# by libunwind +echo 'Copying libgcc_s shim' +stat $(pwd)/build/rust-root/lib/libgcc_s.so.1 > /dev/null 2> /dev/null \ +|| cp $(pwd)/build/libgcc_s.so $(pwd)/build/rust-root/lib/libgcc_s.so.1 + +# Symlink libunwind for dynamic builds to link to +echo 'Symlinking libunwind' +stat $(pwd)/build/rust-root/lib/rustlib/aarch64-unknown-linux-musl/lib/libgcc_s.so > /dev/null 2> /dev/null \ +|| ln -sr $LIBUNWIND $(pwd)/build/rust-root/lib/rustlib/aarch64-unknown-linux-musl/lib/libgcc_s.so + +export RUSTC=$(pwd)/build/rust-root/bin/rustc + +echo "Checking Sanity" + +$RUSTC sanity.rs -C target-feature=-crt-static -o build/sanity +./build/sanity diff --git a/bootstrap/rust/build.sh b/bootstrap/rust/build.sh new file mode 100644 index 0000000..ba67806 --- /dev/null +++ b/bootstrap/rust/build.sh @@ -0,0 +1,36 @@ +pkgname=rust +pkgver=beta + +fetch() { + stat rust.tar.gz > /dev/null 2> /dev/null \ + || curl "https://static.rust-lang.org/dist/rust-$pkgver-$ARCH-unknown-linux-musl.tar.gz" -o rust.tar.gz + + stat rust-$pkgver-$ARCH-unknown-linux-musl > /dev/null 2> /dev/null \ + || tar -xf rust.tar.gz +} + +build() { + stat libgcc_s.so > /dev/null 2> /dev/null \ + || clang -shared -o libgcc_s.so \ + -Wl,--allow-multiple-definition -Wl,--whole-archive \ + $(clang -print-libgcc-file-name) +} + +package() { + stat $pkgdir/opt/rust/lib/rustlib/uninstall.sh > /dev/null 2> /dev/null \ + || ./rust-$pkgver-$ARCH-unknown-linux-musl/install.sh \ + --disable-ldconfig \ + --destdir=$pkgdir \ + --prefix=/opt/rust + + stat $pkgdir/opt/rust/lib/libgcc_s.so \ + || cp ./libgcc_s.so $pkgdir/opt/rust/lib/libgcc_s.so +} + +backup() { + return +} + +license() { + return +} From c5f93c496e21cd130093d612d3fb35a7f5997e2c Mon Sep 17 00:00:00 2001 From: Ella Stanforth <23418164+Ella-0@users.noreply.github.com> Date: Sun, 26 Dec 2021 14:30:21 +0000 Subject: [PATCH 029/151] add bootstrap packages --- bootstrap/rust/boot.sh | 49 ------------------------------------------ 1 file changed, 49 deletions(-) delete mode 100755 bootstrap/rust/boot.sh diff --git a/bootstrap/rust/boot.sh b/bootstrap/rust/boot.sh deleted file mode 100755 index 3cc417e..0000000 --- a/bootstrap/rust/boot.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh - -ARCH=aarch64 -CHAN=beta -LIBUNWIND=/usr/lib/libunwind.so.1 - -mkdir -p build - -echo 'Downloading rust tar' -stat build/rust.tar > /dev/null 2> /dev/null \ -|| curl "https://static.rust-lang.org/dist/rust-$CHAN-$ARCH-unknown-linux-musl.tar.gz" -o build/rust.tar - -echo 'Extracting rust tar' -stat build/rust-$CHAN-$ARCH-unknown-linux-musl > /dev/null 2> /dev/null \ -|| tar -xf build/rust.tar -C build - -echo 'Building libgcc_s.so' -stat build/libgcc_s.so > /dev/null 2> /dev/null \ -|| clang -shared -o build/libgcc_s.so \ --Wl,--allow-multiple-definition -Wl,--whole-archive \ -$(clang -print-libgcc-file-name) - -mkdir -p build/rust-root - -echo 'Installing rust to rust-root' - -stat build/rust-root/lib/rustlib/uninstall.sh > /dev/null 2> /dev/null \ -|| ./build/rust-$CHAN-$ARCH-unknown-linux-musl/install.sh \ ---disable-ldconfig \ ---destdir=$(pwd)/build/rust-root \ ---prefix=/ - -# Can't just symlink here 'cause rustc needs __clear_cache which isn't exposed -# by libunwind -echo 'Copying libgcc_s shim' -stat $(pwd)/build/rust-root/lib/libgcc_s.so.1 > /dev/null 2> /dev/null \ -|| cp $(pwd)/build/libgcc_s.so $(pwd)/build/rust-root/lib/libgcc_s.so.1 - -# Symlink libunwind for dynamic builds to link to -echo 'Symlinking libunwind' -stat $(pwd)/build/rust-root/lib/rustlib/aarch64-unknown-linux-musl/lib/libgcc_s.so > /dev/null 2> /dev/null \ -|| ln -sr $LIBUNWIND $(pwd)/build/rust-root/lib/rustlib/aarch64-unknown-linux-musl/lib/libgcc_s.so - -export RUSTC=$(pwd)/build/rust-root/bin/rustc - -echo "Checking Sanity" - -$RUSTC sanity.rs -C target-feature=-crt-static -o build/sanity -./build/sanity From af9e8fe900b3c0fbd10da1b412fb07833f6bc7ec Mon Sep 17 00:00:00 2001 From: Ella Stanforth <23418164+Ella-0@users.noreply.github.com> Date: Fri, 31 Dec 2021 00:57:23 +0000 Subject: [PATCH 030/151] rust fixes --- .../rust/abyss-install-template-shebang.patch | 10 --- extra/rust/abyss-libunwind.patch | 38 ----------- extra/rust/alpine-move-py.patch | 23 ------- extra/rust/build.sh | 24 +++---- extra/rust/fix-curl.patch | 13 ++++ extra/rust/libressl.patch | 10 --- extra/rust/vendored-ssl.patch | 65 ------------------- 7 files changed, 23 insertions(+), 160 deletions(-) delete mode 100644 extra/rust/abyss-install-template-shebang.patch delete mode 100644 extra/rust/abyss-libunwind.patch delete mode 100644 extra/rust/alpine-move-py.patch create mode 100644 extra/rust/fix-curl.patch delete mode 100644 extra/rust/libressl.patch delete mode 100644 extra/rust/vendored-ssl.patch diff --git a/extra/rust/abyss-install-template-shebang.patch b/extra/rust/abyss-install-template-shebang.patch deleted file mode 100644 index e81b579..0000000 --- a/extra/rust/abyss-install-template-shebang.patch +++ /dev/null @@ -1,10 +0,0 @@ -The script seems to be POSIX-sh (+ local) compatible. - ---- a/src/tools/rust-installer/install-template.sh -+++ b/src/tools/rust-installer/install-template.sh -@@ -1,4 +1,4 @@ --#!/bin/bash -+#!/bin/sh - # Copyright 2014 The Rust Project Developers. See the COPYRIGHT - # file at the top-level directory of this distribution and at - # http://rust-lang.org/COPYRIGHT. diff --git a/extra/rust/abyss-libunwind.patch b/extra/rust/abyss-libunwind.patch deleted file mode 100644 index f581434..0000000 --- a/extra/rust/abyss-libunwind.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff --git a/library/unwind/build.rs b/library/unwind/build.rs -index 24bcd40c..51777664 100644 ---- a/library/unwind/build.rs -+++ b/library/unwind/build.rs -@@ -19,7 +19,7 @@ - } else if target.contains("linux") { - // linking for Linux is handled in lib.rs - if target.contains("musl") { -- llvm_libunwind::compile(); -+ println!("cargo:rustc-link-lib=unwind"); - } else if target.contains("android") { - let build = cc::Build::new(); -diff --git a/library/unwind/src/lib.rs b/library/unwind/src/lib.rs -index dbdefa47..dca1897b 100644 ---- a/library/unwind/src/lib.rs -+++ b/library/unwind/src/lib.rs -@@ -39,7 +39,7 @@ cfg_if::cfg_if! { - - #[cfg(target_env = "musl")] - #[link(name = "unwind", kind = "static", cfg(target_feature = "crt-static"))] --#[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))] -+#[link(name = "unwind", cfg(not(target_feature = "crt-static")))] - extern "C" {} - - // When building with crt-static, we get `gcc_eh` from the `libc` crate, since -diff -Naur rustc-1.48.0-src.orig/src/bootstrap/dist.rs rustc-1.48.0-src/src/bootstrap/dist.rs ---- rustc-1.48.0-src.orig/src/bootstrap/dist.rs 2020-12-22 16:39:30.504249113 +0100 -+++ rustc-1.48.0-src/src/bootstrap/dist.rs 2020-12-22 16:42:08.663006830 +0100 -@@ -1016,7 +1016,7 @@ - copy_src_dirs( - builder, - &builder.src, -- &["library", "src/llvm-project/libunwind"], -+ &["library"], - &[ - // not needed and contains symlinks which rustup currently - // chokes on when unpacking. - diff --git a/extra/rust/alpine-move-py.patch b/extra/rust/alpine-move-py.patch deleted file mode 100644 index 21be36f..0000000 --- a/extra/rust/alpine-move-py.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- a/src/etc/rust-gdb -+++ b/src/etc/rust-gdb -@@ -12,7 +12,7 @@ - - # Find out where the pretty printer Python module is - RUSTC_SYSROOT="$("$RUSTC" --print=sysroot)" --GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/lib/rustlib/etc" -+GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/share/rust/etc" - - # Run GDB with the additional arguments that load the pretty printers - # Set the environment variable `RUST_GDB` to overwrite the call to a - # Set the environment variable `RUST_GDB` to overwrite the call to a ---- a/src/etc/rust-lldb -+++ b/src/etc/rust-lldb -@@ -8,7 +8,7 @@ - - # Find out where to look for the pretty printer Python module - RUSTC_SYSROOT=$(rustc --print sysroot) --RUST_LLDB="$RUSTC_SYSROOT/lib/rustlib/$host/bin/lldb" -+RUST_LLDB="$RUSTC_SYSROOT/share/rust/etc" - - lldb=lldb - if [ -f "$RUST_LLDB" ]; then diff --git a/extra/rust/build.sh b/extra/rust/build.sh index 3f42c61..674eb31 100644 --- a/extra/rust/build.sh +++ b/extra/rust/build.sh @@ -21,10 +21,10 @@ _clear_vendor_checksums() { sed -i 's/\("files":{\)[^}]*/\1/' vendor/$1/.cargo-checksum.json } -# export RUSTROOT="/usr" -export RUSTROOT="/usr/src/rust-bootstrap/build/rust-root" +export RUSTROOT="/usr" fetch() { + return curl "https://static.rust-lang.org/dist/rustc-$pkgver-src.tar.gz" -o $pkgname-$pkgver.tar.xz tar -xf $pkgname-$pkgver.tar.xz @@ -33,26 +33,18 @@ fetch() { cp ../*.patch . cd $pkgname-$pkgver - # patch -p1 < ../alpine-move-py.patch - # patch -p1 < ../abyss-install-template-shebang.patch patch -p1 < ../alpine-crt.patch patch -p1 < ../libexec.patch - patch -p1 < ../llvm_crt.patch - patch -p1 < ../unfreeze.patch - # patch -p1 < ../libresslssl.patch + patch -p1 < ../fix-curl.patch sed -i /LD_LIBRARY_PATH/d src/bootstrap/bootstrap.py - _clear_vendor_checksums libc - _clear_vendor_checksums openssl-sys - _clear_vendor_checksums openssl-src - _clear_vendor_checksums openssl - - cd .. + _clear_vendor_checksums curl + _clear_vendor_checksums curl-sys } build() { cd $pkgname-$pkgver - + return # --tools="cargo,rls,rustfmt,src" \ OPENSSL_LIB_DIR=/usr/lib/ ./configure \ --build="$TRIPLE" \ @@ -98,6 +90,10 @@ package() { DESTDIR="$pkgdir" ./x.py install } +backup() { + return +} + license() { cd $pkgname-$pkgver cat LICENSE-MIT diff --git a/extra/rust/fix-curl.patch b/extra/rust/fix-curl.patch new file mode 100644 index 0000000..3e9e182 --- /dev/null +++ b/extra/rust/fix-curl.patch @@ -0,0 +1,13 @@ +diff --git a/vendor/curl-sys/build.rs b/vendor/curl-sys/build.rs +index 24475cc..3249440 100644 +--- a/vendor/curl-sys/build.rs ++++ b/vendor/curl-sys/build.rs +@@ -111,6 +111,8 @@ fn main() { + .include("curl/lib") + .include("curl/include") + .define("BUILDING_LIBCURL", None) ++ .define("CURL_CA_BUNDLE", "\"/etc/ssl/cert.pem\"") ++ .define("CURL_CA_PATH", "\"/etc/ssl/certs\"") + .define("CURL_DISABLE_DICT", None) + .define("CURL_DISABLE_GOPHER", None) + .define("CURL_DISABLE_IMAP", None) diff --git a/extra/rust/libressl.patch b/extra/rust/libressl.patch deleted file mode 100644 index c21b5e5..0000000 --- a/extra/rust/libressl.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/vendor/openssl-sys/build/main.rs -+++ b/vendor/openssl-sys/build/main.rs -@@ -232,6 +232,7 @@ - (3, 2, _) => ('3', '2', 'x'), - (3, 3, 0) => ('3', '3', '0'), - (3, 3, 1) => ('3', '3', '1'), -+ (3, 3, 2) => ('3', '3', '2'), - _ => version_error(), - }; - diff --git a/extra/rust/vendored-ssl.patch b/extra/rust/vendored-ssl.patch deleted file mode 100644 index a72f51a..0000000 --- a/extra/rust/vendored-ssl.patch +++ /dev/null @@ -1,65 +0,0 @@ ---- a/vendor/openssl-sys/Cargo.toml -+++ b/vendor/openssl-sys/Cargo.toml -@@ -33,12 +33,11 @@ - - [build-dependencies.openssl-src] - version = "111.0.1" --optional = true - - [build-dependencies.pkg-config] - version = "0.3.9" - - [features] --vendored = ["openssl-src"] -+vendored = [] - [target."cfg(target_env = \"msvc\")".build-dependencies.vcpkg] - version = "0.2.8" -Only in ../../rust-1.49.0/vendor/openssl-sys: Cargo.toml.1 ---- a/vendor/openssl-sys/build/main.rs -+++ b/vendor/openssl-sys/build/main.rs -@@ -2,7 +2,6 @@ - - extern crate autocfg; - extern crate cc; --#[cfg(feature = "vendored")] - extern crate openssl_src; - extern crate pkg_config; - #[cfg(target_env = "msvc")] -@@ -16,7 +15,6 @@ - mod cfgs; - - mod find_normal; --#[cfg(feature = "vendored")] - mod find_vendored; - - enum Version { -@@ -44,15 +42,14 @@ - } - - fn find_openssl(target: &str) -> (PathBuf, PathBuf) { -- #[cfg(feature = "vendored")] - { - // vendor if the feature is present, unless - // OPENSSL_NO_VENDOR exists and isn't `0` -- if env("OPENSSL_NO_VENDOR").map_or(true, |s| s == "0") { -+ //if env("OPENSSL_NO_VENDOR").map_or(true, |s| s == "0") { - return find_vendored::get_openssl(target); -- } -+ //} - } -- find_normal::get_openssl(target) -+ //find_normal::get_openssl(target) - } - - fn main() { ---- a/vendor/openssl-src/src/lib.rs -+++ b/vendor/openssl-src/src/lib.rs -@@ -58,7 +58,7 @@ - { - Command::new("gmake") - } else { -- Command::new("make") -+ Command::new("gmake") - } - } - From b344c59d4f95bd84b407717e3b6bdd86389fe611 Mon Sep 17 00:00:00 2001 From: Ella Stanforth <23418164+Ella-0@users.noreply.github.com> Date: Fri, 31 Dec 2021 12:22:43 +0000 Subject: [PATCH 031/151] add gtk --- gnome/gtk+/build.sh | 62 +++++++++++++++++++++++++++++++++++++ gnome/gtk+/no-fribidi.patch | 60 +++++++++++++++++++++++++++++++++++ 2 files changed, 122 insertions(+) create mode 100644 gnome/gtk+/build.sh create mode 100644 gnome/gtk+/no-fribidi.patch diff --git a/gnome/gtk+/build.sh b/gnome/gtk+/build.sh new file mode 100644 index 0000000..d31e729 --- /dev/null +++ b/gnome/gtk+/build.sh @@ -0,0 +1,62 @@ +pkgname=gtk+ +_pkgver=3.24 +pkgver=$_pkgver.31 + +fetch() { + curl -L "https://download.gnome.org/sources/gtk+/$_pkgver/gtk%2B-$pkgver.tar.xz" -o $pkgname-$pkgver.tar.xz + tar -xf $pkgname-$pkgver.tar.xz + mkdir -p $pkgname-$pkgver/build + cd $pkgname-$pkgver + patch -p1 < ../../no-fribidi.patch + + # Remove 'atk-bridge' dependency which removes the 'dbus' dependency. + sed '/atkbridge_dep/d;/atk-bridge-2.0/d' meson.build > _ + mv -f _ meson.build + sed '/atkbridge_dep,/d' gtk/meson.build > _ + mv -f _ gtk/meson.build + + sed '//d;/atk_bridge_adaptor_init/d' \ + gtk/a11y/gtkaccessibility.c > _ + mv -f _ gtk/a11y/gtkaccessibility.c + +} + +build() { + cd $pkgname-$pkgver + cd build + meson .. \ + --buildtype=release \ + --prefix=/usr \ + --libexecdir=lib \ + --localstatedir=/var \ + -Dx11_backend=false \ + -Dprint_backends=auto \ + -Dwayland_backend=true \ + -Dwin32_backend=false \ + -Dquartz_backend=false \ + -Dcolord=no \ + -Ddemos=false \ + -Dexamples=false \ + -Dtests=false \ + -Dinstalled_tests=false \ + -Dgtk_doc=false \ + -Dintrospection=false + + samu +} + +package() { + cd $pkgname-$pkgver + cd build + DESTDIR=$pkgdir samu install +} + +backup() { + return +} + +license() { + cd $pkgname-$pkgver + cat LICENSE +# cat COPYING +} diff --git a/gnome/gtk+/no-fribidi.patch b/gnome/gtk+/no-fribidi.patch new file mode 100644 index 0000000..360c378 --- /dev/null +++ b/gnome/gtk+/no-fribidi.patch @@ -0,0 +1,60 @@ +diff --git a/gdk/gdk.c b/gdk/gdk.c +index f0869a6..2f3c039 100644 +--- a/gdk/gdk.c ++++ b/gdk/gdk.c +@@ -44,7 +44,6 @@ + #include + #include + +-#include + + + /** +@@ -1118,17 +1117,6 @@ gdk_disable_multidevice (void) + PangoDirection + gdk_unichar_direction (gunichar ch) + { +- FriBidiCharType fribidi_ch_type; +- +- G_STATIC_ASSERT (sizeof (FriBidiChar) == sizeof (gunichar)); +- +- fribidi_ch_type = fribidi_get_bidi_type (ch); +- +- if (!FRIBIDI_IS_STRONG (fribidi_ch_type)) +- return PANGO_DIRECTION_NEUTRAL; +- else if (FRIBIDI_IS_RTL (fribidi_ch_type)) +- return PANGO_DIRECTION_RTL; +- else + return PANGO_DIRECTION_LTR; + } + +diff --git a/gtk/gtkpango.c b/gtk/gtkpango.c +index aaac4cc..a76ad57 100644 +--- a/gtk/gtkpango.c ++++ b/gtk/gtkpango.c +@@ -25,7 +25,6 @@ + #include "config.h" + #include "gtkpango.h" + #include +-#include + #include "gtkintl.h" + + #define GTK_TYPE_FILL_LAYOUT_RENDERER (_gtk_fill_layout_renderer_get_type()) +@@ -1326,17 +1325,6 @@ _gtk_pango_attr_list_merge (PangoAttrList *into, + PangoDirection + _gtk_pango_unichar_direction (gunichar ch) + { +- FriBidiCharType fribidi_ch_type; +- +- G_STATIC_ASSERT (sizeof (FriBidiChar) == sizeof (gunichar)); +- +- fribidi_ch_type = fribidi_get_bidi_type (ch); +- +- if (!FRIBIDI_IS_STRONG (fribidi_ch_type)) +- return PANGO_DIRECTION_NEUTRAL; +- else if (FRIBIDI_IS_RTL (fribidi_ch_type)) +- return PANGO_DIRECTION_RTL; +- else + return PANGO_DIRECTION_LTR; + } + From c007731926eca214ffa3ff79dd578b4d3bd59d0d Mon Sep 17 00:00:00 2001 From: Ella Stanforth <23418164+Ella-0@users.noreply.github.com> Date: Fri, 31 Dec 2021 12:24:33 +0000 Subject: [PATCH 032/151] use glib with cairo for building gtk --- gui/cairo/build.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gui/cairo/build.sh b/gui/cairo/build.sh index daa9a82..5108112 100644 --- a/gui/cairo/build.sh +++ b/gui/cairo/build.sh @@ -14,7 +14,7 @@ build() { --buildtype=release \ --prefix=/usr \ --libexecdir=lib \ - -Dglib=disabled + -Dglib=enabled samu } @@ -24,6 +24,10 @@ package() { DESTDIR=$pkgdir samu install } +backup() { + return +} + license() { cd $pkgname-$pkgver cat COPYING* From bb4bedb615258622920c8f0ad2626180d7f7c48c Mon Sep 17 00:00:00 2001 From: Ella Stanforth <23418164+Ella-0@users.noreply.github.com> Date: Fri, 31 Dec 2021 12:34:29 +0000 Subject: [PATCH 033/151] add atk --- gnome/atk/build.sh | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 gnome/atk/build.sh diff --git a/gnome/atk/build.sh b/gnome/atk/build.sh new file mode 100644 index 0000000..1ce45d4 --- /dev/null +++ b/gnome/atk/build.sh @@ -0,0 +1,36 @@ +pkgname=atk +_pkgver=2.36 +pkgver=$_pkgver.0 + +fetch() { + curl -L "https://download.gnome.org/sources/atk/$_pkgver/atk-$pkgver.tar.xz" -o $pkgname-$pkgver.tar.xz + tar -xf $pkgname-$pkgver.tar.xz + mkdir $pkgname-$pkgver/build +} + +build() { + cd $pkgname-$pkgver + cd build + meson .. \ + --buildtype=release \ + --prefix=/usr \ + --libexecdir=lib \ + -Dintrospection=false \ + -Ddocs=false + samu +} + +package() { + cd $pkgname-$pkgver + cd build + DESTDIR=$pkgdir samu install +} + +backup() { + return +} + +license() { + cd $pkgname-$pkgver + cat COPYING +} From 14c970f83142d71d3412313000169f3eb86e875d Mon Sep 17 00:00:00 2001 From: Ella Stanforth <23418164+Ella-0@users.noreply.github.com> Date: Fri, 31 Dec 2021 12:35:39 +0000 Subject: [PATCH 034/151] add gdk-pixbuf --- gnome/gdk-pixbuf/build.sh | 45 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 gnome/gdk-pixbuf/build.sh diff --git a/gnome/gdk-pixbuf/build.sh b/gnome/gdk-pixbuf/build.sh new file mode 100644 index 0000000..cd5f891 --- /dev/null +++ b/gnome/gdk-pixbuf/build.sh @@ -0,0 +1,45 @@ +pkgname=gdk-pixbuf +_pkgver=2.42 +pkgver=$_pkgver.6 + +fetch() { + curl -L "https://download.gnome.org/sources/gdk-pixbuf/$_pkgver/gdk-pixbuf-$pkgver.tar.xz" -o $pkgname-$pkgver.tar.xz + tar -xf $pkgname-$pkgver.tar.xz + mkdir $pkgname-$pkgver/build + rm $pkgdir-$pkgver/subprojects/*.wrap +} + +build() { + cd $pkgname-$pkgver + cd build + meson .. \ + --buildtype=release \ + --prefix=/usr \ + --libexecdir=lib \ + -Ddebug=false \ + -Djpeg=true \ + -Dpng=true \ + -Dtiff=false \ + -Ddocs=false \ + -Dman=false \ + -Dgio_sniffing=false \ + -Dinstalled_tests=false \ + -Dbuiltin_loaders=all + samu +} + +package() { + cd $pkgname-$pkgver + cd build + DESTDIR=$pkgdir samu install +} + +backup() { + return +} + +license() { + cd $pkgname-$pkgver + cat LICENSE +# cat COPYING +} From 3dbb1496e341e544e6aa2d6120eb42cc34f2fa65 Mon Sep 17 00:00:00 2001 From: Ella Stanforth <23418164+Ella-0@users.noreply.github.com> Date: Fri, 31 Dec 2021 14:39:46 +0000 Subject: [PATCH 035/151] add WIP firefox package --- gui/firefox/build.sh | 83 +++ gui/firefox/no-x11.patch | 1502 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 1585 insertions(+) create mode 100644 gui/firefox/build.sh create mode 100644 gui/firefox/no-x11.patch diff --git a/gui/firefox/build.sh b/gui/firefox/build.sh new file mode 100644 index 0000000..779d843 --- /dev/null +++ b/gui/firefox/build.sh @@ -0,0 +1,83 @@ +pkgname=firefox +pkgver=91.4.0 +mkdeps="cbindgen:rust" + +fetch() { + return + curl "https://ftp.mozilla.org/pub/firefox/releases/${pkgver}esr/source/firefox-${pkgver}esr.source.tar.xz" -o $pkgname-$pkgver.tar.xz + tar -xf $pkgname-$pkgver.tar.xz +} + +build() { + return + cd $pkgname-$pkgver + + + export MACH_USE_SYSTEM_PYTHON=1 + export CXXSTDLIB=c++ + export RUSTFLAGS='-C target-feature=-crt-static' + +# cat > .mozconfig << EOF +# ac_add_options --enable-default-toolkit=cairo-gtk3-wayland +# ac_add_options --prefix=/usr +# ac_add_options --libdir=/usr/lib +# ac_add_options --enable-alsa +# ac_add_options --enable-strip +# ac_add_options --enable-release +# ac_add_options --enable-rust-simd +# ac_add_options --enable-install-strip +# ac_add_options --enable-official-branding +# ac_add_options --enable-application=browser +# ac_add_options --enable-optimize="${CFLAGS:-} -w" +# ac_add_options --without-system-libvpx +# ac_add_options --without-system-ffi +# ac_add_options --without-system-png +# ac_add_options --without-system-jpeg +# ac_add_options --without-system-zlib +# ac_add_options --without-system-pixman +# ac_add_options --without-system-nss +# ac_add_options --without-system-nspr +# ac_add_options --disable-dbus +# ac_add_options --disable-gold +# ac_add_options --disable-tests +# ac_add_options --disable-vtune +# ac_add_options --disable-updater +# ac_add_options --disable-jemalloc +# ac_add_options --disable-callgrind +# ac_add_options --disable-profiling +# ac_add_options --disable-necko-wifi +# ac_add_options --disable-crashreporter +# ac_add_options --disable-pulseaudio +# ac_add_options --disable-accessibility +# ac_add_options --disable-debug +# ac_add_options --disable-debug-symbols +# ac_add_options --disable-parental-controls +# ac_add_options --disable-system-extension-dirs +# ac_add_options --disable-webrtc +# EOF + +#ac_add_options --disable-eme +#ac_add_options --disable-elf-hack + bad --gmake ./mach build +} + +package() { + cd $pkgname-$pkgver + + export MACH_USE_SYSTEM_PYTHON=1 + export CXXSTDLIB=c++ + export RUSTFLAGS='-C target-feature=-crt-static' + + + bad --gmake ./mach install +} + +backup() { + return +} + +license() { + cd $pkgname-$pkgver + cat LICENSE +# cat COPYING +} diff --git a/gui/firefox/no-x11.patch b/gui/firefox/no-x11.patch new file mode 100644 index 0000000..f28006a --- /dev/null +++ b/gui/firefox/no-x11.patch @@ -0,0 +1,1502 @@ +diff --git a/gfx/angle/checkout/include/EGL/eglplatform.h b/gfx/angle/checkout/include/EGL/eglplatform.h +index d1cae17724..505c334098 100644 +--- a/gfx/angle/checkout/include/EGL/eglplatform.h ++++ b/gfx/angle/checkout/include/EGL/eglplatform.h +@@ -122,7 +122,8 @@ typedef intptr_t EGLNativeDisplayType; + typedef intptr_t EGLNativePixmapType; + typedef intptr_t EGLNativeWindowType; + +-#elif defined(__unix__) || defined(USE_X11) ++#elif defined(__unix__) ++#if defined(USE_X11) + + /* X11 (tentative) */ + #include +@@ -131,6 +132,11 @@ typedef intptr_t EGLNativeWindowType; + typedef Display *EGLNativeDisplayType; + typedef Pixmap EGLNativePixmapType; + typedef Window EGLNativeWindowType; ++#else ++typedef void *EGLNativeDisplayType; ++typedef khronos_uintptr_t EGLNativePixmapType; ++typedef khronos_uintptr_t EGLNativeWindowType; ++#endif + + #elif defined(__APPLE__) + +diff --git a/gfx/gl/GLContextProvider.h b/gfx/gl/GLContextProvider.h +index 12d1a497b9..bec4cd17f0 100644 +--- a/gfx/gl/GLContextProvider.h ++++ b/gfx/gl/GLContextProvider.h +@@ -55,17 +55,17 @@ namespace gl { + # define GL_CONTEXT_PROVIDER_NAME GLContextProviderX11 + # include "GLContextProviderImpl.h" + # undef GL_CONTEXT_PROVIDER_NAME +-# if defined(MOZ_WAYLAND) +-# define GL_CONTEXT_PROVIDER_NAME GLContextProviderWayland +-# include "GLContextProviderImpl.h" +-# undef GL_CONTEXT_PROVIDER_NAME +-# define GL_CONTEXT_PROVIDER_DEFAULT GLContextProviderWayland +-# endif + # ifndef GL_CONTEXT_PROVIDER_DEFAULT + # define GL_CONTEXT_PROVIDER_DEFAULT GLContextProviderX11 + # endif + #endif + ++#if defined(MOZ_WAYLAND) ++# define GL_CONTEXT_PROVIDER_NAME GLContextProviderWayland ++# include "GLContextProviderImpl.h" ++# undef GL_CONTEXT_PROVIDER_NAME ++# define GL_CONTEXT_PROVIDER_DEFAULT GLContextProviderWayland ++#endif + #ifndef GL_CONTEXT_PROVIDER_DEFAULT + # define GL_CONTEXT_PROVIDER_DEFAULT GLContextProviderEGL + #endif +diff --git a/gfx/gl/GLContextProviderWayland.cpp b/gfx/gl/GLContextProviderWayland.cpp +index 3f1f926cd9..6b61708be9 100644 +--- a/gfx/gl/GLContextProviderWayland.cpp ++++ b/gfx/gl/GLContextProviderWayland.cpp +@@ -14,7 +14,9 @@ namespace mozilla::gl { + using namespace mozilla::gfx; + using namespace mozilla::widget; + ++#ifdef MOZ_X11 + static class GLContextProviderX11 sGLContextProviderX11; ++#endif + static class GLContextProviderEGL sGLContextProviderEGL; + + // Note that if there is no GTK display, `GdkIsX11Display` and +@@ -33,9 +35,11 @@ already_AddRefed GLContextProviderWayland::CreateForCompositorWidget( + if (GdkIsWaylandDisplay()) { + return sGLContextProviderEGL.CreateForCompositorWidget( + aCompositorWidget, aHardwareWebRender, aForceAccelerated); ++#ifdef MOZ_X11 + } else { + return sGLContextProviderX11.CreateForCompositorWidget( + aCompositorWidget, aHardwareWebRender, aForceAccelerated); ++#endif + } + } + +@@ -44,8 +48,10 @@ already_AddRefed GLContextProviderWayland::CreateHeadless( + const GLContextCreateDesc& desc, nsACString* const out_failureId) { + if (GdkIsWaylandDisplay()) { + return sGLContextProviderEGL.CreateHeadless(desc, out_failureId); ++#ifdef MOZ_X11 + } else { + return sGLContextProviderX11.CreateHeadless(desc, out_failureId); ++#endif + } + } + +@@ -53,8 +59,10 @@ already_AddRefed GLContextProviderWayland::CreateHeadless( + GLContext* GLContextProviderWayland::GetGlobalContext() { + if (GdkIsWaylandDisplay()) { + return sGLContextProviderEGL.GetGlobalContext(); ++#ifdef MOZ_X11 + } else { + return sGLContextProviderX11.GetGlobalContext(); ++#endif + } + } + +@@ -62,8 +70,10 @@ GLContext* GLContextProviderWayland::GetGlobalContext() { + void GLContextProviderWayland::Shutdown() { + if (GdkIsWaylandDisplay()) { + sGLContextProviderEGL.Shutdown(); ++#ifdef MOZ_X11 + } else { + sGLContextProviderX11.Shutdown(); ++#endif + } + } + +diff --git a/gfx/gl/moz.build b/gfx/gl/moz.build +index 62ad33c786..481fc6d432 100644 +--- a/gfx/gl/moz.build ++++ b/gfx/gl/moz.build +@@ -13,7 +13,7 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa": + elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "uikit": + gl_provider = "EAGL" + elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": +- if CONFIG["MOZ_EGL_XRENDER_COMPOSITE"]: ++ if CONFIG["MOZ_EGL_XRENDER_COMPOSITE"] or CONFIG["MOZ_WAYLAND"]: + gl_provider = "EGL" + else: + gl_provider = "GLX" +diff --git a/gfx/layers/AnimationHelper.h b/gfx/layers/AnimationHelper.h +index f5a57b9c4d..72091c3a4f 100644 +--- a/gfx/layers/AnimationHelper.h ++++ b/gfx/layers/AnimationHelper.h +@@ -7,6 +7,7 @@ + #ifndef mozilla_layers_AnimationHelper_h + #define mozilla_layers_AnimationHelper_h + ++#include "X11UndefineNone.h" + #include "mozilla/dom/Nullable.h" + #include "mozilla/ComputedTimingFunction.h" // for ComputedTimingFunction + #include "mozilla/layers/AnimationStorageData.h" +@@ -15,7 +16,6 @@ + #include "mozilla/TimeStamp.h" // for TimeStamp + #include "mozilla/TimingParams.h" + #include "mozilla/Types.h" // for SideBits +-#include "X11UndefineNone.h" + #include + + namespace mozilla { +diff --git a/gfx/layers/ipc/CompositorBridgeParent.cpp b/gfx/layers/ipc/CompositorBridgeParent.cpp +index 2ecd55b16a..82b56300c6 100644 +--- a/gfx/layers/ipc/CompositorBridgeParent.cpp ++++ b/gfx/layers/ipc/CompositorBridgeParent.cpp +@@ -72,7 +72,7 @@ + #include "mozilla/ProfilerLabels.h" + #include "mozilla/ProfilerMarkers.h" + #include "mozilla/Telemetry.h" +-#ifdef MOZ_WIDGET_GTK ++#if defined(MOZ_WIDGET_GTK) && defined(MOZ_X11) + # include "basic/X11BasicCompositor.h" // for X11BasicCompositor + #endif + #include "nsCOMPtr.h" // for already_AddRefed +@@ -1402,7 +1402,7 @@ RefPtr CompositorBridgeParent::NewCompositor( + new CompositorOGL(this, mWidget, mEGLSurfaceSize.width, + mEGLSurfaceSize.height, mUseExternalSurfaceSize); + } else if (aBackendHints[i] == LayersBackend::LAYERS_BASIC) { +-#ifdef MOZ_WIDGET_GTK ++#if defined(MOZ_WIDGET_GTK) && defined(MOZ_X11) + if (gfxVars::UseXRender()) { + compositor = new X11BasicCompositor(this, mWidget); + } else +diff --git a/gfx/thebes/gfxPlatformGtk.cpp b/gfx/thebes/gfxPlatformGtk.cpp +index 12e01681c7..860e876550 100644 +--- a/gfx/thebes/gfxPlatformGtk.cpp ++++ b/gfx/thebes/gfxPlatformGtk.cpp +@@ -62,6 +62,9 @@ + # include "mozilla/widget/nsWaylandDisplay.h" + # include "mozilla/widget/DMABufLibWrapper.h" + # include "mozilla/StaticPrefs_widget.h" ++# ifdef MOZ_WIDGET_GTK ++# include "mozilla/WidgetUtilsGtk.h" ++# endif + #endif + + #define GDK_PIXMAP_SIZE_MAX 32767 +@@ -97,7 +100,11 @@ gfxPlatformGtk::gfxPlatformGtk() { + } + + mMaxGenericSubstitutions = UNINITIALIZED_VALUE; ++#ifdef MOZ_X11 + mIsX11Display = gfxPlatform::IsHeadless() ? false : GdkIsX11Display(); ++#else ++ mIsX11Display = 0; ++#endif + if (XRE_IsParentProcess()) { + #ifdef MOZ_X11 + if (mIsX11Display && mozilla::Preferences::GetBool("gfx.xrender.enabled")) { +diff --git a/gfx/thebes/moz.build b/gfx/thebes/moz.build +index baa7005a8f..387dd29276 100644 +--- a/gfx/thebes/moz.build ++++ b/gfx/thebes/moz.build +@@ -118,7 +118,6 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": + ] + EXPORTS.mozilla.gfx += [ + "PrintTargetPDF.h", +- "PrintTargetPS.h", + ] + SOURCES += [ + "gfxFcPlatformFontList.cpp", +@@ -127,13 +126,13 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": + "gfxGdkNativeRenderer.cpp", + "gfxPlatformGtk.cpp", + "PrintTargetPDF.cpp", +- "PrintTargetPS.cpp", + ] + + if CONFIG["MOZ_X11"]: + EXPORTS += [ + "gfxXlibNativeRenderer.h", + "gfxXlibSurface.h", ++ "PrintTargetPS.h", + ] + EXPORTS.mozilla.gfx += [ + "XlibDisplay.h", +@@ -142,6 +141,7 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": + "gfxXlibNativeRenderer.cpp", + "gfxXlibSurface.cpp", + "XlibDisplay.cpp", ++ "PrintTargetPS.cpp", + ] + + elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows": +diff --git a/gfx/webrender_bindings/RenderCompositorOGLSWGL.cpp b/gfx/webrender_bindings/RenderCompositorOGLSWGL.cpp +index ec9b904967..dee437d8ae 100644 +--- a/gfx/webrender_bindings/RenderCompositorOGLSWGL.cpp ++++ b/gfx/webrender_bindings/RenderCompositorOGLSWGL.cpp +@@ -27,7 +27,9 @@ + #ifdef MOZ_WIDGET_GTK + # include "mozilla/widget/GtkCompositorWidget.h" + # include +-# include ++# ifdef MOZ_X11 ++# include ++# endif + #endif + + namespace mozilla { +diff --git a/old-configure b/old-configure +index 22c103bdac..74a90f5ee1 100644 +--- a/old-configure ++++ b/old-configure +@@ -9743,13 +9743,13 @@ TEE_SURFACE_FEATURE="#define CAIRO_HAS_TEE_SURFACE 1" + if test "$MOZ_X11"; then + XLIB_SURFACE_FEATURE="#define CAIRO_HAS_XLIB_SURFACE 1" + XLIB_XRENDER_SURFACE_FEATURE="#define CAIRO_HAS_XLIB_XRENDER_SURFACE 1" +- PS_SURFACE_FEATURE="#define CAIRO_HAS_PS_SURFACE 1" + fi + if test "$_HAVE_FREETYPE2"; then + FT_FONT_FEATURE="#define CAIRO_HAS_FT_FONT 1" + MOZ_ENABLE_CAIRO_FT=1 + CAIRO_FT_CFLAGS="$FT2_CFLAGS" + fi ++PS_SURFACE_FEATURE="#define CAIRO_HAS_PS_SURFACE 1" + + case "$MOZ_WIDGET_TOOLKIT" in + cocoa | uikit) +diff --git a/old-configure.in b/old-configure.in +index de2642f71d..d0ab9b1988 100644 +--- a/old-configure.in ++++ b/old-configure.in +@@ -2327,13 +2327,13 @@ TEE_SURFACE_FEATURE="#define CAIRO_HAS_TEE_SURFACE 1" + if test "$MOZ_X11"; then + XLIB_SURFACE_FEATURE="#define CAIRO_HAS_XLIB_SURFACE 1" + XLIB_XRENDER_SURFACE_FEATURE="#define CAIRO_HAS_XLIB_XRENDER_SURFACE 1" +- PS_SURFACE_FEATURE="#define CAIRO_HAS_PS_SURFACE 1" + fi + if test "$_HAVE_FREETYPE2"; then + FT_FONT_FEATURE="#define CAIRO_HAS_FT_FONT 1" + MOZ_ENABLE_CAIRO_FT=1 + CAIRO_FT_CFLAGS="$FT2_CFLAGS" + fi ++PS_SURFACE_FEATURE="#define CAIRO_HAS_PS_SURFACE 1" + + case "$MOZ_WIDGET_TOOLKIT" in + cocoa | uikit) +diff --git a/toolkit/components/remote/moz.build b/toolkit/components/remote/moz.build +index 235580d6b7..b407dce197 100644 +--- a/toolkit/components/remote/moz.build ++++ b/toolkit/components/remote/moz.build +@@ -13,12 +13,15 @@ SOURCES += [ + + if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": + SOURCES += [ +- "nsGTKRemoteServer.cpp", + "nsUnixRemoteServer.cpp", +- "nsXRemoteClient.cpp", +- "nsXRemoteServer.cpp", + "RemoteUtils.cpp", + ] ++ if CONFIG["MOZ_X11"]: ++ SOURCES += [ ++ "nsGTKRemoteServer.cpp", ++ "nsXRemoteClient.cpp", ++ "nsXRemoteServer.cpp", ++ ] + if CONFIG["MOZ_ENABLE_DBUS"]: + SOURCES += [ + "nsDBusRemoteClient.cpp", +diff --git a/toolkit/components/remote/nsRemoteService.cpp b/toolkit/components/remote/nsRemoteService.cpp +index 289fa506f4..c2fd3a1183 100644 +--- a/toolkit/components/remote/nsRemoteService.cpp ++++ b/toolkit/components/remote/nsRemoteService.cpp +@@ -12,12 +12,18 @@ + + #ifdef MOZ_WIDGET_GTK + # include "mozilla/WidgetUtilsGtk.h" +-# include "nsGTKRemoteServer.h" +-# include "nsXRemoteClient.h" ++# ifdef MOZ_X11 ++# include "nsGTKRemoteServer.h" ++# include "nsXRemoteClient.h" ++# endif + # ifdef MOZ_ENABLE_DBUS + # include "nsDBusRemoteServer.h" + # include "nsDBusRemoteClient.h" + # endif ++# ifdef MOZ_WAYLAND ++# include ++# include "nsRemoteClient.h" ++# endif + #elif defined(XP_WIN) + # include "nsWinRemoteServer.h" + # include "nsWinRemoteClient.h" +@@ -111,9 +117,11 @@ RemoteResult nsRemoteService::StartClient(const char* aDesktopStartupID) { + client = MakeUnique(); + } + # endif ++#if defined(MOZ_X11) + if (!client && useX11Remote) { + client = MakeUnique(); + } ++#endif + #elif defined(XP_WIN) + client = MakeUnique(); + #elif defined(XP_DARWIN) +@@ -160,9 +168,11 @@ void nsRemoteService::StartupServer() { + mRemoteServer = MakeUnique(); + } + # endif ++# if defined(MOZ_X11) + if (!mRemoteServer && useX11Remote) { + mRemoteServer = MakeUnique(); + } ++# endif + #elif defined(XP_WIN) + mRemoteServer = MakeUnique(); + #elif defined(XP_DARWIN) +diff --git a/toolkit/moz.configure b/toolkit/moz.configure +index ac7ab6c2ef..b1bd632d81 100644 +--- a/toolkit/moz.configure ++++ b/toolkit/moz.configure +@@ -314,9 +314,6 @@ def toolkit_gtk(toolkit): + return toolkit == "gtk" + + +-set_config("MOZ_X11", True, when=toolkit_gtk) +-set_define("MOZ_X11", True, when=toolkit_gtk) +-add_old_configure_assignment("MOZ_X11", True, when=toolkit_gtk) + + # Wayland support + # ============================================================== +diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp +index 3ec33c9b45..0ef2182368 100644 +--- a/toolkit/xre/nsAppRunner.cpp ++++ b/toolkit/xre/nsAppRunner.cpp +@@ -319,6 +319,7 @@ nsString gProcessStartupShortcut; + # endif + # ifdef MOZ_X11 + # include ++# undef None + # endif /* MOZ_X11 */ + # include + #endif +@@ -343,7 +344,6 @@ void XRE_LibFuzzerSetDriver(LibFuzzerDriver aDriver) { + #endif // FUZZING + + // Undo X11/X.h's definition of None +-#undef None + + namespace mozilla { + int (*RunGTest)(int*, char**) = 0; +diff --git a/toolkit/xre/nsGDKErrorHandler.cpp b/toolkit/xre/nsGDKErrorHandler.cpp +index 421abdf12f..673a4f851b 100644 +--- a/toolkit/xre/nsGDKErrorHandler.cpp ++++ b/toolkit/xre/nsGDKErrorHandler.cpp +@@ -6,14 +6,21 @@ + #include "nsGDKErrorHandler.h" + + #include ++#ifdef MOZ_X11 + #include ++#endif ++#ifdef MOZ_WAYLAND ++#include ++#endif + #include + #include + #include + + #include "nsDebug.h" + #include "nsString.h" ++#ifdef MOZ_X11 + #include "nsX11ErrorHandler.h" ++#endif + + #include "prenv.h" + +@@ -26,6 +33,7 @@ + */ + static void GdkErrorHandler(const gchar* log_domain, GLogLevelFlags log_level, + const gchar* message, gpointer user_data) { ++#ifdef MOZ_X11 + if (strstr(message, "X Window System error")) { + XErrorEvent event; + nsDependentCString buffer(message); +@@ -92,10 +100,10 @@ static void GdkErrorHandler(const gchar* log_domain, GLogLevelFlags log_level, + event.resourceid = 0; + + X11Error(event.display, &event); +- } else { ++ } ++#endif + g_log_default_handler(log_domain, log_level, message, user_data); + MOZ_CRASH_UNSAFE(message); +- } + } + + void InstallGdkErrorHandler() { +@@ -103,7 +111,9 @@ void InstallGdkErrorHandler() { + (GLogLevelFlags)(G_LOG_LEVEL_ERROR | G_LOG_FLAG_FATAL | + G_LOG_FLAG_RECURSION), + GdkErrorHandler, nullptr); ++#ifdef MOZ_X11 + if (PR_GetEnv("MOZ_X_SYNC")) { + XSynchronize(GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), X11True); + } ++#endif + } +diff --git a/toolkit/xre/nsNativeAppSupportUnix.cpp b/toolkit/xre/nsNativeAppSupportUnix.cpp +index e8f7b67c35..5549e40fe9 100644 +--- a/toolkit/xre/nsNativeAppSupportUnix.cpp ++++ b/toolkit/xre/nsNativeAppSupportUnix.cpp +@@ -401,7 +401,6 @@ static void SetSMProperty(SmProp& prop, const char* name, const char* type, + prop.num_vals = numVals; + prop.vals = vals; + } +-#endif /* MOZ_X11 */ + + static void RemoveArg(char** argv) { + do { +@@ -411,6 +410,7 @@ static void RemoveArg(char** argv) { + + --gArgc; + } ++#endif /* MOZ_X11 */ + + NS_IMETHODIMP + nsNativeAppSupportUnix::Start(bool* aRetVal) { +diff --git a/widget/CompositorWidget.h b/widget/CompositorWidget.h +index 4515f4ccc0..2f4795364c 100644 +--- a/widget/CompositorWidget.h ++++ b/widget/CompositorWidget.h +@@ -63,7 +63,7 @@ class CompositorWidgetDelegate { + }; + + // Platforms that support out-of-process widgets. +-#if defined(XP_WIN) || defined(MOZ_X11) ++#if defined(XP_WIN) || defined(MOZ_X11) || defined(MOZ_WAYLAND) + // CompositorWidgetParent should implement CompositorWidget and + // PCompositorWidgetParent. + class CompositorWidgetParent; +diff --git a/widget/gtk/MozContainer.cpp b/widget/gtk/MozContainer.cpp +index a1c1c2b124..97d31ba5b7 100644 +--- a/widget/gtk/MozContainer.cpp ++++ b/widget/gtk/MozContainer.cpp +@@ -9,7 +9,12 @@ + + #include + #include ++#ifdef MOZ_X11 + #include ++#endif ++#ifdef MOZ_WAYLAND ++#include "mozilla/WidgetUtilsGtk.h" ++#endif + #include + + #ifdef ACCESSIBILITY +diff --git a/widget/gtk/WindowSurfaceProvider.cpp b/widget/gtk/WindowSurfaceProvider.cpp +index 837e8aa696..ae19f3ff70 100644 +--- a/widget/gtk/WindowSurfaceProvider.cpp ++++ b/widget/gtk/WindowSurfaceProvider.cpp +@@ -87,7 +87,7 @@ RefPtr WindowSurfaceProvider::CreateWindowSurface() { + mXVisual, mXDepth); + } + +-# ifdef MOZ_HAVE_SHMIMAGE ++# if defined(MOZ_HAVE_SHMIMAGE) && defined(MOZ_X11) + if (!mIsShaped && nsShmImage::UseShm()) { + LOG(("Drawing to Window 0x%lx will use MIT-SHM\n", mXWindow)); + return MakeRefPtr(DefaultXDisplay(), mXWindow, +@@ -95,9 +95,11 @@ RefPtr WindowSurfaceProvider::CreateWindowSurface() { + } + # endif // MOZ_HAVE_SHMIMAGE + ++# if defined(MOZ_X11) + LOG(("Drawing to Window 0x%lx will use XPutImage\n", mXWindow)); + return MakeRefPtr(DefaultXDisplay(), mXWindow, + mXVisual, mXDepth, mIsShaped); ++# endif + } + #endif + MOZ_RELEASE_ASSERT(false); +diff --git a/widget/gtk/WindowSurfaceWayland.cpp b/widget/gtk/WindowSurfaceWayland.cpp +index 5c74524c21..78e0dc7801 100644 +--- a/widget/gtk/WindowSurfaceWayland.cpp ++++ b/widget/gtk/WindowSurfaceWayland.cpp +@@ -15,11 +15,13 @@ + #include "mozilla/gfx/Tools.h" + #include "gfx2DGlue.h" + #include "gfxPlatform.h" ++#include "gfxImageSurface.h" + #include "MozContainer.h" + #include "mozilla/ScopeExit.h" + #include "mozilla/StaticPrefs_widget.h" + #include "mozilla/WidgetUtils.h" + #include "nsTArray.h" ++#include "prenv.h" + + #ifdef MOZ_LOGGING + # include "mozilla/Logging.h" +diff --git a/widget/gtk/components.conf b/widget/gtk/components.conf +index 38c07bd812..a125d8d275 100644 +--- a/widget/gtk/components.conf ++++ b/widget/gtk/components.conf +@@ -78,7 +78,7 @@ Classes = [ + }, + ] + +-if defined('MOZ_X11'): ++if defined('MOZ_X11') or defined('MOZ_WAYLAND'): + Classes += [ + { + 'js_name': 'clipboard', +diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build +index b579218ab8..f882569689 100644 +--- a/widget/gtk/moz.build ++++ b/widget/gtk/moz.build +@@ -100,23 +100,27 @@ if CONFIG["MOZ_WAYLAND"]: + + if CONFIG["MOZ_X11"]: + UNIFIED_SOURCES += [ +- "CompositorWidgetChild.cpp", +- "CompositorWidgetParent.cpp", +- "InProcessGtkCompositorWidget.cpp", + "nsClipboardX11.cpp", + "nsShmImage.cpp", +- "nsUserIdleServiceGTK.cpp", + "WindowSurfaceX11.cpp", + "WindowSurfaceX11Image.cpp", + "WindowSurfaceX11SHM.cpp", + "WindowSurfaceXRender.cpp", + ] +- EXPORTS.mozilla.widget += [ +- "CompositorWidgetChild.h", +- "CompositorWidgetParent.h", +- "GtkCompositorWidget.h", +- "InProcessGtkCompositorWidget.h", +- ] ++ ++UNIFIED_SOURCES += [ ++ "CompositorWidgetChild.cpp", ++ "CompositorWidgetParent.cpp", ++ "InProcessGtkCompositorWidget.cpp", ++ "nsUserIdleServiceGTK.cpp", ++] ++ ++EXPORTS.mozilla.widget += [ ++ "CompositorWidgetChild.h", ++ "CompositorWidgetParent.h", ++ "GtkCompositorWidget.h", ++ "InProcessGtkCompositorWidget.h", ++] + + if CONFIG["NS_PRINTING"]: + UNIFIED_SOURCES += [ +diff --git a/widget/gtk/mozgtk/mozgtk.c b/widget/gtk/mozgtk/mozgtk.c +index 677f9b3561..b8cb7de58e 100644 +--- a/widget/gtk/mozgtk/mozgtk.c ++++ b/widget/gtk/mozgtk/mozgtk.c +@@ -6,6 +6,7 @@ + + #include "mozilla/Types.h" + ++#if defined(MOZ_X11) + #include + // Bug 1271100 + // We need to trick system Cairo into not using the XShm extension due to +@@ -19,3 +20,4 @@ + // ever can remove this workaround for system Cairo, we'll need something + // to replace it for that purpose. + MOZ_EXPORT Bool XShmQueryExtension(Display* aDisplay) { return False; } ++#endif +diff --git a/widget/gtk/nsClipboard.cpp b/widget/gtk/nsClipboard.cpp +index 74379651b9..a89e8fd8e0 100644 +--- a/widget/gtk/nsClipboard.cpp ++++ b/widget/gtk/nsClipboard.cpp +@@ -9,7 +9,9 @@ + + #include "nsArrayUtils.h" + #include "nsClipboard.h" ++#if defined(MOZ_X11) + #include "nsClipboardX11.h" ++#endif + #if defined(MOZ_WAYLAND) + # include "nsClipboardWayland.h" + #endif +@@ -32,7 +34,9 @@ + #include "imgIContainer.h" + + #include ++#ifdef MOZ_X11 + #include ++#endif + + #include "mozilla/Encoding.h" + +@@ -95,10 +99,12 @@ nsClipboard::~nsClipboard() { + NS_IMPL_ISUPPORTS(nsClipboard, nsIClipboard, nsIObserver) + + nsresult nsClipboard::Init(void) { ++#if defined(MOZ_X11) + if (widget::GdkIsX11Display()) { + mContext = MakeUnique(); +-#if defined(MOZ_WAYLAND) +- } else if (widget::GdkIsWaylandDisplay()) { ++ } ++#elif defined(MOZ_WAYLAND) ++ if (widget::GdkIsWaylandDisplay()) { + mContext = MakeUnique(); + #endif + } else { +diff --git a/widget/gtk/nsDeviceContextSpecG.cpp b/widget/gtk/nsDeviceContextSpecG.cpp +index b7891d67b5..abe6b82bc0 100644 +--- a/widget/gtk/nsDeviceContextSpecG.cpp ++++ b/widget/gtk/nsDeviceContextSpecG.cpp +@@ -6,7 +6,9 @@ + #include "nsDeviceContextSpecG.h" + + #include "mozilla/gfx/PrintTargetPDF.h" ++#ifdef USE_X11 + #include "mozilla/gfx/PrintTargetPS.h" ++#endif + #include "mozilla/Logging.h" + #include "mozilla/Services.h" + +@@ -46,7 +48,9 @@ using namespace mozilla; + using mozilla::gfx::IntSize; + using mozilla::gfx::PrintTarget; + using mozilla::gfx::PrintTargetPDF; ++#ifdef MOZ_X11 + using mozilla::gfx::PrintTargetPS; ++#endif + + nsDeviceContextSpecGTK::nsDeviceContextSpecGTK() + : mGtkPrintSettings(nullptr), mGtkPageSetup(nullptr) {} +@@ -119,12 +123,15 @@ already_AddRefed nsDeviceContextSpecGTK::MakePrintTarget() { + return PrintTargetPDF::CreateOrNull(stream, size); + } + ++#ifdef MOZ_X11 + int32_t orientation = mPrintSettings->GetSheetOrientation(); + return PrintTargetPS::CreateOrNull( + stream, size, + orientation == nsIPrintSettings::kPortraitOrientation + ? PrintTargetPS::PORTRAIT + : PrintTargetPS::LANDSCAPE); ++#endif ++ return nullptr; + } + + #define DECLARE_KNOWN_MONOCHROME_SETTING(key_, value_) {"cups-" key_, value_}, +diff --git a/widget/gtk/nsDragService.cpp b/widget/gtk/nsDragService.cpp +index 6983dc1b2c..2852e232b9 100644 +--- a/widget/gtk/nsDragService.cpp ++++ b/widget/gtk/nsDragService.cpp +@@ -23,7 +23,11 @@ + #include "prthread.h" + #include + #include ++#ifdef MOZ_X11 + #include ++#else ++#include ++#endif + #include "nsCRT.h" + #include "mozilla/BasicEvents.h" + #include "mozilla/Services.h" +@@ -33,7 +37,6 @@ + #include "mozilla/WidgetUtilsGtk.h" + #include "GRefPtr.h" + +-#include "gfxXlibSurface.h" + #include "gfxContext.h" + #include "nsImageToPixbuf.h" + #include "nsPresContext.h" +@@ -50,6 +53,8 @@ + #ifdef MOZ_WAYLAND + # include "nsClipboardWayland.h" + # include "gfxPlatformGtk.h" ++#else ++# include "gfxXlibSurface.h" + #endif + + using namespace mozilla; +diff --git a/widget/gtk/nsGtkKeyUtils.cpp b/widget/gtk/nsGtkKeyUtils.cpp +index f4c7030a37..6c5af5394b 100644 +--- a/widget/gtk/nsGtkKeyUtils.cpp ++++ b/widget/gtk/nsGtkKeyUtils.cpp +@@ -12,10 +12,12 @@ + #include + #include + #include +-#include + #include + #include ++#ifdef MOZ_X11 ++#include + #include ++#endif + #include "X11UndefineNone.h" + #include "IMContextWrapper.h" + #include "WidgetUtils.h" +@@ -51,7 +53,7 @@ LazyLogModule gKeymapWrapperLog("KeymapWrapperWidgets"); + + KeymapWrapper* KeymapWrapper::sInstance = nullptr; + guint KeymapWrapper::sLastRepeatableHardwareKeyCode = 0; +-Time KeymapWrapper::sLastRepeatableKeyTime = 0; ++GTime KeymapWrapper::sLastRepeatableKeyTime = 0; + KeymapWrapper::RepeatState KeymapWrapper::sRepeatState = + KeymapWrapper::NOT_PRESSED; + +@@ -346,9 +348,11 @@ KeymapWrapper::KeymapWrapper() + + g_object_ref(mGdkKeymap); + ++#ifdef MOZ_X11 + if (GdkIsX11Display()) { + InitXKBExtension(); + } ++#endif + + Init(); + } +@@ -365,16 +369,19 @@ void KeymapWrapper::Init() { + mModifierKeys.Clear(); + memset(mModifierMasks, 0, sizeof(mModifierMasks)); + ++#ifdef MOZ_X11 + if (GdkIsX11Display()) { + InitBySystemSettingsX11(); +- } ++ } else { ++#endif + #ifdef MOZ_WAYLAND +- else { + InitBySystemSettingsWayland(); ++#endif ++#ifdef MOZ_X11 + } ++ gdk_window_add_filter(nullptr, FilterEvents, this); + #endif + +- gdk_window_add_filter(nullptr, FilterEvents, this); + + MOZ_LOG(gKeymapWrapperLog, LogLevel::Info, + ("%p Init, CapsLock=0x%X, NumLock=0x%X, " +@@ -387,6 +394,7 @@ void KeymapWrapper::Init() { + GetModifierMask(SUPER), GetModifierMask(HYPER))); + } + ++#ifdef MOZ_X11 + void KeymapWrapper::InitXKBExtension() { + PodZero(&mKeyboardState); + +@@ -619,6 +627,7 @@ void KeymapWrapper::InitBySystemSettingsX11() { + XFreeModifiermap(xmodmap); + XFree(xkeymap); + } ++#endif + + #ifdef MOZ_WAYLAND + void KeymapWrapper::SetModifierMask(xkb_keymap* aKeymap, +@@ -776,7 +785,9 @@ void KeymapWrapper::InitBySystemSettingsWayland() { + #endif + + KeymapWrapper::~KeymapWrapper() { ++#ifdef MOZ_X11 + gdk_window_remove_filter(nullptr, FilterEvents, this); ++#endif + if (mOnKeysChangedSignalHandle) { + g_signal_handler_disconnect(mGdkKeymap, mOnKeysChangedSignalHandle); + } +@@ -787,6 +798,7 @@ KeymapWrapper::~KeymapWrapper() { + MOZ_LOG(gKeymapWrapperLog, LogLevel::Info, ("%p Destructor", this)); + } + ++#ifdef MOZ_X11 + /* static */ + GdkFilterReturn KeymapWrapper::FilterEvents(GdkXEvent* aXEvent, + GdkEvent* aGdkEvent, +@@ -900,6 +912,7 @@ GdkFilterReturn KeymapWrapper::FilterEvents(GdkXEvent* aXEvent, + + return GDK_FILTER_CONTINUE; + } ++#endif + + static void ResetBidiKeyboard() { + // Reset the bidi keyboard settings for the new GdkKeymap +@@ -1760,6 +1773,7 @@ void KeymapWrapper::InitKeyEvent(WidgetKeyboardEvent& aKeyEvent, + // state. It means if there're some pending modifier key press or + // key release events, the result isn't what we want. + guint modifierState = aGdkKeyEvent->state; ++#ifdef MOZ_X11 + GdkDisplay* gdkDisplay = gdk_display_get_default(); + if (aGdkKeyEvent->is_modifier && GdkIsX11Display(gdkDisplay)) { + Display* display = gdk_x11_display_get_xdisplay(gdkDisplay); +@@ -1777,6 +1791,7 @@ void KeymapWrapper::InitKeyEvent(WidgetKeyboardEvent& aKeyEvent, + } + } + } ++#endif + InitInputEvent(aKeyEvent, modifierState); + + switch (aGdkKeyEvent->keyval) { +@@ -2023,6 +2038,7 @@ bool KeymapWrapper::IsLatinGroup(guint8 aGroup) { + return result; + } + ++#ifdef MOZ_X11 + bool KeymapWrapper::IsAutoRepeatableKey(guint aHardwareKeyCode) { + uint8_t indexOfArray = aHardwareKeyCode / 8; + MOZ_ASSERT(indexOfArray < ArrayLength(mKeyboardState.auto_repeats), +@@ -2030,6 +2046,7 @@ bool KeymapWrapper::IsAutoRepeatableKey(guint aHardwareKeyCode) { + char bitMask = 1 << (aHardwareKeyCode % 8); + return (mKeyboardState.auto_repeats[indexOfArray] & bitMask) != 0; + } ++#endif + + /* static */ + bool KeymapWrapper::IsBasicLatinLetterOrNumeral(uint32_t aCharCode) { +diff --git a/widget/gtk/nsGtkKeyUtils.h b/widget/gtk/nsGtkKeyUtils.h +index 07d60c27a6..43df8095fd 100644 +--- a/widget/gtk/nsGtkKeyUtils.h ++++ b/widget/gtk/nsGtkKeyUtils.h +@@ -13,7 +13,9 @@ + #include "nsTArray.h" + + #include ++#ifdef MOZ_X11 + #include ++#endif + #ifdef MOZ_WAYLAND + # include + # include +@@ -315,7 +317,9 @@ class KeymapWrapper { + * See a call of XkbSelectEventDetails() with XkbControlsNotify in + * InitXKBExtension(). + */ ++#ifdef MOZ_X11 + XKeyboardState mKeyboardState; ++#endif + + /** + * Pointer of the singleton instance. +@@ -326,7 +330,7 @@ class KeymapWrapper { + * Auto key repeat management. + */ + static guint sLastRepeatableHardwareKeyCode; +- static Time sLastRepeatableKeyTime; ++ static GTime sLastRepeatableKeyTime; + enum RepeatState { NOT_PRESSED, FIRST_PRESS, REPEATING }; + static RepeatState sRepeatState; + +diff --git a/widget/gtk/nsPrintDialogGTK.cpp b/widget/gtk/nsPrintDialogGTK.cpp +index 48e9b6521f..461e6b2502 100644 +--- a/widget/gtk/nsPrintDialogGTK.cpp ++++ b/widget/gtk/nsPrintDialogGTK.cpp +@@ -26,7 +26,11 @@ + #include "nsIObserverService.h" + + // for gdk_x11_window_get_xid ++#ifdef MOZ_X11 + #include ++#else ++#include ++#endif + #include + #include + #include +@@ -526,6 +530,7 @@ static void wayland_window_handle_exported(GdkWindow* window, + static gboolean window_export_handle(GtkWindow* window, + GtkWindowHandleExported callback, + gpointer user_data) { ++#ifdef MOZ_X11 + if (GdkIsX11Display()) { + GdkWindow* gdk_window = gtk_widget_get_window(GTK_WIDGET(window)); + char* handle_str; +@@ -536,8 +541,9 @@ static gboolean window_export_handle(GtkWindow* window, + g_free(handle_str); + return true; + } ++#endif + #ifdef MOZ_WAYLAND +- else if (GdkIsWaylandDisplay()) { ++ if (GdkIsWaylandDisplay()) { + GdkWindow* gdk_window = gtk_widget_get_window(GTK_WIDGET(window)); + WaylandWindowHandleExportedData* data; + +diff --git a/widget/gtk/nsUserIdleServiceGTK.cpp b/widget/gtk/nsUserIdleServiceGTK.cpp +index 884d52a6ca..d865b9a236 100644 +--- a/widget/gtk/nsUserIdleServiceGTK.cpp ++++ b/widget/gtk/nsUserIdleServiceGTK.cpp +@@ -17,6 +17,7 @@ using mozilla::LogLevel; + + static mozilla::LazyLogModule sIdleLog("nsIUserIdleService"); + ++#ifdef MOZ_X11 + typedef bool (*_XScreenSaverQueryExtension_fn)(Display* dpy, int* event_base, + int* error_base); + +@@ -25,12 +26,15 @@ typedef XScreenSaverInfo* (*_XScreenSaverAllocInfo_fn)(void); + typedef void (*_XScreenSaverQueryInfo_fn)(Display* dpy, Drawable drw, + XScreenSaverInfo* info); + +-static bool sInitialized = false; + static _XScreenSaverQueryExtension_fn _XSSQueryExtension = nullptr; + static _XScreenSaverAllocInfo_fn _XSSAllocInfo = nullptr; + static _XScreenSaverQueryInfo_fn _XSSQueryInfo = nullptr; ++#endif ++ ++static bool sInitialized = false; + + static void Initialize() { ++#ifdef MOZ_X11 + if (!mozilla::widget::GdkIsX11Display()) { + return; + } +@@ -57,16 +61,22 @@ static void Initialize() { + MOZ_LOG(sIdleLog, LogLevel::Warning, ("Failed to get XSSAllocInfo!\n")); + if (!_XSSQueryInfo) + MOZ_LOG(sIdleLog, LogLevel::Warning, ("Failed to get XSSQueryInfo!\n")); +- ++#endif + sInitialized = true; + } + +-nsUserIdleServiceGTK::nsUserIdleServiceGTK() : mXssInfo(nullptr) { ++nsUserIdleServiceGTK::nsUserIdleServiceGTK() ++#ifdef MOZ_X11 ++: mXssInfo(nullptr) ++#endif ++{ + Initialize(); + } + + nsUserIdleServiceGTK::~nsUserIdleServiceGTK() { ++#ifdef MOZ_X11 + if (mXssInfo) XFree(mXssInfo); ++#endif + + // It is not safe to unload libXScrnSaver until each display is closed because + // the library registers callbacks through XESetCloseDisplay (Bug 397607). +@@ -88,6 +98,7 @@ bool nsUserIdleServiceGTK::PollIdleTime(uint32_t* aIdleTime) { + // Ask xscreensaver about idle time: + *aIdleTime = 0; + ++#ifdef MOZ_X11 + // We might not have a display (cf. in xpcshell) + Display* dplay = GDK_DISPLAY_XDISPLAY(gdk_display_get_default()); + if (!dplay) { +@@ -107,6 +118,7 @@ bool nsUserIdleServiceGTK::PollIdleTime(uint32_t* aIdleTime) { + *aIdleTime = mXssInfo->idle; + return true; + } ++#endif + // If we get here, we couldn't get to XScreenSaver: + MOZ_LOG(sIdleLog, LogLevel::Warning, ("XSSQueryExtension returned false!\n")); + return false; +diff --git a/widget/gtk/nsUserIdleServiceGTK.h b/widget/gtk/nsUserIdleServiceGTK.h +index 9b9ba31846..8f83aee584 100644 +--- a/widget/gtk/nsUserIdleServiceGTK.h ++++ b/widget/gtk/nsUserIdleServiceGTK.h +@@ -9,6 +9,7 @@ + #define nsUserIdleServiceGTK_h__ + + #include "nsUserIdleService.h" ++#ifdef MOZ_X11 + #include + #include + #include +@@ -21,6 +22,7 @@ typedef struct { + unsigned long idle; // milliseconds idle + unsigned long event_mask; // event stuff + } XScreenSaverInfo; ++#endif + + class nsUserIdleServiceGTK : public nsUserIdleService { + public: +@@ -40,7 +42,9 @@ class nsUserIdleServiceGTK : public nsUserIdleService { + + private: + ~nsUserIdleServiceGTK(); ++#ifdef MOZ_X11 + XScreenSaverInfo* mXssInfo; ++#endif + + protected: + nsUserIdleServiceGTK(); +diff --git a/widget/gtk/nsWidgetFactory.cpp b/widget/gtk/nsWidgetFactory.cpp +index d649c7e0bf..70b47d5124 100644 +--- a/widget/gtk/nsWidgetFactory.cpp ++++ b/widget/gtk/nsWidgetFactory.cpp +@@ -20,9 +20,7 @@ + #include "nsHTMLFormatConverter.h" + #include "HeadlessClipboard.h" + #include "IMContextWrapper.h" +-#ifdef MOZ_X11 +-# include "nsClipboard.h" +-#endif ++#include "nsClipboard.h" + #include "TaskbarProgress.h" + #include "nsFilePicker.h" + #include "nsSound.h" +@@ -36,7 +34,6 @@ + using namespace mozilla; + using namespace mozilla::widget; + +-#ifdef MOZ_X11 + NS_IMPL_COMPONENT_FACTORY(nsIClipboard) { + nsCOMPtr inst; + if (gfxPlatform::IsHeadless()) { +@@ -51,7 +48,6 @@ NS_IMPL_COMPONENT_FACTORY(nsIClipboard) { + + return inst.forget().downcast(); + } +-#endif + + nsresult nsWidgetGtk2ModuleCtor() { return nsAppShellInit(); } + +diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp +index f78ce835ef..fdd3580b72 100644 +--- a/widget/gtk/nsWindow.cpp ++++ b/widget/gtk/nsWindow.cpp +@@ -57,7 +57,6 @@ + #include "mozilla/UniquePtrExtensions.h" + #include "mozilla/WidgetUtils.h" + #include "mozilla/WritingModes.h" +-#include "mozilla/X11Util.h" + #include "mozilla/XREAppData.h" + #include "NativeKeyBindings.h" + #include "nsAppDirectoryServiceDefs.h" +@@ -89,7 +88,6 @@ + #include "ScreenHelperGTK.h" + #include "SystemTimeConverter.h" + #include "WidgetUtilsGtk.h" +-#include "mozilla/X11Util.h" + + #ifdef ACCESSIBILITY + # include "mozilla/a11y/LocalAccessible.h" +@@ -97,19 +95,23 @@ + # include "nsAccessibilityService.h" + #endif + ++#include "GLContextEGL.h" // for GLContextEGL::FindVisual() ++#include "GtkCompositorWidget.h" + #ifdef MOZ_X11 ++# include "mozilla/X11Util.h" + # include + # include + # include + # include + # include "gfxXlibSurface.h" + # include "GLContextGLX.h" // for GLContextGLX::FindVisual() +-# include "GLContextEGL.h" // for GLContextEGL::FindVisual() + # include "WindowSurfaceX11Image.h" + # include "WindowSurfaceX11SHM.h" + # include "WindowSurfaceXRender.h" + #endif + #ifdef MOZ_WAYLAND ++# include ++# include + # include "nsIClipboard.h" + # include "nsView.h" + #endif +@@ -119,7 +121,9 @@ using namespace mozilla::gfx; + using namespace mozilla::layers; + using namespace mozilla::widget; + using mozilla::gl::GLContextEGL; ++#ifdef MOZ_X11 + using mozilla::gl::GLContextGLX; ++#endif + + // Don't put more than this many rects in the dirty region, just fluff + // out to the bounding-box if there are more +@@ -278,6 +282,7 @@ bool nsWindow::sTransparentMainWindow = false; + + namespace mozilla { + ++#ifdef MOZ_X11 + class CurrentX11TimeGetter { + public: + explicit CurrentX11TimeGetter(GdkWindow* aWindow) +@@ -325,6 +330,7 @@ class CurrentX11TimeGetter { + GdkWindow* mWindow; + TimeStamp mAsyncUpdateStart; + }; ++#endif + + } // namespace mozilla + +@@ -2342,6 +2348,7 @@ void nsWindow::SetSizeMode(nsSizeMode aMode) { + } + + static bool GetWindowManagerName(GdkWindow* gdk_window, nsACString& wmName) { ++#ifdef MOZ_X11 + if (!GdkIsX11Display()) { + return false; + } +@@ -2408,6 +2415,7 @@ static bool GetWindowManagerName(GdkWindow* gdk_window, nsACString& wmName) { + } + + wmName = reinterpret_cast(prop_return); ++#endif + return true; + } + +@@ -2465,6 +2473,8 @@ void nsWindow::GetWorkspaceID(nsAString& workspaceID) { + if (!GdkIsX11Display() || !mShell) { + return; + } ++ ++#ifdef MOZ_X11 + // Get the gdk window for this widget. + GdkWindow* gdk_window = gtk_widget_get_window(mShell); + if (!gdk_window) { +@@ -2493,6 +2503,7 @@ void nsWindow::GetWorkspaceID(nsAString& workspaceID) { + + workspaceID.AppendInt((int32_t)wm_desktop[0]); + g_free(wm_desktop); ++#endif + } + + void nsWindow::MoveToWorkspace(const nsAString& workspaceIDStr) { +@@ -2501,7 +2512,7 @@ void nsWindow::MoveToWorkspace(const nsAString& workspaceIDStr) { + if (NS_FAILED(rv) || !workspaceID || !GdkIsX11Display() || !mShell) { + return; + } +- ++#ifdef MOZ_X11 + // Get the gdk window for this widget. + GdkWindow* gdk_window = gtk_widget_get_window(mShell); + if (!gdk_window) { +@@ -2535,6 +2546,7 @@ void nsWindow::MoveToWorkspace(const nsAString& workspaceIDStr) { + SubstructureNotifyMask | SubstructureRedirectMask, &xevent); + + XFlush(xdisplay); ++#endif + } + + using SetUserTimeFunc = void (*)(GdkWindow*, guint32); +@@ -2575,9 +2587,13 @@ guint32 nsWindow::GetLastUserInputTime() { + // button and key releases. Therefore use the most recent of + // gdk_x11_display_get_user_time and the last time that we have seen. + GdkDisplay* gdkDisplay = gdk_display_get_default(); ++#ifdef MOZ_X11 + guint32 timestamp = GdkIsX11Display(gdkDisplay) + ? gdk_x11_display_get_user_time(gdkDisplay) + : gtk_get_current_event_time(); ++#else ++ guint32 timestamp = gtk_get_current_event_time(); ++#endif + + if (sLastUserInputTime != GDK_CURRENT_TIME && + TimestampIsNewerThan(sLastUserInputTime, timestamp)) { +@@ -2735,6 +2751,7 @@ void nsWindow::UpdateClientOffsetFromFrameExtents() { + return; + } + ++#ifdef MOZ_X11 + GdkAtom cardinal_atom = gdk_x11_xatom_to_atom(XA_CARDINAL); + + GdkAtom type_returned; +@@ -2768,6 +2785,7 @@ void nsWindow::UpdateClientOffsetFromFrameExtents() { + + LOG(("nsWindow::UpdateClientOffsetFromFrameExtents [%p] %d,%d\n", (void*)this, + mClientOffset.x, mClientOffset.y)); ++#endif + } + + LayoutDeviceIntPoint nsWindow::GetClientOffset() { +@@ -2778,6 +2796,7 @@ LayoutDeviceIntPoint nsWindow::GetClientOffset() { + + gboolean nsWindow::OnPropertyNotifyEvent(GtkWidget* aWidget, + GdkEventProperty* aEvent) { ++#ifdef MOZ_X11 + if (aEvent->atom == gdk_atom_intern("_NET_FRAME_EXTENTS", FALSE)) { + UpdateClientOffsetFromFrameExtents(); + return FALSE; +@@ -2786,7 +2805,7 @@ gboolean nsWindow::OnPropertyNotifyEvent(GtkWidget* aWidget, + if (GetCurrentTimeGetter()->PropertyNotifyHandler(aWidget, aEvent)) { + return TRUE; + } +- ++#endif + return FALSE; + } + +@@ -2924,9 +2943,11 @@ void* nsWindow::GetNativeData(uint32_t aDataType) { + return GetToplevelWidget(); + + case NS_NATIVE_WINDOW_WEBRTC_DEVICE_ID: ++#ifdef MOZ_X11 + if (GdkIsX11Display()) { + return (void*)GDK_WINDOW_XID(gdk_window_get_toplevel(mGdkWindow)); + } ++#endif + NS_WARNING( + "nsWindow::GetNativeData(): NS_NATIVE_WINDOW_WEBRTC_DEVICE_ID is not " + "handled on Wayland!"); +@@ -2946,9 +2967,11 @@ void* nsWindow::GetNativeData(uint32_t aDataType) { + case NS_NATIVE_OPENGL_CONTEXT: + return nullptr; + case NS_NATIVE_EGL_WINDOW: { ++#ifdef MOZ_X11 + if (GdkIsX11Display()) { + return mGdkWindow ? (void*)GDK_WINDOW_XID(mGdkWindow) : nullptr; + } ++#endif + #ifdef MOZ_WAYLAND + if (mContainer) { + return moz_container_wayland_get_egl_window(mContainer, +@@ -3289,8 +3312,13 @@ gboolean nsWindow::OnExposeEvent(cairo_t* cr) { + nsIWidgetListener* listener = GetListener(); + if (!listener) return FALSE; + ++#ifdef MOZ_X11 + LOG(("received expose event [%p] %p 0x%lx (rects follow):\n", this, + mGdkWindow, GdkIsX11Display() ? gdk_x11_window_get_xid(mGdkWindow) : 0)); ++#else ++ LOG(("received expose event [%p] %p 0x%lx (rects follow):\n", this, ++ mGdkWindow, 0)); ++#endif + LayoutDeviceIntRegion exposeRegion; + if (!ExtractExposeRegion(exposeRegion, cr)) { + return FALSE; +@@ -3819,6 +3847,7 @@ void nsWindow::OnMotionNotifyEvent(GdkEventMotion* aEvent) { + MOZ_ASSERT(gdk_window, "gdk_window_get_toplevel should not return null"); + + bool canDrag = true; ++#ifdef MOZ_X11 + if (GdkIsX11Display()) { + // Workaround for https://bugzilla.gnome.org/show_bug.cgi?id=789054 + // To avoid crashes disable double-click on WM without _NET_WM_MOVERESIZE. +@@ -3829,6 +3858,7 @@ void nsWindow::OnMotionNotifyEvent(GdkEventMotion* aEvent) { + canDrag = false; + } + } ++#endif + + if (canDrag) { + gdk_window_begin_move_drag(gdk_window, 1, aEvent->x_root, aEvent->y_root, +@@ -4321,16 +4351,20 @@ TimeStamp nsWindow::GetEventTimeStamp(guint32 aEventTime) { + int64_t tick = + BaseTimeDurationPlatformUtils::TicksFromMilliseconds(timestampTime); + eventTimeStamp = TimeStamp::FromSystemTime(tick); +- } else { ++ } ++#ifdef MOZ_X11 ++ else { + CurrentX11TimeGetter* getCurrentTime = GetCurrentTimeGetter(); + MOZ_ASSERT(getCurrentTime, + "Null current time getter despite having a window"); + eventTimeStamp = + TimeConverter().GetTimeStampFromSystemTime(aEventTime, *getCurrentTime); + } ++#endif + return eventTimeStamp; + } + ++#ifdef MOZ_X11 + mozilla::CurrentX11TimeGetter* nsWindow::GetCurrentTimeGetter() { + MOZ_ASSERT(mGdkWindow, "Expected mGdkWindow to be set"); + if (MOZ_UNLIKELY(!mCurrentTimeGetter)) { +@@ -4338,6 +4372,7 @@ mozilla::CurrentX11TimeGetter* nsWindow::GetCurrentTimeGetter() { + } + return mCurrentTimeGetter.get(); + } ++#endif + + gboolean nsWindow::OnKeyPressEvent(GdkEventKey* aEvent) { + LOG(("OnKeyPressEvent [%p]\n", (void*)this)); +@@ -4914,6 +4949,7 @@ static GdkWindow* CreateGdkWindow(GdkWindow* parent, GtkWidget* widget) { + return window; + } + ++#ifdef MOZ_X11 + // Configure GL visual on X11. We add alpha silently + // if we use WebRender to workaround NVIDIA specific Bug 1663273. + bool nsWindow::ConfigureX11GLVisual(bool aUseAlpha) { +@@ -4965,6 +5001,7 @@ bool nsWindow::ConfigureX11GLVisual(bool aUseAlpha) { + + return true; + } ++#endif + + nsCString nsWindow::GetWindowNodeName() { + nsCString nodeName("Unknown"); +@@ -5552,9 +5589,15 @@ nsresult nsWindow::Create(nsIWidget* aParent, nsNativeWidget aNativeParent, + mWindowType == eWindowType_toplevel ? "Toplevel" : "Popup", + mIsPIPWindow ? "PIP window" : "")); + if (mShell) { ++#ifdef MOZ_X11 + LOG(("\tmShell %p mContainer %p mGdkWindow %p 0x%lx\n", mShell, mContainer, + mGdkWindow, + GdkIsX11Display() ? gdk_x11_window_get_xid(mGdkWindow) : 0)); ++#else ++ LOG(("\tmShell %p mContainer %p mGdkWindow %p 0x%lx\n", mShell, mContainer, ++ mGdkWindow, ++ 0)); ++#endif + } else if (mContainer) { + LOG(("\tmContainer %p mGdkWindow %p\n", mContainer, mGdkWindow)); + } else if (mGdkWindow) { +@@ -6478,6 +6521,7 @@ void nsWindow::UpdateTitlebarTransparencyBitmap() { + cairo_surface_destroy(surface); + } + ++#ifdef MOZ_X11 + if (!mNeedsShow) { + Display* xDisplay = GDK_WINDOW_XDISPLAY(mGdkWindow); + Window xDrawable = GDK_WINDOW_XID(mGdkWindow); +@@ -6500,6 +6544,7 @@ void nsWindow::UpdateTitlebarTransparencyBitmap() { + + XFreePixmap(xDisplay, maskPixmap); + } ++#endif + } + + void nsWindow::GrabPointer(guint32 aTime) { +@@ -6772,7 +6817,7 @@ static bool IsFullscreenSupported(GtkWidget* aShell) { + GdkScreen* screen = gtk_widget_get_screen(aShell); + GdkAtom atom = gdk_atom_intern("_NET_WM_STATE_FULLSCREEN", FALSE); + return gdk_x11_screen_supports_net_wm_hint(screen, atom); +-#elif ++#else + return true; + #endif + } +@@ -8048,6 +8093,7 @@ bool nsWindow::GetDragInfo(WidgetMouseEvent* aMouseEvent, GdkWindow** aWindow, + return false; + } + ++#ifdef MOZ_X11 + if (GdkIsX11Display()) { + // Workaround for https://bugzilla.gnome.org/show_bug.cgi?id=789054 + // To avoid crashes disable double-click on WM without _NET_WM_MOVERESIZE. +@@ -8063,6 +8109,7 @@ bool nsWindow::GetDragInfo(WidgetMouseEvent* aMouseEvent, GdkWindow** aWindow, + } + } + } ++#endif + + // FIXME: It would be nice to have the widget position at the time + // of the event, but it's relatively unlikely that the widget has +@@ -8794,6 +8841,7 @@ void nsWindow::GetCompositorWidgetInitData( + mozilla::widget::CompositorWidgetInitData* aInitData) { + nsCString displayName; + ++#ifdef MOZ_X11 + if (GdkIsX11Display() && mXWindow != X11None) { + // Make sure the window XID is propagated to X server, we can fail otherwise + // in GPU process (Bug 1401634). +@@ -8807,6 +8855,12 @@ void nsWindow::GetCompositorWidgetInitData( + *aInitData = mozilla::widget::GtkCompositorWidgetInitData( + (mXWindow != X11None) ? mXWindow : (uintptr_t) nullptr, displayName, + isShaped, GdkIsX11Display(), GetClientSize()); ++#else ++ *aInitData = mozilla::widget::GtkCompositorWidgetInitData( ++ (uintptr_t) nullptr, ++ nsCString(), 0, ++ 0, GetClientSize()); ++#endif + } + + #ifdef MOZ_WAYLAND +diff --git a/widget/gtk/nsWindow.h b/widget/gtk/nsWindow.h +index 9525c0c6da..6818f7cad2 100644 +--- a/widget/gtk/nsWindow.h ++++ b/widget/gtk/nsWindow.h +@@ -90,7 +90,9 @@ typedef struct _GdkEventTouchpadPinch GdkEventTouchpadPinch; + + namespace mozilla { + class TimeStamp; ++#ifdef MOZ_X11 + class CurrentX11TimeGetter; ++#endif + + } // namespace mozilla + +@@ -271,7 +273,9 @@ class nsWindow final : public nsBaseWidget { + + WidgetEventTime GetWidgetEventTime(guint32 aEventTime); + mozilla::TimeStamp GetEventTimeStamp(guint32 aEventTime); ++#ifdef MOV_X11 + mozilla::CurrentX11TimeGetter* GetCurrentTimeGetter(); ++#endif + + virtual void SetInputContext(const InputContext& aContext, + const InputContextAction& aAction) override; +@@ -756,7 +760,9 @@ class nsWindow final : public nsBaseWidget { + */ + RefPtr mIMContext; + ++#ifdef MOZ_X11 + mozilla::UniquePtr mCurrentTimeGetter; ++#endif + static GtkWindowDecoration sGtkWindowDecoration; + + static bool sTransparentMainWindow; +@@ -807,6 +813,7 @@ class nsWindow final : public nsBaseWidget { + void DispatchRestoreEventAccessible(); + #endif + ++mozilla::widget::WindowSurfaceProvider mSurfaceProvider; + #ifdef MOZ_X11 + typedef enum {GTK_WIDGET_COMPOSIDED_DEFAULT = 0, + GTK_WIDGET_COMPOSIDED_DISABLED = 1, +@@ -816,7 +823,6 @@ class nsWindow final : public nsBaseWidget { + Window mXWindow; + Visual* mXVisual; + int mXDepth; +- mozilla::widget::WindowSurfaceProvider mSurfaceProvider; + + bool ConfigureX11GLVisual(bool aUseAlpha); + #endif +diff --git a/widget/moz.build b/widget/moz.build +index 07e6970e56..9d1fe19661 100644 +--- a/widget/moz.build ++++ b/widget/moz.build +@@ -258,7 +258,7 @@ if CONFIG["MOZ_INSTRUMENT_EVENT_LOOP"]: + + EXPORTS.ipc = ["nsGUIEventIPC.h"] + +-if CONFIG["MOZ_X11"]: ++if CONFIG["MOZ_X11"] or CONFIG["MOZ_WAYLAND"]: + DIRS += ["x11"] + + if toolkit in ("cocoa", "windows"): +@@ -305,7 +305,7 @@ if toolkit == "windows": + "windows/PCompositorWidget.ipdl", + "windows/PlatformWidgetTypes.ipdlh", + ] +-elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk" and CONFIG["MOZ_X11"]: ++elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": + IPDL_SOURCES = [ + "gtk/PCompositorWidget.ipdl", + "gtk/PlatformWidgetTypes.ipdlh", +diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build +index f882569..1acea03 100644 +--- a/widget/gtk/moz.build ++++ b/widget/gtk/moz.build +@@ -149,7 +149,7 @@ LOCAL_INCLUDES += [ + "/widget/headless", + ] + +-if CONFIG["MOZ_X11"]: ++if CONFIG["MOZ_X11"] or CONFIG["MOZ_WAYLAND"]: + LOCAL_INCLUDES += [ + "/widget/x11", + ] +diff --git a/gfx/thebes/gfxPlatformGtk.cpp b/gfx/thebes/gfxPlatformGtk.cpp +index 12e01681c7..b9f526ff45 100644 +--- a/gfx/thebes/gfxPlatformGtk.cpp ++++ b/gfx/thebes/gfxPlatformGtk.cpp +@@ -30,7 +30,9 @@ + #include "mozilla/FontPropertyTypes.h" + #include "mozilla/gfx/2D.h" + #include "mozilla/gfx/Logging.h" ++#ifdef MOZ_X11 + #include "mozilla/gfx/XlibDisplay.h" ++#endif + #include "mozilla/Monitor.h" + #include "mozilla/Preferences.h" + #include "mozilla/StaticPrefs_gfx.h" From 517ce35a46198828c6c37e2914909fbecb31be60 Mon Sep 17 00:00:00 2001 From: Ella Stanforth <23418164+Ella-0@users.noreply.github.com> Date: Fri, 31 Dec 2021 15:28:03 +0000 Subject: [PATCH 036/151] add zip --- extra/zip/build.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 extra/zip/build.sh diff --git a/extra/zip/build.sh b/extra/zip/build.sh new file mode 100644 index 0000000..f641c3b --- /dev/null +++ b/extra/zip/build.sh @@ -0,0 +1,29 @@ +pkgname=zip +pkgver=30 + +fetch() { + curl "https://fossies.org/linux/misc/zip$pkgver.tar.gz" -o $pkgname-$pkgver.tar.xz + tar -xf $pkgname-$pkgver.tar.xz + mv zip$pkgver $pkgname-$pkgver +} + +build() { + cd $pkgname-$pkgver + + make -f unix/Makefile generic +} + +package() { + cd $pkgname-$pkgver + make -f unix/Makefile install prefix=$pkgdir/usr +} + +backup() { + return +} + +license() { + cd $pkgname-$pkgver + cat LICENSE +# cat COPYING +} From 6bd09efb057c459a2fab27face78a233f2362998 Mon Sep 17 00:00:00 2001 From: Ella Stanforth <23418164+Ella-0@users.noreply.github.com> Date: Fri, 31 Dec 2021 16:44:47 +0000 Subject: [PATCH 037/151] temporarily add gm4 for firefox whilst I workout om4 patches --- bad/gm4/build.sh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 bad/gm4/build.sh diff --git a/bad/gm4/build.sh b/bad/gm4/build.sh new file mode 100644 index 0000000..ca90051 --- /dev/null +++ b/bad/gm4/build.sh @@ -0,0 +1,31 @@ +pkgname=gm4 +pkgver=1.4.19 + +fetch() { + curl "http://ftp.gnu.org/pub/gnu/m4/m4-$pkgver.tar.xz" -o $pkgname-$pkgver.tar.xz + tar -xf $pkgname-$pkgver.tar.xz + mv m4-$pkgver gm4-$pkgver +} + +build() { + cd $pkgname-$pkgver + ./configure \ + --prefix=/usr \ + --build=$TRIPLE \ + --program-prefix=g \ + --host=$TRIPLE \ + --disable-nls + + make +} + +package() { + cd $pkgname-$pkgver + make install DESTDIR=$pkgdir +} + +license() { + cd $pkgname-$pkgver + cat LICENSE +# cat COPYING +} From 85619cc189086a990b2a9efe255eff387da1d6dd Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Sun, 16 Jan 2022 10:00:48 +0000 Subject: [PATCH 038/151] update web browser in README --- README.md | 7 +++---- {old => extra}/sqlite/build.sh | 0 2 files changed, 3 insertions(+), 4 deletions(-) rename {old => extra}/sqlite/build.sh (100%) diff --git a/README.md b/README.md index 147a94c..bc2dc37 100644 --- a/README.md +++ b/README.md @@ -34,10 +34,9 @@ Because of this I haven't got far at all porting Iglunix to Darwin based systems such as MacOS and PureDarwin. ## Web Browsers -Iglunix currently has qtwebengine running (with sandboxing broken on at least -aarch64). This does require 3 extra GNU dependencies on top of GNU Make: -`gperf`, `gm4`, `bison`. This also requires dbus however it is only needed -at build time and for this reason we are working on a stub implementation. +Iglunix has Firefox ESR packaged requiring 2 extra GNU packages: `gm4` and +`autoconf`. Iglunix may switch to using a patched version of webkit gtk with +openssl and maybe ffmpeg replacing gstreamer. ## Replacements LUT diff --git a/old/sqlite/build.sh b/extra/sqlite/build.sh similarity index 100% rename from old/sqlite/build.sh rename to extra/sqlite/build.sh From 2bcdcf8183f0236c15cc45deb06cdf42d367d78d Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Sun, 23 Jan 2022 16:53:56 +0000 Subject: [PATCH 039/151] add autossh --- extra/autossh/build.sh | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 extra/autossh/build.sh diff --git a/extra/autossh/build.sh b/extra/autossh/build.sh new file mode 100644 index 0000000..a4473d3 --- /dev/null +++ b/extra/autossh/build.sh @@ -0,0 +1,34 @@ +pkgname=autossh +pkgver=1.4g + +fetch() { + curl "https://www.harding.motd.ca/autossh/autossh-$pkgver.tgz" -LO + tar -xf $pkgname-$pkgver.tgz +} + +build() { + cd $pkgname-$pkgver + ./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --build=$TRIPLE \ + --host=$TRIPLE + + make +} + +package() { + cd $pkgname-$pkgver + make install DESTDIR=$pkgdir +} + +backup() { + return +} + +license() { + cd $pkgname-$pkgver + cat LICENSE +# cat COPYING +} From cfb8c64e697b610ff3ac353e7005cad4f50948c5 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Sat, 12 Feb 2022 13:31:24 +0000 Subject: [PATCH 040/151] bump curl --- base/curl/build.sh | 20 +++++--------------- base/curl/f | Bin 4390 -> 0 bytes 2 files changed, 5 insertions(+), 15 deletions(-) delete mode 100644 base/curl/f diff --git a/base/curl/build.sh b/base/curl/build.sh index 2783973..81dc9bf 100644 --- a/base/curl/build.sh +++ b/base/curl/build.sh @@ -1,11 +1,10 @@ -pkgver=7.79.0 +pkgver=7.81.0 pkg_ver=$(echo $pkgver | tr '.' '_') pkgname=curl pkgrel=1 mkdeps="samu:cmake" deps="openssl" bad="" -ext="doc:dev" fetch() { curl -L "https://github.com/curl/curl/releases/download/curl-$pkg_ver/curl-$pkgver.tar.xz" -o $pkgname-$pkgver.tar.gz @@ -19,7 +18,8 @@ build() { cmake -G Ninja ../ \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCURL_CA_BUNDLE="/etc/ssl/cert.pem" samu } @@ -27,20 +27,10 @@ package() { cd $pkgname-$pkgver cd build DESTDIR=$pkgdir samu install - rm -r $pkgdir/usr/share - rm -r $pkgdir/usr/include - rm -r $pkgdir/usr/lib/pkgconfig - rm -r $pkgdir/usr/lib/cmake } -package_dev() { - cd $pkgname-$pkgver - cd build - DESTDIR=$pkgdir samu install - rm -r $pkgdir/usr/share - rm -r $pkgdir/usr/bin - rm $pkgdir/usr/lib/*.so - rm $pkgdir/usr/lib/*.so.* +backup() { + return } license() { diff --git a/base/curl/f b/base/curl/f deleted file mode 100644 index 080b82adc5a23c04e73fa44bd46967caf49cda8a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4390 zcmV+>5!vn^iwFn+00002|6+A!W@U0|Zf7kpE;BAPE@N_GbY%eTTWeF>NVCpo{fb#r zmDnjEY`~B;+0-#cA$p709NQ$Dq9`+##}^J`Y{*mcbBr90-SvWXJ*$-^lQap>!f_C zLDeg93k)5lnYv%nSt*qRG;jmkOC02Pt}!@DuU~JyHo~Z+tIOHM$?lw3EwkM-;qpS$ z&K+^R>4>Qa91+;Ah%U6@Z7hH#=mm1tN;GEfc_!T;khYxO4t#Eh5(fVbu*4I5%h)PD z0)gi&Rx_$_OA_kbgL`q92=*NqjRcRA5SifHs1w*W4Jc{KOGN@ zhZz6Ygv{;g_I7rjhR|BAx?BCV;{PvtY_R?ZtH<73Cnkgc&9i>zW3z9ynkOe;*s<9* zyUo6N#16l(Ra28-ar&*KqQNE z5tE~o5f2=A5=ju?CUj%LE-^@6vSLgH3bC9?SQf_E&{O#hS5_7V!*FZFZe_xT!gIy7 zKm|kbDgtIqgdqs(25`@fNOU&!1c!`7=RAP7-6(>9%g5XeqFA8=?zZXiV7z6M)U#w| zq`Y2*0^Ssk8zZ(e;zJ;G!$XvTD_Y4Ev=H1cKu8b)Jf3?cAfzB8XWT zf$|f3!h9K`xp)NGVd#kpDH7juc-Se;!jw58mw zEu`+{BEraPh`HCPn0U_d&&R{_e>&}+l*c{&-}ZjJ2L0b|wO)t*Z+9Q_|Mvb)^|}B1 z2?vBXmW4NVqQai0wICos_dkJjVOQ98wf075a}i!^LYAQs5u}hvgxA6`G_4DH3zCvM zOek7oszJJtB_o-HwxByhH^Ar(q1umhmC_+<*B*4)2xa*71SS0~)Dj<+a0IE5OE$$Km_)|IXKp|MF znj`JRhYEm@1zPaV7T_+irh$ShhA05_(+p!W482$opEPO0lHO)t`jIHiXx=~mAt*q`~K%ZPrGKX$2whReLOv}fEZBk zHrsv6?CH#Ew@%KEtoE_afBTYimo-m{NpxAg%on}^nk)&D|* zytn#o+CRG8U zPWKBEMGOdhoqhgb!u>7+N=P*kf*v5&>KBG-zz+cI7j$H8^Z3MqhN@+vG##Y!+3J}U zu$9%r0hVI>xd}YaNM*DUNTtzf!DDr@B(vVL=Fuk$#ZCu8&J; zWT}~%Y`8#n`Mz#xt{ShBaPo<#09F_^eP z++ZDQncgON3*P&#X|6x@koGEmH`vd!euFimt{A;NPu^T)LZHGecmom;hnDgtQ(7%S z1T29bEc9+E*YcRN_;#B1<~BTqj3&NLp)!gvuki>GfL4t~*jW;NL}C;m1&Oa}p*Oq~pJ^Zezzd0Vq&`uZhwuvp!r=^8d zFVJZ$;(>Zreu*AMn!U`eSx|x=rw#EcW_}Xm(!|4<4&bfwOCM{2oH<^t6d)V6Mu;8= zf%q`Qr)akb*yX^@xambS$q6e3Zp0`b0Bv|r`l6iQs2nV^?+R$)19pks|0Q#ABIVLB z7mGEhz2^m+@Te$Q4#7}LZ>=bX3ooH8m1PO09*4<1V@ng@5dr8gaY2{MqEIov z606`M$>yf)dJ&PvD*1@}ym(j#+7lj()e@RWEj z#~&-6;|0tsI0GM2C!WC3AR)wBZ59)9t*p^(EmYb_NoTmqn=V`?flZAdt-4|q%2tV| zk~}yl0x=XL8LAG*<58URz`$EnTu~}I(Sp(nD+8x!t};DXh=i3@vptP3suf|IN)bwO z0;qyI*SNBZ?G+E5bj90;_7RPw6j=-tnW0w6>j6i=m_5WC2kT5sfv+;JHxgIo%cDyn zCt_xyHPZ(sN3sHUigAyU7+vE)a!4#Gx*|%vc+I3)ut$bMYQLGg9;~!4Nr35YS+AnR zk5ey&ypX?ez#30mw$w}{5hQ-fpNc6HuHU}m8LQ(^-e8I=r`hR~u-_(c-n~n6c=i}1 z%tpL?#W63kg^@h~*jXGyN>yfM5b`A{3aG4-3IL#wD9Z-^A>;ZywkPa$G+)fj3Ywf{ zqmk2IE}m{nk;0r0ygDJ5tz1F!>%#Sy}tQa{FUA>?U_TLR}I51CJu}xXzq&#TIC5z&usNLqTgru&vi9q?R&c# z9F=x8kR#SNHY9KwZD!U}qX!ri8mo-_qx}q0yo=9L_i_!XONN_6j{V3Ag|TTFgUv83 z2D4Q&$ivwOw4sD@gopTLbiRKXj58lXAs0km)zx_US2+R#!oG4?D$W-Cm5R!5Wast1 zTkL;8(cjLi2Q2z_QCXPvShGHm&>W5L2igj!yrVNC^&Z=7-D^Iz2o6;-c9&VFl=npp zzd2)imsFz38~i+a&AmjdGat<$V1)l6($A-v_1)DA>%$hR>kB#Yx5tC&~sP&+|@o!SBsvMm+ug1mKJIjy(>@61?QSu z(W@-gF@;K7<%`Fblym&^Ch#AWmyaU2y41Xn)c1!KjY|c=16vvbdPO&LcNejW>p$ru zmIRs=4NzJWVNxuaG?gwQG#!`)>}ED72iOOa(;g z*Tq}FvC+r}HyVFaFACR@`8C!L-LV-sE)Vn*NI#xX7vEC?8|TRVB2yJF(lv#FFCZ*9 z<;4{Rgkgw*c%khr6gD-TZR>1DXS+J9>ugVF`#O80v)^@At6mg3ZlpJIL*N++{Ng;o zwi{@xR==9OIbgdNv*AP4mM^_gF_PdW?G*qIN{_4%OS~+6fY$ZO?7c^=n`! z*d=a7xMYxl6OXuZwQG6giLWjcWja*7Mxb7gr;?K>*_UYCIE1nghioAS zR8Vq6hEkDwLa2Gu9a-2xFnKM)3FeAOGDqT$EXwQjalpl`SW{Q1jb|Ks5{zttu&<1w zDr%eU3T2?%i9?sZEHK)HyE(6d!7SoNd$VleBq8_Iz$jNH31}Z!!5k#E0tWZI@sWsc zXFYDJ_{bHWLtD~#);iowX#0A$j|}>ZltEtDrvni;TxEc22pYCH`^-%ZcZwwG*xJP1 z=nQvOk8nM02+7TnBHw97df?i<{+$9K0M0^>HcN zU!QIC22&xU893CygX`iKI8eY~oj|B<@lejnFh)lXq;hN8t|rw-E99+|O$AXV7x^AJ zqP}PpwWDt+=*J6?3-NOi!fA80LL;+}UK|{RwP29zk>@MN8*$eomx9~}dJzjKdFJE* zysvRDKlOdcCQ-Zkm;!5x7K~j04IL79))~+%fGI+%hLzXCoWLJr5ctqqdJYKY&9>rk z`jG=}K=<8mia5@s)MaV21Ns!Q^Wj-*W?yh7!WPfT{}c~f1Uz(QL~|kyFYnVW>U3#x z`b|PMInwRxnrRSkjy0{|)=A4Kk+*(PSI{`(~377p` z#UvkLFxI>VsL3SRR(ZrL3qLCKWEbh=%~p(mXx^fbcLzb3JbCa@4vzDHcqBmzuOrmg zQ$O1in#ZEFOG$;teg8_z62$L~bCPHPw!{mX&gCRP(+-r=W0aq7Wmf(m;9ySWEbg)! zep^&eEGQ@DRhuofP55;hn(k30Qv{a|umQvC1MTi{I6d)N^UE<){js|WplEz<=4F2Wc|5j_YrQiSV zJpcap=NuSSN@F)JHPQf6iYB}US0%o?y)U-y+Wz*)sn?v}`ObE2xaV*&a>U+nThyK5 go9(?fzn8S<8UK7dAJ510@#`J`2ltJNzW_=A0Hz&oVgLXD From 3048367a7d11fed8b931911ea3d7ad5228a4d196 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Sat, 12 Feb 2022 13:32:06 +0000 Subject: [PATCH 041/151] update update-ca script --- base/openssl/build.sh | 4 ++++ base/openssl/update-ca.sh | 4 +--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/base/openssl/build.sh b/base/openssl/build.sh index 29b3eeb..18af952 100644 --- a/base/openssl/build.sh +++ b/base/openssl/build.sh @@ -31,6 +31,10 @@ package() { install -Dm755 ../../update-ca.sh $pkgdir/usr/sbin/update-ca } +backup() { + return +} + license() { cd $pkgname-$pkgver diff --git a/base/openssl/update-ca.sh b/base/openssl/update-ca.sh index 4517ee9..040c441 100755 --- a/base/openssl/update-ca.sh +++ b/base/openssl/update-ca.sh @@ -1,4 +1,2 @@ #!/bin/sh -cd /etc/ssl && { - curl -LO https://curl.haxx.se/ca/cacert.pem -o /etc/ssl/certs/ca-certificates.crt -} +curl -L https://curl.haxx.se/ca/cacert.pem -o /etc/ssl/cert.pem From 31f1b45be65f7e8c43edb31039852f82add68dcf Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Sat, 12 Feb 2022 13:43:28 +0000 Subject: [PATCH 042/151] bump llvm --- base/llvm/build.sh | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/base/llvm/build.sh b/base/llvm/build.sh index c546f18..2339e8d 100644 --- a/base/llvm/build.sh +++ b/base/llvm/build.sh @@ -1,4 +1,4 @@ -pkgver=13.0.0 +pkgver=13.0.1 pkgname=llvm bad="" ext="dev" @@ -7,13 +7,6 @@ fetch() { curl -L "https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver/llvm-project-$pkgver.src.tar.xz" -o $pkgname-$pkgver.tar.gz tar -xf $pkgname-$pkgver.tar.gz mv llvm-project-$pkgver.src $pkgname-$pkgver - - # fixes relaxation - cd $pkgname-$pkgver - patch -p1 < ../../riscv-relax.patch - - cp -n ../default.llvm.conf /etc/iglupkg/llvm.conf - [ ../default/llvm.conf -nt /etc/iglupkg/llvm.conf ] && echo "WARNING: the default config file is newer than your config file." done } build() { @@ -84,7 +77,7 @@ build() { -DCLANG_ENABLE_STATIC_ANALYZER=OFF \ -DCLANG_ENABLE_ARCMT=OFF \ -DCLANG_LINK_CLANG_DYLIB=OFF \ - -DCOMPILER_RT_USE_BUILTINS_LIBRARY=ON \ + -DCOMPILER_RT_USE_BUILTINS_LIBRARY=OFF \ -DCOMPILER_RT_DEFAULT_TARGET_ONLY=OFF \ -DCOMPILER_RT_INCLUDE_TESTS=OFF \ -DCOMPILER_RT_BUILD_SANITIZERS=OFF \ @@ -93,6 +86,7 @@ build() { -DCOMPILER_RT_INCLUDE_TESTS=OFF \ -DCOMPILER_RT_BUILD_LIBFUZZER=OFF \ -DENABLE_EXPERIMENTAL_NEW_PASS_MANAGER=TRUE \ + -DCAN_TARGET_i386=1 \ ../llvm samu -j$JOBS @@ -102,10 +96,15 @@ package() { cd $pkgname-$pkgver cd build DESTDIR=$pkgdir samu install - ln -sr $pkgdir/usr/bin/clang $pkgdir/usr/bin/cc - ln -sr $pkgdir/usr/bin/clang $pkgdir/usr/bin/c89 - ln -sr $pkgdir/usr/bin/clang $pkgdir/usr/bin/c99 - ln -sr $pkgdir/usr/bin/clang++ $pkgdir/usr/bin/c++ + ln -s clang $pkgdir/usr/bin/cc + ln -s clang $pkgdir/usr/bin/c89 + ln -s clang $pkgdir/usr/bin/c99 + ln -s clang++ $pkgdir/usr/bin/c++ + ln -s ld.lld $pkgdir/usr/bin/ld +} + +backup() { + return } package_dev() { From 629d1713eb6545e4440e7bdd133a9ff45db2fe38 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Sun, 13 Mar 2022 12:03:35 +0000 Subject: [PATCH 043/151] netbsd-curses: fix terminfo --- base/netbsd-curses/build.sh | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/base/netbsd-curses/build.sh b/base/netbsd-curses/build.sh index a25846a..731d479 100644 --- a/base/netbsd-curses/build.sh +++ b/base/netbsd-curses/build.sh @@ -1,6 +1,6 @@ pkgver=master pkgname=netbsd-curses -bad="" +bad="gmake" deps="musl" ext="doc:dev" @@ -11,32 +11,16 @@ fetch() { build() { cd $pkgname-$pkgver - ckati + bad --gmake gmake PREFIX=/usr } package() { cd $pkgname-$pkgver - ckati install DESTDIR=$pkgdir PREFIX=/usr - rm -r $pkgdir/usr/share - rm $pkgdir/usr/lib/*.a - rm -r $pkgdir/usr/include - rm -r $pkgdir/usr/lib/pkgconfig + bad --gmake gmake install DESTDIR=$pkgdir PREFIX=/usr } -package_doc() { - cd $pkgname-$pkgver - ckati install DESTDIR=$pkgdir PREFIX=/usr - rm -r $pkgdir/usr/bin - rm -r $pkgdir/usr/lib - rm -r $pkgdir/usr/include -} - -package_dev() { - cd $pkgname-$pkgver - ckati install DESTDIR=$pkgdir PREFIX=/usr - rm $pkgdir/usr/lib/*.so - rm -r $pkgdir/usr/share - rm -r $pkgdir/usr/bin +backup() { + return } license() { From af3aacaebc00cbc322b7e2c613129d46104a4d89 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Sun, 13 Mar 2022 12:03:56 +0000 Subject: [PATCH 044/151] foot: fix terminfo --- gui/foot/build.sh | 14 ++++++++++---- gui/foot/netbsd-tic.patch | 23 +++++++++++++++++++++++ 2 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 gui/foot/netbsd-tic.patch diff --git a/gui/foot/build.sh b/gui/foot/build.sh index 25029a0..c14bb09 100644 --- a/gui/foot/build.sh +++ b/gui/foot/build.sh @@ -2,10 +2,16 @@ pkgname=foot pkgver=1.10.3 fetch() { - curl -L "https://codeberg.org/dnkl/foot/archive/$pkgver.tar.gz" -o $pkgname-$pkgver.tar.xz - tar -xf $pkgname-$pkgver.tar.xz + curl -L "https://codeberg.org/dnkl/foot/archive/$pkgver.tar.gz" -o $pkgname-$pkgver.tar.gz + curl -L "https://codeberg.org/dnkl/fcft/archive/2.4.5.tar.gz" -o fcft.tar.gz + curl -L "https://codeberg.org/dnkl/tllist/archive/1.0.5.tar.gz" -o tllist.tar.gz + tar -xf $pkgname-$pkgver.tar.gz mv $pkgname $pkgname-$pkgver mkdir $pkgname-$pkgver/build + tar -xf fcft.tar.gz -C $pkgname-$pkgver/subprojects + tar -xf tllist.tar.gz -C $pkgname-$pkgver/subprojects + cd $pkgname-$pkgver + patch -p1 < ../../netbsd-tic.patch } build() { @@ -15,8 +21,8 @@ build() { --buildtype=release \ --prefix=/usr \ --libexecdir=lib \ - -Dterminfo=disabled \ - -Ddefault-terminfo=xterm + -Dterminfo=enabled \ + -Ddefault-terminfo=foot samu } diff --git a/gui/foot/netbsd-tic.patch b/gui/foot/netbsd-tic.patch new file mode 100644 index 0000000..de8672e --- /dev/null +++ b/gui/foot/netbsd-tic.patch @@ -0,0 +1,23 @@ +--- a/meson.build ++++ b/meson.build +@@ -43,7 +43,7 @@ + join_paths(get_option('prefix'), terminfo_install_location))], + language: 'c') + else +- terminfo_install_location = join_paths(get_option('datadir'), 'terminfo') ++ terminfo_install_location = get_option('datadir') + endif + + # Compute the relative path used by compiler invocations. +@@ -262,9 +262,9 @@ + ) + custom_target( + 'terminfo', +- output: get_option('default-terminfo')[0], ++ output: 'terminfo.cdb', + input: preprocessed, +- command: [tic, '-x', '-o', '@OUTDIR@', '-e', '@0@,@0@-direct'.format(get_option('default-terminfo')), '@INPUT@'], ++ command: [tic, '-x', '-o', '@OUTPUT@', '@INPUT@'], + install: true, + install_dir: terminfo_install_location + ) From f282a514cd155de9d976515a07369252adc7e6f5 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Sat, 9 Apr 2022 15:11:23 +0000 Subject: [PATCH 045/151] musl: switch back to GNU make --- linux/musl/build.sh | 47 +++++++++++++++------------------------------ 1 file changed, 16 insertions(+), 31 deletions(-) diff --git a/linux/musl/build.sh b/linux/musl/build.sh index de64617..0d20b11 100644 --- a/linux/musl/build.sh +++ b/linux/musl/build.sh @@ -8,49 +8,34 @@ ext="dev" fetch() { curl "https://musl.libc.org/releases/$pkgname-$pkgver.tar.gz" -o $pkgname-$pkgver.tar.gz tar -xf $pkgname-$pkgver.tar.gz + ln -s /usr/bin/cc $ARCH-linux-musl-cc cd $pkgname-$pkgver - cp ../../meson.build . - cp ../../glob.sh . - cp ../../globbits.sh . - cp ../../version_h.sh . - cp ../../crt.meson.build crt/meson.build - mkdir bits - cp ../../bits.meson.build bits/meson.build - mkdir build } build() { cd $pkgname-$pkgver - cd build - meson .. -Dprefix=/usr - samu + if [ -z "$FOR_CROSS" ]; then + PREFIX=/usr + else + PREFIX=/usr/$ARCH-linux-musl + fi + + + CC=$(pwd)/../$ARCH-linux-musl-cc ./configure \ + --prefix=$PREFIX \ + --target=$TRIPLE + + bad --gmake gmake } package() { cd $pkgname-$pkgver - cd build - DESTDIR=$pkgdir samu install - - cd .. - - rm -rf $pkgdir/usr/include - - install -d $pkgdir/usr/bin - install -d $pkgdir/lib - - mv $pkgdir/usr/lib/libc.so $pkgdir/lib/ld-musl-$(uname -m).so.1 - ln -sr $pkgdir/lib/ld-musl-$(uname -m).so.1 $pkgdir/usr/lib/libc.so - ln -sr $pkgdir/lib/ld-musl-$(uname -m).so.1 $pkgdir/usr/bin/ldd + bad --gmake gmake DESTDIR=$pkgdir install } -package_dev() { - cd $pkgname-$pkgver - cd build - DESTDIR=$pkgdir samu install - - rm $pkgdir/usr/lib/*.so - rm -rf $pkgdir/lib +backup() { + return } license() { From c10ccb744d402fb8caf249baf92ff57ab7864e33 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Sat, 9 Apr 2022 15:13:57 +0000 Subject: [PATCH 046/151] musl: use FOR_CROSS_DIR --- linux/musl/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux/musl/build.sh b/linux/musl/build.sh index 0d20b11..162015a 100644 --- a/linux/musl/build.sh +++ b/linux/musl/build.sh @@ -18,7 +18,7 @@ build() { if [ -z "$FOR_CROSS" ]; then PREFIX=/usr else - PREFIX=/usr/$ARCH-linux-musl + PREFIX=$FOR_CROSS_DIR fi From cff05c4fa65d7fdb10e54053641bd563a59da039 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Sat, 9 Apr 2022 15:24:47 +0000 Subject: [PATCH 047/151] linux: bump ver and use new corss utils --- linux/linux/build.sh | 54 ++++++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 25 deletions(-) diff --git a/linux/linux/build.sh b/linux/linux/build.sh index 806ad8e..efc6d0f 100644 --- a/linux/linux/build.sh +++ b/linux/linux/build.sh @@ -1,55 +1,59 @@ -pkgver=5.15 +pkgver=5.17.2 pkgname=linux pkgrel=1 ext="dev" fetch() { - return - # curl "https://raw.githubusercontent.com/kisslinux/website/master/site/dist/kernel-no-perl.patch" -o kernel-no-perl.patch curl "https://cdn.kernel.org/pub/linux/kernel/v5.x/$pkgname-$pkgver.tar.xz" -o $pkgname-$pkgver.tar.xz tar -xf $pkgname-$pkgver.tar.xz cd $pkgname-$pkgver - # use Alpine's kernel config so we don't have to maintain one - # curl "https://git.alpinelinux.org/aports/plain/community/linux-edge/config-edge.$(uname -m)" -o .config - # patch -p1 < ../kernel-no-perl.patch - patch -p1 < ../../kernel-byacc.patch - patch -p1 < ../../v3d-enable.patch - # patch -p1 < ../../reflex.patch + curl "https://git.alpinelinux.org/aports/plain/community/linux-edge/config-edge.$(uname -m)" -o .config } _arch=$ARCH case $_arch in aarch64*) _arch="arm64" ;; +riscv64*) _arch="riscv" ;; +ppc64le*) _arch="powerpc" ;; esac +if [ ! -z "$WITH_CROSS" ]; then + export CROSS_COMPILE=$WITH_CROSS-linux-musl +fi + + build() { cd $pkgname-$pkgver - return - bad --gmake gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 ARCH=$_arch defconfig - bad --gmake gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 ARCH=$_arch localmodconfig - # gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ LEX=lex YACC=yacc LLVM_IAS=1 menuconfig - # cp .config ../../$(uname -m).config.new + bad --gmake gmake CC=cc HOSTCC=cc YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch olddefconfig sed -i 's/CONFIG_UNWINDER_ORC=y/# CONFIG_UNWINDER_ORC is not set/g' .config sed -i 's/# CONFIG_UNWINDER_FRAME_POINTER is not set/CONFIG_UNWINDER_FRAME_POINTER=y/g' .config - bad --gmake gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 ARCH=$_arch + + if [ -z "$FOR_CROSS" ]; then + bad --gmake gmake CC=cc HOSTCC=cc YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch + fi } package() { cd $pkgname-$pkgver - install -d $pkgdir/boot - bad --gmake gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 ARCH=$_arch INSTALL_PATH=$pkgdir/boot install - bad --gmake gmake CC=cc HOSTCC=cc LEX=flex YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch INSTALL_DTBS_PATH=$pkgdir/boot dtbs_install - bad --gmake gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 ARCH=$_arch INSTALL_MOD_PATH=$pkgdir/ modules_install - if stat /usr/bin/rsync 2>/dev/null /dev/null; then - bad --gmake gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 ARCH=$_arch INSTALL_HDR_PATH=$pkgdir/usr headers_install - else - bad --gmake gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 ARCH=$_arch headers - find -name '.*' -exec rm {} \; - rm usr/include/Makefile + if [ -z "$FOR_CROSS" ]; then + install -d $pkgdir/boot + bad --gmake gmake CC=cc HOSTCC=cc YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch INSTALL_PATH=$pkgdir/boot install + set +e # depmod causes errors + bad --gmake gmake CC=cc HOSTCC=cc YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch INSTALL_MOD_PATH=$pkgdir/ modules_install + set -e + fi + + bad --gmake gmake CC=cc HOSTCC=cc YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch headers + find -name '.*' -exec rm {} \; + rm -f usr/include/Makefile + if [ -z "$FOR_CROSS" ]; then install -d $pkgdir/usr/ cp -r usr/include $pkgdir/usr/ + else + install -d $pkgdir/usr/$FOR_CROSS_DIR + cp -r usr/include $pkgdir/$FOR_CROSS_DIR fi } From f850f1a08ed192233dc03226f632140cbc49ac61 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Sat, 9 Apr 2022 15:38:26 +0000 Subject: [PATCH 048/151] add libunwind --- base/libunwind/build.sh | 70 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 base/libunwind/build.sh diff --git a/base/libunwind/build.sh b/base/libunwind/build.sh new file mode 100644 index 0000000..adc4846 --- /dev/null +++ b/base/libunwind/build.sh @@ -0,0 +1,70 @@ +pkgver=14.0.0 +pkgname=libunwind +bad="" +ext="dev" + +fetch() { + curl -L "https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver/llvm-project-$pkgver.src.tar.xz" -o $pkgname-$pkgver.tar.xz + tar -xf $pkgname-$pkgver.tar.xz + mv llvm-project-$pkgver.src $pkgname-$pkgver +} + +build() { + cd $pkgname-$pkgver + + PREFIX=/usr + + [ -z "$FOR_CROSS"] || PREFIX=$FOR_CROSS_DIR + + if [ ! -z "$WITH_CROSS"]; then + cmake_extra_flags=-DCMAKE_SYSROOT=$WITH_CROSS_DIR + fi + + mkdir -p build + cd build + cmake -G Ninja -Wno-dev \ + -DLLVM_ENABLE_RUNTIMES="libunwind" \ + -DLIBUNWIND_USE_COMPILER_RT=ON \ + -DLIBUNWIND_SUPPORTS_FNO_EXCEPTIONS_FLAG=1 \ + -DLIBCXXABI_USE_LLVM_UNWINDER=YES \ + -DLIBCXX_HAS_MUSL_LIBC=ON \ + -DCMAKE_ASM_COMPILER=clang \ + -DCMAKE_C_COMPILER=clang \ + -DCMAKE_CXX_COMPILER=clang++ \ + -DCMAKE_ASM_COMPILER_TARGET=$ARCH-linux-musl \ + -DCMAKE_C_COMPILER_TARGET=$ARCH-linux-musl \ + -DCMAKE_CXX_COMPILER_TARGET=$ARCH-linux-musl \ + -DCMAKE_C_FLAGS="$CFLAGS" \ + -DCMAKE_CXX_FLAGS="$CXXFLAGS" \ + -DCMAKE_ASM_FLAGS="$CFLAGS" \ + -DCMAKE_SHARED_LINKER_FLAGS="$LDFLAGS -unwindlib=none" \ + $cmake_extra_flags \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_C_COMPILER_WORKS=1 \ + -DCMAKE_CXX_COMPILER_WORKS=1 \ + -DCMAKE_SKIP_BUILD_RPATH=0 \ + -DCMAKE_BUILD_WITH_INSTALL_RPATH=1 \ + -DCMAKE_INSTALL_RPATH='${ORIGIN}/../lib' \ + ../runtimes + + samu -j$JOBS +} + +package() { + cd $pkgname-$pkgver + cd build + DESTDIR=$pkgdir samu install +} + +backup() { + return +} + +package_dev() { + echo "No... Shut" +} + +license() { + cd $pkgname-$pkgver + cat */LICENSE.TXT +} From b6dc8fca2604b0f4fbfb513c04a851a90a344383 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Sat, 9 Apr 2022 15:39:19 +0000 Subject: [PATCH 049/151] add libcxx --- base/libcxx/build.sh | 62 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 base/libcxx/build.sh diff --git a/base/libcxx/build.sh b/base/libcxx/build.sh new file mode 100644 index 0000000..4243e2e --- /dev/null +++ b/base/libcxx/build.sh @@ -0,0 +1,62 @@ +pkgver=14.0.0 +pkgname=libcxx +bad="" +ext="dev" + +fetch() { + curl -L "https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver/llvm-project-$pkgver.src.tar.xz" -o $pkgname-$pkgver.tar.xz + tar -xf $pkgname-$pkgver.tar.xz + mv llvm-project-$pkgver.src $pkgname-$pkgver +} + +build() { + cd $pkgname-$pkgver + PREFIX=/usr + [ -z "$FOR_CROSS" ] || PREFIX=$FOR_CROSS_DIR + [ -z "$WITH_CROSS" ] || cmake_extra_flags=-DCMAKE_SYSROOT=$WITH_CROSS_DIR + + mkdir -p build + cd build + cmake -G Ninja -Wno-dev \ + -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi" \ + -DLIBCXX_ENABLE_FILESYSTEM=ON \ + -DLIBCXX_USE_COMPILER_RT=ON \ + -DLIBCXX_HAS_MUSL_LIBC=ON \ + -DLIBCXXABI_USE_COMPILER_RT=ON \ + -DLIBCXXABI_USE_LLVM_UNWINDER=ON \ + -DLIBCXX_ENABLE_STATIC=OFF \ + -DCMAKE_C_COMPILER=clang \ + -DCMAKE_CXX_COMPILER=clang++ \ + -DCMAKE_C_COMPILER_TARGET=$ARCH-linux-musl \ + -DCMAKE_CXX_COMPILER_TARGET=$ARCH-linux-musl \ + -DCMAKE_C_FLAGS="$CFLAGS" \ + -DCMAKE_CXX_FLAGS="$CXXFLAGS" \ + $cmake_extra_flags \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_CXX_COMPILER_WORKS=1 \ + -DCMAKE_SKIP_BUILD_RPATH=0 \ + -DCMAKE_BUILD_WITH_INSTALL_RPATH=1 \ + -DCMAKE_INSTALL_RPATH='${ORIGIN}/../lib' \ + ../runtimes + + samu -j$JOBS +} + +package() { + cd $pkgname-$pkgver + cd build + DESTDIR=$pkgdir samu install +} + +backup() { + return +} + +package_dev() { + echo "No... Shut" +} + +license() { + cd $pkgname-$pkgver + cat */LICENSE.TXT +} From be930b1161671b79848f7bbd2276b9babccd1efb Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Sat, 9 Apr 2022 16:07:21 +0000 Subject: [PATCH 050/151] switch ld.so and libc.so --- linux/musl/build.sh | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/linux/musl/build.sh b/linux/musl/build.sh index 162015a..74a7619 100644 --- a/linux/musl/build.sh +++ b/linux/musl/build.sh @@ -12,15 +12,17 @@ fetch() { cd $pkgname-$pkgver } + +if [ -z "$FOR_CROSS" ]; then + PREFIX=/usr +else + PREFIX=$FOR_CROSS_DIR +fi + + build() { cd $pkgname-$pkgver - if [ -z "$FOR_CROSS" ]; then - PREFIX=/usr - else - PREFIX=$FOR_CROSS_DIR - fi - CC=$(pwd)/../$ARCH-linux-musl-cc ./configure \ --prefix=$PREFIX \ @@ -32,6 +34,9 @@ build() { package() { cd $pkgname-$pkgver bad --gmake gmake DESTDIR=$pkgdir install + rm $pkgdir/lib/ld-musl-$ARCH.so.1 + mv $pkgdir/$PREFIX/lib/libc.so $pkgdir/lib/ld-musl-$ARCH.so.1 + ln -sr $pkgdir/lib/ld-musl-$ARCH.so.1 $pkgdir/$PREFIX/lib/libc.so } backup() { From 6f81bab5c835a046381d9c1ec36401bde884cd8a Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Sat, 9 Apr 2022 16:14:40 +0000 Subject: [PATCH 051/151] mksh: do not use https --- base/mksh/build.sh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/base/mksh/build.sh b/base/mksh/build.sh index 96e180e..6c7f7f1 100644 --- a/base/mksh/build.sh +++ b/base/mksh/build.sh @@ -5,7 +5,7 @@ bad="" ext="doc" fetch() { - curl https://www.mirbsd.org/MirOS/dist/mir/mksh/mksh-R59c.tgz -o $pkgname-$pkgver.tar.gz + curl http://www.mirbsd.org/MirOS/dist/mir/mksh/mksh-R59c.tgz -o $pkgname-$pkgver.tar.gz tar -xf $pkgname-$pkgver.tar.gz } @@ -24,11 +24,8 @@ package() { ln -sr $pkgdir/bin/lksh $pkgdir/bin/sh } -package_doc() { - cd $pkgname - install -d $pkgdir/usr/share/man/man1 - install -Dm 644 ./mksh.1 $pkgdir/usr/share/man/man1 - install -Dm 644 ./lksh.1 $pkgdir/usr/share/man/man1 +backup() { + return } license() { From 1691d142601db211a6e45d33f4544675b82aa91c Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Sat, 9 Apr 2022 17:47:09 +0000 Subject: [PATCH 052/151] busybox: fix build --- linux/busybox/build.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/linux/busybox/build.sh b/linux/busybox/build.sh index f7427e4..2ac3483 100644 --- a/linux/busybox/build.sh +++ b/linux/busybox/build.sh @@ -9,15 +9,15 @@ fetch() { tar -xf $pkgname-$pkgver.tar.gz cd $pkgname-$pkgver patch -p1 < ../../clang-fix.patch - patch -p1 < ../../modprobe.patch + # patch -p1 < ../../modprobe.patch # cp ../man.sh . } build() { cd $pkgname-$pkgver - gmake HOSTCC=cc CC=cc defconfig - gmake HOSTCC=cc CC=cc - gmake HOSTCC=cc CC=cc install + bad --gmake gmake HOSTCC=cc CC=cc CFLAGS=-O0 defconfig + bad --gmake gmake HOSTCC=cc CC=cc CFLAGS=-O0 + bad --gmake gmake HOSTCC=cc CC=cc CFLAGS=-O0 install } package() { @@ -30,7 +30,7 @@ package() { # install -Dm755 ../man.sh $pkgdir/etc/profile.d install -Dm755 ./examples/udhcp/simple.script $pkgdir/usr/share/udhcpc/default.script - + rm $pkgdir/linuxrc rm $pkgdir/bin/ln rm $pkgdir/bin/uname @@ -195,6 +195,10 @@ package() { rm $pkgdir/usr/bin/man } +backup() { + return +} + license() { cd $pkgname-$pkgver cat LICENSE From 52e479ee9a1b64c9041334dc3736c4a6321ae560 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Wed, 13 Apr 2022 12:38:24 +0000 Subject: [PATCH 053/151] limine: hackup the build system to get it to build again --- linux/limine/build.sh | 48 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 43 insertions(+), 5 deletions(-) diff --git a/linux/limine/build.sh b/linux/limine/build.sh index 753f021..0aaaa0f 100644 --- a/linux/limine/build.sh +++ b/linux/limine/build.sh @@ -1,22 +1,56 @@ pkgname=limine -pkgver=2.55 +pkgver=3.0.3 mkdeps="nasm:llvm" fetch() { - curl -L "https://github.com/limine-bootloader/limine/releases/download/v$pkgver/limine-v$pkgver.tar.xz" -o $pkgname-$pkgver.tar.xz + curl -L "https://github.com/limine-bootloader/limine/releases/download/v$pkgver/limine-$pkgver.tar.xz" -o $pkgname-$pkgver.tar.xz tar -xf $pkgname-$pkgver.tar.xz - mv $pkgname-v$pkgver $pkgname-$pkgver } build() { cd $pkgname-$pkgver - gmake limine-bios bin/limine-install CC="clang" TOOLCHAIN="llvm" TOOLCHAIN_CC="clang" TOOLCHAIN_LD="ld.lld" -j1 + # Limine's configure script rejects LLVM binutils because + # objcopy can't build EFI. We only want bios though. + sed \ + -e "s|@SRCDIR@|$(pwd)|g" \ + -e "s|@BUILDDIR@|$(pwd)|g" \ + -e "s|@PATH@|/usr/bad/gmake/bin:$PATH|" \ + -e 's|@prefix@|/usr|' \ + -e "s|@abs_builddir@|$(pwd)|" \ + -e "s|@abs_srcdir@|$(pwd)|" \ + -e 's|@CC@|cc|' \ + -e 's|@LIMINE_CC@|cc|' \ + -e 's|@LIMINE_CFLAGS@|-O3 -pipe -Wall -Wextra|' \ + -e 's|@LIMINE_LD@|ld|' \ + -e 's|@LIMINE_LDFLAGS@||' \ + -e 's|@LDFLAGS@||' \ + -e 's|@LIMINE_OBJCOPY@|objcopy|' \ + -e 's|@LIMINE_OBJDUMP@|objdump|' \ + -e 's|@LIMINE_READELF@|readelf|' \ + -e 's|@SED@|sed|' \ + -e 's|@HOST_CC@|cc|' \ + -e 's|@AWK@|awk|' \ + -e 's|@GREP@|grep|' \ + -e 's|@werror@||' \ + -e 's|@INSTALL@|install|' \ + -e 's|@CFLAGS@|-O3 -pipe -Wall -Wextra|' \ + -e "s|@limine_version@|$pkgver|" \ + -e 's|@LIMINE_AR@|ar|' \ + -e 's|@LIMINE_AS@|clang|' \ + -e 's|@WERROR@||' \ + GNUmakefile.in > GNUmakefile + + sed -e "s|@PACKAGE_VERSION@|$pkgver|" \ + -e "s|@LIMINE_COPYRIGHT@|$(grep Copyright LICENSE.md)|" \ + config.h.in > config.h + + bad --gmake gmake limine-bios limine-deploy CC="clang" TOOLCHAIN="llvm" TOOLCHAIN_CC="clang" TOOLCHAIN_LD="ld.lld" -j1 } package() { cd $pkgname-$pkgver mkdir -p $pkgdir/usr/sbin/ - install -m 755 ./bin/limine-install $pkgdir/usr/sbin/ + install -m 755 ./bin/limine-deploy $pkgdir/usr/sbin/ mkdir -p $pkgdir/usr/share/limine/ install -m 644 ./bin/limine-cd.bin $pkgdir/usr/share/limine/ install -m 644 ./bin/limine-hdd.bin $pkgdir/usr/share/limine/ @@ -28,3 +62,7 @@ license() { cd $pkgname-$pkgver cat LICENSE.md } + +backup() { + return +} From 8581fbddc2be36afff367de08bbac01e3f01476f Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Mon, 18 Apr 2022 19:50:51 +0000 Subject: [PATCH 054/151] bad: add backup --- bad/bad/build.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bad/bad/build.sh b/bad/bad/build.sh index add79d4..7a64565 100644 --- a/bad/bad/build.sh +++ b/bad/bad/build.sh @@ -8,6 +8,7 @@ fetch() { build() { cd $pkgname-$pkgver + [ -z "$WITH_CROSS" ] || export CFLAGS="$CFLAGS --target=$TRIPLE --sysroot=$WITH_CROSS_DIR" make } @@ -21,3 +22,7 @@ license() { cat LICENSE # cat COPYING } + +backup() { + return +} From 1ae568f6a783a13cc9955187fab91cdeb1b5ee7b Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Mon, 18 Apr 2022 20:11:05 +0000 Subject: [PATCH 055/151] add compiler-rt --- base/compiler-rt/build.sh | 71 +++++++++++++++++++++++++++++++++++++++ base/libcxx/build.sh | 2 +- 2 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 base/compiler-rt/build.sh diff --git a/base/compiler-rt/build.sh b/base/compiler-rt/build.sh new file mode 100644 index 0000000..e0299eb --- /dev/null +++ b/base/compiler-rt/build.sh @@ -0,0 +1,71 @@ +pkgname=compiler-rt +pkgver=14.0.1 +deps=linux + +fetch() { + curl -L "https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver/compiler-rt-$pkgver.src.tar.xz" -o $pkgname-$pkgver.tar.xz + # for c++ headers + # curl -L "https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver/libcxx-$pkgver.src.tar.xz" -o libcxx-$pkgver.tar.xz + # musl required for C headers + curl -O "http://musl.libc.org/releases/musl-1.2.2.tar.gz" + tar -xf $pkgname-$pkgver.tar.xz + mv $pkgname-$pkgver.src $pkgname-$pkgver + # tar -xf libcxx-$pkgver.tar.xz + # mv libcxx-$pkgver.src libcxx-$pkgver + # cp ../__config_site libcxx-$pkgver/include + mkdir $pkgname-$pkgver/build + tar -xf musl-1.2.2.tar.gz + cd musl-1.2.2 + CFLAGS="--sysroot=/usr/$ARCH-linux-musl --target=$TRIPLE" ./configure --prefix=$(pwd)/../libc --target=$TRIPLE + bad --gmake gmake install-headers +} + + +build() { + cd $pkgname-$pkgver + cd build + cmake -G Ninja ../ \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr/lib/clang/$pkgver/ \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_C_COMPILER_TARGET=$TRIPLE \ + -DCMAKE_CXX_COMPILER_TARGET=$TRIPLE \ + -DCMAKE_ASM_COMPILER_TARGET=$TRIPLE \ + -DCMAKE_C_COMPILER_WORKS=ON \ + -DCMAKE_CXX_COMPILER_WORKS=ON \ + -DCMAKE_SYSROOT=/usr/$ARCH-linux-musl \ + -DCMAKE_C_FLAGS_INIT="-I $(pwd)/../../libc/include " \ + -DCMAKE_C_FLAGS="-I $(pwd)/../../libc/include" \ + -DCMAKE_CXX_FLAGS_INIT="-I $(pwd)/../../libc/include" \ + -DCMAKE_CXX_FLAGS="-I $(pwd)/../../libc/include" \ + -DCOMPILER_RT_USE_BUILTINS_LIBRARY=OFF \ + -DCOMPILER_RT_DEFAULT_TARGET_ONLY=OFF \ + -DCOMPILER_RT_INCLUDE_TESTS=OFF \ + -DCOMPILER_RT_BUILD_SANITIZERS=OFF \ + -DCOMPILER_RT_BUILD_XRAY=OFF \ + -DCOMPILER_RT_BUILD_MEMPROF=OFF \ + -DCOMPILER_RT_BUILD_ORC=OFF \ + -DCOMPILER_RT_INCLUDE_TESTS=OFF \ + -DCOMPILER_RT_BUILD_LIBFUZZER=OFF \ + -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON \ + -DCOMPILER_RT_BUILD_PROFILE=OFF \ + -DCAN_TARGET_$ARCH=ON \ + -DCMAKE_SIZEOF_VOID_P=8 + + samu +} + +package() { + cd $pkgname-$pkgver + cd build + DESTDIR=$pkgdir samu install +} + +backup() { + return +} + +license() { + cd $pkgname-$pkgver + cat LICENSE.TXT +} diff --git a/base/libcxx/build.sh b/base/libcxx/build.sh index 4243e2e..3c0356d 100644 --- a/base/libcxx/build.sh +++ b/base/libcxx/build.sh @@ -1,4 +1,4 @@ -pkgver=14.0.0 +pkgver=14.0.1 pkgname=libcxx bad="" ext="dev" From ceebfddd3435895786c759c21765ef3b17e7225c Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Mon, 18 Apr 2022 20:18:22 +0000 Subject: [PATCH 056/151] add oslo --- base/oslo/build.sh | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 base/oslo/build.sh diff --git a/base/oslo/build.sh b/base/oslo/build.sh new file mode 100644 index 0000000..947c8f9 --- /dev/null +++ b/base/oslo/build.sh @@ -0,0 +1,39 @@ +pkgname=oslo +pkgver=main + +fetch() { + curl -L "https://github.com/iglunix/oslo/archive/refs/heads/main.tar.gz" -o $pkgname-$pkgver.tar.gz + tar -xf $pkgname-$pkgver.tar.gz +} + +build() { + cd $pkgname-$pkgver + make ARCH=$ARCH +} + +case $ARCH in + aarch64) + _a=aa64 + ;; + x86_64) + _a=x64 + ;; + *) + exit 1 + ;; +esac + +package() { + cd $pkgname-$pkgver + install -Dm755 oslo.efi $pkgdir/boot/efi/boot/boot$_a.efi + install -Dm644 efi/oslo/entries.ini $pkgdir/boot/efi/oslo/entries.ini +} + +license() { + cd $pkgname-$pkgver + cat license.txt +} + +backup() { + echo boot/efi/oslo/entries.ini +} From f81107394c7200ddbb3f4db4d240b842635ca3d4 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Mon, 18 Apr 2022 20:40:04 +0000 Subject: [PATCH 057/151] linux: bump ver --- linux/linux/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux/linux/build.sh b/linux/linux/build.sh index efc6d0f..73f269b 100644 --- a/linux/linux/build.sh +++ b/linux/linux/build.sh @@ -1,4 +1,4 @@ -pkgver=5.17.2 +pkgver=5.17.3 pkgname=linux pkgrel=1 ext="dev" From 93ee7edfa3cfd5d96e9361a30f222ef39dd04c50 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Mon, 18 Apr 2022 20:45:56 +0000 Subject: [PATCH 058/151] byacc: update and fix build --- base/byacc/build.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/base/byacc/build.sh b/base/byacc/build.sh index a127bad..760622e 100644 --- a/base/byacc/build.sh +++ b/base/byacc/build.sh @@ -1,12 +1,13 @@ -pkgver=20210808 +pkgver=20220128 pkgname=byacc -deps="" +deps="musl" mkdeps="bmake" bad="" +auto_cross fetch() { - curl https://invisible-island.net/datafiles/release/byacc.tar.gz -o $pkgname-$pkgver.tar.gz - tar -xf $pkgname-$pkgver.tar.gz + curl "ftp://ftp.invisible-island.net/byacc/byacc-$pkgver.tgz" -O + tar -xf $pkgname-$pkgver.tgz # Merged upstream; Don't need # cp ../reader-mesa.patch . } @@ -16,7 +17,9 @@ build() { ./configure \ --prefix=/usr \ --program-prefix=b \ - --enable-btyacc + --enable-btyacc \ + --build=$HOST_TRIPLE \ + --host=$TRIPLE # patch -p1 < ../reader-mesa.patch make } From 51876993148950a09f8d06b61e595760d28686c6 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Mon, 18 Apr 2022 21:23:05 +0000 Subject: [PATCH 059/151] libelf: libelf --- base/libelf/build.sh | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 base/libelf/build.sh diff --git a/base/libelf/build.sh b/base/libelf/build.sh new file mode 100644 index 0000000..fbd21de --- /dev/null +++ b/base/libelf/build.sh @@ -0,0 +1,40 @@ +pkgname=libelf +pkgver=0.186 + +fetch() { + curl -LO "https://sourceware.org/elfutils/ftp/$pkgver/elfutils-$pkgver.tar.bz2" + tar -xf elfutils-$pkgver.tar.bz2 + cd elfutils-$pkgver + patch -p1 < ../../musl.patch +} + +build() { + cd elfutils-$pkgver + export CFLAGS="$(CFLAGS) -Wno-error" + ./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --build=$TRIPLE \ + --host=$TRIPLE \ + --disable-symbol-versioning \ + --disable-debuginfod \ + --disable-libdebuginfod \ + --disable-nls \ + ac_cv_c99=yes + + bad --gmake gmake -C lib + bad --gmake gmake -C libelf +} + +package() { + cd elfutils-$pkgver + bad --gmake gmake -C libelf install DESTDIR=$pkgdir +} + +backup() { + return +} + +license() { + return +} From 76bef47f895420458a7c340cc71c58d12d946322 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Tue, 19 Apr 2022 10:58:25 +0000 Subject: [PATCH 060/151] remove patch --- linux/busybox/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux/busybox/build.sh b/linux/busybox/build.sh index 2ac3483..580ce05 100644 --- a/linux/busybox/build.sh +++ b/linux/busybox/build.sh @@ -8,7 +8,7 @@ fetch() { curl "https://busybox.net/downloads/busybox-$pkgver.tar.bz2" -o $pkgname-$pkgver.tar.gz tar -xf $pkgname-$pkgver.tar.gz cd $pkgname-$pkgver - patch -p1 < ../../clang-fix.patch + # patch -p1 < ../../clang-fix.patch # patch -p1 < ../../modprobe.patch # cp ../man.sh . } From b4e372d71328c08ab11d82f907433700a418c690 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Tue, 19 Apr 2022 18:49:00 +0000 Subject: [PATCH 061/151] libcxx: disable libatomic --- base/libcxx/build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/base/libcxx/build.sh b/base/libcxx/build.sh index 3c0356d..c3ca720 100644 --- a/base/libcxx/build.sh +++ b/base/libcxx/build.sh @@ -25,6 +25,7 @@ build() { -DLIBCXXABI_USE_COMPILER_RT=ON \ -DLIBCXXABI_USE_LLVM_UNWINDER=ON \ -DLIBCXX_ENABLE_STATIC=OFF \ + -DLIBCXX_HAS_ATOMIC_LIB=OFF \ -DCMAKE_C_COMPILER=clang \ -DCMAKE_CXX_COMPILER=clang++ \ -DCMAKE_C_COMPILER_TARGET=$ARCH-linux-musl \ From a70c3b89a53327ff53b3ac71bc39e2e0ca54cd1d Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Tue, 19 Apr 2022 18:54:15 +0000 Subject: [PATCH 062/151] libcxx: use CC and CXX --- base/libcxx/build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/base/libcxx/build.sh b/base/libcxx/build.sh index c3ca720..31a577f 100644 --- a/base/libcxx/build.sh +++ b/base/libcxx/build.sh @@ -26,8 +26,8 @@ build() { -DLIBCXXABI_USE_LLVM_UNWINDER=ON \ -DLIBCXX_ENABLE_STATIC=OFF \ -DLIBCXX_HAS_ATOMIC_LIB=OFF \ - -DCMAKE_C_COMPILER=clang \ - -DCMAKE_CXX_COMPILER=clang++ \ + -DCMAKE_C_COMPILER=$CC \ + -DCMAKE_CXX_COMPILER=$CXX \ -DCMAKE_C_COMPILER_TARGET=$ARCH-linux-musl \ -DCMAKE_CXX_COMPILER_TARGET=$ARCH-linux-musl \ -DCMAKE_C_FLAGS="$CFLAGS" \ From c195af991693c3c3d64112805ca1f2b630077a1e Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Tue, 19 Apr 2022 18:55:50 +0000 Subject: [PATCH 063/151] libunwind: use CXX and CC --- base/libunwind/build.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/base/libunwind/build.sh b/base/libunwind/build.sh index adc4846..bbb26be 100644 --- a/base/libunwind/build.sh +++ b/base/libunwind/build.sh @@ -1,4 +1,4 @@ -pkgver=14.0.0 +pkgver=14.0.1 pkgname=libunwind bad="" ext="dev" @@ -14,9 +14,9 @@ build() { PREFIX=/usr - [ -z "$FOR_CROSS"] || PREFIX=$FOR_CROSS_DIR + [ -z "$FOR_CROSS" ] || PREFIX=$FOR_CROSS_DIR - if [ ! -z "$WITH_CROSS"]; then + if [ ! -z "$WITH_CROSS" ]; then cmake_extra_flags=-DCMAKE_SYSROOT=$WITH_CROSS_DIR fi @@ -28,9 +28,9 @@ build() { -DLIBUNWIND_SUPPORTS_FNO_EXCEPTIONS_FLAG=1 \ -DLIBCXXABI_USE_LLVM_UNWINDER=YES \ -DLIBCXX_HAS_MUSL_LIBC=ON \ - -DCMAKE_ASM_COMPILER=clang \ - -DCMAKE_C_COMPILER=clang \ - -DCMAKE_CXX_COMPILER=clang++ \ + -DCMAKE_ASM_COMPILER=$CC \ + -DCMAKE_C_COMPILER=$CC \ + -DCMAKE_CXX_COMPILER=$CXX \ -DCMAKE_ASM_COMPILER_TARGET=$ARCH-linux-musl \ -DCMAKE_C_COMPILER_TARGET=$ARCH-linux-musl \ -DCMAKE_CXX_COMPILER_TARGET=$ARCH-linux-musl \ From d343ecf55cc5d9ef469c3b0a703a207bedf25e9e Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Tue, 19 Apr 2022 20:38:57 +0000 Subject: [PATCH 064/151] busybox: fix build --- linux/busybox/build.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/linux/busybox/build.sh b/linux/busybox/build.sh index 580ce05..f07c321 100644 --- a/linux/busybox/build.sh +++ b/linux/busybox/build.sh @@ -15,9 +15,9 @@ fetch() { build() { cd $pkgname-$pkgver - bad --gmake gmake HOSTCC=cc CC=cc CFLAGS=-O0 defconfig - bad --gmake gmake HOSTCC=cc CC=cc CFLAGS=-O0 - bad --gmake gmake HOSTCC=cc CC=cc CFLAGS=-O0 install + bad --gmake gmake HOSTCC=$CC CC=$CC CFLAGS=-O0 defconfig + bad --gmake gmake HOSTCC=$CC CC=$CC CFLAGS=-O0 + bad --gmake gmake HOSTCC=$CC CC=$CC CFLAGS=-O0 install } package() { From f48f0524a34b733225e7b627abdbf1fc7092738a Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Tue, 19 Apr 2022 20:39:53 +0000 Subject: [PATCH 065/151] busybox: fix build try 2 --- linux/busybox/build.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/linux/busybox/build.sh b/linux/busybox/build.sh index f07c321..c612d0f 100644 --- a/linux/busybox/build.sh +++ b/linux/busybox/build.sh @@ -15,9 +15,9 @@ fetch() { build() { cd $pkgname-$pkgver - bad --gmake gmake HOSTCC=$CC CC=$CC CFLAGS=-O0 defconfig - bad --gmake gmake HOSTCC=$CC CC=$CC CFLAGS=-O0 - bad --gmake gmake HOSTCC=$CC CC=$CC CFLAGS=-O0 install + bad --gmake gmake HOSTCC=cc CC=$CC CFLAGS=-O0 defconfig + bad --gmake gmake HOSTCC=cc CC=$CC CFLAGS=-O0 + bad --gmake gmake HOSTCC=cc CC=$CC CFLAGS=-O0 install } package() { From bd66ced11064ee43e64a45bf923939f5e877b57d Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Tue, 19 Apr 2022 20:52:29 +0000 Subject: [PATCH 066/151] llvm: update --- base/llvm/build.sh | 177 ++++++++++++++++++++++++++------------------- 1 file changed, 101 insertions(+), 76 deletions(-) diff --git a/base/llvm/build.sh b/base/llvm/build.sh index 2339e8d..af6d13d 100644 --- a/base/llvm/build.sh +++ b/base/llvm/build.sh @@ -1,4 +1,4 @@ -pkgver=13.0.1 +pkgver=14.0.1 pkgname=llvm bad="" ext="dev" @@ -7,87 +7,112 @@ fetch() { curl -L "https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver/llvm-project-$pkgver.src.tar.xz" -o $pkgname-$pkgver.tar.gz tar -xf $pkgname-$pkgver.tar.gz mv llvm-project-$pkgver.src $pkgname-$pkgver + + cd $pkgname-$pkgver + patch -p1 < ../../riscv-relax.patch } build() { cd $pkgname-$pkgver + + if [ ! -z "$WITH_CROSS" ]; then + EXTRA_ARGS="-DCMAKE_SYSROOT=/usr/$ARCH-linux-musl \ + -DCMAKE_C_COMPILER_WORKS=ON \ + -DCMAKE_CXX_COMPILER_WORKS=ON \ + -DCMAKE_SYSTEM_NAME=Linux \ + -DLLVM_TABLEGEN=$(pwd)/host-build/bin/llvm-tblgen \ + -DCLANG_TABLEGEN=$(pwd)/host-build/bin/clang-tblgen" + mkdir -p host-build + cd host-build + cmake -G Ninja -Wno-dev \ + -DLLVM_ENABLE_PROJECTS='clang' \ + ../llvm + + samu llvm-tblgen clang-tblgen + + cd .. + fi + mkdir -p build cd build - cmake -G Ninja -Wno-dev \ - -DCMAKE_C_COMPILER_TARGET=$TRIPLE \ - -DCMAKE_CXX_COMPILER_TARGET=$TRIPLE \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_BUILD_TYPE=Release \ - -DLLVM_VERSION_SUFFIX="" \ - -DLLVM_APPEND_VC_REV=OFF \ - -DLLVM_ENABLE_PROJECTS="libunwind;libcxxabi;libcxx;compiler-rt;llvm;lld;clang;clang-tools-extra;lldb" \ - -DLLVM_ENABLE_LLD=ON \ - -DLLVM_TARGETS_TO_BUILD="all" \ - -DLLVM_INSTALL_BINUTILS_SYMLINKS=ON \ - -DLLVM_INSTALL_CCTOOLS_SYMLINKS=ON \ - -DLLVM_INCLUDE_EXAMPLES=OFF \ - -DLLVM_ENABLE_PIC=ON \ - -DLLVM_ENABLE_LTO=OFF \ - -DLLVM_INCLUDE_GO_TESTS=OFF \ - -DLLVM_INCLUDE_TESTS=OFF \ - -DLLVM_HOST_TRIPLE=$TRIPLE \ - -DLLVM_DEFAULT_TARGET_TRIPLE=$TRIPLE \ - -DLLVM_ENABLE_LIBXML2=OFF \ - -DLLVM_ENABLE_ZLIB=OFF\ - -DLLVM_BUILD_LLVM_DYLIB=ON \ - -DLLVM_LINK_LLVM_DYLIB=ON \ - -DLLVM_OPTIMIZED_TABLEGEN=ON \ - -DLLVM_INCLUDE_BENCHMARKS=OFF \ - -DLLVM_INCLUDE_DOCS=ON \ - -DLLVM_TOOL_LLVM_ITANIUM_DEMANGLE_FUZZER_BUILD=OFF \ - -DLLVM_TOOL_LLVM_MC_ASSEMBLE_FUZZER_BUILD=OFF \ - -DLLVM_TOOL_LLVM_MC_DISASSEMBLE_FUZZER_BUILD=OFF \ - -DLLVM_TOOL_LLVM_OPT_FUZZER_BUILD=OFF \ - -DLLVM_TOOL_LLVM_MICROSOFT_DEMANGLE_FUZZER_BUILD=OFF \ - -DLLVM_TOOL_LLVM_GO_BUILD=OFF \ - -DLLVM_INSTALL_UTILS=ON \ - -DLLVM_ENABLE_LIBCXX=ON \ - -DLLVM_STATIC_LINK_CXX_STDLIB=ON \ - -DLLVM_ENABLE_LIBEDIT=OFF \ - -DLLVM_ENABLE_TERMINFO=OFF \ - -DLIBCXX_ENABLE_FILESYSTEM=ON \ - -DLIBCXX_USE_COMPILER_RT=ON \ - -DLIBCXX_HAS_MUSL_LIBC=ON \ - -DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=ON \ - -DLIBCXX_STATICALLY_LINK_ABI_IN_SHARED_LIBRARY=ON \ - -DLIBCXX_STATICALLY_LINK_ABI_IN_STATIC_LIBRARY=ON \ - -DLIBCXX_INSTALL_LIBRARY=ON \ - -DLIBCXXABI_ENABLE_ASSERTIONS=ON \ - -DLIBCXXABI_USE_COMPILER_RT=ON \ - -DLIBCXXABI_USE_LLVM_UNWINDER=ON \ - -DLIBCXXABI_ENABLE_STATIC_UNWINDER=ON \ - -DLIBCXXABI_STATICALLY_LINK_UNWINDER_IN_SHARED_LIBRARY=YES \ - -DLIBCXXABI_ENABLE_SHARED=OFF \ - -DLIBCXXABI_ENABLE_STATIC=ON \ - -DLIBCXXABI_INSTALL_LIBRARY=ON \ - -DLIBUNWIND_ENABLE_SHARED=ON \ - -DLIBUNWIND_ENABLE_STATIC=ON \ - -DLIBUNWIND_INSTALL_LIBRARY=ON \ - -DLIBUNWIND_USE_COMPILER_RT=ON \ - -DCLANG_DEFAULT_LINKER=lld \ - -DCLANG_DEFAULT_CXX_STDLIB='libc++' \ - -DCLANG_DEFAULT_RTLIB=compiler-rt \ - -DCLANG_DEFAULT_UNWINDLIB=libunwind \ - -DCLANG_VENDOR="Iglunix" \ - -DCLANG_ENABLE_STATIC_ANALYZER=OFF \ - -DCLANG_ENABLE_ARCMT=OFF \ - -DCLANG_LINK_CLANG_DYLIB=OFF \ - -DCOMPILER_RT_USE_BUILTINS_LIBRARY=OFF \ - -DCOMPILER_RT_DEFAULT_TARGET_ONLY=OFF \ - -DCOMPILER_RT_INCLUDE_TESTS=OFF \ - -DCOMPILER_RT_BUILD_SANITIZERS=OFF \ - -DCOMPILER_RT_BUILD_XRAY=OFF \ - -DCOMPILER_RT_BUILD_MEMPROF=OFF \ - -DCOMPILER_RT_INCLUDE_TESTS=OFF \ - -DCOMPILER_RT_BUILD_LIBFUZZER=OFF \ - -DENABLE_EXPERIMENTAL_NEW_PASS_MANAGER=TRUE \ - -DCAN_TARGET_i386=1 \ - ../llvm + cmake -G Ninja -Wno-dev \ + -DCMAKE_C_COMPILER_TARGET=$TRIPLE \ + -DCMAKE_CXX_COMPILER_TARGET=$TRIPLE \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_BUILD_TYPE=Release \ + -DLLVM_VERSION_SUFFIX="" \ + -DLLVM_APPEND_VC_REV=OFF \ + -DLLVM_ENABLE_PROJECTS="llvm;lld;clang;lldb;clang-tools-extra" \ + -DLLVM_ENABLE_LLD=ON \ + -DLLVM_TARGETS_TO_BUILD="all" \ + -DLLVM_INSTALL_BINUTILS_SYMLINKS=ON \ + -DLLVM_INSTALL_CCTOOLS_SYMLINKS=ON \ + -DLLVM_INCLUDE_EXAMPLES=OFF \ + -DLLVM_ENABLE_PIC=ON \ + -DLLVM_ENABLE_LTO=OFF \ + -DLLVM_INCLUDE_GO_TESTS=OFF \ + -DLLVM_INCLUDE_TESTS=OFF \ + -DLLVM_HOST_TRIPLE=$TRIPLE \ + -DLLVM_DEFAULT_TARGET_TRIPLE=$TRIPLE \ + -DLLVM_ENABLE_LIBXML2=OFF \ + -DLLVM_ENABLE_ZLIB=OFF\ + -DLLVM_BUILD_LLVM_DYLIB=ON \ + -DLLVM_LINK_LLVM_DYLIB=ON \ + -DLLVM_OPTIMIZED_TABLEGEN=ON \ + -DLLVM_INCLUDE_BENCHMARKS=OFF \ + -DLLVM_INCLUDE_DOCS=ON \ + -DLLVM_TOOL_LLVM_ITANIUM_DEMANGLE_FUZZER_BUILD=OFF \ + -DLLVM_TOOL_LLVM_MC_ASSEMBLE_FUZZER_BUILD=OFF \ + -DLLVM_TOOL_LLVM_MC_DISASSEMBLE_FUZZER_BUILD=OFF \ + -DLLVM_TOOL_LLVM_OPT_FUZZER_BUILD=OFF \ + -DLLVM_TOOL_LLVM_MICROSOFT_DEMANGLE_FUZZER_BUILD=OFF \ + -DLLVM_TOOL_LLVM_GO_BUILD=OFF \ + -DLLVM_INSTALL_UTILS=ON \ + -DLLVM_ENABLE_LIBCXX=ON \ + -DLLVM_STATIC_LINK_CXX_STDLIB=ON \ + -DLLVM_ENABLE_LIBEDIT=OFF \ + -DLLVM_ENABLE_TERMINFO=OFF \ + -DLIBCXX_ENABLE_FILESYSTEM=ON \ + -DLIBCXX_USE_COMPILER_RT=ON \ + -DLIBCXX_HAS_MUSL_LIBC=ON \ + -DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=ON \ + -DLIBCXX_STATICALLY_LINK_ABI_IN_SHARED_LIBRARY=ON \ + -DLIBCXX_STATICALLY_LINK_ABI_IN_STATIC_LIBRARY=ON \ + -DLIBCXX_INSTALL_LIBRARY=ON \ + -DLIBCXXABI_ENABLE_ASSERTIONS=ON \ + -DLIBCXXABI_USE_COMPILER_RT=ON \ + -DLIBCXXABI_USE_LLVM_UNWINDER=ON \ + -DLIBCXXABI_ENABLE_STATIC_UNWINDER=ON \ + -DLIBCXXABI_STATICALLY_LINK_UNWINDER_IN_SHARED_LIBRARY=YES \ + -DLIBCXXABI_ENABLE_SHARED=OFF \ + -DLIBCXXABI_ENABLE_STATIC=ON \ + -DLIBCXXABI_INSTALL_LIBRARY=ON \ + -DLIBUNWIND_ENABLE_SHARED=ON \ + -DLIBUNWIND_ENABLE_STATIC=ON \ + -DLIBUNWIND_INSTALL_LIBRARY=ON \ + -DLIBUNWIND_USE_COMPILER_RT=ON \ + -DCLANG_DEFAULT_LINKER=lld \ + -DCLANG_DEFAULT_CXX_STDLIB='libc++' \ + -DCLANG_DEFAULT_RTLIB=compiler-rt \ + -DCLANG_DEFAULT_UNWINDLIB=libunwind \ + -DCLANG_VENDOR="Iglunix" \ + -DCLANG_ENABLE_STATIC_ANALYZER=OFF \ + -DCLANG_ENABLE_ARCMT=OFF \ + -DCLANG_LINK_CLANG_DYLIB=OFF \ + -DCLANG_TOOLING_BUILD_AST_INTROSPECTION=OFF \ + -DCOMPILER_RT_USE_BUILTINS_LIBRARY=OFF \ + -DCOMPILER_RT_DEFAULT_TARGET_ONLY=OFF \ + -DCOMPILER_RT_INCLUDE_TESTS=OFF \ + -DCOMPILER_RT_BUILD_SANITIZERS=OFF \ + -DCOMPILER_RT_BUILD_XRAY=OFF \ + -DCOMPILER_RT_BUILD_MEMPROF=OFF \ + -DCOMPILER_RT_INCLUDE_TESTS=OFF \ + -DCOMPILER_RT_BUILD_LIBFUZZER=OFF \ + -DENABLE_EXPERIMENTAL_NEW_PASS_MANAGER=TRUE \ + $EXTRA_ARGS \ + -DHAVE_CXX_ATOMICS_WITHOUT_LIB=ON \ + -DHAVE_CXX_ATOMICS64_WITHOUT_LIB=ON \ + ../llvm samu -j$JOBS } From 069d504b0bcf2d4ea08b0764e38fca90043fae50 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Tue, 19 Apr 2022 21:06:06 +0000 Subject: [PATCH 067/151] llvm --- base/llvm/build.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/base/llvm/build.sh b/base/llvm/build.sh index af6d13d..00e0af0 100644 --- a/base/llvm/build.sh +++ b/base/llvm/build.sh @@ -16,12 +16,14 @@ build() { cd $pkgname-$pkgver if [ ! -z "$WITH_CROSS" ]; then - EXTRA_ARGS="-DCMAKE_SYSROOT=/usr/$ARCH-linux-musl \ + EXTRA_ARGS="-DCMAKE_SYSROOT=$WITH_CROSS_DIR \ -DCMAKE_C_COMPILER_WORKS=ON \ -DCMAKE_CXX_COMPILER_WORKS=ON \ -DCMAKE_SYSTEM_NAME=Linux \ -DLLVM_TABLEGEN=$(pwd)/host-build/bin/llvm-tblgen \ - -DCLANG_TABLEGEN=$(pwd)/host-build/bin/clang-tblgen" + -DCLANG_TABLEGEN=$(pwd)/host-build/bin/clang-tblgen \ + -DCMAKE_C_COMPILER=cc \ + -DCMAKE_CXX_COMPILER=c++" mkdir -p host-build cd host-build cmake -G Ninja -Wno-dev \ From 2af13914b92df4154d8c410fd62f4baa95cd8760 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Tue, 19 Apr 2022 21:12:19 +0000 Subject: [PATCH 068/151] llvm: use host cc --- base/llvm/build.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/base/llvm/build.sh b/base/llvm/build.sh index 00e0af0..9393888 100644 --- a/base/llvm/build.sh +++ b/base/llvm/build.sh @@ -21,13 +21,13 @@ build() { -DCMAKE_CXX_COMPILER_WORKS=ON \ -DCMAKE_SYSTEM_NAME=Linux \ -DLLVM_TABLEGEN=$(pwd)/host-build/bin/llvm-tblgen \ - -DCLANG_TABLEGEN=$(pwd)/host-build/bin/clang-tblgen \ - -DCMAKE_C_COMPILER=cc \ - -DCMAKE_CXX_COMPILER=c++" + -DCLANG_TABLEGEN=$(pwd)/host-build/bin/clang-tblgen" mkdir -p host-build cd host-build cmake -G Ninja -Wno-dev \ -DLLVM_ENABLE_PROJECTS='clang' \ + -DCMAKE_C_COMPILER=cc \ + -DCMAKE_CXX_COMPILER=c++ \ ../llvm samu llvm-tblgen clang-tblgen From b71e91c8b77e1314597212c9a530484ed087a4fc Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Wed, 20 Apr 2022 18:30:10 +0000 Subject: [PATCH 069/151] llvm: do not build extra stuff by default --- base/llvm/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/llvm/build.sh b/base/llvm/build.sh index 9393888..21d0cd9 100644 --- a/base/llvm/build.sh +++ b/base/llvm/build.sh @@ -44,7 +44,7 @@ build() { -DCMAKE_BUILD_TYPE=Release \ -DLLVM_VERSION_SUFFIX="" \ -DLLVM_APPEND_VC_REV=OFF \ - -DLLVM_ENABLE_PROJECTS="llvm;lld;clang;lldb;clang-tools-extra" \ + -DLLVM_ENABLE_PROJECTS="llvm;lld;clang" \ -DLLVM_ENABLE_LLD=ON \ -DLLVM_TARGETS_TO_BUILD="all" \ -DLLVM_INSTALL_BINUTILS_SYMLINKS=ON \ From 631b9634ed801bb25e222eb5280344dbc67f4456 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Wed, 20 Apr 2022 19:17:14 +0000 Subject: [PATCH 070/151] llvm: specify cc explicitly --- base/llvm/build.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/base/llvm/build.sh b/base/llvm/build.sh index 21d0cd9..c349a9a 100644 --- a/base/llvm/build.sh +++ b/base/llvm/build.sh @@ -40,6 +40,8 @@ build() { cmake -G Ninja -Wno-dev \ -DCMAKE_C_COMPILER_TARGET=$TRIPLE \ -DCMAKE_CXX_COMPILER_TARGET=$TRIPLE \ + -DCMAKE_C_COMPILER=$CC \ + -DCMAKE_CXX_COMPILER=$CXX \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_BUILD_TYPE=Release \ -DLLVM_VERSION_SUFFIX="" \ From 4fe1e5a8a716794b4a005c373d9e4f888e3243a3 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Thu, 21 Apr 2022 10:04:29 +0000 Subject: [PATCH 071/151] om4: fix cross builds --- base/om4/build.sh | 10 ++++++++-- base/om4/configure.patch | 21 +++++++++++++++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 base/om4/configure.patch diff --git a/base/om4/build.sh b/base/om4/build.sh index c034dc4..d7c01cc 100644 --- a/base/om4/build.sh +++ b/base/om4/build.sh @@ -4,18 +4,20 @@ pkgrel=1 deps="musl" bad="" ext="doc" +auto_cross fetch() { curl -L "https://github.com/ibara/m4/releases/download/om4-6.7/om4-6.7.tar.gz" -o $pkgname-$pkgver.tar.xz tar -xf $pkgname-$pkgver.tar.xz cd $pkgname-$pkgver patch -p1 < ../../m4-hand-written-lexer.patch + patch -p1 < ../../configure.patch } build() { cd $pkgname-$pkgver ./configure --prefix=/ - make + make -j1 } package() { @@ -26,7 +28,7 @@ package() { } package_doc() { - cd $pkgname-$pkgver + cd $pkgname-$pkgver install -d $pkgdir/usr/share/man/man1 install -Dm644 m4.1 $pkgdir/usr/share/man/man1 } @@ -35,3 +37,7 @@ license() { cd $pkgname-$pkgver echo "Source are a combination of BSD and ISC licensed files" } + +backup() { + return +} diff --git a/base/om4/configure.patch b/base/om4/configure.patch new file mode 100644 index 0000000..4c1dbac --- /dev/null +++ b/base/om4/configure.patch @@ -0,0 +1,21 @@ +--- a/configure ++++ b/configure +@@ -10,16 +10,8 @@ + EOF + $CC -o conftest conftest.c > /dev/null 2>&1 + if [ $? -eq 0 ] ; then ++ cc="$CC" ++ return 0 +- ./conftest +- if [ $? -eq 0 ] ; then +- rm -f conftest conftest.c +- cc="$CC" +- return 0 +- else +- echo "could not build working executables" +- echo "Please ensure your C compiler is a native compiler" +- exit 1 +- fi + else + rm -f conftest conftest.c + fi From 07764545d188c2e6f61bd93cef8074d1e9a18566 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Thu, 21 Apr 2022 10:08:54 +0000 Subject: [PATCH 072/151] gmake: fix cross --- bad/gmake/build.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/bad/gmake/build.sh b/bad/gmake/build.sh index dc0ebf0..eb9ab3c 100644 --- a/bad/gmake/build.sh +++ b/bad/gmake/build.sh @@ -4,6 +4,7 @@ pkgrel=1 deps="musl" bad="gmake" ext="doc:dev" +auto_cross fetch() { curl "https://ftp.gnu.org/gnu/make/make-$pkgver.tar.gz" -o $pkgname-$pkgver.tar.gz @@ -16,27 +17,29 @@ build() { ./configure \ --prefix=/usr/bad/gmake \ --program-prefix=g \ - --disable-nls + --disable-nls \ + --build=$HOST_TRIPLE \ + --host=$TRIPLE make } package() { cd $pkgname-$pkgver - ./make install DESTDIR=$pkgdir + make install DESTDIR=$pkgdir rm -r $pkgdir/usr/bad/gmake/share rm -r $pkgdir/usr/bad/gmake/include } package_doc() { cd $pkgname-$pkgver - ./make install DESDIR=$pkgdir + make install DESDIR=$pkgdir rm -r $pkgdir/usr/bad/gmake/bin rm -r $pkgdir/usr/bad/gmake/share/info rm -r $pkgdir/usr/bad/gmake/include } package_dev() { cd $pkgname-$pkgver - ./make install DESTDIR=$pkgdir + make install DESTDIR=$pkgdir rm -r $pkgdir/usr/bad/gmake/bin rm -r $pkgdir/usr/bad/gmake/share } @@ -45,3 +48,7 @@ license() { cd $pkgname-$pkgver cat COPYING } + +backup() { + return +} From 43bef18e618a79c8e85ebe5acfea2a27080f125c Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Thu, 21 Apr 2022 10:16:53 +0000 Subject: [PATCH 073/151] bmake: fix cross build --- base/bmake/build.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/base/bmake/build.sh b/base/bmake/build.sh index ead906d..0b393a5 100644 --- a/base/bmake/build.sh +++ b/base/bmake/build.sh @@ -1,7 +1,8 @@ -pkgver=20211024 +pkgver=20220303 pkgname=bmake mkdeps="" deps="" +auto_cross fetch() { curl http://www.crufty.net/ftp/pub/sjg/bmake-$pkgver.tar.gz -o $pkgname-$pkgver.tar.gz @@ -14,14 +15,16 @@ fetch() { build() { cd $pkgname-$pkgver - ./configure --prefix=/usr --with-default-sys-path=/usr/share/mk - sh ./make-bootstrap.sh + ./configure --prefix=/usr --with-default-sys-path=/usr/share/mk --build=$HOST_TRIPLE --host=$ARCH-linux-musl --with-machine-arch=$ARCH + MANTARGET=man sh ./make-bootstrap.sh } package() { cd $pkgname-$pkgver - ./bmake -m ./mk install DESTDIR=$pkgdir - ln -sr $pkgdir/usr/bin/bmake $pkgdir/usr/bin/make + bmake -m ./mk install -f Makefile DESTDIR=$pkgdir MANTARGET=man prefix=/usr/ BINDIR=/usr/bin + ln -s bmake $pkgdir/usr/bin/make + rm -rf $pkgdir/usr/share/man/cat1 + install -Dm644 ./bmake.1 $pkgdir/usr/share/man/man1 } backup() { From 7eac1789f7609016354e6f68eaf3b127749cd0ff Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Thu, 21 Apr 2022 10:20:28 +0000 Subject: [PATCH 074/151] byacc: fix build.sh --- base/byacc/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/byacc/build.sh b/base/byacc/build.sh index 760622e..fe75624 100644 --- a/base/byacc/build.sh +++ b/base/byacc/build.sh @@ -31,7 +31,7 @@ package() { } backup() { - + return } license() { From 990e9371b73b9af17d1fffd75b72de3833be0568 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Thu, 21 Apr 2022 10:27:25 +0000 Subject: [PATCH 075/151] openssl: fix cross --- base/openssl/build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/base/openssl/build.sh b/base/openssl/build.sh index 18af952..8c00dee 100644 --- a/base/openssl/build.sh +++ b/base/openssl/build.sh @@ -1,6 +1,7 @@ pkgname=openssl pkgver=3.0.0 ext="dev" +auto_cross fetch() { curl "https://www.openssl.org/source/openssl-$pkgver.tar.gz" -o $pkgname-$pkgver.tar.xz From 6826e06456d40da24a5462a21d909574b78c11fc Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Thu, 21 Apr 2022 10:28:54 +0000 Subject: [PATCH 076/151] openssl: do not use cc --- base/openssl/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/openssl/build.sh b/base/openssl/build.sh index 8c00dee..feafebc 100644 --- a/base/openssl/build.sh +++ b/base/openssl/build.sh @@ -22,7 +22,7 @@ build() { no-seed no-weak-ssl-ciphers \ -Wa,--noexecstack - make CC=cc + make } package() { From 3934e0209bc53d7e5e8c88b5646d8af04d32b6bb Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Thu, 21 Apr 2022 10:54:33 +0000 Subject: [PATCH 077/151] openssl: remove install_ssldir --- base/openssl/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/openssl/build.sh b/base/openssl/build.sh index feafebc..dc343cc 100644 --- a/base/openssl/build.sh +++ b/base/openssl/build.sh @@ -27,7 +27,7 @@ build() { package() { cd $pkgname-$pkgver - make install_sw install_ssldir DESTDIR=$pkgdir + make install_sw DESTDIR=$pkgdir install -d $pkgdir/usr/sbin install -Dm755 ../../update-ca.sh $pkgdir/usr/sbin/update-ca } From 4c80b29903162d3f0c9d6ecc5830ef0881ace2c7 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Thu, 21 Apr 2022 11:22:58 +0000 Subject: [PATCH 078/151] netbsd-curses: fix cross --- base/netbsd-curses/build.sh | 5 +++- base/netbsd-curses/cross.patch | 47 ++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 base/netbsd-curses/cross.patch diff --git a/base/netbsd-curses/build.sh b/base/netbsd-curses/build.sh index 731d479..49f5141 100644 --- a/base/netbsd-curses/build.sh +++ b/base/netbsd-curses/build.sh @@ -3,15 +3,18 @@ pkgname=netbsd-curses bad="gmake" deps="musl" ext="doc:dev" +auto_cross fetch() { curl -L "https://github.com/sabotage-linux/netbsd-curses/archive/master.tar.gz" -o $pkgname-$pkgver.tar.gz tar -xf $pkgname-$pkgver.tar.gz + cd $pkgname-$pkgver + patch -p1 < ../../cross.patch } build() { cd $pkgname-$pkgver - bad --gmake gmake PREFIX=/usr + bad --gmake gmake PREFIX=/usr CROSSCOMPILING=1 LDFLAGS_HOST= CFLAGS_HOST= } package() { diff --git a/base/netbsd-curses/cross.patch b/base/netbsd-curses/cross.patch new file mode 100644 index 0000000..895700a --- /dev/null +++ b/base/netbsd-curses/cross.patch @@ -0,0 +1,47 @@ +--- a/GNUmakefile ++++ b/GNUmakefile +@@ -477,7 +477,7 @@ + $(RANLIB) $@ + + $(TI_LIBSO): $(TI_LOBJS) +- $(CC) -shared -o $@ $^ -Wl,-soname=$(notdir $@) ++ $(CC) $(LDFLAGS) -shared -o $@ $^ -Wl,-soname=$(notdir $@) + + libterminfo/hash.c: libterminfo/genhash libterminfo/term.h + @echo "Generating terminfo hash" +@@ -514,7 +514,7 @@ + + $(CU_LIBSO): $(TI_LIBSO) + $(CU_LIBSO): $(CU_LOBJS) +- $(CC) -shared -o $@ $^ -Wl,-soname=$(notdir $@) ++ $(CC) $(LDFLAGS) -shared -o $@ $^ -Wl,-soname=$(notdir $@) + + libcurses/fileio.h: libcurses/shlib_version libcurses/genfileioh.awk + $(AWK) -f ./genfileioh.awk < ./shlib_version > ./fileio.h +@@ -526,7 +526,7 @@ + + $(PA_LIBSO): $(CU_LIBSO) + $(PA_LIBSO): $(PA_LOBJS) +- $(CC) -shared -o $@ $^ -Wl,-soname=$(notdir $@) ++ $(CC) $(LDFLAGS) -shared -o $@ $^ -Wl,-soname=$(notdir $@) + + $(ME_LIBA): $(ME_OBJS) + rm -f $@ +@@ -535,7 +535,7 @@ + + $(ME_LIBSO): $(CU_LIBSO) + $(ME_LIBSO): $(ME_LOBJS) +- $(CC) -shared -o $@ $^ -Wl,-soname=$(notdir $@) ++ $(CC) $(LDFLAGS) -shared -o $@ $^ -Wl,-soname=$(notdir $@) + + $(FO_LIBA): $(FO_OBJS) + rm -f $@ +@@ -544,7 +544,7 @@ + + $(FO_LIBSO): $(CU_LIBSO) + $(FO_LIBSO): $(FO_LOBJS) +- $(CC) -shared -o $@ $^ -Wl,-soname=$(notdir $@) ++ $(CC) $(LDFLAGS) -shared -o $@ $^ -Wl,-soname=$(notdir $@) + + # Allow terminfo descriptions to be compiled into libterminfo + ${TERMINFODIR}/terminfo.cdb: $(TOOL_TIC) ${TERMINFODIR}/terminfo From 3d8ff233dc344b182f082991a048d0d0edca71cb Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Thu, 21 Apr 2022 11:24:25 +0000 Subject: [PATCH 079/151] netbsd-curses: set HOSTCC --- base/netbsd-curses/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/netbsd-curses/build.sh b/base/netbsd-curses/build.sh index 49f5141..27f993b 100644 --- a/base/netbsd-curses/build.sh +++ b/base/netbsd-curses/build.sh @@ -14,7 +14,7 @@ fetch() { build() { cd $pkgname-$pkgver - bad --gmake gmake PREFIX=/usr CROSSCOMPILING=1 LDFLAGS_HOST= CFLAGS_HOST= + bad --gmake gmake PREFIX=/usr HOSTCC=cc CROSSCOMPILING=1 LDFLAGS_HOST= CFLAGS_HOST= } package() { From 27a0ae453b46541109044fe2056845d92e01451f Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Thu, 21 Apr 2022 13:48:06 +0000 Subject: [PATCH 080/151] musl: disable wrappers and link ldd --- linux/musl/build.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/linux/musl/build.sh b/linux/musl/build.sh index 74a7619..a2f5610 100644 --- a/linux/musl/build.sh +++ b/linux/musl/build.sh @@ -26,7 +26,8 @@ build() { CC=$(pwd)/../$ARCH-linux-musl-cc ./configure \ --prefix=$PREFIX \ - --target=$TRIPLE + --target=$TRIPLE \ + --disable-wrapper bad --gmake gmake } @@ -37,6 +38,7 @@ package() { rm $pkgdir/lib/ld-musl-$ARCH.so.1 mv $pkgdir/$PREFIX/lib/libc.so $pkgdir/lib/ld-musl-$ARCH.so.1 ln -sr $pkgdir/lib/ld-musl-$ARCH.so.1 $pkgdir/$PREFIX/lib/libc.so + ln -sr $pkgdir/lib/ld-musl-$ARCH.so.1 $pkgdir/$PREFIX/bin/ldd } backup() { From 3309ea4e258582d435a267ea2035ced5c76757f5 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Thu, 21 Apr 2022 13:52:12 +0000 Subject: [PATCH 081/151] musl: fix --- linux/musl/build.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linux/musl/build.sh b/linux/musl/build.sh index a2f5610..8c2fd72 100644 --- a/linux/musl/build.sh +++ b/linux/musl/build.sh @@ -38,7 +38,8 @@ package() { rm $pkgdir/lib/ld-musl-$ARCH.so.1 mv $pkgdir/$PREFIX/lib/libc.so $pkgdir/lib/ld-musl-$ARCH.so.1 ln -sr $pkgdir/lib/ld-musl-$ARCH.so.1 $pkgdir/$PREFIX/lib/libc.so - ln -sr $pkgdir/lib/ld-musl-$ARCH.so.1 $pkgdir/$PREFIX/bin/ldd + [ -z "$FOR_CROSS" ] && install -d $pkgdir/$PREFIX/bin + [ -z "$FOR_CROSS" ] && ln -sr $pkgdir/lib/ld-musl-$ARCH.so.1 $pkgdir/$PREFIX/bin/ldd } backup() { From 47841eb2da42611938bac6947828ddac2799514b Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Thu, 21 Apr 2022 16:03:46 +0000 Subject: [PATCH 082/151] expat: allow cross --- base/expat/build.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/base/expat/build.sh b/base/expat/build.sh index a9bde9a..ade1e38 100644 --- a/base/expat/build.sh +++ b/base/expat/build.sh @@ -4,6 +4,7 @@ bad="" mkdeps="bmake" deps="" ext="dev" +auto_cross fetch() { pkgver_r=$(echo $pkgver | tr '.' '_') @@ -14,7 +15,9 @@ fetch() { build() { cd $pkgname-$pkgver ./configure \ - --prefix=/usr + --prefix=/usr \ + --build=$HOST_TRIPLE \ + --host=$TRIPLE make } From aca5f9d64c5961a36796cc92274974125f5a50d5 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Thu, 21 Apr 2022 16:04:56 +0000 Subject: [PATCH 083/151] expat: fix build --- base/expat/build.sh | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/base/expat/build.sh b/base/expat/build.sh index ade1e38..4225483 100644 --- a/base/expat/build.sh +++ b/base/expat/build.sh @@ -24,23 +24,13 @@ build() { package() { cd $pkgname-$pkgver make install DESTDIR=$pkgdir - rm $pkgdir/usr/lib/*.a - rm $pkgdir/usr/lib/*.la - rm -r $pkgdir/usr/include - rm -r $pkgdir/usr/lib/pkgconfig - rm -r $pkgdir/usr/share -} - -package_dev() { - cd $pkgname-$pkgver - make install DESTDIR=$pkgdir - rm -r $pkgdir/usr/bin - rm -r $pkgdir/usr/share - rm $pkgdir/usr/lib/*.so - rm $pkgdir/usr/lib/*.so.* } license() { cd $pkgname-$pkgver cat COPYING } + +backup() { + return +} From ddc5fc6dff2c2ee4b8e18ca386440b23d4ed3846 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Thu, 21 Apr 2022 16:06:00 +0000 Subject: [PATCH 084/151] flex: fix cross --- base/flex/build.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/base/flex/build.sh b/base/flex/build.sh index c8eced7..d92c07d 100644 --- a/base/flex/build.sh +++ b/base/flex/build.sh @@ -1,5 +1,6 @@ pkgname=flex pkgver=2.6.4 +auto_cross fetch() { curl -L "https://github.com/westes/flex/releases/download/v2.6.4/flex-$pkgver.tar.gz" -o $pkgname-$pkgver.tar.gz @@ -10,7 +11,7 @@ build() { cd $pkgname-$pkgver ./configure \ --prefix=/usr \ - --build=$TRIPLE \ + --build=$HOST_TRIPLE \ --host=$TRIPLE make @@ -27,3 +28,7 @@ license() { cat LICENSE # cat COPYING } + +backup() { + return +} From 1e86166a8a3f9fcc3c479629f6d54d8fd5286344 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Thu, 21 Apr 2022 16:10:21 +0000 Subject: [PATCH 085/151] flex: disable bootstrap for cross builds --- base/flex/build.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/base/flex/build.sh b/base/flex/build.sh index d92c07d..21f118b 100644 --- a/base/flex/build.sh +++ b/base/flex/build.sh @@ -9,10 +9,13 @@ fetch() { build() { cd $pkgname-$pkgver + [ -z "$WITH_CROSS" ] || extra_flags=--disable-bootstrap + ./configure \ --prefix=/usr \ --build=$HOST_TRIPLE \ - --host=$TRIPLE + --host=$TRIPLE \ + $extra_flags make } From d5206bb40ecd935e552cad598ae07f6506b18775 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Thu, 21 Apr 2022 16:11:00 +0000 Subject: [PATCH 086/151] flex: fix license --- base/flex/build.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/base/flex/build.sh b/base/flex/build.sh index 21f118b..ecc66f3 100644 --- a/base/flex/build.sh +++ b/base/flex/build.sh @@ -28,8 +28,7 @@ package() { license() { cd $pkgname-$pkgver - cat LICENSE -# cat COPYING + cat COPYING } backup() { From a7f17f70e677abedbd59c087eb0e2bdaba756c9f Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Thu, 21 Apr 2022 16:12:12 +0000 Subject: [PATCH 087/151] gettext-tiny: use gmake --- base/gettext-tiny/build.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/base/gettext-tiny/build.sh b/base/gettext-tiny/build.sh index 744bed7..a219bf6 100644 --- a/base/gettext-tiny/build.sh +++ b/base/gettext-tiny/build.sh @@ -1,7 +1,7 @@ pkgname=gettext-tiny pkgver=master -mkdeps="kati" deps="" +auto_cross fetch() { curl -L "https://github.com/sabotage-linux/gettext-tiny/archive/master.tar.gz" -o $pkgname-$pkgver.tar.gz @@ -10,12 +10,12 @@ fetch() { build() { cd $pkgname-$pkgver - ckati + bad --gmake gmake } package() { cd $pkgname-$pkgver - ckati install DESTDIR=$pkgdir prefix=/usr + bad --gmake gmake install DESTDIR=$pkgdir prefix=/usr } license() { @@ -23,3 +23,7 @@ license() { cat LICENSE # cat COPYING } + +backup() { + return +} From f0d49d6637171b2cdc6630b4b003f029f91c18f1 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Thu, 21 Apr 2022 16:16:36 +0000 Subject: [PATCH 088/151] kakoune: switch to gmake --- base/kakoune/build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/base/kakoune/build.sh b/base/kakoune/build.sh index c5788d7..a76d383 100644 --- a/base/kakoune/build.sh +++ b/base/kakoune/build.sh @@ -12,12 +12,12 @@ fetch() { build() { cd $pkgname-$pkgver - ckati + bad --gmake gmake } package() { cd $pkgname-$pkgver - ckati install DESTDIR=$pkgdir PREFIX=/usr + bad --gmake gmake install DESTDIR=$pkgdir PREFIX=/usr rm -r $pkgdir/usr/share/doc rm -r $pkgdir/usr/share/man rm -r $pkgdir/usr/libexec From 0651c9506682ce7d08e5641408703fcf6af0561f Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Thu, 21 Apr 2022 16:19:30 +0000 Subject: [PATCH 089/151] kakoune: backup --- base/kakoune/build.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/base/kakoune/build.sh b/base/kakoune/build.sh index a76d383..26edf8c 100644 --- a/base/kakoune/build.sh +++ b/base/kakoune/build.sh @@ -35,3 +35,7 @@ license() { cd $pkgname-$pkgver cat UNLICENSE } + +backup() { + return +} From ac48f1b27ce1e456993091a281488e1c6cd39f18 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Thu, 21 Apr 2022 20:37:18 +0000 Subject: [PATCH 090/151] musl: use if for ldd install --- linux/musl/build.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/linux/musl/build.sh b/linux/musl/build.sh index 8c2fd72..36c962b 100644 --- a/linux/musl/build.sh +++ b/linux/musl/build.sh @@ -38,8 +38,10 @@ package() { rm $pkgdir/lib/ld-musl-$ARCH.so.1 mv $pkgdir/$PREFIX/lib/libc.so $pkgdir/lib/ld-musl-$ARCH.so.1 ln -sr $pkgdir/lib/ld-musl-$ARCH.so.1 $pkgdir/$PREFIX/lib/libc.so - [ -z "$FOR_CROSS" ] && install -d $pkgdir/$PREFIX/bin - [ -z "$FOR_CROSS" ] && ln -sr $pkgdir/lib/ld-musl-$ARCH.so.1 $pkgdir/$PREFIX/bin/ldd + if [ -z "$FOR_CROSS" ]; then + install -d $pkgdir/$PREFIX/bin + ln -sr $pkgdir/lib/ld-musl-$ARCH.so.1 $pkgdir/$PREFIX/bin/ldd + fi } backup() { From 302a3e773ada95b91c2bd97e880cba44cc1a55b6 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Thu, 21 Apr 2022 20:56:09 +0000 Subject: [PATCH 091/151] libelf: fix cross --- base/libelf/build.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/base/libelf/build.sh b/base/libelf/build.sh index fbd21de..c8334da 100644 --- a/base/libelf/build.sh +++ b/base/libelf/build.sh @@ -1,5 +1,6 @@ pkgname=libelf pkgver=0.186 +auto_cross fetch() { curl -LO "https://sourceware.org/elfutils/ftp/$pkgver/elfutils-$pkgver.tar.bz2" @@ -8,13 +9,19 @@ fetch() { patch -p1 < ../../musl.patch } +if [ -z "$FOR_CROSS" ]; then + PREFIX=/usr +else + PREFIX=$FOR_CROSS_DIR +fi + build() { cd elfutils-$pkgver - export CFLAGS="$(CFLAGS) -Wno-error" + export CFLAGS="$CFLAGS -Wno-error" ./configure \ - --prefix=/usr \ + --prefix=$PREFIX \ --sysconfdir=/etc \ - --build=$TRIPLE \ + --build=$HOST_TRIPLE \ --host=$TRIPLE \ --disable-symbol-versioning \ --disable-debuginfod \ From 8899af9d0e8ad99c3ff1833a92832ed2542b24d1 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Thu, 21 Apr 2022 20:56:49 +0000 Subject: [PATCH 092/151] libelf: fix build --- base/libelf/musl.patch | 59 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 base/libelf/musl.patch diff --git a/base/libelf/musl.patch b/base/libelf/musl.patch new file mode 100644 index 0000000..a37912f --- /dev/null +++ b/base/libelf/musl.patch @@ -0,0 +1,59 @@ +diff --git a/configure b/configure +index d03dab4..7fc88bd 100755 +--- a/configure ++++ b/configure +@@ -7758,7 +7758,7 @@ LIBS="$saved_LIBS" + case "$ac_cv_search_argp_parse" in + no) { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +-as_fn_error $? "failed to find argp_parse ++: $? "failed to find argp_parse + See \`config.log' for more details" "$LINENO" 5; } ;; + -l*) argp_LDADD="$ac_cv_search_argp_parse" ;; + *) argp_LDADD= ;; +@@ -7826,7 +7826,7 @@ LIBS="$saved_LIBS" + case "$ac_cv_search_fts_close" in + no) { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +-as_fn_error $? "failed to find fts_close ++: $? "failed to find fts_close + See \`config.log' for more details" "$LINENO" 5; } ;; + -l*) fts_LIBS="$ac_cv_search_fts_close" ;; + *) fts_LIBS= ;; +@@ -7894,7 +7894,7 @@ LIBS="$saved_LIBS" + case "$ac_cv_search__obstack_free" in + no) { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +-as_fn_error $? "failed to find _obstack_free ++: $? "failed to find _obstack_free + See \`config.log' for more details" "$LINENO" 5; } ;; + -l*) obstack_LIBS="$ac_cv_search__obstack_free" ;; + *) obstack_LIBS= ;; +diff --git a/lib/Makefile.in b/lib/Makefile.in +index 41ff5f7..0c81496 100644 +--- a/lib/Makefile.in ++++ b/lib/Makefile.in +@@ -117,8 +117,8 @@ libeu_a_AR = $(AR) $(ARFLAGS) + libeu_a_LIBADD = + am_libeu_a_OBJECTS = xasprintf.$(OBJEXT) xstrdup.$(OBJEXT) \ + xstrndup.$(OBJEXT) xmalloc.$(OBJEXT) next_prime.$(OBJEXT) \ +- crc32.$(OBJEXT) crc32_file.$(OBJEXT) color.$(OBJEXT) \ +- error.$(OBJEXT) printversion.$(OBJEXT) ++ crc32.$(OBJEXT) crc32_file.$(OBJEXT) \ ++ error.$(OBJEXT) + libeu_a_OBJECTS = $(am_libeu_a_OBJECTS) + AM_V_P = $(am__v_P_@AM_V@) + am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +@@ -406,10 +406,10 @@ textrel_check = if $(READELF) -d $@ | fgrep -q TEXTREL; then $(textrel_found); f + noinst_LIBRARIES = libeu.a + libeu_a_SOURCES = xasprintf.c xstrdup.c xstrndup.c xmalloc.c next_prime.c \ + crc32.c crc32_file.c \ +- color.c error.c printversion.c ++ error.c + + noinst_HEADERS = fixedsizehash.h libeu.h system.h dynamicsizehash.h list.h \ +- eu-config.h color.h printversion.h bpf.h \ ++ eu-config.h bpf.h \ + atomics.h stdatomic-fbsd.h dynamicsizehash_concurrent.h + + EXTRA_DIST = dynamicsizehash.c dynamicsizehash_concurrent.c From 1f6f51b9be55108063ea8da5fba23251d78b7d7a Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Thu, 21 Apr 2022 21:03:11 +0000 Subject: [PATCH 093/151] zlib-ng: cross build --- base/zlib-ng/build.sh | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/base/zlib-ng/build.sh b/base/zlib-ng/build.sh index f41c715..3193081 100644 --- a/base/zlib-ng/build.sh +++ b/base/zlib-ng/build.sh @@ -10,12 +10,21 @@ fetch() { build() { cd $pkgname-$pkgver cd build + + PREFIX=/usr + + [ -z "$WITH_CROSS" ] || cmake_extra_flags="-DCMAKE_CROSSCOMPILING=ON \ + -DCMAKE_SYSROOT=$WITH_CROSS_DIR \ + -DCMAKE_C_COMPILER_TARGET=$ARCH-linux-musl" + [ -z "$FOR_CROSS" ] || PREFIX=$FOR_CROSS_DIR + cmake -G Ninja ../ \ -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ -DCMAKE_INSTALL_LIBDIR=lib \ - -DZLIB_COMPAT=ON - + -DZLIB_COMPAT=ON \ + $cmake_extra_flags + samu } @@ -29,3 +38,7 @@ license() { cd $pkgname-$pkgver cat LICENSE.md } + +backup() { + return +} From 7a2d99e04448a85436d2add1fc100103c33ae644 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Thu, 21 Apr 2022 21:41:52 +0000 Subject: [PATCH 094/151] linux: fix cross from GNU --- linux/linux/build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linux/linux/build.sh b/linux/linux/build.sh index 73f269b..ce7494d 100644 --- a/linux/linux/build.sh +++ b/linux/linux/build.sh @@ -25,12 +25,12 @@ fi build() { cd $pkgname-$pkgver - bad --gmake gmake CC=cc HOSTCC=cc YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch olddefconfig + bad --gmake gmake CC=clang HOSTCC=clang YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch olddefconfig sed -i 's/CONFIG_UNWINDER_ORC=y/# CONFIG_UNWINDER_ORC is not set/g' .config sed -i 's/# CONFIG_UNWINDER_FRAME_POINTER is not set/CONFIG_UNWINDER_FRAME_POINTER=y/g' .config if [ -z "$FOR_CROSS" ]; then - bad --gmake gmake CC=cc HOSTCC=cc YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch + bad --gmake gmake CC=clang HOSTCC=clang YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch fi } From c9e09e92e0118b4c05445009f344a5b17ccab4cf Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Thu, 21 Apr 2022 22:57:08 +0000 Subject: [PATCH 095/151] limine: llvm is supported upstream now --- linux/limine/build.sh | 48 ++++--------------------------------------- 1 file changed, 4 insertions(+), 44 deletions(-) diff --git a/linux/limine/build.sh b/linux/limine/build.sh index 0aaaa0f..2082b2a 100644 --- a/linux/limine/build.sh +++ b/linux/limine/build.sh @@ -1,5 +1,5 @@ pkgname=limine -pkgver=3.0.3 +pkgver=3.4.1 mkdeps="nasm:llvm" fetch() { @@ -9,53 +9,13 @@ fetch() { build() { cd $pkgname-$pkgver - # Limine's configure script rejects LLVM binutils because - # objcopy can't build EFI. We only want bios though. - sed \ - -e "s|@SRCDIR@|$(pwd)|g" \ - -e "s|@BUILDDIR@|$(pwd)|g" \ - -e "s|@PATH@|/usr/bad/gmake/bin:$PATH|" \ - -e 's|@prefix@|/usr|' \ - -e "s|@abs_builddir@|$(pwd)|" \ - -e "s|@abs_srcdir@|$(pwd)|" \ - -e 's|@CC@|cc|' \ - -e 's|@LIMINE_CC@|cc|' \ - -e 's|@LIMINE_CFLAGS@|-O3 -pipe -Wall -Wextra|' \ - -e 's|@LIMINE_LD@|ld|' \ - -e 's|@LIMINE_LDFLAGS@||' \ - -e 's|@LDFLAGS@||' \ - -e 's|@LIMINE_OBJCOPY@|objcopy|' \ - -e 's|@LIMINE_OBJDUMP@|objdump|' \ - -e 's|@LIMINE_READELF@|readelf|' \ - -e 's|@SED@|sed|' \ - -e 's|@HOST_CC@|cc|' \ - -e 's|@AWK@|awk|' \ - -e 's|@GREP@|grep|' \ - -e 's|@werror@||' \ - -e 's|@INSTALL@|install|' \ - -e 's|@CFLAGS@|-O3 -pipe -Wall -Wextra|' \ - -e "s|@limine_version@|$pkgver|" \ - -e 's|@LIMINE_AR@|ar|' \ - -e 's|@LIMINE_AS@|clang|' \ - -e 's|@WERROR@||' \ - GNUmakefile.in > GNUmakefile - - sed -e "s|@PACKAGE_VERSION@|$pkgver|" \ - -e "s|@LIMINE_COPYRIGHT@|$(grep Copyright LICENSE.md)|" \ - config.h.in > config.h - - bad --gmake gmake limine-bios limine-deploy CC="clang" TOOLCHAIN="llvm" TOOLCHAIN_CC="clang" TOOLCHAIN_LD="ld.lld" -j1 + bad --gmake ./configure --prefix=/usr + bad --gmake gmake } package() { cd $pkgname-$pkgver - mkdir -p $pkgdir/usr/sbin/ - install -m 755 ./bin/limine-deploy $pkgdir/usr/sbin/ - mkdir -p $pkgdir/usr/share/limine/ - install -m 644 ./bin/limine-cd.bin $pkgdir/usr/share/limine/ - install -m 644 ./bin/limine-hdd.bin $pkgdir/usr/share/limine/ - install -m 644 ./bin/limine-pxe.bin $pkgdir/usr/share/limine/ - install -m 644 ./bin/limine.sys $pkgdir/usr/share/limine/ + bad --gmake gmake install DESTDIR=$pkgdir } license() { From ff3539eacc04f78d4a601db54e561e8fc39e6736 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Thu, 21 Apr 2022 22:58:07 +0000 Subject: [PATCH 096/151] limine: fix cross builds --- linux/limine/build.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/linux/limine/build.sh b/linux/limine/build.sh index 2082b2a..e112f24 100644 --- a/linux/limine/build.sh +++ b/linux/limine/build.sh @@ -9,7 +9,10 @@ fetch() { build() { cd $pkgname-$pkgver - bad --gmake ./configure --prefix=/usr + bad --gmake ./configure \ + --build=$HOST_TRIPLE \ + --host=$TRIPLE \ + --prefix=/usr bad --gmake gmake } From 00a3eb18c72170771ea1385f464a15cb79a8558f Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Thu, 21 Apr 2022 22:59:45 +0000 Subject: [PATCH 097/151] limine: fix build from gnu --- linux/limine/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux/limine/build.sh b/linux/limine/build.sh index e112f24..31b32d4 100644 --- a/linux/limine/build.sh +++ b/linux/limine/build.sh @@ -13,7 +13,7 @@ build() { --build=$HOST_TRIPLE \ --host=$TRIPLE \ --prefix=/usr - bad --gmake gmake + bad --gmake gmake CC=clang } package() { From c5604f09805c087c9cfc7a525e7f0a11ce15bc2a Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Thu, 21 Apr 2022 23:00:14 +0000 Subject: [PATCH 098/151] limine: actually fix build from gnu --- linux/limine/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux/limine/build.sh b/linux/limine/build.sh index 31b32d4..9fc9423 100644 --- a/linux/limine/build.sh +++ b/linux/limine/build.sh @@ -13,7 +13,7 @@ build() { --build=$HOST_TRIPLE \ --host=$TRIPLE \ --prefix=/usr - bad --gmake gmake CC=clang + bad --gmake gmake TOOLCHAIN=llvm } package() { From 588963d7da2d2d0e4bc96e27c7ea1c7d4789d8f4 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Thu, 21 Apr 2022 23:01:18 +0000 Subject: [PATCH 099/151] limine: properly actually fix build from gnu --- linux/limine/build.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linux/limine/build.sh b/linux/limine/build.sh index 9fc9423..8493d11 100644 --- a/linux/limine/build.sh +++ b/linux/limine/build.sh @@ -9,11 +9,12 @@ fetch() { build() { cd $pkgname-$pkgver + export CC=clang bad --gmake ./configure \ --build=$HOST_TRIPLE \ --host=$TRIPLE \ --prefix=/usr - bad --gmake gmake TOOLCHAIN=llvm + bad --gmake gmake } package() { From 3dc707338671fbc95a4d7cee1a24076f75d87dec Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Thu, 21 Apr 2022 23:11:02 +0000 Subject: [PATCH 100/151] make_ext4fs: fix cross --- linux/make_ext4fs/build.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/linux/make_ext4fs/build.sh b/linux/make_ext4fs/build.sh index 6b283dd..088b230 100644 --- a/linux/make_ext4fs/build.sh +++ b/linux/make_ext4fs/build.sh @@ -1,5 +1,8 @@ pkgname=make_ext4fs pkgver=main +mkdeps=toybox:bmake:llvm +deps=musl:zlib-ng +auto_cross fetch() { curl -L "https://github.com/iglunix/make_ext4fs/archive/refs/heads/main.tar.gz" -o $pkgname-$pkgver.tar.gz @@ -22,3 +25,7 @@ license() { cat LICENSE # cat COPYING } + +backup() { + return +} From 92bacf2a17c6e15339a1bd542ce3ba483a92865d Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Fri, 22 Apr 2022 00:25:44 +0000 Subject: [PATCH 101/151] linux: switch to defconfig --- linux/linux/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux/linux/build.sh b/linux/linux/build.sh index ce7494d..6fa9168 100644 --- a/linux/linux/build.sh +++ b/linux/linux/build.sh @@ -25,7 +25,7 @@ fi build() { cd $pkgname-$pkgver - bad --gmake gmake CC=clang HOSTCC=clang YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch olddefconfig + bad --gmake gmake CC=clang HOSTCC=clang YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch defconfig sed -i 's/CONFIG_UNWINDER_ORC=y/# CONFIG_UNWINDER_ORC is not set/g' .config sed -i 's/# CONFIG_UNWINDER_FRAME_POINTER is not set/CONFIG_UNWINDER_FRAME_POINTER=y/g' .config From bf36066fa8ea14390e892ce9a2eaedc6885f3156 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Fri, 22 Apr 2022 09:59:33 +0000 Subject: [PATCH 102/151] curl: fix cross --- base/curl/build.sh | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/base/curl/build.sh b/base/curl/build.sh index 81dc9bf..1a1e6e7 100644 --- a/base/curl/build.sh +++ b/base/curl/build.sh @@ -2,9 +2,10 @@ pkgver=7.81.0 pkg_ver=$(echo $pkgver | tr '.' '_') pkgname=curl pkgrel=1 -mkdeps="samu:cmake" +mkdeps="" deps="openssl" bad="" +auto_cross fetch() { curl -L "https://github.com/curl/curl/releases/download/curl-$pkg_ver/curl-$pkgver.tar.xz" -o $pkgname-$pkgver.tar.gz @@ -13,20 +14,16 @@ fetch() { build() { cd $pkgname-$pkgver - mkdir build - cd build - cmake -G Ninja ../ \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DCURL_CA_BUNDLE="/etc/ssl/cert.pem" - samu + ./configure --prefix=/usr \ + --build=$HOST_TRIPLE \ + --host=$TRIPLE \ + --with-openssl + make } package() { cd $pkgname-$pkgver - cd build - DESTDIR=$pkgdir samu install + make DESTDIR=$pkgdir install } backup() { From f9839feeabd97040e3b0a5f264e87908b19b833c Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Fri, 22 Apr 2022 09:59:57 +0000 Subject: [PATCH 103/151] openssl: fix for cross --- base/openssl/build.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/base/openssl/build.sh b/base/openssl/build.sh index dc343cc..f67d647 100644 --- a/base/openssl/build.sh +++ b/base/openssl/build.sh @@ -8,10 +8,13 @@ fetch() { tar -xf $pkgname-$pkgver.tar.xz } +PREFIX=/usr +[ -z "$FOR_CROSS" ] || PREFIX=$FOR_CROSS_DIR + build() { cd $pkgname-$pkgver ./Configure \ - --prefix=/usr \ + --prefix=$PREFIX \ --openssldir=/etc/ssl \ --libdir=lib \ linux-generic64 \ @@ -28,8 +31,12 @@ build() { package() { cd $pkgname-$pkgver make install_sw DESTDIR=$pkgdir - install -d $pkgdir/usr/sbin - install -Dm755 ../../update-ca.sh $pkgdir/usr/sbin/update-ca + if [ -z "$FOR_CROSS" ]; then + install -d $pkgdir/usr/sbin + install -Dm755 ../../update-ca.sh $pkgdir/usr/sbin/update-ca + else + rm -rf $pkgdir/$PREFIX/bin + fi } backup() { From 7e5efb935febebbe13314cb98b786244454851cc Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Fri, 22 Apr 2022 10:01:22 +0000 Subject: [PATCH 104/151] openssl: fix absolute prefix --- base/openssl/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/openssl/build.sh b/base/openssl/build.sh index f67d647..1be2319 100644 --- a/base/openssl/build.sh +++ b/base/openssl/build.sh @@ -14,7 +14,7 @@ PREFIX=/usr build() { cd $pkgname-$pkgver ./Configure \ - --prefix=$PREFIX \ + --prefix=/$PREFIX \ --openssldir=/etc/ssl \ --libdir=lib \ linux-generic64 \ From 4fe77a04d4edea22da820aa02e9820d3d672fbcd Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Fri, 22 Apr 2022 16:26:11 +0000 Subject: [PATCH 105/151] linux: switch to alpine+mod2yesconfig --- linux/linux/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux/linux/build.sh b/linux/linux/build.sh index 6fa9168..27cee68 100644 --- a/linux/linux/build.sh +++ b/linux/linux/build.sh @@ -25,7 +25,7 @@ fi build() { cd $pkgname-$pkgver - bad --gmake gmake CC=clang HOSTCC=clang YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch defconfig + bad --gmake gmake CC=clang HOSTCC=clang YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch mod2yesconfig sed -i 's/CONFIG_UNWINDER_ORC=y/# CONFIG_UNWINDER_ORC is not set/g' .config sed -i 's/# CONFIG_UNWINDER_FRAME_POINTER is not set/CONFIG_UNWINDER_FRAME_POINTER=y/g' .config From 424683162bc7ff94fadcf30f1f43ada2dcda51a3 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Fri, 22 Apr 2022 16:26:34 +0000 Subject: [PATCH 106/151] linux: remove modules_install --- linux/linux/build.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/linux/linux/build.sh b/linux/linux/build.sh index 27cee68..45e0edf 100644 --- a/linux/linux/build.sh +++ b/linux/linux/build.sh @@ -40,9 +40,6 @@ package() { if [ -z "$FOR_CROSS" ]; then install -d $pkgdir/boot bad --gmake gmake CC=cc HOSTCC=cc YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch INSTALL_PATH=$pkgdir/boot install - set +e # depmod causes errors - bad --gmake gmake CC=cc HOSTCC=cc YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch INSTALL_MOD_PATH=$pkgdir/ modules_install - set -e fi bad --gmake gmake CC=cc HOSTCC=cc YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch headers From 85bf643e8dd64785cb91ff068e6e6084a889e3eb Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Fri, 22 Apr 2022 19:42:08 +0000 Subject: [PATCH 107/151] limine: fix cross build --- linux/limine/build.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linux/limine/build.sh b/linux/limine/build.sh index 8493d11..c4de07a 100644 --- a/linux/limine/build.sh +++ b/linux/limine/build.sh @@ -1,6 +1,7 @@ pkgname=limine pkgver=3.4.1 mkdeps="nasm:llvm" +auto_cross fetch() { curl -L "https://github.com/limine-bootloader/limine/releases/download/v$pkgver/limine-$pkgver.tar.xz" -o $pkgname-$pkgver.tar.xz @@ -9,7 +10,7 @@ fetch() { build() { cd $pkgname-$pkgver - export CC=clang + export LIMINE_CC=clang bad --gmake ./configure \ --build=$HOST_TRIPLE \ --host=$TRIPLE \ From 969b87569ec04e3f9d29dfc41d06235bee7dd760 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Fri, 22 Apr 2022 20:53:43 +0000 Subject: [PATCH 108/151] doas: fix build --- base/doas/build.sh | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/base/doas/build.sh b/base/doas/build.sh index d0e856d..77a35ca 100644 --- a/base/doas/build.sh +++ b/base/doas/build.sh @@ -3,9 +3,10 @@ pkgname=doas pkgrel=1 bad="gmake" ext="doc" +auto_cross fetch() { - curl -L "https://github.com/Duncaen/OpenDoas/releases/download/v6.8/opendoas-$pkgver.tar.xz" -o $pkgname-$pkgver.tar.xz + curl -L "https://github.com/Duncaen/OpenDoas/releases/download/v$pkgver/opendoas-$pkgver.tar.xz" -o $pkgname-$pkgver.tar.xz tar -xf $pkgname-$pkgver.tar.xz mv opendoas-$pkgver $pkgname-$pkgver cp ../build.ninja $pkgname-$pkgver @@ -15,25 +16,21 @@ build() { cd $pkgname-$pkgver ./configure --prefix=/usr \ --without-pam - gmake + bad --gmake gmake } package() { cd $pkgname-$pkgver install -d $pkgdir/usr/bin - install -Dm4755 doas $pkgdir/usr/bin -} - -package_doc() { - cd $pkgname-$pkgver - install -d $pkgdir/usr/share/man/ - install -d $pkgdir/usr/share/man/man1 - install -d $pkgdir/usr/share/man/man5 - install -Dm644 doas.1 $pkgdir/usr/share/man/man1 - install -Dm644 doas.conf.5 $pkgdir/usr/share/man/man5 + install -Dm755 doas $pkgdir/usr/bin + chmod u+s $pkgdir/usr/bin/doas } license() { cd $pkgname-$pkgver cat LICENSE } + +backup() { + return +} From d8ba48c8fd629447e667884fee5b0fee9e917b5d Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Fri, 22 Apr 2022 21:11:49 +0000 Subject: [PATCH 109/151] man-pages-posix: fix build --- base/man-pages-posix/build.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/base/man-pages-posix/build.sh b/base/man-pages-posix/build.sh index 0559329..ad0139c 100644 --- a/base/man-pages-posix/build.sh +++ b/base/man-pages-posix/build.sh @@ -7,8 +7,7 @@ fetch() { } build() { - cd $pkgname-$pkgver - make + return } package() { @@ -16,6 +15,10 @@ package() { make install DESTDIR=$pkgdir } +backup() { + return +} + license() { cd $pkgname-$pkgver cat POSIX-COPYRIGHT From a3c01e7787e7ca3a67339f94192e47db57d3cf31 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Fri, 22 Apr 2022 21:34:18 +0000 Subject: [PATCH 110/151] netbsd-curses: fix cross --- base/netbsd-curses/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/netbsd-curses/build.sh b/base/netbsd-curses/build.sh index 27f993b..a56b681 100644 --- a/base/netbsd-curses/build.sh +++ b/base/netbsd-curses/build.sh @@ -19,7 +19,7 @@ build() { package() { cd $pkgname-$pkgver - bad --gmake gmake install DESTDIR=$pkgdir PREFIX=/usr + bad --gmake gmake install DESTDIR=$pkgdir PREFIX=/usr HOSTCC=cc CROSSCOMPILING=1 LDFLAGS_HOST= CFLAGS_HOST= } backup() { From 25a7e2c67ba10276693f5594177e008f85143174 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Fri, 22 Apr 2022 21:47:11 +0000 Subject: [PATCH 111/151] samurai: fix cross --- base/samurai/build.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/base/samurai/build.sh b/base/samurai/build.sh index 283208a..2e89749 100644 --- a/base/samurai/build.sh +++ b/base/samurai/build.sh @@ -1,6 +1,7 @@ pkgver=1.2 pkgname=samurai pkgrel=1 +auto_cross fetch() { curl -L "http://github.com/michaelforney/samurai/releases/download/1.2/$pkgname-$pkgver.tar.gz" -o $pkgname-$pkgver.tar.gz @@ -9,7 +10,7 @@ fetch() { build() { cd $pkgname-$pkgver - samu + make LDFLAGS="$LDFLAGS" } package() { @@ -22,3 +23,7 @@ license() { cd $pkgname-$pkgver cat LICENSE } + +backup() { + return +} From a2eec6b648f57ab56d57d89d49f5ce0e35ab8496 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Fri, 22 Apr 2022 21:49:13 +0000 Subject: [PATCH 112/151] zstd: fix cross --- base/zstd/build.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/base/zstd/build.sh b/base/zstd/build.sh index f92f308..fd9e28d 100644 --- a/base/zstd/build.sh +++ b/base/zstd/build.sh @@ -1,5 +1,6 @@ pkgname=zstd -pkgver=1.5.0 +pkgver=1.5.2 +auto_cross fetch() { curl -L "https://github.com/facebook/zstd/releases/download/v$pkgver/zstd-$pkgver.tar.gz" -o $pkgname-$pkgver.tar.xz @@ -22,3 +23,7 @@ license() { cat LICENSE # cat COPYING } + +backup() { + return +} From 0f98f828a2519a60f8b50b1f71c7570f8a994233 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Sat, 23 Apr 2022 14:11:10 +0000 Subject: [PATCH 113/151] linux: slim down kernel --- linux/linux/build.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/linux/linux/build.sh b/linux/linux/build.sh index 45e0edf..451f6b4 100644 --- a/linux/linux/build.sh +++ b/linux/linux/build.sh @@ -26,11 +26,22 @@ fi build() { cd $pkgname-$pkgver bad --gmake gmake CC=clang HOSTCC=clang YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch mod2yesconfig + ./scripts/config -m CONFIG_DRM + ./scripts/config -m CONFIG_SND + ./scripts/config -m CONFIG_CFG80211 + ./scripts/config -m CONFIG_BT + ./scripts/config -m CONFIG_IPV6 + + bad --gmake gmake CC=clang HOSTCC=clang YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch olddefconfig sed -i 's/CONFIG_UNWINDER_ORC=y/# CONFIG_UNWINDER_ORC is not set/g' .config sed -i 's/# CONFIG_UNWINDER_FRAME_POINTER is not set/CONFIG_UNWINDER_FRAME_POINTER=y/g' .config if [ -z "$FOR_CROSS" ]; then bad --gmake gmake CC=clang HOSTCC=clang YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch + + set +e # depmod causes errors + bad --gmake gmake CC=cc HOSTCC=cc YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch INSTALL_MOD_PATH=$pkgdir/ modules_install + set -e fi } From 208bbbe22bf7a1ed5d9c9712da6b4587c2124284 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Sat, 23 Apr 2022 14:21:20 +0000 Subject: [PATCH 114/151] linux: fix cross --- linux/linux/build.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/linux/linux/build.sh b/linux/linux/build.sh index 451f6b4..778dc01 100644 --- a/linux/linux/build.sh +++ b/linux/linux/build.sh @@ -38,10 +38,6 @@ build() { if [ -z "$FOR_CROSS" ]; then bad --gmake gmake CC=clang HOSTCC=clang YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch - - set +e # depmod causes errors - bad --gmake gmake CC=cc HOSTCC=cc YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch INSTALL_MOD_PATH=$pkgdir/ modules_install - set -e fi } @@ -51,6 +47,10 @@ package() { if [ -z "$FOR_CROSS" ]; then install -d $pkgdir/boot bad --gmake gmake CC=cc HOSTCC=cc YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch INSTALL_PATH=$pkgdir/boot install + + set +e # depmod causes errors + bad --gmake gmake CC=cc HOSTCC=cc YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch INSTALL_MOD_PATH=$pkgdir/ modules_install + set -e fi bad --gmake gmake CC=cc HOSTCC=cc YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch headers From 43f9c5535b943241a50b22b8560e20133f29cf88 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Sat, 23 Apr 2022 14:21:54 +0000 Subject: [PATCH 115/151] linux: put media in modules --- linux/linux/build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/linux/linux/build.sh b/linux/linux/build.sh index 778dc01..ca8fed7 100644 --- a/linux/linux/build.sh +++ b/linux/linux/build.sh @@ -31,6 +31,7 @@ build() { ./scripts/config -m CONFIG_CFG80211 ./scripts/config -m CONFIG_BT ./scripts/config -m CONFIG_IPV6 + ./scripts/config -m CONFIG_MEDIA_SUPPORT bad --gmake gmake CC=clang HOSTCC=clang YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch olddefconfig sed -i 's/CONFIG_UNWINDER_ORC=y/# CONFIG_UNWINDER_ORC is not set/g' .config From 4dc9b0c175c9b2f913c6a37baceec7b98cebd782 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Sat, 23 Apr 2022 14:36:41 +0000 Subject: [PATCH 116/151] linux: smaller kernel --- linux/linux/build.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/linux/linux/build.sh b/linux/linux/build.sh index ca8fed7..9d086ee 100644 --- a/linux/linux/build.sh +++ b/linux/linux/build.sh @@ -6,9 +6,9 @@ ext="dev" fetch() { curl "https://cdn.kernel.org/pub/linux/kernel/v5.x/$pkgname-$pkgver.tar.xz" -o $pkgname-$pkgver.tar.xz tar -xf $pkgname-$pkgver.tar.xz - cd $pkgname-$pkgver # use Alpine's kernel config so we don't have to maintain one curl "https://git.alpinelinux.org/aports/plain/community/linux-edge/config-edge.$(uname -m)" -o .config + cd $pkgname-$pkgver } _arch=$ARCH @@ -25,6 +25,7 @@ fi build() { cd $pkgname-$pkgver + cp ../.config . bad --gmake gmake CC=clang HOSTCC=clang YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch mod2yesconfig ./scripts/config -m CONFIG_DRM ./scripts/config -m CONFIG_SND @@ -32,6 +33,9 @@ build() { ./scripts/config -m CONFIG_BT ./scripts/config -m CONFIG_IPV6 ./scripts/config -m CONFIG_MEDIA_SUPPORT + ./scripts/config -m CONFIG_FIREWIRE + ./scripts/config -m CONFIG_USB4 + ./scripts/config -m CONFIG_FW_LOADER bad --gmake gmake CC=clang HOSTCC=clang YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch olddefconfig sed -i 's/CONFIG_UNWINDER_ORC=y/# CONFIG_UNWINDER_ORC is not set/g' .config From 1d22ff8c45c5a0b01d641233880723c3d39ce824 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Sat, 23 Apr 2022 15:07:44 +0000 Subject: [PATCH 117/151] linux: bake all the things --- linux/linux/build.sh | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/linux/linux/build.sh b/linux/linux/build.sh index 9d086ee..9e5aada 100644 --- a/linux/linux/build.sh +++ b/linux/linux/build.sh @@ -27,17 +27,17 @@ build() { cd $pkgname-$pkgver cp ../.config . bad --gmake gmake CC=clang HOSTCC=clang YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch mod2yesconfig - ./scripts/config -m CONFIG_DRM - ./scripts/config -m CONFIG_SND - ./scripts/config -m CONFIG_CFG80211 - ./scripts/config -m CONFIG_BT - ./scripts/config -m CONFIG_IPV6 - ./scripts/config -m CONFIG_MEDIA_SUPPORT - ./scripts/config -m CONFIG_FIREWIRE - ./scripts/config -m CONFIG_USB4 - ./scripts/config -m CONFIG_FW_LOADER + # ./scripts/config -m CONFIG_DRM + # ./scripts/config -m CONFIG_SND + # ./scripts/config -m CONFIG_CFG80211 + # ./scripts/config -m CONFIG_BT + # ./scripts/config -m CONFIG_IPV6 + # ./scripts/config -m CONFIG_MEDIA_SUPPORT + # ./scripts/config -m CONFIG_FIREWIRE + # ./scripts/config -m CONFIG_USB4 + # ./scripts/config -m CONFIG_FW_LOADER - bad --gmake gmake CC=clang HOSTCC=clang YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch olddefconfig + # bad --gmake gmake CC=clang HOSTCC=clang YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch olddefconfig sed -i 's/CONFIG_UNWINDER_ORC=y/# CONFIG_UNWINDER_ORC is not set/g' .config sed -i 's/# CONFIG_UNWINDER_FRAME_POINTER is not set/CONFIG_UNWINDER_FRAME_POINTER=y/g' .config @@ -53,9 +53,9 @@ package() { install -d $pkgdir/boot bad --gmake gmake CC=cc HOSTCC=cc YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch INSTALL_PATH=$pkgdir/boot install - set +e # depmod causes errors - bad --gmake gmake CC=cc HOSTCC=cc YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch INSTALL_MOD_PATH=$pkgdir/ modules_install - set -e + # set +e # depmod causes errors + # bad --gmake gmake CC=cc HOSTCC=cc YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch INSTALL_MOD_PATH=$pkgdir/ modules_install + # set -e fi bad --gmake gmake CC=cc HOSTCC=cc YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch headers From f08570a29691119411b41978e16b11f2c3eeb4cc Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Sat, 23 Apr 2022 15:53:51 +0000 Subject: [PATCH 118/151] cmake: fix cross --- base/cmake/build.sh | 55 ++++++++++++++++++++++++++------------------- 1 file changed, 32 insertions(+), 23 deletions(-) diff --git a/base/cmake/build.sh b/base/cmake/build.sh index 6f28e96..1fd5001 100644 --- a/base/cmake/build.sh +++ b/base/cmake/build.sh @@ -1,50 +1,59 @@ -pkgver=3.19.2 +pkgver=3.23.1 pkgname=cmake pkgrel=1 -mkdeps="samu" +mkdeps="samurai" deps="" bad="" ext="" fetch() { - curl "https://cmake.org/files/v3.19/cmake-3.19.2.tar.gz" -o $pkgname-$pkgver.tar.gz + curl "https://cmake.org/files/v3.23/cmake-$pkgver.tar.gz" -o $pkgname-$pkgver.tar.gz tar -xf $pkgname-$pkgver.tar.gz } build() { cd $pkgname-$pkgver - ./bootstrap \ - --prefix=/usr \ - --mandir=/share/man \ - --datadir=/share/$pkgname \ - --docdir=/share/doc/$pkgname \ - --generator=Ninja \ - --no-system-libs + if [ -z "$WITH_CROSS" ]; then + ./bootstrap \ + --prefix=/usr \ + --mandir=/share/man \ + --datadir=/share/$pkgname \ + --docdir=/share/doc/$pkgname \ + --generator=Ninja \ + --no-system-libs + else + mkdir -p build + cd build + cmake -G Ninja .. \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_SYSTEM_NAME=Linux \ + -DCMAKE_SYSROOT=$WITH_CROSS_DIR \ + -DCMAKE_C_COMPILER_TARGET=$TRIPLE \ + -DCMAKE_CXX_COMPILER_TARGET=$TRIPLE \ + -DCMAKE_ASM_COMPILER_TARGET=$TRIPLE \ + -DHAVE_POLL_FINE_EXITCODE=OFF \ + -DHAVE_POLL_FINE_EXITCODE__TRYRUN_OUTPUT=OFF \ + -DCMAKE_PREFIX_PATH=$WITH_CROSS_DIR \ + -DBUILD_CursesDialog=OFF + fi samu } package() { cd $pkgname-$pkgver + if [ ! -z "$WITH_CROSS" ]; then + cd build + fi DESTDIR=$pkgdir samu install } -package_doc() { - cd $pkgname-$pkgver - DESDIR=$pkgdir samu install - rm -r $pkgdir/usr/bin - rm -r $pkgdir/usr/share/info - rm -r $pkgdir/usr/include -} -package_dev() { - cd $pkgname-$pkgver - DESTDIR=$pkgdir samu install - rm -r $pkgdir/usr/bin - rm -r $pkgdir/usr/share +backup() { + return } license() { cd $pkgname-$pkgver - cat COPYING + cat Copyright.txt } From c16d63a8e982027711905c312859456f7df3a942 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Sat, 23 Apr 2022 16:06:48 +0000 Subject: [PATCH 119/151] libffi: cross --- base/libffi/build.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/base/libffi/build.sh b/base/libffi/build.sh index 47a93b1..53d3dd4 100644 --- a/base/libffi/build.sh +++ b/base/libffi/build.sh @@ -2,6 +2,7 @@ pkgver=3.3 pkgname=libffi bad="gmake" ext="dev" +auto_cross fetch() { curl -L "https://github.com/libffi/libffi/releases/download/v3.3/libffi-3.3.tar.gz" -o $pkgname-$pkgver.tar.gz @@ -10,7 +11,9 @@ fetch() { build() { cd $pkgname-$pkgver - ./configure --prefix=/usr + ./configure --prefix=/usr \ + --build=$HOST_TRIPLE \ + --host=$TRIPLE bad --gmake gmake } From f155ccb2a8f9f40bfac6571e0fb85c7c4075bfbd Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Sat, 23 Apr 2022 16:07:26 +0000 Subject: [PATCH 120/151] libffi: fix build --- base/libffi/build.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/base/libffi/build.sh b/base/libffi/build.sh index 53d3dd4..24e0100 100644 --- a/base/libffi/build.sh +++ b/base/libffi/build.sh @@ -31,3 +31,7 @@ license() { cd $pkgname-$pkgver cat LICENSE } + +backup() { + return +} From 25b5bd7b328953353e1584d2931ce6082a371c23 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Sat, 23 Apr 2022 16:08:52 +0000 Subject: [PATCH 121/151] python: cross --- base/python/build.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/base/python/build.sh b/base/python/build.sh index d1edb31..438dea4 100644 --- a/base/python/build.sh +++ b/base/python/build.sh @@ -2,6 +2,7 @@ pkgname=python pkgver=3.9.7 bad="" ext="doc" +auto_cross fetch() { curl "https://www.python.org/ftp/python/$pkgver/Python-$pkgver.tar.xz" -o $pkgname-$pkgver.tar.xz @@ -13,8 +14,8 @@ build() { cd $pkgname-$pkgver ./configure \ --prefix=/usr \ - --build=$TARGET \ - --host=$TARGET \ + --build=$HOST_TRIPLE \ + --host=$TRIPLE \ --with-system-ffi=true \ --with-ssl-default-suites=openssl \ ax_cv_c_float_words_bigendian=no From 4f67771a2b0a4e4dfafad49bcf2f3f24c8e19a7e Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Sat, 23 Apr 2022 16:11:08 +0000 Subject: [PATCH 122/151] python: update --- base/python/build.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/base/python/build.sh b/base/python/build.sh index 438dea4..635e5dd 100644 --- a/base/python/build.sh +++ b/base/python/build.sh @@ -1,5 +1,5 @@ pkgname=python -pkgver=3.9.7 +pkgver=3.10.4 bad="" ext="doc" auto_cross @@ -25,14 +25,14 @@ build() { package() { cd $pkgname-$pkgver make install DESTDIR=$pkgdir - rm -r $pkgdir/usr/lib/python3.9/test - rm -r $pkgdir/usr/lib/python3.9/ctypes/test - rm -r $pkgdir/usr/lib/python3.9/distutils/tests - rm -r $pkgdir/usr/lib/python3.9/idlelib/idle_test - rm -r $pkgidr/usr/lib/python3.9/lib2to3/tests - rm -r $pkgidr/usr/lib/python3.9/sqlite3/test - rm -r $pkgdir/usr/lib/python3.9/tkinter/test - rm -r $pkgdir/usr/lib/python3.9/unittest/test + rm -r $pkgdir/usr/lib/python3.10/test + rm -r $pkgdir/usr/lib/python3.10/ctypes/test + rm -r $pkgdir/usr/lib/python3.10/distutils/tests + rm -r $pkgdir/usr/lib/python3.10/idlelib/idle_test + rm -r $pkgidr/usr/lib/python3.10/lib2to3/tests + rm -r $pkgidr/usr/lib/python3.10/sqlite3/test + rm -r $pkgdir/usr/lib/python3.10/tkinter/test + rm -r $pkgdir/usr/lib/python3.10/unittest/test rm -r $pkgdir/usr/share ln -sr $pkgdir/usr/bin/python3 $pkgdir/usr/bin/python } From fd7657e5af5dfc0604dae50463c383e7fa98cbf6 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Sat, 23 Apr 2022 16:16:36 +0000 Subject: [PATCH 123/151] python: fix cross --- base/python/build.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/base/python/build.sh b/base/python/build.sh index 635e5dd..c7d0b53 100644 --- a/base/python/build.sh +++ b/base/python/build.sh @@ -18,7 +18,8 @@ build() { --host=$TRIPLE \ --with-system-ffi=true \ --with-ssl-default-suites=openssl \ - ax_cv_c_float_words_bigendian=no + ax_cv_c_float_words_bigendian=no \ + ac_cv_buggy_getaddrinfo=no make } From 74d7e57319965f8b680878762b5a96fb359330df Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Sat, 23 Apr 2022 16:19:04 +0000 Subject: [PATCH 124/151] python: fix cross again --- base/python/build.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/base/python/build.sh b/base/python/build.sh index c7d0b53..7630f99 100644 --- a/base/python/build.sh +++ b/base/python/build.sh @@ -19,7 +19,8 @@ build() { --with-system-ffi=true \ --with-ssl-default-suites=openssl \ ax_cv_c_float_words_bigendian=no \ - ac_cv_buggy_getaddrinfo=no + ac_cv_buggy_getaddrinfo=no \ + ac_cv_file__dev_ptmx=yes make } From 27f8f32dc503dfbb1ada995ddba7771c4696e99c Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Sat, 23 Apr 2022 16:20:35 +0000 Subject: [PATCH 125/151] python: fix cross again --- base/python/build.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/base/python/build.sh b/base/python/build.sh index 7630f99..9c26091 100644 --- a/base/python/build.sh +++ b/base/python/build.sh @@ -20,7 +20,8 @@ build() { --with-ssl-default-suites=openssl \ ax_cv_c_float_words_bigendian=no \ ac_cv_buggy_getaddrinfo=no \ - ac_cv_file__dev_ptmx=yes + ac_cv_file__dev_ptmx=yes \ + ac_cv_file__dev_ptc=no make } From a924e2bb417254e571f62df3d8776b9de3b18252 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Sat, 23 Apr 2022 17:00:21 +0000 Subject: [PATCH 126/151] python: don't ensure pip --- base/python/build.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/base/python/build.sh b/base/python/build.sh index 9c26091..dcff112 100644 --- a/base/python/build.sh +++ b/base/python/build.sh @@ -11,13 +11,14 @@ fetch() { } build() { - cd $pkgname-$pkgver + cd $pkgname-$pkgver ./configure \ --prefix=/usr \ --build=$HOST_TRIPLE \ --host=$TRIPLE \ --with-system-ffi=true \ --with-ssl-default-suites=openssl \ + --without-ensure-pip \ ax_cv_c_float_words_bigendian=no \ ac_cv_buggy_getaddrinfo=no \ ac_cv_file__dev_ptmx=yes \ From 34af7242ae4db21fc572c7de5f57c6ebd98c9a2a Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Sat, 23 Apr 2022 17:10:54 +0000 Subject: [PATCH 127/151] libffi: use PREFIX --- base/libffi/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/libffi/build.sh b/base/libffi/build.sh index 24e0100..2be4125 100644 --- a/base/libffi/build.sh +++ b/base/libffi/build.sh @@ -11,7 +11,7 @@ fetch() { build() { cd $pkgname-$pkgver - ./configure --prefix=/usr \ + ./configure --prefix=$PREFIX \ --build=$HOST_TRIPLE \ --host=$TRIPLE bad --gmake gmake From b450e4f01ef00a79b64f5774b26bf90ee81d6cf3 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Sat, 23 Apr 2022 18:47:35 +0000 Subject: [PATCH 128/151] initial installation guide --- INSTALL.md | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 INSTALL.md diff --git a/INSTALL.md b/INSTALL.md new file mode 100644 index 0000000..f59c26e --- /dev/null +++ b/INSTALL.md @@ -0,0 +1,67 @@ +# Iglunix Installation Guide + +## Getting an installation image +There are two ways of getting hold of an install image: From the releases tab on +GitHub and with [iglunix-autobuild](https://github.com/iglunix/iglunix-autobuild). + +### Using Autobuild +``` +git clone https://github.com/iglunix/iglunix-autobuild +cd iglunix-autobuild +./autobuild.sh +./chroot.sh +./img.sh +``` + +### Writing the image +Write the image to a USB to boot on the target computer. +Make sure to triple check which disk you're writing to. +``` +dd if=build/iglunix.img of=/dev/sdX bs=64M +``` + +## Disk Partitioning +Iglunix recommends a two partition layout with an MBR partition table, a FAT +formatted boot partition and an EXT4 formated root partition. The following +is a guide on how to do it where `/dev/disk` is the target install disk. +``` +fdisk /dev/disk +>o +>n +>p +>1 +>2048 +>+512M +>t +>ef +>n +>p +>2 +> +> +>w + +mkfs.vfat -n BOOT /dev/disk1 +mkfs.ext4 -L ROOT /dev/disk2 +mkdir /install_root +mount /dev/disk2 /install_root +mkdir /install_root/boot +mount /dev/disk1 /install_root/boot +``` + +## Extracting Packages +For any packages you want to install +``` +tar -I zstd -xf /mnt/..tar.zst -C /install_root +``` + +## Installing Bootloaders + +``` +limine-deploy /dev/disk +cp /usr/share/limine/limine.sys /install_root/boot +# If the oslo package wasn't installed earlier and you want UEFI support +cp /usr/share/limine/BOOTX64.EFI /install_root/boot/efi/boot/bootx64.efi +``` +Edit `/install_root/boot/efi/oslo/entries.ini` and `/install_root/boot/limine.cfg` +accordingly From 746d4af16a19f3a8efe2dcc5b40cb03619ea0ed0 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Sun, 24 Apr 2022 10:36:25 +0000 Subject: [PATCH 129/151] llvm: fix cross from void musl --- base/llvm/build.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/base/llvm/build.sh b/base/llvm/build.sh index c349a9a..a5fbb82 100644 --- a/base/llvm/build.sh +++ b/base/llvm/build.sh @@ -21,7 +21,11 @@ build() { -DCMAKE_CXX_COMPILER_WORKS=ON \ -DCMAKE_SYSTEM_NAME=Linux \ -DLLVM_TABLEGEN=$(pwd)/host-build/bin/llvm-tblgen \ - -DCLANG_TABLEGEN=$(pwd)/host-build/bin/clang-tblgen" + -DCLANG_TABLEGEN=$(pwd)/host-build/bin/clang-tblgen \ + -DLLVM_CONFIG_PATH=/usr/bin/llvm-config \ + -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER \ + -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \ + -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY" mkdir -p host-build cd host-build cmake -G Ninja -Wno-dev \ From 9fb7decc0ac291328acbddb150e66fbe39e377fe Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Tue, 26 Apr 2022 09:15:04 +0000 Subject: [PATCH 130/151] update readme --- README.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index bc2dc37..eaf52ce 100644 --- a/README.md +++ b/README.md @@ -14,9 +14,13 @@ majority of the base system, and Musl to be explicit about the C library, target triple and to differentiate it from any system using LLVM's libc (which will may very well likely use in the future). +## Instalation +See [INSTALL.md](INSTALL.md) + ## Discord Join us at [link](https://discord.gg/NKB9qD2bMx) + ## Web Browsers Iglunix has Firefox ESR packaged requiring 2 extra GNU packages: `gm4` and @@ -60,9 +65,3 @@ openssl and maybe ffmpeg replacing gstreamer. |sudo | doas | Privilege escalation | |pkg-config | pkgconf | Package configuration tool | |e2fsprogs | make_ext4fs | Make an ext4 file system | - - - -## TODO (lots more TODO items in the Discord) - - LLVM (Work out how to split packages) - - QEMU for multiarch (need lots of work on glibr to get this to build) From 09ab08e3351e6a4a1e032c121b105a703b438d79 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Thu, 28 Apr 2022 19:17:52 +0000 Subject: [PATCH 131/151] fix rust --- extra/rust/build.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/extra/rust/build.sh b/extra/rust/build.sh index 674eb31..035774d 100644 --- a/extra/rust/build.sh +++ b/extra/rust/build.sh @@ -21,10 +21,9 @@ _clear_vendor_checksums() { sed -i 's/\("files":{\)[^}]*/\1/' vendor/$1/.cargo-checksum.json } -export RUSTROOT="/usr" +export RUSTROOT="/opt/rust/" fetch() { - return curl "https://static.rust-lang.org/dist/rustc-$pkgver-src.tar.gz" -o $pkgname-$pkgver.tar.xz tar -xf $pkgname-$pkgver.tar.xz @@ -44,7 +43,6 @@ fetch() { build() { cd $pkgname-$pkgver - return # --tools="cargo,rls,rustfmt,src" \ OPENSSL_LIB_DIR=/usr/lib/ ./configure \ --build="$TRIPLE" \ @@ -77,7 +75,8 @@ build() { --set="target.$TRIPLE.cc=cc" \ --set="target.$TRIPLE.cxx=c++" \ --set="target.$TRIPLE.ar=ar" \ - --set="target.$TRIPLE.linker=cc" + --set="target.$TRIPLE.linker=cc" \ + --disable-llvm-static-stdcpp sed 's/#deny-warnings = .*/deny-warnings = false/' -i config.toml # sed 's|deny(warnings,|deny(|' -i src/bootstrap/lib.rs From 47c2233e4ec87e79a06a4ee21e0e47a2d5c03d20 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Thu, 28 Apr 2022 19:52:34 +0000 Subject: [PATCH 132/151] fix rust bootstrap --- bootstrap/rust/build.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bootstrap/rust/build.sh b/bootstrap/rust/build.sh index ba67806..51752dc 100644 --- a/bootstrap/rust/build.sh +++ b/bootstrap/rust/build.sh @@ -17,14 +17,14 @@ build() { } package() { - stat $pkgdir/opt/rust/lib/rustlib/uninstall.sh > /dev/null 2> /dev/null \ + [ -f $pkgdir/opt/rust/lib/rustlib/uninstall.sh ] \ || ./rust-$pkgver-$ARCH-unknown-linux-musl/install.sh \ --disable-ldconfig \ --destdir=$pkgdir \ --prefix=/opt/rust - stat $pkgdir/opt/rust/lib/libgcc_s.so \ - || cp ./libgcc_s.so $pkgdir/opt/rust/lib/libgcc_s.so + [ -f $pkgdir/opt/rust/lib/libgcc_s.so.1 ] \ + || cp ./libgcc_s.so $pkgdir/opt/rust/lib/libgcc_s.so.1 } backup() { From f5a58407145ee5bf9a34a0cee5d126c5c3e60545 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Thu, 28 Apr 2022 20:17:01 +0000 Subject: [PATCH 133/151] rust bootstrap: fix missing -lunwind --- bootstrap/rust/build.sh | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/bootstrap/rust/build.sh b/bootstrap/rust/build.sh index 51752dc..1a08efd 100644 --- a/bootstrap/rust/build.sh +++ b/bootstrap/rust/build.sh @@ -2,18 +2,15 @@ pkgname=rust pkgver=beta fetch() { - stat rust.tar.gz > /dev/null 2> /dev/null \ - || curl "https://static.rust-lang.org/dist/rust-$pkgver-$ARCH-unknown-linux-musl.tar.gz" -o rust.tar.gz - - stat rust-$pkgver-$ARCH-unknown-linux-musl > /dev/null 2> /dev/null \ - || tar -xf rust.tar.gz + curl "https://static.rust-lang.org/dist/rust-$pkgver-$ARCH-unknown-linux-musl.tar.gz" -o rust.tar.gz + tar -xf rust.tar.gz } build() { - stat libgcc_s.so > /dev/null 2> /dev/null \ + [ -f libgcc_s.so ] \ || clang -shared -o libgcc_s.so \ -Wl,--allow-multiple-definition -Wl,--whole-archive \ - $(clang -print-libgcc-file-name) + $(clang -print-libgcc-file-name) -lunwind } package() { From 357b165cb111957860bd1c154437e8940c890f6d Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Sat, 30 Apr 2022 19:44:59 +0000 Subject: [PATCH 134/151] add firefox-hg --- gui/firefox-hg/avoid-redefinition.patch | 15 ++++ gui/firefox-hg/build.sh | 94 +++++++++++++++++++++++++ gui/firefox-hg/grefptr.patch | 10 +++ gui/firefox-hg/libcxx.patch | 69 ++++++++++++++++++ 4 files changed, 188 insertions(+) create mode 100644 gui/firefox-hg/avoid-redefinition.patch create mode 100644 gui/firefox-hg/build.sh create mode 100644 gui/firefox-hg/grefptr.patch create mode 100644 gui/firefox-hg/libcxx.patch diff --git a/gui/firefox-hg/avoid-redefinition.patch b/gui/firefox-hg/avoid-redefinition.patch new file mode 100644 index 0000000..af11c50 --- /dev/null +++ b/gui/firefox-hg/avoid-redefinition.patch @@ -0,0 +1,15 @@ +Author: Rasmus Thomsen +Reason: FF is mixing userspace net headers (net/if.h) and kernelspace ones +(linux/if.h), leading to redefinitions. We need to include net/if.h before +linux/if.h because linux/if.h has redifinition guards whereas net/if.h doesnt +Upstream: No +--- a/dom/media/webrtc/transport/third_party/nICEr/src/stun/addrs-netlink.c.orig 2020-07-28 19:24:32.359751046 +0200 ++++ b/dom/media/webrtc/transport/third_party/nICEr/src/stun/addrs-netlink.c 2020-07-28 19:24:37.856343751 +0200 +@@ -31,6 +31,7 @@ + */ + + #if defined(LINUX) ++#include + #include "addrs-netlink.h" + #include + #include diff --git a/gui/firefox-hg/build.sh b/gui/firefox-hg/build.sh new file mode 100644 index 0000000..d2079b3 --- /dev/null +++ b/gui/firefox-hg/build.sh @@ -0,0 +1,94 @@ +pkgname=firefox +pkgver=26726cd430955db041e5de33d9792bb816c57608 +mkdeps="cbindgen:rust" + +fetch() { + #curl "https://ftp.mozilla.org/pub/firefox/releases/${pkgver}esr/source/firefox-${pkgver}esr.source.tar.xz" -o $pkgname-$pkgver.tar.xz + curl "https://hg.mozilla.org/mozilla-unified/archive/26726cd430955db041e5de33d9792bb816c57608.zip" -o $pkgname-$pkgver.zip + unzip + mv mozilla-unified-$pkgver $pkgname-$pkgver + cd $pkgname-$pkgver + # patch -p1 < ../../no-x11.patch + # patch -p1 < ../../fix-clang-as.patch + patch -p1 < ../../avoid-redefinition.patch + patch -p1 < ../../libcxx.patch + patch -p1 < ../../grefptr.patch + # patch -p1 < ../../sandbox-fork.patch + # patch -p1 < ../../sandbox-sched.patch +} + +build() { + cd $pkgname-$pkgver + ulimit -n 4096 + + + export MACH_USE_SYSTEM_PYTHON=1 + export CXXSTDLIB=c++ + export LDFLAGS="$LDFLAGS -Wl,-rpath=/usr/lib/firefox/,--enable-new-dtags" + + cat > .mozconfig << EOF +ac_add_options --enable-default-toolkit=cairo-gtk3-wayland +ac_add_options --prefix=/usr +ac_add_options --libdir=/usr/lib +ac_add_options --disable-alsa +ac_add_options --enable-dbus +ac_add_options --enable-strip +ac_add_options --enable-release +ac_add_options --enable-rust-simd +ac_add_options --enable-install-strip +ac_add_options --enable-official-branding +ac_add_options --enable-application=browser +ac_add_options --enable-optimize="-O3 -w" +ac_add_options --without-system-libvpx +ac_add_options --without-system-ffi +ac_add_options --without-system-png +ac_add_options --without-system-jpeg +ac_add_options --without-system-zlib +ac_add_options --without-system-pixman +ac_add_options --without-system-nss +ac_add_options --without-system-nspr +ac_add_options --enable-linker=lld +ac_add_options --disable-tests +ac_add_options --disable-vtune +ac_add_options --disable-updater +ac_add_options --disable-jemalloc +ac_add_options --disable-callgrind +ac_add_options --disable-profiling +ac_add_options --disable-necko-wifi +ac_add_options --disable-crashreporter +ac_add_options --enable-pulseaudio +ac_add_options --disable-accessibility +ac_add_options --disable-debug +ac_add_options --disable-debug-symbols +ac_add_options --disable-parental-controls +ac_add_options --disable-system-extension-dirs +ac_add_options --enable-webrtc +ac_add_options --disable-elf-hack +ac_add_options --without-wasm-sandboxed-libraries +#ac_add_options MOZ_PGO=1 +EOF + + bad --gmake --gm4 --autoconf ./mach clobber + bad --gmake --gm4 --autoconf ./mach build +} + +package() { + cd $pkgname-$pkgver + + export MACH_USE_SYSTEM_PYTHON=1 + export CXXSTDLIB=c++ + export RUSTFLAGS='-C target-feature=-crt-static' + export LDFLAGS="$LDFLAGS -Wl,-rpath=/usr/lib/firefox/,--enable-new-dtags" + + DESTDIR=$pkgdir bad --gmake --gm4 --autoconf ./mach install +} + +backup() { + return +} + +license() { + cd $pkgname-$pkgver + cat LICENSE +# cat COPYING +} diff --git a/gui/firefox-hg/grefptr.patch b/gui/firefox-hg/grefptr.patch new file mode 100644 index 0000000..d0f5692 --- /dev/null +++ b/gui/firefox-hg/grefptr.patch @@ -0,0 +1,10 @@ +--- a/widget/gtk/nsClipboard.cpp ++++ b/widget/gtk/nsClipboard.cpp +@@ -31,6 +31,7 @@ + #include "nsIObserverService.h" + #include "mozilla/Services.h" + #include "mozilla/RefPtr.h" ++#include "GRefPtr.h" + #include "mozilla/SchedulerGroup.h" + #include "mozilla/StaticPrefs_widget.h" + #include "mozilla/TimeStamp.h" diff --git a/gui/firefox-hg/libcxx.patch b/gui/firefox-hg/libcxx.patch new file mode 100644 index 0000000..d14cdc8 --- /dev/null +++ b/gui/firefox-hg/libcxx.patch @@ -0,0 +1,69 @@ +--- a/memory/mozalloc/throw_gcc.h ++++ b/memory/mozalloc/throw_gcc.h +@@ -74,50 +74,66 @@ __throw_bad_function_call(void) { + mozalloc_abort("fatal: STL threw bad_function_call"); + } + ++#if !defined(_LIBCPP_VERSION) + MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void __throw_logic_error( + const char* msg) { + mozalloc_abort(msg); + } ++#endif // _LIBCPP_VERSION + ++#if !defined(_LIBCPP_VERSION) + MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void __throw_domain_error( + const char* msg) { + mozalloc_abort(msg); + } ++#endif // _LIBCPP_VERSION + ++#if !defined(_LIBCPP_VERSION) + MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void + __throw_invalid_argument(const char* msg) { + mozalloc_abort(msg); + } ++#endif // _LIBCPP_VERSION + ++#if !defined(_LIBCPP_VERSION) + MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void __throw_length_error( + const char* msg) { + mozalloc_abort(msg); + } ++#endif // _LIBCPP_VERSION + ++#if !defined(_LIBCPP_VERSION) + MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void __throw_out_of_range( + const char* msg) { + mozalloc_abort(msg); + } ++#endif // _LIBCPP_VERSION + + MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void __throw_runtime_error( + const char* msg) { + mozalloc_abort(msg); + } + ++#if !defined(_LIBCPP_VERSION) + MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void __throw_range_error( + const char* msg) { + mozalloc_abort(msg); + } ++#endif // _LIBCPP_VERSION + ++#if !defined(_LIBCPP_VERSION) + MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void + __throw_overflow_error(const char* msg) { + mozalloc_abort(msg); + } ++#endif // _LIBCPP_VERSION + ++#if !defined(_LIBCPP_VERSION) + MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void + __throw_underflow_error(const char* msg) { + mozalloc_abort(msg); + } ++#endif // _LIBCPP_VERSION + + MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void __throw_ios_failure( + const char* msg) { From 16a5b53b85ffa3064bd566979ec8e792b4219aa3 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Sat, 30 Apr 2022 19:45:20 +0000 Subject: [PATCH 135/151] add dbus-glib for firefox --- gnome/dbus-glib/build.sh | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 gnome/dbus-glib/build.sh diff --git a/gnome/dbus-glib/build.sh b/gnome/dbus-glib/build.sh new file mode 100644 index 0000000..e271505 --- /dev/null +++ b/gnome/dbus-glib/build.sh @@ -0,0 +1,36 @@ +pkgname=dbus-glib +pkgver=0.112 + +fetch() { + curl "https://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-$pkgver.tar.gz" -o $pkgname-$pkgver.tar.gz + tar -xf $pkgname-$pkgver.tar.gz + mkdir $pkgname-$pkgver/build +} + +build() { + cd $pkgname-$pkgver + ./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --build=$TRIPLE \ + --host=$TRIPLE + + bad --gmake gmake +} + +package() { + cd $pkgname-$pkgver + bad --gmake gmake install DESTDIR=$pkgdir + rm -rf $pkgdir/etc + rm -rf $pkgdir/usr/libexec + rm -rf $pkgdir/usr/share/gtk-doc +} + +license() { + cd $pkgname-$pkgver + cat COPYING +} + +backup() { + return +} From 1b6733360f5d4cf4ab452def84a1b7849a70f233 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Sat, 30 Apr 2022 21:37:36 +0000 Subject: [PATCH 136/151] add snd --- snd/libpulse/build.sh | 44 +++++++++++++++++++ snd/libsndfile/build.sh | 34 +++++++++++++++ snd/ncspot/build.sh | 56 ++++++++++++++++++++++++ snd/ncspot/cursive_ptr.patch | 11 +++++ snd/pipewire/build.sh | 77 +++++++++++++++++++++++++++++++++ snd/pipewire/libudev-zero.patch | 37 ++++++++++++++++ 6 files changed, 259 insertions(+) create mode 100644 snd/libpulse/build.sh create mode 100644 snd/libsndfile/build.sh create mode 100644 snd/ncspot/build.sh create mode 100644 snd/ncspot/cursive_ptr.patch create mode 100644 snd/pipewire/build.sh create mode 100644 snd/pipewire/libudev-zero.patch diff --git a/snd/libpulse/build.sh b/snd/libpulse/build.sh new file mode 100644 index 0000000..1778373 --- /dev/null +++ b/snd/libpulse/build.sh @@ -0,0 +1,44 @@ +pkgname=libpulse +pkgver=15.99.1 + +fetch() { + curl -L "https://freedesktop.org/software/pulseaudio/releases/pulseaudio-$pkgver.tar.xz" -o $pkgname-$pkgver.tar.bz2 + tar -xf $pkgname-$pkgver.tar.bz2 + mv pulseaudio-$pkgver $pkgname-$pkgver + mkdir $pkgname-$pkgver/build + cd $pkgname-$pkgver +} + +build() { + cd $pkgname-$pkgver + cd build + meson .. \ + --buildtype=release \ + --prefix=/usr \ + --libexecdir=lib \ + -Ddaemon=false \ + -Dtests=false \ + -Ddoxygen=false \ + -Dclient=true \ + -Dgtk=disabled \ + -Dman=false + samu +} + +package() { + cd $pkgname-$pkgver + cd build + DESTDIR=$pkgdir samu install + rm -rf $pkgdir/usr/share/locale + rm -rf $pkgdir/usr/share/bash* +} + +backup() { + return +} + +license() { + cd $pkgname-$pkgver + cat LICENSE +# cat COPYING +} diff --git a/snd/libsndfile/build.sh b/snd/libsndfile/build.sh new file mode 100644 index 0000000..e56e658 --- /dev/null +++ b/snd/libsndfile/build.sh @@ -0,0 +1,34 @@ +pkgname=libsndfile +pkgver=1.0.31 + +fetch() { + curl -L "https://github.com/libsndfile/libsndfile/releases/download/$pkgver/libsndfile-$pkgver.tar.bz2" -o $pkgname-$pkgver.tar.bz2 + tar -xf $pkgname-$pkgver.tar.bz2 + mkdir $pkgname-$pkgver/build +} + +build() { + cd $pkgname-$pkgver + cd build + cmake -G Ninja ../ \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DBUILD_SHARED_LIBS=ON + samu +} + +package() { + cd $pkgname-$pkgver + cd build + DESTDIR=$pkgdir samu install +} + +backup() { + return +} + +license() { + cd $pkgname-$pkgver + cat COPYING +} diff --git a/snd/ncspot/build.sh b/snd/ncspot/build.sh new file mode 100644 index 0000000..379ec6b --- /dev/null +++ b/snd/ncspot/build.sh @@ -0,0 +1,56 @@ +pkgname=ncspot +pkgver=0.9.6 + +_clear_vendor_checksums() { + sed -i 's/\("files":{\)[^}]*/\1/' vendor/$1/.cargo-checksum.json +} + +fetch() { + curl -L "https://github.com/hrkfdn/ncspot/archive/refs/tags/v$pkgver.tar.gz" -o $pkgname-$pkgver.tar.gz + # # curl -L "https://github.com/sfackler/rust-openssl/archive/refs/tags/openssl-v0.10.34.tar.gz" -o rust-openssl.tar.gz + # curl -L "https://github.com/Ella-0/ncurses-rs/archive/refs/heads/master.tar.gz" -o ncurses.tar.gz + # curl -L "https://github.com/Ella-0/pancurses/archive/refs/heads/master.tar.gz" -o pancurses.tar.gz + # tar -xf ncurses.tar.gz + # mv ncurses-rs-master ncurses + # tar -xf pancurses.tar.gz + # mv pancurses-master pancurses + tar -xf $pkgname-$pkgver.tar.gz + # cp ../cursive_ptr.patch . + cd $pkgname-$pkgver + mkdir -p .cargo + cargo vendor > .cargo/config + # # _clear_vendor_checksums openssl-sys + # # _clear_vendor_checksums openssl + # _clear_vendor_checksums ncurses + # _clear_vendor_checksums pancurses + # _clear_vendor_checksums cursive + # # cp -r ../rust-openssl-openssl-v0.10.34/openssl/ vendor/ + # # cp -r ../rust-openssl-openssl-v0.10.34/openssl-sys/ vendor/ + # cp -r ../ncurses/ vendor/ + # cp -r ../pancurses/ vendor/ + # # sed vendor/openssl/Cargo.toml -i -e 's/0.10.34/0.10.33/g' + # # sed vendor/openssl/Cargo.toml -i -e 's/0.9.62/0.9.61/g' + # # sed vendor/openssl-sys/Cargo.toml -i -e 's/0.9.62/0.9.61/g' + # sed vendor/ncurses/Cargo.toml -i -e 's/5.100.0/5.101.0/g' + # patch -p1 < ../cursive_ptr.patch +} + +build() { + cd $pkgname-$pkgver + cargo build --release --no-default-features --features cursive/termion-backend,pulseaudio_backend +} + +package() { + cd $pkgname-$pkgver + install -Dm 755 target/release/$pkgname $pkgdir/usr/bin/ +} + +backup() { + return +} + +license() { + cd $pkgname-$pkgver + cat LICENSE +# cat COPYING +} diff --git a/snd/ncspot/cursive_ptr.patch b/snd/ncspot/cursive_ptr.patch new file mode 100644 index 0000000..342ef6c --- /dev/null +++ b/snd/ncspot/cursive_ptr.patch @@ -0,0 +1,11 @@ +--- a/vendor/cursive/src/backends/curses/pan.rs ++++ b/vendor/cursive/src/backends/curses/pan.rs +@@ -70,7 +70,7 @@ + pancurses::mouseinterval(0); + pancurses::mousemask( + pancurses::ALL_MOUSE_EVENTS | pancurses::REPORT_MOUSE_POSITION, +- ::std::ptr::null_mut(), ++ None, + ); + + // This asks the terminal to provide us with mouse drag events diff --git a/snd/pipewire/build.sh b/snd/pipewire/build.sh new file mode 100644 index 0000000..0d54b2a --- /dev/null +++ b/snd/pipewire/build.sh @@ -0,0 +1,77 @@ +pkgname=pipewire +pkgver=0.3.48 +mver=0.4.1 + +fetch() { + curl "https://gitlab.freedesktop.org/pipewire/pipewire/-/archive/$pkgver/pipewire-$pkgver.tar.bz2" -o $pkgname-$pkgver.tar.bz2 + curl "https://gitlab.freedesktop.org/pipewire/media-session/-/archive/$mver/media-session-$mver.tar.bz2" -O + tar -xf $pkgname-$pkgver.tar.bz2 + mkdir $pkgname-$pkgver/build + tar -xf media-session-$mver.tar.bz2 -C $pkgname-$pkgver/subprojects/ + mv $pkgname-$pkgver/subprojects/media-session-$mver $pkgname-$pkgver/subprojects/media-session + cd $pkgname-$pkgver + patch -p1 < ../../libudev-zero.patch +} + +build() { + cd $pkgname-$pkgver + cd build + meson .. \ + --buildtype=release \ + --prefix=/usr \ + --libexecdir=lib \ + -Ddocs=disabled \ + -Dexamples=disabled \ + -Dman=disabled \ + -Dinstalled_tests=disabled \ + -Dgstreamer=disabled \ + -Dsystemd=disabled \ + -Dpipewire-jack=disabled \ + -Dpipewire-alsa=enabled \ + -Dpipewire-v4l2=disabled \ + -Dspa-plugins=enabled \ + -Dalsa=enabled \ + -Daudiomixer=enabled \ + -Dbluez5=disabled \ + -Dcontrol=enabled \ + -Daudiotestsrc=enabled \ + -Dffmpeg=disabled \ + -Djack=disabled \ + -Dsupport=enabled \ + -Devl=disabled \ + -Dv4l2=disabled \ + -Ddbus=enabled \ + -Dlibcamera=disabled \ + -Dvideoconvert=disabled \ + -Dvideotestsrc=disabled \ + -Dvolume=enabled \ + -Dvulkan=disabled \ + -Dpw-cat=enabled \ + -Dudev=enabled \ + -Dsdl2=disabled \ + -Dsndfile=enabled \ + -Dlibpulse=enabled \ + -Droc=disabled \ + -Davahi=disabled \ + -Dlibusb=disabled \ + -Draop=disabled \ + -Dlv2=disabled \ + -Dsession-managers="['media-session']" + + samu +} + +package() { + cd $pkgname-$pkgver + cd build + DESTDIR=$pkgdir samu install +} + +backup() { + return +} + +license() { + cd $pkgname-$pkgver + cat COPYING +} diff --git a/snd/pipewire/libudev-zero.patch b/snd/pipewire/libudev-zero.patch new file mode 100644 index 0000000..a34220e --- /dev/null +++ b/snd/pipewire/libudev-zero.patch @@ -0,0 +1,37 @@ +diff --git a/spa/plugins/alsa/alsa-udev.c b/spa/plugins/alsa/alsa-udev.c +index 61ad1af..52510b5 100644 +--- a/spa/plugins/alsa/alsa-udev.c ++++ b/spa/plugins/alsa/alsa-udev.c +@@ -148,9 +148,6 @@ static uint32_t get_card_id(struct impl *this, struct udev_device *dev) + if ((str = udev_device_get_property_value(dev, "SOUND_CLASS")) && spa_streq(str, "modem")) + return SPA_ID_INVALID; + +- if (udev_device_get_property_value(dev, "SOUND_INITIALIZED") == NULL) +- return SPA_ID_INVALID; +- + if ((str = udev_device_get_property_value(dev, "DEVPATH")) == NULL) + return SPA_ID_INVALID; + +@@ -627,7 +624,7 @@ static int enum_devices(struct impl *this) + + for (devices = udev_enumerate_get_list_entry(enumerate); devices; + devices = udev_list_entry_get_next(devices)) { +- struct udev_device *dev; ++ struct udev_device *dev, *pdev; + + dev = udev_device_new_from_syspath(this->udev, udev_list_entry_get_name(devices)); + if (dev == NULL) +@@ -635,6 +632,13 @@ static int enum_devices(struct impl *this) + + process_device(this, ACTION_ADD, dev); + ++ pdev = udev_device_get_parent(dev); ++ if (pdev) { ++ process_device(this, ACTION_ADD, pdev); ++ } ++ ++ /* no need to call udev_device_unref(pdev) here. ++ udev_device_unref() will free parent device implicitly */ + udev_device_unref(dev); + } + udev_enumerate_unref(enumerate); From d80fa0f9312c9ada16edbf3a3711e0ef2a9b5b8d Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Sat, 7 May 2022 19:39:10 +0000 Subject: [PATCH 137/151] firefox-hg: update to 101.0rc6 --- gui/firefox-hg/build.sh | 11 ++++++----- gui/firefox-hg/sandbox-allow-select.patch | 12 ++++++++++++ 2 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 gui/firefox-hg/sandbox-allow-select.patch diff --git a/gui/firefox-hg/build.sh b/gui/firefox-hg/build.sh index d2079b3..9f141b5 100644 --- a/gui/firefox-hg/build.sh +++ b/gui/firefox-hg/build.sh @@ -1,18 +1,19 @@ pkgname=firefox -pkgver=26726cd430955db041e5de33d9792bb816c57608 +pkgver=101.0 mkdeps="cbindgen:rust" fetch() { #curl "https://ftp.mozilla.org/pub/firefox/releases/${pkgver}esr/source/firefox-${pkgver}esr.source.tar.xz" -o $pkgname-$pkgver.tar.xz - curl "https://hg.mozilla.org/mozilla-unified/archive/26726cd430955db041e5de33d9792bb816c57608.zip" -o $pkgname-$pkgver.zip - unzip - mv mozilla-unified-$pkgver $pkgname-$pkgver + #curl "https://hg.mozilla.org/mozilla-unified/archive/26726cd430955db041e5de33d9792bb816c57608.zip" -o $pkgname-$pkgver.zip + curl "https://archive.mozilla.org/pub/firefox/releases/${pkgver}b3/source/firefox-${pkgver}b3.source.tar.xz" -o $pkgname-$pkgver.tar.xz + tar -xf $pkgname-$pkgver.tar.xz cd $pkgname-$pkgver # patch -p1 < ../../no-x11.patch # patch -p1 < ../../fix-clang-as.patch patch -p1 < ../../avoid-redefinition.patch patch -p1 < ../../libcxx.patch patch -p1 < ../../grefptr.patch + patch -p1 < ../../sandbox-allow-select.patch # patch -p1 < ../../sandbox-fork.patch # patch -p1 < ../../sandbox-sched.patch } @@ -68,7 +69,7 @@ ac_add_options --without-wasm-sandboxed-libraries #ac_add_options MOZ_PGO=1 EOF - bad --gmake --gm4 --autoconf ./mach clobber + # bad --gmake --gm4 --autoconf ./mach clobber bad --gmake --gm4 --autoconf ./mach build } diff --git a/gui/firefox-hg/sandbox-allow-select.patch b/gui/firefox-hg/sandbox-allow-select.patch new file mode 100644 index 0000000..b78334a --- /dev/null +++ b/gui/firefox-hg/sandbox-allow-select.patch @@ -0,0 +1,12 @@ +--- a/security/sandbox/linux/SandboxFilter.cpp ++++ b/security/sandbox/linux/SandboxFilter.cpp +@@ -1999,6 +1999,9 @@ + case __NR_uname: + return Allow(); + ++ CASES_FOR_select: ++ return Allow(); ++ + default: + return SandboxPolicyCommon::EvaluateSyscall(sysno); + } From ea117c1dc8168053cedccccac00fbd0274e12ff7 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Sat, 7 May 2022 20:11:04 +0000 Subject: [PATCH 138/151] firefox-hg: fix build --- gui/firefox-hg/sandbox-allow-select.patch | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/gui/firefox-hg/sandbox-allow-select.patch b/gui/firefox-hg/sandbox-allow-select.patch index b78334a..ce38dfd 100644 --- a/gui/firefox-hg/sandbox-allow-select.patch +++ b/gui/firefox-hg/sandbox-allow-select.patch @@ -1,6 +1,13 @@ --- a/security/sandbox/linux/SandboxFilter.cpp +++ b/security/sandbox/linux/SandboxFilter.cpp -@@ -1999,6 +1999,9 @@ +@@ -1992,20 +1992,23 @@ + Arg new_limit(2); + return If(AllOf(pid == 0, new_limit == 0), Allow()) + .Else(InvalidSyscall()); + } + #endif // DESKTOP + + // Bug 1640612 case __NR_uname: return Allow(); @@ -10,3 +17,10 @@ default: return SandboxPolicyCommon::EvaluateSyscall(sysno); } + } + }; + + UniquePtr GetSocketProcessSandboxPolicy( + SandboxBrokerClient* aMaybeBroker) { + return UniquePtr( + new SocketProcessSandboxPolicy(aMaybeBroker)); From f284766c8b5e7d610dd7186448d2b2e20efdc760 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Sat, 7 May 2022 20:30:04 +0000 Subject: [PATCH 139/151] remove firefox --- gui/firefox/build.sh | 83 --- gui/firefox/no-x11.patch | 1502 -------------------------------------- 2 files changed, 1585 deletions(-) delete mode 100644 gui/firefox/build.sh delete mode 100644 gui/firefox/no-x11.patch diff --git a/gui/firefox/build.sh b/gui/firefox/build.sh deleted file mode 100644 index 779d843..0000000 --- a/gui/firefox/build.sh +++ /dev/null @@ -1,83 +0,0 @@ -pkgname=firefox -pkgver=91.4.0 -mkdeps="cbindgen:rust" - -fetch() { - return - curl "https://ftp.mozilla.org/pub/firefox/releases/${pkgver}esr/source/firefox-${pkgver}esr.source.tar.xz" -o $pkgname-$pkgver.tar.xz - tar -xf $pkgname-$pkgver.tar.xz -} - -build() { - return - cd $pkgname-$pkgver - - - export MACH_USE_SYSTEM_PYTHON=1 - export CXXSTDLIB=c++ - export RUSTFLAGS='-C target-feature=-crt-static' - -# cat > .mozconfig << EOF -# ac_add_options --enable-default-toolkit=cairo-gtk3-wayland -# ac_add_options --prefix=/usr -# ac_add_options --libdir=/usr/lib -# ac_add_options --enable-alsa -# ac_add_options --enable-strip -# ac_add_options --enable-release -# ac_add_options --enable-rust-simd -# ac_add_options --enable-install-strip -# ac_add_options --enable-official-branding -# ac_add_options --enable-application=browser -# ac_add_options --enable-optimize="${CFLAGS:-} -w" -# ac_add_options --without-system-libvpx -# ac_add_options --without-system-ffi -# ac_add_options --without-system-png -# ac_add_options --without-system-jpeg -# ac_add_options --without-system-zlib -# ac_add_options --without-system-pixman -# ac_add_options --without-system-nss -# ac_add_options --without-system-nspr -# ac_add_options --disable-dbus -# ac_add_options --disable-gold -# ac_add_options --disable-tests -# ac_add_options --disable-vtune -# ac_add_options --disable-updater -# ac_add_options --disable-jemalloc -# ac_add_options --disable-callgrind -# ac_add_options --disable-profiling -# ac_add_options --disable-necko-wifi -# ac_add_options --disable-crashreporter -# ac_add_options --disable-pulseaudio -# ac_add_options --disable-accessibility -# ac_add_options --disable-debug -# ac_add_options --disable-debug-symbols -# ac_add_options --disable-parental-controls -# ac_add_options --disable-system-extension-dirs -# ac_add_options --disable-webrtc -# EOF - -#ac_add_options --disable-eme -#ac_add_options --disable-elf-hack - bad --gmake ./mach build -} - -package() { - cd $pkgname-$pkgver - - export MACH_USE_SYSTEM_PYTHON=1 - export CXXSTDLIB=c++ - export RUSTFLAGS='-C target-feature=-crt-static' - - - bad --gmake ./mach install -} - -backup() { - return -} - -license() { - cd $pkgname-$pkgver - cat LICENSE -# cat COPYING -} diff --git a/gui/firefox/no-x11.patch b/gui/firefox/no-x11.patch deleted file mode 100644 index f28006a..0000000 --- a/gui/firefox/no-x11.patch +++ /dev/null @@ -1,1502 +0,0 @@ -diff --git a/gfx/angle/checkout/include/EGL/eglplatform.h b/gfx/angle/checkout/include/EGL/eglplatform.h -index d1cae17724..505c334098 100644 ---- a/gfx/angle/checkout/include/EGL/eglplatform.h -+++ b/gfx/angle/checkout/include/EGL/eglplatform.h -@@ -122,7 +122,8 @@ typedef intptr_t EGLNativeDisplayType; - typedef intptr_t EGLNativePixmapType; - typedef intptr_t EGLNativeWindowType; - --#elif defined(__unix__) || defined(USE_X11) -+#elif defined(__unix__) -+#if defined(USE_X11) - - /* X11 (tentative) */ - #include -@@ -131,6 +132,11 @@ typedef intptr_t EGLNativeWindowType; - typedef Display *EGLNativeDisplayType; - typedef Pixmap EGLNativePixmapType; - typedef Window EGLNativeWindowType; -+#else -+typedef void *EGLNativeDisplayType; -+typedef khronos_uintptr_t EGLNativePixmapType; -+typedef khronos_uintptr_t EGLNativeWindowType; -+#endif - - #elif defined(__APPLE__) - -diff --git a/gfx/gl/GLContextProvider.h b/gfx/gl/GLContextProvider.h -index 12d1a497b9..bec4cd17f0 100644 ---- a/gfx/gl/GLContextProvider.h -+++ b/gfx/gl/GLContextProvider.h -@@ -55,17 +55,17 @@ namespace gl { - # define GL_CONTEXT_PROVIDER_NAME GLContextProviderX11 - # include "GLContextProviderImpl.h" - # undef GL_CONTEXT_PROVIDER_NAME --# if defined(MOZ_WAYLAND) --# define GL_CONTEXT_PROVIDER_NAME GLContextProviderWayland --# include "GLContextProviderImpl.h" --# undef GL_CONTEXT_PROVIDER_NAME --# define GL_CONTEXT_PROVIDER_DEFAULT GLContextProviderWayland --# endif - # ifndef GL_CONTEXT_PROVIDER_DEFAULT - # define GL_CONTEXT_PROVIDER_DEFAULT GLContextProviderX11 - # endif - #endif - -+#if defined(MOZ_WAYLAND) -+# define GL_CONTEXT_PROVIDER_NAME GLContextProviderWayland -+# include "GLContextProviderImpl.h" -+# undef GL_CONTEXT_PROVIDER_NAME -+# define GL_CONTEXT_PROVIDER_DEFAULT GLContextProviderWayland -+#endif - #ifndef GL_CONTEXT_PROVIDER_DEFAULT - # define GL_CONTEXT_PROVIDER_DEFAULT GLContextProviderEGL - #endif -diff --git a/gfx/gl/GLContextProviderWayland.cpp b/gfx/gl/GLContextProviderWayland.cpp -index 3f1f926cd9..6b61708be9 100644 ---- a/gfx/gl/GLContextProviderWayland.cpp -+++ b/gfx/gl/GLContextProviderWayland.cpp -@@ -14,7 +14,9 @@ namespace mozilla::gl { - using namespace mozilla::gfx; - using namespace mozilla::widget; - -+#ifdef MOZ_X11 - static class GLContextProviderX11 sGLContextProviderX11; -+#endif - static class GLContextProviderEGL sGLContextProviderEGL; - - // Note that if there is no GTK display, `GdkIsX11Display` and -@@ -33,9 +35,11 @@ already_AddRefed GLContextProviderWayland::CreateForCompositorWidget( - if (GdkIsWaylandDisplay()) { - return sGLContextProviderEGL.CreateForCompositorWidget( - aCompositorWidget, aHardwareWebRender, aForceAccelerated); -+#ifdef MOZ_X11 - } else { - return sGLContextProviderX11.CreateForCompositorWidget( - aCompositorWidget, aHardwareWebRender, aForceAccelerated); -+#endif - } - } - -@@ -44,8 +48,10 @@ already_AddRefed GLContextProviderWayland::CreateHeadless( - const GLContextCreateDesc& desc, nsACString* const out_failureId) { - if (GdkIsWaylandDisplay()) { - return sGLContextProviderEGL.CreateHeadless(desc, out_failureId); -+#ifdef MOZ_X11 - } else { - return sGLContextProviderX11.CreateHeadless(desc, out_failureId); -+#endif - } - } - -@@ -53,8 +59,10 @@ already_AddRefed GLContextProviderWayland::CreateHeadless( - GLContext* GLContextProviderWayland::GetGlobalContext() { - if (GdkIsWaylandDisplay()) { - return sGLContextProviderEGL.GetGlobalContext(); -+#ifdef MOZ_X11 - } else { - return sGLContextProviderX11.GetGlobalContext(); -+#endif - } - } - -@@ -62,8 +70,10 @@ GLContext* GLContextProviderWayland::GetGlobalContext() { - void GLContextProviderWayland::Shutdown() { - if (GdkIsWaylandDisplay()) { - sGLContextProviderEGL.Shutdown(); -+#ifdef MOZ_X11 - } else { - sGLContextProviderX11.Shutdown(); -+#endif - } - } - -diff --git a/gfx/gl/moz.build b/gfx/gl/moz.build -index 62ad33c786..481fc6d432 100644 ---- a/gfx/gl/moz.build -+++ b/gfx/gl/moz.build -@@ -13,7 +13,7 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa": - elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "uikit": - gl_provider = "EAGL" - elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": -- if CONFIG["MOZ_EGL_XRENDER_COMPOSITE"]: -+ if CONFIG["MOZ_EGL_XRENDER_COMPOSITE"] or CONFIG["MOZ_WAYLAND"]: - gl_provider = "EGL" - else: - gl_provider = "GLX" -diff --git a/gfx/layers/AnimationHelper.h b/gfx/layers/AnimationHelper.h -index f5a57b9c4d..72091c3a4f 100644 ---- a/gfx/layers/AnimationHelper.h -+++ b/gfx/layers/AnimationHelper.h -@@ -7,6 +7,7 @@ - #ifndef mozilla_layers_AnimationHelper_h - #define mozilla_layers_AnimationHelper_h - -+#include "X11UndefineNone.h" - #include "mozilla/dom/Nullable.h" - #include "mozilla/ComputedTimingFunction.h" // for ComputedTimingFunction - #include "mozilla/layers/AnimationStorageData.h" -@@ -15,7 +16,6 @@ - #include "mozilla/TimeStamp.h" // for TimeStamp - #include "mozilla/TimingParams.h" - #include "mozilla/Types.h" // for SideBits --#include "X11UndefineNone.h" - #include - - namespace mozilla { -diff --git a/gfx/layers/ipc/CompositorBridgeParent.cpp b/gfx/layers/ipc/CompositorBridgeParent.cpp -index 2ecd55b16a..82b56300c6 100644 ---- a/gfx/layers/ipc/CompositorBridgeParent.cpp -+++ b/gfx/layers/ipc/CompositorBridgeParent.cpp -@@ -72,7 +72,7 @@ - #include "mozilla/ProfilerLabels.h" - #include "mozilla/ProfilerMarkers.h" - #include "mozilla/Telemetry.h" --#ifdef MOZ_WIDGET_GTK -+#if defined(MOZ_WIDGET_GTK) && defined(MOZ_X11) - # include "basic/X11BasicCompositor.h" // for X11BasicCompositor - #endif - #include "nsCOMPtr.h" // for already_AddRefed -@@ -1402,7 +1402,7 @@ RefPtr CompositorBridgeParent::NewCompositor( - new CompositorOGL(this, mWidget, mEGLSurfaceSize.width, - mEGLSurfaceSize.height, mUseExternalSurfaceSize); - } else if (aBackendHints[i] == LayersBackend::LAYERS_BASIC) { --#ifdef MOZ_WIDGET_GTK -+#if defined(MOZ_WIDGET_GTK) && defined(MOZ_X11) - if (gfxVars::UseXRender()) { - compositor = new X11BasicCompositor(this, mWidget); - } else -diff --git a/gfx/thebes/gfxPlatformGtk.cpp b/gfx/thebes/gfxPlatformGtk.cpp -index 12e01681c7..860e876550 100644 ---- a/gfx/thebes/gfxPlatformGtk.cpp -+++ b/gfx/thebes/gfxPlatformGtk.cpp -@@ -62,6 +62,9 @@ - # include "mozilla/widget/nsWaylandDisplay.h" - # include "mozilla/widget/DMABufLibWrapper.h" - # include "mozilla/StaticPrefs_widget.h" -+# ifdef MOZ_WIDGET_GTK -+# include "mozilla/WidgetUtilsGtk.h" -+# endif - #endif - - #define GDK_PIXMAP_SIZE_MAX 32767 -@@ -97,7 +100,11 @@ gfxPlatformGtk::gfxPlatformGtk() { - } - - mMaxGenericSubstitutions = UNINITIALIZED_VALUE; -+#ifdef MOZ_X11 - mIsX11Display = gfxPlatform::IsHeadless() ? false : GdkIsX11Display(); -+#else -+ mIsX11Display = 0; -+#endif - if (XRE_IsParentProcess()) { - #ifdef MOZ_X11 - if (mIsX11Display && mozilla::Preferences::GetBool("gfx.xrender.enabled")) { -diff --git a/gfx/thebes/moz.build b/gfx/thebes/moz.build -index baa7005a8f..387dd29276 100644 ---- a/gfx/thebes/moz.build -+++ b/gfx/thebes/moz.build -@@ -118,7 +118,6 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": - ] - EXPORTS.mozilla.gfx += [ - "PrintTargetPDF.h", -- "PrintTargetPS.h", - ] - SOURCES += [ - "gfxFcPlatformFontList.cpp", -@@ -127,13 +126,13 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": - "gfxGdkNativeRenderer.cpp", - "gfxPlatformGtk.cpp", - "PrintTargetPDF.cpp", -- "PrintTargetPS.cpp", - ] - - if CONFIG["MOZ_X11"]: - EXPORTS += [ - "gfxXlibNativeRenderer.h", - "gfxXlibSurface.h", -+ "PrintTargetPS.h", - ] - EXPORTS.mozilla.gfx += [ - "XlibDisplay.h", -@@ -142,6 +141,7 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": - "gfxXlibNativeRenderer.cpp", - "gfxXlibSurface.cpp", - "XlibDisplay.cpp", -+ "PrintTargetPS.cpp", - ] - - elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows": -diff --git a/gfx/webrender_bindings/RenderCompositorOGLSWGL.cpp b/gfx/webrender_bindings/RenderCompositorOGLSWGL.cpp -index ec9b904967..dee437d8ae 100644 ---- a/gfx/webrender_bindings/RenderCompositorOGLSWGL.cpp -+++ b/gfx/webrender_bindings/RenderCompositorOGLSWGL.cpp -@@ -27,7 +27,9 @@ - #ifdef MOZ_WIDGET_GTK - # include "mozilla/widget/GtkCompositorWidget.h" - # include --# include -+# ifdef MOZ_X11 -+# include -+# endif - #endif - - namespace mozilla { -diff --git a/old-configure b/old-configure -index 22c103bdac..74a90f5ee1 100644 ---- a/old-configure -+++ b/old-configure -@@ -9743,13 +9743,13 @@ TEE_SURFACE_FEATURE="#define CAIRO_HAS_TEE_SURFACE 1" - if test "$MOZ_X11"; then - XLIB_SURFACE_FEATURE="#define CAIRO_HAS_XLIB_SURFACE 1" - XLIB_XRENDER_SURFACE_FEATURE="#define CAIRO_HAS_XLIB_XRENDER_SURFACE 1" -- PS_SURFACE_FEATURE="#define CAIRO_HAS_PS_SURFACE 1" - fi - if test "$_HAVE_FREETYPE2"; then - FT_FONT_FEATURE="#define CAIRO_HAS_FT_FONT 1" - MOZ_ENABLE_CAIRO_FT=1 - CAIRO_FT_CFLAGS="$FT2_CFLAGS" - fi -+PS_SURFACE_FEATURE="#define CAIRO_HAS_PS_SURFACE 1" - - case "$MOZ_WIDGET_TOOLKIT" in - cocoa | uikit) -diff --git a/old-configure.in b/old-configure.in -index de2642f71d..d0ab9b1988 100644 ---- a/old-configure.in -+++ b/old-configure.in -@@ -2327,13 +2327,13 @@ TEE_SURFACE_FEATURE="#define CAIRO_HAS_TEE_SURFACE 1" - if test "$MOZ_X11"; then - XLIB_SURFACE_FEATURE="#define CAIRO_HAS_XLIB_SURFACE 1" - XLIB_XRENDER_SURFACE_FEATURE="#define CAIRO_HAS_XLIB_XRENDER_SURFACE 1" -- PS_SURFACE_FEATURE="#define CAIRO_HAS_PS_SURFACE 1" - fi - if test "$_HAVE_FREETYPE2"; then - FT_FONT_FEATURE="#define CAIRO_HAS_FT_FONT 1" - MOZ_ENABLE_CAIRO_FT=1 - CAIRO_FT_CFLAGS="$FT2_CFLAGS" - fi -+PS_SURFACE_FEATURE="#define CAIRO_HAS_PS_SURFACE 1" - - case "$MOZ_WIDGET_TOOLKIT" in - cocoa | uikit) -diff --git a/toolkit/components/remote/moz.build b/toolkit/components/remote/moz.build -index 235580d6b7..b407dce197 100644 ---- a/toolkit/components/remote/moz.build -+++ b/toolkit/components/remote/moz.build -@@ -13,12 +13,15 @@ SOURCES += [ - - if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": - SOURCES += [ -- "nsGTKRemoteServer.cpp", - "nsUnixRemoteServer.cpp", -- "nsXRemoteClient.cpp", -- "nsXRemoteServer.cpp", - "RemoteUtils.cpp", - ] -+ if CONFIG["MOZ_X11"]: -+ SOURCES += [ -+ "nsGTKRemoteServer.cpp", -+ "nsXRemoteClient.cpp", -+ "nsXRemoteServer.cpp", -+ ] - if CONFIG["MOZ_ENABLE_DBUS"]: - SOURCES += [ - "nsDBusRemoteClient.cpp", -diff --git a/toolkit/components/remote/nsRemoteService.cpp b/toolkit/components/remote/nsRemoteService.cpp -index 289fa506f4..c2fd3a1183 100644 ---- a/toolkit/components/remote/nsRemoteService.cpp -+++ b/toolkit/components/remote/nsRemoteService.cpp -@@ -12,12 +12,18 @@ - - #ifdef MOZ_WIDGET_GTK - # include "mozilla/WidgetUtilsGtk.h" --# include "nsGTKRemoteServer.h" --# include "nsXRemoteClient.h" -+# ifdef MOZ_X11 -+# include "nsGTKRemoteServer.h" -+# include "nsXRemoteClient.h" -+# endif - # ifdef MOZ_ENABLE_DBUS - # include "nsDBusRemoteServer.h" - # include "nsDBusRemoteClient.h" - # endif -+# ifdef MOZ_WAYLAND -+# include -+# include "nsRemoteClient.h" -+# endif - #elif defined(XP_WIN) - # include "nsWinRemoteServer.h" - # include "nsWinRemoteClient.h" -@@ -111,9 +117,11 @@ RemoteResult nsRemoteService::StartClient(const char* aDesktopStartupID) { - client = MakeUnique(); - } - # endif -+#if defined(MOZ_X11) - if (!client && useX11Remote) { - client = MakeUnique(); - } -+#endif - #elif defined(XP_WIN) - client = MakeUnique(); - #elif defined(XP_DARWIN) -@@ -160,9 +168,11 @@ void nsRemoteService::StartupServer() { - mRemoteServer = MakeUnique(); - } - # endif -+# if defined(MOZ_X11) - if (!mRemoteServer && useX11Remote) { - mRemoteServer = MakeUnique(); - } -+# endif - #elif defined(XP_WIN) - mRemoteServer = MakeUnique(); - #elif defined(XP_DARWIN) -diff --git a/toolkit/moz.configure b/toolkit/moz.configure -index ac7ab6c2ef..b1bd632d81 100644 ---- a/toolkit/moz.configure -+++ b/toolkit/moz.configure -@@ -314,9 +314,6 @@ def toolkit_gtk(toolkit): - return toolkit == "gtk" - - --set_config("MOZ_X11", True, when=toolkit_gtk) --set_define("MOZ_X11", True, when=toolkit_gtk) --add_old_configure_assignment("MOZ_X11", True, when=toolkit_gtk) - - # Wayland support - # ============================================================== -diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp -index 3ec33c9b45..0ef2182368 100644 ---- a/toolkit/xre/nsAppRunner.cpp -+++ b/toolkit/xre/nsAppRunner.cpp -@@ -319,6 +319,7 @@ nsString gProcessStartupShortcut; - # endif - # ifdef MOZ_X11 - # include -+# undef None - # endif /* MOZ_X11 */ - # include - #endif -@@ -343,7 +344,6 @@ void XRE_LibFuzzerSetDriver(LibFuzzerDriver aDriver) { - #endif // FUZZING - - // Undo X11/X.h's definition of None --#undef None - - namespace mozilla { - int (*RunGTest)(int*, char**) = 0; -diff --git a/toolkit/xre/nsGDKErrorHandler.cpp b/toolkit/xre/nsGDKErrorHandler.cpp -index 421abdf12f..673a4f851b 100644 ---- a/toolkit/xre/nsGDKErrorHandler.cpp -+++ b/toolkit/xre/nsGDKErrorHandler.cpp -@@ -6,14 +6,21 @@ - #include "nsGDKErrorHandler.h" - - #include -+#ifdef MOZ_X11 - #include -+#endif -+#ifdef MOZ_WAYLAND -+#include -+#endif - #include - #include - #include - - #include "nsDebug.h" - #include "nsString.h" -+#ifdef MOZ_X11 - #include "nsX11ErrorHandler.h" -+#endif - - #include "prenv.h" - -@@ -26,6 +33,7 @@ - */ - static void GdkErrorHandler(const gchar* log_domain, GLogLevelFlags log_level, - const gchar* message, gpointer user_data) { -+#ifdef MOZ_X11 - if (strstr(message, "X Window System error")) { - XErrorEvent event; - nsDependentCString buffer(message); -@@ -92,10 +100,10 @@ static void GdkErrorHandler(const gchar* log_domain, GLogLevelFlags log_level, - event.resourceid = 0; - - X11Error(event.display, &event); -- } else { -+ } -+#endif - g_log_default_handler(log_domain, log_level, message, user_data); - MOZ_CRASH_UNSAFE(message); -- } - } - - void InstallGdkErrorHandler() { -@@ -103,7 +111,9 @@ void InstallGdkErrorHandler() { - (GLogLevelFlags)(G_LOG_LEVEL_ERROR | G_LOG_FLAG_FATAL | - G_LOG_FLAG_RECURSION), - GdkErrorHandler, nullptr); -+#ifdef MOZ_X11 - if (PR_GetEnv("MOZ_X_SYNC")) { - XSynchronize(GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), X11True); - } -+#endif - } -diff --git a/toolkit/xre/nsNativeAppSupportUnix.cpp b/toolkit/xre/nsNativeAppSupportUnix.cpp -index e8f7b67c35..5549e40fe9 100644 ---- a/toolkit/xre/nsNativeAppSupportUnix.cpp -+++ b/toolkit/xre/nsNativeAppSupportUnix.cpp -@@ -401,7 +401,6 @@ static void SetSMProperty(SmProp& prop, const char* name, const char* type, - prop.num_vals = numVals; - prop.vals = vals; - } --#endif /* MOZ_X11 */ - - static void RemoveArg(char** argv) { - do { -@@ -411,6 +410,7 @@ static void RemoveArg(char** argv) { - - --gArgc; - } -+#endif /* MOZ_X11 */ - - NS_IMETHODIMP - nsNativeAppSupportUnix::Start(bool* aRetVal) { -diff --git a/widget/CompositorWidget.h b/widget/CompositorWidget.h -index 4515f4ccc0..2f4795364c 100644 ---- a/widget/CompositorWidget.h -+++ b/widget/CompositorWidget.h -@@ -63,7 +63,7 @@ class CompositorWidgetDelegate { - }; - - // Platforms that support out-of-process widgets. --#if defined(XP_WIN) || defined(MOZ_X11) -+#if defined(XP_WIN) || defined(MOZ_X11) || defined(MOZ_WAYLAND) - // CompositorWidgetParent should implement CompositorWidget and - // PCompositorWidgetParent. - class CompositorWidgetParent; -diff --git a/widget/gtk/MozContainer.cpp b/widget/gtk/MozContainer.cpp -index a1c1c2b124..97d31ba5b7 100644 ---- a/widget/gtk/MozContainer.cpp -+++ b/widget/gtk/MozContainer.cpp -@@ -9,7 +9,12 @@ - - #include - #include -+#ifdef MOZ_X11 - #include -+#endif -+#ifdef MOZ_WAYLAND -+#include "mozilla/WidgetUtilsGtk.h" -+#endif - #include - - #ifdef ACCESSIBILITY -diff --git a/widget/gtk/WindowSurfaceProvider.cpp b/widget/gtk/WindowSurfaceProvider.cpp -index 837e8aa696..ae19f3ff70 100644 ---- a/widget/gtk/WindowSurfaceProvider.cpp -+++ b/widget/gtk/WindowSurfaceProvider.cpp -@@ -87,7 +87,7 @@ RefPtr WindowSurfaceProvider::CreateWindowSurface() { - mXVisual, mXDepth); - } - --# ifdef MOZ_HAVE_SHMIMAGE -+# if defined(MOZ_HAVE_SHMIMAGE) && defined(MOZ_X11) - if (!mIsShaped && nsShmImage::UseShm()) { - LOG(("Drawing to Window 0x%lx will use MIT-SHM\n", mXWindow)); - return MakeRefPtr(DefaultXDisplay(), mXWindow, -@@ -95,9 +95,11 @@ RefPtr WindowSurfaceProvider::CreateWindowSurface() { - } - # endif // MOZ_HAVE_SHMIMAGE - -+# if defined(MOZ_X11) - LOG(("Drawing to Window 0x%lx will use XPutImage\n", mXWindow)); - return MakeRefPtr(DefaultXDisplay(), mXWindow, - mXVisual, mXDepth, mIsShaped); -+# endif - } - #endif - MOZ_RELEASE_ASSERT(false); -diff --git a/widget/gtk/WindowSurfaceWayland.cpp b/widget/gtk/WindowSurfaceWayland.cpp -index 5c74524c21..78e0dc7801 100644 ---- a/widget/gtk/WindowSurfaceWayland.cpp -+++ b/widget/gtk/WindowSurfaceWayland.cpp -@@ -15,11 +15,13 @@ - #include "mozilla/gfx/Tools.h" - #include "gfx2DGlue.h" - #include "gfxPlatform.h" -+#include "gfxImageSurface.h" - #include "MozContainer.h" - #include "mozilla/ScopeExit.h" - #include "mozilla/StaticPrefs_widget.h" - #include "mozilla/WidgetUtils.h" - #include "nsTArray.h" -+#include "prenv.h" - - #ifdef MOZ_LOGGING - # include "mozilla/Logging.h" -diff --git a/widget/gtk/components.conf b/widget/gtk/components.conf -index 38c07bd812..a125d8d275 100644 ---- a/widget/gtk/components.conf -+++ b/widget/gtk/components.conf -@@ -78,7 +78,7 @@ Classes = [ - }, - ] - --if defined('MOZ_X11'): -+if defined('MOZ_X11') or defined('MOZ_WAYLAND'): - Classes += [ - { - 'js_name': 'clipboard', -diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build -index b579218ab8..f882569689 100644 ---- a/widget/gtk/moz.build -+++ b/widget/gtk/moz.build -@@ -100,23 +100,27 @@ if CONFIG["MOZ_WAYLAND"]: - - if CONFIG["MOZ_X11"]: - UNIFIED_SOURCES += [ -- "CompositorWidgetChild.cpp", -- "CompositorWidgetParent.cpp", -- "InProcessGtkCompositorWidget.cpp", - "nsClipboardX11.cpp", - "nsShmImage.cpp", -- "nsUserIdleServiceGTK.cpp", - "WindowSurfaceX11.cpp", - "WindowSurfaceX11Image.cpp", - "WindowSurfaceX11SHM.cpp", - "WindowSurfaceXRender.cpp", - ] -- EXPORTS.mozilla.widget += [ -- "CompositorWidgetChild.h", -- "CompositorWidgetParent.h", -- "GtkCompositorWidget.h", -- "InProcessGtkCompositorWidget.h", -- ] -+ -+UNIFIED_SOURCES += [ -+ "CompositorWidgetChild.cpp", -+ "CompositorWidgetParent.cpp", -+ "InProcessGtkCompositorWidget.cpp", -+ "nsUserIdleServiceGTK.cpp", -+] -+ -+EXPORTS.mozilla.widget += [ -+ "CompositorWidgetChild.h", -+ "CompositorWidgetParent.h", -+ "GtkCompositorWidget.h", -+ "InProcessGtkCompositorWidget.h", -+] - - if CONFIG["NS_PRINTING"]: - UNIFIED_SOURCES += [ -diff --git a/widget/gtk/mozgtk/mozgtk.c b/widget/gtk/mozgtk/mozgtk.c -index 677f9b3561..b8cb7de58e 100644 ---- a/widget/gtk/mozgtk/mozgtk.c -+++ b/widget/gtk/mozgtk/mozgtk.c -@@ -6,6 +6,7 @@ - - #include "mozilla/Types.h" - -+#if defined(MOZ_X11) - #include - // Bug 1271100 - // We need to trick system Cairo into not using the XShm extension due to -@@ -19,3 +20,4 @@ - // ever can remove this workaround for system Cairo, we'll need something - // to replace it for that purpose. - MOZ_EXPORT Bool XShmQueryExtension(Display* aDisplay) { return False; } -+#endif -diff --git a/widget/gtk/nsClipboard.cpp b/widget/gtk/nsClipboard.cpp -index 74379651b9..a89e8fd8e0 100644 ---- a/widget/gtk/nsClipboard.cpp -+++ b/widget/gtk/nsClipboard.cpp -@@ -9,7 +9,9 @@ - - #include "nsArrayUtils.h" - #include "nsClipboard.h" -+#if defined(MOZ_X11) - #include "nsClipboardX11.h" -+#endif - #if defined(MOZ_WAYLAND) - # include "nsClipboardWayland.h" - #endif -@@ -32,7 +34,9 @@ - #include "imgIContainer.h" - - #include -+#ifdef MOZ_X11 - #include -+#endif - - #include "mozilla/Encoding.h" - -@@ -95,10 +99,12 @@ nsClipboard::~nsClipboard() { - NS_IMPL_ISUPPORTS(nsClipboard, nsIClipboard, nsIObserver) - - nsresult nsClipboard::Init(void) { -+#if defined(MOZ_X11) - if (widget::GdkIsX11Display()) { - mContext = MakeUnique(); --#if defined(MOZ_WAYLAND) -- } else if (widget::GdkIsWaylandDisplay()) { -+ } -+#elif defined(MOZ_WAYLAND) -+ if (widget::GdkIsWaylandDisplay()) { - mContext = MakeUnique(); - #endif - } else { -diff --git a/widget/gtk/nsDeviceContextSpecG.cpp b/widget/gtk/nsDeviceContextSpecG.cpp -index b7891d67b5..abe6b82bc0 100644 ---- a/widget/gtk/nsDeviceContextSpecG.cpp -+++ b/widget/gtk/nsDeviceContextSpecG.cpp -@@ -6,7 +6,9 @@ - #include "nsDeviceContextSpecG.h" - - #include "mozilla/gfx/PrintTargetPDF.h" -+#ifdef USE_X11 - #include "mozilla/gfx/PrintTargetPS.h" -+#endif - #include "mozilla/Logging.h" - #include "mozilla/Services.h" - -@@ -46,7 +48,9 @@ using namespace mozilla; - using mozilla::gfx::IntSize; - using mozilla::gfx::PrintTarget; - using mozilla::gfx::PrintTargetPDF; -+#ifdef MOZ_X11 - using mozilla::gfx::PrintTargetPS; -+#endif - - nsDeviceContextSpecGTK::nsDeviceContextSpecGTK() - : mGtkPrintSettings(nullptr), mGtkPageSetup(nullptr) {} -@@ -119,12 +123,15 @@ already_AddRefed nsDeviceContextSpecGTK::MakePrintTarget() { - return PrintTargetPDF::CreateOrNull(stream, size); - } - -+#ifdef MOZ_X11 - int32_t orientation = mPrintSettings->GetSheetOrientation(); - return PrintTargetPS::CreateOrNull( - stream, size, - orientation == nsIPrintSettings::kPortraitOrientation - ? PrintTargetPS::PORTRAIT - : PrintTargetPS::LANDSCAPE); -+#endif -+ return nullptr; - } - - #define DECLARE_KNOWN_MONOCHROME_SETTING(key_, value_) {"cups-" key_, value_}, -diff --git a/widget/gtk/nsDragService.cpp b/widget/gtk/nsDragService.cpp -index 6983dc1b2c..2852e232b9 100644 ---- a/widget/gtk/nsDragService.cpp -+++ b/widget/gtk/nsDragService.cpp -@@ -23,7 +23,11 @@ - #include "prthread.h" - #include - #include -+#ifdef MOZ_X11 - #include -+#else -+#include -+#endif - #include "nsCRT.h" - #include "mozilla/BasicEvents.h" - #include "mozilla/Services.h" -@@ -33,7 +37,6 @@ - #include "mozilla/WidgetUtilsGtk.h" - #include "GRefPtr.h" - --#include "gfxXlibSurface.h" - #include "gfxContext.h" - #include "nsImageToPixbuf.h" - #include "nsPresContext.h" -@@ -50,6 +53,8 @@ - #ifdef MOZ_WAYLAND - # include "nsClipboardWayland.h" - # include "gfxPlatformGtk.h" -+#else -+# include "gfxXlibSurface.h" - #endif - - using namespace mozilla; -diff --git a/widget/gtk/nsGtkKeyUtils.cpp b/widget/gtk/nsGtkKeyUtils.cpp -index f4c7030a37..6c5af5394b 100644 ---- a/widget/gtk/nsGtkKeyUtils.cpp -+++ b/widget/gtk/nsGtkKeyUtils.cpp -@@ -12,10 +12,12 @@ - #include - #include - #include --#include - #include - #include -+#ifdef MOZ_X11 -+#include - #include -+#endif - #include "X11UndefineNone.h" - #include "IMContextWrapper.h" - #include "WidgetUtils.h" -@@ -51,7 +53,7 @@ LazyLogModule gKeymapWrapperLog("KeymapWrapperWidgets"); - - KeymapWrapper* KeymapWrapper::sInstance = nullptr; - guint KeymapWrapper::sLastRepeatableHardwareKeyCode = 0; --Time KeymapWrapper::sLastRepeatableKeyTime = 0; -+GTime KeymapWrapper::sLastRepeatableKeyTime = 0; - KeymapWrapper::RepeatState KeymapWrapper::sRepeatState = - KeymapWrapper::NOT_PRESSED; - -@@ -346,9 +348,11 @@ KeymapWrapper::KeymapWrapper() - - g_object_ref(mGdkKeymap); - -+#ifdef MOZ_X11 - if (GdkIsX11Display()) { - InitXKBExtension(); - } -+#endif - - Init(); - } -@@ -365,16 +369,19 @@ void KeymapWrapper::Init() { - mModifierKeys.Clear(); - memset(mModifierMasks, 0, sizeof(mModifierMasks)); - -+#ifdef MOZ_X11 - if (GdkIsX11Display()) { - InitBySystemSettingsX11(); -- } -+ } else { -+#endif - #ifdef MOZ_WAYLAND -- else { - InitBySystemSettingsWayland(); -+#endif -+#ifdef MOZ_X11 - } -+ gdk_window_add_filter(nullptr, FilterEvents, this); - #endif - -- gdk_window_add_filter(nullptr, FilterEvents, this); - - MOZ_LOG(gKeymapWrapperLog, LogLevel::Info, - ("%p Init, CapsLock=0x%X, NumLock=0x%X, " -@@ -387,6 +394,7 @@ void KeymapWrapper::Init() { - GetModifierMask(SUPER), GetModifierMask(HYPER))); - } - -+#ifdef MOZ_X11 - void KeymapWrapper::InitXKBExtension() { - PodZero(&mKeyboardState); - -@@ -619,6 +627,7 @@ void KeymapWrapper::InitBySystemSettingsX11() { - XFreeModifiermap(xmodmap); - XFree(xkeymap); - } -+#endif - - #ifdef MOZ_WAYLAND - void KeymapWrapper::SetModifierMask(xkb_keymap* aKeymap, -@@ -776,7 +785,9 @@ void KeymapWrapper::InitBySystemSettingsWayland() { - #endif - - KeymapWrapper::~KeymapWrapper() { -+#ifdef MOZ_X11 - gdk_window_remove_filter(nullptr, FilterEvents, this); -+#endif - if (mOnKeysChangedSignalHandle) { - g_signal_handler_disconnect(mGdkKeymap, mOnKeysChangedSignalHandle); - } -@@ -787,6 +798,7 @@ KeymapWrapper::~KeymapWrapper() { - MOZ_LOG(gKeymapWrapperLog, LogLevel::Info, ("%p Destructor", this)); - } - -+#ifdef MOZ_X11 - /* static */ - GdkFilterReturn KeymapWrapper::FilterEvents(GdkXEvent* aXEvent, - GdkEvent* aGdkEvent, -@@ -900,6 +912,7 @@ GdkFilterReturn KeymapWrapper::FilterEvents(GdkXEvent* aXEvent, - - return GDK_FILTER_CONTINUE; - } -+#endif - - static void ResetBidiKeyboard() { - // Reset the bidi keyboard settings for the new GdkKeymap -@@ -1760,6 +1773,7 @@ void KeymapWrapper::InitKeyEvent(WidgetKeyboardEvent& aKeyEvent, - // state. It means if there're some pending modifier key press or - // key release events, the result isn't what we want. - guint modifierState = aGdkKeyEvent->state; -+#ifdef MOZ_X11 - GdkDisplay* gdkDisplay = gdk_display_get_default(); - if (aGdkKeyEvent->is_modifier && GdkIsX11Display(gdkDisplay)) { - Display* display = gdk_x11_display_get_xdisplay(gdkDisplay); -@@ -1777,6 +1791,7 @@ void KeymapWrapper::InitKeyEvent(WidgetKeyboardEvent& aKeyEvent, - } - } - } -+#endif - InitInputEvent(aKeyEvent, modifierState); - - switch (aGdkKeyEvent->keyval) { -@@ -2023,6 +2038,7 @@ bool KeymapWrapper::IsLatinGroup(guint8 aGroup) { - return result; - } - -+#ifdef MOZ_X11 - bool KeymapWrapper::IsAutoRepeatableKey(guint aHardwareKeyCode) { - uint8_t indexOfArray = aHardwareKeyCode / 8; - MOZ_ASSERT(indexOfArray < ArrayLength(mKeyboardState.auto_repeats), -@@ -2030,6 +2046,7 @@ bool KeymapWrapper::IsAutoRepeatableKey(guint aHardwareKeyCode) { - char bitMask = 1 << (aHardwareKeyCode % 8); - return (mKeyboardState.auto_repeats[indexOfArray] & bitMask) != 0; - } -+#endif - - /* static */ - bool KeymapWrapper::IsBasicLatinLetterOrNumeral(uint32_t aCharCode) { -diff --git a/widget/gtk/nsGtkKeyUtils.h b/widget/gtk/nsGtkKeyUtils.h -index 07d60c27a6..43df8095fd 100644 ---- a/widget/gtk/nsGtkKeyUtils.h -+++ b/widget/gtk/nsGtkKeyUtils.h -@@ -13,7 +13,9 @@ - #include "nsTArray.h" - - #include -+#ifdef MOZ_X11 - #include -+#endif - #ifdef MOZ_WAYLAND - # include - # include -@@ -315,7 +317,9 @@ class KeymapWrapper { - * See a call of XkbSelectEventDetails() with XkbControlsNotify in - * InitXKBExtension(). - */ -+#ifdef MOZ_X11 - XKeyboardState mKeyboardState; -+#endif - - /** - * Pointer of the singleton instance. -@@ -326,7 +330,7 @@ class KeymapWrapper { - * Auto key repeat management. - */ - static guint sLastRepeatableHardwareKeyCode; -- static Time sLastRepeatableKeyTime; -+ static GTime sLastRepeatableKeyTime; - enum RepeatState { NOT_PRESSED, FIRST_PRESS, REPEATING }; - static RepeatState sRepeatState; - -diff --git a/widget/gtk/nsPrintDialogGTK.cpp b/widget/gtk/nsPrintDialogGTK.cpp -index 48e9b6521f..461e6b2502 100644 ---- a/widget/gtk/nsPrintDialogGTK.cpp -+++ b/widget/gtk/nsPrintDialogGTK.cpp -@@ -26,7 +26,11 @@ - #include "nsIObserverService.h" - - // for gdk_x11_window_get_xid -+#ifdef MOZ_X11 - #include -+#else -+#include -+#endif - #include - #include - #include -@@ -526,6 +530,7 @@ static void wayland_window_handle_exported(GdkWindow* window, - static gboolean window_export_handle(GtkWindow* window, - GtkWindowHandleExported callback, - gpointer user_data) { -+#ifdef MOZ_X11 - if (GdkIsX11Display()) { - GdkWindow* gdk_window = gtk_widget_get_window(GTK_WIDGET(window)); - char* handle_str; -@@ -536,8 +541,9 @@ static gboolean window_export_handle(GtkWindow* window, - g_free(handle_str); - return true; - } -+#endif - #ifdef MOZ_WAYLAND -- else if (GdkIsWaylandDisplay()) { -+ if (GdkIsWaylandDisplay()) { - GdkWindow* gdk_window = gtk_widget_get_window(GTK_WIDGET(window)); - WaylandWindowHandleExportedData* data; - -diff --git a/widget/gtk/nsUserIdleServiceGTK.cpp b/widget/gtk/nsUserIdleServiceGTK.cpp -index 884d52a6ca..d865b9a236 100644 ---- a/widget/gtk/nsUserIdleServiceGTK.cpp -+++ b/widget/gtk/nsUserIdleServiceGTK.cpp -@@ -17,6 +17,7 @@ using mozilla::LogLevel; - - static mozilla::LazyLogModule sIdleLog("nsIUserIdleService"); - -+#ifdef MOZ_X11 - typedef bool (*_XScreenSaverQueryExtension_fn)(Display* dpy, int* event_base, - int* error_base); - -@@ -25,12 +26,15 @@ typedef XScreenSaverInfo* (*_XScreenSaverAllocInfo_fn)(void); - typedef void (*_XScreenSaverQueryInfo_fn)(Display* dpy, Drawable drw, - XScreenSaverInfo* info); - --static bool sInitialized = false; - static _XScreenSaverQueryExtension_fn _XSSQueryExtension = nullptr; - static _XScreenSaverAllocInfo_fn _XSSAllocInfo = nullptr; - static _XScreenSaverQueryInfo_fn _XSSQueryInfo = nullptr; -+#endif -+ -+static bool sInitialized = false; - - static void Initialize() { -+#ifdef MOZ_X11 - if (!mozilla::widget::GdkIsX11Display()) { - return; - } -@@ -57,16 +61,22 @@ static void Initialize() { - MOZ_LOG(sIdleLog, LogLevel::Warning, ("Failed to get XSSAllocInfo!\n")); - if (!_XSSQueryInfo) - MOZ_LOG(sIdleLog, LogLevel::Warning, ("Failed to get XSSQueryInfo!\n")); -- -+#endif - sInitialized = true; - } - --nsUserIdleServiceGTK::nsUserIdleServiceGTK() : mXssInfo(nullptr) { -+nsUserIdleServiceGTK::nsUserIdleServiceGTK() -+#ifdef MOZ_X11 -+: mXssInfo(nullptr) -+#endif -+{ - Initialize(); - } - - nsUserIdleServiceGTK::~nsUserIdleServiceGTK() { -+#ifdef MOZ_X11 - if (mXssInfo) XFree(mXssInfo); -+#endif - - // It is not safe to unload libXScrnSaver until each display is closed because - // the library registers callbacks through XESetCloseDisplay (Bug 397607). -@@ -88,6 +98,7 @@ bool nsUserIdleServiceGTK::PollIdleTime(uint32_t* aIdleTime) { - // Ask xscreensaver about idle time: - *aIdleTime = 0; - -+#ifdef MOZ_X11 - // We might not have a display (cf. in xpcshell) - Display* dplay = GDK_DISPLAY_XDISPLAY(gdk_display_get_default()); - if (!dplay) { -@@ -107,6 +118,7 @@ bool nsUserIdleServiceGTK::PollIdleTime(uint32_t* aIdleTime) { - *aIdleTime = mXssInfo->idle; - return true; - } -+#endif - // If we get here, we couldn't get to XScreenSaver: - MOZ_LOG(sIdleLog, LogLevel::Warning, ("XSSQueryExtension returned false!\n")); - return false; -diff --git a/widget/gtk/nsUserIdleServiceGTK.h b/widget/gtk/nsUserIdleServiceGTK.h -index 9b9ba31846..8f83aee584 100644 ---- a/widget/gtk/nsUserIdleServiceGTK.h -+++ b/widget/gtk/nsUserIdleServiceGTK.h -@@ -9,6 +9,7 @@ - #define nsUserIdleServiceGTK_h__ - - #include "nsUserIdleService.h" -+#ifdef MOZ_X11 - #include - #include - #include -@@ -21,6 +22,7 @@ typedef struct { - unsigned long idle; // milliseconds idle - unsigned long event_mask; // event stuff - } XScreenSaverInfo; -+#endif - - class nsUserIdleServiceGTK : public nsUserIdleService { - public: -@@ -40,7 +42,9 @@ class nsUserIdleServiceGTK : public nsUserIdleService { - - private: - ~nsUserIdleServiceGTK(); -+#ifdef MOZ_X11 - XScreenSaverInfo* mXssInfo; -+#endif - - protected: - nsUserIdleServiceGTK(); -diff --git a/widget/gtk/nsWidgetFactory.cpp b/widget/gtk/nsWidgetFactory.cpp -index d649c7e0bf..70b47d5124 100644 ---- a/widget/gtk/nsWidgetFactory.cpp -+++ b/widget/gtk/nsWidgetFactory.cpp -@@ -20,9 +20,7 @@ - #include "nsHTMLFormatConverter.h" - #include "HeadlessClipboard.h" - #include "IMContextWrapper.h" --#ifdef MOZ_X11 --# include "nsClipboard.h" --#endif -+#include "nsClipboard.h" - #include "TaskbarProgress.h" - #include "nsFilePicker.h" - #include "nsSound.h" -@@ -36,7 +34,6 @@ - using namespace mozilla; - using namespace mozilla::widget; - --#ifdef MOZ_X11 - NS_IMPL_COMPONENT_FACTORY(nsIClipboard) { - nsCOMPtr inst; - if (gfxPlatform::IsHeadless()) { -@@ -51,7 +48,6 @@ NS_IMPL_COMPONENT_FACTORY(nsIClipboard) { - - return inst.forget().downcast(); - } --#endif - - nsresult nsWidgetGtk2ModuleCtor() { return nsAppShellInit(); } - -diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp -index f78ce835ef..fdd3580b72 100644 ---- a/widget/gtk/nsWindow.cpp -+++ b/widget/gtk/nsWindow.cpp -@@ -57,7 +57,6 @@ - #include "mozilla/UniquePtrExtensions.h" - #include "mozilla/WidgetUtils.h" - #include "mozilla/WritingModes.h" --#include "mozilla/X11Util.h" - #include "mozilla/XREAppData.h" - #include "NativeKeyBindings.h" - #include "nsAppDirectoryServiceDefs.h" -@@ -89,7 +88,6 @@ - #include "ScreenHelperGTK.h" - #include "SystemTimeConverter.h" - #include "WidgetUtilsGtk.h" --#include "mozilla/X11Util.h" - - #ifdef ACCESSIBILITY - # include "mozilla/a11y/LocalAccessible.h" -@@ -97,19 +95,23 @@ - # include "nsAccessibilityService.h" - #endif - -+#include "GLContextEGL.h" // for GLContextEGL::FindVisual() -+#include "GtkCompositorWidget.h" - #ifdef MOZ_X11 -+# include "mozilla/X11Util.h" - # include - # include - # include - # include - # include "gfxXlibSurface.h" - # include "GLContextGLX.h" // for GLContextGLX::FindVisual() --# include "GLContextEGL.h" // for GLContextEGL::FindVisual() - # include "WindowSurfaceX11Image.h" - # include "WindowSurfaceX11SHM.h" - # include "WindowSurfaceXRender.h" - #endif - #ifdef MOZ_WAYLAND -+# include -+# include - # include "nsIClipboard.h" - # include "nsView.h" - #endif -@@ -119,7 +121,9 @@ using namespace mozilla::gfx; - using namespace mozilla::layers; - using namespace mozilla::widget; - using mozilla::gl::GLContextEGL; -+#ifdef MOZ_X11 - using mozilla::gl::GLContextGLX; -+#endif - - // Don't put more than this many rects in the dirty region, just fluff - // out to the bounding-box if there are more -@@ -278,6 +282,7 @@ bool nsWindow::sTransparentMainWindow = false; - - namespace mozilla { - -+#ifdef MOZ_X11 - class CurrentX11TimeGetter { - public: - explicit CurrentX11TimeGetter(GdkWindow* aWindow) -@@ -325,6 +330,7 @@ class CurrentX11TimeGetter { - GdkWindow* mWindow; - TimeStamp mAsyncUpdateStart; - }; -+#endif - - } // namespace mozilla - -@@ -2342,6 +2348,7 @@ void nsWindow::SetSizeMode(nsSizeMode aMode) { - } - - static bool GetWindowManagerName(GdkWindow* gdk_window, nsACString& wmName) { -+#ifdef MOZ_X11 - if (!GdkIsX11Display()) { - return false; - } -@@ -2408,6 +2415,7 @@ static bool GetWindowManagerName(GdkWindow* gdk_window, nsACString& wmName) { - } - - wmName = reinterpret_cast(prop_return); -+#endif - return true; - } - -@@ -2465,6 +2473,8 @@ void nsWindow::GetWorkspaceID(nsAString& workspaceID) { - if (!GdkIsX11Display() || !mShell) { - return; - } -+ -+#ifdef MOZ_X11 - // Get the gdk window for this widget. - GdkWindow* gdk_window = gtk_widget_get_window(mShell); - if (!gdk_window) { -@@ -2493,6 +2503,7 @@ void nsWindow::GetWorkspaceID(nsAString& workspaceID) { - - workspaceID.AppendInt((int32_t)wm_desktop[0]); - g_free(wm_desktop); -+#endif - } - - void nsWindow::MoveToWorkspace(const nsAString& workspaceIDStr) { -@@ -2501,7 +2512,7 @@ void nsWindow::MoveToWorkspace(const nsAString& workspaceIDStr) { - if (NS_FAILED(rv) || !workspaceID || !GdkIsX11Display() || !mShell) { - return; - } -- -+#ifdef MOZ_X11 - // Get the gdk window for this widget. - GdkWindow* gdk_window = gtk_widget_get_window(mShell); - if (!gdk_window) { -@@ -2535,6 +2546,7 @@ void nsWindow::MoveToWorkspace(const nsAString& workspaceIDStr) { - SubstructureNotifyMask | SubstructureRedirectMask, &xevent); - - XFlush(xdisplay); -+#endif - } - - using SetUserTimeFunc = void (*)(GdkWindow*, guint32); -@@ -2575,9 +2587,13 @@ guint32 nsWindow::GetLastUserInputTime() { - // button and key releases. Therefore use the most recent of - // gdk_x11_display_get_user_time and the last time that we have seen. - GdkDisplay* gdkDisplay = gdk_display_get_default(); -+#ifdef MOZ_X11 - guint32 timestamp = GdkIsX11Display(gdkDisplay) - ? gdk_x11_display_get_user_time(gdkDisplay) - : gtk_get_current_event_time(); -+#else -+ guint32 timestamp = gtk_get_current_event_time(); -+#endif - - if (sLastUserInputTime != GDK_CURRENT_TIME && - TimestampIsNewerThan(sLastUserInputTime, timestamp)) { -@@ -2735,6 +2751,7 @@ void nsWindow::UpdateClientOffsetFromFrameExtents() { - return; - } - -+#ifdef MOZ_X11 - GdkAtom cardinal_atom = gdk_x11_xatom_to_atom(XA_CARDINAL); - - GdkAtom type_returned; -@@ -2768,6 +2785,7 @@ void nsWindow::UpdateClientOffsetFromFrameExtents() { - - LOG(("nsWindow::UpdateClientOffsetFromFrameExtents [%p] %d,%d\n", (void*)this, - mClientOffset.x, mClientOffset.y)); -+#endif - } - - LayoutDeviceIntPoint nsWindow::GetClientOffset() { -@@ -2778,6 +2796,7 @@ LayoutDeviceIntPoint nsWindow::GetClientOffset() { - - gboolean nsWindow::OnPropertyNotifyEvent(GtkWidget* aWidget, - GdkEventProperty* aEvent) { -+#ifdef MOZ_X11 - if (aEvent->atom == gdk_atom_intern("_NET_FRAME_EXTENTS", FALSE)) { - UpdateClientOffsetFromFrameExtents(); - return FALSE; -@@ -2786,7 +2805,7 @@ gboolean nsWindow::OnPropertyNotifyEvent(GtkWidget* aWidget, - if (GetCurrentTimeGetter()->PropertyNotifyHandler(aWidget, aEvent)) { - return TRUE; - } -- -+#endif - return FALSE; - } - -@@ -2924,9 +2943,11 @@ void* nsWindow::GetNativeData(uint32_t aDataType) { - return GetToplevelWidget(); - - case NS_NATIVE_WINDOW_WEBRTC_DEVICE_ID: -+#ifdef MOZ_X11 - if (GdkIsX11Display()) { - return (void*)GDK_WINDOW_XID(gdk_window_get_toplevel(mGdkWindow)); - } -+#endif - NS_WARNING( - "nsWindow::GetNativeData(): NS_NATIVE_WINDOW_WEBRTC_DEVICE_ID is not " - "handled on Wayland!"); -@@ -2946,9 +2967,11 @@ void* nsWindow::GetNativeData(uint32_t aDataType) { - case NS_NATIVE_OPENGL_CONTEXT: - return nullptr; - case NS_NATIVE_EGL_WINDOW: { -+#ifdef MOZ_X11 - if (GdkIsX11Display()) { - return mGdkWindow ? (void*)GDK_WINDOW_XID(mGdkWindow) : nullptr; - } -+#endif - #ifdef MOZ_WAYLAND - if (mContainer) { - return moz_container_wayland_get_egl_window(mContainer, -@@ -3289,8 +3312,13 @@ gboolean nsWindow::OnExposeEvent(cairo_t* cr) { - nsIWidgetListener* listener = GetListener(); - if (!listener) return FALSE; - -+#ifdef MOZ_X11 - LOG(("received expose event [%p] %p 0x%lx (rects follow):\n", this, - mGdkWindow, GdkIsX11Display() ? gdk_x11_window_get_xid(mGdkWindow) : 0)); -+#else -+ LOG(("received expose event [%p] %p 0x%lx (rects follow):\n", this, -+ mGdkWindow, 0)); -+#endif - LayoutDeviceIntRegion exposeRegion; - if (!ExtractExposeRegion(exposeRegion, cr)) { - return FALSE; -@@ -3819,6 +3847,7 @@ void nsWindow::OnMotionNotifyEvent(GdkEventMotion* aEvent) { - MOZ_ASSERT(gdk_window, "gdk_window_get_toplevel should not return null"); - - bool canDrag = true; -+#ifdef MOZ_X11 - if (GdkIsX11Display()) { - // Workaround for https://bugzilla.gnome.org/show_bug.cgi?id=789054 - // To avoid crashes disable double-click on WM without _NET_WM_MOVERESIZE. -@@ -3829,6 +3858,7 @@ void nsWindow::OnMotionNotifyEvent(GdkEventMotion* aEvent) { - canDrag = false; - } - } -+#endif - - if (canDrag) { - gdk_window_begin_move_drag(gdk_window, 1, aEvent->x_root, aEvent->y_root, -@@ -4321,16 +4351,20 @@ TimeStamp nsWindow::GetEventTimeStamp(guint32 aEventTime) { - int64_t tick = - BaseTimeDurationPlatformUtils::TicksFromMilliseconds(timestampTime); - eventTimeStamp = TimeStamp::FromSystemTime(tick); -- } else { -+ } -+#ifdef MOZ_X11 -+ else { - CurrentX11TimeGetter* getCurrentTime = GetCurrentTimeGetter(); - MOZ_ASSERT(getCurrentTime, - "Null current time getter despite having a window"); - eventTimeStamp = - TimeConverter().GetTimeStampFromSystemTime(aEventTime, *getCurrentTime); - } -+#endif - return eventTimeStamp; - } - -+#ifdef MOZ_X11 - mozilla::CurrentX11TimeGetter* nsWindow::GetCurrentTimeGetter() { - MOZ_ASSERT(mGdkWindow, "Expected mGdkWindow to be set"); - if (MOZ_UNLIKELY(!mCurrentTimeGetter)) { -@@ -4338,6 +4372,7 @@ mozilla::CurrentX11TimeGetter* nsWindow::GetCurrentTimeGetter() { - } - return mCurrentTimeGetter.get(); - } -+#endif - - gboolean nsWindow::OnKeyPressEvent(GdkEventKey* aEvent) { - LOG(("OnKeyPressEvent [%p]\n", (void*)this)); -@@ -4914,6 +4949,7 @@ static GdkWindow* CreateGdkWindow(GdkWindow* parent, GtkWidget* widget) { - return window; - } - -+#ifdef MOZ_X11 - // Configure GL visual on X11. We add alpha silently - // if we use WebRender to workaround NVIDIA specific Bug 1663273. - bool nsWindow::ConfigureX11GLVisual(bool aUseAlpha) { -@@ -4965,6 +5001,7 @@ bool nsWindow::ConfigureX11GLVisual(bool aUseAlpha) { - - return true; - } -+#endif - - nsCString nsWindow::GetWindowNodeName() { - nsCString nodeName("Unknown"); -@@ -5552,9 +5589,15 @@ nsresult nsWindow::Create(nsIWidget* aParent, nsNativeWidget aNativeParent, - mWindowType == eWindowType_toplevel ? "Toplevel" : "Popup", - mIsPIPWindow ? "PIP window" : "")); - if (mShell) { -+#ifdef MOZ_X11 - LOG(("\tmShell %p mContainer %p mGdkWindow %p 0x%lx\n", mShell, mContainer, - mGdkWindow, - GdkIsX11Display() ? gdk_x11_window_get_xid(mGdkWindow) : 0)); -+#else -+ LOG(("\tmShell %p mContainer %p mGdkWindow %p 0x%lx\n", mShell, mContainer, -+ mGdkWindow, -+ 0)); -+#endif - } else if (mContainer) { - LOG(("\tmContainer %p mGdkWindow %p\n", mContainer, mGdkWindow)); - } else if (mGdkWindow) { -@@ -6478,6 +6521,7 @@ void nsWindow::UpdateTitlebarTransparencyBitmap() { - cairo_surface_destroy(surface); - } - -+#ifdef MOZ_X11 - if (!mNeedsShow) { - Display* xDisplay = GDK_WINDOW_XDISPLAY(mGdkWindow); - Window xDrawable = GDK_WINDOW_XID(mGdkWindow); -@@ -6500,6 +6544,7 @@ void nsWindow::UpdateTitlebarTransparencyBitmap() { - - XFreePixmap(xDisplay, maskPixmap); - } -+#endif - } - - void nsWindow::GrabPointer(guint32 aTime) { -@@ -6772,7 +6817,7 @@ static bool IsFullscreenSupported(GtkWidget* aShell) { - GdkScreen* screen = gtk_widget_get_screen(aShell); - GdkAtom atom = gdk_atom_intern("_NET_WM_STATE_FULLSCREEN", FALSE); - return gdk_x11_screen_supports_net_wm_hint(screen, atom); --#elif -+#else - return true; - #endif - } -@@ -8048,6 +8093,7 @@ bool nsWindow::GetDragInfo(WidgetMouseEvent* aMouseEvent, GdkWindow** aWindow, - return false; - } - -+#ifdef MOZ_X11 - if (GdkIsX11Display()) { - // Workaround for https://bugzilla.gnome.org/show_bug.cgi?id=789054 - // To avoid crashes disable double-click on WM without _NET_WM_MOVERESIZE. -@@ -8063,6 +8109,7 @@ bool nsWindow::GetDragInfo(WidgetMouseEvent* aMouseEvent, GdkWindow** aWindow, - } - } - } -+#endif - - // FIXME: It would be nice to have the widget position at the time - // of the event, but it's relatively unlikely that the widget has -@@ -8794,6 +8841,7 @@ void nsWindow::GetCompositorWidgetInitData( - mozilla::widget::CompositorWidgetInitData* aInitData) { - nsCString displayName; - -+#ifdef MOZ_X11 - if (GdkIsX11Display() && mXWindow != X11None) { - // Make sure the window XID is propagated to X server, we can fail otherwise - // in GPU process (Bug 1401634). -@@ -8807,6 +8855,12 @@ void nsWindow::GetCompositorWidgetInitData( - *aInitData = mozilla::widget::GtkCompositorWidgetInitData( - (mXWindow != X11None) ? mXWindow : (uintptr_t) nullptr, displayName, - isShaped, GdkIsX11Display(), GetClientSize()); -+#else -+ *aInitData = mozilla::widget::GtkCompositorWidgetInitData( -+ (uintptr_t) nullptr, -+ nsCString(), 0, -+ 0, GetClientSize()); -+#endif - } - - #ifdef MOZ_WAYLAND -diff --git a/widget/gtk/nsWindow.h b/widget/gtk/nsWindow.h -index 9525c0c6da..6818f7cad2 100644 ---- a/widget/gtk/nsWindow.h -+++ b/widget/gtk/nsWindow.h -@@ -90,7 +90,9 @@ typedef struct _GdkEventTouchpadPinch GdkEventTouchpadPinch; - - namespace mozilla { - class TimeStamp; -+#ifdef MOZ_X11 - class CurrentX11TimeGetter; -+#endif - - } // namespace mozilla - -@@ -271,7 +273,9 @@ class nsWindow final : public nsBaseWidget { - - WidgetEventTime GetWidgetEventTime(guint32 aEventTime); - mozilla::TimeStamp GetEventTimeStamp(guint32 aEventTime); -+#ifdef MOV_X11 - mozilla::CurrentX11TimeGetter* GetCurrentTimeGetter(); -+#endif - - virtual void SetInputContext(const InputContext& aContext, - const InputContextAction& aAction) override; -@@ -756,7 +760,9 @@ class nsWindow final : public nsBaseWidget { - */ - RefPtr mIMContext; - -+#ifdef MOZ_X11 - mozilla::UniquePtr mCurrentTimeGetter; -+#endif - static GtkWindowDecoration sGtkWindowDecoration; - - static bool sTransparentMainWindow; -@@ -807,6 +813,7 @@ class nsWindow final : public nsBaseWidget { - void DispatchRestoreEventAccessible(); - #endif - -+mozilla::widget::WindowSurfaceProvider mSurfaceProvider; - #ifdef MOZ_X11 - typedef enum {GTK_WIDGET_COMPOSIDED_DEFAULT = 0, - GTK_WIDGET_COMPOSIDED_DISABLED = 1, -@@ -816,7 +823,6 @@ class nsWindow final : public nsBaseWidget { - Window mXWindow; - Visual* mXVisual; - int mXDepth; -- mozilla::widget::WindowSurfaceProvider mSurfaceProvider; - - bool ConfigureX11GLVisual(bool aUseAlpha); - #endif -diff --git a/widget/moz.build b/widget/moz.build -index 07e6970e56..9d1fe19661 100644 ---- a/widget/moz.build -+++ b/widget/moz.build -@@ -258,7 +258,7 @@ if CONFIG["MOZ_INSTRUMENT_EVENT_LOOP"]: - - EXPORTS.ipc = ["nsGUIEventIPC.h"] - --if CONFIG["MOZ_X11"]: -+if CONFIG["MOZ_X11"] or CONFIG["MOZ_WAYLAND"]: - DIRS += ["x11"] - - if toolkit in ("cocoa", "windows"): -@@ -305,7 +305,7 @@ if toolkit == "windows": - "windows/PCompositorWidget.ipdl", - "windows/PlatformWidgetTypes.ipdlh", - ] --elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk" and CONFIG["MOZ_X11"]: -+elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": - IPDL_SOURCES = [ - "gtk/PCompositorWidget.ipdl", - "gtk/PlatformWidgetTypes.ipdlh", -diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build -index f882569..1acea03 100644 ---- a/widget/gtk/moz.build -+++ b/widget/gtk/moz.build -@@ -149,7 +149,7 @@ LOCAL_INCLUDES += [ - "/widget/headless", - ] - --if CONFIG["MOZ_X11"]: -+if CONFIG["MOZ_X11"] or CONFIG["MOZ_WAYLAND"]: - LOCAL_INCLUDES += [ - "/widget/x11", - ] -diff --git a/gfx/thebes/gfxPlatformGtk.cpp b/gfx/thebes/gfxPlatformGtk.cpp -index 12e01681c7..b9f526ff45 100644 ---- a/gfx/thebes/gfxPlatformGtk.cpp -+++ b/gfx/thebes/gfxPlatformGtk.cpp -@@ -30,7 +30,9 @@ - #include "mozilla/FontPropertyTypes.h" - #include "mozilla/gfx/2D.h" - #include "mozilla/gfx/Logging.h" -+#ifdef MOZ_X11 - #include "mozilla/gfx/XlibDisplay.h" -+#endif - #include "mozilla/Monitor.h" - #include "mozilla/Preferences.h" - #include "mozilla/StaticPrefs_gfx.h" From 81b3b7eb7eff20efef749c5d906c27f76b2129a6 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Sat, 7 May 2022 20:30:41 +0000 Subject: [PATCH 140/151] rename firefox-hg -> firefox --- gui/{firefox-hg => firefox}/avoid-redefinition.patch | 0 gui/{firefox-hg => firefox}/build.sh | 0 gui/{firefox-hg => firefox}/grefptr.patch | 0 gui/{firefox-hg => firefox}/libcxx.patch | 0 gui/{firefox-hg => firefox}/sandbox-allow-select.patch | 0 5 files changed, 0 insertions(+), 0 deletions(-) rename gui/{firefox-hg => firefox}/avoid-redefinition.patch (100%) rename gui/{firefox-hg => firefox}/build.sh (100%) rename gui/{firefox-hg => firefox}/grefptr.patch (100%) rename gui/{firefox-hg => firefox}/libcxx.patch (100%) rename gui/{firefox-hg => firefox}/sandbox-allow-select.patch (100%) diff --git a/gui/firefox-hg/avoid-redefinition.patch b/gui/firefox/avoid-redefinition.patch similarity index 100% rename from gui/firefox-hg/avoid-redefinition.patch rename to gui/firefox/avoid-redefinition.patch diff --git a/gui/firefox-hg/build.sh b/gui/firefox/build.sh similarity index 100% rename from gui/firefox-hg/build.sh rename to gui/firefox/build.sh diff --git a/gui/firefox-hg/grefptr.patch b/gui/firefox/grefptr.patch similarity index 100% rename from gui/firefox-hg/grefptr.patch rename to gui/firefox/grefptr.patch diff --git a/gui/firefox-hg/libcxx.patch b/gui/firefox/libcxx.patch similarity index 100% rename from gui/firefox-hg/libcxx.patch rename to gui/firefox/libcxx.patch diff --git a/gui/firefox-hg/sandbox-allow-select.patch b/gui/firefox/sandbox-allow-select.patch similarity index 100% rename from gui/firefox-hg/sandbox-allow-select.patch rename to gui/firefox/sandbox-allow-select.patch From a341b3d9bacb41e154499aa5eb988e990c5b7e03 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Sat, 7 May 2022 20:34:13 +0000 Subject: [PATCH 141/151] limine: bump to 3.4.4 --- linux/limine/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux/limine/build.sh b/linux/limine/build.sh index c4de07a..7eaf892 100644 --- a/linux/limine/build.sh +++ b/linux/limine/build.sh @@ -1,5 +1,5 @@ pkgname=limine -pkgver=3.4.1 +pkgver=3.4.4 mkdeps="nasm:llvm" auto_cross From 0e8560d71782429dd8dacb04d936c9c02318a3ac Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Sat, 7 May 2022 20:35:24 +0000 Subject: [PATCH 142/151] limine: remove LIMINE_CC export --- linux/limine/build.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/linux/limine/build.sh b/linux/limine/build.sh index 7eaf892..26297b3 100644 --- a/linux/limine/build.sh +++ b/linux/limine/build.sh @@ -10,7 +10,6 @@ fetch() { build() { cd $pkgname-$pkgver - export LIMINE_CC=clang bad --gmake ./configure \ --build=$HOST_TRIPLE \ --host=$TRIPLE \ From 812ac0b356e13f9ee991c44de87138c1f7bab213 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Mon, 9 May 2022 19:35:14 +0000 Subject: [PATCH 143/151] linux: allow multiple kernel trees --- linux/linux/build.sh | 79 ++++++++++++++++++++++++++++++++------------ 1 file changed, 58 insertions(+), 21 deletions(-) diff --git a/linux/linux/build.sh b/linux/linux/build.sh index 9e5aada..e3e5e13 100644 --- a/linux/linux/build.sh +++ b/linux/linux/build.sh @@ -1,13 +1,59 @@ -pkgver=5.17.3 pkgname=linux pkgrel=1 ext="dev" +# setting the KERNEL_TREE environment variable changes the source +# location and updates the pkgver accordingly +# +# currently the following valuse for KERNEL_TREE are supported: +# - mainline - latest stable linux kernel release with alpine's config +# +# - asahi - latest asahi kernel from git with config taken form their PKGBUILD +# repo +# +# - rpi - latest raspberry pi kernel release with defconfig +# +# - visionfive - latest starfive-tech kernel from the vision five branch with +# visionfive_defconfig +# +# - megi - latest megi kernel with pinephone_pro_defconfig +# +# TODO: +# add KERNEL_CONFIG option to override config used when compiling + +if [ -z "$KERNEL_TREE" ]; then + KERNEL_TREE=mainline +fi + +case "$KERNEL_TREE" in + mainline) + pkgver=5.17.3 + src_tar="https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-$pkgver.tar.xz" + fetch_config="https://git.alpinelinux.org/aports/plain/community/linux-edge/config-edge.$(uname -m)" + config=olddefconfig + ;; + asahi) + pkgver=asahi + src_tar="https://github.com/AsahiLinux/linux/archive/refs/heads/asahi.tar.gz" + fetch_config="https://raw.githubusercontent.com/AsahiLinux/PKGBUILDs/main/linux-asahi/config" + config=olddefconfig + ;; + visionfive) + pkgver=visionfive + src_tar="https://github.com/starfive-tech/linux/archive/refs/heads/visionfive.tar.gz" + config=visionfive_defconfig + ;; + *) + fatal "KERNEL_TREE $KERNEL_TREE isn't supported yet" + ;; +esac + fetch() { - curl "https://cdn.kernel.org/pub/linux/kernel/v5.x/$pkgname-$pkgver.tar.xz" -o $pkgname-$pkgver.tar.xz - tar -xf $pkgname-$pkgver.tar.xz + curl -L "$src_tar" -o $pkgname-$pkgver.tar + tar -xf $pkgname-$pkgver.tar + # use Alpine's kernel config so we don't have to maintain one - curl "https://git.alpinelinux.org/aports/plain/community/linux-edge/config-edge.$(uname -m)" -o .config + [ ! -z "$fetch_config" ] && curl "$fetch_config" -o .config cd $pkgname-$pkgver } @@ -25,21 +71,11 @@ fi build() { cd $pkgname-$pkgver - cp ../.config . - bad --gmake gmake CC=clang HOSTCC=clang YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch mod2yesconfig - # ./scripts/config -m CONFIG_DRM - # ./scripts/config -m CONFIG_SND - # ./scripts/config -m CONFIG_CFG80211 - # ./scripts/config -m CONFIG_BT - # ./scripts/config -m CONFIG_IPV6 - # ./scripts/config -m CONFIG_MEDIA_SUPPORT - # ./scripts/config -m CONFIG_FIREWIRE - # ./scripts/config -m CONFIG_USB4 - # ./scripts/config -m CONFIG_FW_LOADER + [ ! -z "$fetch_config" ] && cp ../.config . + bad --gmake gmake CC=clang HOSTCC=clang YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch "$config" - # bad --gmake gmake CC=clang HOSTCC=clang YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch olddefconfig - sed -i 's/CONFIG_UNWINDER_ORC=y/# CONFIG_UNWINDER_ORC is not set/g' .config - sed -i 's/# CONFIG_UNWINDER_FRAME_POINTER is not set/CONFIG_UNWINDER_FRAME_POINTER=y/g' .config + # sed -i 's/CONFIG_UNWINDER_ORC=y/# CONFIG_UNWINDER_ORC is not set/g' .config + # sed -i 's/# CONFIG_UNWINDER_FRAME_POINTER is not set/CONFIG_UNWINDER_FRAME_POINTER=y/g' .config if [ -z "$FOR_CROSS" ]; then bad --gmake gmake CC=clang HOSTCC=clang YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch @@ -52,10 +88,11 @@ package() { if [ -z "$FOR_CROSS" ]; then install -d $pkgdir/boot bad --gmake gmake CC=cc HOSTCC=cc YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch INSTALL_PATH=$pkgdir/boot install + bad --gmake gmake CC=cc HOSTCC=cc YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch INSTALL_DTBS_PATH=$pkgdir/boot/dtbs dtbs_install - # set +e # depmod causes errors - # bad --gmake gmake CC=cc HOSTCC=cc YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch INSTALL_MOD_PATH=$pkgdir/ modules_install - # set -e + set +e # depmod causes errors + bad --gmake gmake CC=cc HOSTCC=cc YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch INSTALL_MOD_PATH=$pkgdir/ modules_install + set -e fi bad --gmake gmake CC=cc HOSTCC=cc YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch headers From c51b21224936ca7874e5ad8943247c3614a5a5b7 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Wed, 15 Jun 2022 11:16:49 +0000 Subject: [PATCH 144/151] linux: add HEADS_ONLY env var --- linux/linux/build.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/linux/linux/build.sh b/linux/linux/build.sh index e3e5e13..e4f53e0 100644 --- a/linux/linux/build.sh +++ b/linux/linux/build.sh @@ -68,6 +68,10 @@ if [ ! -z "$WITH_CROSS" ]; then export CROSS_COMPILE=$WITH_CROSS-linux-musl fi +if [ ! -z "$FOR_CROSS" ]; then + export HEADS_ONLY=1 +fi + build() { cd $pkgname-$pkgver @@ -77,7 +81,7 @@ build() { # sed -i 's/CONFIG_UNWINDER_ORC=y/# CONFIG_UNWINDER_ORC is not set/g' .config # sed -i 's/# CONFIG_UNWINDER_FRAME_POINTER is not set/CONFIG_UNWINDER_FRAME_POINTER=y/g' .config - if [ -z "$FOR_CROSS" ]; then + if [ -z "$HEADS_ONLY" ]; then bad --gmake gmake CC=clang HOSTCC=clang YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch fi } @@ -85,7 +89,7 @@ build() { package() { cd $pkgname-$pkgver - if [ -z "$FOR_CROSS" ]; then + if [ -z "$HEADS_ONLY" ]; then install -d $pkgdir/boot bad --gmake gmake CC=cc HOSTCC=cc YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch INSTALL_PATH=$pkgdir/boot install bad --gmake gmake CC=cc HOSTCC=cc YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch INSTALL_DTBS_PATH=$pkgdir/boot/dtbs dtbs_install @@ -102,8 +106,8 @@ package() { install -d $pkgdir/usr/ cp -r usr/include $pkgdir/usr/ else - install -d $pkgdir/usr/$FOR_CROSS_DIR - cp -r usr/include $pkgdir/$FOR_CROSS_DIR + install -d $pkgdir/$FOR_CROSS_DIR/ + cp -r usr/include $pkgdir/$FOR_CROSS_DIR/ fi } From e720be2cc445ed3e9c309d9a8297f59ddf6e88ec Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Wed, 15 Jun 2022 12:00:42 +0000 Subject: [PATCH 145/151] add iglupkg --- base/iglupkg/build.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 base/iglupkg/build.sh diff --git a/base/iglupkg/build.sh b/base/iglupkg/build.sh new file mode 100644 index 0000000..8739c5c --- /dev/null +++ b/base/iglupkg/build.sh @@ -0,0 +1,25 @@ +pkgname=iglupkg +pkgver=main + +fetch() { + curl -L "https://github.com/iglunix/iglupkg/archive/refs/heads/main.tar.gz" -o $pkgname-$pkgver.tar.xz + tar -xf $pkgname-$pkgver.tar.xz +} + +build() { + return +} + +package() { + cd $pkgname-$pkgver + make install DESTDIR=$pkgdir PREFIX=/usr +} + +license() { + cd $pkgname-$pkgver + return +} + +backup() { + return +} From 5b3143c78a5dc652b460eaec419488798a68e71b Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Mon, 1 Aug 2022 10:04:29 +0000 Subject: [PATCH 146/151] update toybox --- base/toybox/build.sh | 19 ++-- base/toybox/lspci-fix-ids.patch | 55 ++++++++++ base/toybox/mksh-make.patch | 34 ------ base/toybox/mksh.patch | 35 ++++++ base/toybox/xxd.c | 188 -------------------------------- 5 files changed, 99 insertions(+), 232 deletions(-) create mode 100644 base/toybox/lspci-fix-ids.patch delete mode 100644 base/toybox/mksh-make.patch create mode 100644 base/toybox/mksh.patch delete mode 100644 base/toybox/xxd.c diff --git a/base/toybox/build.sh b/base/toybox/build.sh index d558bee..884e915 100644 --- a/base/toybox/build.sh +++ b/base/toybox/build.sh @@ -1,21 +1,23 @@ -pkgver=0.8.6 +pkgver=0.8.7 pkgname=toybox pkgrel=1 deps="musl" fetch() { - curl "http://www.landley.net/toybox/downloads/$pkgname-$pkgver.tar.gz" -o $pkgname-$pkgver.tar.gz + curl -O "https://landley.net/toybox/downloads/toybox-$pkgver.tar.gz" tar -xf $pkgname-$pkgver.tar.gz curl "https://pci-ids.ucw.cz/v2.2/pci.ids" -o pci.ids cd $pkgname-$pkgver patch -p1 < ../../ls-colour.patch - patch -p1 < ../../mksh-make.patch + patch -p1 < ../../mksh.patch patch -p1 < ../../xxd-i.patch } build() { cd $pkgname-$pkgver CPUS=1 bad --gmake gmake defconfig + sed 's|# CONFIG_SH is not set|CONFIG_SH=y|' .config > /tmp/_ + mv /tmp/_ .config CPUS=1 bad --gmake gmake } @@ -28,13 +30,6 @@ package() { install -Dm 644 pci.ids $pkgdir/usr/share/misc cd $pkgname-$pkgver -# install -d $pkgdir/bin -# install -Dm755 ./toybox $pkgdir/bin/ -# ln -sr $pkgdir/bin/toybox $pkgdir/bin/ln -# ln -sr $pkgdir/bin/toybox $pkgdir/bin/uname -# install -d $pkgdir/usr/bin -# ln -sr $pkgdir/bin/toybox $pkgdir/usr/bin/install -# ln -sr $pkgdir/bin/toybox $pkgdir/usr/bin/lspci bad --gmake gmake PREFIX=$pkgdir install # Provided by NetBSD Curses @@ -44,6 +39,10 @@ package() { # LLVM Provides this rm $pkgdir/usr/bin/readelf # rm $pkgdir/usr/bin/tar + + # MKSH provides this + rm $pkgdir/bin/sh + rm $pkgdir/bin/bash } license() { diff --git a/base/toybox/lspci-fix-ids.patch b/base/toybox/lspci-fix-ids.patch new file mode 100644 index 0000000..04694a8 --- /dev/null +++ b/base/toybox/lspci-fix-ids.patch @@ -0,0 +1,55 @@ +--- a/toys/other/lspci.c ++++ b/toys/other/lspci.c +@@ -78,18 +78,45 @@ + + fseek(TT.db, 0, SEEK_SET); + while (!vbig || !dbig) { ++ int tc = 0; // tab count + s = p; + if (!fgets(s, sizeof(toybuf)-(p-toybuf)-1, TT.db)) break; +- while (isspace(*s)) s++; ++ while (*s == ' ') s++; + if (*s == '#') continue; +- if (vbig && s == p) break; +- if (strstart(&s, vbig ? device : vendor)) { +- if (vbig) dbig = s+2; +- else vbig = s+2; +- s += strlen(s); +- s[-1] = 0; // trim ending newline +- p = s + 1; ++ while (*s == '\t') { s++; tc++; } ++ switch (tc) { ++ case 0: ++ if (strstart(&s, vendor)) { ++ vbig = s + 2; ++ s += strlen(s); ++ s[-1] = 0; ++ p = s + 1; ++ } ++ break; ++ case 1: ++ if (vbig && strstart(&s, device)) { ++ dbig = s + 2; ++ s += strlen(s); ++ s[-1] = 0; ++ p = s + 1; ++ } ++ break; ++ case 2: ++ if (strstart(&s, vendor)) { ++ s+=5; ++ if (strstart(&s, device)) ++ printf("subven: %s\n", s); ++ } ++ break; + } ++ ++ // if (strstart(&s, vbig ? device : vendor)) { ++ // if (vbig) dbig = s+2; ++ // else vbig = s+2; ++ // s += strlen(s); ++ // s[-1] = 0; // trim ending newline ++ // p = s + 1; ++ // } + } + } diff --git a/base/toybox/mksh-make.patch b/base/toybox/mksh-make.patch deleted file mode 100644 index 4305543..0000000 --- a/base/toybox/mksh-make.patch +++ /dev/null @@ -1,34 +0,0 @@ ---- a/scripts/make.sh -+++ b/scripts/make.sh -@@ -106,8 +106,7 @@ genbuildsh() - echo '$BUILD $FILES $LINK' - } - --if ! cmp -s <(genbuildsh 2>/dev/null | head -n 6 ; echo LINK="'"$LDOPTIMIZE $LDFLAGS) \ -- <(head -n 7 generated/build.sh 2>/dev/null | $SED '7s/ -o .*//') -+if [ "$(genbuildsh 2>/dev/null | head -n 6 ; echo LINK="'"$LDOPTIMIZE $LDFLAGS)" != "$(head -n 7 generated/build.sh 2>/dev/null | $SED '7s/ -o .*//')" ] - then - echo -n "Library probe" - ---- a/scripts/genconfig.sh -+++ b/scripts/genconfig.sh -@@ -16,7 +16,7 @@ probecc() - # Symbol name is first argument, flags second, feed C file to stdin - probesymbol() - { -- probecc "${@:2}" 2>/dev/null && DEFAULT=y || DEFAULT=n -+ probecc $2 2>/dev/null && DEFAULT=y || DEFAULT=n - rm a.out 2>/dev/null - echo -e "config $1\n\tbool" || exit 1 - echo -e "\tdefault $DEFAULT\n" || exit 1 ---- a/scripts/make.sh -+++ b/scripts/make.sh -@@ -15,7 +15,7 @@ if [ ! -z "$ASAN" ]; then - fi - - # Centos 7 bug workaround, EOL June 30 2024. --DASHN=-n; wait -n 2>/dev/null; [ $? -eq 2 ] && unset DASHN -+unset DASHN - - export LANG=c - export LC_ALL=C diff --git a/base/toybox/mksh.patch b/base/toybox/mksh.patch new file mode 100644 index 0000000..16fe711 --- /dev/null +++ b/base/toybox/mksh.patch @@ -0,0 +1,35 @@ +--- a/scripts/genconfig.sh ++++ b/scripts/genconfig.sh +@@ -16,7 +16,7 @@ + # Symbol name is first argument, flags second, feed C file to stdin + probesymbol() + { +- probecc "${@:2}" 2>/dev/null && DEFAULT=y || DEFAULT=n ++ probecc "$2" 2>/dev/null && DEFAULT=y || DEFAULT=n + rm a.out 2>/dev/null + echo -e "config $1\n\tbool\n\tdefault $DEFAULT\n" || exit 1 + } +--- a/scripts/portability.sh ++++ b/scripts/portability.sh +@@ -35,7 +35,7 @@ + fi + + # Centos 7 bug workaround, EOL June 30 2024. TODO +-DASHN=-n; wait -n 2>/dev/null; [ $? -eq 2 ] && unset DASHN ++# DASHN=-n; wait -n 2>/dev/null; [ $? -eq 2 ] && unset DASHN + + # If the build is using gnu tools, make them behave less randomly. + export LANG=c +--- a/scripts/make.sh ++++ b/scripts/make.sh +@@ -76,8 +76,8 @@ + echo -e "\$BUILD lib/*.c $TOYFILES \$LINK -o $OUTNAME" + } + +-if ! cmp -s <(genbuildsh 2>/dev/null | head -n 5) \ +- <(head -n 5 "$GENDIR"/build.sh 2>/dev/null | $SED '5s/ -o .*//') ++if [ "$(genbuildsh 2>/dev/null | head -n 5)" != \ ++ "$(head -n 5 "$GENDIR"/build.sh 2>/dev/null | $SED '5s/ -o .*//')" ] + then + echo -n "Library probe" + diff --git a/base/toybox/xxd.c b/base/toybox/xxd.c deleted file mode 100644 index 3816237..0000000 --- a/base/toybox/xxd.c +++ /dev/null @@ -1,188 +0,0 @@ -/* xxd.c - hexdump. - * - * Copyright 2015 The Android Open Source Project - * - * No obvious standard. - * Regular output: - * "00000000: 4c69 6e75 7820 7665 7273 696f 6e20 342e Linux version 4." - * xxd -i "include" or "initializer" output: - * " 0x4c, 0x69, 0x6e, 0x75, 0x78, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f," - * xxd -p "plain" output: - * "4c696e75782076657273696f6e20342e392e302d342d616d643634202864" - -USE_XXD(NEWTOY(xxd, ">1c#l#o#g#<1=2iprs#[!rs]", TOYFLAG_USR|TOYFLAG_BIN)) - -config XXD - bool "xxd" - default y - help - usage: xxd [-c n] [-g n] [-i] [-l n] [-o n] [-p] [-r] [-s n] [file] - - Hexdump a file to stdout. If no file is listed, copy from stdin. - Filename "-" is a synonym for stdin. - - -c n Show n bytes per line (default 16) - -g n Group bytes by adding a ' ' every n bytes (default 2) - -i Include file output format (comma-separated hex byte literals) - -l n Limit of n bytes before stopping (default is no limit) - -o n Add n to display offset - -p Plain hexdump (30 bytes/line, no grouping) - -r Reverse operation: turn a hexdump into a binary file - -s n Skip to offset n -*/ - -#define FOR_xxd -#include "toys.h" - -GLOBALS( - long s, g, o, l, c; -) - -static void do_xxd(int fd, char *name) -{ - long long pos = 0; - long long limit = TT.l; - int i, len, space; - - if (toys.optflags&FLAG_s) { - xlseek(fd, TT.s, SEEK_SET); - pos = TT.s; - if (limit) limit += TT.s; - } - - while (0<(len = readall(fd, toybuf, - (limit && limit-pos=' ' && toybuf[i]<='~') ? toybuf[i] : '.'); - } - putchar('\n'); - } - if (len<0) perror_exit("read"); -} - -static void do_xxd_include(int fd, char *name) -{ - long long total = 0; - int c = 1, i, len; - - // The original xxd outputs a header/footer if given a filename (not stdin). - // We don't, which means that unlike the original we can implement -ri - printf("unsigned char %s", isdigit(name[0]) ? "__": ""); - for (char *n = name; *n; n++) - putc(*n == '.' ? '_' : *n); - puts("[] {"); - - while ((len = read(fd, toybuf, sizeof(toybuf))) > 0) { - total += len; - for (i = 0; i < len; ++i) { - printf("%s%#.02x", c > 1 ? ", " : " ", toybuf[i]); - if (c++ == TT.c) { - xprintf(",\n"); - c = 1; - } - } - } - puts("};"); - printf("unsigned int %s", isdigit(name[0]) ? "__": ""); - for (char *n = name; *n; n++) - putc(*n == '.' ? '_' : *n); - - printf(" = %d;\n", len); - - if (len < 0) perror_msg_raw(name); - if (c > 1) xputc('\n'); -} - -static int dehex(char ch) -{ - if (ch >= '0' && ch <= '9') return ch - '0'; - if (ch >= 'a' && ch <= 'f') return ch - 'a' + 10; - if (ch >= 'A' && ch <= 'F') return ch - 'A' + 10; - return (ch == '\n') ? -2 : -1; -} - -static void do_xxd_reverse(int fd, char *name) -{ - FILE *fp = xfdopen(fd, "r"); - int tmp; - - if (toys.optflags&FLAG_i) { - // -ri is a very easy special case. - while (fscanf(fp, " 0x%02x,", &tmp) == 1) { - fputc(tmp & 0xff, stdout); - } - } else { - while (!feof(fp)) { - int col = 0; - - // Each line of a regular hexdump starts with an offset/address. - // Each line of a plain hexdump just goes straight into the bytes. - if (!(toys.optflags&FLAG_p)) { - long long pos; - - if (fscanf(fp, "%llx: ", &pos) == 1) { - if (fseek(stdout, pos, SEEK_SET) != 0) { - // TODO: just write out zeros if non-seekable? - perror_exit("%s: seek failed", name); - } - } - } - - // A plain hexdump can have as many bytes per line as you like, - // but a non-plain hexdump assumes garbage after it's seen the - // specified number of bytes. - while (toys.optflags&FLAG_p || col < TT.c) { - int n1, n2; - - // If we're at EOF or EOL or we read some non-hex... - if ((n1 = n2 = dehex(fgetc(fp))) < 0 || (n2 = dehex(fgetc(fp))) < 0) { - // If we're at EOL, start on that line. - if (n1 == -2 || n2 == -2) continue; - // Otherwise, skip to the next line. - break; - } - - fputc((n1 << 4) | (n2 & 0xf), stdout); - col++; - - // Is there any grouping going on? Ignore a single space. - tmp = fgetc(fp); - if (tmp != ' ') ungetc(tmp, fp); - } - - // Skip anything else on this line (such as the ASCII dump). - while ((tmp = fgetc(fp)) != EOF && tmp != '\n') - ; - } - } - - if (ferror(fp)) perror_msg_raw(name); - fclose(fp); -} - -void xxd_main(void) -{ - if (TT.c < 0 || TT.c > 256) error_exit("invalid -c: %ld", TT.c); - if (TT.c == 0) TT.c = (toys.optflags&FLAG_i)?12:16; - - // Plain style is 30 bytes/line, no grouping. - if (toys.optflags&FLAG_p) TT.c = TT.g = 30; - - loopfiles(toys.optargs, - toys.optflags&FLAG_r ? do_xxd_reverse - : (toys.optflags&FLAG_i ? do_xxd_include : do_xxd)); -} From bddb66e2b57556042dbb516ccd362942b94aff45 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Tue, 16 Aug 2022 12:18:16 +0000 Subject: [PATCH 147/151] bump linux --- linux/linux/build.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/linux/linux/build.sh b/linux/linux/build.sh index e4f53e0..155f020 100644 --- a/linux/linux/build.sh +++ b/linux/linux/build.sh @@ -27,7 +27,7 @@ fi case "$KERNEL_TREE" in mainline) - pkgver=5.17.3 + pkgver=5.19.1 src_tar="https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-$pkgver.tar.xz" fetch_config="https://git.alpinelinux.org/aports/plain/community/linux-edge/config-edge.$(uname -m)" config=olddefconfig @@ -55,6 +55,7 @@ fetch() { # use Alpine's kernel config so we don't have to maintain one [ ! -z "$fetch_config" ] && curl "$fetch_config" -o .config cd $pkgname-$pkgver + echo "#!/bin/true" > scripts/check-local-export } _arch=$ARCH @@ -92,9 +93,9 @@ package() { if [ -z "$HEADS_ONLY" ]; then install -d $pkgdir/boot bad --gmake gmake CC=cc HOSTCC=cc YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch INSTALL_PATH=$pkgdir/boot install - bad --gmake gmake CC=cc HOSTCC=cc YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch INSTALL_DTBS_PATH=$pkgdir/boot/dtbs dtbs_install - set +e # depmod causes errors + set +e # depmod causes errors and not all configs have dtbs + bad --gmake gmake CC=cc HOSTCC=cc YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch INSTALL_DTBS_PATH=$pkgdir/boot/dtbs dtbs_install bad --gmake gmake CC=cc HOSTCC=cc YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch INSTALL_MOD_PATH=$pkgdir/ modules_install set -e fi From d93ee32d37e19d4ced872fd817da53c4a122cf4d Mon Sep 17 00:00:00 2001 From: aheirman <48590738+aheirman@users.noreply.github.com> Date: Wed, 17 Aug 2022 10:27:08 +0200 Subject: [PATCH 148/151] Revert "limine: remove LIMINE_CC export" This reverts commit 0e8560d71782429dd8dacb04d936c9c02318a3ac. --- linux/limine/build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/linux/limine/build.sh b/linux/limine/build.sh index 26297b3..7eaf892 100644 --- a/linux/limine/build.sh +++ b/linux/limine/build.sh @@ -10,6 +10,7 @@ fetch() { build() { cd $pkgname-$pkgver + export LIMINE_CC=clang bad --gmake ./configure \ --build=$HOST_TRIPLE \ --host=$TRIPLE \ From 2423bb97ffbc4d4dca0a4eb4c0d4ddc71bdfe363 Mon Sep 17 00:00:00 2001 From: aheirman <48590738+aheirman@users.noreply.github.com> Date: Wed, 17 Aug 2022 10:31:26 +0200 Subject: [PATCH 149/151] Update INSTALL.md --- INSTALL.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/INSTALL.md b/INSTALL.md index f59c26e..a260c10 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -55,6 +55,9 @@ For any packages you want to install tar -I zstd -xf /mnt/..tar.zst -C /install_root ``` +## The init system +Use https://github.com/iglunix/iglunix/tree/main/init not https://github.com/iglunix/init + ## Installing Bootloaders ``` From 420b1342a7ca82b96b51f60ad817f8c5713d62a5 Mon Sep 17 00:00:00 2001 From: MrVeink Date: Fri, 26 Aug 2022 13:57:09 +0300 Subject: [PATCH 150/151] Adding `bad --gmake` to files that use `gmake` --- base/fakeroot/build.sh | 4 ++-- extra/distcc/build.sh | 4 ++-- extra/heirloom-doctools/build.sh | 6 +++--- extra/libxml2/build.sh | 6 +++--- extra/lynx/build.sh | 4 ++-- extra/mold/build.sh | 4 ++-- extra/xxhash/build.sh | 4 ++-- gui/alsa-sndio/build.sh | 4 ++-- gui/ffmpeg/build.sh | 4 ++-- gui/icu/build.sh | 4 ++-- gui/qtbase/build.sh | 4 ++-- gui/qtdeclarative/build.sh | 4 ++-- gui/qtwayland/build.sh | 4 ++-- gui/qtwebengine/build.sh | 4 ++-- gui/sndio/build.sh | 8 ++++---- linux/raspberrypi-linux/build.sh | 14 +++++++------- old/bin86/build.sh | 4 ++-- old/dropbear/build.sh | 6 +++--- old/e2fsprogs/build.sh | 2 +- old/libnl/build.sh | 4 ++-- old/lilo/build.sh | 4 ++-- old/swc/build.sh | 4 ++-- old/toolchain-aarch64/build.sh | 4 ++-- old/velox/build.sh | 4 ++-- old/wld/build.sh | 4 ++-- pkgs/nasm/build.sh | 6 +++--- pkgs/squashfs-tools/build.sh | 4 ++-- 27 files changed, 64 insertions(+), 64 deletions(-) diff --git a/base/fakeroot/build.sh b/base/fakeroot/build.sh index 6209b03..efaeb56 100644 --- a/base/fakeroot/build.sh +++ b/base/fakeroot/build.sh @@ -15,12 +15,12 @@ build() { --build=$TRIPLE \ --host=$TRIPLE - gmake + bad --gmake gmake } package() { cd $pkgname-$pkgver - gmake install DESTDIR=$pkgdir + bad --gmake gmake install DESTDIR=$pkgdir } license() { diff --git a/extra/distcc/build.sh b/extra/distcc/build.sh index 8a82dd2..eddca3e 100644 --- a/extra/distcc/build.sh +++ b/extra/distcc/build.sh @@ -15,12 +15,12 @@ build() { --host=x86_64-unknown-linux-musl \ --without-libiberty - gmake + bad --gmake gmake } package() { cd $pkgname-$pkgver - gmake install DESTDIR=$pkgdir + bad --gmake gmake install DESTDIR=$pkgdir install -d $pkgdir/usr/lib/distcc ln -sr $pkgdir/usr/bin/distcc $pkgdir/usr/lib/distcc/cc diff --git a/extra/heirloom-doctools/build.sh b/extra/heirloom-doctools/build.sh index d38e9d0..bece1b7 100644 --- a/extra/heirloom-doctools/build.sh +++ b/extra/heirloom-doctools/build.sh @@ -15,18 +15,18 @@ fetch() { build() { cd $pkgname-$pkgver ./configure - gmake + bad --gmake gmake } package() { cd $pkgname-$pkgver - gmake install ROOT=$pkgdir + bad --gmake gmake install ROOT=$pkgdir rm -r $pkgdir/usr/share } package_doc() { cd $pkgname-$pkgver - gmake install ROOT=$pkgdir + bad --gmake gmake install ROOT=$pkgdir rm -r $pkgdir/usr/lib rm -r $pkgdir/usr/bin } diff --git a/extra/libxml2/build.sh b/extra/libxml2/build.sh index e92fd15..ce6120b 100644 --- a/extra/libxml2/build.sh +++ b/extra/libxml2/build.sh @@ -11,17 +11,17 @@ fetch() { build() { cd $pkgname-$pkgver ./configure --prefix=/usr --without-python - gmake + bad --gmake gmake } package() { cd $pkgname-$pkgver - gmake install DESTDIR=$pkgdir + bad --gmake gmake install DESTDIR=$pkgdir } package_dev() { cd $pkgname-$pkgver - gmake install DESTDIR=$pkgdir + bad --gmake gmake install DESTDIR=$pkgdir } license() { diff --git a/extra/lynx/build.sh b/extra/lynx/build.sh index dad99b4..5f0f2d6 100644 --- a/extra/lynx/build.sh +++ b/extra/lynx/build.sh @@ -16,12 +16,12 @@ build() { --build=x86_64-unknown-linux-musl \ --host=x86_64-unknown-linux-musl - gmake + bad --gmake gmake } package() { cd $pkgname-$pkgver - gmake install DESTDIR=$pkgdir + bad --gmake gmake install DESTDIR=$pkgdir } license() { diff --git a/extra/mold/build.sh b/extra/mold/build.sh index 38e0d09..8e42f09 100644 --- a/extra/mold/build.sh +++ b/extra/mold/build.sh @@ -11,12 +11,12 @@ fetch() { build() { cd $pkgname-$pkgver - gmake + bad --gmake gmake } package() { cd $pkgname-$pkgver - gmake install DESTDIR=$pkgdir + bad --gmake gmake install DESTDIR=$pkgdir ln -sr $pkgdir/usr/bin/mold $pkgdir/usr/bin/ld.mold } diff --git a/extra/xxhash/build.sh b/extra/xxhash/build.sh index 62d3a88..76758b3 100644 --- a/extra/xxhash/build.sh +++ b/extra/xxhash/build.sh @@ -10,12 +10,12 @@ fetch() { build() { cd $pkgname-$pkgver - gmake PREFIX=/usr + bad --gmake gmake PREFIX=/usr } package() { cd $pkgname-$pkgver - gmake install PREFIX=/usr DESTDIR=$pkgdir + bad --gmake gmake install PREFIX=/usr DESTDIR=$pkgdir } license() { diff --git a/gui/alsa-sndio/build.sh b/gui/alsa-sndio/build.sh index 4367e85..8691e24 100644 --- a/gui/alsa-sndio/build.sh +++ b/gui/alsa-sndio/build.sh @@ -8,12 +8,12 @@ fetch() { build() { cd $pkgname-$pkgver - gmake PREFIX=/usr + bad --gmake gmake PREFIX=/usr } package() { cd $pkgname-$pkgver - gmake install DESTDIR=$pkgdir PREFIX=/usr + bad --gmake gmake install DESTDIR=$pkgdir PREFIX=/usr } license() { diff --git a/gui/ffmpeg/build.sh b/gui/ffmpeg/build.sh index 11034ec..15e98e7 100644 --- a/gui/ffmpeg/build.sh +++ b/gui/ffmpeg/build.sh @@ -13,12 +13,12 @@ build() { --enable-openssl \ --cc=cc - gmake + bad --gmake gmake } package() { cd $pkgname-$pkgver - gmake install DESTDIR=$pkgdir + bad --gmake gmake install DESTDIR=$pkgdir } license() { diff --git a/gui/icu/build.sh b/gui/icu/build.sh index c0c53be..80e4a97 100644 --- a/gui/icu/build.sh +++ b/gui/icu/build.sh @@ -18,13 +18,13 @@ build() { --build=$TRIPLE \ --host=$TRIPLE - gmake + bad --gmake gmake } package() { cd $pkgname-$pkgver cd source - gmake install DESTDIR=$pkgdir + bad --gmake gmake install DESTDIR=$pkgdir } license() { diff --git a/gui/qtbase/build.sh b/gui/qtbase/build.sh index 4e65cfc..64d1e20 100644 --- a/gui/qtbase/build.sh +++ b/gui/qtbase/build.sh @@ -20,13 +20,13 @@ build() { -platform linux-clang-libc++ \ -prefix /usr - gmake + bad --gmake gmake } package() { cd $pkgname-$pkgver cd build - gmake INSTALL_ROOT=$pkgdir install + bad --gmake gmake INSTALL_ROOT=$pkgdir install } license() { diff --git a/gui/qtdeclarative/build.sh b/gui/qtdeclarative/build.sh index d27c302..0320433 100644 --- a/gui/qtdeclarative/build.sh +++ b/gui/qtdeclarative/build.sh @@ -11,12 +11,12 @@ build() { cd $pkgname-$pkgver qmake - gmake + bad --gmake gmake } package() { cd $pkgname-$pkgver - gmake INSTALL_ROOT=$pkgdir install + bad --gmake gmake INSTALL_ROOT=$pkgdir install } license() { diff --git a/gui/qtwayland/build.sh b/gui/qtwayland/build.sh index d285ee4..4691702 100644 --- a/gui/qtwayland/build.sh +++ b/gui/qtwayland/build.sh @@ -11,12 +11,12 @@ build() { cd $pkgname-$pkgver qmake - gmake + bad --gmake gmake } package() { cd $pkgname-$pkgver - gmake INSTALL_ROOT=$pkgdir install + bad --gmake gmake INSTALL_ROOT=$pkgdir install } license() { diff --git a/gui/qtwebengine/build.sh b/gui/qtwebengine/build.sh index 3d861ab..1ca2c7b 100644 --- a/gui/qtwebengine/build.sh +++ b/gui/qtwebengine/build.sh @@ -16,12 +16,12 @@ build() { cd $pkgname-$pkgver qmake - gmake + bad --gmake gmake } package() { cd $pkgname-$pkgver - gmake INSTALL_ROOT=$pkgdir install + bad --gmake gmake INSTALL_ROOT=$pkgdir install } license() { diff --git a/gui/sndio/build.sh b/gui/sndio/build.sh index 061184a..0cef4f3 100644 --- a/gui/sndio/build.sh +++ b/gui/sndio/build.sh @@ -13,12 +13,12 @@ build() { --prefix=/usr \ --enable-alsa - gmake + bad --gmake gmake } package() { cd $pkgname-$pkgver - gmake install DESTDIR=$pkgdir + bad --gmake gmake install DESTDIR=$pkgdir rm -rf $pkgdir/usr/share/man @@ -28,7 +28,7 @@ package() { package_dev() { cd $pkgname-$pkgver - gmake install DESTDIR=$pkgdir + bad --gmake gmake install DESTDIR=$pkgdir rm -rf $pkgdir/usr/bin rm -rf $pkgdir/usr/share/man @@ -37,7 +37,7 @@ package_dev() { package_doc() { cd $pkgname-$pkgver - gmake install DESTDIR=$pkgdir + bad --gmake gmake install DESTDIR=$pkgdir rm -rf $pkgdir/usr/lib rm -rf $pkgdir/usr/bin diff --git a/linux/raspberrypi-linux/build.sh b/linux/raspberrypi-linux/build.sh index 459dd64..180245c 100644 --- a/linux/raspberrypi-linux/build.sh +++ b/linux/raspberrypi-linux/build.sh @@ -13,26 +13,26 @@ fetch() { build() { cd $pkgname-$pkgver - gmake ARCH=arm64 CC=cc HOSTCC=cc LEX=flex YACC=yacc LLVM=1 LLVM_IAS=1 bcm2711_defconfig - gmake ARCH=arm64 CC=cc HOSTCC=cc LEX=flex YACC=yacc LLVM=1 LLVM_IAS=1 + bad --gmake gmake ARCH=arm64 CC=cc HOSTCC=cc LEX=flex YACC=yacc LLVM=1 LLVM_IAS=1 bcm2711_defconfig + bad --gmake gmake ARCH=arm64 CC=cc HOSTCC=cc LEX=flex YACC=yacc LLVM=1 LLVM_IAS=1 } package() { cd $pkgname-$pkgver install -d $pkgdir/boot cp arch/arm64/boot/Image $pkgdir/boot/kernel8.img - gmake ARCH=arm64 CC=cc HOSTCC=cc LEX=flex YACC=yacc LLVM=1 LLVM_IAS=1 INSTALL_PATH=$pkgdir/boot install - gmake ARCH=arm64 CC=cc HOSTCC=cc LEX=flex YACC=yacc LLVM=1 LLVM_IAS=1 INSTALL_DTBS_PATH=$pkgdir/boot dtbs_install - gmake ARCH=arm64 CC=cc HOSTCC=cc LEX=flex YACC=yacc LLVM=1 LLVM_IAS=1 INSTALL_MOD_PATH=$pkgdir/ modules_install + bad --gmake gmake ARCH=arm64 CC=cc HOSTCC=cc LEX=flex YACC=yacc LLVM=1 LLVM_IAS=1 INSTALL_PATH=$pkgdir/boot install + bad --gmake gmake ARCH=arm64 CC=cc HOSTCC=cc LEX=flex YACC=yacc LLVM=1 LLVM_IAS=1 INSTALL_DTBS_PATH=$pkgdir/boot dtbs_install + bad --gmake gmake ARCH=arm64 CC=cc HOSTCC=cc LEX=flex YACC=yacc LLVM=1 LLVM_IAS=1 INSTALL_MOD_PATH=$pkgdir/ modules_install mv $pkgdir/boot/broadcom/* $pkgdir/boot/ rmdir $pkgdir/boot/broadcom if stat /usr/bin/rsync 2>/dev/null /dev/null; then echo "using rsync" - gmake ARCH=arm64 CC=cc HOSTCC=cc LEX=flex YACC=yacc LLVM=1 LLVM_IAS=1 INSTALL_HDR_PATH=$pkgdir/usr headers_install + bad --gmake gmake ARCH=arm64 CC=cc HOSTCC=cc LEX=flex YACC=yacc LLVM=1 LLVM_IAS=1 INSTALL_HDR_PATH=$pkgdir/usr headers_install else - gmake ARCH=arm64 CC=cc HOSTCC=cc LEX=flex YACC=yacc LLVM=1 LLVM_IAS=1 headers + bad --gmake gmake ARCH=arm64 CC=cc HOSTCC=cc LEX=flex YACC=yacc LLVM=1 LLVM_IAS=1 headers find -name '.*' -exec rm {} \; rm usr/include/Makefile install -d $pkgdir/usr/ diff --git a/old/bin86/build.sh b/old/bin86/build.sh index 4683541..460556d 100644 --- a/old/bin86/build.sh +++ b/old/bin86/build.sh @@ -10,14 +10,14 @@ fetch() { build() { cd $pkgname-$pkgver - gmake PREFIX=/usr + bad --gmake gmake PREFIX=/usr } package() { cd $pkgname-$pkgver install -d $pkgdir/usr/bin install -d $pkgdir/usr/share/man/man1 - gmake PREFIX=$pkgdir/usr MANDIR=$pkgdir/usr/share/man/man1 install + bad --gmake gmake PREFIX=$pkgdir/usr MANDIR=$pkgdir/usr/share/man/man1 install } license() { diff --git a/old/dropbear/build.sh b/old/dropbear/build.sh index 9cda9ad..765e98d 100644 --- a/old/dropbear/build.sh +++ b/old/dropbear/build.sh @@ -15,12 +15,12 @@ build() { --build=x86_64-unknown-linux-musl \ --host=x86_64-unknown-linux-musl - gmake PROGRAMS='dropbear dbclient dropbearkey dropbearconvert scp' + bad --gmake gmake PROGRAMS='dropbear dbclient dropbearkey dropbearconvert scp' } package() { cd $pkgname-$pkgver - gmake install DESTDIR=$pkgdir PROGRAMS='dropbear dbclient dropbearkey dropbearconvert scp' + bad --gmake gmake install DESTDIR=$pkgdir PROGRAMS='dropbear dbclient dropbearkey dropbearconvert scp' ln -sr $pkgdir/usr/sbin/dropbear $pkgdir/usr/sbin/sshd ln -sr $pkgdir/usr/bin/dbclient $pkgdir/usr/bin/ssh rm -r $pkgdir/usr/share @@ -28,7 +28,7 @@ package() { package_doc() { cd $pkgname-$pkgver - gmake install DESTDIR=$pkgdir PROGRAMS='dropbear dbclient dropbearkey dropbearconvert scp' + bad --gmake gmake install DESTDIR=$pkgdir PROGRAMS='dropbear dbclient dropbearkey dropbearconvert scp' rm -r $pkgdir/usr/bin rm -r $pkgdir/usr/sbin } diff --git a/old/e2fsprogs/build.sh b/old/e2fsprogs/build.sh index ea56348..65d14e1 100644 --- a/old/e2fsprogs/build.sh +++ b/old/e2fsprogs/build.sh @@ -19,7 +19,7 @@ build() { #--exec_prefix=/ - gmake + bad --gmake gmake } package() { diff --git a/old/libnl/build.sh b/old/libnl/build.sh index 41ac795..4a04fbd 100644 --- a/old/libnl/build.sh +++ b/old/libnl/build.sh @@ -27,11 +27,11 @@ build() { patch -p1 < ../byacc-p-makefile.patch - gmake + bad --gmake gmake patch -p1 < ../byacc-comment-defines.patch - gmake + bad --gmake gmake } package() { diff --git a/old/lilo/build.sh b/old/lilo/build.sh index caa75e6..3704927 100644 --- a/old/lilo/build.sh +++ b/old/lilo/build.sh @@ -28,12 +28,12 @@ fetch() { build() { cd $pkgname-$pkgver - gmake CC="${CC:-clang}" + bad --gmake gmake CC="${CC:-clang}" } package() { cd $pkgname-$pkgver - gmake install DESTDIR=$pkgdir + bad --gmake gmake install DESTDIR=$pkgdir } license() { diff --git a/old/swc/build.sh b/old/swc/build.sh index 1d401eb..9325ca1 100644 --- a/old/swc/build.sh +++ b/old/swc/build.sh @@ -12,12 +12,12 @@ build() { cd $pkgname-$pkgver cp ../config.mk . - gmake PREFIX=/usr CC=cc + bad --gmake gmake PREFIX=/usr CC=cc } package() { cd $pkgname-$pkgver - gmake install DESTDIR=$pkgdir PREFIX=/usr + bad --gmake gmake install DESTDIR=$pkgdir PREFIX=/usr } license() { diff --git a/old/toolchain-aarch64/build.sh b/old/toolchain-aarch64/build.sh index 48b5704..281d64c 100644 --- a/old/toolchain-aarch64/build.sh +++ b/old/toolchain-aarch64/build.sh @@ -49,8 +49,8 @@ build() { --target=aarch64-unknown-linux-musl \ --enable-wrappers=no - gmake - gmake install DESTDIR=$pkgdir + bad --gmake gmake + bad --gmake gmake install DESTDIR=$pkgdir } package() { diff --git a/old/velox/build.sh b/old/velox/build.sh index bbce74c..34a07e7 100644 --- a/old/velox/build.sh +++ b/old/velox/build.sh @@ -13,12 +13,12 @@ build() { cp ../config.mk . cp ../velox.conf . - gmake PREFIX=/usr CC=cc + bad --gmake gmake PREFIX=/usr CC=cc } package() { cd $pkgname-$pkgver - gmake install DESTDIR=$pkgdir PREFIX=/usr + bad --gmake gmake install DESTDIR=$pkgdir PREFIX=/usr install -d $pkgdir/etc install -Dm644 velox.conf $pkgdir/etc/ } diff --git a/old/wld/build.sh b/old/wld/build.sh index 3d6764b..89ac4af 100644 --- a/old/wld/build.sh +++ b/old/wld/build.sh @@ -9,12 +9,12 @@ fetch() { build() { cd $pkgname-$pkgver - gmake PREFIX=/usr CC=cc + bad --gmake gmake PREFIX=/usr CC=cc } package() { cd $pkgname-$pkgver - gmake install DESTDIR=$pkgdir PREFIX=/usr + bad --gmake gmake install DESTDIR=$pkgdir PREFIX=/usr } license() { diff --git a/pkgs/nasm/build.sh b/pkgs/nasm/build.sh index 032c8e6..1c27ca3 100644 --- a/pkgs/nasm/build.sh +++ b/pkgs/nasm/build.sh @@ -15,18 +15,18 @@ build(){ --build=x86_64-unknown-linux-musl \ --host=x86_64-unknown-linux-musl \ --prefix=/usr - gmake + bad --gmake gmake } package() { cd $pkgname-$pkgver - gmake DESTDIR="$pkgdir" install + bad --gmake gmake DESTDIR="$pkgdir" install rm -r $pkgdir/usr/share } package_doc() { cd $pkgname-$pkgver - gmake DESTDIR="$pkgdir" install + bad --gmake gmake DESTDIR="$pkgdir" install rm -r $pkgdir/usr/bin } diff --git a/pkgs/squashfs-tools/build.sh b/pkgs/squashfs-tools/build.sh index 03c88df..11e09d7 100644 --- a/pkgs/squashfs-tools/build.sh +++ b/pkgs/squashfs-tools/build.sh @@ -9,13 +9,13 @@ fetch() { build() { cd $pkgname-$pkgver cd $pkgname - gmake + bad --gmake gmake } package() { cd $pkgname-$pkgver cd $pkgname - gmake install INSTALL_DIR=$pkgdir/usr/bin + bad --gmake gmake install INSTALL_DIR=$pkgdir/usr/bin } license() { From e8922e307423f0190586ac845b1e7168d471b31f Mon Sep 17 00:00:00 2001 From: MrVeink <59528135+MrVeink@users.noreply.github.com> Date: Fri, 26 Aug 2022 15:39:58 +0300 Subject: [PATCH 151/151] Delete a tarball that's not supposed to be there It contains the `usr/share/iglupkg/` folder which is empty --- gnome/glib/.2.68.4.tar.zst | Bin 124 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 gnome/glib/.2.68.4.tar.zst diff --git a/gnome/glib/.2.68.4.tar.zst b/gnome/glib/.2.68.4.tar.zst deleted file mode 100644 index 8ea37bdffac203c0300087a049f78b4469da0f29..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 124 zcmV-?0E7Q1wJ-eySbYNk@&phRkf&`#qQcj2mAmU9yL;`1#qLFAYGrph%AnAMBKWZY zO9DKWn~pI{LM%Dlgo0A-bxQqZ+E7>YA5s6G#&QP`0QXZWfB}pFl>p2!VB&2+r3Z)z eU;;564Nx!?4uJ3nARDXz;8?i~Pe2Qn2(>nuSu>Xa