From c35d083dc525e223b085ec00e6863ea6eafb003c Mon Sep 17 00:00:00 2001 From: davidovski Date: Sun, 17 Apr 2022 22:07:52 +0100 Subject: updated musl --- auto/create.sh | 17 +- ...882-.gnu.attributes-are-not-checked-for-s.patch | 55 +++++ ...-file-desriptor-if-there-is-no-archive-fd.patch | 234 ++++++++++++++++++ .../binutils/binutils-ld-fix-static-linking.patch | 46 ++++ extra/binutils/gold-mips.patch | 39 +++ extra/binutils/ld-bfd-mips.patch | 19 ++ .../0001-revert-cease-dependence-on-range.patch | 1 + extra/boost/boost-1.57.0-python-abi_letters.patch | 62 +++++ .../boost/boost-1.57.0-python-libpython_dep.patch | 13 + extra/boost/python-3.10.patch | 49 ++++ .../chromium-VirtualCursor-standard-layout.patch | 216 +++++++++++++++++ extra/graphite/cmake.patch | 23 ++ extra/mpd/libcdio-paa-version.patch | 266 +++++++++++++++++++++ extra/mpd/libcdio-paranoia-version.patch | 13 + extra/mpd/mpd.confd | 7 + extra/mpd/mpd.initd | 25 ++ extra/musl/0001-riscv64-define-ELF_NFPREG.patch | 24 ++ ...change-scheduler-functions-Linux-compatib.patch | 52 ++++ extra/musl/fix-utmp-wtmp-paths.patch | 29 +++ extra/musl/handle-aux-at_base.patch | 46 ++++ extra/musl/qsort_r.patch | 213 +++++++++++++++++ extra/musl/syscall-cp-epoll.patch | 16 ++ extra/pango/disable-broken-test.patch | 15 ++ extra/procps-ng/procps-3.3.17-musl-fix.patch | 78 ++++++ extra/procps-ng/use_utmpx.patch | 38 +++ extra/rofi/rofi-sensible-terminal-use-sh.patch | 23 ++ extra/rofi/scrollbar-test.patch | 31 +++ extra/snappy/cmakelists.patch | 96 ++++++++ extra/snappy/fix-inline.patch | 13 + extra/snappy/rtti.patch | 1 + extra/tiff/CVE-2018-12900.patch | 29 +++ extra/xdg-utils/xdg-screensaver-mv-T.patch | 25 ++ repo/apps/ncmpcpp.xibuild | 26 ++ repo/devel/boost.xibuild | 23 ++ repo/devel/uthash.xibuild | 15 ++ repo/font/font-opensans.xibuild | 15 ++ repo/linux/broadcom-wl.xibuild | 43 ---- repo/media/libjpeg-turbo.xibuild | 25 ++ repo/media/libmpdclient.xibuild | 20 ++ repo/media/libwebp.xibuild | 33 +++ repo/media/mpd.xibuild | 47 ++++ repo/media/pulsemixer.xibuild | 19 ++ repo/media/tiff.xibuild | 32 +++ repo/media/wavpack.xibuild | 25 ++ repo/skip/broadcom-wl.xibuild | 43 ++++ repo/system/at-spi2-atk.xibuild | 22 ++ repo/system/at-spi2-core.xibuild | 27 +++ repo/system/atk.xibuild | 22 ++ repo/system/binutils.xibuild | 24 +- repo/system/dbus.xibuild | 1 + repo/system/lcms2.xibuild | 27 +++ repo/system/libevent.xibuild | 28 +++ repo/system/mpfr.xibuild | 2 +- repo/system/musl.xibuild | 13 +- repo/system/ncurses.xibuild | 3 +- repo/system/perl.xibuild | 2 +- repo/system/re2.xibuild | 18 ++ repo/system/shared-mime-info.xibuild | 32 +++ repo/system/snappy.xibuild | 30 +++ repo/system/startup-notification.xibuild | 23 ++ repo/system/ubase.xibuild | 2 +- repo/util/procps-ng.xibuild | 7 +- repo/x11/dmenu.xibuild | 27 +++ repo/x11/gdk-pixbuf.xibuild | 24 ++ repo/x11/graphite.xibuild | 26 ++ repo/x11/harfbuzz.xibuild | 29 +++ repo/x11/libxkbcommon.xibuild | 28 +++ repo/x11/pango.xibuild | 26 ++ repo/x11/picom.xibuild | 9 +- repo/x11/rofi.xibuild | 40 ++++ repo/x11/xdg-utils.xibuild | 24 ++ templates/cmake.xibuild | 12 + templates/meson.xibuild | 3 +- templates/python.xibuild | 7 + wishlist.md | 16 +- 75 files changed, 2643 insertions(+), 91 deletions(-) create mode 100644 extra/binutils/0001-Revert-PR25882-.gnu.attributes-are-not-checked-for-s.patch create mode 100644 extra/binutils/bfd-close-file-desriptor-if-there-is-no-archive-fd.patch create mode 100644 extra/binutils/binutils-ld-fix-static-linking.patch create mode 100644 extra/binutils/gold-mips.patch create mode 100644 extra/binutils/ld-bfd-mips.patch create mode 100644 extra/boost/0001-revert-cease-dependence-on-range.patch create mode 100644 extra/boost/boost-1.57.0-python-abi_letters.patch create mode 100644 extra/boost/boost-1.57.0-python-libpython_dep.patch create mode 100644 extra/boost/python-3.10.patch create mode 100644 extra/chromium/chromium-VirtualCursor-standard-layout.patch create mode 100644 extra/graphite/cmake.patch create mode 100644 extra/mpd/libcdio-paa-version.patch create mode 100644 extra/mpd/libcdio-paranoia-version.patch create mode 100644 extra/mpd/mpd.confd create mode 100644 extra/mpd/mpd.initd create mode 100644 extra/musl/0001-riscv64-define-ELF_NFPREG.patch create mode 100644 extra/musl/change-scheduler-functions-Linux-compatib.patch create mode 100644 extra/musl/fix-utmp-wtmp-paths.patch create mode 100644 extra/musl/handle-aux-at_base.patch create mode 100644 extra/musl/qsort_r.patch create mode 100644 extra/musl/syscall-cp-epoll.patch create mode 100644 extra/pango/disable-broken-test.patch create mode 100644 extra/procps-ng/procps-3.3.17-musl-fix.patch create mode 100644 extra/procps-ng/use_utmpx.patch create mode 100644 extra/rofi/rofi-sensible-terminal-use-sh.patch create mode 100644 extra/rofi/scrollbar-test.patch create mode 100644 extra/snappy/cmakelists.patch create mode 100644 extra/snappy/fix-inline.patch create mode 100644 extra/snappy/rtti.patch create mode 100644 extra/tiff/CVE-2018-12900.patch create mode 100644 extra/xdg-utils/xdg-screensaver-mv-T.patch create mode 100644 repo/apps/ncmpcpp.xibuild create mode 100644 repo/devel/boost.xibuild create mode 100644 repo/devel/uthash.xibuild create mode 100644 repo/font/font-opensans.xibuild delete mode 100644 repo/linux/broadcom-wl.xibuild create mode 100644 repo/media/libjpeg-turbo.xibuild create mode 100644 repo/media/libmpdclient.xibuild create mode 100644 repo/media/libwebp.xibuild create mode 100644 repo/media/mpd.xibuild create mode 100644 repo/media/pulsemixer.xibuild create mode 100644 repo/media/tiff.xibuild create mode 100644 repo/media/wavpack.xibuild create mode 100644 repo/skip/broadcom-wl.xibuild create mode 100644 repo/system/at-spi2-atk.xibuild create mode 100644 repo/system/at-spi2-core.xibuild create mode 100644 repo/system/atk.xibuild create mode 100644 repo/system/lcms2.xibuild create mode 100644 repo/system/libevent.xibuild create mode 100644 repo/system/re2.xibuild create mode 100644 repo/system/shared-mime-info.xibuild create mode 100644 repo/system/snappy.xibuild create mode 100644 repo/system/startup-notification.xibuild create mode 100644 repo/x11/dmenu.xibuild create mode 100644 repo/x11/gdk-pixbuf.xibuild create mode 100644 repo/x11/graphite.xibuild create mode 100644 repo/x11/harfbuzz.xibuild create mode 100644 repo/x11/libxkbcommon.xibuild create mode 100644 repo/x11/pango.xibuild create mode 100644 repo/x11/rofi.xibuild create mode 100644 repo/x11/xdg-utils.xibuild create mode 100644 templates/cmake.xibuild create mode 100644 templates/python.xibuild diff --git a/auto/create.sh b/auto/create.sh index a7f965e..568c929 100755 --- a/auto/create.sh +++ b/auto/create.sh @@ -3,8 +3,8 @@ read -p "package name> " name repo=$(ls repo/ | fzf --prompt="repo> ") read -p "package version> " version read -p "description> " desc +deps=$(find repo -type f | xargs -I % basename % .xibuild | fzf -m --prompt="dependencies> " | tr '\n' ' ') read -p "source url> " url -deps=$(find repo -type f | xargs -I % basename % .xibuild | fzf -m --prompt="dependencies> ") read -p "additional urls> " additional type=$(find ./templates -type f | xargs -I % basename % .xibuild | fzf --prompt="build type> ") @@ -24,7 +24,7 @@ buildfile=repo/$repo/$name.xibuild [ -f $buildfile ] && read -p "Buildfile already exists, overwrite? " go -url=$(echo $url | sed "s/$version/\$PKG_VER/g" | sed "s/\$pkgver/\$PKG_VER/g") +url=$(echo $url | sed "s/$version/\$PKG_VER/g" | sed "s/pkgver/PKG_VER/g") makedeps="" case $type in @@ -34,6 +34,12 @@ case $type in meson) makedeps="meson ninja $makedeps" ;; + cmake) + makedeps="cmake $makedeps" + ;; + python) + makedeps="python python-setuptools $makedeps" + ;; esac cat > $buildfile << EOF @@ -61,7 +67,7 @@ EOF echo "ADDITIONAL=\"$filenames\"" >> $buildfile echo $filenames | grep -q ".patch " && { - cat > $buildfile << EOF + cat >> $buildfile << EOF prepare () { apply_patches @@ -73,3 +79,8 @@ EOF echo >> $buildfile cat $template >> $buildfile vim $buildfile + +# remove any things i may have copied from alpine's build scripts +sed -i "s/\$pkgname/$name/g" $buildfile +sed -i "s/\$pkgver/\$PKG_VER/g" $buildfile +sed -i "s/\$pkgdir/\$PKG_DEST/g" $buildfile diff --git a/extra/binutils/0001-Revert-PR25882-.gnu.attributes-are-not-checked-for-s.patch b/extra/binutils/0001-Revert-PR25882-.gnu.attributes-are-not-checked-for-s.patch new file mode 100644 index 0000000..6e1fa77 --- /dev/null +++ b/extra/binutils/0001-Revert-PR25882-.gnu.attributes-are-not-checked-for-s.patch @@ -0,0 +1,55 @@ +From bbf05b742fde518fb97c789b043fe0d3aaf549f0 Mon Sep 17 00:00:00 2001 +From: Ariadne Conill +Date: Tue, 21 Sep 2021 14:53:13 +0000 +Subject: [PATCH] Revert "PR25882, .gnu.attributes are not checked for shared + libraries" + +This revert is needed to avoid wrongly tagging objects with the incompatible +IBM long double ABI, which is not supported by musl and will result in +linking errors if used. + +This reverts commit a8acd6eeb6dc2cc5460ece90f90ebe36b56b20ba. +--- + bfd/elf32-tic6x.c | 3 --- + ld/ldlang.c | 10 ++++------ + 2 files changed, 4 insertions(+), 9 deletions(-) + +diff --git a/bfd/elf32-tic6x.c b/bfd/elf32-tic6x.c +index 5754f3cb860..3ad1d612749 100644 +--- a/bfd/elf32-tic6x.c ++++ b/bfd/elf32-tic6x.c +@@ -3735,9 +3735,6 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info) + + case Tag_ABI_PIC: + case Tag_ABI_PID: +- /* Don't transfer these tags from dynamic objects. */ +- if ((ibfd->flags & DYNAMIC) != 0) +- continue; + if (out_attr[i].i > in_attr[i].i) + out_attr[i].i = in_attr[i].i; + break; +diff --git a/ld/ldlang.c b/ld/ldlang.c +index 37b64c89ee1..f13beaef9d9 100644 +--- a/ld/ldlang.c ++++ b/ld/ldlang.c +@@ -7071,13 +7071,11 @@ lang_check (void) + bfd_printable_name (input_bfd), input_bfd, + bfd_printable_name (link_info.output_bfd)); + } +- +- /* If the input bfd has no contents, it shouldn't set the +- private data of the output bfd. */ +- else if (!file->flags.just_syms +- && ((input_bfd->flags & DYNAMIC) != 0 +- || bfd_count_sections (input_bfd) != 0)) ++ else if (bfd_count_sections (input_bfd)) + { ++ /* If the input bfd has no contents, it shouldn't set the ++ private data of the output bfd. */ ++ + bfd_error_handler_type pfn = NULL; + + /* If we aren't supposed to warn about mismatched input +-- +2.33.0 + diff --git a/extra/binutils/bfd-close-file-desriptor-if-there-is-no-archive-fd.patch b/extra/binutils/bfd-close-file-desriptor-if-there-is-no-archive-fd.patch new file mode 100644 index 0000000..357d0f9 --- /dev/null +++ b/extra/binutils/bfd-close-file-desriptor-if-there-is-no-archive-fd.patch @@ -0,0 +1,234 @@ +Upstream: yes +URL: https://sourceware.org/bugzilla/show_bug.cgi?id=28138 +From 1c611b40e6bfc8029bff7696814330b5bc0ee5c0 Mon Sep 17 00:00:00 2001 +From: "H.J. Lu" +Date: Mon, 26 Jul 2021 05:59:55 -0700 +Subject: [PATCH] bfd: Close the file descriptor if there is no archive fd + +Close the file descriptor if there is no archive plugin file descriptor +to avoid running out of file descriptors on thin archives with many +archive members. + +bfd/ + + PR ld/28138 + * plugin.c (bfd_plugin_close_file_descriptor): Close the file + descriptor there is no archive plugin file descriptor. + +ld/ + + PR ld/28138 + * testsuite/ld-plugin/lto.exp: Run tmpdir/pr28138 only for + native build. + + PR ld/28138 + * testsuite/ld-plugin/lto.exp: Run ld/28138 tests. + * testsuite/ld-plugin/pr28138.c: New file. + * testsuite/ld-plugin/pr28138-1.c: Likewise. + * testsuite/ld-plugin/pr28138-2.c: Likewise. + * testsuite/ld-plugin/pr28138-3.c: Likewise. + * testsuite/ld-plugin/pr28138-4.c: Likewise. + * testsuite/ld-plugin/pr28138-5.c: Likewise. + * testsuite/ld-plugin/pr28138-6.c: Likewise. + * testsuite/ld-plugin/pr28138-7.c: Likewise. + +(cherry picked from commit 5a98fb7513b559e20dfebdbaa2a471afda3b4742) +(cherry picked from commit 7dc37e1e1209c80e0bab784df6b6bac335e836f2) +--- + bfd/plugin.c | 8 +++++++ + ld/testsuite/ld-plugin/lto.exp | 34 ++++++++++++++++++++++++++++++ + ld/testsuite/ld-plugin/pr28138-1.c | 6 ++++++ + ld/testsuite/ld-plugin/pr28138-2.c | 6 ++++++ + ld/testsuite/ld-plugin/pr28138-3.c | 6 ++++++ + ld/testsuite/ld-plugin/pr28138-4.c | 6 ++++++ + ld/testsuite/ld-plugin/pr28138-5.c | 6 ++++++ + ld/testsuite/ld-plugin/pr28138-6.c | 6 ++++++ + ld/testsuite/ld-plugin/pr28138-7.c | 6 ++++++ + ld/testsuite/ld-plugin/pr28138.c | 20 ++++++++++++++++++ + 10 files changed, 104 insertions(+) + create mode 100644 ld/testsuite/ld-plugin/pr28138-1.c + create mode 100644 ld/testsuite/ld-plugin/pr28138-2.c + create mode 100644 ld/testsuite/ld-plugin/pr28138-3.c + create mode 100644 ld/testsuite/ld-plugin/pr28138-4.c + create mode 100644 ld/testsuite/ld-plugin/pr28138-5.c + create mode 100644 ld/testsuite/ld-plugin/pr28138-6.c + create mode 100644 ld/testsuite/ld-plugin/pr28138-7.c + create mode 100644 ld/testsuite/ld-plugin/pr28138.c + +diff --git a/bfd/plugin.c b/bfd/plugin.c +index 6cfa2b66470..3bab8febe88 100644 +--- a/bfd/plugin.c ++++ b/bfd/plugin.c +@@ -291,6 +291,14 @@ bfd_plugin_close_file_descriptor (bfd *abfd, int fd) + && !bfd_is_thin_archive (abfd->my_archive)) + abfd = abfd->my_archive; + ++ /* Close the file descriptor if there is no archive plugin file ++ descriptor. */ ++ if (abfd->archive_plugin_fd == -1) ++ { ++ close (fd); ++ return; ++ } ++ + abfd->archive_plugin_fd_open_count--; + /* Dup the archive plugin file descriptor for later use, which + will be closed by _bfd_archive_close_and_cleanup. */ +diff --git a/ld/testsuite/ld-plugin/lto.exp b/ld/testsuite/ld-plugin/lto.exp +index def69e43ab3..999d911ce6a 100644 +--- a/ld/testsuite/ld-plugin/lto.exp ++++ b/ld/testsuite/ld-plugin/lto.exp +@@ -687,6 +687,40 @@ if { [is_elf_format] && [check_lto_shared_available] } { + } + } + ++run_cc_link_tests [list \ ++ [list \ ++ "Build pr28138.a" \ ++ "-T" "" \ ++ {pr28138-1.c pr28138-2.c pr28138-3.c pr28138-4.c pr28138-5.c \ ++ pr28138-6.c pr28138-7.c} {} "pr28138.a" \ ++ ] \ ++ [list \ ++ "Build pr28138.o" \ ++ "" "" \ ++ {pr28138.c} {} \ ++ ] \ ++] ++ ++set exec_output [run_host_cmd "sh" \ ++ "-c \"ulimit -n 20; \ ++ $CC -Btmpdir/ld -o tmpdir/pr28138 \ ++ tmpdir/pr28138.o tmpdir/pr28138.a\""] ++set exec_output [prune_warnings $exec_output] ++if [string match "" $exec_output] then { ++ if { [isnative] } { ++ set exec_output [run_host_cmd "tmpdir/pr28138" ""] ++ if [string match "PASS" $exec_output] then { ++ pass "PR ld/28138" ++ } else { ++ fail "PR ld/28138" ++ } ++ } else { ++ pass "PR ld/28138" ++ } ++} else { ++ fail "PR ld/28138" ++} ++ + set testname "Build liblto-11.a" + remote_file host delete "tmpdir/liblto-11.a" + set catch_output [run_host_cmd "$ar" "rc $plug_opt tmpdir/liblto-11.a tmpdir/lto-11a.o tmpdir/lto-11b.o tmpdir/lto-11c.o"] +diff --git a/ld/testsuite/ld-plugin/pr28138-1.c b/ld/testsuite/ld-plugin/pr28138-1.c +new file mode 100644 +index 00000000000..51d119e1642 +--- /dev/null ++++ b/ld/testsuite/ld-plugin/pr28138-1.c +@@ -0,0 +1,6 @@ ++extern int a0(void); ++int ++a1(void) ++{ ++ return 1 + a0(); ++} +diff --git a/ld/testsuite/ld-plugin/pr28138-2.c b/ld/testsuite/ld-plugin/pr28138-2.c +new file mode 100644 +index 00000000000..1120cd797e9 +--- /dev/null ++++ b/ld/testsuite/ld-plugin/pr28138-2.c +@@ -0,0 +1,6 @@ ++extern int a1(void); ++int ++a2(void) ++{ ++ return 1 + a1(); ++} +diff --git a/ld/testsuite/ld-plugin/pr28138-3.c b/ld/testsuite/ld-plugin/pr28138-3.c +new file mode 100644 +index 00000000000..ec464947ee6 +--- /dev/null ++++ b/ld/testsuite/ld-plugin/pr28138-3.c +@@ -0,0 +1,6 @@ ++extern int a2(void); ++int ++a3(void) ++{ ++ return 1 + a2(); ++} +diff --git a/ld/testsuite/ld-plugin/pr28138-4.c b/ld/testsuite/ld-plugin/pr28138-4.c +new file mode 100644 +index 00000000000..475701b2c5c +--- /dev/null ++++ b/ld/testsuite/ld-plugin/pr28138-4.c +@@ -0,0 +1,6 @@ ++extern int a3(void); ++int ++a4(void) ++{ ++ return 1 + a3(); ++} +diff --git a/ld/testsuite/ld-plugin/pr28138-5.c b/ld/testsuite/ld-plugin/pr28138-5.c +new file mode 100644 +index 00000000000..e24f86c363e +--- /dev/null ++++ b/ld/testsuite/ld-plugin/pr28138-5.c +@@ -0,0 +1,6 @@ ++extern int a4(void); ++int ++a5(void) ++{ ++ return 1 + a4(); ++} +diff --git a/ld/testsuite/ld-plugin/pr28138-6.c b/ld/testsuite/ld-plugin/pr28138-6.c +new file mode 100644 +index 00000000000..b5b938bdb21 +--- /dev/null ++++ b/ld/testsuite/ld-plugin/pr28138-6.c +@@ -0,0 +1,6 @@ ++extern int a5(void); ++int ++a6(void) ++{ ++ return 1 + a5(); ++} +diff --git a/ld/testsuite/ld-plugin/pr28138-7.c b/ld/testsuite/ld-plugin/pr28138-7.c +new file mode 100644 +index 00000000000..4ef75bf0f0c +--- /dev/null ++++ b/ld/testsuite/ld-plugin/pr28138-7.c +@@ -0,0 +1,6 @@ ++extern int a6(void); ++int ++a7(void) ++{ ++ return 1 + a6(); ++} +diff --git a/ld/testsuite/ld-plugin/pr28138.c b/ld/testsuite/ld-plugin/pr28138.c +new file mode 100644 +index 00000000000..68252c9f382 +--- /dev/null ++++ b/ld/testsuite/ld-plugin/pr28138.c +@@ -0,0 +1,20 @@ ++#include ++ ++extern int a7(void); ++ ++int ++a0(void) ++{ ++ return 0; ++} ++ ++int ++main() ++{ ++ if (a7() == 7) ++ { ++ printf ("PASS\n"); ++ return 0; ++ } ++ return 1; ++} +-- +2.27.0 + diff --git a/extra/binutils/binutils-ld-fix-static-linking.patch b/extra/binutils/binutils-ld-fix-static-linking.patch new file mode 100644 index 0000000..bc5d762 --- /dev/null +++ b/extra/binutils/binutils-ld-fix-static-linking.patch @@ -0,0 +1,46 @@ +This fixes static linking for our hardened toolchain +diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc +index e8126cb..9532bfb 100644 +--- a/ld/scripttempl/elf.sc ++++ b/ld/scripttempl/elf.sc +@@ -235,8 +235,8 @@ test "${LARGE_SECTIONS}" = "yes" && LARGE_SECTIONS=" + if test "${ENABLE_INITFINI_ARRAY}" = "yes"; then + SORT_INIT_ARRAY="KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))" + SORT_FINI_ARRAY="KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*)))" +- CTORS_IN_INIT_ARRAY="EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .ctors" +- DTORS_IN_FINI_ARRAY="EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .dtors" ++ CTORS_IN_INIT_ARRAY="EXCLUDE_FILE (*crtbegin*.o *crtend*.o $OTHER_EXCLUDE_FILES) .ctors" ++ DTORS_IN_FINI_ARRAY="EXCLUDE_FILE (*crtbegin*.o *crtend*.o $OTHER_EXCLUDE_FILES) .dtors" + else + SORT_INIT_ARRAY="KEEP (*(SORT(.init_array.*)))" + SORT_FINI_ARRAY="KEEP (*(SORT(.fini_array.*)))" +@@ -270,15 +270,14 @@ CTOR=".ctors ${CONSTRUCTING-0} : + doesn't matter which directory crtbegin.o + is in. */ + +- KEEP (*crtbegin.o(.ctors)) +- KEEP (*crtbegin?.o(.ctors)) ++ KEEP (*crtbegin*.o(.ctors)) + + /* We don't want to include the .ctor section from + the crtend.o file until after the sorted ctors. + The .ctor section from the crtend file contains the + end of ctors marker and it must be last */ + +- KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .ctors)) ++ KEEP (*(EXCLUDE_FILE (*crtend*.o $OTHER_EXCLUDE_FILES) .ctors)) + KEEP (*(SORT(.ctors.*))) + KEEP (*(.ctors)) + ${CONSTRUCTING+${CTOR_END}} +@@ -286,9 +285,8 @@ CTOR=".ctors ${CONSTRUCTING-0} : + DTOR=".dtors ${CONSTRUCTING-0} : + { + ${CONSTRUCTING+${DTOR_START}} +- KEEP (*crtbegin.o(.dtors)) +- KEEP (*crtbegin?.o(.dtors)) +- KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .dtors)) ++ KEEP (*crtbegin*.o(.dtors)) ++ KEEP (*(EXCLUDE_FILE (*crtend*.o $OTHER_EXCLUDE_FILES) .dtors)) + KEEP (*(SORT(.dtors.*))) + KEEP (*(.dtors)) + ${CONSTRUCTING+${DTOR_END}} diff --git a/extra/binutils/gold-mips.patch b/extra/binutils/gold-mips.patch new file mode 100644 index 0000000..291a2aa --- /dev/null +++ b/extra/binutils/gold-mips.patch @@ -0,0 +1,39 @@ +# DP: Fix gold on mips64 targets. + +gold/ + +2016-08-09 Aurelien Jarno + + * configure.tgt: Add mips64el*-*-*|mips64le*-*-* and mips64*-*-*. + + +--- a/gold/configure.tgt ++++ b/gold/configure.tgt +@@ -153,6 +153,13 @@ aarch64*-*) + targ_big_endian=false + targ_extra_big_endian=true + ;; ++mips*64*el*-*-*|mips*64*le*-*-*) ++ targ_obj=mips ++ targ_machine=EM_MIPS_RS3_LE ++ targ_size=64 ++ targ_big_endian=false ++ targ_extra_big_endian=true ++ ;; + mips*el*-*-*|mips*le*-*-*) + targ_obj=mips + targ_machine=EM_MIPS_RS3_LE +@@ -160,6 +167,13 @@ mips*el*-*-*|mips*le*-*-*) + targ_big_endian=false + targ_extra_big_endian=true + ;; ++mips*64*-*-*) ++ targ_obj=mips ++ targ_machine=EM_MIPS ++ targ_size=64 ++ targ_big_endian=true ++ targ_extra_big_endian=false ++ ;; + mips*-*-*) + targ_obj=mips + targ_machine=EM_MIPS diff --git a/extra/binutils/ld-bfd-mips.patch b/extra/binutils/ld-bfd-mips.patch new file mode 100644 index 0000000..2991c88 --- /dev/null +++ b/extra/binutils/ld-bfd-mips.patch @@ -0,0 +1,19 @@ +--- ./ld/configure.tgt.orig ++++ ./ld/configure.tgt +@@ -541,12 +541,12 @@ + ;; + mips*-*-windiss) targ_emul=elf32mipswindiss + ;; +-mips64*el-*-linux-*) targ_emul=elf32ltsmipn32 +- targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip" ++mips64*el-*-linux-*) targ_emul=elf64ltsmip ++ targ_extra_emuls="elf32ltsmipn32 elf32btsmipn32 elf32ltsmip elf32btsmip elf64btsmip" + targ_extra_libpath=$targ_extra_emuls + ;; +-mips64*-*-linux-*) targ_emul=elf32btsmipn32 +- targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip" ++mips64*-*-linux-*) targ_emul=elf64btsmip ++ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip elf64ltsmip" + targ_extra_libpath=$targ_extra_emuls + ;; + mips*el-*-linux-*) targ_emul=elf32ltsmip diff --git a/extra/boost/0001-revert-cease-dependence-on-range.patch b/extra/boost/0001-revert-cease-dependence-on-range.patch new file mode 100644 index 0000000..77b8178 --- /dev/null +++ b/extra/boost/0001-revert-cease-dependence-on-range.patch @@ -0,0 +1 @@ +Too Many Requests \ No newline at end of file diff --git a/extra/boost/boost-1.57.0-python-abi_letters.patch b/extra/boost/boost-1.57.0-python-abi_letters.patch new file mode 100644 index 0000000..7df3ee7 --- /dev/null +++ b/extra/boost/boost-1.57.0-python-abi_letters.patch @@ -0,0 +1,62 @@ +--- boost_1_57_0/tools/build/src/tools/python.jam 2013-05-21 06:14:18.000000000 +0200 ++++ boost_1_55_0/tools/build/src/tools/python.jam 2014-05-29 19:09:12.115413877 +0200 +@@ -94,7 +94,7 @@ feature.feature pythonpath : : free opti + # using python : 2.3 : /usr/local/bin/python ; + # + rule init ( version ? : cmd-or-prefix ? : includes * : libraries ? +- : condition * : extension-suffix ? ) ++ : condition * : extension-suffix ? : abi-letters ? ) + { + project.push-current $(.project) ; + +@@ -107,7 +107,7 @@ rule init ( version ? : cmd-or-prefix ? + } + } + +- configure $(version) : $(cmd-or-prefix) : $(includes) : $(libraries) : $(condition) : $(extension-suffix) ; ++ configure $(version) : $(cmd-or-prefix) : $(includes) : $(libraries) : $(condition) : $(extension-suffix) : $(abi-letters) ; + + project.pop-current ; + } +@@ -653,7 +653,7 @@ local rule system-library-dependencies ( + + # Declare a target to represent Python's library. + # +-local rule declare-libpython-target ( version ? : requirements * ) ++local rule declare-libpython-target ( version ? : requirements * : abi-letters ? ) + { + # Compute the representation of Python version in the name of Python's + # library file. +@@ -677,13 +677,13 @@ local rule declare-libpython-target ( ve + } + + # Declare it. +- lib python.lib : : python$(lib-version) $(requirements) ; ++ lib python.lib : : python$(lib-version)$(abi-letters) $(requirements) ; + } + + + # Implementation of init. + local rule configure ( version ? : cmd-or-prefix ? : includes * : libraries ? : +- condition * : extension-suffix ? ) ++ condition * : extension-suffix ? : abi-letters ? ) + { + local prefix ; + local exec-prefix ; +@@ -699,6 +699,7 @@ local rule configure ( version ? : cmd-o + extension-suffix ?= _d ; + } + extension-suffix ?= "" ; ++ abi-letters ?= "" ; + + # Normalize and dissect any version number. + local major-minor ; +@@ -922,7 +923,7 @@ local rule configure ( version ? : cmd-o + } + else + { +- declare-libpython-target $(version) : $(target-requirements) ; ++ declare-libpython-target $(version) : $(target-requirements) : $(abi-letters) ; + + # This is an evil hack. On, Windows, when Python is embedded, nothing + # seems to set up sys.path to include Python's standard library diff --git a/extra/boost/boost-1.57.0-python-libpython_dep.patch b/extra/boost/boost-1.57.0-python-libpython_dep.patch new file mode 100644 index 0000000..57bfc26 --- /dev/null +++ b/extra/boost/boost-1.57.0-python-libpython_dep.patch @@ -0,0 +1,13 @@ +Index: boost_1_57_0/tools/build/src/tools/python.jam +=================================================================== +--- boost_1_57_0/tools/build/src/tools/python.jam (revision 50406) ++++ boost_1_57_0/tools/build/src/tools/python.jam (working copy) +@@ -994,7 +994,7 @@ + else + { + alias python_for_extensions +- : ++ : python + : $(target-requirements) + : + : $(usage-requirements) diff --git a/extra/boost/python-3.10.patch b/extra/boost/python-3.10.patch new file mode 100644 index 0000000..2e1d5e3 --- /dev/null +++ b/extra/boost/python-3.10.patch @@ -0,0 +1,49 @@ +From e193f080c7d209516ac9b712fa0c50bb08026fa2 Mon Sep 17 00:00:00 2001 +From: Martin Jansa +Date: Tue, 19 Oct 2021 12:24:31 +0000 +Subject: [PATCH] BoostConfig.cmake: allow searching for python310 + +* accept double digits in Python3_VERSION_MINOR + +* if someone is using e.g.: + find_package(Python3 REQUIRED) + find_package(Boost REQUIRED python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}) + + with python-3.10 then it currently fails with: + + -- Found PythonLibs: /usr/lib/libpython3.10.so (found version "3.10.0") + -- Found Python3: -native/usr/bin/python3-native/python3 (found version "3.10.0") found components: Interpreter + CMake Error at /usr/lib/cmake/Boost-1.77.0/BoostConfig.cmake:141 (find_package): + Could not find a package configuration file provided by "boost_python310" + (requested version 1.77.0) with any of the following names: + + boost_python310Config.cmake + boost_python310-config.cmake + + Add the installation prefix of "boost_python310" to CMAKE_PREFIX_PATH or + set "boost_python310_DIR" to a directory containing one of the above files. + If "boost_python310" provides a separate development package or SDK, be + sure it has been installed. + Call Stack (most recent call first): + /usr/lib/cmake/Boost-1.77.0/BoostConfig.cmake:258 (boost_find_component) + /usr/share/cmake-3.21/Modules/FindBoost.cmake:594 (find_package) + CMakeLists.txt:18 (find_package) + +Signed-off-by: Martin Jansa +--- + BoostConfig.cmake | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/BoostConfig.cmake b/BoostConfig.cmake +index fd17821..5dffa58 100644 +--- a/tools/boost_install/BoostConfig.cmake ++++ b/tools/boost_install/BoostConfig.cmake +@@ -113,7 +113,7 @@ macro(boost_find_component comp required quiet) + set(_BOOST_REQUIRED REQUIRED) + endif() + +- if("${comp}" MATCHES "^(python|numpy|mpi_python)([1-9])([0-9])$") ++ if("${comp}" MATCHES "^(python|numpy|mpi_python)([1-9])([0-9][0-9]?)$") + + # handle pythonXY and numpyXY versioned components for compatibility + diff --git a/extra/chromium/chromium-VirtualCursor-standard-layout.patch b/extra/chromium/chromium-VirtualCursor-standard-layout.patch new file mode 100644 index 0000000..721e194 --- /dev/null +++ b/extra/chromium/chromium-VirtualCursor-standard-layout.patch @@ -0,0 +1,216 @@ +diff --git a/sql/recover_module/btree.cc b/sql/recover_module/btree.cc +index 9ecaafe..839318a 100644 +--- a/sql/recover_module/btree.cc ++++ b/sql/recover_module/btree.cc +@@ -135,16 +135,25 @@ + "Move the destructor to the .cc file if it's non-trival"); + #endif // !DCHECK_IS_ON() + +-LeafPageDecoder::LeafPageDecoder(DatabasePageReader* db_reader) noexcept +- : page_id_(db_reader->page_id()), +- db_reader_(db_reader), +- cell_count_(ComputeCellCount(db_reader)), +- next_read_index_(0), +- last_record_size_(0) { ++void LeafPageDecoder::Initialize(DatabasePageReader* db_reader) { ++ DCHECK(db_reader); + DCHECK(IsOnValidPage(db_reader)); ++ page_id_ = db_reader->page_id(); ++ db_reader_ = db_reader; ++ cell_count_ = ComputeCellCount(db_reader); ++ next_read_index_ = 0; ++ last_record_size_ = 0; + DCHECK(DatabasePageReader::IsValidPageId(page_id_)); + } + ++void LeafPageDecoder::Reset() { ++ db_reader_ = nullptr; ++ page_id_ = 0; ++ cell_count_ = 0; ++ next_read_index_ = 0; ++ last_record_size_ = 0; ++} ++ + bool LeafPageDecoder::TryAdvance() { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + DCHECK(CanAdvance()); +diff --git a/sql/recover_module/btree.h b/sql/recover_module/btree.h +index d76d076..33114b0 100644 +--- a/sql/recover_module/btree.h ++++ b/sql/recover_module/btree.h +@@ -102,7 +102,7 @@ + // + // |db_reader| must have been used to read an inner page of a table B-tree. + // |db_reader| must outlive this instance. +- explicit LeafPageDecoder(DatabasePageReader* db_reader) noexcept; ++ explicit LeafPageDecoder() noexcept = default; + ~LeafPageDecoder() noexcept = default; + + LeafPageDecoder(const LeafPageDecoder&) = delete; +@@ -150,6 +150,15 @@ + // read as long as CanAdvance() returns true. + bool TryAdvance(); + ++ // Initialize with DatabasePageReader ++ void Initialize(DatabasePageReader* db_reader); ++ ++ // Reset internal DatabasePageReader ++ void Reset(); ++ ++ // True if DatabasePageReader is valid ++ bool IsValid() { return (db_reader_ != nullptr); } ++ + // True if the given reader may point to an inner page in a table B-tree. + // + // The last ReadPage() call on |db_reader| must have succeeded. +@@ -163,14 +172,14 @@ + static int ComputeCellCount(DatabasePageReader* db_reader); + + // The number of the B-tree page this reader is reading. +- const int64_t page_id_; ++ int64_t page_id_; + // Used to read the tree page. + // + // Raw pointer usage is acceptable because this instance's owner is expected + // to ensure that the DatabasePageReader outlives this. +- DatabasePageReader* const db_reader_; ++ DatabasePageReader* db_reader_; + // Caches the ComputeCellCount() value for this reader's page. +- const int cell_count_ = ComputeCellCount(db_reader_); ++ int cell_count_; + + // The reader's cursor state. + // +diff --git a/sql/recover_module/cursor.cc b/sql/recover_module/cursor.cc +index 0029ff9..42548bc 100644 +--- a/sql/recover_module/cursor.cc ++++ b/sql/recover_module/cursor.cc +@@ -26,7 +26,7 @@ + int VirtualCursor::First() { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + inner_decoders_.clear(); +- leaf_decoder_ = nullptr; ++ leaf_decoder_.Reset(); + + AppendPageDecoder(table_->root_page_id()); + return Next(); +@@ -36,18 +36,18 @@ + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + record_reader_.Reset(); + +- while (!inner_decoders_.empty() || leaf_decoder_.get()) { +- if (leaf_decoder_.get()) { +- if (!leaf_decoder_->CanAdvance()) { ++ while (!inner_decoders_.empty() || leaf_decoder_.IsValid()) { ++ if (leaf_decoder_.IsValid()) { ++ if (!leaf_decoder_.CanAdvance()) { + // The leaf has been exhausted. Remove it from the DFS stack. +- leaf_decoder_ = nullptr; ++ leaf_decoder_.Reset(); + continue; + } +- if (!leaf_decoder_->TryAdvance()) ++ if (!leaf_decoder_.TryAdvance()) + continue; + +- if (!payload_reader_.Initialize(leaf_decoder_->last_record_size(), +- leaf_decoder_->last_record_offset())) { ++ if (!payload_reader_.Initialize(leaf_decoder_.last_record_size(), ++ leaf_decoder_.last_record_offset())) { + continue; + } + if (!record_reader_.Initialize()) +@@ -99,13 +99,13 @@ + int64_t VirtualCursor::RowId() { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + DCHECK(record_reader_.IsInitialized()); +- DCHECK(leaf_decoder_.get()); +- return leaf_decoder_->last_record_rowid(); ++ DCHECK(leaf_decoder_.IsValid()); ++ return leaf_decoder_.last_record_rowid(); + } + + void VirtualCursor::AppendPageDecoder(int page_id) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); +- DCHECK(leaf_decoder_.get() == nullptr) ++ DCHECK(!leaf_decoder_.IsValid()) + << __func__ + << " must only be called when the current path has no leaf decoder"; + +@@ -113,7 +113,7 @@ + return; + + if (LeafPageDecoder::IsOnValidPage(&db_reader_)) { +- leaf_decoder_ = std::make_unique(&db_reader_); ++ leaf_decoder_.Initialize(&db_reader_); + return; + } + +diff --git a/sql/recover_module/cursor.h b/sql/recover_module/cursor.h +index afcd690..b15c31d 100644 +--- a/sql/recover_module/cursor.h ++++ b/sql/recover_module/cursor.h +@@ -129,7 +129,7 @@ + std::vector> inner_decoders_; + + // Decodes the leaf page containing records. +- std::unique_ptr leaf_decoder_; ++ LeafPageDecoder leaf_decoder_; + + SEQUENCE_CHECKER(sequence_checker_); + }; +diff --git a/sql/recover_module/pager.cc b/sql/recover_module/pager.cc +index 58e75de..5fe9620 100644 +--- a/sql/recover_module/pager.cc ++++ b/sql/recover_module/pager.cc +@@ -23,8 +23,7 @@ + "ints are not appropriate for representing page IDs"); + + DatabasePageReader::DatabasePageReader(VirtualTable* table) +- : page_data_(std::make_unique(table->page_size())), +- table_(table) { ++ : page_data_(), table_(table) { + DCHECK(table != nullptr); + DCHECK(IsValidPageSize(table->page_size())); + } +@@ -57,8 +56,8 @@ + std::numeric_limits::max(), + "The |read_offset| computation above may overflow"); + +- int sqlite_status = +- RawRead(sqlite_file, read_size, read_offset, page_data_.get()); ++ int sqlite_status = RawRead(sqlite_file, read_size, read_offset, ++ const_cast(page_data_.data())); + + // |page_id_| needs to be set to kInvalidPageId if the read failed. + // Otherwise, future ReadPage() calls with the previous |page_id_| value +diff --git a/sql/recover_module/pager.h b/sql/recover_module/pager.h +index 0e388ddc..99314e3 100644 +--- a/sql/recover_module/pager.h ++++ b/sql/recover_module/pager.h +@@ -5,6 +5,7 @@ + #ifndef SQL_RECOVER_MODULE_PAGER_H_ + #define SQL_RECOVER_MODULE_PAGER_H_ + ++#include + #include + #include + +@@ -70,7 +71,7 @@ + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + DCHECK_NE(page_id_, kInvalidPageId) + << "Successful ReadPage() required before accessing pager state"; +- return page_data_.get(); ++ return page_data_.data(); + } + + // The number of bytes in the page read by the last ReadPage() call. +@@ -137,7 +138,7 @@ + int page_id_ = kInvalidPageId; + // Stores the bytes of the last page successfully read by ReadPage(). + // The content is undefined if the last call to ReadPage() did not succeed. +- const std::unique_ptr page_data_; ++ const std::array page_data_; + // Raw pointer usage is acceptable because this instance's owner is expected + // to ensure that the VirtualTable outlives this. + VirtualTable* const table_; diff --git a/extra/graphite/cmake.patch b/extra/graphite/cmake.patch new file mode 100644 index 0000000..2b21d6b --- /dev/null +++ b/extra/graphite/cmake.patch @@ -0,0 +1,23 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index b6ac26b..0371b0c 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -120,11 +120,7 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") + if (${CMAKE_CXX_COMPILER} MATCHES ".*mingw.*") + target_link_libraries(graphite2 kernel32 msvcr90 mingw32 gcc user32) + else (${CMAKE_CXX_COMPILER} MATCHES ".*mingw.*") +- if (GRAPHITE2_SANITIZERS) +- target_link_libraries(graphite2 c gcc_s) +- else () +- target_link_libraries(graphite2 c gcc) +- endif () ++ target_link_libraries(graphite2 c gcc_s -lssp_nonshared) + endif() + include(Graphite) + if (BUILD_SHARED_LIBS) +@@ -156,4 +152,4 @@ endif() + + + install(TARGETS graphite2 EXPORT graphite2 LIBRARY DESTINATION lib${LIB_SUFFIX} ARCHIVE DESTINATION lib${LIB_SUFFIX} PUBLIC_HEADER DESTINATION include/graphite2 RUNTIME DESTINATION bin) +-install(EXPORT graphite2 DESTINATION share/graphite2 NAMESPACE gr2_) ++install(EXPORT graphite2 DESTINATION lib${LIB_SUFFIX}/cmake/graphite2 NAMESPACE gr2_) diff --git a/extra/mpd/libcdio-paa-version.patch b/extra/mpd/libcdio-paa-version.patch new file mode 100644 index 0000000..82612b1 --- /dev/null +++ b/extra/mpd/libcdio-paa-version.patch @@ -0,0 +1,266 @@ + + + +aports - Alpine packages build scripts + + + + + + + + + +
+ + + + +
+aboutsummaryrefslogtreecommitdiffstats
+ + + +
+
+
Not found
+
+ +
+ + diff --git a/extra/mpd/libcdio-paranoia-version.patch b/extra/mpd/libcdio-paranoia-version.patch new file mode 100644 index 0000000..44810b3 --- /dev/null +++ b/extra/mpd/libcdio-paranoia-version.patch @@ -0,0 +1,13 @@ +diff --git a/src/input/plugins/meson.build b/src/input/plugins/meson.build +index 7322365..65ff564 100644 +--- a/src/input/plugins/meson.build ++++ b/src/input/plugins/meson.build +@@ -10,7 +10,7 @@ if alsa_dep.found() + input_plugins_sources += 'AlsaInputPlugin.cxx' + endif + +-libcdio_paranoia_dep = dependency('libcdio_paranoia', version: '>= 10.2+0.93+1', required: get_option('cdio_paranoia')) ++libcdio_paranoia_dep = dependency('libcdio_paranoia', required: get_option('cdio_paranoia')) + input_features.set('ENABLE_CDIO_PARANOIA', libcdio_paranoia_dep.found()) + if libcdio_paranoia_dep.found() + input_plugins_sources += 'CdioParanoiaInputPlugin.cxx' diff --git a/extra/mpd/mpd.confd b/extra/mpd/mpd.confd new file mode 100644 index 0000000..720306e --- /dev/null +++ b/extra/mpd/mpd.confd @@ -0,0 +1,7 @@ +# conf.d file for music player daemon + +# +# Specify daemon $OPTS here. +# + +OPTS="" diff --git a/extra/mpd/mpd.initd b/extra/mpd/mpd.initd new file mode 100644 index 0000000..817583c --- /dev/null +++ b/extra/mpd/mpd.initd @@ -0,0 +1,25 @@ +#!/sbin/openrc-run + +# init.d file for music player daemon + +supervisor=supervise-daemon + +name="Music Player Daemon" +description="A daemon for playing music" + +command=/usr/bin/mpd +command_args="$MPD_OPTS" +command_args_foreground="--no-daemon" + +command_user="${M_USER:-mpd}:${M_GROUP:-audio}" + +depend() { + need localmount + use net netmount nfsmount esound pulseaudio + after firewall +} + +start_pre() { + checkpath --directory --quiet \ + --owner "${M_USER:-mpd}" --mode 0775 /var/run/mpd +} diff --git a/extra/musl/0001-riscv64-define-ELF_NFPREG.patch b/extra/musl/0001-riscv64-define-ELF_NFPREG.patch new file mode 100644 index 0000000..b2f0a0f --- /dev/null +++ b/extra/musl/0001-riscv64-define-ELF_NFPREG.patch @@ -0,0 +1,24 @@ +From e5d2823631bbfebacf48e1a34ed28f28d7cb2570 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 11 Jan 2021 09:40:33 -0800 +Subject: [PATCH] riscv64: define ELF_NFPREG + +ELF_NFPREG is used by some userspace applications like gdb +--- + arch/riscv64/bits/user.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/arch/riscv64/bits/user.h b/arch/riscv64/bits/user.h +index 2da743ea..0d37de0b 100644 +--- a/arch/riscv64/bits/user.h ++++ b/arch/riscv64/bits/user.h +@@ -1,5 +1,6 @@ + #include + + #define ELF_NGREG 32 ++#define ELF_NFPREG 33 + typedef unsigned long elf_greg_t, elf_gregset_t[ELF_NGREG]; + typedef union __riscv_mc_fp_state elf_fpregset_t; +-- +2.30.1 + diff --git a/extra/musl/change-scheduler-functions-Linux-compatib.patch b/extra/musl/change-scheduler-functions-Linux-compatib.patch new file mode 100644 index 0000000..fb63dfd --- /dev/null +++ b/extra/musl/change-scheduler-functions-Linux-compatib.patch @@ -0,0 +1,52 @@ +diff -uNr musl-1.2.2.orig/src/sched/sched_getparam.c musl-1.2.2/src/sched/sched_getparam.c +--- musl-1.2.2.orig/src/sched/sched_getparam.c 2021-01-15 02:26:00.000000000 +0000 ++++ musl-1.2.2/src/sched/sched_getparam.c 2021-12-23 00:31:16.590518270 +0000 +@@ -1,8 +1,7 @@ + #include +-#include + #include "syscall.h" + + int sched_getparam(pid_t pid, struct sched_param *param) + { +- return __syscall_ret(-ENOSYS); ++ return syscall(SYS_sched_getparam, pid, param); + } +diff -uNr musl-1.2.2.orig/src/sched/sched_getscheduler.c musl-1.2.2/src/sched/sched_getscheduler.c +--- musl-1.2.2.orig/src/sched/sched_getscheduler.c 2021-01-15 02:26:00.000000000 +0000 ++++ musl-1.2.2/src/sched/sched_getscheduler.c 2021-12-23 00:33:32.949520644 +0000 +@@ -1,8 +1,7 @@ + #include +-#include + #include "syscall.h" + + int sched_getscheduler(pid_t pid) + { +- return __syscall_ret(-ENOSYS); ++ return syscall(SYS_sched_getscheduler, pid); + } +diff -uNr musl-1.2.2.orig/src/sched/sched_setparam.c musl-1.2.2/src/sched/sched_setparam.c +--- musl-1.2.2.orig/src/sched/sched_setparam.c 2021-01-15 02:26:00.000000000 +0000 ++++ musl-1.2.2/src/sched/sched_setparam.c 2021-12-23 00:35:12.277522374 +0000 +@@ -1,8 +1,7 @@ + #include +-#include + #include "syscall.h" + + int sched_setparam(pid_t pid, const struct sched_param *param) + { +- return __syscall_ret(-ENOSYS); ++ return syscall(SYS_sched_setparam, pid, param); + } +diff -uNr musl-1.2.2.orig/src/sched/sched_setscheduler.c musl-1.2.2/src/sched/sched_setscheduler.c +--- musl-1.2.2.orig/src/sched/sched_setscheduler.c 2021-01-15 02:26:00.000000000 +0000 ++++ musl-1.2.2/src/sched/sched_setscheduler.c 2021-12-23 00:36:37.548523859 +0000 +@@ -1,8 +1,7 @@ + #include +-#include + #include "syscall.h" + + int sched_setscheduler(pid_t pid, int sched, const struct sched_param *param) + { +- return __syscall_ret(-ENOSYS); ++ return syscall(SYS_sched_setscheduler, pid, sched, param); + } diff --git a/extra/musl/fix-utmp-wtmp-paths.patch b/extra/musl/fix-utmp-wtmp-paths.patch new file mode 100644 index 0000000..900abc7 --- /dev/null +++ b/extra/musl/fix-utmp-wtmp-paths.patch @@ -0,0 +1,29 @@ +diff -uNr musl-1.2.2.orig/include/paths.h musl-1.2.2/include/paths.h +--- musl-1.2.2.orig/include/paths.h 2021-01-14 20:26:00.000000000 -0600 ++++ musl-1.2.2/include/paths.h 2021-08-26 16:39:31.355618388 -0500 +@@ -18,9 +18,9 @@ + #define _PATH_SHADOW "/etc/shadow" + #define _PATH_SHELLS "/etc/shells" + #define _PATH_TTY "/dev/tty" +-#define _PATH_UTMP "/dev/null/utmp" ++#define _PATH_UTMP "/run/utmps/utmp" + #define _PATH_VI "/usr/bin/vi" +-#define _PATH_WTMP "/dev/null/wtmp" ++#define _PATH_WTMP "/var/log/wtmp" + + #define _PATH_DEV "/dev/" + #define _PATH_TMP "/tmp/" +diff -uNr musl-1.2.2.orig/include/utmp.h musl-1.2.2/include/utmp.h +--- musl-1.2.2.orig/include/utmp.h 2021-01-14 20:26:00.000000000 -0600 ++++ musl-1.2.2/include/utmp.h 2021-08-26 16:37:11.567365982 -0500 +@@ -37,8 +37,8 @@ + + int login_tty(int); + +-#define _PATH_UTMP "/dev/null/utmp" +-#define _PATH_WTMP "/dev/null/wtmp" ++#define _PATH_UTMP "/run/utmps/utmp" ++#define _PATH_WTMP "/var/log/wtmp" + + #define UTMP_FILE _PATH_UTMP + #define WTMP_FILE _PATH_WTMP diff --git a/extra/musl/handle-aux-at_base.patch b/extra/musl/handle-aux-at_base.patch new file mode 100644 index 0000000..7c9f2dc --- /dev/null +++ b/extra/musl/handle-aux-at_base.patch @@ -0,0 +1,46 @@ +This is required to make the gcompat ELF interpreter stub work with some +packed binaries. + +diff --git a/src/env/__init_tls.c b/src/env/__init_tls.c +index b125eb1..616c6a6 100644 +--- a/src/env/__init_tls.c ++++ b/src/env/__init_tls.c +@@ -66,8 +66,10 @@ void *__copy_tls(unsigned char *mem) + } + + #if ULONG_MAX == 0xffffffff ++typedef Elf32_Ehdr Ehdr; + typedef Elf32_Phdr Phdr; + #else ++typedef Elf64_Ehdr Ehdr; + typedef Elf64_Phdr Phdr; + #endif + +@@ -77,15 +79,23 @@ extern const size_t _DYNAMIC[]; + static void static_init_tls(size_t *aux) + { + unsigned char *p; +- size_t n; ++ size_t n, e; + Phdr *phdr, *tls_phdr=0; + size_t base = 0; + void *mem; + +- for (p=(void *)aux[AT_PHDR],n=aux[AT_PHNUM]; n; n--,p+=aux[AT_PHENT]) { ++ if (aux[AT_BASE]) { ++ Ehdr *ehdr = (void *)aux[AT_BASE]; ++ p = (unsigned char *)aux[AT_BASE] + ehdr->e_phoff; ++ n = ehdr->e_phnum; ++ e = ehdr->e_phentsize; ++ } else { ++ p = (void *)aux[AT_PHDR]; ++ n = aux[AT_PHNUM]; ++ e = aux[AT_PHENT]; ++ } ++ for (; n; n--, p+=e) { + phdr = (void *)p; +- if (phdr->p_type == PT_PHDR) +- base = aux[AT_PHDR] - phdr->p_vaddr; + if (phdr->p_type == PT_DYNAMIC && _DYNAMIC) + base = (size_t)_DYNAMIC - phdr->p_vaddr; + if (phdr->p_type == PT_TLS) diff --git a/extra/musl/qsort_r.patch b/extra/musl/qsort_r.patch new file mode 100644 index 0000000..4ea6366 --- /dev/null +++ b/extra/musl/qsort_r.patch @@ -0,0 +1,213 @@ +Date: Tue, 9 Mar 2021 18:02:13 -0300 +From: Érico Nogueira +To: musl@...ts.openwall.com +Cc: Érico Nogueira +Subject: [PATCH v3] add qsort_r and make qsort a wrapper around it + +we make qsort a wrapper by providing a wrapper_cmp function that uses +the extra argument as a function pointer. should be optimized to a tail +call on most architectures, as long as it's built with +-fomit-frame-pointer, so the performance impact should be minimal. + +to keep the git history clean, for now qsort_r is implemented in qsort.c +and qsort is implemented in qsort_nr.c. qsort.c also received a few +trivial cleanups, including replacing (*cmp)() calls with cmp(). +qsort_nr.c contains only wrapper_cmp and qsort as a qsort_r wrapper +itself. +--- + +Following suggestions from IRC, as few changes as possible to the files, +a final clean up commit after this one would involve some git mv's (I +won't make a patch for it). Added weak_alias to force qsort to use +libc's qsort_r. + +If this can't be accepted due to the overhead on some archs (ppc, mips, +arm in some situations?), maybe we could revisit v2 of the patch? + + include/stdlib.h | 1 + + src/include/stdlib.h | 1 + + src/stdlib/qsort.c | 37 ++++++++++++++++++++----------------- + src/stdlib/qsort_nr.c | 14 ++++++++++++++ + 4 files changed, 36 insertions(+), 17 deletions(-) + create mode 100644 src/stdlib/qsort_nr.c + +diff --git a/include/stdlib.h b/include/stdlib.h +index b54a051f..0c0ced5f 100644 +--- a/include/stdlib.h ++++ b/include/stdlib.h +@@ -158,6 +158,7 @@ struct __locale_struct; + float strtof_l(const char *__restrict, char **__restrict, struct __locale_struct *); + double strtod_l(const char *__restrict, char **__restrict, struct __locale_struct *); + long double strtold_l(const char *__restrict, char **__restrict, struct __locale_struct *); ++void qsort_r (void *, size_t, size_t, int (*)(const void *, const void *, void *), void *); + #endif + + #if defined(_LARGEFILE64_SOURCE) || defined(_BSD_SOURCE) +diff --git a/src/include/stdlib.h b/src/include/stdlib.h +index e9da2015..812b04de 100644 +--- a/src/include/stdlib.h ++++ b/src/include/stdlib.h +@@ -8,6 +8,7 @@ hidden void __env_rm_add(char *, char *); + hidden int __mkostemps(char *, int, int); + hidden int __ptsname_r(int, char *, size_t); + hidden char *__randname(char *); ++hidden void __qsort_r (void *, size_t, size_t, int (*)(const void *, const void *, void *), void *); + + hidden void *__libc_malloc(size_t); + hidden void *__libc_malloc_impl(size_t); +diff --git a/src/stdlib/qsort.c b/src/stdlib/qsort.c +index da58fd31..20e40dda 100644 +--- a/src/stdlib/qsort.c ++++ b/src/stdlib/qsort.c +@@ -24,6 +24,7 @@ + /* Smoothsort, an adaptive variant of Heapsort. Memory usage: O(1). + Run time: Worst case O(n log n), close to O(n) in the mostly-sorted case. */ + ++#define _BSD_SOURCE + #include + #include + #include +@@ -31,7 +32,7 @@ + #include "atomic.h" + #define ntz(x) a_ctz_l((x)) + +-typedef int (*cmpfun)(const void *, const void *); ++typedef int (*cmpfun)(const void *, const void *, void *); + + static inline int pntz(size_t p[2]) { + int r = ntz(p[0] - 1); +@@ -88,7 +89,7 @@ static inline void shr(size_t p[2], int n) + p[1] >>= n; + } + +-static void sift(unsigned char *head, size_t width, cmpfun cmp, int pshift, size_t lp[]) ++static void sift(unsigned char *head, size_t width, cmpfun cmp, void *arg, int pshift, size_t lp[]) + { + unsigned char *rt, *lf; + unsigned char *ar[14 * sizeof(size_t) + 1]; +@@ -99,10 +100,10 @@ static void sift(unsigned char *head, size_t width, cmpfun cmp, int pshift, size + rt = head - width; + lf = head - width - lp[pshift - 2]; + +- if((*cmp)(ar[0], lf) >= 0 && (*cmp)(ar[0], rt) >= 0) { ++ if(cmp(ar[0], lf, arg) >= 0 && cmp(ar[0], rt, arg) >= 0) { + break; + } +- if((*cmp)(lf, rt) >= 0) { ++ if(cmp(lf, rt, arg) >= 0) { + ar[i++] = lf; + head = lf; + pshift -= 1; +@@ -115,7 +116,7 @@ static void sift(unsigned char *head, size_t width, cmpfun cmp, int pshift, size + cycle(width, ar, i); + } + +-static void trinkle(unsigned char *head, size_t width, cmpfun cmp, size_t pp[2], int pshift, int trusty, size_t lp[]) ++static void trinkle(unsigned char *head, size_t width, cmpfun cmp, void *arg, size_t pp[2], int pshift, int trusty, size_t lp[]) + { + unsigned char *stepson, + *rt, *lf; +@@ -130,13 +131,13 @@ static void trinkle(unsigned char *head, size_t width, cmpfun cmp, size_t pp[2], + ar[0] = head; + while(p[0] != 1 || p[1] != 0) { + stepson = head - lp[pshift]; +- if((*cmp)(stepson, ar[0]) <= 0) { ++ if(cmp(stepson, ar[0], arg) <= 0) { + break; + } + if(!trusty && pshift > 1) { + rt = head - width; + lf = head - width - lp[pshift - 2]; +- if((*cmp)(rt, stepson) >= 0 || (*cmp)(lf, stepson) >= 0) { ++ if(cmp(rt, stepson, arg) >= 0 || cmp(lf, stepson, arg) >= 0) { + break; + } + } +@@ -150,11 +151,11 @@ static void trinkle(unsigned char *head, size_t width, cmpfun cmp, size_t pp[2], + } + if(!trusty) { + cycle(width, ar, i); +- sift(head, width, cmp, pshift, lp); ++ sift(head, width, cmp, arg, pshift, lp); + } + } + +-void qsort(void *base, size_t nel, size_t width, cmpfun cmp) ++void __qsort_r(void *base, size_t nel, size_t width, cmpfun cmp, void *arg) + { + size_t lp[12*sizeof(size_t)]; + size_t i, size = width * nel; +@@ -173,16 +174,16 @@ void qsort(void *base, size_t nel, size_t width, cmpfun cmp) + + while(head < high) { + if((p[0] & 3) == 3) { +- sift(head, width, cmp, pshift, lp); ++ sift(head, width, cmp, arg, pshift, lp); + shr(p, 2); + pshift += 2; + } else { + if(lp[pshift - 1] >= high - head) { +- trinkle(head, width, cmp, p, pshift, 0, lp); ++ trinkle(head, width, cmp, arg, p, pshift, 0, lp); + } else { +- sift(head, width, cmp, pshift, lp); ++ sift(head, width, cmp, arg, pshift, lp); + } +- ++ + if(pshift == 1) { + shl(p, 1); + pshift = 0; +@@ -191,12 +192,12 @@ void qsort(void *base, size_t nel, size_t width, cmpfun cmp) + pshift = 1; + } + } +- ++ + p[0] |= 1; + head += width; + } + +- trinkle(head, width, cmp, p, pshift, 0, lp); ++ trinkle(head, width, cmp, arg, p, pshift, 0, lp); + + while(pshift != 1 || p[0] != 1 || p[1] != 0) { + if(pshift <= 1) { +@@ -208,11 +209,13 @@ void qsort(void *base, size_t nel, size_t width, cmpfun cmp) + pshift -= 2; + p[0] ^= 7; + shr(p, 1); +- trinkle(head - lp[pshift] - width, width, cmp, p, pshift + 1, 1, lp); ++ trinkle(head - lp[pshift] - width, width, cmp, arg, p, pshift + 1, 1, lp); + shl(p, 1); + p[0] |= 1; +- trinkle(head - width, width, cmp, p, pshift, 1, lp); ++ trinkle(head - width, width, cmp, arg, p, pshift, 1, lp); + } + head -= width; + } + } ++ ++weak_alias(__qsort_r, qsort_r); +diff --git a/src/stdlib/qsort_nr.c b/src/stdlib/qsort_nr.c +new file mode 100644 +index 00000000..fe408fb1 +--- /dev/null ++++ b/src/stdlib/qsort_nr.c +@@ -0,0 +1,14 @@ ++#define _BSD_SOURCE ++#include ++ ++typedef int (*cmpfun)(const void *, const void *); ++ ++static int wrapper_cmp(const void *v1, const void *v2, void *cmp) ++{ ++ return ((cmpfun)cmp)(v1, v2); ++} ++ ++void qsort(void *base, size_t nel, size_t width, cmpfun cmp) ++{ ++ __qsort_r(base, nel, width, wrapper_cmp, cmp); ++} +-- +2.30.2 diff --git a/extra/musl/syscall-cp-epoll.patch b/extra/musl/syscall-cp-epoll.patch new file mode 100644 index 0000000..338620a --- /dev/null +++ b/extra/musl/syscall-cp-epoll.patch @@ -0,0 +1,16 @@ +diff --git a/src/linux/epoll.c b/src/linux/epoll.c +index deff5b10..93baa814 100644 +--- a/src/linux/epoll.c ++++ b/src/linux/epoll.c +@@ -24,9 +24,9 @@ int epoll_ctl(int fd, int op, int fd2, struct epoll_event *ev) + + int epoll_pwait(int fd, struct epoll_event *ev, int cnt, int to, const sigset_t *sigs) + { +- int r = __syscall(SYS_epoll_pwait, fd, ev, cnt, to, sigs, _NSIG/8); ++ int r = __syscall_cp(SYS_epoll_pwait, fd, ev, cnt, to, sigs, _NSIG/8); + #ifdef SYS_epoll_wait +- if (r==-ENOSYS && !sigs) r = __syscall(SYS_epoll_wait, fd, ev, cnt, to); ++ if (r==-ENOSYS && !sigs) r = __syscall_cp(SYS_epoll_wait, fd, ev, cnt, to); + #endif + return __syscall_ret(r); + } diff --git a/extra/pango/disable-broken-test.patch b/extra/pango/disable-broken-test.patch new file mode 100644 index 0000000..db3d6c3 --- /dev/null +++ b/extra/pango/disable-broken-test.patch @@ -0,0 +1,15 @@ +--- a/tests/meson.build ++++ b/tests/meson.build +@@ -58,12 +58,6 @@ + [ 'testmisc', [ 'testmisc.c' ], [ libpangocairo_dep, libpangoft2_dep, glib_dep, harfbuzz_dep ] ], + [ 'testserialize', [ 'testserialize.c' ], [ libpangocairo_dep, libpangoft2_dep ] ], + ] +- +- if host_system != 'darwin' +- tests += [ +- [ 'test-layout', [ 'test-layout.c', 'test-common.c' ], [ libpangocairo_dep, libpangoft2_dep ] ], +- ] +- endif + endif + + if host_system != 'darwin' diff --git a/extra/procps-ng/procps-3.3.17-musl-fix.patch b/extra/procps-ng/procps-3.3.17-musl-fix.patch new file mode 100644 index 0000000..4402354 --- /dev/null +++ b/extra/procps-ng/procps-3.3.17-musl-fix.patch @@ -0,0 +1,78 @@ +Temporary stopgap patch (a different solution was used upstream +in the next release, should be in the next after 3.3.17 -- we'll need to +add --disable-w instead). + +https://bugs.gentoo.org/794997 + +From 7bfe2b7c12b33aabca71491360c433d2d3f7bbf4 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Wed, 24 Feb 2021 21:14:31 +0000 +Subject: [PATCH 1/2] w.c: correct musl builds + +No need to redefine UT_ stuff to something that does not exist. + +UT_ is already provided in musl but via utmp.h header, so include +it always. + +Signed-off-by: Alexander Kanavin +--- + w.c | 9 +-------- + 1 file changed, 1 insertion(+), 8 deletions(-) + +diff --git a/w.c b/w.c +index 9d07ac9e..d10639b8 100644 +--- a/w.c ++++ b/w.c +@@ -57,9 +57,8 @@ + #include + #ifdef HAVE_UTMPX_H + # include +-#else +-# include + #endif ++#include + #include + + static int ignoreuser = 0; /* for '-u' */ +@@ -72,12 +71,6 @@ typedef struct utmpx utmp_t; + typedef struct utmp utmp_t; + #endif + +-#if !defined(UT_HOSTSIZE) || defined(__UT_HOSTSIZE) +-# define UT_HOSTSIZE __UT_HOSTSIZE +-# define UT_LINESIZE __UT_LINESIZE +-# define UT_NAMESIZE __UT_NAMESIZE +-#endif +- + #ifdef W_SHOWFROM + # define FROM_STRING "on" + #else +-- +GitLab + + +From 145165aba6c659f3f0f3567a323a3e6170408ea6 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Wed, 24 Feb 2021 21:16:14 +0000 +Subject: [PATCH 2/2] proc/escape.c: add missing include + +Signed-off-by: Alexander Kanavin +--- + proc/escape.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/proc/escape.c b/proc/escape.c +index 2e8fb7dd..e1f4612d 100644 +--- a/proc/escape.c ++++ b/proc/escape.c +@@ -21,6 +21,7 @@ + #include + #include + #include ++#include + #include "procps.h" + #include "escape.h" + #include "readproc.h" +-- +GitLab + diff --git a/extra/procps-ng/use_utmpx.patch b/extra/procps-ng/use_utmpx.patch new file mode 100644 index 0000000..ea9e9e2 --- /dev/null +++ b/extra/procps-ng/use_utmpx.patch @@ -0,0 +1,38 @@ +diff -uNr procps-3.3.17.orig/proc/whattime.c procps-3.3.17/proc/whattime.c +--- procps-3.3.17.orig/proc/whattime.c 2021-02-09 04:11:25.000000000 -0600 ++++ procps-3.3.17/proc/whattime.c 2021-03-19 13:40:17.910049032 -0500 +@@ -33,7 +33,7 @@ + #include + #include + #include +-#include ++#include + #include + #include "whattime.h" + #include "sysinfo.h" +@@ -42,7 +42,7 @@ + static double av[3]; + + char *sprint_uptime(int human_readable) { +- struct utmp *utmpstruct; ++ struct utmpx *utmpstruct; + int upminutes, uphours, updays, upweeks, upyears, updecades; + int pos; + int comma; +@@ -98,13 +98,13 @@ + /* count the number of users */ + + numuser = 0; +- setutent(); +- while ((utmpstruct = getutent())) { ++ setutxent(); ++ while ((utmpstruct = getutxent())) { + if ((utmpstruct->ut_type == USER_PROCESS) && + (utmpstruct->ut_name[0] != '\0')) + numuser++; + } +- endutent(); ++ endutxent(); + + pos += sprintf(buf + pos, "%2d user%s, ", numuser, numuser == 1 ? "" : "s"); + diff --git a/extra/rofi/rofi-sensible-terminal-use-sh.patch b/extra/rofi/rofi-sensible-terminal-use-sh.patch new file mode 100644 index 0000000..926aa7a --- /dev/null +++ b/extra/rofi/rofi-sensible-terminal-use-sh.patch @@ -0,0 +1,23 @@ +From 34d5779d41a902be21cef3fc3e70d8f6881ca05c Mon Sep 17 00:00:00 2001 +From: Jakub Jirutka +Date: Mon, 27 Sep 2021 01:00:43 +0200 +Subject: [PATCH] [rofi-sensible-terminal] Use /bin/sh instead of /usr/bin/env bash +Patch-Source: https://github.com/davatorium/rofi/pull/1478 + +This script is fully POSIX-sh compatible, i.e. it's portable and can be +run in any shell, not just bash. It's incorrect to assume that bash is +available on every *nix system (it's not), but /bin/sh is. +--- + script/rofi-sensible-terminal | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/script/rofi-sensible-terminal b/script/rofi-sensible-terminal +index 112e1d14e..e2b6cc4b9 100755 +--- a/script/rofi-sensible-terminal ++++ b/script/rofi-sensible-terminal +@@ -1,4 +1,4 @@ +-#!/usr/bin/env bash ++#!/bin/sh + # + # This code is released in public domain by Han Boetes + # Updated by Dave Davenport diff --git a/extra/rofi/scrollbar-test.patch b/extra/rofi/scrollbar-test.patch new file mode 100644 index 0000000..40f9dec --- /dev/null +++ b/extra/rofi/scrollbar-test.patch @@ -0,0 +1,31 @@ +Subject: the test fails on x86 + +diff --git a/meson.build b/meson.build +index 6e1105a..f707cd9 100644 +--- a/meson.build ++++ b/meson.build +@@ -345,24 +345,6 @@ test('box test', executable('box.test', [ + dependencies: deps, + )) + +-test('scrollbar test', executable('scrollbar.test', [ +- 'test/scrollbar-test.c', +- theme_parser, +- theme_lexer, +- default_theme, +- ], +- objects: rofi.extract_objects([ +- 'source/widgets/widget.c', +- 'source/widgets/scrollbar.c', +- 'source/theme.c', +- 'source/css-colors.c', +- 'source/rofi-types.c', +- 'source/css-colors.c', +- 'config/config.c', +- ]), +- dependencies: deps, +-)) +- + test('textbox test', executable('textbox.test', [ + 'test/textbox-test.c', + theme_parser, diff --git a/extra/snappy/cmakelists.patch b/extra/snappy/cmakelists.patch new file mode 100644 index 0000000..9c16853 --- /dev/null +++ b/extra/snappy/cmakelists.patch @@ -0,0 +1,96 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -86,6 +86,8 @@ + # it prominent in the GUI. + option(BUILD_SHARED_LIBS "Build shared libraries(DLLs)." OFF) + ++option(BUILD_STATIC_LIBS "Build static libraries." ON) ++ + option(SNAPPY_BUILD_TESTS "Build Snappy's own tests." ON) + + option(SNAPPY_BUILD_BENCHMARKS "Build Snappy's benchmarks" ON) +@@ -98,6 +100,10 @@ + + option(SNAPPY_INSTALL "Install Snappy's header and library" ON) + ++if(NOT BUILD_SHARED_LIBS AND BUILD_STATIC_LIBS) ++ set(BUILD_STATIC_LIBS OFF) ++endif () ++ + include(TestBigEndian) + test_big_endian(SNAPPY_IS_BIG_ENDIAN) + +@@ -213,19 +219,28 @@ + "snappy-stubs-public.h.in" + "${PROJECT_BINARY_DIR}/snappy-stubs-public.h") + ++# When BUILD_SHARED_LIBS is: ++# ON it will generate a SHARED library ++# OFF it will generate a STATIC library + add_library(snappy "") +-target_sources(snappy +- PRIVATE ++ ++# Used to generate both lib types ++if (BUILD_SHARED_LIBS AND BUILD_STATIC_LIBS) ++ add_library(snappy_static STATIC "") ++ set_target_properties(snappy_static PROPERTIES OUTPUT_NAME snappy) ++ install(TARGETS snappy_static DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++endif () ++ ++set(SNAPPY_SOURCE_PRIVATE + "snappy-internal.h" + "snappy-stubs-internal.h" + "snappy-c.cc" + "snappy-sinksource.cc" + "snappy-stubs-internal.cc" + "snappy.cc" +- "${PROJECT_BINARY_DIR}/config.h" ++ "${PROJECT_BINARY_DIR}/config.h") + +- # Only CMake 3.3+ supports PUBLIC sources in targets exported by "install". +- $<$:PUBLIC> ++set(SNAPPY_SOURCE_PUBLIC + $ + $ + $ +@@ -233,18 +248,32 @@ + $ + $ + $ +- $ +-) +-target_include_directories(snappy +- PUBLIC ++ $) ++ ++set(SNAPPY_INCLUDE_DIRS + $ + $ +- $ +-) ++ $) ++ ++# Only CMake 3.3+ supports PUBLIC sources in targets exported by "install". ++target_sources(snappy PRIVATE ${SNAPPY_SOURCE_PRIVATE} ++ $<$:PUBLIC> ${SNAPPY_SOURCE_PUBLIC}) ++ ++target_include_directories(snappy PUBLIC ${SNAPPY_INCLUDE_DIRS}) ++ ++target_compile_definitions(snappy PRIVATE -DHAVE_CONFIG_H) ++ ++# Only CMake 3.3+ supports PUBLIC sources in targets exported by "install". ++target_sources(snappy_static PRIVATE ${SNAPPY_SOURCE_PRIVATE} ++ $<$:PUBLIC> ${SNAPPY_SOURCE_PUBLIC}) ++ ++target_include_directories(snappy_static PUBLIC ${SNAPPY_INCLUDE_DIRS}) ++ ++target_compile_definitions(snappy_static PRIVATE -DHAVE_CONFIG_H) ++ + set_target_properties(snappy + PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR}) + +-target_compile_definitions(snappy PRIVATE -DHAVE_CONFIG_H) + if(BUILD_SHARED_LIBS) + set_target_properties(snappy PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON) + endif(BUILD_SHARED_LIBS) diff --git a/extra/snappy/fix-inline.patch b/extra/snappy/fix-inline.patch new file mode 100644 index 0000000..96484e0 --- /dev/null +++ b/extra/snappy/fix-inline.patch @@ -0,0 +1,13 @@ +Patch-Source: https://github.com/google/snappy/pull/128 + +--- a/snappy.cc ++++ b/snappy.cc +@@ -1014,7 +1014,7 @@ + } + + SNAPPY_ATTRIBUTE_ALWAYS_INLINE +-size_t AdvanceToNextTag(const uint8_t** ip_p, size_t* tag) { ++inline size_t AdvanceToNextTag(const uint8_t** ip_p, size_t* tag) { + const uint8_t*& ip = *ip_p; + // This section is crucial for the throughput of the decompression loop. + // The latency of an iteration is fundamentally constrained by the diff --git a/extra/snappy/rtti.patch b/extra/snappy/rtti.patch new file mode 100644 index 0000000..77b8178 --- /dev/null +++ b/extra/snappy/rtti.patch @@ -0,0 +1 @@ +Too Many Requests \ No newline at end of file diff --git a/extra/tiff/CVE-2018-12900.patch b/extra/tiff/CVE-2018-12900.patch new file mode 100644 index 0000000..f95cd06 --- /dev/null +++ b/extra/tiff/CVE-2018-12900.patch @@ -0,0 +1,29 @@ +From 86861b86f26be5301ccfa96f9bf765051f4e644a Mon Sep 17 00:00:00 2001 +From: pgajdos +Date: Tue, 13 Nov 2018 09:03:31 +0100 +Subject: [PATCH] prevent integer overflow + +--- + tools/tiffcp.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/tools/tiffcp.c b/tools/tiffcp.c +index 2f406e2d..ece7ba13 100644 +--- a/tools/tiffcp.c ++++ b/tools/tiffcp.c +@@ -1435,6 +1435,12 @@ DECLAREreadFunc(readSeparateTilesIntoBuffer) + status = 0; + goto done; + } ++ if (0xFFFFFFFF / tilew < spp) ++ { ++ TIFFError(TIFFFileName(in), "Error, either TileWidth (%u) or BitsPerSample (%u) is too large", tilew, bps); ++ status = 0; ++ goto done; ++ } + bytes_per_sample = bps/8; + + for (row = 0; row < imagelength; row += tl) { +-- +2.18.1 + diff --git a/extra/xdg-utils/xdg-screensaver-mv-T.patch b/extra/xdg-utils/xdg-screensaver-mv-T.patch new file mode 100644 index 0000000..9e209f7 --- /dev/null +++ b/extra/xdg-utils/xdg-screensaver-mv-T.patch @@ -0,0 +1,25 @@ +--- ./scripts/xdg-screensaver.in.orig ++++ ./scripts/xdg-screensaver.in +@@ -26,18 +26,10 @@ + + #@xdg-utils-common@ + +-# Check if we can use "mv -T" +-if mv -T ... ... 2>&1 | grep '\.\.\.' > /dev/null ; then +- # We can securely move files in /tmp with mv -T +- DEBUG 1 "mv -T available" +- MV="mv -T" +- screensaver_file="/tmp/xdg-screensaver-$USER-"`echo $DISPLAY | sed 's/:/-/g'` +-else +- # No secure moves available, use home dir +- DEBUG 1 "mv -T not available" +- MV="mv" +- screensaver_file="$HOME/.xdg-screensaver-"`echo $(hostname)-$DISPLAY | sed 's/:/-/g'` +-fi ++# No secure moves available, use home dir ++DEBUG 1 "mv -T not available" ++MV="mv" ++screensaver_file="$HOME/.xdg-screensaver-"`echo $(hostname)-$DISPLAY | sed 's/:/-/g'` + lockfile_command=`which lockfile 2> /dev/null` + + lockfile() diff --git a/repo/apps/ncmpcpp.xibuild b/repo/apps/ncmpcpp.xibuild new file mode 100644 index 0000000..a27264e --- /dev/null +++ b/repo/apps/ncmpcpp.xibuild @@ -0,0 +1,26 @@ +#!/bin/sh + +NAME="ncmpcpp" +DESC="Ncurses based MPD client inspired by ncmpc" + +MAKEDEPS="make " +DEPS="boost icu curl libmpdclient musl ncurses readline" + +PKG_VER=0.9.2 +SOURCE="http://rybczak.net/ncmpcpp/stable/ncmpcpp-$PKG_VER.tar.bz2" + +build () { + ./configure \ + BOOST_LIB_SUFFIX=-mt \ + --prefix=/usr \ + --bindir=/usr/bin \ + --sysconfdir=/etc \ + --disable-static \ + --enable-clock \ + --enable-visualizer + make +} + +package () { + make DESTDIR=$PKG_DEST install +} diff --git a/repo/devel/boost.xibuild b/repo/devel/boost.xibuild new file mode 100644 index 0000000..b97cab7 --- /dev/null +++ b/repo/devel/boost.xibuild @@ -0,0 +1,23 @@ +#!/bin/sh + +NAME="boost" +DESC="Free peer-reviewed portable C++ source libraries" + +MAKEDEPS="make python which zlib icu" +DEPS="musl gcc bzip2 zlib mpi python icu" + +PKG_VER=1.79.0 +SOURCE="https://boostorg.jfrog.io/artifactory/main/release/$PKG_VER/source/boost_$(echo $PKG_VER | sed "s/\./_/g").tar.bz2" +ADDITIONAL="python-3.10.patch 0001-revert-cease-dependence-on-range.patch boost-1.57.0-python-libpython_dep.patch boost-1.57.0-python-abi_letters.patch " + +prepare () { + ./bootstrap.sh --prefix=/usr --with-python=python3 +} + +build () { + ./b2 --debug-building --no-cmake-config --toolset=gcc runtime-link=shared link=shared,static +} + +package () { + ./b2 install --prefix=$PKG_DEST/usr +} diff --git a/repo/devel/uthash.xibuild b/repo/devel/uthash.xibuild new file mode 100644 index 0000000..e9dd494 --- /dev/null +++ b/repo/devel/uthash.xibuild @@ -0,0 +1,15 @@ +#!/bin/sh + +NAME="uthash" +DESC="C macros for hash tables and more" + +MAKEDEPS="make " +DEPS="rxvt-unicode" + +PKG_VER=2.3.0 +SOURCE="https://github.com/troydhanson/uthash/archive/v$PKG_VER.tar.gz" + +package () { + mkdir -p $PKG_DEST/usr/include + install -m 0644 src/*.h $PKG_DEST/usr/include/ +} diff --git a/repo/font/font-opensans.xibuild b/repo/font/font-opensans.xibuild new file mode 100644 index 0000000..009c172 --- /dev/null +++ b/repo/font/font-opensans.xibuild @@ -0,0 +1,15 @@ +#!/bin/sh + +NAME="font-opensans" +DESC="Humanist Sans Serif Typeface" + +MAKEDEPS="sbase" +DEPS="fontconfig mkfontscale " + +SOURCE="https://github.com/googlefonts/opensans.git" + +package() { + install -D -m644 fonts/ttf/*.ttf -t $PKG_DEST/usr/share/fonts/TTF/ +} + + diff --git a/repo/linux/broadcom-wl.xibuild b/repo/linux/broadcom-wl.xibuild deleted file mode 100644 index 948c9bd..0000000 --- a/repo/linux/broadcom-wl.xibuild +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh - -MAKEDEPS="linux-src linux-headers" -DEPS="linux" - -PKG_VER=6.30.223.271 -SOURCE=https://docs.broadcom.com/docs-and-downloads/docs/linux_sta/hybrid-v35_64-nodebug-pcoem-$(echo $PKG_VER | sed "s,\.,_,g").tar.gz - -DESC="Broadcom's IEEE 802.11a/b/g/n hybrid Linux device driver" -ADDITIONAL=" - 001-null-pointer-fix.patch - 002-rdtscl.patch - 003-linux47.patch - 004-linux48.patch - 005-debian-fix-kernel-warnings.patch - 006-linux411.patch - 007-linux412.patch - 008-linux415.patch - 009-fix_mac_profile_discrepancy.patch - 010-linux56.patch - 011-linux59.patch - 012-linux517.patch -" - -prepare () { - apply_patches - sed -i -e '/BRCM_WLAN_IFNAME/s/eth/wlan/' src/wl/sys/wl_linux.c - sed -i -e "/EXTRA_LDFLAGS/s|\$(src)/lib|/usr/lib/broadcom-wl|" Makefile - sed -i '/GE_49 :=/s|:= .*|:= 1|' Makefile -} - -build () { - KVER=$(cat /usr/src/linux/version) - #KBASE=/lib/modules/$KVER - make -C /usr/src/linux timeconst-file - make -C /usr/src/linux M=$PWD -} - - -package () { - ls - read wait -} diff --git a/repo/media/libjpeg-turbo.xibuild b/repo/media/libjpeg-turbo.xibuild new file mode 100644 index 0000000..5840097 --- /dev/null +++ b/repo/media/libjpeg-turbo.xibuild @@ -0,0 +1,25 @@ +#!/bin/sh + +NAME="libjpeg-turbo" +DESC="Accelerated baseline JPEG compression and decompression library" + +MAKEDEPS="" +DEPS="musl " + +PKG_VER=2.1.3 +SOURCE="https://downloads.sourceforge.net/libjpeg-turbo/libjpeg-turbo-$PKG_VER.tar.gz" + +build () { + cmake -B build -G Ninja \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=/usr/lib \ + -DBUILD_SHARED_LIBS=True \ + -DWITH_JPEG8=1 \ + -DBUILD_STATIC_LIBS=OFF + cmake --build build +} + +package () { + DESTDIR="$PKG_DEST" cmake --install build +} + diff --git a/repo/media/libmpdclient.xibuild b/repo/media/libmpdclient.xibuild new file mode 100644 index 0000000..a80ad57 --- /dev/null +++ b/repo/media/libmpdclient.xibuild @@ -0,0 +1,20 @@ +#!/bin/sh + +NAME="libmpdclient" +DESC="An asynchronous API library for interfacing MPD in the C, C++ & Objective C languages" + +MAKEDEPS="meson ninja " +DEPS="musl" + +PKG_VER=2.19 +SOURCE="https://www.musicpd.org/download/libmpdclient/${PKG_VER%.*}/libmpdclient-$PKG_VER.tar.xz" + +build () { + cd build && + meson --prefix=/usr .. && + ninja +} + +package () { + DESTDIR=$PKG_DEST ninja install +} diff --git a/repo/media/libwebp.xibuild b/repo/media/libwebp.xibuild new file mode 100644 index 0000000..ff84576 --- /dev/null +++ b/repo/media/libwebp.xibuild @@ -0,0 +1,33 @@ +#!/bin/sh + +NAME="libwebp" +DESC="Libraries for working with WebP images" + +MAKEDEPS="make " +DEPS="musl " + +PKG_VER=1.2.2 +SOURCE="https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-$PKG_VER.tar.gz" + +prepare() { + ./autogen.sh +} + +build () { + ./configure \ + --prefix=/usr + --bindir=/usr/bin \ + --sysconfdir=/etc \ + --disable-static \ + --enable-libwebpmux \ + --enable-libwebpdemux \ + --enable-libwebpdecoder \ + --disable-tiff + make +} + +package () { + make DESTDIR=$PKG_DEST install + mkdir -p $PKG_DEST/usr/share/doc/libwebp + install -Dm644 PATENTS README $PKG_DEST/usr/share/doc/libwebp +} diff --git a/repo/media/mpd.xibuild b/repo/media/mpd.xibuild new file mode 100644 index 0000000..9229a01 --- /dev/null +++ b/repo/media/mpd.xibuild @@ -0,0 +1,47 @@ +#!/bin/sh + +NAME="mpd" +DESC="Music daemon that plays MP3, FLAC, Ogg Vorbis files and Audio CDs" + +MAKEDEPS="meson ninja boost" +DEPS="alsa-lib sbase expat faad2 flac fmt icu lame libao bzip2 libid3tag libmad libogg pulseaudio libsamplerate libmpdclient libvorbis musl opus pipewire soxr wavpack zlib" + +PKG_VER=0.23.6 +SOURCE="https://www.musicpd.org/download/mpd/${PKG_VER%.*}/mpd-$PKG_VER.tar.xz" +ADDITIONAL="libcdio-paa-version.patch libcdio-paranoia-version.patch mpd.confd mpd.initd" + +prepare () { + apply_patches +} + +build () { + cd build + meson --prefix=/usr \ + -Dopus=enabled \ + -Ddocumentation=enabled \ + -Dlibmpdclient=enabled \ + -Dwavpack=enabled \ + -Dpipewire=enabled \ + .. && + + ninja +} + +package () { + DESTDIR=$PKG_DEST ninja install + cd .. + install -d $PKG_DEST/etc + sed -e 's:\#user.*:user\t\t"mpd":' \ + -e 's:\#log_file.*:log_file\t\t"syslog":' \ + doc/mpdconf.example > $PKG_DEST/etc/mpd.conf + install -m755 -D mpd.initd \ + "$PKG_DEST"/etc/init.d/mpd + install -m644 -D mpd.confd \ + "$PKG_DEST"/etc/conf.d/mpd + install -d -m775 \ + "$PKG_DEST"/var/run/mpd \ + "$PKG_DEST"/var/log/mpd \ + "$PKG_DEST"/var/lib/mpd \ + "$PKG_DEST"/var/lib/mpd/playlists \ + "$PKG_DEST"/var/lib/mpd/music +} diff --git a/repo/media/pulsemixer.xibuild b/repo/media/pulsemixer.xibuild new file mode 100644 index 0000000..79e7a74 --- /dev/null +++ b/repo/media/pulsemixer.xibuild @@ -0,0 +1,19 @@ +#!/bin/sh + +NAME="pulsemixer" +DESC="CLI and curses mixer for PulseAudio" + +MAKEDEPS="" +DEPS="pulseaudio +python" + +PKG_VER=1.5.1 +SOURCE="https://github.com/GeorgeFilipkin/pulsemixer/archive/$PKG_VER.tar.gz" + +build () { + python3 setup.py build +} + +package () { + python3 setup.py install --prefix=/usr --root=$PKG_DEST +} diff --git a/repo/media/tiff.xibuild b/repo/media/tiff.xibuild new file mode 100644 index 0000000..544116b --- /dev/null +++ b/repo/media/tiff.xibuild @@ -0,0 +1,32 @@ +#!/bin/sh + +NAME="tiff" +DESC="Provides support for the Tag Image File Format or TIFF" + +MAKEDEPS="" +DEPS="musl xz zlib zstd " + +PKG_VER=4.3.0 +SOURCE="https://gitlab.com/libtiff/libtiff/-/archive/v$PKG_VER/libtiff-v$PKG_VER.tar.gz" +ADDITIONAL="CVE-2018-12900.patch " + +prepare () { + apply_patches + autoreconf -fi +} + +build () { + ./configure \ + --prefix=/usr + --bindir=/usr/bin \ + --sysconfdir=/etc \ + --disable-static \ + --enable-cxx + + make +} + +package () { + make DESTDIR=$PKG_DEST install +} + diff --git a/repo/media/wavpack.xibuild b/repo/media/wavpack.xibuild new file mode 100644 index 0000000..eb9ccfc --- /dev/null +++ b/repo/media/wavpack.xibuild @@ -0,0 +1,25 @@ +#!/bin/sh + +NAME="wavpack" +DESC="Audio compression format with lossless, lossy, and hybrid compression modes" + +MAKEDEPS="make " +DEPS="musl" + +PKG_VER=5.4.0 +SOURCE="http://www.wavpack.com/wavpack-$PKG_VER.tar.xz" + +build () { + ./configure \ + --prefix=/usr + --bindir=/usr/bin \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --disable-static + make +} + +package () { + make DESTDIR=$PKG_DEST install +} diff --git a/repo/skip/broadcom-wl.xibuild b/repo/skip/broadcom-wl.xibuild new file mode 100644 index 0000000..948c9bd --- /dev/null +++ b/repo/skip/broadcom-wl.xibuild @@ -0,0 +1,43 @@ +#!/bin/sh + +MAKEDEPS="linux-src linux-headers" +DEPS="linux" + +PKG_VER=6.30.223.271 +SOURCE=https://docs.broadcom.com/docs-and-downloads/docs/linux_sta/hybrid-v35_64-nodebug-pcoem-$(echo $PKG_VER | sed "s,\.,_,g").tar.gz + +DESC="Broadcom's IEEE 802.11a/b/g/n hybrid Linux device driver" +ADDITIONAL=" + 001-null-pointer-fix.patch + 002-rdtscl.patch + 003-linux47.patch + 004-linux48.patch + 005-debian-fix-kernel-warnings.patch + 006-linux411.patch + 007-linux412.patch + 008-linux415.patch + 009-fix_mac_profile_discrepancy.patch + 010-linux56.patch + 011-linux59.patch + 012-linux517.patch +" + +prepare () { + apply_patches + sed -i -e '/BRCM_WLAN_IFNAME/s/eth/wlan/' src/wl/sys/wl_linux.c + sed -i -e "/EXTRA_LDFLAGS/s|\$(src)/lib|/usr/lib/broadcom-wl|" Makefile + sed -i '/GE_49 :=/s|:= .*|:= 1|' Makefile +} + +build () { + KVER=$(cat /usr/src/linux/version) + #KBASE=/lib/modules/$KVER + make -C /usr/src/linux timeconst-file + make -C /usr/src/linux M=$PWD +} + + +package () { + ls + read wait +} diff --git a/repo/system/at-spi2-atk.xibuild b/repo/system/at-spi2-atk.xibuild new file mode 100644 index 0000000..9cdecd9 --- /dev/null +++ b/repo/system/at-spi2-atk.xibuild @@ -0,0 +1,22 @@ +#!/bin/sh + +NAME="at-spi2-atk" +DESC="A GTK+ module that bridges ATK to D-Bus at-spi" + +MAKEDEPS="meson ninja " +DEPS="at-spi2-core atk dbus glib " + +PKG_VER=2.38.0 +SOURCE="https://download.gnome.org/sources/at-spi2-atk/${PKG_VER%.*}/at-spi2-atk-$PKG_VER.tar.xz" + +build () { + mkdir build && + cd build && + meson --prefix=/usr \ + .. && + ninja +} + +package () { + DESTDIR=$PKG_DEST ninja install +} diff --git a/repo/system/at-spi2-core.xibuild b/repo/system/at-spi2-core.xibuild new file mode 100644 index 0000000..58e56a2 --- /dev/null +++ b/repo/system/at-spi2-core.xibuild @@ -0,0 +1,27 @@ +#!/bin/sh + +NAME="at-spi2-core" +DESC="Protocol definitions and daemon for D-Bus at-spi" + +MAKEDEPS="meson ninja " +DEPS="dbus glib intltool libx11 libxi libxtst musl " + +PKG_VER=2.44.0 +SOURCE="https://download.gnome.org/sources/at-spi2-core/${PKG_VER%.*}/at-spi2-core-$PKG_VER.tar.xz" + +build () { + mkdir build && + cd build && + meson --prefix=/usr \ + -Dx11=yes \ + -Dintrospection=yes \ + -Ddocs=true \ + -Ddbus_daemon=/usr/bin/dbus-daemon \ + .. && + ninja +} + +package () { + DESTDIR=$PKG_DEST ninja install + rm -rf $PKG_DEST/usr/lib/systemd +} diff --git a/repo/system/atk.xibuild b/repo/system/atk.xibuild new file mode 100644 index 0000000..4fd470a --- /dev/null +++ b/repo/system/atk.xibuild @@ -0,0 +1,22 @@ +#!/bin/sh + +NAME="atk" +DESC="A library providing a set of interfaces for accessibility" + +MAKEDEPS="meson ninja " +DEPS="glib intltool musl " + +PKG_VER=2.38.0 +SOURCE="https://download.gnome.org/sources/atk/${PKG_VER%.*}/atk-$PKG_VER.tar.xz" + +build () { + mkdir build && + cd build && + meson --prefix=/usr \ + .. && + ninja +} + +package () { + DESTDIR=$PKG_DEST ninja install +} diff --git a/repo/system/binutils.xibuild b/repo/system/binutils.xibuild index e65314f..3d67d07 100644 --- a/repo/system/binutils.xibuild +++ b/repo/system/binutils.xibuild @@ -6,20 +6,16 @@ DEPS="musl zlib libelf" PKG_VER=2.37 SOURCE=https://ftp.gnu.org/gnu/binutils/binutils-$PKG_VER.tar.xz -PATCH_SOURCE="https://raw.githubusercontent.com/dslm4515/Musl-LFS/master/patches/binutils-alpine" ADDITIONAL=" - $PATCH_SOURCE/0001-Revert-PR25882-.gnu.attributes-are-not-checked-for-s.patch - $PATCH_SOURCE/bfd-close-file-desriptor-if-there-is-no-archive-fd.patch - $PATCH_SOURCE/binutils-ld-fix-static-linking.patch - $PATCH_SOURCE/defang-no-split.patch - " +0001-Revert-PR25882-.gnu.attributes-are-not-checked-for-s.patch +bfd-close-file-desriptor-if-there-is-no-archive-fd.patch +binutils-ld-fix-static-linking.patch +" DESC="Tools for handling object files" prepare () { - for p in *.patch; do - patch -Np1 -i $p || true - done + apply_patches find . -name '[a-z]*\.[0-9]*' -empty -exec rm -f {} \; } @@ -27,18 +23,13 @@ prepare () { build () { mkdir build cd build - case $(uname -m) in - x86_64) export EXTRA_CONFIG=" --enable-targets=x86_64-pep " - ;; - i686) export EXTRA_CONFIG=" --disable-separate-code --enable-targets=x86_64-linux-gnu,x86_64-pep" - ;; - esac ../configure \ --prefix=/usr \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --disable-multilib \ + --enable-shared \ --enable-ld=default \ --enable-gold \ --enable-64-bit-bfd \ @@ -51,8 +42,7 @@ build () { --with-pic \ --disable-werror \ --disable-nls \ - --with-mmap \ - --with-system-zlib + --with-mmap make tooldir=/usr } diff --git a/repo/system/dbus.xibuild b/repo/system/dbus.xibuild index ecda47d..3bbfc31 100644 --- a/repo/system/dbus.xibuild +++ b/repo/system/dbus.xibuild @@ -34,6 +34,7 @@ build () { package () { make DESTDIR=$PKG_DEST install + mv usr/lib/lib*.so.* $PKG_DEST/usr/lib/ chown root:messagebus $PKG_DEST/usr/libexec/dbus-daemon-launch-helper && chmod 4750 $PKG_DEST/usr/libexec/dbus-daemon-launch-helper diff --git a/repo/system/lcms2.xibuild b/repo/system/lcms2.xibuild new file mode 100644 index 0000000..3f9cdd3 --- /dev/null +++ b/repo/system/lcms2.xibuild @@ -0,0 +1,27 @@ +#!/bin/sh + +NAME="lcms2" +DESC="Color Management Engine" + +MAKEDEPS="make libjpeg-turbo tiff zlib" +DEPS="musl " + +PKG_VER=2.13.1 +SOURCE="https://github.com/mm2/Little-CMS/releases/download/lcms$PKG_VER/lcms2-$PKG_VER.tar.gz" + +build () { + ./configure \ + --prefix=/usr + --bindir=/usr/bin \ + --sysconfdir=/etc \ + --disable-static \ + --with-jpeg \ + --with-tiff \ + --with-zlib \ + --with-threads + make +} + +package () { + make DESTDIR=$PKG_DEST install +} diff --git a/repo/system/libevent.xibuild b/repo/system/libevent.xibuild new file mode 100644 index 0000000..84e2dd4 --- /dev/null +++ b/repo/system/libevent.xibuild @@ -0,0 +1,28 @@ +#!/bin/sh + +NAME="libevent" +DESC="An event notification library" + +MAKEDEPS="make " +DEPS="openssl musl " + +PKG_VER=2.1.12 +SOURCE="https://github.com/libevent/libevent/releases/download/release-$PKG_VER-stable/libevent-$PKG_VER-stable.tar.gz" + +prepare() { + sed -i '1s|^#!/usr/bin/env python$|#!/usr/bin/python3|' event_rpcgen.py + sed -i -e "s/@VERSION@/$PKG_VER/" *.pc.in +} + +build () { + ./configure \ + --prefix=/usr + --bindir=/usr/bin \ + --sysconfdir=/etc \ + --disable-static + make +} + +package () { + make -j1 DESTDIR=$PKG_DEST install +} diff --git a/repo/system/mpfr.xibuild b/repo/system/mpfr.xibuild index 1e62aac..a0fc726 100644 --- a/repo/system/mpfr.xibuild +++ b/repo/system/mpfr.xibuild @@ -4,7 +4,7 @@ MAKEDEPS="make " DEPS="musl gmp" PKG_VER=4.1.0 -SOURCE=https://www.mpfr.org/mpfr-current/mpfr-$PKG_VER.tar.xz +SOURCE=https://ftp.gnu.org/gnu/mpfr/mpfr-$PKG_VER.tar.bz2 DESC="Multiple-precision floating-point library" diff --git a/repo/system/musl.xibuild b/repo/system/musl.xibuild index 13879f0..6f15382 100644 --- a/repo/system/musl.xibuild +++ b/repo/system/musl.xibuild @@ -3,15 +3,16 @@ MAKEDEPS="" DEPS="" -PKG_VER=1.2.2 +PKG_VER=1.2.3 SOURCE=https://musl.libc.org/releases/musl-$PKG_VER.tar.gz ADDITIONAL=" - https://raw.githubusercontent.com/dslm4515/Musl-LFS/master/patches/musl-mlfs/fix-utmp-wtmp-paths.patch - https://raw.githubusercontent.com/dslm4515/Musl-LFS/master/patches/musl-mlfs/change-scheduler-functions-Linux-compatib.patch - https://raw.githubusercontent.com/dslm4515/Musl-LFS/master/patches/musl-alpine/0001-riscv64-define-ELF_NFPREG.patch - https://raw.githubusercontent.com/dslm4515/Musl-LFS/master/patches/musl-alpine/handle-aux-at_base.patch - https://raw.githubusercontent.com/dslm4515/Musl-LFS/master/patches/musl-alpine/syscall-cp-epoll.patch +0001-riscv64-define-ELF_NFPREG.patch +change-scheduler-functions-Linux-compatib.patch +fix-utmp-wtmp-paths.patch +handle-aux-at_base.patch +qsort_r.patch +syscall-cp-epoll.patch " DESC="Implementation of the C standard library built on top of the Linux system call API" diff --git a/repo/system/ncurses.xibuild b/repo/system/ncurses.xibuild index f34211b..784ec63 100644 --- a/repo/system/ncurses.xibuild +++ b/repo/system/ncurses.xibuild @@ -14,8 +14,9 @@ build () { --with-shared \ --without-debug \ --without-normal \ + --enable-pc-files \ --enable-widec \ - + --with-pkg-config-libdir=/usr/lib/pkgconfig make } diff --git a/repo/system/perl.xibuild b/repo/system/perl.xibuild index 494b9f1..f12b9cf 100644 --- a/repo/system/perl.xibuild +++ b/repo/system/perl.xibuild @@ -3,7 +3,7 @@ MAKEDEPS="make sed" DEPS="gdbm musl bzip2 zlib tar" -PKG_VER=5.34.0 +PKG_VER=5.34.1 SOURCE=https://www.cpan.org/src/5.0/perl-$PKG_VER.tar.gz DESC="The Practical Extraction and Report Language" ADDITIONAL=" diff --git a/repo/system/re2.xibuild b/repo/system/re2.xibuild new file mode 100644 index 0000000..c4ef938 --- /dev/null +++ b/repo/system/re2.xibuild @@ -0,0 +1,18 @@ +#!/bin/sh + +NAME="re2" +DESC="Efficient, principled regular expression library" + +MAKEDEPS="make " +DEPS="musl " + +PKG_VER=2022.04.01 +SOURCE="https://github.com/google/re2/archive/$(echo $PKG_VER | sed "s/\./-/g").tar.gz" + +build () { + make PREFIX=/usr +} + +package () { + make PREFIX=/usr DESTDIR=$PKGDEST install +} diff --git a/repo/system/shared-mime-info.xibuild b/repo/system/shared-mime-info.xibuild new file mode 100644 index 0000000..e5d804d --- /dev/null +++ b/repo/system/shared-mime-info.xibuild @@ -0,0 +1,32 @@ +#!/bin/sh + +NAME="shared-mime-info" +DESC="Freedesktop.org Shared MIME Info" + +MAKEDEPS="meson ninja itstool libxml2-utils xmlto libxml2 glib" +DEPS="sbase glib libxml2 musl pkg-config " + +PKG_VER=2.2 +SOURCE="https://gitlab.freedesktop.org/xdg/shared-mime-info/-/archive/$PKG_VER/shared-mime-info-$PKG_VER.tar.gz" +ADDITIONAL=" +https://raw.githubusercontent.com/archlinux/svntogit-packages/packages/shared-mime-info/trunk/MR_162.patch +" + +prepare () { + patch -Rp1 -i MR_162.patch +} + +build () { + mkdir build && + cd build && + meson --prefix=/usr \ + -Dupdate-mimedb=false \ + .. && + sed -i "s/xmlto /xmlto --skip-validation /g" build.ninja + ninja +} + +package () { + DESTDIR=$PKG_DEST ninja install +} + diff --git a/repo/system/snappy.xibuild b/repo/system/snappy.xibuild new file mode 100644 index 0000000..1d180bc --- /dev/null +++ b/repo/system/snappy.xibuild @@ -0,0 +1,30 @@ +#!/bin/sh + +NAME="snappy" +DESC="Fast compression and decompression library" + +MAKEDEPS="cmake" +DEPS="musl " + +PKG_VER=1.1.9 +SOURCE="https://github.com/google/snappy/archive/$PKG_VER.tar.gz" +ADDITIONAL="rtti.patch fix-inline.patch cmakelists.patch " + +prepare () { + apply_patches +} + +build () { + cmake -B build -G Ninja \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=/usr/lib \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_STATIC_LIBS=OFF \ + -DSNAPPY_BUILD_BENCHMARKS=OFF + + cmake --build build +} + +package () { + DESTDIR="$PKG_DEST" cmake --install build +} diff --git a/repo/system/startup-notification.xibuild b/repo/system/startup-notification.xibuild new file mode 100644 index 0000000..08d7a85 --- /dev/null +++ b/repo/system/startup-notification.xibuild @@ -0,0 +1,23 @@ +#!/bin/sh + +NAME="startup-notification" +DESC="Monitor and display application startup" + +MAKEDEPS="make " +DEPS="libx11 libxcb musl xcb-util " + +PKG_VER=0.12 +SOURCE="https://www.freedesktop.org/software/startup-notification/releases/startup-notification-$PKG_VER.tar.gz" + +build () { + ./configure \ + --prefix=/usr + --bindir=/usr/bin \ + --sysconfdir=/etc \ + --disable-static + make +} + +package () { + make DESTDIR=$PKG_DEST install +} diff --git a/repo/system/ubase.xibuild b/repo/system/ubase.xibuild index 30a7de3..0fd1258 100644 --- a/repo/system/ubase.xibuild +++ b/repo/system/ubase.xibuild @@ -1,6 +1,6 @@ #!/bin/sh -MAKEDEPS="make " +MAKEDEPS="make findutils sed" DEPS="musl" SOURCE=https://git.suckless.org/ubase diff --git a/repo/util/procps-ng.xibuild b/repo/util/procps-ng.xibuild index 27d35da..234892e 100644 --- a/repo/util/procps-ng.xibuild +++ b/repo/util/procps-ng.xibuild @@ -3,16 +3,16 @@ MAKEDEPS="make utmps" DEPS="ncurses" -PKG_VER=3.3.17 +PKG_VER=4.0.0 SOURCE=https://sourceforge.net/projects/procps-ng/files/Production/procps-ng-$PKG_VER.tar.xz DESC="Utilities for monitoring your system and its processes" ADDITIONAL=" - https://raw.githubusercontent.com/dslm4515/Musl-LFS/master/patches/procps-mlfs/use_utmpx.patch + use_utmpx.patch " prepare () { - patch -Np1 -i use_utmpx.patch + apply_patches sed -i '1i#include ' proc/escape.c } @@ -21,6 +21,7 @@ build () { ./configure --prefix=/usr \ --docdir=/usr/share/doc/procps-ng-$PKG_VER \ --disable-static \ + --disable-w \ --disable-kill make } diff --git a/repo/x11/dmenu.xibuild b/repo/x11/dmenu.xibuild new file mode 100644 index 0000000..0356f4e --- /dev/null +++ b/repo/x11/dmenu.xibuild @@ -0,0 +1,27 @@ +#!/bin/sh + +NAME="dmenu" +DESC="Dynamic menu for X" + +MAKEDEPS="make" +DEPS="fontconfig libx11 libxft libxinerama musl" + +PKG_VER=5.1 +SOURCE="https://dl.suckless.org/tools/dmenu-$PKG_VER.tar.gz" + +prepare () { + sed -i -e '/CFLAGS/{s/-Os//;s/=/+=/}' \ + -e '/LDFLAGS/{s/=/+=/}' \ + config.mk +} + +build () { + make PREFIX=/usr \ + X11INC=/usr/include/X11 \ + X11LIB=/usr/lib/X11 \ + FREETYPEINC=/usr/include/freetype2 +} + +package () { + make PREFIX=/usr DESTDIR=$PKG_DEST install +} diff --git a/repo/x11/gdk-pixbuf.xibuild b/repo/x11/gdk-pixbuf.xibuild new file mode 100644 index 0000000..66d5a0f --- /dev/null +++ b/repo/x11/gdk-pixbuf.xibuild @@ -0,0 +1,24 @@ +#!/bin/sh + +NAME="gdk-pixbuf" +DESC="GTK+ image loading library" + +MAKEDEPS="meson ninja " +DEPS="sbase glib shared-mime-info intltool libpng libjpeg-turbo tiff musl" + +PKG_VER=2.42.8 +SOURCE="https://download.gnome.org/sources/gdk-pixbuf/${PKG_VER%.*}/gdk-pixbuf-$PKG_VER.tar.xz" + +build () { + mkdir build && + cd build && + meson --prefix=/usr \ + -Dinstalled_tests=false \ + -Dpng=disabled \ + .. && + ninja +} + +package () { + DESTDIR=$PKG_DEST ninja install +} diff --git a/repo/x11/graphite.xibuild b/repo/x11/graphite.xibuild new file mode 100644 index 0000000..5583086 --- /dev/null +++ b/repo/x11/graphite.xibuild @@ -0,0 +1,26 @@ +#!/bin/sh + +NAME="graphite" +DESC="reimplementation of the SIL Graphite text processing engine" + +MAKEDEPS="cmake freetype2" +DEPS="musl " + +PKG_VER=1.3.14 +SOURCE="https://github.com/silnrsi/graphite/archive/$PKG_VER.tar.gz" +ADDITIONAL="cmake.patch " + +build () { + cmake -B build -G Ninja \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=/usr/lib \ + -DBUILD_SHARED_LIBS=True \ + -DCMAKE_BUILD_TYPE=MinSizeRel \ + -DGRAPHITE2_COMPARE_RENDERER=OFF \ + -DGRAPHITE2_NFILEFACE=ON + cmake --build build +} + +package () { + DESTDIR="$PKG_DEST" cmake --install build +} diff --git a/repo/x11/harfbuzz.xibuild b/repo/x11/harfbuzz.xibuild new file mode 100644 index 0000000..7164985 --- /dev/null +++ b/repo/x11/harfbuzz.xibuild @@ -0,0 +1,29 @@ +#!/bin/sh + +NAME="harfbuzz" +DESC="Text shaping library" + +MAKEDEPS="meson ninja " +DEPS="freetype2 glib graphite musl " + +PKG_VER=4.2.0 +SOURCE="https://github.com/harfbuzz/harfbuzz/archive/$PKG_VER.tar.gz" + +build () { + mkdir build && + cd build && + meson --prefix=/usr \ + -Dglib=enabled \ + -Dgobject=enabled \ + -Dgraphite=enabled \ + -Dicu=enabled \ + -Dfreetype=enabled \ + -Dcairo=enabled \ + -Ddocs=enabled \ + .. && + ninja +} + +package () { + DESTDIR=$PKG_DEST ninja install +} diff --git a/repo/x11/libxkbcommon.xibuild b/repo/x11/libxkbcommon.xibuild new file mode 100644 index 0000000..2675370 --- /dev/null +++ b/repo/x11/libxkbcommon.xibuild @@ -0,0 +1,28 @@ +#!/bin/sh + +NAME="libxkbcommon" +DESC="keyboard handling library" + +MAKEDEPS="meson ninja " +DEPS="libxml2 +musl +xkeyboardconfig" + +PKG_VER=1.4.0 +SOURCE="https://github.com/xkbcommon/libxkbcommon/archive/xkbcommon-$PKG_VER.tar.gz" + +build () { + mkdir build && + cd build && + meson --prefix=/usr \ + -Denable-wayland=true \ + -Denable-docs=false \ + -Denable-x11=true \ + -Ddefault_library=both \ + .. && + ninja +} + +package () { + DESTDIR=$PKG_DEST ninja install +} diff --git a/repo/x11/pango.xibuild b/repo/x11/pango.xibuild new file mode 100644 index 0000000..2515487 --- /dev/null +++ b/repo/x11/pango.xibuild @@ -0,0 +1,26 @@ +#!/bin/sh + +NAME="pango" +DESC="library for layout and rendering of text" + +MAKEDEPS="meson ninja" +DEPS="sbase cairo fontconfig freetype2 glib libx11 libxft libxrender musl" + +PKG_VER=1.50.5 +SOURCE="https://download.gnome.org/sources/pango/${PKG_VER%.*}/pango-$PKG_VER.tar.xz" +ADDITIONAL="disable-broken-test.patch " + +prepare () { + apply_patches +} + +build () { + mkdir build && + cd build && + meson --prefix=/usr .. && + ninja +} + +package () { + DESTDIR=$PKG_DEST ninja install +} diff --git a/repo/x11/picom.xibuild b/repo/x11/picom.xibuild index f8d8cf6..2c3eb28 100644 --- a/repo/x11/picom.xibuild +++ b/repo/x11/picom.xibuild @@ -1,9 +1,6 @@ #!/bin/sh -MAKEDEPS="libx11 libxcomposite libxinerama libxdamage - libconfig pcre libxrandr dbus libdrm mesa meson - libev libxdg-basedir pixman xcb-util-renderutil - xcb-util-image asciidoc uthash" +MAKEDEPS="libx11 libxcomposite libxinerama libxdamage libconfig pcre libxrandr dbus libdrm mesa meson libev libxdg-basedir pixman xcb-util-renderutil xcb-util-image asciidoc uthash" DEPS="dbus libconfig libev libx11 libxcb mesa-gl musl pcre pixman xcb-util-image xcb-util-renderutil" PKG_VER=9.1 @@ -19,9 +16,9 @@ build () { } package () { - DESTDIR=$PKG_DEST ninmake ja install + DESTDIR=$PKG_DEST ninja install mkdir -p "$PKG_DEST/usr/share/doc/picom" + cd .. install -m644 README* "$PKG_DEST/usr/share/doc/picom/" install -D -m644 "picom.sample.conf" "$PKG_DEST/etc/xdg/picom.conf.example" - } diff --git a/repo/x11/rofi.xibuild b/repo/x11/rofi.xibuild new file mode 100644 index 0000000..e377909 --- /dev/null +++ b/repo/x11/rofi.xibuild @@ -0,0 +1,40 @@ +#!/bin/sh + +NAME="rofi" +DESC="Window switcher, application launcher and dmenu replacement" + +MAKEDEPS="meson ninja " +DEPS="gdk-pixbuf cairo glib libxcb libxkbcommon libxkbfile musl xcb-util xcb-util-cursor xcb-util-wm pango startup-notification" + +PKG_VER=1.7.3 +SOURCE="https://github.com/davatorium/rofi/releases/download/$PKG_VER/rofi-$PKG_VER.tar.gz" + +libnkutils=d08fa898d71da4c11653284968ec14384dd70b6a +libgwater=555fa6df92434c1c3c7548b5a583b1d8ec3fabb3 +ADDITIONAL=" +scrollbar-test.patch +rofi-sensible-terminal-use-sh.patch +https://github.com/sardemff7/libgwater/archive/$libgwater.tar.gz +https://github.com/sardemff7/libnkutils/archive/$libnkutils.tar.gz +" + +prepare () { + apply_patches + tar xf $libgwater.tar.gz + tar xf $libnkutils.tar.gz + rm -rf subprojects/libnkutils subprojects/libgwater + mv libnkutils-$libnkutils subprojects/libnkutils + mv libgwater-$libgwater subprojects/libgwater +} + +build () { + mkdir build && + cd build && + meson --prefix=/usr .. && + ninja +} + +package () { + DESTDIR=$PKG_DEST ninja install + rm -rf $PKG_DEST/usr/share/rofi/themes/iggy.jpg +} diff --git a/repo/x11/xdg-utils.xibuild b/repo/x11/xdg-utils.xibuild new file mode 100644 index 0000000..d3fb5ee --- /dev/null +++ b/repo/x11/xdg-utils.xibuild @@ -0,0 +1,24 @@ +#!/bin/sh + +NAME="xdg-utils" +DESC="Basic desktop integration functions" + +MAKEDEPS="make " +DEPS="file xprop xset " + +PKG_VER=1.1.3 +SOURCE="https://portland.freedesktop.org/download/xdg-utils-$PKG_VER.tar.gz" +ADDITIONAL="xdg-screensaver-mv-T.patch " + +build () { + ./configure \ + --prefix=/usr + --bindir=/usr/bin \ + --sysconfdir=/etc \ + --disable-static + make +} + +package () { + make DESTDIR=$PKG_DEST install +} diff --git a/templates/cmake.xibuild b/templates/cmake.xibuild new file mode 100644 index 0000000..1591035 --- /dev/null +++ b/templates/cmake.xibuild @@ -0,0 +1,12 @@ +build () { + cmake -B build -G Ninja \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=/usr/lib \ + -DBUILD_SHARED_LIBS=True \ + -DBUILD_STATIC_LIBS=OFF + cmake --build build +} + +package () { + DESTDIR="$PKG_DEST" cmake --install build +} diff --git a/templates/meson.xibuild b/templates/meson.xibuild index 67ab5af..6680a35 100644 --- a/templates/meson.xibuild +++ b/templates/meson.xibuild @@ -1,7 +1,8 @@ build () { mkdir build && cd build && - meson --prefix=/usr .. && + meson --prefix=/usr \ + .. && ninja } diff --git a/templates/python.xibuild b/templates/python.xibuild new file mode 100644 index 0000000..ad6b2a9 --- /dev/null +++ b/templates/python.xibuild @@ -0,0 +1,7 @@ +build () { + python3 setup.py build +} + +package () { + python3 setup.py install --prefix=/usr --root=$PKG_DEST +} diff --git a/wishlist.md b/wishlist.md index e113f77..b028013 100644 --- a/wishlist.md +++ b/wishlist.md @@ -2,19 +2,19 @@ [x] bspwm [x] sxhkd -[ ] picom -[ ] mpd -[ ] ncmpcpp -[ ] pulsemixer +[?] picom +[?] mpd +[?] ncmpcpp +[?] pulsemixer [ ] pavucontrol [ ] chromium [ ] firefox [ ] ffmpeg -[ ] dmenu -[ ] rofi +[?] dmenu +[?] rofi [ ] mpv [ ] sxiv -[ ] feh +[?] feh [ ] gimp [ ] lmms [ ] ardour @@ -29,7 +29,7 @@ [ ] ImageMagick [x] nmap [ ] exiftool -[ ] mpc +[?] mpc [ ] nvidia drivers [x] working xorg -- cgit v1.2.1