diff options
129 files changed, 4498 insertions, 129 deletions
diff --git a/repo/adoptopenjdk11/adoptopenjdk11.xibuild b/repo/adoptopenjdk11/adoptopenjdk11.xibuild new file mode 100644 index 0000000..769ec57 --- /dev/null +++ b/repo/adoptopenjdk11/adoptopenjdk11.xibuild @@ -0,0 +1,19 @@ +#!/bin/sh + +NAME="adoptopenjdk11" +DESC="AdoptOpenJDK Java 11 binaries" + +MAKEDEPS="make " +DEPS="less " + +PKG_VER=11.0.15 +RELEASE=10 +SOURCE="https://github.com/adoptium/temurin11-binaries/releases/download/jdk-$PKG_VER%2B10/OpenJDK${PKG_VER%%.*}U-jdk_x64_alpine-linux_hotspot_${PKG_VER}_${RELEASE}.tar.gz" + +package () { + out=$PKG_DEST/usr/lib/jvm/adoptopenjdk${PKG_VER%%.*} + mkdir -p $out + for f in NOTICE bin conf include jmods legal lib man release; do + mv $f $out/ + done +} diff --git a/repo/adoptopenjdk16/adoptopenjdk16.xibuild b/repo/adoptopenjdk16/adoptopenjdk16.xibuild new file mode 100644 index 0000000..fa22105 --- /dev/null +++ b/repo/adoptopenjdk16/adoptopenjdk16.xibuild @@ -0,0 +1,18 @@ +#!/bin/sh + +NAME="adoptopenjdk16" +DESC="AdoptOpenJDK Java 16 binaries" + +MAKEDEPS="make " + +PKG_VER=16.0.2 +RELEASE=10 +SOURCE="https://github.com/adoptium/temurin11-binaries/releases/download/jdk-$PKG_VER%2B10/OpenJDK${PKG_VER%%.*}U-jdk_x64_alpine-linux_hotspot_${PKG_VER}_${RELEASE}.tar.gz" + +package () { + out=$PKG_DEST/usr/lib/jvm/adoptopenjdk${PKG_VER%%.*} + mkdir -p $out + for f in NOTICE bin conf include jmods legal lib man release; do + mv $f $out/ + done +} diff --git a/repo/adoptopenjdk17/adoptopenjdk17.xibuild b/repo/adoptopenjdk17/adoptopenjdk17.xibuild new file mode 100644 index 0000000..3c4133b --- /dev/null +++ b/repo/adoptopenjdk17/adoptopenjdk17.xibuild @@ -0,0 +1,18 @@ +#!/bin/sh + +NAME="adoptopenjdk17" +DESC="AdoptOpenJDK Java 17 binaries" + +MAKEDEPS="make " + +PKG_VER=17.0.3 +RELEASE=7 +SOURCE="https://github.com/adoptium/temurin11-binaries/releases/download/jdk-$PKG_VER%2B10/OpenJDK${PKG_VER%%.*}U-jdk_x64_alpine-linux_hotspot_${PKG_VER}_${RELEASE}.tar.gz" + +package () { + out=$PKG_DEST/usr/lib/jvm/adoptopenjdk${PKG_VER%%.*} + mkdir -p $out + for f in NOTICE bin conf include jmods legal lib man release; do + mv $f $out/ + done +} diff --git a/repo/adoptopenjdk18/adoptopenjdk18.xibuild b/repo/adoptopenjdk18/adoptopenjdk18.xibuild new file mode 100644 index 0000000..b997515 --- /dev/null +++ b/repo/adoptopenjdk18/adoptopenjdk18.xibuild @@ -0,0 +1,19 @@ +#!/bin/sh + +NAME="adoptopenjdk18" +DESC="AdoptOpenJDK Java 18 binaries" + +MAKEDEPS="make " +DEPS="less " + +PKG_VER=18.0.1 +RELEASE=10 +SOURCE="https://github.com/adoptium/temurin11-binaries/releases/download/jdk-$PKG_VER%2B10/OpenJDK${PKG_VER%%.*}U-jdk_x64_alpine-linux_hotspot_${PKG_VER}_${RELEASE}.tar.gz" + +package () { + out=$PKG_DEST/usr/lib/jvm/adoptopenjdk${PKG_VER%%.*} + mkdir -p $out + for f in NOTICE bin conf include jmods legal lib man release; do + mv $f $out/ + done +} diff --git a/repo/all/all.xibuild b/repo/all/all.xibuild deleted file mode 100644 index b8449c1..0000000 --- a/repo/all/all.xibuild +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -# This file was automatically generated, do not edit! - -DESC="AlL tHe pacKageS!!" -DEPS=" arandr cava feh firefox gimp links lynx mpv ncmpcpp neovim pcmanfm polybar rxvt-unicode sxiv vim xclock-cat xlinks xterm asciidoc autoconf autoconf-archive autoconf2-13 automake bc bison boost cabal cbindgen check cmake cmake-extra cmake-modules dejagnu distcc docbook-dtd docbook-xml docbook-xsl docbook4-xml doxygen expect flex gcc gdb git go gtk-doc help2man icecream imake itstool libexecinfo llvm m4 make meson mpc nasm ninja patch pkg-config rust scdoc sgml-common strace swig texinfo uthash vala waf xmlto xorg-cf-files encodings font-adobe-utopia-type1 font-alias font-bh-ttf font-bh-type1 font-ibm-type1 font-misc-ethiopic font-noto font-opensans font-util font-xfree86-type1 fontconfig extremetuxracer b43-fwcutter linux linux-headers alsa-firmware alsa-lib alsa-plugins alsa-tools alsa-utils aom audiofile babl dav1d exiv2 faac faad2 fdk-aac ffmpeg ffmpeg4 flac gegl gexiv2 giflib lame libass libcanberra libid3tag libjpeg-turbo libmad libmpdclient libmypaint libogg libraw librist librsvg libsamplerate libsndfile libsrt libtheora libvorbis libvpx libwebp mpc-mpd mpd mypaint-brushes openal-soft openjpeg opus pipewire poppler poppler-data pulseaudio pulsemixer sfml soxr tiff v4l-utils vidstab wavpack x264 x265 xvidcore python python-Jinja2 python-alabaster python-appdirs python-babel python-certifi python-chardet python-docutils python-gobject python-html5lib python-idna python-imagesize python-jinja python-lxml python-mach python-mako python-markupsafe python-packaging python-pip python-pygments python-pyparsing python-pytz python-requests python-six python-snowballstemmer python-sphinx python-sphinx-alabaster-theme python-sphinxcontrib-applehelp python-sphinxcontrib-devhelp python-sphinxcontrib-htmlhelp python-sphinxcontrib-jsmath python-sphinxcontrib-qthelp python-sphinxcontrib-serializinghtml python-urllib3 python-webencodings acl acpid argp-standalone at-spi2-atk at-spi2-core atk atkmm attr binutils brotli bzip2 c-ares cacerts cairo cups dbus dbus-glib dhcp efibootmgr efivar elfutils elogind eudev execline expat fftw findutils freetype2 fribidi gc gdbm gettext glew glib glib-networking glibmm glm glu gmp gnutls gobject-introspection gperf grub guile gzip hwids i2pd iana-etc icu imlib2 iniparser intltool jansson js78 json-c json-glib jsoncpp kbd kmod krb5 lcms2 ldns libaio libarchive libcap libcap-ng libconfig libdwarf libedit libelf libev libevent libexif libffi libfm libfm-extra libgcrypt libgpg-error libgudev libidn libldap liblinear libluv libmbim libmpack libndp libnghttp libnl libnsl libp11-kit libpcap libpipeline libpng libproxy libpsl libptytty libqmi libqrtr libretls libsasl libseccomp libsigc++ libsigsegv libssh2 libtasn1 libtermkey libtirpc libtool libucontext libunistring libusb libuv libvterm libxcrypt libxml2 libxslt ljx lua lua-lpeg lua-mpack lua5-1 luajit lz4 lzo menu-cache mime-types mobile-broadband-provider-info modemmanager mpfr msgpack-c mtdev musl musl-fts musl-legacy-compat musl-obstack ncurses nettle networkmanager newt nodejs nspr nss nsss openntpd openrc openssl pahole pam pcre pcre2 pcsc-lite perl perl-xml-parser polkit popt psmisc queue-standalone re2 readline rtmpdump ruby sbase sed sh shadow shared-mime-info skalibs slang snappy sqlite3 startup-notification sysklogd syslinux tar tcl tomlc99 tor tree-sitter tzdata ubase udev-rules unibilium utmps xxhash xz zip zlib zstd acpi base64 bash cpio curl dash diffutils dosfstools dracut e2fsprogs file flite fmt fzf gawk genfstab graphviz grep groff htop iftop ifupdown-ng inetutils iproute2 iw iwd keyutils less lm-sensors man-db mandoc mksh mpdscribble neofetch net-tools nmap openssh pandoc pciutils pdfgrep pm-utils procps-ng rhash rsync sort stty sudo tmux unzip usbutils util-linux webfs wget which wireless-tools wpa_supplicant adwaita-icon-theme berry bspwm cairomm dmenu gdk-pixbuf graphite gsettings-desktop-schemas gtk2 gtk3 gtkmm3 harfbuzz hicolor-icon-theme iceauth intel-vaapi-driver libdmx libdrm libepoxy libevdev libfontenc libfs libice libinput libpciaccess libsm libva libvdpau libvdpau-va-gl libwacom libx11 libxau libxaw libxcb libxcomposite libxcursor libxcvt libxdamage libxdmcp libxext libxfixes libxfont2 libxft libxi libxinerama libxkbcommon libxkbfile libxmu libxpm libxrandr libxrender libxres libxscrnsaver libxshmfence libxt libxtst libxv libxvmc libxxf86dga libxxf86vm luit maim mesa mkfontscale motif pango pangomm picom pixman qt5-qtbase rofi sdl2 sessreg setxkbmap slock slop smproxy spice-protocol sxhkd wayland wayland-protocols x11perf xauth xautolock xbacklight xbitmaps xcb-proto xcb-util xcb-util-cursor xcb-util-image xcb-util-keysyms xcb-util-renderutil xcb-util-wm xclip xclock xcmsdb xcursor-themes xcursorgen xdg-utils xdpyinfo xdriinfo xev xeyes xf86-input-evdev xf86-input-libinput xf86-input-synaptics xf86-input-wacom xf86-video-amdgpu xf86-video-ati xf86-video-fbdev xf86-video-intel xf86-video-nouveau xf86-video-qxl xf86-video-vmware xgamma xhost xinput xkbcomp xkbevd xkbutils xkeyboardconfig xkill xlsatoms xlsclients xmessage xmodmap xorg-libs xorg-server xorg-util-macros xorg-xinit xorgproto xpr xprop xrandr xrdb xrefresh xsel xset xsetroot xss-lock xtrans xvinfo xwd xwininfo xwud sysconfigs xib xibuild xipkg xiutils" diff --git a/repo/asciidoctor/asciidoctor.xibuild b/repo/asciidoctor/asciidoctor.xibuild index bd4f59f..b31fa0e 100644 --- a/repo/asciidoctor/asciidoctor.xibuild +++ b/repo/asciidoctor/asciidoctor.xibuild @@ -4,6 +4,7 @@ NAME="asciidoctor" DESC="Converter for AsciiDoc to HTML5, DocBook 5 (or 4.5) and other formats" MAKEDEPS="ruby" +DEPS="ruby" PKG_VER=2.0.17 SOURCE="https://rubygems.org/downloads/asciidoctor-$PKG_VER.gem" diff --git a/repo/bash-completion/bash-completion.xibuild b/repo/bash-completion/bash-completion.xibuild new file mode 100644 index 0000000..0b4b0d7 --- /dev/null +++ b/repo/bash-completion/bash-completion.xibuild @@ -0,0 +1,43 @@ +#!/bin/sh + +NAME="bash-completion" +DESC="Command-line tab-completion for bash" + +MAKEDEPS="autoconf automake bc grep procps-ng psmisc sed usbutils" + +PKG_VER=2.11 +SOURCE="https://github.com/scop/bash-completion/releases/download/$PKG_VER/bash-completion-$PKG_VER.tar.xz" + +prepare() { + default_prepare + + # ifup/down tests are still failing + rm $BUILD_ROOT/test/t/test_ifdown.py + rm $BUILD_ROOT/test/t/test_ifup.py + sed -i '/test_ifdown.py \\/d' $BUILD_ROOT/test/t/Makefile.am + sed -i '/test_ifup.py \\/d' $BUILD_ROOT/test/t/Makefile.am + autoreconf -fiv +} + +build() { + ./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --localstatedir=/var + make +} + +package() { + make -j1 DESTDIR="$PKG_DEST" install + + mkdir -p "$PKG_DEST"/usr/share/doc/bash-completion/ + install -m644 AUTHORS CHANGES CONTRIBUTING.md README.md \ + "$PKG_DEST"/usr/share/doc/bash-completion/ + + cd "$PKG_DEST"/usr/share/bash-completion/completions + for c in $_conflicting; do + rm -f $c + done +} + diff --git a/repo/berry/berry.xibuild b/repo/berry/berry.xibuild index 5b4fe5e..e5d50ca 100644 --- a/repo/berry/berry.xibuild +++ b/repo/berry/berry.xibuild @@ -1,22 +1,22 @@ #!/bin/sh NAME="berry" -DESC="A healthy, byte-sized window manager" +DESC="a healthy, byte-sized window manager" -MAKEDEPS="make " -DEPS="libx11 libxft libxinerama " +MAKEDEPS="libx11 libxft libxinerama" -PKG_VER=0.1.11 -SOURCE="https://github.com/JLErvin/berry/archive/refs/tags/$PKG_VER.tar.gz" +PKG_VER=0.1.9 +SOURCE="https://github.com/JLErvin/berry/archive/$PKG_VER.tar.gz" -build () { - make prefix=/usr -} +ADDITIONAL=" +fix_prefix.patch +" -package () { - make prefix=/usr DESTDIR=$PKG_DEST install - - install -Dm644 examples/sxhkdrc $PKG_DEST/usr/share/doc/berry/examples/ - install -Dm644 examples/autostart $PKG_DEST/usr/share/doc/berry/examples/ +build() { + make +} +package() { + make DESTDIR=$PKG_DEST install } + diff --git a/repo/berry/fix_prefix.patch b/repo/berry/fix_prefix.patch new file mode 100644 index 0000000..63324f5 --- /dev/null +++ b/repo/berry/fix_prefix.patch @@ -0,0 +1,14 @@ +Description: Not able to modify PREFIX with condigure +Upstream: No + +--- a/configure ++++ b/configure +@@ -130,7 +130,7 @@ done + + #### Set directory prefixes ########################################## + +-sub "s/@prefix@/${ac_var_prefix:=\/usr\/local}/g ++sub "s/@prefix@/${ac_var_prefix:=\/usr}/g + s/@bindir@/${ac_var_bindir:=\$\{prefix\}\/bin}/g + s/@datadir@/${ac_var_datadir:=\$\{prefix\}\/share}/g + s/@mandir@/${ac_var_mandir:=\$\{datadir\}\/man}/g diff --git a/repo/bluez/001-bcm43xx-Add-bcm43xx-3wire-variant.patch b/repo/bluez/001-bcm43xx-Add-bcm43xx-3wire-variant.patch new file mode 100644 index 0000000..96e8a26 --- /dev/null +++ b/repo/bluez/001-bcm43xx-Add-bcm43xx-3wire-variant.patch @@ -0,0 +1,21 @@ +From b4f2b77472aeb967d3a7595e8a965785c7a37c87 Mon Sep 17 00:00:00 2001 +From: Phil Elwell <phil@raspberrypi.org> +Date: Tue, 16 Feb 2016 16:40:46 +0000 +Subject: [PATCH 1/4] bcm43xx: Add bcm43xx-3wire variant + +--- + tools/hciattach.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/tools/hciattach.c ++++ b/tools/hciattach.c +@@ -1144,6 +1144,9 @@ struct uart_t uart[] = { + { "bcm43xx", 0x0000, 0x0000, HCI_UART_H4, 115200, 3000000, + FLOW_CTL, DISABLE_PM, NULL, bcm43xx, NULL }, + ++ { "bcm43xx-3wire", 0x0000, 0x0000, HCI_UART_3WIRE, 115200, 3000000, ++ 0, DISABLE_PM, NULL, bcm43xx, NULL }, ++ + { "ath3k", 0x0000, 0x0000, HCI_UART_ATH3K, 115200, 115200, + FLOW_CTL, DISABLE_PM, NULL, ath3k_ps, ath3k_pm }, + diff --git a/repo/bluez/002-bcm43xx-The-UART-speed-must-be-reset-after-the-firmw.patch b/repo/bluez/002-bcm43xx-The-UART-speed-must-be-reset-after-the-firmw.patch new file mode 100644 index 0000000..a221861 --- /dev/null +++ b/repo/bluez/002-bcm43xx-The-UART-speed-must-be-reset-after-the-firmw.patch @@ -0,0 +1,33 @@ +From e145c9621f976063e5c573db1f2053d906f63427 Mon Sep 17 00:00:00 2001 +From: Phil Elwell <phil@raspberrypi.org> +Date: Tue, 16 Feb 2016 16:39:09 +0000 +Subject: [PATCH 2/4] bcm43xx: The UART speed must be reset after the firmware + download + +--- + tools/hciattach_bcm43xx.c | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +--- a/tools/hciattach_bcm43xx.c ++++ b/tools/hciattach_bcm43xx.c +@@ -366,11 +366,8 @@ int bcm43xx_init(int fd, int def_speed, + return -1; + + if (bcm43xx_locate_patch(FIRMWARE_DIR, chip_name, fw_path)) { +- fprintf(stderr, "Patch not found, continue anyway\n"); ++ fprintf(stderr, "Patch not found for %s, continue anyway\n", chip_name); + } else { +- if (bcm43xx_set_speed(fd, ti, speed)) +- return -1; +- + if (bcm43xx_load_firmware(fd, fw_path)) + return -1; + +@@ -380,6 +377,7 @@ int bcm43xx_init(int fd, int def_speed, + return -1; + } + ++ sleep(1); + if (bcm43xx_reset(fd)) + return -1; + } diff --git a/repo/bluez/003-Increase-firmware-load-timeout-to-30s.patch b/repo/bluez/003-Increase-firmware-load-timeout-to-30s.patch new file mode 100644 index 0000000..fa0948d --- /dev/null +++ b/repo/bluez/003-Increase-firmware-load-timeout-to-30s.patch @@ -0,0 +1,20 @@ +From d41dc2046dd08d8c95197f677e224506f5b39bdd Mon Sep 17 00:00:00 2001 +From: Phil Elwell <phil@raspberrypi.org> +Date: Wed, 20 Jan 2016 16:00:37 +0000 +Subject: [PATCH 3/4] Increase firmware load timeout to 30s + +--- + tools/hciattach.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/tools/hciattach.c ++++ b/tools/hciattach.c +@@ -1293,7 +1293,7 @@ int main(int argc, char *argv[]) + { + struct uart_t *u = NULL; + int detach, printpid, raw, opt, i, n, ld, err; +- int to = 10; ++ int to = 30; + int init_speed = 0; + int send_break = 0; + pid_t pid; diff --git a/repo/bluez/004-Move-the-43xx-firmware-into-lib-firmware.patch b/repo/bluez/004-Move-the-43xx-firmware-into-lib-firmware.patch new file mode 100644 index 0000000..80b052d --- /dev/null +++ b/repo/bluez/004-Move-the-43xx-firmware-into-lib-firmware.patch @@ -0,0 +1,20 @@ +From 76681284b0ea49852041fdb97a35175089a08781 Mon Sep 17 00:00:00 2001 +From: Phil Elwell <phil@raspberrypi.org> +Date: Tue, 23 Feb 2016 17:52:29 +0000 +Subject: [PATCH 4/4] Move the 43xx firmware into /lib/firmware + +--- + tools/hciattach_bcm43xx.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/tools/hciattach_bcm43xx.c ++++ b/tools/hciattach_bcm43xx.c +@@ -43,7 +43,7 @@ + #include "hciattach.h" + + #ifndef FIRMWARE_DIR +-#define FIRMWARE_DIR "/etc/firmware" ++#define FIRMWARE_DIR "/lib/firmware/brcm" + #endif + + #define FW_EXT ".hcd" diff --git a/repo/bluez/005-hostname-Use-phone-class-for-handhelds.patch b/repo/bluez/005-hostname-Use-phone-class-for-handhelds.patch new file mode 100644 index 0000000..c5ad4bf --- /dev/null +++ b/repo/bluez/005-hostname-Use-phone-class-for-handhelds.patch @@ -0,0 +1,51 @@ +From 7960816020bbd94b1c2f0ff75f73b25927717875 Mon Sep 17 00:00:00 2001 +From: Dylan Van Assche <me@dylanvanassche.be> +Date: Fri, 11 Jun 2021 20:18:44 +0200 +Subject: [PATCH] hostname: Use phone class for handhelds + +Advertise devices with chassis type 'handheld' +as phone instead of computer. +--- + plugins/hostname.c | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +diff --git a/plugins/hostname.c b/plugins/hostname.c +index 1a9513adb..85c342d36 100644 +--- a/plugins/hostname.c ++++ b/plugins/hostname.c +@@ -31,6 +31,7 @@ + + #define MAJOR_CLASS_MISCELLANEOUS 0x00 + #define MAJOR_CLASS_COMPUTER 0x01 ++#define MAJOR_CLASS_PHONE 0x02 + + #define MINOR_CLASS_UNCATEGORIZED 0x00 + #define MINOR_CLASS_DESKTOP 0x01 +@@ -40,6 +41,7 @@ + #define MINOR_CLASS_PALM_SIZED 0x05 + #define MINOR_CLASS_WEARABLE 0x06 + #define MINOR_CLASS_TABLET 0x07 ++#define MINOR_CLASS_SMARTPHONE 0x03 + + static uint8_t major_class = MAJOR_CLASS_MISCELLANEOUS; + static uint8_t minor_class = MINOR_CLASS_UNCATEGORIZED; +@@ -106,11 +108,11 @@ static const struct { + uint8_t major_class; + uint8_t minor_class; + } chassis_table[] = { +- { "desktop", MAJOR_CLASS_COMPUTER, MINOR_CLASS_DESKTOP }, +- { "server", MAJOR_CLASS_COMPUTER, MINOR_CLASS_SERVER }, +- { "laptop", MAJOR_CLASS_COMPUTER, MINOR_CLASS_LAPTOP }, +- { "handset", MAJOR_CLASS_COMPUTER, MINOR_CLASS_HANDHELD }, +- { "tablet", MAJOR_CLASS_COMPUTER, MINOR_CLASS_TABLET }, ++ { "desktop", MAJOR_CLASS_COMPUTER, MINOR_CLASS_DESKTOP }, ++ { "server", MAJOR_CLASS_COMPUTER, MINOR_CLASS_SERVER }, ++ { "laptop", MAJOR_CLASS_COMPUTER, MINOR_CLASS_LAPTOP }, ++ { "handset", MAJOR_CLASS_PHONE, MINOR_CLASS_SMARTPHONE }, ++ { "tablet", MAJOR_CLASS_COMPUTER, MINOR_CLASS_TABLET }, + { } + }; + +-- +2.31.1 + diff --git a/repo/bluez/bluetooth.initd b/repo/bluez/bluetooth.initd new file mode 100644 index 0000000..3e5ec98 --- /dev/null +++ b/repo/bluez/bluetooth.initd @@ -0,0 +1,13 @@ +#!/sbin/openrc-run + +name="Bluetooth" +command="/usr/lib/bluetooth/bluetoothd" +pidfile="/var/run/bluetoothd.pid" +start_stop_daemon_args="--background --make-pidfile" + + +depend() { + after coldplug udev-postmount + need dbus localmount hostname +} + diff --git a/repo/bluez/bluez.xibuild b/repo/bluez/bluez.xibuild new file mode 100644 index 0000000..bf7dce9 --- /dev/null +++ b/repo/bluez/bluez.xibuild @@ -0,0 +1,72 @@ +#!/bin/sh + +NAME="bluez" +DESC="Tools for the Bluetooth protocol stack" + +MAKEDEPS="dbus libusb eudev json-c libical readline glib linux-headers autoconf automake libtool python-docutils" + +PKG_VER=5.64 +SOURCE="https://www.kernel.org/pub/linux/bluetooth/bluez-$PKG_VER.tar.xz" + +ADDITIONAL=" +001-bcm43xx-Add-bcm43xx-3wire-variant.patch +002-bcm43xx-The-UART-speed-must-be-reset-after-the-firmw.patch +003-Increase-firmware-load-timeout-to-30s.patch +004-Move-the-43xx-firmware-into-lib-firmware.patch +005-hostname-Use-phone-class-for-handhelds.patch +bluetooth.initd +disable-lock-test.patch +fix-endianness.patch +fix-musl.patch +mpris-proxy.desktop +musl.patch +org.bluez.obex.service +rfcomm.confd +rfcomm.initd +test-mesh-crypto.patch +" + +prepare() { + apply_patches + autoreconf -vif +} + +build() { + ./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --localstatedir=/var \ + --libexecdir=/usr/lib \ + --disable-systemd \ + --enable-library \ + --enable-deprecated \ + --enable-hid2hci \ + --enable-mesh \ + --enable-sixaxis \ + --with-dbusconfdir=/usr/share + make +} + +check() { + make check +} + +package() { + make install DESTDIR="$PKG_DEST" + install -D -m644 src/main.conf "$PKG_DEST"/etc/bluetooth/main.conf + + install -Dm755 "$BUILD_ROOT"/bluetooth.initd "$PKG_DEST"/etc/init.d/bluetooth + install -Dm755 "$BUILD_ROOT"/rfcomm.initd "$PKG_DEST"/etc/init.d/rfcomm + install -Dm644 "$BUILD_ROOT"/rfcomm.confd "$PKG_DEST"/etc/conf.d/rfcomm + + # Fix shebang for the installed binary + sed 's|^#!/usr/bin/python$|#!/usr/bin/env python3|g' -i test/simple-agent + install -Dm755 test/simple-agent "$PKG_DEST"/usr/bin/bluez-simple-agent + + # Autostart mpris-proxy to pass through MPRIS control over BlueZ + install -Dm644 "$BUILD_ROOT"/mpris-proxy.desktop -t "$PKG_DEST"/etc/xdg/autostart/ + + # Bluez tool for the Bluetooth Management API + install -Dm755 "$BUILD_ROOT"/tools/btmgmt "$PKG_DEST"/usr/bin/btmgmt +} diff --git a/repo/bluez/disable-lock-test.patch b/repo/bluez/disable-lock-test.patch new file mode 100644 index 0000000..3d849a8 --- /dev/null +++ b/repo/bluez/disable-lock-test.patch @@ -0,0 +1,18 @@ +This test locks up. + +--- bluez-5.47/unit/test-gatt.c.old 2017-07-14 04:12:22.000000000 -0500 ++++ bluez-5.47/unit/test-gatt.c 2017-09-28 03:03:00.678738581 -0500 +@@ -4459,11 +4459,11 @@ + raw_pdu(0x18, 0x01), + raw_pdu(0x01, 0x18, 0x25, 0x00, 0x06)); + +- define_test_server("/robustness/unkown-request", ++ /*define_test_server("/robustness/unkown-request", + test_server, service_db_1, NULL, + raw_pdu(0x03, 0x00, 0x02), + raw_pdu(0xbf, 0x00), +- raw_pdu(0x01, 0xbf, 0x00, 0x00, 0x06)); ++ raw_pdu(0x01, 0xbf, 0x00, 0x00, 0x06));*/ + + define_test_server("/robustness/unkown-command", + test_server, service_db_1, NULL, diff --git a/repo/bluez/fix-endianness.patch b/repo/bluez/fix-endianness.patch new file mode 100644 index 0000000..c60e229 --- /dev/null +++ b/repo/bluez/fix-endianness.patch @@ -0,0 +1,13 @@ +--- a/src/shared/util.h ++++ b/src/shared/util.h +@@ -15,6 +15,7 @@ + #include <byteswap.h> + #include <string.h> + #include <sys/types.h> ++#include <endian.h> + + #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) + #define BIT(n) (1 << (n)) +-- +2.30.2 + diff --git a/repo/bluez/fix-musl.patch b/repo/bluez/fix-musl.patch new file mode 100644 index 0000000..436fc5d --- /dev/null +++ b/repo/bluez/fix-musl.patch @@ -0,0 +1,12 @@ +diff --git a/tools/mesh-cfgtest.c b/tools/mesh-cfgtest.c +index fa0474f..9b68314 100644 +--- a/tools/mesh-cfgtest.c ++++ b/tools/mesh-cfgtest.c +@@ -26,6 +26,7 @@ + #include <time.h> + #include <unistd.h> + #include <sys/stat.h> ++#include <limits.h> /* PATH_MAX */ + + #include <ell/ell.h> + diff --git a/repo/bluez/mpris-proxy.desktop b/repo/bluez/mpris-proxy.desktop new file mode 100644 index 0000000..4995eaa --- /dev/null +++ b/repo/bluez/mpris-proxy.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Type=Application +Name=mpris-proxy +Comment=Start mpris-proxy in daemon mode +Exec=/usr/bin/mpris-proxy +TryExec=/usr/bin/mpris-proxy +Terminal=false +X-KDE-autostart-phase=2 diff --git a/repo/bluez/musl.patch b/repo/bluez/musl.patch new file mode 100644 index 0000000..cd8f085 --- /dev/null +++ b/repo/bluez/musl.patch @@ -0,0 +1,13 @@ +diff --git a/mesh/net.h b/mesh/net.h +index 150240f..a3dec2b 100644 +--- a/mesh/net.h ++++ b/mesh/net.h +@@ -21,6 +21,8 @@ + #define __packed __attribute__((packed)) + #endif + ++#include <sys/time.h> /* for timeval */ ++ + struct mesh_io; + struct mesh_node; + diff --git a/repo/bluez/org.bluez.obex.service b/repo/bluez/org.bluez.obex.service new file mode 100644 index 0000000..d1afc39 --- /dev/null +++ b/repo/bluez/org.bluez.obex.service @@ -0,0 +1,3 @@ +[D-BUS Service] +Name=org.bluez.obex +Exec=/usr/lib/bluetooth/obexd -n diff --git a/repo/bluez/rfcomm.confd b/repo/bluez/rfcomm.confd new file mode 100644 index 0000000..d87acdb --- /dev/null +++ b/repo/bluez/rfcomm.confd @@ -0,0 +1,5 @@ +# Bind rfcomm devices (allowed values are "true" and "false") +RFCOMM_ENABLE=true + +# Config file for rfcomm +RFCOMM_CONFIG="/etc/bluetooth/rfcomm.conf" diff --git a/repo/bluez/rfcomm.initd b/repo/bluez/rfcomm.initd new file mode 100644 index 0000000..26c2d6d --- /dev/null +++ b/repo/bluez/rfcomm.initd @@ -0,0 +1,27 @@ +#!/sbin/openrc-run +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-wireless/bluez/files/rfcomm-init.d,v 1.1 2011/12/31 21:09:18 pacho Exp $ + +depend() { + after coldplug + need dbus localmount hostname +} + +start() { + if [ "${RFCOMM_ENABLE}" = "true" -a -x /usr/bin/rfcomm ]; then + if [ -f "${RFCOMM_CONFIG}" ]; then + ebegin "Starting rfcomm" + /usr/bin/rfcomm -f "${RFCOMM_CONFIG}" bind all + eend $? + else + ewarn "Not enabling rfcomm because RFCOMM_CONFIG does not exists" + fi + fi +} + +stop() { + ebegin "Shutting down rfcomm" + /usr/bin/rfcomm release all + eend $? +} diff --git a/repo/bluez/test-mesh-crypto.patch b/repo/bluez/test-mesh-crypto.patch new file mode 100644 index 0000000..90fc293 --- /dev/null +++ b/repo/bluez/test-mesh-crypto.patch @@ -0,0 +1,14 @@ +Requires kernel option that might not be enabled on the builder +https://bugzilla.kernel.org/show_bug.cgi?id=206815 +diff --git a/Makefile.am b/Makefile.am +index ff0df21..a384c31 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -539,7 +539,6 @@ unit_test_midi_LDADD = src/libshared-glib.la \ + endif + + if MESH +-unit_tests += unit/test-mesh-crypto + unit_test_mesh_crypto_CPPFLAGS = $(ell_cflags) + unit_test_mesh_crypto_SOURCES = unit/test-mesh-crypto.c \ + mesh/crypto.h ell/internal ell/ell.h diff --git a/repo/date/date.xibuild b/repo/date/date.xibuild new file mode 100644 index 0000000..a0fb738 --- /dev/null +++ b/repo/date/date.xibuild @@ -0,0 +1,17 @@ +#!/bin/sh + +MAKEDEPS="make" +DEPS="musl sh" + +PKG_VER=0.8.6 +SOURCE=http://landley.net/toybox/downloads/toybox-$PKG_VER.tar.gz +DESC="Date from toybox" + +build () { + ./configure + make date +} + +package () { + install -Dm755 date $PKG_DEST/usr/bin/ +} diff --git a/repo/doas/configuration-directory.patch b/repo/doas/configuration-directory.patch new file mode 100644 index 0000000..78e6fc3 --- /dev/null +++ b/repo/doas/configuration-directory.patch @@ -0,0 +1,509 @@ +From 7de1d454bda06d68a04f4f2e48099398a7711ae9 Mon Sep 17 00:00:00 2001 +From: Ariadne Conill <ariadne@dereferenced.org> +Date: Wed, 4 Aug 2021 04:47:04 -0600 +Subject: [PATCH 1/8] add --with-confdir feature + +This adds support for an /etc/doas.d configuration directory as discussed in #61. It is disabled by default. +--- + README.md | 9 +++++++ + configure | 8 +++++++ + doas.c | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ + parse.y | 3 ++- + 4 files changed, 91 insertions(+), 1 deletion(-) + +diff --git a/README.md b/README.md +index f15610c..f967eca 100644 +--- a/README.md ++++ b/README.md +@@ -61,3 +61,12 @@ similar to sudo. + + See the comment block in `timestamp.c` for an in-depth description on how + timestamps are created and checked to be as safe as possible. ++ ++### `--with-doas-confdir` ++ ++An optional feature can be enabled which will result in `doas` reading configuration ++snippets from `/etc/doas.d`. These configuration snippets have the same requirements ++as `/etc/doas.conf` (owned by root, not world-writable). ++ ++If this feature is enabled, only the `/etc/doas.d` directory is read, and the historical ++`/etc/doas.conf` file is ignored. +\ No newline at end of file +diff --git a/configure b/configure +index 1f92f01..a3078dc 100755 +--- a/configure ++++ b/configure +@@ -27,6 +27,7 @@ usage: configure [options] + --without-shadow disable shadow support + + --with-timestamp enable timestamp support ++ --with-doas-confdir enable configuration directory support + + --uid-max=NUM set UID_MAX (default 65535) + --gid-max=NUM set GID_MAX (default 65535) +@@ -38,6 +39,7 @@ EOF + + # defaults + WITHOUT_TIMESTAMP=yes ++WITHOUT_CONFDIR=yes + UID_MAX=65535 + GID_MAX=65535 + +@@ -56,6 +58,8 @@ for x; do + --target) TARGET=$var ;; + --enable-debug) DEBUG=yes ;; + --enable-static) BUILD_STATIC=yes ;; ++ --with-doas-confdir) WITHOUT_CONFDIR= ;; ++ --without-doas-confdir) WITHOUT_CONFDIR=yes ;; + --with-pam) WITHOUT_PAM=; WITHOUT_SHADOW=yes ;; + --with-shadow) WITHOUT_SHADOW=; WITHOUT_PAM=yes ;; + --without-pam) WITHOUT_PAM=yes ;; +@@ -558,4 +562,8 @@ fi + + printf '#define DOAS_CONF "%s/doas.conf"\n' "${SYSCONFDIR}" >>$CONFIG_H + ++if [ -z "$WITHOUT_CONFDIR" ]; then ++ printf '#define DOAS_CONFDIR "%s/doas.d"\n' "${SYSCONFDIR}" >>$CONFIG_H ++fi ++ + printf '\n#endif /* CONFIG_H */\n' >>$CONFIG_H +diff --git a/doas.c b/doas.c +index ac3a42a..58701b7 100644 +--- a/doas.c ++++ b/doas.c +@@ -35,6 +35,7 @@ + #include <syslog.h> + #include <errno.h> + #include <fcntl.h> ++#include <dirent.h> + + #include "openbsd.h" + #include "doas.h" +@@ -155,6 +156,7 @@ permit(uid_t uid, gid_t *groups, int ngroups, const struct rule **lastr, + static void + parseconfig(const char *filename, int checkperms) + { ++ extern const char *yyfn; + extern FILE *yyfp; + extern int yyparse(void); + struct stat sb; +@@ -164,6 +166,8 @@ parseconfig(const char *filename, int checkperms) + err(1, checkperms ? "doas is not enabled, %s" : + "could not open config file %s", filename); + ++ yyfn = filename; ++ + if (checkperms) { + if (fstat(fileno(yyfp), &sb) != 0) + err(1, "fstat(\"%s\")", filename); +@@ -174,11 +178,67 @@ parseconfig(const char *filename, int checkperms) + } + + yyparse(); ++ yyfn = NULL; ++ + fclose(yyfp); + if (parse_errors) + exit(1); + } + ++#ifdef DOAS_CONFDIR ++static int ++isconfdir(const char *dirpath) ++{ ++ struct stat sb; ++ ++ if (lstat(dirpath, &sb) != 0) ++ err(1, "lstat(\"%s\")", dirpath); ++ ++ if ((sb.st_mode & (S_IFMT)) == S_IFDIR) ++ return 1; ++ ++ errno = ENOTDIR; ++ return 0; ++} ++ ++static void ++parseconfdir(const char *dirpath, int checkperms) ++{ ++ struct dirent **dirent_table; ++ size_t i, dirent_count; ++ char pathbuf[PATH_MAX]; ++ ++ if (!isconfdir(dirpath)) ++ err(1, checkperms ? "doas is not enabled, %s" : ++ "could not open config directory %s", dirpath); ++ ++ dirent_count = scandir(dirpath, &dirent_table, NULL, alphasort); ++ ++ for (i = 0; i < dirent_count; i++) ++ { ++ struct stat sb; ++ size_t pathlen; ++ ++ pathlen = snprintf(pathbuf, sizeof pathbuf, "%s/%s", dirpath, dirent_table[i]->d_name); ++ free(dirent_table[i]); ++ ++ /* make sure path ends in .conf */ ++ if (strcmp(pathbuf + (pathlen - 5), ".conf")) ++ continue; ++ ++ if (stat(pathbuf, &sb) != 0) ++ err(1, "stat(\"%s\")", pathbuf); ++ ++ if ((sb.st_mode & (S_IFMT)) != S_IFREG) ++ continue; ++ ++ parseconfig(pathbuf, checkperms); ++ } ++ ++ free(dirent_table); ++} ++#endif ++ + static void __dead + checkconfig(const char *confpath, int argc, char **argv, + uid_t uid, gid_t *groups, int ngroups, uid_t target) +@@ -188,7 +248,13 @@ checkconfig(const char *confpath, int argc, char **argv, + if (setresuid(uid, uid, uid) != 0) + err(1, "setresuid"); + ++#ifdef DOAS_CONFDIR ++ if (isconfdir(confpath)) ++ parseconfdir(confpath, 0); ++ else ++#else + parseconfig(confpath, 0); ++#endif + if (!argc) + exit(0); + +@@ -330,7 +396,13 @@ main(int argc, char **argv) + if (geteuid()) + errx(1, "not installed setuid"); + ++#ifdef DOAS_CONFDIR ++ if (isconfdir(DOAS_CONFDIR)) ++ parseconfdir(DOAS_CONFDIR, 1); ++ else ++#else + parseconfig(DOAS_CONF, 1); ++#endif + + /* cmdline is used only for logging, no need to abort on truncate */ + (void)strlcpy(cmdline, argv[0], sizeof(cmdline)); +diff --git a/parse.y b/parse.y +index 388c2a5..c6d7ebf 100644 +--- a/parse.y ++++ b/parse.y +@@ -49,6 +49,7 @@ typedef struct { + } yystype; + #define YYSTYPE yystype + ++const char *yyfn; + FILE *yyfp; + + struct rule **rules; +@@ -203,7 +204,7 @@ yyerror(const char *fmt, ...) + va_start(va, fmt); + vfprintf(stderr, fmt, va); + va_end(va); +- fprintf(stderr, " at line %d\n", yylval.lineno + 1); ++ fprintf(stderr, " at %s, line %d\n", yyfn, yylval.lineno + 1); + parse_errors++; + } + + +From 046ff34408ea8bf2cafc079bd71a126aa009b005 Mon Sep 17 00:00:00 2001 +From: Ariadne Conill <ariadne@dereferenced.org> +Date: Wed, 4 Aug 2021 09:20:35 -0600 +Subject: [PATCH 2/8] gracefully handle ENOENT in isconfdir() + +--- + doas.c | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/doas.c b/doas.c +index 58701b7..4c0cafe 100644 +--- a/doas.c ++++ b/doas.c +@@ -191,8 +191,13 @@ isconfdir(const char *dirpath) + { + struct stat sb; + +- if (lstat(dirpath, &sb) != 0) +- err(1, "lstat(\"%s\")", dirpath); ++ if (lstat(dirpath, &sb) != 0) { ++ if (errno != ENOENT) ++ err(1, "lstat(\"%s\")", dirpath); ++ ++ errno = ENOTDIR; ++ return 0; ++ } + + if ((sb.st_mode & (S_IFMT)) == S_IFDIR) + return 1; + +From 6e76fb04ac637a1001ba201559f28279e3abe738 Mon Sep 17 00:00:00 2001 +From: Ariadne Conill <ariadne@dereferenced.org> +Date: Wed, 4 Aug 2021 09:31:49 -0600 +Subject: [PATCH 3/8] ensure pathlen - 5 is always non-zero + +--- + doas.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/doas.c b/doas.c +index 4c0cafe..f827fcd 100644 +--- a/doas.c ++++ b/doas.c +@@ -228,6 +228,9 @@ parseconfdir(const char *dirpath, int checkperms) + free(dirent_table[i]); + + /* make sure path ends in .conf */ ++ if (pathlen < 6) ++ continue; ++ + if (strcmp(pathbuf + (pathlen - 5), ".conf")) + continue; + + +From cac56ea61e16d0ccb91100164a61e9f7215604e5 Mon Sep 17 00:00:00 2001 +From: Ariadne Conill <ariadne@dereferenced.org> +Date: Wed, 4 Aug 2021 10:17:35 -0600 +Subject: [PATCH 4/8] bail if dirent_count < 0 + +--- + doas.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/doas.c b/doas.c +index f827fcd..6e308c8 100644 +--- a/doas.c ++++ b/doas.c +@@ -210,7 +210,7 @@ static void + parseconfdir(const char *dirpath, int checkperms) + { + struct dirent **dirent_table; +- size_t i, dirent_count; ++ int i, dirent_count; + char pathbuf[PATH_MAX]; + + if (!isconfdir(dirpath)) +@@ -218,6 +218,9 @@ parseconfdir(const char *dirpath, int checkperms) + "could not open config directory %s", dirpath); + + dirent_count = scandir(dirpath, &dirent_table, NULL, alphasort); ++ if (dirent_count < 0) ++ err(1, checkperms ? "doas is not enabled, %s" : ++ "could not open config directory %s", dirpath); + + for (i = 0; i < dirent_count; i++) + { + +From 8d224060adbdb1dececeb02660df8693f7c54a40 Mon Sep 17 00:00:00 2001 +From: Ariadne Conill <ariadne@dereferenced.org> +Date: Wed, 4 Aug 2021 10:20:33 -0600 +Subject: [PATCH 5/8] error out if no matching configuration files are found in + the configuration directory + +--- + doas.c | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +diff --git a/doas.c b/doas.c +index 6e308c8..cdfa3ea 100644 +--- a/doas.c ++++ b/doas.c +@@ -210,7 +210,7 @@ static void + parseconfdir(const char *dirpath, int checkperms) + { + struct dirent **dirent_table; +- int i, dirent_count; ++ int i, m, dirent_count; + char pathbuf[PATH_MAX]; + + if (!isconfdir(dirpath)) +@@ -222,7 +222,7 @@ parseconfdir(const char *dirpath, int checkperms) + err(1, checkperms ? "doas is not enabled, %s" : + "could not open config directory %s", dirpath); + +- for (i = 0; i < dirent_count; i++) ++ for (i = 0, m = 0; i < dirent_count; i++) + { + struct stat sb; + size_t pathlen; +@@ -244,9 +244,16 @@ parseconfdir(const char *dirpath, int checkperms) + continue; + + parseconfig(pathbuf, checkperms); ++ m++; + } + + free(dirent_table); ++ ++ if (!m) { ++ fprintf(stderr, "doas is not enabled, %s: no matching configuration files found\n", ++ dirpath); ++ exit(1); ++ } + } + #endif + + +From 35c3e69fa52157683b8ae6fe040367390aa63bb6 Mon Sep 17 00:00:00 2001 +From: Ariadne Conill <ariadne@dereferenced.org> +Date: Wed, 4 Aug 2021 10:34:28 -0600 +Subject: [PATCH 6/8] use errx instead of fprintf(stderr) + +--- + doas.c | 7 ++----- + 1 file changed, 2 insertions(+), 5 deletions(-) + +diff --git a/doas.c b/doas.c +index cdfa3ea..b50138a 100644 +--- a/doas.c ++++ b/doas.c +@@ -249,11 +249,8 @@ parseconfdir(const char *dirpath, int checkperms) + + free(dirent_table); + +- if (!m) { +- fprintf(stderr, "doas is not enabled, %s: no matching configuration files found\n", +- dirpath); +- exit(1); +- } ++ if (!m) ++ errx(1, "doas is not enabled, %s: no matching configuration files found\n", dirpath); + } + #endif + + +From c9ff0fcdc0253679a0348995c36f89edc8d73a5b Mon Sep 17 00:00:00 2001 +From: Ariadne Conill <ariadne@dereferenced.org> +Date: Wed, 4 Aug 2021 16:50:58 -0600 +Subject: [PATCH 7/8] fix up the ifndef DOAS_CONFDIR branch + +--- + doas.c | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/doas.c b/doas.c +index b50138a..d77186b 100644 +--- a/doas.c ++++ b/doas.c +@@ -267,9 +267,8 @@ checkconfig(const char *confpath, int argc, char **argv, + if (isconfdir(confpath)) + parseconfdir(confpath, 0); + else +-#else +- parseconfig(confpath, 0); + #endif ++ parseconfig(confpath, 0); + if (!argc) + exit(0); + +@@ -415,9 +414,8 @@ main(int argc, char **argv) + if (isconfdir(DOAS_CONFDIR)) + parseconfdir(DOAS_CONFDIR, 1); + else +-#else +- parseconfig(DOAS_CONF, 1); + #endif ++ parseconfig(DOAS_CONF, 1); + + /* cmdline is used only for logging, no need to abort on truncate */ + (void)strlcpy(cmdline, argv[0], sizeof(cmdline)); + +From 9fe4df5f004435fa0b092dc15a3c5ab09090f45d Mon Sep 17 00:00:00 2001 +From: Ariadne Conill <ariadne@dereferenced.org> +Date: Fri, 3 Sep 2021 11:59:12 -0600 +Subject: [PATCH 8/8] add manpage for doas.d(5) + +--- + GNUmakefile | 1 + + doas.conf.5 | 1 + + doas.d.5 | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 52 insertions(+) + create mode 100644 doas.d.5 + +diff --git a/GNUmakefile b/GNUmakefile +index 2eef88e..423731c 100644 +--- a/GNUmakefile ++++ b/GNUmakefile +@@ -24,6 +24,7 @@ install: ${PROG} ${MAN} + chmod ${BINMODE} ${DESTDIR}${BINDIR}/${PROG} + cp -f doas.1 ${DESTDIR}${MANDIR}/man1 + cp -f doas.conf.5 ${DESTDIR}${MANDIR}/man5 ++ cp -f doas.d.5 ${DESTDIR}${MANDIR}/man5 + + uninstall: + rm -f ${DESTDIR}${BINDIR}/${PROG} +diff --git a/doas.conf.5 b/doas.conf.5 +index e98bfbe..e90d512 100644 +--- a/doas.conf.5 ++++ b/doas.conf.5 +@@ -143,6 +143,7 @@ permit nopass keepenv setenv { PATH } root as root + .Ed + .Sh SEE ALSO + .Xr doas 1 , ++.Xr doas.d 5 , + .Xr syslogd 8 + .Sh HISTORY + The +diff --git a/doas.d.5 b/doas.d.5 +new file mode 100644 +index 0000000..8f5f96a +--- /dev/null ++++ b/doas.d.5 +@@ -0,0 +1,50 @@ ++.\"Copyright (c) 2021 Ariadne Conill <ariadne@dereferenced.org> ++.\" ++.\"Permission to use, copy, modify, and distribute this software for any ++.\"purpose with or without fee is hereby granted, provided that the above ++.\"copyright notice and this permission notice appear in all copies. ++.\" ++.\"THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES ++.\"WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF ++.\"MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ++.\"ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ++.\"WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ++.\"ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF ++.\"OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ++.Dd $Mdocdate: October 9 2020 $ ++.Dt DOAS.D 5 ++.Os ++.Sh NAME ++.Nm doas.d ++.Nd doas configuration directory ++.Sh DESCRIPTION ++The ++.Xr doas 1 ++utility executes commands as other users according to the rules ++configured in either the configuration file or, optionally, the ++configuration directory. The preference to use the configuration ++file or configuration directory is determined at compile time, ++.Xr doas 1 ++will only consult one or the other. ++.Pp ++Configuration snippets stored in the configuration directory ++follow the same rules as the classic ++.Xr doas 1 ++configuration file, documented in ++.Xr doas.conf 5 . ++They must end with the .conf extension, or they will be ignored. ++.Pp ++These snippets are read in alphabetical order and thus can be ++ordered in the same way as other configuration directories. ++.Sh FILES ++.Bl -tag -width /etc/doas.d -compact ++.It Pa /etc/doas.d ++.Xr doas 1 ++configuration directory. ++.Sh SEE ALSO ++.Xr doas 1 , ++.Xr doas.conf 5 ++.Sh HISTORY ++The ++.Nm ++configuration directory first appeared in OpenDoas. diff --git a/repo/doas/doas.post-install b/repo/doas/doas.post-install new file mode 100755 index 0000000..65c3cff --- /dev/null +++ b/repo/doas/doas.post-install @@ -0,0 +1,32 @@ +#!/bin/sh + +[ -d /etc/doas.d ] || install -d -m 0750 /etc/doas.d +[ -e /etc/doas.d/doas.conf ] && exit 0 + +cat << _EOF_ >/etc/doas.d/doas.conf +# This file is actually located at /etc/doas.d/doas.conf, and reflects +# the system doas configuration. It may have been migrated from its +# previous location, /etc/doas.conf, automatically. +_EOF_ + +if [ -f /etc/doas.conf ]; then + cat /etc/doas.conf >> /etc/doas.d/doas.conf + cat << _EOF_ >> /etc/doas.d/doas.conf +# Please see /usr/share/doc/doas/doas.conf.example in the doas-doc +# package for configuration examples. +_EOF_ + + # install compatibility symlink + rm -f /etc/doas.conf + ln -sf /etc/doas.d/doas.conf /etc/doas.conf + + # chmod 600 + chmod 600 /etc/doas.d/doas.conf + + cat <<- _EOF_ >&2 + * Your configuration in /etc/doas.conf was migrated to + * /etc/doas.d/doas.conf and a symlink was installed in its + * place. For more information about the new doas configuration + * directory, consult doas.d(5). + _EOF_ +fi diff --git a/repo/doas/doas.post-upgrade b/repo/doas/doas.post-upgrade new file mode 100755 index 0000000..731b351 --- /dev/null +++ b/repo/doas/doas.post-upgrade @@ -0,0 +1,37 @@ +#!/bin/sh + +[ -d /etc/doas.d ] || install -d -m 0750 /etc/doas.d +# fix perms when upgrading from 6.8.1-r6 +if [ -d /etc/doas.d ] && [ "$(stat -c "%a" /etc/doas.d)" = "755" ]; then + chmod 0750 /etc/doas.d +fi + +[ -e /etc/doas.d/doas.conf ] && exit 0 + +cat << _EOF_ >/etc/doas.d/doas.conf +# This file is actually located at /etc/doas.d/doas.conf, and reflects +# the system doas configuration. It may have been migrated from its +# previous location, /etc/doas.conf, automatically. +_EOF_ + +if [ -f /etc/doas.conf ]; then + cat /etc/doas.conf >> /etc/doas.d/doas.conf + cat << _EOF_ >> /etc/doas.d/doas.conf +# Please see /usr/share/doc/doas/doas.conf.example in the doas-doc +# package for configuration examples. +_EOF_ +fi + +# install compatibility symlink +rm -f /etc/doas.conf +ln -sf /etc/doas.d/doas.conf /etc/doas.conf + +# chmod 600 +chmod 600 /etc/doas.d/doas.conf + +cat << _EOF_ >&2 + * Your configuration in /etc/doas.conf was migrated to + * /etc/doas.d/doas.conf and a symlink was installed in its + * place. For more information about the new doas configuration + * directory, consult doas.d(5). +_EOF_ diff --git a/repo/doas/doas.xibuild b/repo/doas/doas.xibuild new file mode 100644 index 0000000..3e3b4f8 --- /dev/null +++ b/repo/doas/doas.xibuild @@ -0,0 +1,44 @@ +#!/bin/sh + +NAME="doas" +DESC="OpenBSD's temporary privilege escalation tool" + +MAKEDEPS="bison" + +PKG_VER=6.8.2 +SOURCE="https://github.com/Duncaen/OpenDoas/archive/v$PKG_VER.tar.gz" + +ADDITIONAL=" +configuration-directory.patch +manpage-example-path.patch +" + +prepare () { + apply_patches +} + +build() { + ./configure \ + --prefix=/usr \ + --without-pam \ + --with-timestamp \ + --with-doas-confdir + make +} + +check() { + # doas -v returns 1 + ./doas -v || test $? = 1 +} + +package() { + make install DESTDIR="$PKG_DEST" + install -d "$PKG_DEST"/usr/share/doc/doas + cat > "$PKG_DEST"/usr/share/doc/doas/doas.conf.example <<-EOF + # see doas.conf(5) for configuration details + + # Uncomment to allow group "wheel" to become root + # permit persist :wheel + EOF +} + diff --git a/repo/doas/manpage-example-path.patch b/repo/doas/manpage-example-path.patch new file mode 100644 index 0000000..31048c7 --- /dev/null +++ b/repo/doas/manpage-example-path.patch @@ -0,0 +1,16 @@ +--- OpenDoas-6.8.1.orig/doas.conf.5 ++++ OpenDoas-6.8.1/doas.conf.5 +@@ -114,11 +114,11 @@ + it is not considered a keyword. + .El + .Sh FILES +-.Bl -tag -width /etc/examples/doas.conf -compact ++.Bl -tag -width /usr/share/doc/doas/doas.conf.example -compact + .It Pa /etc/doas.conf + .Xr doas 1 + configuration file. +-.It Pa /etc/examples/doas.conf ++.It Pa /usr/share/doc/doas/doas.conf.example + Example configuration file. + .El + .Sh EXAMPLES diff --git a/repo/dwm/dwm.xibuild b/repo/dwm/dwm.xibuild new file mode 100644 index 0000000..9644344 --- /dev/null +++ b/repo/dwm/dwm.xibuild @@ -0,0 +1,28 @@ +#!/bin/sh + +NAME="dwm" +DESC="dwm - dynamic window manager" + +MAKEDEPS=" libxft libx11 libxinerama" +DEPS="sxmo-demenu st" + +PKG_VER=6.3 +SOURCE="https://dl.suckless.org/dwm/dwm-$PKG_VER.tar.gz" + +prepare() { + default_prepare + sed -i -e '/CFLAGS/{s/-Os//;s/=/+=/}' \ + -e '/LDFLAGS/{s/=/+=/}' \ + "$BUILD_ROOT"/config.mk +} + +build() { + make X11INC=/usr/include/X11 \ + X11LIB=/usr/lib/X11 \ + FREETYPEINC=/usr/include/freetype2 +} + +package() { + make PREFIX=/usr DESTDIR="$PKG_DEST" install +} + diff --git a/repo/fltk/fltk.xibuild b/repo/fltk/fltk.xibuild new file mode 100644 index 0000000..a82da84 --- /dev/null +++ b/repo/fltk/fltk.xibuild @@ -0,0 +1,25 @@ +#!/bin/sh + +NAME="fltk" +DESC="A cross-platform C++ GUI toolkit" + +MAKEDEPS="libx11 libxext libxft mesa libxinerama libpng libjpeg-turbo" + +PKG_VER=1.3.8 +SOURCE="http://fltk.org/pub/fltk/$PKG_VER/fltk-$PKG_VER-source.tar.gz" + +build() { + ./configure \ + --prefix=/usr \ + --enable-shared \ + --enable-threads \ + --with-optim="$CXXFLAGS" + make V=1 + +} + +package() { + make DESTDIR="$PKG_DEST" install + # remove static libs + rm "$PKG_DEST"/usr/lib/*.a +} diff --git a/repo/fluidsynth/fluidsynth.xibuild b/repo/fluidsynth/fluidsynth.xibuild index f867527..18a36b3 100644 --- a/repo/fluidsynth/fluidsynth.xibuild +++ b/repo/fluidsynth/fluidsynth.xibuild @@ -3,7 +3,7 @@ NAME="fluidsynth" DESC="A real-time software synthesizer based on the SoundFont 2 specifications" -MAKEDEPS="alsa-lib dbus glib jack libsndfile pulseaudio readline cmake doxygen graphviz" +MAKEDEPS="alsa-lib dbus glib libsndfile pulseaudio readline cmake doxygen graphviz" PKG_VER=2.2.5 SOURCE="https://github.com/fluidsynth/fluidsynth/archive/v$PKG_VER/fluidsynth-v$PKG_VER.tar.gz" diff --git a/repo/ghostscript/fix-sprintf.patch b/repo/ghostscript/fix-sprintf.patch new file mode 100644 index 0000000..5a06af5 --- /dev/null +++ b/repo/ghostscript/fix-sprintf.patch @@ -0,0 +1,17 @@ +diff --git a/cups/gdevcups.c b/cups/gdevcups.c +index c00e758..35b4035 100644 +--- a/cups/gdevcups.c ++++ b/cups/gdevcups.c +@@ -4353,10 +4353,10 @@ cups_set_color_info(gx_device *pdev) /* I - Device info */ + */ + + if (pdev->HWResolution[0] != pdev->HWResolution[1]) +- sprintf(resolution, "%.0fx%.0fdpi", pdev->HWResolution[0], ++ snprintf(resolution, sizeof(resolution), "%.0fx%.0fdpi", pdev->HWResolution[0], + pdev->HWResolution[1]); + else +- sprintf(resolution, "%.0fdpi", pdev->HWResolution[0]); ++ snprintf(resolution, sizeof(resolution), "%.0fdpi", pdev->HWResolution[0]); + + for (i = 0, profile = cups->PPD->profiles; + i < cups->PPD->num_profiles; diff --git a/repo/ghostscript/ghostscript-system-zlib.patch b/repo/ghostscript/ghostscript-system-zlib.patch new file mode 100644 index 0000000..ed6e42d --- /dev/null +++ b/repo/ghostscript/ghostscript-system-zlib.patch @@ -0,0 +1,14 @@ +diff --git a/base/lib.mak b/base/lib.mak +index e8ee4e7..4abaa05 100644 +--- a/base/lib.mak ++++ b/base/lib.mak +@@ -589,7 +589,9 @@ srlx_h=$(GLSRC)srlx.h + sstring_h=$(GLSRC)sstring.h + strimpl_h=$(GLSRC)strimpl.h $(scommon_h) $(gstypes_h) $(gsstruct_h) + szlibx_h=$(GLSRC)szlibx.h ++ifneq ($(SHARE_ZLIB),1) + zlib_h=$(ZSRCDIR)$(D)zlib.h ++endif + # We have two of the following, for shared zlib (_1) + # and 'local' zlib (_0) + szlibxx_h_1=$(GLSRC)szlibxx.h $(szlibx_h) diff --git a/repo/ghostscript/ghostscript.xibuild b/repo/ghostscript/ghostscript.xibuild new file mode 100644 index 0000000..ed06538 --- /dev/null +++ b/repo/ghostscript/ghostscript.xibuild @@ -0,0 +1,70 @@ +#!/bin/sh + +NAME="ghostscript" +DESC="An interpreter for the PostScript language and for PDF" + +MAKEDEPS="make freetype openjpeg libpng zlib tiff cups jbig2dec" +DEPS="musl " + +PKG_VER=9.56.1 +SOURCE="https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs9561/ghostscript-$PKG_VER.tar.gz" +ADDITIONAL="ghostscript-system-zlib.patch fix-sprintf.patch " + +prepare () { + apply_patches + rm -r jpeg libpng zlib tiff lcms2mt cups/libs jbig2dec \ + freetype + + # fix parallel builds + sed -i -e 's/ECHO_XE/ECHOGS_XE/g' \ + -e 's/^\($(GLOBJ)md5.$(OBJ) :.*\)/\1 $(ECHOGS_XE)/' \ + base/lib.mak + aclocal && autoconf --force + + cd $BUILD_ROOT/ijs + libtoolize --force && aclocal && autoconf && automake --add-missing + update_config_sub +} + +build () { + # build ijs + cd "$BUILD_ROOT"/ijs + ./configure \ + --prefix=/usr \ + --enable-shared \ + --disable-static + make + + cd "$BUILD_ROOT" + + # --disable-compile-inits is needed to link with system-zlib + ./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --docdir=/usr/share/doc/ghostscript \ + --enable-dynamic \ + --with-system-libtiff \ + --with-ijs \ + --with-jbig2dec \ + --without-libpaper \ + --without-versioned-path \ + --enable-gtk \ + --with-drivers=ALL \ + --with-fontpath=/usr/share/fonts/Type1:/usr/share/fonts \ + --disable-compile-inits + make obj/arch.h # workaround parallel build issue + make so all +} + +package () { + make -j1 DESTDIR="$PKG_DEST" install soinstall + + cd "$BUILD_ROOT"/ijs + make -j1 DESTDIR="$PKG_DEST" install + cd .. + + # create empty dir for future fonts + mkdir -p "$PKG_DEST"/usr/share/fonts/Type1 +} diff --git a/repo/gjs/gjs.xibuild b/repo/gjs/gjs.xibuild new file mode 100644 index 0000000..3624610 --- /dev/null +++ b/repo/gjs/gjs.xibuild @@ -0,0 +1,22 @@ +#!/bin/sh + +NAME="gjs" +DESC="GNOME javascript library" + +MAKEDEPS="dbus gobject-introspection js91 gtk3 cairo meson libffi" + +PKG_VER=1.72.0 +SOURCE="https://download.gnome.org/sources/gjs/${PKG_VER%.*}/gjs-$PKG_VER.tar.xz" + +build() { + meson --prefix=/usr \ + -Dprofiler=disabled \ + -Dinstalled_tests=false \ + output + meson compile ${JOBS:+-j ${JOBS}} -C output +} + +package() { + DESTDIR="$PKG_DEST" meson install --no-rebuild -C output +} + diff --git a/repo/glade/duplicate-linguas.patch b/repo/glade/duplicate-linguas.patch new file mode 100644 index 0000000..4d2ab18 --- /dev/null +++ b/repo/glade/duplicate-linguas.patch @@ -0,0 +1,9 @@ +--- a/help/LINGUAS ++++ b/help/LINGUAS +@@ -1,6 +1,5 @@ + # please keep this list sorted alphabetically + # +-da + bg + ca + cs diff --git a/repo/glade/glade.xibuild b/repo/glade/glade.xibuild new file mode 100644 index 0000000..f043951 --- /dev/null +++ b/repo/glade/glade.xibuild @@ -0,0 +1,32 @@ +#!/bin/sh + +NAME="glade" +DESC="User Interface Designer for GTK+ and GNOME" + +MAKEDEPS="gtk3 libxml2 itstool intltool python-gobject gobject-introspection meson python gjs" + +PKG_VER=3.38.2 +SOURCE="https://download.gnome.org/sources/glade/${PKG_VER%.*}/glade-$PKG_VER.tar.xz" + +ADDITIONAL=" +duplicate-linguas.patch +meson-0.60.patch +" + +prepare () { + apply_patches +} + +build() { + meson --prefix=/usr \ + . output + meson compile ${JOBS:+-j ${JOBS}} -C output +} + +package() { + # this one index is missing, so copy it from another language + mkdir output/help/hi/ + cp output/help/en_GB/index.docbook output/help/hi/index.docbook + + DESTDIR="$PKG_DEST" meson install --no-rebuild -C output +} diff --git a/repo/glade/meson-0.60.patch b/repo/glade/meson-0.60.patch new file mode 100644 index 0000000..d470a31 --- /dev/null +++ b/repo/glade/meson-0.60.patch @@ -0,0 +1,18 @@ +--- a/data/meson.build ++++ b/data/meson.build +@@ -2,7 +2,6 @@ + desktop_conf.set('VERSION', glade_version) + + i18n.merge_file( +- 'desktop', + type: 'desktop', + input: configure_file( + input: 'org.gnome.Glade.desktop.in.in', +@@ -18,7 +17,6 @@ + appdata = glade_name + '.appdata.xml' + + i18n.merge_file( +- 'appdata', + input: 'org.gnome.Glade.appdata.xml.in', + output: '@BASENAME@', + po_dir: po_dir, diff --git a/repo/gnupg/0001-Include-sys-select.h-for-FD_SETSIZE.patch b/repo/gnupg/0001-Include-sys-select.h-for-FD_SETSIZE.patch new file mode 100644 index 0000000..a835f39 --- /dev/null +++ b/repo/gnupg/0001-Include-sys-select.h-for-FD_SETSIZE.patch @@ -0,0 +1,31 @@ +From d2f3053e156a8dfc3e2e7f8fa814f671d851b26f Mon Sep 17 00:00:00 2001 +From: Natanael Copa <ncopa@alpinelinux.org> +Date: Fri, 4 Jul 2014 08:15:21 +0000 +Subject: [PATCH] Include sys/select.h for FD_SETSIZE + +This fixes the following compile error with musl libc: +watchgnupg.c:225:18: error: 'FD_SETSIZE' undeclared (first use in this +function) + else if (fd >= FD_SETSIZE) + ^ + +Signed-off-by: Natanael Copa <ncopa@alpinelinux.org> +--- + tools/watchgnupg.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/tools/watchgnupg.c b/tools/watchgnupg.c +index 4f4d54d..7aede22 100644 +--- a/tools/watchgnupg.c ++++ b/tools/watchgnupg.c +@@ -28,6 +28,7 @@ + #include <stdarg.h> + #include <assert.h> + #include <unistd.h> ++#include <sys/select.h> + #include <sys/socket.h> + #include <sys/un.h> + #include <netinet/in.h> +-- +2.0.1 + diff --git a/repo/gnupg/0010-avoid-beta-warning.patch b/repo/gnupg/0010-avoid-beta-warning.patch new file mode 100644 index 0000000..2c3c873 --- /dev/null +++ b/repo/gnupg/0010-avoid-beta-warning.patch @@ -0,0 +1,46 @@ +From: Debian GnuPG Maintainers <pkg-gnupg-maint@lists.alioth.debian.org> +Date: Tue, 14 Apr 2015 10:02:31 -0400 +Subject: avoid-beta-warning + +avoid self-describing as a beta + +Using autoreconf against the source as distributed in tarball form +invariably results in a package that thinks it's a "beta" package, +which produces the "THIS IS A DEVELOPMENT VERSION" warning string. + +since we use dh_autoreconf, i need this patch to avoid producing +builds that announce themselves as DEVELOPMENT VERSIONs. + +See discussion at: + + http://lists.gnupg.org/pipermail/gnupg-devel/2014-November/029065.html +--- + autogen.sh | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +Patch-Source: https://sources.debian.org/data/main/g/gnupg2/2.2.27-2/debian/patches/debian-packaging/avoid-beta-warning.patch + +diff --git a/autogen.sh b/autogen.sh +index b238550..9b86d3f 100755 +--- a/autogen.sh ++++ b/autogen.sh +@@ -229,7 +229,7 @@ if [ "$myhost" = "find-version" ]; then + esac + + beta=no +- if [ -e .git ]; then ++ if false; then + ingit=yes + tmp=$(git describe --match "${matchstr1}" --long 2>/dev/null) + tmp=$(echo "$tmp" | sed s/^"$package"//) +@@ -245,8 +245,8 @@ if [ "$myhost" = "find-version" ]; then + rvd=$((0x$(echo ${rev} | dd bs=1 count=4 2>/dev/null))) + else + ingit=no +- beta=yes +- tmp="-unknown" ++ beta=no ++ tmp="" + rev="0000000" + rvd="0" + fi diff --git a/repo/gnupg/0020-avoid-regenerating-defsincdate-use-shipped-file.patch b/repo/gnupg/0020-avoid-regenerating-defsincdate-use-shipped-file.patch new file mode 100644 index 0000000..2ce171a --- /dev/null +++ b/repo/gnupg/0020-avoid-regenerating-defsincdate-use-shipped-file.patch @@ -0,0 +1,41 @@ +From: Daniel Kahn Gillmor <dkg@fifthhorseman.net> +Date: Mon, 29 Aug 2016 12:34:42 -0400 +Subject: avoid regenerating defsincdate (use shipped file) + +upstream ships doc/defsincdate in its tarballs. but doc/Makefile.am +tries to rewrite doc/defsincdate if it notices that any of the files +have been modified more recently, and it does so assuming that we're +running from a git repo. + +However, we'd rather ship the documents cleanly without regenerating +defsincdate -- we don't have a git repo available (debian builds from +upstream tarballs) and any changes to the texinfo files (e.g. from +debian/patches/) might result in different dates on the files than we +expect after they're applied by dpkg or quilt or whatever, which makes +the datestamp unreproducible. +--- + doc/Makefile.am | 9 --------- + 1 file changed, 9 deletions(-) + +Patch-Source: https://sources.debian.org/data/main/g/gnupg2/2.2.27-2/debian/patches/debian-packaging/avoid-regenerating-defsincdate-use-shipped-file.patch + +diff --git a/doc/Makefile.am b/doc/Makefile.am +index 2b882c3..6be571b 100644 +--- a/doc/Makefile.am ++++ b/doc/Makefile.am +@@ -178,15 +178,6 @@ $(myman_pages) gnupg.7 : yat2m-stamp defs.inc + + dist-hook: defsincdate + +-defsincdate: $(gnupg_TEXINFOS) +- : >defsincdate ; \ +- if test -e $(top_srcdir)/.git; then \ +- (cd $(srcdir) && git log -1 --format='%ct' \ +- -- $(gnupg_TEXINFOS) 2>/dev/null) >>defsincdate; \ +- elif test x"$$SOURCE_DATE_EPOCH" != x; then \ +- echo "$$SOURCE_DATE_EPOCH" >>defsincdate ; \ +- fi +- + defs.inc : defsincdate Makefile mkdefsinc + incd="`test -f defsincdate || echo '$(srcdir)/'`defsincdate"; \ + ./mkdefsinc -C $(srcdir) --date "`cat $$incd 2>/dev/null`" \ diff --git a/repo/gnupg/0110-avoid-simple-memory-dumps-via-ptrace.patch b/repo/gnupg/0110-avoid-simple-memory-dumps-via-ptrace.patch new file mode 100644 index 0000000..644b8a5 --- /dev/null +++ b/repo/gnupg/0110-avoid-simple-memory-dumps-via-ptrace.patch @@ -0,0 +1,91 @@ +From: Daniel Kahn Gillmor <dkg@fifthhorseman.net> +Date: Tue, 11 Aug 2015 20:28:26 -0400 +Subject: Avoid simple memory dumps via ptrace + +This avoids needing to setgid gpg-agent. It probably doesn't defend +against all possible attacks, but it defends against one specific (and +easy) one. If there are other protections we should do them too. + +This will make it slightly harder to debug the agent because the +normal user won't be able to attach gdb to it directly while it runs. + +The remaining options for debugging are: + + * launch the agent from gdb directly + * connect gdb to a running agent as the superuser + +Upstream bug: https://dev.gnupg.org/T1211 +--- + agent/gpg-agent.c | 8 ++++++++ + configure.ac | 2 +- + scd/scdaemon.c | 9 +++++++++ + 3 files changed, 18 insertions(+), 1 deletion(-) + +Patch-Source: https://sources.debian.org/data/main/g/gnupg2/2.2.27-2/debian/patches/block-ptrace-on-secret-daemons/Avoid-simple-memory-dumps-via-ptrace.patch + +diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c +index b167c34..5afcf11 100644 +--- a/agent/gpg-agent.c ++++ b/agent/gpg-agent.c +@@ -50,6 +50,9 @@ + # include <signal.h> + #endif + #include <npth.h> ++#ifdef HAVE_PRCTL ++# include <sys/prctl.h> ++#endif + + #define INCLUDED_BY_MAIN_MODULE 1 + #define GNUPG_COMMON_NEED_AFLOCAL +@@ -1030,6 +1033,11 @@ main (int argc, char **argv ) + + early_system_init (); + ++#if defined(HAVE_PRCTL) && defined(PR_SET_DUMPABLE) ++ /* Disable ptrace on Linux without sgid bit */ ++ prctl(PR_SET_DUMPABLE, 0); ++#endif ++ + /* Before we do anything else we save the list of currently open + file descriptors and the signal mask. This info is required to + do the exec call properly. We don't need it on Windows. */ +diff --git a/configure.ac b/configure.ac +index 7a2d410..2d8b050 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1426,7 +1426,7 @@ AC_CHECK_FUNCS([atexit canonicalize_file_name clock_gettime ctermid \ + ftruncate funlockfile getaddrinfo getenv getpagesize \ + getpwnam getpwuid getrlimit getrusage gettimeofday \ + gmtime_r inet_ntop inet_pton isascii lstat memicmp \ +- memmove memrchr mmap nl_langinfo pipe raise rand \ ++ memmove memrchr mmap nl_langinfo pipe prctl raise rand \ + setenv setlocale setrlimit sigaction sigprocmask \ + stat stpcpy strcasecmp strerror strftime stricmp \ + strlwr strncasecmp strpbrk strsep strtol strtoul \ +diff --git a/scd/scdaemon.c b/scd/scdaemon.c +index 5c519f8..cab66a0 100644 +--- a/scd/scdaemon.c ++++ b/scd/scdaemon.c +@@ -37,6 +37,9 @@ + #include <unistd.h> + #include <signal.h> + #include <npth.h> ++#ifdef HAVE_PRCTL ++# include <sys/prctl.h> ++#endif + + #define INCLUDED_BY_MAIN_MODULE 1 + #define GNUPG_COMMON_NEED_AFLOCAL +@@ -446,6 +449,12 @@ main (int argc, char **argv ) + npth_t pipecon_handler; + + early_system_init (); ++ ++#if defined(HAVE_PRCTL) && defined(PR_SET_DUMPABLE) ++ /* Disable ptrace on Linux without sgid bit */ ++ prctl(PR_SET_DUMPABLE, 0); ++#endif ++ + set_strusage (my_strusage); + gcry_control (GCRYCTL_SUSPEND_SECMEM_WARN); + /* Please note that we may running SUID(ROOT), so be very CAREFUL diff --git a/repo/gnupg/0210-dirmngr-hkp-avoid-potential-race-condition-when-some-host-die.patch b/repo/gnupg/0210-dirmngr-hkp-avoid-potential-race-condition-when-some-host-die.patch new file mode 100644 index 0000000..1aa79c6 --- /dev/null +++ b/repo/gnupg/0210-dirmngr-hkp-avoid-potential-race-condition-when-some-host-die.patch @@ -0,0 +1,83 @@ +From: Daniel Kahn Gillmor <dkg@fifthhorseman.net> +Date: Sat, 29 Oct 2016 01:25:05 -0400 +Subject: dirmngr: hkp: Avoid potential race condition when some hosts die. + +* dirmngr/ks-engine-hkp.c (select_random_host): Use atomic pass +through the host table instead of risking out-of-bounds write. + +-- + +Multiple threads may write to hosttable[x]->dead while +select_random_host() is running. For example, a housekeeping thread +might clear the ->dead bit on some entries, or another connection to +dirmngr might manually mark a host as alive. + +If one or more hosts are resurrected between the two loops over a +given table in select_random_host(), then the allocation of tbl might +not be large enough, resulting in a write past the end of tbl on the +second loop. + +This change collapses the two loops into a single loop to avoid this +discrepancy: each host's "dead" bit is now only checked once. + +As Werner points out, this isn't currently strictly necessary, since +npth will not switch threads unless a blocking system call is made, +and no blocking system call is made in these two loops. + +However, in a subsequent change in this series, we will call a +function in this loop, and that function may sometimes write(2), or +call other functions, which may themselves block. Keeping this as a +single-pass loop avoids the need to keep track of what might block and +what might not. + +Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net> +--- + dirmngr/ks-engine-hkp.c | 23 ++++++++++------------- + 1 file changed, 10 insertions(+), 13 deletions(-) + +Patch-Source: https://sources.debian.org/data/main/g/gnupg2/2.2.27-2/debian/patches/dirmngr-idling/dirmngr-hkp-Avoid-potential-race-condition-when-some.patch + +diff --git a/dirmngr/ks-engine-hkp.c b/dirmngr/ks-engine-hkp.c +index 14859c7..d425363 100644 +--- a/dirmngr/ks-engine-hkp.c ++++ b/dirmngr/ks-engine-hkp.c +@@ -225,29 +225,26 @@ host_in_pool_p (hostinfo_t hi, int tblidx) + static int + select_random_host (hostinfo_t hi) + { +- int *tbl; +- size_t tblsize; ++ int *tbl = NULL; ++ size_t tblsize = 0; + int pidx, idx; + + /* We create a new table so that we randomly select only from + currently alive hosts. */ +- for (idx = 0, tblsize = 0; ++ for (idx = 0; + idx < hi->pool_len && (pidx = hi->pool[idx]) != -1; + idx++) + if (hosttable[pidx] && !hosttable[pidx]->dead) +- tblsize++; ++ { ++ tblsize++; ++ tbl = xtryrealloc(tbl, tblsize * sizeof *tbl); ++ if (!tbl) ++ return -1; /* memory allocation failed! */ ++ tbl[tblsize-1] = pidx; ++ } + if (!tblsize) + return -1; /* No hosts. */ + +- tbl = xtrymalloc (tblsize * sizeof *tbl); +- if (!tbl) +- return -1; +- for (idx = 0, tblsize = 0; +- idx < hi->pool_len && (pidx = hi->pool[idx]) != -1; +- idx++) +- if (hosttable[pidx] && !hosttable[pidx]->dead) +- tbl[tblsize++] = pidx; +- + if (tblsize == 1) /* Save a get_uint_nonce. */ + pidx = tbl[0]; + else diff --git a/repo/gnupg/0220-dirmngr-avoid-need-for-hkp-housekeeping.patch b/repo/gnupg/0220-dirmngr-avoid-need-for-hkp-housekeeping.patch new file mode 100644 index 0000000..0e125fd --- /dev/null +++ b/repo/gnupg/0220-dirmngr-avoid-need-for-hkp-housekeeping.patch @@ -0,0 +1,232 @@ +From: Daniel Kahn Gillmor <dkg@fifthhorseman.net> +Date: Sat, 29 Oct 2016 02:00:50 -0400 +Subject: dirmngr: Avoid need for hkp housekeeping. + +* dirmngr/ks-engine-hkp.c (host_is_alive): New function. Test whether +host is alive and resurrects it if it has been dead long enough. +(select_random_host, map_host, ks_hkp_mark_host): Use host_is_alive +instead of testing hostinfo_t->dead directly. +(ks_hkp_housekeeping): Remove function, no longer needed. +* dirmngr/dirmngr.c (housekeeping_thread): Remove call to +ks_hkp_housekeeping. + +-- + +Rather than resurrecting hosts upon scheduled resurrection times, test +whether hosts should be resurrected as they're inspected for being +dead. This removes the need for explicit housekeeping, and makes host +resurrections happen "just in time", rather than being clustered on +HOUSEKEEPING_INTERVAL seconds. + +According to 392e068e9f143d41f6350345619543cbcd47380f, +dns_stuff_housekeeping only works on Windows, so it also isn't +necessary in debian, but it remains in place for now. + +Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net> +--- + dirmngr/dirmngr.c | 3 --- + dirmngr/dirmngr.h | 1 - + dirmngr/ks-engine-hkp.c | 72 ++++++++++++++++++++++++------------------------- + 3 files changed, 35 insertions(+), 41 deletions(-) + +Patch-Source: https://sources.debian.org/data/main/g/gnupg2/2.2.27-2/debian/patches/dirmngr-idling/dirmngr-Avoid-need-for-hkp-housekeeping.patch + +diff --git a/dirmngr/dirmngr.c b/dirmngr/dirmngr.c +index ae967dd..89eea4e 100644 +--- a/dirmngr/dirmngr.c ++++ b/dirmngr/dirmngr.c +@@ -1935,12 +1935,10 @@ static void * + housekeeping_thread (void *arg) + { + static int sentinel; +- time_t curtime; + struct server_control_s ctrlbuf; + + (void)arg; + +- curtime = gnupg_get_time (); + if (sentinel) + { + log_info ("housekeeping is already going on\n"); +@@ -1954,7 +1952,6 @@ housekeeping_thread (void *arg) + dirmngr_init_default_ctrl (&ctrlbuf); + + dns_stuff_housekeeping (); +- ks_hkp_housekeeping (curtime); + if (network_activity_seen) + { + network_activity_seen = 0; +diff --git a/dirmngr/dirmngr.h b/dirmngr/dirmngr.h +index 1b52a1d..4afc19b 100644 +--- a/dirmngr/dirmngr.h ++++ b/dirmngr/dirmngr.h +@@ -217,7 +217,6 @@ const char* dirmngr_get_current_socket_name (void); + int dirmngr_use_tor (void); + + /*-- Various housekeeping functions. --*/ +-void ks_hkp_housekeeping (time_t curtime); + void ks_hkp_reload (void); + + +diff --git a/dirmngr/ks-engine-hkp.c b/dirmngr/ks-engine-hkp.c +index d425363..c50681d 100644 +--- a/dirmngr/ks-engine-hkp.c ++++ b/dirmngr/ks-engine-hkp.c +@@ -218,6 +218,24 @@ host_in_pool_p (hostinfo_t hi, int tblidx) + return 0; + } + ++static int ++host_is_alive (hostinfo_t hi, time_t curtime) ++{ ++ if (!hi) ++ return 0; ++ if (!hi->dead) ++ return 1; ++ if (!hi->died_at) ++ return 0; /* manually marked dead */ ++ if (hi->died_at + RESURRECT_INTERVAL <= curtime ++ || hi->died_at > curtime) ++ { ++ hi->dead = 0; ++ log_info ("resurrected host '%s'", hi->name); ++ return 1; ++ } ++ return 0; ++} + + /* Select a random host. Consult HI->pool which indices into the global + hosttable. Returns index into HI->pool or -1 if no host could be +@@ -228,13 +246,15 @@ select_random_host (hostinfo_t hi) + int *tbl = NULL; + size_t tblsize = 0; + int pidx, idx; ++ time_t curtime; + ++ curtime = gnupg_get_time (); + /* We create a new table so that we randomly select only from + currently alive hosts. */ + for (idx = 0; + idx < hi->pool_len && (pidx = hi->pool[idx]) != -1; + idx++) +- if (hosttable[pidx] && !hosttable[pidx]->dead) ++ if (hosttable[pidx] && host_is_alive (hosttable[pidx], curtime)) + { + tblsize++; + tbl = xtryrealloc(tbl, tblsize * sizeof *tbl); +@@ -462,6 +482,7 @@ map_host (ctrl_t ctrl, const char *name, const char *srvtag, int force_reselect, + int is_pool; + int new_hosts = 0; + char *cname; ++ time_t curtime; + + *r_host = NULL; + if (r_httpflags) +@@ -501,6 +522,7 @@ map_host (ctrl_t ctrl, const char *name, const char *srvtag, int force_reselect, + } + else + hi = hosttable[idx]; ++ curtime = gnupg_get_time (); + + is_pool = hi->pool != NULL; + +@@ -607,7 +629,7 @@ map_host (ctrl_t ctrl, const char *name, const char *srvtag, int force_reselect, + if (force_reselect) + hi->poolidx = -1; + else if (hi->poolidx >= 0 && hi->poolidx < hosttable_size +- && hosttable[hi->poolidx] && hosttable[hi->poolidx]->dead) ++ && hosttable[hi->poolidx] && !host_is_alive (hosttable[hi->poolidx], curtime)) + hi->poolidx = -1; + + /* Select a host if needed. */ +@@ -665,7 +687,7 @@ map_host (ctrl_t ctrl, const char *name, const char *srvtag, int force_reselect, + return gpg_error_from_syserror (); + } + +- if (hi->dead) ++ if (!host_is_alive (hi, curtime)) + { + log_error ("host '%s' marked as dead\n", hi->name); + if (r_httphost) +@@ -770,7 +792,8 @@ ks_hkp_mark_host (ctrl_t ctrl, const char *name, int alive) + { + gpg_error_t err = 0; + hostinfo_t hi, hi2; +- int idx, idx2, idx3, n; ++ int idx, idx2, idx3, n, is_alive; ++ time_t curtime; + + if (!name || !*name || !strcmp (name, "localhost")) + return 0; +@@ -779,13 +802,15 @@ ks_hkp_mark_host (ctrl_t ctrl, const char *name, int alive) + if (idx == -1) + return gpg_error (GPG_ERR_NOT_FOUND); + ++ curtime = gnupg_get_time (); + hi = hosttable[idx]; +- if (alive && hi->dead) ++ is_alive = host_is_alive (hi, curtime); ++ if (alive && !is_alive) + { + hi->dead = 0; + err = ks_printf_help (ctrl, "marking '%s' as alive", name); + } +- else if (!alive && !hi->dead) ++ else if (!alive && is_alive) + { + hi->dead = 1; + hi->died_at = 0; /* Manually set dead. */ +@@ -819,14 +844,15 @@ ks_hkp_mark_host (ctrl_t ctrl, const char *name, int alive) + + hi2 = hosttable[n]; + if (!hi2) +- ; +- else if (alive && hi2->dead) ++ continue; ++ is_alive = host_is_alive (hi2, curtime); ++ if (alive && !is_alive) + { + hi2->dead = 0; + err = ks_printf_help (ctrl, "marking '%s' as alive", + hi2->name); + } +- else if (!alive && !hi2->dead) ++ else if (!alive && is_alive) + { + hi2->dead = 1; + hi2->died_at = 0; /* Manually set dead. */ +@@ -1112,34 +1138,6 @@ ks_hkp_resolve (ctrl_t ctrl, parsed_uri_t uri) + } + + +-/* Housekeeping function called from the housekeeping thread. It is +- used to mark dead hosts alive so that they may be tried again after +- some time. */ +-void +-ks_hkp_housekeeping (time_t curtime) +-{ +- int idx; +- hostinfo_t hi; +- +- for (idx=0; idx < hosttable_size; idx++) +- { +- hi = hosttable[idx]; +- if (!hi) +- continue; +- if (!hi->dead) +- continue; +- if (!hi->died_at) +- continue; /* Do not resurrect manually shot hosts. */ +- if (hi->died_at + RESURRECT_INTERVAL <= curtime +- || hi->died_at > curtime) +- { +- hi->dead = 0; +- log_info ("resurrected host '%s'", hi->name); +- } +- } +-} +- +- + /* Reload (SIGHUP) action for this module. We mark all host alive + * even those which have been manually shot. */ + void diff --git a/repo/gnupg/0230-dirmngr-avoid-automatically-checking-upstream-swdb.patch b/repo/gnupg/0230-dirmngr-avoid-automatically-checking-upstream-swdb.patch new file mode 100644 index 0000000..8ffd897 --- /dev/null +++ b/repo/gnupg/0230-dirmngr-avoid-automatically-checking-upstream-swdb.patch @@ -0,0 +1,51 @@ +From: Daniel Kahn Gillmor <dkg@fifthhorseman.net> +From: Jakub Jirutka <jakub@jirutka.cz> +Date: Sun, 20 Nov 2016 23:09:24 -0500 +Date: Wed, 18 Aug 2021 21:08:20 +0200 +Subject: dirmngr: Avoid automatically checking upstream swdb. + +* dirmngr/dirmngr.c (housekeeping_thread): Avoid automatically +checking upstream's software database. In Debian, software updates +should be handled by the distro mechanism, and additional upstream +checks only confuse the user. +* doc/dirmngr.texi: document that --allow-version-check does nothing. + +Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net> +--- + dirmngr/dirmngr.c | 2 -- + doc/dirmngr.texi | 7 ++++--- + 2 files changed, 4 insertions(+), 5 deletions(-) + +Patch-Source: https://sources.debian.org/data/main/g/gnupg2/2.2.27-2/debian/patches/dirmngr-idling/dirmngr-Avoid-automatically-checking-upstream-swdb.patch + +diff --git a/dirmngr/dirmngr.c b/dirmngr/dirmngr.c +index 89eea4e..f26ed63 100644 +--- a/dirmngr/dirmngr.c ++++ b/dirmngr/dirmngr.c +@@ -1955,8 +1955,6 @@ housekeeping_thread (void *arg) + if (network_activity_seen) + { + network_activity_seen = 0; +- if (opt.allow_version_check) +- dirmngr_load_swdb (&ctrlbuf, 0); + workqueue_run_global_tasks (&ctrlbuf, 1); + } + else +diff --git a/doc/dirmngr.texi b/doc/dirmngr.texi +index 843fdbf..84a8d28 100644 +--- a/doc/dirmngr.texi ++++ b/doc/dirmngr.texi +@@ -291,9 +291,10 @@ Set the size of the queue for pending connections. The default is 64. + @item --allow-version-check + @opindex allow-version-check + Allow Dirmngr to connect to @code{https://versions.gnupg.org} to get +-the list of current software versions. If this option is enabled +-the list is retrieved in case the local +-copy does not exist or is older than 5 to 7 days. See the option ++the list of current software versions. ++On Alpine-packaged versions, this option does nothing since software ++updates should be handled by the distribution. ++See the option + @option{--query-swdb} of the command @command{gpgconf} for more + details. Note, that regardless of this option a version check can + always be triggered using this command: diff --git a/repo/gnupg/0310-gpg-default-to-3072-bit-keys.patch b/repo/gnupg/0310-gpg-default-to-3072-bit-keys.patch new file mode 100644 index 0000000..e04f480 --- /dev/null +++ b/repo/gnupg/0310-gpg-default-to-3072-bit-keys.patch @@ -0,0 +1,93 @@ +From: Daniel Kahn Gillmor <dkg@fifthhorseman.net> +Date: Thu, 7 Sep 2017 18:41:10 -0400 +Subject: gpg: default to 3072-bit keys. + +* agent/command.c (hlp_genkey): update help text to suggest the use of +3072 bits. +* doc/wks.texi: Make example match default generation. +* g10/keygen.c (gen_elg): update default from 2048 to 3072. +* g10/keyid.c (pubkey_string): update comment so that first example +is the default 3072-bit RSA. + +-- + +3072-bit RSA is widely considered to be 128-bit-equivalent security. +This is a sensible default in 2017. + +Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net> + +(cherry picked from commit 909fbca19678e6e36968607e8a2348381da39d8c) +--- + agent/command.c | 2 +- + doc/wks.texi | 4 ++-- + g10/keygen.c | 2 +- + g10/keyid.c | 4 ++-- + 4 files changed, 6 insertions(+), 6 deletions(-) + +Patch-Source: https://sources.debian.org/data/main/g/gnupg2/2.2.27-2/debian/patches/from-master/gpg-default-to-3072-bit-keys.patch + +diff --git a/agent/command.c b/agent/command.c +index 8642498..f94e770 100644 +--- a/agent/command.c ++++ b/agent/command.c +@@ -843,7 +843,7 @@ static const char hlp_genkey[] = + "\n" + " C: GENKEY\n" + " S: INQUIRE KEYPARAM\n" +- " C: D (genkey (rsa (nbits 2048)))\n" ++ " C: D (genkey (rsa (nbits 3072)))\n" + " C: END\n" + " S: D (public-key\n" + " S: D (rsa (n 326487324683264) (e 10001)))\n" +diff --git a/doc/wks.texi b/doc/wks.texi +index 119e31c..ae6c310 100644 +--- a/doc/wks.texi ++++ b/doc/wks.texi +@@ -412,10 +412,10 @@ the submission address: + The output of the last command looks similar to this: + + @example +- sec rsa2048 2016-08-30 [SC] ++ sec rsa3072 2016-08-30 [SC] + C0FCF8642D830C53246211400346653590B3795B + uid [ultimate] key-submission@@example.net +- ssb rsa2048 2016-08-30 [E] ++ ssb rsa3072 2016-08-30 [E] + @end example + + Take the fingerprint from that output and manually publish the key: +diff --git a/g10/keygen.c b/g10/keygen.c +index d50acf8..79d4579 100644 +--- a/g10/keygen.c ++++ b/g10/keygen.c +@@ -1436,7 +1436,7 @@ gen_elg (int algo, unsigned int nbits, KBNODE pub_root, + + if (nbits < 1024) + { +- nbits = 2048; ++ nbits = 3072; + log_info (_("keysize invalid; using %u bits\n"), nbits ); + } + else if (nbits > 4096) +diff --git a/g10/keyid.c b/g10/keyid.c +index 69d85da..2987287 100644 +--- a/g10/keyid.c ++++ b/g10/keyid.c +@@ -73,7 +73,7 @@ pubkey_letter( int algo ) + is copied to the supplied buffer up a length of BUFSIZE-1. + Examples for the output are: + +- "rsa2048" - RSA with 2048 bit ++ "rsa3072" - RSA with 3072 bit + "elg1024" - Elgamal with 1024 bit + "ed25519" - ECC using the curve Ed25519. + "E_1.2.3.4" - ECC using the unsupported curve with OID "1.2.3.4". +@@ -83,7 +83,7 @@ pubkey_letter( int algo ) + If the option --legacy-list-mode is active, the output use the + legacy format: + +- "2048R" - RSA with 2048 bit ++ "3072R" - RSA with 3072 bit + "1024g" - Elgamal with 1024 bit + "256E" - ECDSA using a curve with 256 bit + diff --git a/repo/gnupg/0320-gpg-default-to-aes256.patch b/repo/gnupg/0320-gpg-default-to-aes256.patch new file mode 100644 index 0000000..2d9a90f --- /dev/null +++ b/repo/gnupg/0320-gpg-default-to-aes256.patch @@ -0,0 +1,37 @@ +From: Daniel Kahn Gillmor <dkg@fifthhorseman.net> +Date: Thu, 7 Sep 2017 19:04:00 -0400 +Subject: gpg: default to AES-256. + +* g10/main.h (DEFAULT_CIPHER_ALGO): Prefer AES256 by default. + +-- + +It's 2017, and pretty much everyone has AES-256 available. Symmetric +crypto is also rarely the bottleneck (asymmetric crypto is much more +expensive). AES-256 provides some level of protection against +large-scale decryption efforts, and longer key lengths provide a hedge +against unforseen cryptanalysis. + +Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net> +(cherry picked from commit 73ff075204df09db5248170a049f06498cdbb7aa) +--- + g10/main.h | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +Patch-Source: https://sources.debian.org/data/main/g/gnupg2/2.2.27-2/debian/patches/from-master/gpg-default-to-AES-256.patch + +diff --git a/g10/main.h b/g10/main.h +index 68360e2..1983e42 100644 +--- a/g10/main.h ++++ b/g10/main.h +@@ -31,7 +31,9 @@ + (i.e. uncompressed) rather than 1 (zip). However, the real world + issues of speed and size come into play here. */ + +-#if GPG_USE_AES128 ++#if GPG_USE_AES256 ++# define DEFAULT_CIPHER_ALGO CIPHER_ALGO_AES256 ++#elif GPG_USE_AES128 + # define DEFAULT_CIPHER_ALGO CIPHER_ALGO_AES + #elif GPG_USE_CAST5 + # define DEFAULT_CIPHER_ALGO CIPHER_ALGO_CAST5 diff --git a/repo/gnupg/0330-gpg-default-to-sha512-for-all-signature-types-on-rsa-keys.patch b/repo/gnupg/0330-gpg-default-to-sha512-for-all-signature-types-on-rsa-keys.patch new file mode 100644 index 0000000..75c5b73 --- /dev/null +++ b/repo/gnupg/0330-gpg-default-to-sha512-for-all-signature-types-on-rsa-keys.patch @@ -0,0 +1,66 @@ +From: Daniel Kahn Gillmor <dkg@fifthhorseman.net> +Date: Thu, 7 Sep 2017 18:49:35 -0400 +Subject: gpg: Default to SHA-512 for all signature types on RSA keys. + +* g10/main.h (DEFAULT_DIGEST_ALGO): Use SHA512 instead of SHA256 in +--gnupg mode (leave strict RFC and PGP modes alone). +* configure.ac: Do not allow disabling sha512. +* g10/misc.c (map_md_openpgp_to_gcry): Always support SHA512. + +-- + +SHA512 is more performant on most 64-bit platforms than SHA256, and +offers a better security margin. It is also widely implemented. + +Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net> +--- + configure.ac | 2 +- + g10/main.h | 2 +- + g10/misc.c | 5 +---- + 3 files changed, 3 insertions(+), 6 deletions(-) + +Patch-Source: https://sources.debian.org/data/main/g/gnupg2/2.2.27-2/debian/patches/update-defaults/gpg-Default-to-SHA-512-for-all-signature-types-on-RS.patch + +diff --git a/configure.ac b/configure.ac +index 2d8b050..4b9d908 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -317,7 +317,7 @@ GNUPG_GPG_DISABLE_ALGO([rmd160],[RIPE-MD160 hash]) + GNUPG_GPG_DISABLE_ALGO([sha224],[SHA-224 hash]) + # SHA256 is a MUST algorithm for GnuPG. + GNUPG_GPG_DISABLE_ALGO([sha384],[SHA-384 hash]) +-GNUPG_GPG_DISABLE_ALGO([sha512],[SHA-512 hash]) ++# SHA512 is a MUST algorithm for GnuPG. + + + # Allow disabling of zip support. +diff --git a/g10/main.h b/g10/main.h +index 1983e42..388eae3 100644 +--- a/g10/main.h ++++ b/g10/main.h +@@ -41,7 +41,7 @@ + # define DEFAULT_CIPHER_ALGO CIPHER_ALGO_3DES + #endif + +-#define DEFAULT_DIGEST_ALGO ((GNUPG)? DIGEST_ALGO_SHA256:DIGEST_ALGO_SHA1) ++#define DEFAULT_DIGEST_ALGO ((GNUPG)? DIGEST_ALGO_SHA512:DIGEST_ALGO_SHA1) + #define DEFAULT_S2K_DIGEST_ALGO DIGEST_ALGO_SHA1 + #ifdef HAVE_ZIP + # define DEFAULT_COMPRESS_ALGO COMPRESS_ALGO_ZIP +diff --git a/g10/misc.c b/g10/misc.c +index 634d303..6fc2d58 100644 +--- a/g10/misc.c ++++ b/g10/misc.c +@@ -849,11 +849,8 @@ map_md_openpgp_to_gcry (digest_algo_t algo) + case DIGEST_ALGO_SHA384: return 0; + #endif + +-#ifdef GPG_USE_SHA512 + case DIGEST_ALGO_SHA512: return GCRY_MD_SHA512; +-#else +- case DIGEST_ALGO_SHA512: return 0; +-#endif ++ + default: return 0; + } + } diff --git a/repo/gnupg/0340-gpg-prefer-sha512-and-sha384-in-personal-digest.patch b/repo/gnupg/0340-gpg-prefer-sha512-and-sha384-in-personal-digest.patch new file mode 100644 index 0000000..bac31b3 --- /dev/null +++ b/repo/gnupg/0340-gpg-prefer-sha512-and-sha384-in-personal-digest.patch @@ -0,0 +1,48 @@ +From: Daniel Kahn Gillmor <dkg@fifthhorseman.net> +Date: Wed, 3 Jan 2018 12:34:26 -0500 +Subject: gpg: Prefer SHA-512 and SHA-384 in personal-digest-preferences. + +* g10/keygen.c (keygen_set_std_prefs): prefer SHA-512 +and SHA-384 by default. + +-- + +In 8ede3ae29a39641a2f98ad9a4cf61ea99085a892, upstream changed the +defaults for --default-preference-list to advertise a preference for +SHA-512, without touching --personal-digest-preferences. This makes +the same change for --personal-digest-preferences, since every modern +OpenPGP library supports them all. + +Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net> +--- + g10/keygen.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +Patch-Source: https://sources.debian.org/data/main/g/gnupg2/2.2.27-2/debian/patches/update-defaults/gpg-Prefer-SHA-512-and-SHA-384-in-personal-digest.patch + +diff --git a/g10/keygen.c b/g10/keygen.c +index 79d4579..cb92468 100644 +--- a/g10/keygen.c ++++ b/g10/keygen.c +@@ -391,16 +391,16 @@ keygen_set_std_prefs (const char *string,int personal) + if (personal) + { + /* The default internal hash algo order is: +- * SHA-256, SHA-384, SHA-512, SHA-224, SHA-1. ++ * SHA-512, SHA-384, SHA-256, SHA-224, SHA-1. + */ +- if (!openpgp_md_test_algo (DIGEST_ALGO_SHA256)) +- strcat (dummy_string, "H8 "); ++ if (!openpgp_md_test_algo (DIGEST_ALGO_SHA512)) ++ strcat (dummy_string, "H10 "); + + if (!openpgp_md_test_algo (DIGEST_ALGO_SHA384)) + strcat (dummy_string, "H9 "); + +- if (!openpgp_md_test_algo (DIGEST_ALGO_SHA512)) +- strcat (dummy_string, "H10 "); ++ if (!openpgp_md_test_algo (DIGEST_ALGO_SHA256)) ++ strcat (dummy_string, "H8 "); + } + else + { diff --git a/repo/gnupg/0410-make-gpg-zip-use-tar-from-path.patch b/repo/gnupg/0410-make-gpg-zip-use-tar-from-path.patch new file mode 100644 index 0000000..b0d619e --- /dev/null +++ b/repo/gnupg/0410-make-gpg-zip-use-tar-from-path.patch @@ -0,0 +1,29 @@ +From: Daniel Kahn Gillmor <dkg@fifthhorseman.net> +Date: Sun, 18 Nov 2018 17:29:52 -0500 +Subject: Make gpg-zip use tar from $PATH + +Apparently there is no clean way to configure this from ./configure, +and upstream is deprecating gpg-zip anyway. So just force-set tar to +be manually "tar" (meaning, that we should look in the $PATH at +runtime). + +See also https://dev.gnupg.org/T4251 and https://bugs.debian.org/913582 +--- + tools/gpg-zip.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Patch-Source: https://sources.debian.org/data/main/g/gnupg2/2.2.27-2/debian/patches/Make-gpg-zip-use-tar-from-PATH.patch + +diff --git a/tools/gpg-zip.in b/tools/gpg-zip.in +index 9047e36..3821f3a 100644 +--- a/tools/gpg-zip.in ++++ b/tools/gpg-zip.in +@@ -23,7 +23,7 @@ + # the GNU or POSIX variant of USTAR. + + VERSION=@VERSION@ +-TAR=@TAR@ ++TAR=tar + GPG=gpg + + usage="\ diff --git a/repo/gnupg/0420-gpg-drop-import-clean-from-default-keyserver-import-options.patch b/repo/gnupg/0420-gpg-drop-import-clean-from-default-keyserver-import-options.patch new file mode 100644 index 0000000..46f2316 --- /dev/null +++ b/repo/gnupg/0420-gpg-drop-import-clean-from-default-keyserver-import-options.patch @@ -0,0 +1,51 @@ +From: Daniel Kahn Gillmor <dkg@fifthhorseman.net> +Date: Mon, 15 Jul 2019 16:24:35 -0400 +Subject: gpg: drop import-clean from default keyserver import options + +* g10/gpg.c (main): drop IMPORT_CLEAN from the +default opt.keyserver_options.import_options +* doc/gpg.texi: reflect this change in the documentation + +Given that SELF_SIGS_ONLY is already set, it's not clear what +additional benefit IMPORT_CLEAN provides. Furthermore, IMPORT_CLEAN +means that receiving an OpenPGP certificate from a keyserver will +potentially delete data that is otherwise held in the local keyring, +which is surprising to users who expect retrieval from the keyservers +to be purely additive. + +GnuPG-Bug-Id: 4628 +Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net> +--- + doc/gpg.texi | 2 +- + g10/gpg.c | 3 +-- + 2 files changed, 2 insertions(+), 3 deletions(-) + +Patch-Source: https://sources.debian.org/data/main/g/gnupg2/2.2.27-2/debian/patches/gpg-drop-import-clean-from-default-keyserver-import-optio.patch + +diff --git a/doc/gpg.texi b/doc/gpg.texi +index 7b603d7..104318a 100644 +--- a/doc/gpg.texi ++++ b/doc/gpg.texi +@@ -1982,7 +1982,7 @@ are available for all keyserver types, some common options are: + + @end table + +-The default list of options is: "self-sigs-only, import-clean, ++The default list of options is: "self-sigs-only, + repair-keys, repair-pks-subkey-bug, export-attributes, + honor-pka-record". + +diff --git a/g10/gpg.c b/g10/gpg.c +index 6b44cfb..caa0487 100644 +--- a/g10/gpg.c ++++ b/g10/gpg.c +@@ -2348,8 +2348,7 @@ main (int argc, char **argv) + opt.export_options = EXPORT_ATTRIBUTES; + opt.keyserver_options.import_options = (IMPORT_REPAIR_KEYS + | IMPORT_REPAIR_PKS_SUBKEY_BUG +- | IMPORT_SELF_SIGS_ONLY +- | IMPORT_CLEAN); ++ | IMPORT_SELF_SIGS_ONLY); + opt.keyserver_options.export_options = EXPORT_ATTRIBUTES; + opt.keyserver_options.options = KEYSERVER_HONOR_PKA_RECORD; + opt.verify_options = (LIST_SHOW_UID_VALIDITY diff --git a/repo/gnupg/60-scdaemon.rules b/repo/gnupg/60-scdaemon.rules new file mode 100644 index 0000000..55ca5c1 --- /dev/null +++ b/repo/gnupg/60-scdaemon.rules @@ -0,0 +1,63 @@ +# do not edit this file, it will be overwritten on update + +SUBSYSTEM!="usb", GOTO="gnupg_rules_end" +ACTION!="add", GOTO="gnupg_rules_end" + +# USB SmartCard Readers +## Cherry GmbH (XX33, ST2000) +ATTR{idVendor}=="046a", ATTR{idProduct}=="0005", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg", GROUP+="gnupg" +ATTR{idVendor}=="046a", ATTR{idProduct}=="0010", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg", GROUP+="gnupg" +ATTR{idVendor}=="046a", ATTR{idProduct}=="003e", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg", GROUP+="gnupg" +## SCM Microsystems, Inc (SCR331-DI, SCR335, SCR3320, SCR331, SCR3310 and SPR532) +ATTR{idVendor}=="04e6", ATTR{idProduct}=="5111", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg", GROUP+="gnupg" +ATTR{idVendor}=="04e6", ATTR{idProduct}=="5115", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg", GROUP+="gnupg" +ATTR{idVendor}=="04e6", ATTR{idProduct}=="5116", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg", GROUP+="gnupg" +ATTR{idVendor}=="04e6", ATTR{idProduct}=="5117", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg", GROUP+="gnupg" +ATTR{idVendor}=="04e6", ATTR{idProduct}=="e001", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg", GROUP+="gnupg" +ATTR{idVendor}=="04e6", ATTR{idProduct}=="e003", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg", GROUP+="gnupg" +## Omnikey AG (CardMan 3821, CardMan 6121) +ATTR{idVendor}=="076b", ATTR{idProduct}=="3821", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg", GROUP+="gnupg" +ATTR{idVendor}=="076b", ATTR{idProduct}=="6622", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg", GROUP+="gnupg" +## Gemalto +ATTR{idVendor}=="08e6", ATTR{idProduct}=="3437", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg", GROUP+="gnupg" +ATTR{idVendor}=="08e6", ATTR{idProduct}=="3438", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg", GROUP+="gnupg" +ATTR{idVendor}=="08e6", ATTR{idProduct}=="3478", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg", GROUP+="gnupg" +ATTR{idVendor}=="08e6", ATTR{idProduct}=="34c2", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg", GROUP+="gnupg" +ATTR{idVendor}=="08e6", ATTR{idProduct}=="34ec", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg", GROUP+="gnupg" +## Reiner (SCT cyberJack) +ATTR{idVendor}=="0c4b", ATTR{idProduct}=="0500", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg", GROUP+="gnupg" +## Kobil (KAAN) +ATTR{idVendor}=="0d46", ATTR{idProduct}=="2012", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg", GROUP+="gnupg" +## VASCO (DIGIPASS 920) +ATTR{idVendor}=="1a44", ATTR{idProduct}=="0920", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg", GROUP+="gnupg" +## Crypto Stick +ATTR{idVendor}=="20a0", ATTR{idProduct}=="4107", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg", GROUP+="gnupg" +## Nitrokey +ATTR{idVendor}=="20a0", ATTR{idProduct}=="4108", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg", GROUP+="gnupg" +ATTR{idVendor}=="20a0", ATTR{idProduct}=="4109", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg", GROUP+="gnupg" +ATTR{idVendor}=="20a0", ATTR{idProduct}=="4211", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg", GROUP+="gnupg" +## Gnuk Token +ATTR{idVendor}=="234b", ATTR{idProduct}=="0000", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg", GROUP+="gnupg" +## Alcor Micro Corp cardreader (in ThinkPad X250) +ATTR{idVendor}=="058f", ATTR{idProduct}=="9540", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg", GROUP+="gnupg" +## Fujitsu Siemens +ATTR{idVendor}=="0bf8", ATTR{idProduct}=="1006", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg", GROUP+="gnupg" +## Yubico +# Yubikey NEO OTP+CCID +ATTRS{idVendor}=="1050", ATTRS{idProduct}=="0111", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg", GROUP+="gnupg" +# Yubikey NEO CCID +ATTRS{idVendor}=="1050", ATTRS{idProduct}=="0112", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg", GROUP+="gnupg" +# Yubikey NEO U2F+CCID +ATTRS{idVendor}=="1050", ATTRS{idProduct}=="0115", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg", GROUP+="gnupg" +# Yubikey NEO OTP+U2F+CCID +ATTRS{idVendor}=="1050", ATTRS{idProduct}=="0116", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg", GROUP+="gnupg" +# Yubikey 4 CCID +ATTRS{idVendor}=="1050", ATTRS{idProduct}=="0404", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg", GROUP+="gnupg" +# Yubikey 4 OTP+CCID +ATTRS{idVendor}=="1050", ATTRS{idProduct}=="0405", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg", GROUP+="gnupg" +# Yubikey 4 U2F+CCID +ATTRS{idVendor}=="1050", ATTRS{idProduct}=="0406", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg", GROUP+="gnupg" +# Yubikey 4 OTP+U2F+CCID +ATTRS{idVendor}=="1050", ATTRS{idProduct}=="0407", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg", GROUP+="gnupg" + +LABEL="gnupg_rules_end" diff --git a/repo/gnupg/fix-i18n.patch b/repo/gnupg/fix-i18n.patch new file mode 100644 index 0000000..90fc033 --- /dev/null +++ b/repo/gnupg/fix-i18n.patch @@ -0,0 +1,12 @@ +--- gnupg-2.1.7/common/i18n.c.orig 2015-08-31 20:40:18.752742866 +0300 ++++ gnupg-2.1.7/common/i18n.c 2015-08-31 20:40:41.806336224 +0300 +@@ -85,8 +85,8 @@ + bindtextdomain (PACKAGE_GT, gnupg_localedir ()); + textdomain (PACKAGE_GT); + #else +-# ifdef ENABLE_NLS + setlocale (LC_ALL, "" ); ++# ifdef ENABLE_NLS + bindtextdomain (PACKAGE_GT, gnupg_localedir ()); + textdomain (PACKAGE_GT); + # endif diff --git a/repo/gnupg/gnupg-scdaemon.pre-install b/repo/gnupg/gnupg-scdaemon.pre-install new file mode 100644 index 0000000..b0cac4c --- /dev/null +++ b/repo/gnupg/gnupg-scdaemon.pre-install @@ -0,0 +1,4 @@ +#!/bin/sh +addgroup -S gnupg 2> /dev/null + +exit 0 diff --git a/repo/gnupg/gnupg.xibuild b/repo/gnupg/gnupg.xibuild new file mode 100644 index 0000000..95ffa44 --- /dev/null +++ b/repo/gnupg/gnupg.xibuild @@ -0,0 +1,73 @@ +#!/bin/sh + +NAME="gnupg" +DESC="GNU Privacy Guard 2 - meta package for full GnuPG suite" + +MAKEDEPS=" autoconf automake bzip2 gettext gnutls libassuan libgcrypt libgpg-error libksba libtool libusb npth openldap pinentry sqlite texinfo zlib" + +PKG_VER=2.2.34 +SOURCE="https://gnupg.org/ftp/gcrypt/gnupg/gnupg-$PKG_VER.tar.bz2" + +ADDITIONAL=" +0001-Include-sys-select.h-for-FD_SETSIZE.patch +0010-avoid-beta-warning.patch +0020-avoid-regenerating-defsincdate-use-shipped-file.patch +0110-avoid-simple-memory-dumps-via-ptrace.patch +0210-dirmngr-hkp-avoid-potential-race-condition-when-some-host-die.patch +0220-dirmngr-avoid-need-for-hkp-housekeeping.patch +0230-dirmngr-avoid-automatically-checking-upstream-swdb.patch +0310-gpg-default-to-3072-bit-keys.patch +0320-gpg-default-to-aes256.patch +0330-gpg-default-to-sha512-for-all-signature-types-on-rsa-keys.patch +0340-gpg-prefer-sha512-and-sha384-in-personal-digest.patch +0410-make-gpg-zip-use-tar-from-path.patch +0420-gpg-drop-import-clean-from-default-keyserver-import-options.patch +60-scdaemon.rules +fix-i18n.patch +gnupg-scdaemon.pre-install +" + +prepare() { + apply_patches + + autoreconf -vif +} + +build() { + ./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --localstatedir=/var \ + --disable-nls \ + --enable-bzip2 \ + --enable-tofu \ + --enable-scdaemon \ + --enable-ccid-driver + make +} + +check() { + make check +} + +package() { + make DESTDIR="$PKG_DEST" install + + install -m755 tools/gpg-zip "$PKG_DEST"/usr/bin/gpg-zip + install -Dm644 -t "$PKG_DEST"/lib/udev/rules.d/ "$BUILD_ROOT"/60-scdaemon.rules + + cd "$PKG_DEST" + + # install compat symlink + ln -s gpg usr/bin/gpg2 + ln -s gpgv usr/bin/gpgv2 + + # Remove docs for systemd-user + rm -rf usr/share/doc/gnupg/examples/systemd-user + + # Remove gpg scheme interpreter - an internal tool used in gpg tests + rm -rf usr/bin/gpgscm +} + diff --git a/repo/i3wm/i3wm.xibuild b/repo/i3wm/i3wm.xibuild new file mode 100644 index 0000000..db71c03 --- /dev/null +++ b/repo/i3wm/i3wm.xibuild @@ -0,0 +1,20 @@ +#!/bin/sh + +NAME="i3wm" +DESC="Improved dynamic tiling window manager" + +MAKEDEPS=" meson bash bison cairo flex libev libxcb libxkbcommon pango pcre perl startup-notification xcb-util-cursor xcb-util-keysyms xcb-util-wm xcb-util-xrm yajl" + +PKG_VER=4.20.1 +SOURCE="https://i3wm.org/downloads/i3-$PKG_VER.tar.xz" + +build() { + meson --prefix=/usr \ + . output + meson compile ${JOBS:+-j ${JOBS}} -C output +} + +package() { + DESTDIR="$PKG_DEST" meson install --no-rebuild -C output +} + diff --git a/repo/icewm/icewm.xibuild b/repo/icewm/icewm.xibuild new file mode 100644 index 0000000..3ecdf11 --- /dev/null +++ b/repo/icewm/icewm.xibuild @@ -0,0 +1,27 @@ +#!/bin/sh + +NAME="icewm" +DESC="Window manager designed for speed, usability and consistency" + +MAKEDEPS=" alsa-lib asciidoctor cmake fribidi glib imlib2 libao libintl libsm libsndfile libxcomposite libxdamage libxft libxinerama libxpm libxrandr perl librsvg" + +PKG_VER=2.9.6 +SOURCE="https://github.com/ice-wm/icewm/releases/download/$PKG_VER/icewm-$PKG_VER.tar.lz" + +build() { + cmake -B build \ + -DCMAKE_BUILD_TYPE=None \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCFGDIR=/etc \ + -DENABLE_NLS=OFF \ + -DCONFIG_IMLIB2=ON \ + -DENABLE_LTO=ON \ + -DDOCDIR=/usr/share/doc/icewm \ + -DCONFIG_LIBRSVG=ON + cmake --build build +} + +package() { + DESTDIR="$PKG_DEST" cmake --build build --target install +} + diff --git a/repo/imagemagick/imagemagick.xibuild b/repo/imagemagick/imagemagick.xibuild new file mode 100644 index 0000000..20fd5cc --- /dev/null +++ b/repo/imagemagick/imagemagick.xibuild @@ -0,0 +1,58 @@ +#!/bin/sh + +NAME="imagemagick" +DESC="Collection of tools and libraries for many image formats" + +MAKEDEPS="chrpath fontconfig freetype ghostscript lcms2 libheif libjpeg-turbo libpng libjxl libtool libwebp libx11 libxext libxml2 perl tiff zlib librsvg" + +PKG_VER=7.1.0.30 +version=${PKG_VER%.*}-${PKG_VER##*.} +SOURCE="https://download.imagemagick.org/ImageMagick/download/releases/ImageMagick-$version.tar.xz" + +build() { + + # fix doc dir, Gentoo bug 91911 + sed -i -e \ + 's:DOCUMENTATION_PATH="$DATA_DIR/doc/$DOCUMENTATION_RELATIVE_PATH":DOCUMENTATION_PATH="/usr/share/doc/imagemagick":g' \ + configure + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --enable-static \ + --disable-openmp \ + --with-threads \ + --with-x \ + --with-jxl \ + --with-tiff \ + --with-rsvg \ + --with-png \ + --with-webp \ + --with-gslib \ + --with-gs-font-dir=/usr/share/fonts/Type1 \ + --with-heic \ + --with-modules \ + --with-xml \ + --with-perl \ + --with-perl-options="PREFIX=/usr INSTALLDIRS=vendor" + make +} + +check() { + make check +} + +package() { + make -j1 DESTDIR="$PKG_DEST" install + if ! [ -e "$PKG_DEST"/usr/lib/libMagickCore-7.Q16HDRI.so ]; then + echo "Has ABI verision changed? (current is 7)" + return 1 + fi + + find "$PKG_DEST" \( -name '.packlist' -o -name 'perllocal.pod' \ + -o -name '*.bs' \) -delete +} + diff --git a/repo/jack/fix-execinfo.patch b/repo/jack/fix-execinfo.patch new file mode 100644 index 0000000..24218ae --- /dev/null +++ b/repo/jack/fix-execinfo.patch @@ -0,0 +1,24 @@ +--- jack-1.9.10.orig/dbus/sigsegv.c ++++ jack-1.9.10/dbus/sigsegv.c +@@ -11,6 +11,8 @@ + * Copyright (C) 2005 - 2008 Jaco Kroon + */ + ++#ifdef __GLIBC__ ++ + #if defined(HAVE_CONFIG_H) + #include "config.h" + #endif +@@ -209,4 +211,12 @@ + static void __attribute((constructor)) init(void) { + setup_sigsegv(); + } ++#endif ++ ++#else ++ ++int setup_sigsegv() { ++ return 1; ++} ++ + #endif diff --git a/repo/jack/increase-api-version.patch b/repo/jack/increase-api-version.patch new file mode 100644 index 0000000..78b07ef --- /dev/null +++ b/repo/jack/increase-api-version.patch @@ -0,0 +1,16 @@ +jack's low API version (so:libjack.so.0.1.0) makes apk prefer pipewire-jack over jack +We don't want this, users need to explicitly tell users they prefer pipewire-jack, so we increase the API version here to be always higher than pipewire-jack + +diff --git a/wscript b/wscript +index e0d32c8d..2c0a7123 100644 +--- a/wscript ++++ b/wscript +@@ -13,7 +13,7 @@ from waflib.Build import BuildContext, CleanContext, InstallContext, UninstallCo + + VERSION='1.9.20' + APPNAME='jack' +-JACK_API_VERSION = '0.1.0' ++JACK_API_VERSION = '0.999.0' + + # these variables are mandatory ('/' are converted automatically) + top = '.' diff --git a/repo/jack/jack.xibuild b/repo/jack/jack.xibuild new file mode 100644 index 0000000..04ad8c0 --- /dev/null +++ b/repo/jack/jack.xibuild @@ -0,0 +1,34 @@ +#!/bin/sh + +NAME="jack" +DESC="The Jack Audio Connection Kit" + +MAKEDEPS="alsa-lib dbus expat libsamplerate libsndfile ncurses readline python linux-headers" + +PKG_VER=1.9.20 +SOURCE="https://github.com/jackaudio/jack2/archive/v$PKG_VER/jack2-v$PKG_VER.tar.gz" + +ADDITIONAL=" +fix-execinfo.patch +increase-api-version.patch +" +prepare () { + apply_patches +} + +build() { + ./waf configure \ + --prefix=/usr \ + --mandir=/usr/share/man/man1 \ + --libdir=/usr/lib \ + --dbus \ + --alsa \ + --classic + + ./waf build -v +} + +package() { + ./waf --destdir="$PKG_DEST" install +} + diff --git a/repo/jbig2dec/jbig2dec.xibuild b/repo/jbig2dec/jbig2dec.xibuild new file mode 100644 index 0000000..3d5e645 --- /dev/null +++ b/repo/jbig2dec/jbig2dec.xibuild @@ -0,0 +1,27 @@ +#!/bin/sh + +NAME="jbig2dec" +DESC="JBIG2 image compression format decoder" + +MAKEDEPS="autoconf automake libtool" + +PKG_VER=0.19 +SOURCE="https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/$_gsver/jbig2dec-$PKG_VER.tar.gz" + +build() { + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --localstatedir=/var \ + --without-libpng + make +} + +package() { + make DESTDIR="$PKG_DEST" install +} + diff --git a/repo/js91/fix-i386-fdlibm.patch b/repo/js91/fix-i386-fdlibm.patch new file mode 100644 index 0000000..831e5e0 --- /dev/null +++ b/repo/js91/fix-i386-fdlibm.patch @@ -0,0 +1,18 @@ +# error: typedef redefinition with different types ('__double_t' (aka 'double') vs 'long double') +# https://bugzilla.mozilla.org/show_bug.cgi?id=1729459 + +--- a/modules/fdlibm/src/math_private.h ++++ b/modules/fdlibm/src/math_private.h +@@ -30,7 +30,12 @@ + * Adapted from https://github.com/freebsd/freebsd-src/search?q=__double_t + */ + ++#if defined(__linux__) && defined(__i386__) ++// rely on glibc's double_t ++typedef long double __double_t; ++#else + typedef double __double_t; ++#endif + typedef __double_t double_t; + + /* diff --git a/repo/js91/fix-musl-build.patch b/repo/js91/fix-musl-build.patch new file mode 100644 index 0000000..af39467 --- /dev/null +++ b/repo/js91/fix-musl-build.patch @@ -0,0 +1,16 @@ +Upstream: No +Reason: mozjs60 miscompiles on musl if built with HAVE_THREAD_TLS_KEYWORD: +https://github.com/void-linux/void-packages/issues/2598 +diff --git a/js/src/old-configure.in b/js/src/old-configure.in +--- a/js/src/old-configure.in ++++ b/js/src/old-configure.in +@@ -1272,6 +1272,9 @@ + *-android*|*-linuxandroid*) + : + ;; ++ *-musl*) ++ : ++ ;; + *) + AC_DEFINE(HAVE_THREAD_TLS_KEYWORD) + ;; diff --git a/repo/js91/fix-rust-target.patch b/repo/js91/fix-rust-target.patch new file mode 100644 index 0000000..4d8918a --- /dev/null +++ b/repo/js91/fix-rust-target.patch @@ -0,0 +1,28 @@ +commit 34b3ac3195a40757bc5f51a1db5a47a4b18c68b5 +Author: Daniel Kolesa <daniel@octaforge.org> +Date: Sun Jan 23 21:13:38 2022 +0100 + + bypass rust triplet checks and just force ours + +diff --git a/build/moz.configure/rust.configure b/build/moz.configure/rust.configure +index cd77d72b..0c03cab7 100644 +--- a/build/moz.configure/rust.configure ++++ b/build/moz.configure/rust.configure +@@ -261,7 +261,7 @@ def rust_supported_targets(rustc): + data.setdefault(key, []).append(namespace(rust_target=t, target=info)) + return data + +- ++@imports("os") + def detect_rustc_target( + host_or_target, compiler_info, arm_target, rust_supported_targets + ): +@@ -383,7 +383,7 @@ def detect_rustc_target( + + return None + +- rustc_target = find_candidate(candidates) ++ rustc_target = os.environ["RUST_TARGET"] + + if rustc_target is None: + die("Don't know how to translate {} for rustc".format(host_or_target.alias)) diff --git a/repo/js91/js91.xibuild b/repo/js91/js91.xibuild new file mode 100644 index 0000000..1f1906e --- /dev/null +++ b/repo/js91/js91.xibuild @@ -0,0 +1,75 @@ +#!/bin/sh + +NAME="js91" +DESC="Standalone Mozilla JavaScript engine (91 ESR)" + +MAKEDEPS="icu libffi nspr readline autoconf2-13 cargo clang linux-headers lld llvm perl python rust sed zlib" + +PKG_VER=91.8.0 +SOURCE="https://ftp.mozilla.org/pub/firefox/releases/${PKG_VER}esr/source/firefox-${PKG_VER}esr.source.tar.xz" + +ADDITIONAL=" +fix-i386-fdlibm.patch +fix-musl-build.patch +fix-rust-target.patch +" + +prepare() { + apply_patches + mkdir "$BUILD_ROOT/mozbuild" + + cat > .mozconfig <<- END + ac_add_options --enable-application=js + mk_add_options MOZ_OBJDIR='${PWD}'/obj + ac_add_options --prefix=/usr + ac_add_options --enable-release + ac_add_options --enable-hardening + ac_add_options --enable-optimize="$CFLAGS -O2" + ac_add_options --enable-rust-simd + ac_add_options --enable-linker=lld + ac_add_options --disable-bootstrap + ac_add_options --disable-debug + ac_add_options --disable-debug-symbols + ac_add_options --disable-jemalloc + ac_add_options --disable-strip + + # System libraries + ac_add_options --with-system-zlib + ac_add_options --with-system-icu + + # Features + ac_add_options --enable-readline + ac_add_options --enable-shared-js + ac_add_options --enable-tests + ac_add_options --with-intl-api + END +} + +build() { + export LDFLAGS="$LDFLAGS -Wl,-z,stack-size=1048576" + + # FF doesn't have SIMD available on armhf/v7 + echo 'ac_add_options --enable-rust-simd' >> .mozconfig + + export MACH_USE_SYSTEM_PYTHON=1 + export MOZBUILD_STATE_PATH="$BUILD_ROOT/mozbuild" + export MOZ_NOSPAM=1 + export PYTHON=/usr/bin/python + export SHELL=/bin/ash + + ./mach build +} + +check() { + obj/dist/bin/jsapi-tests \ + --format=none \ + --exclude-random \ + basic +} + +package() { + cd obj + make DESTDIR="$PKG_DEST" install + rm -f "$PKG_DEST"/usr/lib/*.ajs +} + diff --git a/repo/jwm/jwm.xibuild b/repo/jwm/jwm.xibuild new file mode 100644 index 0000000..0674831 --- /dev/null +++ b/repo/jwm/jwm.xibuild @@ -0,0 +1,28 @@ +#!/bin/sh + +NAME="jwm" +DESC="A lightweight window manager for the X11 Window System" + +MAKEDEPS=" libx11 libxext libxft libxmu libxinerama libxpm libxrender libjpeg-turbo libpng librsvg pango" + +PKG_VER=2.4.1 +SOURCE="http://joewing.net/projects/jwm/releases/jwm-$PKG_VER.tar.xz" + +prepare() { + # not replaced for some reason.. + sed -i "s|@mkdir_p@|mkdir -p|g" \ + po/Makefile.in.in +} + +build() { + ./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --disable-rpath + make +} + +package() { + make DESTDIR="$PKG_DEST" install +} + diff --git a/repo/libassuan/libassuan.xibuild b/repo/libassuan/libassuan.xibuild new file mode 100644 index 0000000..27dd153 --- /dev/null +++ b/repo/libassuan/libassuan.xibuild @@ -0,0 +1,24 @@ +#!/bin/sh + +NAME="libassuan" +DESC="IPC library used by some GnuPG related software" + +MAKEDEPS=" libgpg-error" + +PKG_VER=2.5.5 +SOURCE="https://www.gnupg.org/ftp/gcrypt/libassuan/libassuan-$PKG_VER.tar.bz2" + +build() { + ./configure \ + --prefix=/usr + make +} + +check() { + make check +} + +package() { + make DESTDIR="$PKG_DEST" install +} + diff --git a/repo/libcanberra/libcanberra.xibuild b/repo/libcanberra/libcanberra.xibuild index 7ae4a6b..40e5c16 100644 --- a/repo/libcanberra/libcanberra.xibuild +++ b/repo/libcanberra/libcanberra.xibuild @@ -3,31 +3,31 @@ NAME="libcanberra" DESC="Simple audio library for GTK applications" -MAKEDEPS="make " -DEPS="eudev libvorbis musl libtool " +MAKEDEPS="alsa-lib eudev gtk2 gtk3 libogg libtool libvorbis pulseaudio" PKG_VER=0.30 SOURCE="https://dev.alpinelinux.org/archive/libcanberra/libcanberra-$PKG_VER.tar.xz" -ADDITIONAL="fix-build-with-no-lynx-installed.patch dont-assume-all-GdkDisplays-are-GdkX11Displays.patch " -prepare () { +ADDITIONAL=" +dont-assume-all-GdkDisplays-are-GdkX11Displays.patch +fix-build-with-no-lynx-installed.patch +" + +prepare() { apply_patches - autoreconf -if } -build () { - ./configure \ - --prefix=/usr \ - --bindir=/usr/bin \ - --sysconfdir=/etc \ - --enable-alsa \ - --enable-null \ - --disable-lynx \ - --disable-oss \ - --with-builtin=dso - make +build() { + ./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --disable-oss + make } -package () { - make DESTDIR=$PKG_DEST install +package() { + make -j1 DESTDIR="$PKG_DEST" install } + diff --git a/repo/libgig/libgig.xibuild b/repo/libgig/libgig.xibuild new file mode 100644 index 0000000..0eec00e --- /dev/null +++ b/repo/libgig/libgig.xibuild @@ -0,0 +1,23 @@ +#!/bin/sh + +NAME="libgig" +DESC="C++ library for loading, modifying and creating .gig, .ksf, .kmp, .sf2 and DLS files" + +MAKEDEPS="make " +DEPS="musl " + +PKG_VER=4.3.0 +SOURCE="https://download.linuxsampler.org/packages/libgig-$PKG_VER.tar.bz2" + +build () { + ./configure \ + --prefix=/usr \ + --bindir=/usr/bin \ + --sysconfdir=/etc \ + --disable-static + make +} + +package () { + make DESTDIR=$PKG_DEST install +} diff --git a/repo/libgpg-error/libgpg-error.xibuild b/repo/libgpg-error/libgpg-error.xibuild index 7498665..9850262 100644 --- a/repo/libgpg-error/libgpg-error.xibuild +++ b/repo/libgpg-error/libgpg-error.xibuild @@ -1,20 +1,15 @@ #!/bin/sh -MAKEDEPS="make" -DEPS="musl" - -PKG_VER=1.42 -SOURCE=https://gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-$PKG_VER.tar.bz2 +NAME="libgpg-error" DESC="Support library for libgcrypt" -prepare() { - default_prepare - aclocal - automake -} +MAKEDEPS=" automake autoconf" + +PKG_VER=1.45 +SOURCE="https://gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-$PKG_VER.tar.bz2" -build () { - ./configure \ +build() { + ./configure \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ @@ -22,11 +17,12 @@ build () { --enable-static \ --disable-nls make - } -package () { - make DESTDIR=$PKG_DEST install +check() { + make -C "$BUILD_ROOT" check } - +package() { + make DESTDIR="$PKG_DEST" install +} diff --git a/repo/libheif/libheif.xibuild b/repo/libheif/libheif.xibuild new file mode 100644 index 0000000..a8dbdbc --- /dev/null +++ b/repo/libheif/libheif.xibuild @@ -0,0 +1,29 @@ +#!/bin/sh + +NAME="libheif" +DESC="ISO/IEC 23008-12:2017 HEIF file format decoder and encoder" + +MAKEDEPS="aom x265 libde265 libjpeg-turbo libpng" + +PKG_VER=1.12.0 +SOURCE="https://github.com/strukturag/libheif/releases/download/v$PKG_VER/libheif-$PKG_VER.tar.gz" + +build() { + # This is en/decoder, so performance matters more than size. + export CPPFLAGS="$CFLAGS -O2" + export CXXFLAGS="$CFLAGS -O2" + + ./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --localstatedir=/var \ + --disable-static \ + --disable-go + make +} + +package() { + make DESTDIR="$PKG_DEST" install +} + diff --git a/repo/libical/libical.xibuild b/repo/libical/libical.xibuild new file mode 100644 index 0000000..b76b0df --- /dev/null +++ b/repo/libical/libical.xibuild @@ -0,0 +1,27 @@ +#!/bin/sh + +NAME="libical" +DESC="Reference implementation of the iCalendar format" + +MAKEDEPS="perl cmake vala glib icu libxml2 gobject-introspection" + +PKG_VER=3.0.13 +SOURCE="https://github.com/libical/libical/releases/download/v$PKG_VER/libical-$PKG_VER.tar.gz" + +build() { + cmake -B build \ + -DCMAKE_BUILD_TYPE=MinSizeRel \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DSHARED_ONLY=true \ + -DENABLE_GTK_DOC=false \ + -DGOBJECT_INTROSPECTION=true \ + -DICAL_GLIB_VAPI=true + cmake --build build +} + +package() { + cd $BUILD_ROOT + DESTDIR="$PKG_DEST" cmake --install build +} + diff --git a/repo/libjxl/libjxl.xibuild b/repo/libjxl/libjxl.xibuild new file mode 100644 index 0000000..027886e --- /dev/null +++ b/repo/libjxl/libjxl.xibuild @@ -0,0 +1,31 @@ +#!/bin/sh + +NAME="libjxl" +DESC="JPEG XL image format reference implementation" + +MAKEDEPS="asciidoc brotli cmake gdk-pixbuf giflib lcms2 libjpeg-turbo libpng openexr zlib gimp" + +SOURCE="github.com/libjxl/libjxl" + +build() { + cmake -B build \ + -DCMAKE_BUILD_TYPE=None \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DBUILD_TESTING=ON \ + -DJPEGXL_ENABLE_BENCHMARK=OFF \ + -DJPEGXL_ENABLE_COVERAGE=OFF \ + -DJPEGXL_ENABLE_EXAMPLES=OFF \ + -DJPEGXL_ENABLE_FUZZERS=OFF \ + -DJPEGXL_ENABLE_SJPEG=OFF \ + -DJPEGXL_ENABLE_SKCMS=OFF \ + -DJPEGXL_ENABLE_VIEWERS=OFF \ + -DJPEGXL_FORCE_SYSTEM_GTEST=ON \ + -DJPEGXL_FORCE_SYSTEM_BROTLI=ON \ + -DJPEGXL_FORCE_SYSTEM_HWY=ON + cmake --build build +} + +package() { + DESTDIR="$PKG_DEST" cmake --install build +} + diff --git a/repo/libksba/libksba.xibuild b/repo/libksba/libksba.xibuild new file mode 100644 index 0000000..2762a27 --- /dev/null +++ b/repo/libksba/libksba.xibuild @@ -0,0 +1,24 @@ +#!/bin/sh + +NAME="libksba" +DESC="Libksba is a CMS and X.509 access library" + +MAKEDEPS=" libgpg-error" + +PKG_VER=1.6.0 +SOURCE="https://www.gnupg.org/ftp/gcrypt/libksba/libksba-$PKG_VER.tar.bz2" + +build() { + ./configure \ + --prefix=/usr + make +} + +check() { + make check +} + +package() { + make DESTDIR="$PKG_DEST" install +} + diff --git a/repo/liblo/liblo.xibuild b/repo/liblo/liblo.xibuild index 4d8e7e7..64b991b 100644 --- a/repo/liblo/liblo.xibuild +++ b/repo/liblo/liblo.xibuild @@ -17,10 +17,6 @@ build() { make } -check() { - make check -} - package() { make DESTDIR="$PKG_DEST" install } diff --git a/repo/libutempter/libutempter.xibuild b/repo/libutempter/libutempter.xibuild new file mode 100644 index 0000000..fdab6c1 --- /dev/null +++ b/repo/libutempter/libutempter.xibuild @@ -0,0 +1,25 @@ +#!/bin/sh + +NAME="libutempter" +DESC="Library interface to record user sessions in utmp/wtmp files" + +MAKEDEPS="utmps" + +PKG_VER=1.2.1 +SOURCE="https://github.com/altlinux/libutempter/archive/$PKG_VER-alt1.tar.gz" + +prepare () { + cd libutempter + sed -i 's/ -p -m/ -m/g' Makefile +} + +build() { + make CFLAGS="-I/usr/include/utmps" LDLIBS="-Wl,--no-as-needed -lutmps -lskarnet -Wl,--as-needed" +} + +package() { + make DESTDIR="$PKG_DEST" install + chown root "$PKG_DEST/usr/lib/utempter/utempter" + chmod 2755 "$PKG_DEST/usr/lib/utempter/utempter" +} + diff --git a/repo/linux-libre/linux-libre.xibuild b/repo/linux-libre/linux-libre.xibuild index cb7be8f..1135426 100644 --- a/repo/linux-libre/linux-libre.xibuild +++ b/repo/linux-libre/linux-libre.xibuild @@ -13,13 +13,13 @@ ADDITIONAL=" " prepare () { + make mrproper + apply_patches + sh deblob-${PKG_VER%.*} --force - apply_patches cp config .config - export GREP="ggrep" - make olddefconfig make -s kernelrelease > version echo "Prepared linux version $(cat version)" diff --git a/repo/lmms/lmms.xibuild b/repo/lmms/lmms.xibuild new file mode 100644 index 0000000..301f1ec --- /dev/null +++ b/repo/lmms/lmms.xibuild @@ -0,0 +1,26 @@ +#!/bin/sh + +NAME="lmms" +DESC="Cross-platform music production software" + +MAKEDEPS="alsa-lib cmake fftw libsamplerate libsndfile pulseaudio qt5-qttools qt5-qtx11extras qt5-qtbase sdl2 xcb-util xcb-util-keysyms opus fluidsynth libgig sndio" + +PKG_VER=1.2.2 +SOURCE="https://github.com/LMMS/lmms/releases/download/v$PKG_VER/lmms_$PKG_VER.tar.xz" + +build() { + cmake -B build \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DBUILD_SHARED_LIBS=True \ + -DCMAKE_BUILD_TYPE=None \ + -DWANT_QT5=On \ + -DWANT_PULSEAUDIO=On \ + . + cmake --build build +} + +package() { + DESTDIR="$PKG_DEST" cmake --build build --target install +} + diff --git a/repo/mxml/mxml.xibuild b/repo/mxml/mxml.xibuild new file mode 100644 index 0000000..b909ec8 --- /dev/null +++ b/repo/mxml/mxml.xibuild @@ -0,0 +1,31 @@ +#!/bin/sh + +NAME="mxml" +DESC="Small XML library that you can use to read and write XML files" + +MAKEDEPS="" + +PKG_VER=3.3 +SOURCE="https://github.com/michaelrsweet/mxml/archive/v$PKG_VER.tar.gz" + +build() { + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --localstatedir=/var + make +} + +check() { + make testmxml +} + +package() { + make BUILDROOT="$PKG_DEST" install + rm -f "$PKG_DEST"/usr/lib/*.a +} + diff --git a/repo/ntk/ntk.xibuild b/repo/ntk/ntk.xibuild new file mode 100644 index 0000000..7cfb9a2 --- /dev/null +++ b/repo/ntk/ntk.xibuild @@ -0,0 +1,18 @@ +#!/bin/sh + +NAME="ntk" +DESC="Fork of FLTK 1.3.0 with additional functionality" + +MAKEDEPS="waf libx11 libxext libxft mesa libxinerama libpng libjpeg-turbo" + +PKG_VER=1.3.1001 +SOURCE="https://github.com/linuxaudio/ntk/archive/refs/tags/v${PKG_VER}.tar.gz" + +build () { + waf configure --prefix=/usr + waf build +} + +package () { + waf --destdir="$PKG_DEST/" install +} diff --git a/repo/oksh/oksh.xibuild b/repo/oksh/oksh.xibuild index eafaab7..f7d319f 100644 --- a/repo/oksh/oksh.xibuild +++ b/repo/oksh/oksh.xibuild @@ -4,7 +4,6 @@ NAME="oksh" DESC="Portable OpenBSD ksh, based on the Public Domain KornShell (pdksh)" MAKEDEPS="make " -DEPS="sbase musl " PKG_VER=7.1 SOURCE="https://github.com/ibara/oksh/archive/oksh-$PKG_VER.tar.gz" diff --git a/repo/openbox/openbox.xibuild b/repo/openbox/openbox.xibuild new file mode 100644 index 0000000..a136706 --- /dev/null +++ b/repo/openbox/openbox.xibuild @@ -0,0 +1,31 @@ +#!/bin/sh + +NAME="openbox" +DESC="A highly configurable and standards-compliant X11 window manager" + +MAKEDEPS="libxcursor libxrandr libxinerama startup-notification pango libxml2 imlib2 librsvg gettext" + +PKG_VER=3.6.1 +SOURCE="http://openbox.org/dist/openbox/openbox-$PKG_VER.tar.gz" +ADDITIONAL="https://icculus.org/openbox/tools/setlayout.c" + +build() { + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ + --sysconfdir=/etc \ + --disable-static + make + gcc $CFLAGS $LDFLAGS -o setlayout "$BUILD_ROOT"/setlayout.c -lX11 +} + +check() { + make check +} + +package() { + make -j1 DESTDIR="$PKG_DEST" install + install "$BUILD_ROOT"/setlayout "$PKG_DEST"/usr/bin/setlayout +} + diff --git a/repo/pavucontrol/pavucontrol.xibuild b/repo/pavucontrol/pavucontrol.xibuild deleted file mode 100644 index 3692e7f..0000000 --- a/repo/pavucontrol/pavucontrol.xibuild +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh - -NAME="pavucontrol" -DESC="Pulseaudio Volume Control, GTK based mixer for Pulseaudio" - -MAKEDEPS="make " -DEPS="atkmm glib glibmm gtk3 json-glib libcanberra-gtk3 intltool libsigc++ musl pulseaudio gtkmm3" - -PKG_VER=5.0 -SOURCE="https://freedesktop.org/software/pulseaudio/pavucontrol/pavucontrol-$PKG_VER.tar.gz" - -build () { - ./configure \ - --prefix=/usr \ - --bindir=/usr/bin \ - --sysconfdir=/etc \ - --disable-static \ - --disable-lynx \ - --disable-nls - make -} - -package () { - make DESTDIR=$PKG_DEST install -} diff --git a/repo/physfs/physfs.xibuild b/repo/physfs/physfs.xibuild new file mode 100644 index 0000000..9b47f8b --- /dev/null +++ b/repo/physfs/physfs.xibuild @@ -0,0 +1,26 @@ +#!/bin/sh + +NAME="physfs" +DESC="Library providing access to various archives, for use in video games" + +MAKEDEPS="cmake" + +PKG_VER=3.0.2 +SOURCE="https://icculus.org/physfs/downloads/physfs-$PKG_VER.tar.bz2" + +build() { + cmake \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DBUILD_SHARED_LIBS=True \ + -DCMAKE_BUILD_TYPE=None \ + -DCMAKE_CXX_FLAGS="$CXXFLAGS" \ + -DCMAKE_C_FLAGS="$CFLAGS" \ + -DPHYSFS_BUILD_TEST=OFF + make +} + +package() { + make DESTDIR="$PKG_DEST" install +} + diff --git a/repo/portaudio/portaudio-audacity.patch b/repo/portaudio/portaudio-audacity.patch new file mode 100644 index 0000000..61883eb --- /dev/null +++ b/repo/portaudio/portaudio-audacity.patch @@ -0,0 +1,219 @@ +From 42dc9c90a703b8dd251d71389a7e6220a50a43a9 Mon Sep 17 00:00:00 2001 +From: Uwe Klotz <uwe.klotz@gmail.com> +Date: Fri, 26 Mar 2021 10:43:46 +0100 +Subject: [PATCH] portaudio-audacity.patch + +--- + configure.in | 1 + + include/pa_unix_oss.h | 52 +++++++++++++++++++++++++++++++++++ + include/portaudio.h | 9 ++++++ + src/common/pa_front.c | 32 ++++++++++++++++++++- + src/common/pa_stream.c | 2 ++ + src/common/pa_stream.h | 1 + + src/hostapi/oss/pa_unix_oss.c | 26 ++++++++++++++++++ + 7 files changed, 122 insertions(+), 1 deletion(-) + create mode 100644 include/pa_unix_oss.h + +diff --git a/configure.in b/configure.in +index bb4ae96..fe0e112 100644 +--- a/configure.in ++++ b/configure.in +@@ -415,6 +415,7 @@ case "${host_os}" in + DLL_LIBS="$DLL_LIBS -lossaudio" + LIBS="$LIBS -lossaudio" + fi ++ INCLUDES="$INCLUDES pa_unix_oss.h" + AC_DEFINE(PA_USE_OSS,1) + fi + +diff --git a/include/pa_unix_oss.h b/include/pa_unix_oss.h +new file mode 100644 +index 0000000..2351e64 +--- /dev/null ++++ b/include/pa_unix_oss.h +@@ -0,0 +1,52 @@ ++#ifndef PA_UNIX_OSS_H ++#define PA_UNIX_OSS_H ++ ++/* ++ * $Id: portaudio.patch,v 1.10 2009-06-30 04:52:59 llucius Exp $ ++ * PortAudio Portable Real-Time Audio Library ++ * OSS-specific extensions ++ * ++ * Copyright (c) 1999-2000 Ross Bencina and Phil Burk ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining ++ * a copy of this software and associated documentation files ++ * (the "Software"), to deal in the Software without restriction, ++ * including without limitation the rights to use, copy, modify, merge, ++ * publish, distribute, sublicense, and/or sell copies of the Software, ++ * and to permit persons to whom the Software is furnished to do so, ++ * subject to the following conditions: ++ * ++ * The above copyright notice and this permission notice shall be ++ * included in all copies or substantial portions of the Software. ++ * ++ * Any person wishing to distribute modifications to the Software is ++ * requested to send the modifications to the original developer so that ++ * they can be incorporated into the canonical version. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. ++ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ++ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF ++ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION ++ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ++ * ++ */ ++ ++/** @file ++ * OSS-specific PortAudio API extension header file. ++ */ ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++const char *PaOSS_GetStreamInputDevice( PaStream *s ); ++ ++const char *PaOSS_GetStreamOutputDevice( PaStream *s ); ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif +diff --git a/include/portaudio.h b/include/portaudio.h +index 5d84731..7660c8a 100644 +--- a/include/portaudio.h ++++ b/include/portaudio.h +@@ -1200,6 +1200,15 @@ signed long Pa_GetStreamReadAvailable( PaStream* stream ); + signed long Pa_GetStreamWriteAvailable( PaStream* stream ); + + ++/** Retrieve the host type handling an open stream. ++ ++ @return Returns a non-negative value representing the host API type ++ handling an open stream or, a PaErrorCode (which are always negative) ++ if PortAudio is not initialized or an error is encountered. ++*/ ++PaHostApiTypeId Pa_GetStreamHostApiType( PaStream* stream ); ++ ++ + /* Miscellaneous utilities */ + + +diff --git a/src/common/pa_front.c b/src/common/pa_front.c +index 65a656f..02a67a8 100644 +--- a/src/common/pa_front.c ++++ b/src/common/pa_front.c +@@ -1257,8 +1257,10 @@ PaError Pa_OpenStream( PaStream** stream, + hostApiInputParametersPtr, hostApiOutputParametersPtr, + sampleRate, framesPerBuffer, streamFlags, streamCallback, userData ); + +- if( result == paNoError ) ++ if( result == paNoError ) { + AddOpenStream( *stream ); ++ PA_STREAM_REP(*stream)->hostApiType = hostApi->info.type; ++ } + + + PA_LOGAPI(("Pa_OpenStream returned:\n" )); +@@ -1771,6 +1773,34 @@ signed long Pa_GetStreamWriteAvailable( PaStream* stream ) + } + + ++PaHostApiTypeId Pa_GetStreamHostApiType( PaStream* stream ) ++{ ++ PaError error = PaUtil_ValidateStreamPointer( stream ); ++ PaHostApiTypeId result; ++ ++#ifdef PA_LOG_API_CALLS ++ PaUtil_DebugPrint("Pa_GetStreamHostApiType called:\n" ); ++ PaUtil_DebugPrint("\tPaStream* stream: 0x%p\n", stream ); ++#endif ++ ++ if( error == paNoError ) ++ { ++ result = PA_STREAM_REP(stream)->hostApiType; ++ } ++ else ++ { ++ result = (PaHostApiTypeId) error; ++ } ++ ++#ifdef PA_LOG_API_CALLS ++ PaUtil_DebugPrint("Pa_GetStreamHostApiType returned:\n" ); ++ PaUtil_DebugPrint("\tPaError: %d ( %s )\n\n", result, Pa_GetErrorText( result ) ); ++#endif ++ ++ return result; ++} ++ ++ + PaError Pa_GetSampleSize( PaSampleFormat format ) + { + int result; +diff --git a/src/common/pa_stream.c b/src/common/pa_stream.c +index ffbf530..305f7c8 100644 +--- a/src/common/pa_stream.c ++++ b/src/common/pa_stream.c +@@ -93,6 +93,8 @@ void PaUtil_InitializeStreamRepresentation( PaUtilStreamRepresentation *streamRe + streamRepresentation->streamInfo.inputLatency = 0.; + streamRepresentation->streamInfo.outputLatency = 0.; + streamRepresentation->streamInfo.sampleRate = 0.; ++ ++ streamRepresentation->hostApiType = 0; + } + + +diff --git a/src/common/pa_stream.h b/src/common/pa_stream.h +index 4afda39..0a5cd1e 100644 +--- a/src/common/pa_stream.h ++++ b/src/common/pa_stream.h +@@ -152,6 +152,7 @@ typedef struct PaUtilStreamRepresentation { + PaStreamFinishedCallback *streamFinishedCallback; + void *userData; + PaStreamInfo streamInfo; ++ PaHostApiTypeId hostApiType; + } PaUtilStreamRepresentation; + + +diff --git a/src/hostapi/oss/pa_unix_oss.c b/src/hostapi/oss/pa_unix_oss.c +index 20113e2..9dedc3f 100644 +--- a/src/hostapi/oss/pa_unix_oss.c ++++ b/src/hostapi/oss/pa_unix_oss.c +@@ -2050,3 +2050,29 @@ error: + return result; + #endif + } ++ ++ ++const char *PaOSS_GetStreamInputDevice( PaStream* s ) ++{ ++ PaOssStream *stream = (PaOssStream*)s; ++ ++ if( stream->capture ) ++ { ++ return stream->capture->devName; ++ } ++ ++ return NULL; ++} ++ ++ ++const char *PaOSS_GetStreamOutputDevice( PaStream* s ) ++{ ++ PaOssStream *stream = (PaOssStream*)s; ++ ++ if( stream->playback ) ++ { ++ return stream->playback->devName; ++ } ++ ++ return NULL; ++} +-- +2.30.2 + diff --git a/repo/portaudio/portaudio-pkgconfig-alsa.patch b/repo/portaudio/portaudio-pkgconfig-alsa.patch new file mode 100644 index 0000000..53b6702 --- /dev/null +++ b/repo/portaudio/portaudio-pkgconfig-alsa.patch @@ -0,0 +1,12 @@ +diff -up portaudio/portaudio-2.0.pc.in.alsa portaudio/portaudio-2.0.pc.in +--- portaudio/portaudio-2.0.pc.in.alsa 2011-05-05 11:55:28.000000000 +0200 ++++ portaudio/portaudio-2.0.pc.in 2011-05-05 11:55:33.000000000 +0200 +@@ -5,7 +5,7 @@ includedir=@includedir@ + + Name: PortAudio + Description: Portable audio I/O +-Requires: ++Requires: alsa + Version: 19 + + Libs: -L${libdir} -lportaudio @LIBS@ diff --git a/repo/portaudio/portaudio.xibuild b/repo/portaudio/portaudio.xibuild new file mode 100644 index 0000000..2c9b2ef --- /dev/null +++ b/repo/portaudio/portaudio.xibuild @@ -0,0 +1,32 @@ +#!/bin/sh + +NAME="portaudio" +DESC="A cross-platform, open-source C language library for real-time audio input and output" + +MAKEDEPS=" alsa-lib autoconf automake jack libtool linux-headers" + +PKG_VER=19.7.0 +SOURCE="https://github.com/PortAudio/portaudio/archive/v$PKG_VER/portaudio-v$PKG_VER.tar.gz" + +ADDITIONAL=" +portaudio-audacity.patch +portaudio-pkgconfig-alsa.patch +" + +prepare() { + apply_patches +} + +build() { + ./configure \ + --prefix=/usr \ + --disable-static \ + --with-jack \ + --with-alsa \ + --enable-cxx + make -j1 +} + +package() { + make -j1 DESTDIR="$PKG_DEST" install +} diff --git a/repo/qt5-qtbase/qt5-qtbase.xibuild b/repo/qt5-qtbase/qt5-qtbase.xibuild index 796ea58..b67ab64 100644 --- a/repo/qt5-qtbase/qt5-qtbase.xibuild +++ b/repo/qt5-qtbase/qt5-qtbase.xibuild @@ -3,45 +3,47 @@ NAME="qt5-qtbase" DESC="Qt5 - QtBase components" -MAKEDEPS="make libexecinfo" -DEPS="dbus glib icu openssl pcre2 xdg-utils zlib zstd musl " +MAKEDEPS="dbus fontconfig freetype2 glib libice libpng libsm libx11 libxext mesa openssl perl sqlite3 zlib at-spi2-atk bison cups eudev flex gawk gperf gtk2 hicolor-icon-theme icu libinput libjpeg-turbo libxi libxkbcommon libxrandr libxrender libxslt libxv mtdev pcre2 xcb-util xcb-util-image xcb-util-keysyms xcb-util-renderutil xcb-util-wm" + +PKG_VER=5.15.3_git20220217 +_commit="f36c2233fad0bfddf9350305a6bdc6de022d3635" +SOURCE="https://invent.kde.org/qt/qt/qtbase/-/archive/$_commit/qtbase-$_commit.tar.gz" -PKG_VER=5.15.4 -commit="e0a15c11b853954d4189b2e30aa2450184de0987" -SOURCE="https://invent.kde.org/qt/qt/qtbase/-/archive/$commit/qtbase-$commit.tar.gz" ADDITIONAL=" qt-musl-iconv-no-bom.patch qt5-base-cflags.patch qt5-base-nostrip.patch -qt5-qtbase.xibuild " -qt5_prefix=/usr/lib/qt5 -qt5_datadir=/usr/share/qt5 +_qt5_prefix=/usr/lib/qt5 +_qt5_datadir=/usr/share/qt5 -prepare () { +prepare() { apply_patches - sed -i -e "s|-O2|$CXXFLAGS|" \ - -e "/^QMAKE_RPATH/s| -Wl,-rpath,||g" \ - -e "/^QMAKE_LFLAGS\s/s|+=|+= $LDFLAGS|g" \ + + sed -i -e "s|-O2|$CXXFLAGS|" \ + -e "/^QMAKE_RPATH/s| -Wl,-rpath,||g" \ + -e "/^QMAKE_LFLAGS\s/s|+=|+= $LDFLAGS|g" \ mkspecs/common/*.conf + # Make configure think we are running in a git directory + # This makes it symlink the include files to the right directory mkdir .git } -build () { - ./configure -confirm-license -opensource \ - -archdatadir "$qt5_prefix" \ - -bindir "$qt5_prefix"/bin \ - -datadir "$qt5_datadir" \ +build() { + ./configure -confirm-license -opensource \ + -archdatadir "$_qt5_prefix" \ + -bindir "$_qt5_prefix"/bin \ + -datadir "$_qt5_datadir" \ -dbus-linked \ -docdir /usr/share/doc/qt5 \ -examplesdir /usr/share/doc/qt5/examples \ -glib \ -headerdir /usr/include/qt5 \ -icu \ - -importdir "$qt5_prefix"/imports \ - -libexecdir "$qt5_prefix"/libexec \ + -importdir "$_qt5_prefix"/imports \ + -libexecdir "$_qt5_prefix"/libexec \ -no-rpath \ -no-separate-debug-info \ -no-pch \ @@ -50,28 +52,36 @@ build () { -openssl-linked \ -optimized-qmake \ -plugin-sql-sqlite \ - -plugindir "$qt5_prefix"/plugins \ + -plugindir "$_qt5_prefix"/plugins \ -prefix /usr \ -sysconfdir /etc/xdg \ -system-libjpeg \ -system-libpng \ -system-sqlite \ -system-zlib \ - -translationdir "$qt5_datadir"/translations \ + -translationdir "$_qt5_datadir"/translations \ -no-reduce-relocations - export LDFLAGS="-lexecinfo" make } -package () { - make INSTALL_ROOT=$PKG_DEST install - install -d $PKG_DEST/usr/bin - for i in "$PKG_DEST"/"$qt5_prefix"/bin/*; do - name=${i##*/} +check() { + make check +} + +package() { + make INSTALL_ROOT="$PKG_DEST" install + mkdir -p "$PKG_DEST"/usr/bin/ + for i in "$PKG_DEST"/"$_qt5_prefix"/bin/*; do + _name=${i##*/} case $_name in - *.*) dest="$PKG_DEST"/usr/bin/${name%.*}-qt5.${name##*.};; - *) dest="$PKG_DEST"/usr/bin/${name%.*}-qt5;; + *.*) _dest="$PKG_DEST"/usr/bin/${_name%.*}-qt5.${_name##*.};; + *) _dest="$PKG_DEST"/usr/bin/${_name%.*}-qt5;; esac - ln -s ../lib/qt5/bin/"$name" "$dest" + ln -s ../lib/qt5/bin/"$_name" "$_dest" done + + # Drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "$PKG_DEST/usr/lib" -type f -name '*.prl' \ + -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; } + diff --git a/repo/qt5-qttools/assistant-qt5.desktop b/repo/qt5-qttools/assistant-qt5.desktop new file mode 100644 index 0000000..05b6ef1 --- /dev/null +++ b/repo/qt5-qttools/assistant-qt5.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Exec=/usr/lib/qt5/bin/assistant +Name=Qt Assistant +GenericName=Qt Document Browser +Icon=assistant +Terminal=false +Type=Application +Categories=Qt;Development;Documentation diff --git a/repo/qt5-qttools/designer-qt5.desktop b/repo/qt5-qttools/designer-qt5.desktop new file mode 100644 index 0000000..b867254 --- /dev/null +++ b/repo/qt5-qttools/designer-qt5.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Exec=/usr/lib/qt5/bin/designer +Name=Qt Designer +GenericName=Interface Designer +MimeType=application/x-designer +Icon=designer +Terminal=false +Type=Application +Categories=Qt;Development;GUIDesigner diff --git a/repo/qt5-qttools/linguist-qt5.desktop b/repo/qt5-qttools/linguist-qt5.desktop new file mode 100644 index 0000000..0d4bb45 --- /dev/null +++ b/repo/qt5-qttools/linguist-qt5.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Exec=/usr/lib/qt5/bin/linguist +Name=Qt Linguist +GenericName=Translation Tool +MimeType=application/x-linguist +Terminal=false +Type=Application +Icon=linguist +Categories=Qt;Development;Translation diff --git a/repo/qt5-qttools/qdbusviewer-qt5.desktop b/repo/qt5-qttools/qdbusviewer-qt5.desktop new file mode 100644 index 0000000..c5abc70 --- /dev/null +++ b/repo/qt5-qttools/qdbusviewer-qt5.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Name=Qt5 QDbusViewer +GenericName=D-Bus Debugger +Comment=Debug D-Bus applications +Exec=/usr/lib/qt5/bin/qdbusviewer +Icon=qt5-qdbusviewer +Terminal=false +Type=Application +Categories=Qt;Development;Debugger; + diff --git a/repo/qt5-qttools/qt5-qttools.xibuild b/repo/qt5-qttools/qt5-qttools.xibuild new file mode 100644 index 0000000..2c7982b --- /dev/null +++ b/repo/qt5-qttools/qt5-qttools.xibuild @@ -0,0 +1,69 @@ +#!/bin/sh + +NAME="qt5-qttools" +DESC="Qt5 - QtTool components" + +MAKEDEPS=" clang qt5-qtbase" + +PKG_VER=5.15.3_git20201202 +_commit="33693a928986006d79c1ee743733cde5966ac402" +SOURCE="https://invent.kde.org/qt/qt/qttools/-/archive/$_commit/qttools-$_commit.tar.gz" + +ADDITIONAL=" +assistant-qt5.desktop +designer-qt5.desktop +linguist-qt5.desktop +qdbusviewer-qt5.desktop +" + +_qt5_prefix=/usr/lib/qt5 +prepare() { + + # We need to make the build system think we're running in a git repository + # so it correctly symlinks during the build + mkdir .git +} + +build() { + qmake-qt5 + make +} + +package() { + make install INSTALL_ROOT="$PKG_DEST" + + # -qt5 symlinks + mkdir -p "$PKG_DEST"/usr/bin/ + for i in "$PKG_DEST"/"$_qt5_prefix"/bin/*; do + ln -s ../lib/qt5/bin/${i##*/} "$PKG_DEST"/usr/bin/${i##*/}-qt5 + done + + for i in $source; do + case $i in + *.desktop) install -Dm644 "$BUILD_ROOT"/$i \ + "$PKG_DEST"/usr/share/applications/$i ;; + esac + done + + # icons + install -m644 -p -D src/assistant/assistant/images/assistant.png \ + "$PKG_DEST"/usr/share/icons/hicolor/32x32/apps/assistant-qt5.png + install -m644 -p -D src/assistant/assistant/images/assistant-128.png \ + "$PKG_DEST"/usr/share/icons/hicolor/128x128/apps/assistant-qt5.png + install -m644 -p -D src/designer/src/designer/images/designer.png \ + "$PKG_DEST"/usr/share/icons/hicolor/32x32/apps/designer-qt5.png + install -m644 -p -D src/qdbus/qdbusviewer/images/qdbusviewer.png \ + "$PKG_DEST"/usr/share/icons/hicolor/32x32/apps/qdbusviewer-qt5.png + install -m644 -p -D src/qdbus/qdbusviewer/images/qdbusviewer-128.png \ + "$PKG_DEST"/usr/share/icons/hicolor/128x128/apps/qdbusviewer-qt5.png + # linguist icons + for icon in src/linguist/linguist/images/icons/linguist-*-32.png ; do + size=$(echo ${icon##*/} | cut -d- -f2) + install -p -m644 -D $icon \ + "$PKG_DEST"/usr/share/icons/hicolor/"$size"x"$size"/apps/linguist.png + done + + # Drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "$PKG_DEST/usr/lib" -type f -name '*.prl' \ + -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; +} diff --git a/repo/qt5-qtx11extras/qt5-qtx11extras.xibuild b/repo/qt5-qtx11extras/qt5-qtx11extras.xibuild new file mode 100644 index 0000000..a587cc5 --- /dev/null +++ b/repo/qt5-qtx11extras/qt5-qtx11extras.xibuild @@ -0,0 +1,37 @@ +#!/bin/sh + +NAME="qt5-qtx11extras" +DESC="Provides platform-specific APIs for X11" + +MAKEDEPS=" qt5-qtbase" + +PKG_VER=5.15.3_git20201027 +_commit="3898f5484fd4864b047729bfeda9a1222f32364f" +SOURCE="https://invent.kde.org/qt/qt/qtx11extras/-/archive/$_commit/qtx11extras-$_commit.tar.gz" + +prepare() { + # We need to make the build system think we're running in a git repository + # so it correctly symlinks during the build + mkdir .git +} + +build() { + qmake-qt5 + make +} + +check() { + make check +} + +package() { + make INSTALL_ROOT="$PKG_DEST" install + + # Drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "$PKG_DEST/usr/lib" -type f -name '*.prl' \ + -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; + + install -d "$PKG_DEST"/usr/share/licenses + ln -s /usr/share/licenses/qt5-base "$PKG_DEST"/usr/share/licenses/qt5-qtx11extras +} + diff --git a/repo/redland/redland.xibuild b/repo/redland/redland.xibuild index 39c1e28..6e44023 100644 --- a/repo/redland/redland.xibuild +++ b/repo/redland/redland.xibuild @@ -3,7 +3,7 @@ NAME="redland" DESC="high-level RDF library" -MAKEDEPS="raptor2 rasqal sqlite perl" +MAKEDEPS="raptor2 rasqal sqlite3 perl" PKG_VER=1.0.17 SOURCE="https://download.librdf.org/source/redland-$PKG_VER.tar.gz" diff --git a/repo/sbase/sbase.xibuild b/repo/sbase/sbase.xibuild index a380c9e..4b62f2d 100644 --- a/repo/sbase/sbase.xibuild +++ b/repo/sbase/sbase.xibuild @@ -29,7 +29,7 @@ package () { make PREFIX=/usr DESTDIR=$PKG_DEST install # these are provided by other utils - for p in tar sed find xargs grep sort flock; do + for p in date tar sed find xargs grep sort flock; do mv $PKG_DEST/usr/bin/$p $PKG_DEST/usr/bin/s$p mv $PKG_DEST/usr/share/man/man1/$p.1 $PKG_DEST/usr/share/man/man1/s$p.1 done diff --git a/repo/sdl2-image/CVE-2019-13616.patch b/repo/sdl2-image/CVE-2019-13616.patch new file mode 100644 index 0000000..cb0fe87 --- /dev/null +++ b/repo/sdl2-image/CVE-2019-13616.patch @@ -0,0 +1,24 @@ + +# HG changeset patch +# User Sam Lantinga <slouken@libsdl.org> +# Date 1564509612 25200 +# Node ID ba45f00879ba0b957780e1fd28304c41503c1737 +# Parent f1baffa48926c4c76f482f21a240667e9159d1d5 +Fixed bug 4538 - validate image size when loading BMP files + +diff -r f1baffa48926 -r ba45f00879ba IMG_bmp.c +--- a/IMG_bmp.c Tue Jul 30 10:16:02 2019 -0700 ++++ b/IMG_bmp.c Tue Jul 30 11:00:12 2019 -0700 +@@ -351,6 +351,11 @@ + SDL_RWseek(src, (biSize - headerSize), RW_SEEK_CUR); + } + } ++ if (biWidth <= 0 || biHeight == 0) { ++ IMG_SetError("BMP file with bad dimensions (%dx%d)", biWidth, biHeight); ++ was_error = SDL_TRUE; ++ goto done; ++ } + if (biHeight < 0) { + topDown = SDL_TRUE; + biHeight = -biHeight; + diff --git a/repo/sdl2-image/sdl2-image.xibuild b/repo/sdl2-image/sdl2-image.xibuild new file mode 100644 index 0000000..893107a --- /dev/null +++ b/repo/sdl2-image/sdl2-image.xibuild @@ -0,0 +1,38 @@ +#!/bin/sh + +NAME="sdl2-image" +DESC="A simple library to load images of various formats as SDL surfaces" + +MAKEDEPS=" sdl2 libpng libjpeg-turbo libwebp tiff zlib" + +PKG_VER=2.0.5 +SOURCE="https://www.libsdl.org/projects/SDL_image/release/SDL2_image-$PKG_VER.tar.gz" + +ADDITIONAL=" +CVE-2019-13616.patch +" + +prepare () { + apply_patches +} + +build() { + ./configure \ + --prefix=/usr \ + --disable-static \ + --enable-png \ + --enable-png-shared \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info + make +} + +check() { + make check +} + +package() { + make DESTDIR="$PKG_DEST" install +} + diff --git a/repo/sndio/sndio.xibuild b/repo/sndio/sndio.xibuild new file mode 100644 index 0000000..a795bca --- /dev/null +++ b/repo/sndio/sndio.xibuild @@ -0,0 +1,29 @@ +#!/bin/sh + +NAME="sndio" +DESC="Small audio and MIDI framework part of the OpenBSD project" + +MAKEDEPS="alsa-lib" + +PKG_VER=1.8.1 +SOURCE="https://sndio.org/sndio-$PKG_VER.tar.gz" + +ADDITIONAL=" +sndiod.initd +" + +build() { + ./configure --prefix=/usr + make +} + +package() { + make DESTDIR="$PKG_DEST" install + mkdir -p "$PKG_DEST"/usr/sbin + mv "$PKG_DEST"/usr/bin/sndiod "$PKG_DEST"/usr/sbin/ + install -D -m 644 contrib/default.sndiod \ + "$PKG_DEST"/etc/conf.d/sndiod + install -m755 -D "$BUILD_ROOT"/sndiod.initd \ + "$PKG_DEST"/etc/init.d/sndiod +} + diff --git a/repo/sndio/sndiod.initd b/repo/sndio/sndiod.initd new file mode 100644 index 0000000..c255f84 --- /dev/null +++ b/repo/sndio/sndiod.initd @@ -0,0 +1,17 @@ +#!/sbin/openrc-run + +name="sndiod" +pname="sndiod" +user="sndiod" +group="audio" +command="/usr/sbin/$pname" +command_args="$DAEMON_OPTS" +command_backdground="no" + +pidfile="/run/$pname.pid" + +depend() { + need net + after firewall +} + diff --git a/repo/st/st.xibuild b/repo/st/st.xibuild new file mode 100644 index 0000000..3fa49a7 --- /dev/null +++ b/repo/st/st.xibuild @@ -0,0 +1,35 @@ +#!/bin/sh + +NAME="st" +DESC="Simple terminal emulator for X" + +MAKEDEPS="fontconfig freetype libx11 libxext libxft" + +PKG_VER=0.8.5 +SOURCE="https://dl.suckless.org/st/st-$PKG_VER.tar.gz" + +prepare() { + default_prepare + sed -i '/tic/d' Makefile +} + +build() { + make +} + +package() { + make install PREFIX=/usr DESTDIR="$PKG_DEST" + mkdir -p "$PKG_DEST"/usr/share/applications + + cat > "$PKG_DEST"/usr/share/applications/st.desktop <<-EOF + [Desktop Entry] + Name=st + Comment=st is a simple virtual terminal emulator for X which sucks less + Exec=st + Terminal=false + Type=Application + Icon=gnome-xterm + Categories=System;TerminalEmulator; + EOF +} + diff --git a/repo/supertux/missing-include-for-FLT_EPSILON.patch b/repo/supertux/missing-include-for-FLT_EPSILON.patch new file mode 100644 index 0000000..44bc370 --- /dev/null +++ b/repo/supertux/missing-include-for-FLT_EPSILON.patch @@ -0,0 +1,13 @@ +diff --git a/src/supertux/game_session.cpp b/src/supertux/game_session.cpp +index 41de52e..a8ebfc9 100644 +--- a/src/supertux/game_session.cpp ++++ b/src/supertux/game_session.cpp +@@ -14,6 +14,8 @@ + // You should have received a copy of the GNU General Public License + // along with this program. If not, see <http://www.gnu.org/licenses/>. + ++#include <cfloat> ++ + #include "supertux/game_session.hpp" + + #include "audio/sound_manager.hpp" diff --git a/repo/supertux/supertux.xibuild b/repo/supertux/supertux.xibuild new file mode 100644 index 0000000..f45766c --- /dev/null +++ b/repo/supertux/supertux.xibuild @@ -0,0 +1,33 @@ +#!/bin/sh + +NAME="supertux" +DESC="Open-source classic 2D jump'n run sidescroller game" + +MAKEDEPS="boost cmake curl freetype2 glew libpng libvorbis openal-soft physfs sdl2 glm sdl2-image" + +PKG_VER=0.6.3 +SOURCE="https://github.com/SuperTux/supertux/releases/download/v$PKG_VER/SuperTux-v$PKG_VER-Source.tar.gz" + +ADDITIONAL=" +missing-include-for-FLT_EPSILON.patch +" + +prepare () { + apply_patches +} + +build() { + cmake -B build \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DBUILD_SHARED_LIBS=True \ + -DCMAKE_BUILD_TYPE=None \ + -DCMAKE_CXX_FLAGS="$CXXFLAGS" \ + -DCMAKE_C_FLAGS="$CFLAGS" \ + -DINSTALL_SUBDIR_BIN=bin + cmake --build build +} + +package() { + DESTDIR="$PKG_DEST" cmake --build build --target install +} diff --git a/repo/supertuxkart/server_config.xml b/repo/supertuxkart/server_config.xml new file mode 100644 index 0000000..0f65f36 --- /dev/null +++ b/repo/supertuxkart/server_config.xml @@ -0,0 +1,169 @@ +<?xml version="1.0"?> +<server-config version="6" > + + <!-- Name of server, encode in XML if you want to use unicode characters. --> + <server-name value="STK Server" /> + + <!-- Port used in server, if you specify 0, it will use the server port specified in stk_config.xml. If you wish to use a random port, set random-server-port to '1' in user config. STK will automatically switch to a random port if the port you specify fails to be bound. --> + <server-port value="0" /> + + <!-- Game mode in server, 0 is normal race (grand prix), 1 is time trial (grand prix), 3 is normal race, 4 time trial, 6 is soccer, 7 is free-for-all and 8 is capture the flag. Notice: grand prix server doesn't allow for players to join and wait for ongoing game. --> + <server-mode value="3" /> + + <!-- Difficulty in server, 0 is beginner, 1 is intermediate, 2 is expert and 3 is supertux (the most difficult). --> + <server-difficulty value="0" /> + + <!-- Number of grand prix tracks per game (If grand prix enabled). --> + <gp-track-count value="3" /> + + <!-- Use goal target in soccer. --> + <soccer-goal-target value="false" /> + + <!-- Enable wan server, which requires you to have an stk-addons account with a saved session. Check init-user command for details. --> + <wan-server value="true" /> + + <!-- Enable network console, which can do for example kickban. --> + <enable-console value="false" /> + + <!-- Maximum number of players on the server, setting this to a value greater than 8 can cause performance degradation. --> + <server-max-players value="8" /> + + <!-- Password for private server, leave empty for a public server. --> + <private-server-password value="" /> + + <!-- Message of today shown in lobby, you can enter encoded XML words here or a file.txt and let STK load it. --> + <motd value="" /> + + <!-- If this value is set to false, the server will ignore chat messages from all players. --> + <chat value="true" /> + + <!-- If client sends more than chat-consecutive-interval / 2 chats within this value (read in seconds), it will be ignore, negative value to disable. --> + <chat-consecutive-interval value="8" /> + + <!-- Allow players to vote for which track to play. If this value is set to false, the server will randomly pick the next track to play. --> + <track-voting value="true" /> + + <!-- Timeout in seconds for selecting karts and (or) voting tracks in server, you may want to use a lower value if you have track-voting off. --> + <voting-timeout value="30" /> + + <!-- Timeout in seconds for validation of clients in wan, currently STK will use the stk-addons server to share AES key between the client and server. --> + <validation-timeout value="20" /> + + <!-- By default WAN server will always validate player and LAN will not, disable it to allow non-validated player in WAN. --> + <validating-player value="true" /> + + <!-- Disable it to turn off all stun related code in server, it allows for saving of server resources if your server is not behind a firewall. --> + <firewalled-server value="true" /> + + <!-- Enable to allow IPv6 connection if you have a public IPv6 address. STK currently uses dual-stack mode which requires server to have both IPv4 and IPv6 and listen to same port. If STK detects your server has no public IPv6 address or port differs between IPv4 and IPv6 then it will use IPv4 only socket. For system which doesn't support dual-stack socket (like OpenBSD) you may fail to be connected by IPv4 clients. You can override the detection in config.xml at supertuxkart config-0.10 folder, with default-ip-type option. --> + <ipv6-connection value="true" /> + + <!-- No server owner in lobby which can control the starting of game or kick any players. --> + <owner-less value="false" /> + + <!-- Time to wait before entering kart selection screen if satisfied min-start-game-players below for owner less or ranked server. --> + <start-game-counter value="60" /> + + <!-- Clients below this value will be rejected from joining this server. It's determined by number of official karts in client / number of official karts in server --> + <official-karts-threshold value="1" /> + + <!-- Clients below this value will be rejected from joining this server. It's determined by number of official tracks in client / number of official tracks in server, setting this value too high will prevent android players from joining this server, because STK android apk has some official tracks removed. --> + <official-tracks-threshold value="0.7" /> + + <!-- Only auto start kart selection when number of connected player is larger than or equals this value, for owner less or ranked server, after start-game-counter reaches 0. --> + <min-start-game-players value="2" /> + + <!-- Automatically end linear race game after 1st player finished for some time (currently his finished time * 0.25 + 15.0). --> + <auto-end value="false" /> + + <!-- Enable team choosing in lobby in team game (soccer and CTF). If owner-less is enabled and live-spectate is not enabled, than this option is always disabled. --> + <team-choosing value="true" /> + + <!-- If strict-players is on, no duplicated online id or split screen players are allowed, which can prevent someone using more than 1 network AI with this server. --> + <strict-players value="false" /> + + <!-- Server will submit ranking to stk-addons server for linear race games, you require permission for that. validating-player, auto-end, strict-player and owner-less will be turned on. --> + <ranked value="false" /> + + <!-- If true, the server owner can config the difficulty and game mode in the GUI of lobby. This option cannot be used with owner-less or grand prix server, and will be automatically turned on if the server was created using the in-game GUI. The changed difficulty and game mode will not be saved in this config file. --> + <server-configurable value="false" /> + + <!-- If true, players can live join or spectate the in-progress game. Currently live joining is only available if the current game mode used in server is FFA, CTF or soccer, also official-karts-threshold will be made 1.0. If false addon karts will use their original hitbox other than tux, all players having it restriction applies. --> + <live-spectate value="true" /> + + <!-- Time in seconds when a flag is dropped a by player in CTF returning to its own base. --> + <flag-return-timeout value="20" /> + + <!-- Time in seconds to deactivate a flag when it's captured or returned to own base by players. --> + <flag-deactivated-time value="3" /> + + <!-- Hit limit of free for all, zero to disable hit limit. --> + <hit-limit value="20" /> + + <!-- Time limit of free for all in seconds, zero to disable time limit. --> + <time-limit-ffa value="360" /> + + <!-- Capture limit of CTF, zero to disable capture limit. --> + <capture-limit value="5" /> + + <!-- Time limit of CTF in seconds, zero to disable time limit. --> + <time-limit-ctf value="600" /> + + <!-- Value used by server to automatically estimate each game time. For races, it decides the lap of each race in network game, if more than 0.0f, the number of lap of each track vote in linear race will be determined by max(1.0f, auto-game-time-ratio * default lap of that track). For soccer if more than 0.0f, for time limit game it will be auto-game-time-ratio * soccer-time-limit in UserConfig, for goal limit game it will be auto-game-time-ratio * numgoals in UserConfig, -1 to disable for all. --> + <auto-game-time-ratio value="-1" /> + + <!-- Maximum ping allowed for a player (in ms), it's recommended to use default value if live-spectate is on. --> + <max-ping value="300" /> + + <!-- Tolerance of jitter in network allowed (in ms), it's recommended to use default value if live-spectate is on. --> + <jitter-tolerance value="100" /> + + <!-- Kick players whose ping is above max-ping. --> + <kick-high-ping-players value="false" /> + + <!-- Allow players exceeding max-ping to have a playable game, if enabled kick-high-ping-players will be disabled, please also use a default value for max-ping and jitter-tolerance with it. --> + <high-ping-workaround value="true" /> + + <!-- Kick idle player which has no network activity to server for more than some seconds during game, unless he has finished the race. Negative value to disable, and this option will always be disabled for LAN server. --> + <kick-idle-player-seconds value="60" /> + + <!-- Set how many states the server will send per second, the higher this value, the more bandwidth requires, also each client will trigger more rewind, which clients with slow device may have problem playing this server, use the default value is recommended. --> + <state-frequency value="10" /> + + <!-- Use sql database for handling server stats and maintenance, STK needs to be compiled with sqlite3 supported. --> + <sql-management value="false" /> + + <!-- Database filename for sqlite to use, it can be shared for all servers created in this machine, and STK will create specific table for each server. You need to create the database yourself first, see NETWORKING.md for details --> + <database-file value="stkservers.db" /> + + <!-- Specified in millisecond for maximum time waiting in sqlite3_busy_handler. You may need a higher value if your database is shared by many servers or having a slow hard disk. --> + <database-timeout value="1000" /> + + <!-- IPv4 ban list table name, you need to create the table first, see NETWORKING.md for details, empty to disable. This table can be shared for all servers if you use the same name. STK can auto kick active peer from ban list (update per minute) whichallows live kicking peer by inserting record to database. --> + <ip-ban-table value="ip_ban" /> + + <!-- IPv6 ban list table name, you need to create the table first, see NETWORKING.md for details, empty to disable. This table can be shared for all servers if you use the same name. STK can auto kick active peer from ban list (update per minute) which allows live kicking peer by inserting record to database. --> + <ipv6-ban-table value="ipv6_ban" /> + + <!-- Online ID ban list table name, you need to create the table first, see NETWORKING.md for details, empty to disable. This table can be shared for all servers if you use the same name. STK can auto kick active peer from ban list (update per minute) which allows live kicking peer by inserting record to database. --> + <online-id-ban-table value="online_id_ban" /> + + <!-- Player reports table name, which will be written when a player reports player in the network user dialog, you need to create the table first, see NETWORKING.md for details, empty to disable. This table can be shared for all servers if you use the same name. --> + <player-reports-table value="player_reports" /> + + <!-- Days to keep player reports, older than that will be auto cleared, 0 to keep them forever. --> + <player-reports-expired-days value="3" /> + + <!-- IP geolocation table, you only need this table if you want to geolocate IP from non-stk-addons connection, as all validated players connecting from stk-addons will provide the location info, you need to create the table first, see NETWORKING.md for details, empty to disable. This table can be shared for all servers if you use the same name. --> + <ip-geolocation-table value="ip_mapping" /> + + <!-- IPv6 geolocation table, you only need this table if you want to geolocate IP from non-stk-addons connection, as all validated players connecting from stk-addons will provide the location info, you need to create the table first, see NETWORKING.md for details, empty to disable. This table can be shared for all servers if you use the same name. --> + <ipv6-geolocation-table value="ipv6_mapping" /> + + <!-- If true this server will auto add / remove AI connected with network-ai=x, which will kick N - 1 bot(s) where N is the number of human players. Only use this for non-GP racing server. --> + <ai-handling value="false" /> + + <!-- If true this server will allow AI instance to be connected from anywhere. (other than LAN network only) --> + <ai-anywhere value="false" /> + +</server-config> diff --git a/repo/supertuxkart/supertuxkart-data.xibuild b/repo/supertuxkart/supertuxkart-data.xibuild new file mode 100644 index 0000000..0c23270 --- /dev/null +++ b/repo/supertuxkart/supertuxkart-data.xibuild @@ -0,0 +1,7 @@ +#!/bin/sh + +DESC="Datafiles for SuperTuxKart" + +package () { + add_from_main usr/share/supertuxkart/data +} diff --git a/repo/supertuxkart/supertuxkart-server.xibuild b/repo/supertuxkart/supertuxkart-server.xibuild new file mode 100644 index 0000000..8dd7ea0 --- /dev/null +++ b/repo/supertuxkart/supertuxkart-server.xibuild @@ -0,0 +1,17 @@ +#!/bin/sh + +DESC="Server for supertuxkart" +DEPS="supertuxkart-data" + +package () { + cd "$BUILD_ROOT" + DESTDIR="$PKG_DEST" cmake --install build-server + + mv "$PKG_DEST"/usr/bin/supertuxkart \ + "$PKG_DEST"/usr/bin/supertuxkart-server + + rm -r "${PKG_DEST:?}"/usr/share/ + + install -Dm644 "$BUILD_ROOT"/server_config.xml \ + "$PKG_DEST"/usr/share/supertuxkart/data/server_config.xml +} diff --git a/repo/supertuxkart/supertuxkart.xibuild b/repo/supertuxkart/supertuxkart.xibuild new file mode 100644 index 0000000..ae8d7e3 --- /dev/null +++ b/repo/supertuxkart/supertuxkart.xibuild @@ -0,0 +1,42 @@ +#!/bin/sh + +NAME="supertuxkart" +DESC="Kart racing game featuring Tux and his friends" + +MAKEDEPS="bluez cmake curl freetype2 fribidi glew harfbuzz openjpeg libpng libvorbis libxkbcommon libxrandr openal-soft sdl2 sqlite3 wayland" + +PKG_VER=1.3 +SOURCE="https://github.com/supertuxkart/stk-code/releases/download/$PKG_VER/SuperTuxKart-$PKG_VER-src.tar.xz" + +ADDITIONAL=" +server_config.xml +" + +build() { + GLES2_RENDERER=OFF + + # Game + cmake -B build \ + -DCMAKE_BUILD_TYPE=None \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DBUILD_RECORDER=0 \ + -DUSE_GLES2=$GLES2_RENDERER + cmake --build build + + # Server only + cmake -B build-server \ + -DCMAKE_BUILD_TYPE=None \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DBUILD_RECORDER=0 \ + -DSERVER_ONLY=ON + cmake --build build-server +} + +package() { + DESTDIR="$PKG_DEST" cmake --install build + + # Not sure why this is in here + rm "$PKG_DEST"/usr/include/wiiuse.h +} diff --git a/repo/sxmo-dmenu/sxmo-dmenu.xibuild b/repo/sxmo-dmenu/sxmo-dmenu.xibuild new file mode 100644 index 0000000..7415638 --- /dev/null +++ b/repo/sxmo-dmenu/sxmo-dmenu.xibuild @@ -0,0 +1,29 @@ +#!/bin/sh + +NAME="sxmo-dmenu" +DESC="Dmenu fork for Sxmo UI; supports highlight, centering, volume-key navigation and more" + +MAKEDEPS=" libx11 libxinerama libxft" + +PKG_VER=5.0.13 +SOURCE="https://git.sr.ht/~mil/sxmo-dmenu/archive/$PKG_VER.tar.gz" + +prepare() { + default_prepare + sed -i -e '/CFLAGS/{s/-Os//;s/=/+=/}' \ + -e '/LDFLAGS/{s/=/+=/}' \ + "$BUILD_ROOT"/config.mk +} + +build() { + make X11INC=/usr/include/X11 \ + X11LIB=/usr/lib/X11 \ + FREETYPEINC=/usr/include/freetype2 \ + -C "$BUILD_ROOT" +} + +package() { + make DESTDIR=$PKG_DEST PREFIX=/usr \ + -C "$BUILD_ROOT" install +} + diff --git a/repo/sxmo-dwm/sxmo-dwm.xibuild b/repo/sxmo-dwm/sxmo-dwm.xibuild new file mode 100644 index 0000000..f6341aa --- /dev/null +++ b/repo/sxmo-dwm/sxmo-dwm.xibuild @@ -0,0 +1,29 @@ +#!/bin/sh + +NAME="sxmo-dwm" +DESC="Dwm fork for Sxmo UI; supports volume-key hotkeys, swallow, keyboard, among other patches" + +MAKEDEPS=" libxft libx11 libxinerama" + +PKG_VER=6.2.16 +SOURCE="https://git.sr.ht/~mil/sxmo-dwm/archive/$PKG_VER.tar.gz" + +prepare() { + default_prepare + sed -i -e '/CFLAGS/{s/-Os//;s/=/+=/}' \ + -e '/LDFLAGS/{s/=/+=/}' \ + "$BUILD_ROOT"/config.mk +} + +build() { + make X11INC=/usr/include/X11 \ + X11LIB=/usr/lib/X11 \ + FREETYPEINC=/usr/include/freetype2 \ + -C "$BUILD_ROOT" +} + +package() { + make PREFIX=/usr DESTDIR="$PKG_DEST" \ + -C "$BUILD_ROOT" install +} + diff --git a/repo/tor/tor.xibuild b/repo/tor/tor.xibuild index 8f3e197..940da31 100644 --- a/repo/tor/tor.xibuild +++ b/repo/tor/tor.xibuild @@ -3,7 +3,7 @@ NAME="tor" DESC="Anonymous network connectivity" -MAKEDEPS=" libcap libseccomp libevent openssl1.1-compat ca-certificates zlib xz zstd" +MAKEDEPS=" libcap libseccomp libevent openssl cacerts zlib xz zstd" PKG_VER=0.4.6.10 SOURCE="https://www.torproject.org/dist/tor-$PKG_VER.tar.gz" diff --git a/repo/twm/twm.xibuild b/repo/twm/twm.xibuild new file mode 100644 index 0000000..ac0764b --- /dev/null +++ b/repo/twm/twm.xibuild @@ -0,0 +1,21 @@ +#!/bin/sh + +NAME="twm" +DESC="Tom's or Tab Window Manager for the X Window System" + +MAKEDEPS=" bison xorg-util-macros libxext libx11 libxt libice libxmu" + +PKG_VER=1.0.11 +SOURCE="https://www.x.org/releases/individual/app/twm-$PKG_VER.tar.xz" + +build() { + ./configure \ + --prefix=/usr \ + --datarootdir=/usr/share + make +} + +package() { + make DESTDIR="$PKG_DEST" install +} + diff --git a/repo/which/which.xibuild b/repo/which/which.xibuild index ea246fa..2914eb3 100644 --- a/repo/which/which.xibuild +++ b/repo/which/which.xibuild @@ -1,7 +1,6 @@ #!/bin/sh MAKEDEPS="make " -DEPS="musl bash" PKG_VER=2.21 diff --git a/repo/zsh/zsh.xibuild b/repo/zsh/zsh.xibuild index 76f93b5..fa52a38 100644 --- a/repo/zsh/zsh.xibuild +++ b/repo/zsh/zsh.xibuild @@ -4,7 +4,6 @@ NAME="zsh" DESC="Very advanced and programmable command interpreter (shell)" MAKEDEPS="make " -DEPS="sbase libcap musl ncurses " PKG_VER=5.8.1 SOURCE="https://download.sourceforge.net/project/zsh/zsh/$PKG_VER/zsh-$PKG_VER.tar.xz" diff --git a/skip/pavucontrol/pavucontrol.xibuild b/skip/pavucontrol/pavucontrol.xibuild new file mode 100644 index 0000000..2ce0f0f --- /dev/null +++ b/skip/pavucontrol/pavucontrol.xibuild @@ -0,0 +1,30 @@ +#!/bin/sh + +NAME="pavucontrol" +DESC="Pulseaudio Volume Control, GTK based mixer for Pulseaudio" + +MAKEDEPS="m4 automake gtkmm3 pulseaudio libcanberra libcanberra-gtk3 json-glib" + +PKG_VER=5.0 +SOURCE="https://freedesktop.org/software/pulseaudio/pavucontrol/pavucontrol-$PKG_VER.tar.gz" + +build() { + ./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --localstatedir=/var \ + --datadir=/usr/share \ + --disable-lynx \ + --disable-nls + make +} + +check() { + make check +} + +package() { + make DESTDIR="$PKG_DEST" install +} + diff --git a/skip/screen/screen.xibuild b/skip/screen/screen.xibuild new file mode 100644 index 0000000..e5e08c1 --- /dev/null +++ b/skip/screen/screen.xibuild @@ -0,0 +1,43 @@ +#!/bin/sh + +NAME="screen" +DESC="Window manager that multiplexes a physical terminal" + +MAKEDEPS="autoconf automake utmps ncurses ncurses libutempter" + +PKG_VER=4.9.0 +SOURCE="https://ftp.gnu.org/gnu/screen/screen-$PKG_VER.tar.gz" + +ADDITIONAL=" +utmpx.patch +" + +prepare() { + ./autogen.sh +} + +build() { + CFLAGS="$CFLAGS -DNONETHACK -DGETUTENT -I/usr/include/utmps" \ + LIBS="-lutmps -lskarnet" ./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --with-sys-screenrc=/etc/screenrc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --enable-colors256 \ + --enable-telnet \ + --enable-rxvt_osc + make +} + +package() { + make -j1 DESTDIR="$PKG_DEST" install + + # remove suid root + find "$PKG_DEST" -type f -perm -u+s \ + | xargs chmod -s + + install -Dm644 etc/etcscreenrc "$PKG_DEST"/etc/screenrc + install -Dm644 etc/screenrc "$PKG_DEST"/etc/skel/.screenrc +} + diff --git a/skip/screen/utmpx.patch b/skip/screen/utmpx.patch new file mode 100644 index 0000000..c8c6f44 --- /dev/null +++ b/skip/screen/utmpx.patch @@ -0,0 +1,21 @@ +--- screen-4.6.2/os.h.old 2018-09-27 23:11:11.655480028 -0700 ++++ screen-4.6.2/os.h 2018-09-27 23:11:34.745808665 -0700 +@@ -250,17 +250,13 @@ + #endif + + #if defined(UTMPOK) || defined(BUGGYGETLOGIN) +-# if defined(SVR4) && !defined(DGUX) && !defined(__hpux) && !defined(linux) ++# if defined(linux) + # include <utmpx.h> + # define UTMPFILE UTMPX_FILE + # define utmp utmpx +-# define getutent getutxent + # define getutid getutxid + # define getutline getutxline + # define pututline pututxline +-# define setutent setutxent +-# define endutent endutxent +-# define ut_time ut_xtime + # else /* SVR4 */ + # include <utmp.h> + # endif /* SVR4 */ diff --git a/skip/zynaddsubfx/zynaddsubfx-3.0.6-libzest_location.patch b/skip/zynaddsubfx/zynaddsubfx-3.0.6-libzest_location.patch new file mode 100644 index 0000000..ce14e67 --- /dev/null +++ b/skip/zynaddsubfx/zynaddsubfx-3.0.6-libzest_location.patch @@ -0,0 +1,13 @@ +diff --git i/src/Plugin/ZynAddSubFX/ZynAddSubFX-UI-Zest.cpp w/src/Plugin/ZynAddSubFX/ZynAddSubFX-UI-Zest.cpp +index 0829e889..010e1fac 100644 +--- i/src/Plugin/ZynAddSubFX/ZynAddSubFX-UI-Zest.cpp ++++ w/src/Plugin/ZynAddSubFX/ZynAddSubFX-UI-Zest.cpp +@@ -68,7 +68,7 @@ public: + #else + handle = dlopen("./libzest.so", RTLD_LAZY); + if(!handle) +- handle = dlopen("/opt/zyn-fusion/libzest.so", RTLD_LAZY); ++ handle = dlopen("/usr/lib/zynaddsubfx/libzest.so", RTLD_LAZY); + if(!handle) + handle = dlopen("libzest.so", RTLD_LAZY); + #endif diff --git a/skip/zynaddsubfx/zynaddsubfx-3.0.6-system_rtosc.patch b/skip/zynaddsubfx/zynaddsubfx-3.0.6-system_rtosc.patch new file mode 100644 index 0000000..799ff8e --- /dev/null +++ b/skip/zynaddsubfx/zynaddsubfx-3.0.6-system_rtosc.patch @@ -0,0 +1,92 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5c708574..ef17dbd3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -10,24 +10,34 @@ if(DEFINED ZYN_DATADIR) + add_definitions(-DZYN_DATADIR="${ZYN_DATADIR}") + endif() + ++option(ZYN_SYSTEM_RTOSC "Use system provided librtosc and librtosc-cpp" OFF) ++ + #Include RTOSC +-if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/rtosc/CMakeLists.txt") +- message(STATUS "RTOSC NOT FOUND") +- message(STATUS "Attempting to checkout submodule") +- find_package(Git REQUIRED) +- execute_process(COMMAND git submodule update --init --recursive) ++if(ZYN_SYSTEM_RTOSC) ++ include(FindPkgConfig) ++ pkg_check_modules(RTOSC REQUIRED librtosc) ++ pkg_check_modules(RTOSC_CPP REQUIRED librtosc-cpp) ++ include_directories(${RTOSC_INCLUDE_DIR}) ++ message(STATUS "Found system provided librtosc and librtosc-cpp...") ++else() + if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/rtosc/CMakeLists.txt") +- message(FATAL_ERROR "FAILED TO CHECKOUT RTOSC\n" +- "please check file permissions and your network") ++ message(STATUS "RTOSC NOT FOUND") ++ message(STATUS "Attempting to checkout submodule") ++ find_package(Git REQUIRED) ++ execute_process(COMMAND git submodule update --init --recursive) ++ if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/rtosc/CMakeLists.txt") ++ message(FATAL_ERROR "FAILED TO CHECKOUT RTOSC\n" ++ "please check file permissions and your network") ++ endif() ++ else() ++ message(STATUS "Found Rtosc Submodule...") + endif() +-else() +- message(STATUS "Found Rtosc Submodule...") +-endif() + +-set(RTOSC_NO_INSTALL TRUE) +-include("rtosc/cmake/ColorMessage.cmake") +-add_subdirectory(rtosc) +-include_directories(rtosc/include) ++ set(RTOSC_NO_INSTALL TRUE) ++ include("rtosc/cmake/ColorMessage.cmake") ++ add_subdirectory(rtosc) ++ include_directories(rtosc/include) ++endif() + + enable_testing() + include(CTestConfig.cmake) +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 2900f4b7..8348df70 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -575,13 +575,27 @@ else() + set(PTHREAD_LIBRARY pthread) + endif() + +-target_link_libraries(zynaddsubfx_core +- ${ZLIB_LIBRARIES} +- ${FFTW3F_LIBRARIES} +- ${MXML_LIBRARIES} +- ${OS_LIBRARIES} +- ${PTHREAD_LIBRARY} +- rtosc rtosc-cpp) ++if(ZYN_SYSTEM_RTOSC) ++ target_link_libraries(zynaddsubfx_core ++ ${ZLIB_LIBRARIES} ++ ${FFTW3F_LIBRARIES} ++ ${MXML_LIBRARIES} ++ ${OS_LIBRARIES} ++ ${PTHREAD_LIBRARY} ++ ${RTOSC_LIBRARIES} ++ ${RTOSC_CPP_LIBRARIES} ++ ) ++else() ++ target_link_libraries(zynaddsubfx_core ++ ${ZLIB_LIBRARIES} ++ ${FFTW3F_LIBRARIES} ++ ${MXML_LIBRARIES} ++ ${OS_LIBRARIES} ++ ${PTHREAD_LIBRARY} ++ rtosc ++ rtosc-cpp ++ ) ++endif() + + if(IwyuErr) + message (STATUS "Include what you use: ${IwyuErr}") diff --git a/skip/zynaddsubfx/zynaddsubfx-mruby-zest-build-3.0.6-cflags_ldflags.patch b/skip/zynaddsubfx/zynaddsubfx-mruby-zest-build-3.0.6-cflags_ldflags.patch new file mode 100644 index 0000000..09dca6f --- /dev/null +++ b/skip/zynaddsubfx/zynaddsubfx-mruby-zest-build-3.0.6-cflags_ldflags.patch @@ -0,0 +1,21 @@ +diff --git i/Makefile w/Makefile +index 7bc3788..3af1cce 100644 +--- i/Makefile ++++ w/Makefile +@@ -16,10 +16,14 @@ linux: + $(CC) -shared -o libzest.so `find mruby/build/host -type f | grep -v mrbc | grep -e "\.o$$" | grep -v bin` ./deps/libnanovg.a \ + ./deps/libnanovg.a \ + src/osc-bridge/libosc-bridge.a \ +- `pkg-config --libs libuv` -lm -lX11 -lGL -lpthread ++ $(CFLAGS) \ ++ `pkg-config --libs libuv` -lm -lX11 -lGL -lpthread \ ++ $(LDFLAGS) + $(CC) test-libversion.c deps/pugl/pugl/pugl_x11.c \ ++ $(CFLAGS) \ + -DPUGL_HAVE_GL \ +- -ldl -o zest -lX11 -lGL -lpthread -I deps/pugl -std=gnu99 -Wno-trigraphs ++ -ldl -o zest -lX11 -lGL -lpthread -I deps/pugl -std=gnu99 -Wno-trigraphs \ ++ $(LDFLAGS) + + osx: deps/libuv.a + ruby ./rebuild-fcache.rb diff --git a/skip/zynaddsubfx/zynaddsubfx-mruby-zest-build-3.0.6-devendor_rtosc.patch b/skip/zynaddsubfx/zynaddsubfx-mruby-zest-build-3.0.6-devendor_rtosc.patch new file mode 100644 index 0000000..38e84e1 --- /dev/null +++ b/skip/zynaddsubfx/zynaddsubfx-mruby-zest-build-3.0.6-devendor_rtosc.patch @@ -0,0 +1,14 @@ +diff --git i/src/mruby-widget-lib/src/gem.c w/src/mruby-widget-lib/src/gem.c +index 8e3d721..7f200e3 100644 +--- i/src/mruby-widget-lib/src/gem.c ++++ w/src/mruby-widget-lib/src/gem.c +@@ -11,8 +11,8 @@ + #ifdef WIN32 + #include <windows.h> + #endif ++#include <rtosc/rtosc.h> + #include "../../../deps/pugl/pugl/pugl.h" +-#include "../../../deps/rtosc/include/rtosc/rtosc.h" + #include "../../../src/osc-bridge/src/bridge.h" + #include "../../../deps/mruby-nanovg/src/gl_core.3.2.h" + diff --git a/skip/zynaddsubfx/zynaddsubfx-mruby-zest-build-3.0.6-libzest_location.patch b/skip/zynaddsubfx/zynaddsubfx-mruby-zest-build-3.0.6-libzest_location.patch new file mode 100644 index 0000000..26dad92 --- /dev/null +++ b/skip/zynaddsubfx/zynaddsubfx-mruby-zest-build-3.0.6-libzest_location.patch @@ -0,0 +1,13 @@ +diff --git i/test-libversion.c w/test-libversion.c +index 808c01f..a122585 100644 +--- i/test-libversion.c ++++ w/test-libversion.c +@@ -660,7 +660,7 @@ int main(int argc, char **argv) + if(!handle) + handle = dlopen("libzest.so", RTLD_LAZY); + if(!handle) +- handle = dlopen("/opt/zyn-fusion/libzest.so", RTLD_LAZY); ++ handle = dlopen("/usr/lib/zynaddsubfx/libzest.so", RTLD_LAZY); + #endif + if(!handle) { + printf("[ERROR] Cannot Open libzest.so\n"); diff --git a/skip/zynaddsubfx/zynaddsubfx-mruby-zest-build-3.0.6-makefile_find.patch b/skip/zynaddsubfx/zynaddsubfx-mruby-zest-build-3.0.6-makefile_find.patch new file mode 100644 index 0000000..d6e3a93 --- /dev/null +++ b/skip/zynaddsubfx/zynaddsubfx-mruby-zest-build-3.0.6-makefile_find.patch @@ -0,0 +1,75 @@ +From c1f5fcbad97c20b14a35e894477081d69519f6b0 Mon Sep 17 00:00:00 2001 +From: David Runge <dave@sleepmap.de> +Date: Sat, 21 May 2022 13:19:48 +0200 +Subject: [PATCH] Use find internals instead of piping into grep + +Makefile: +Use GNU find internals (e.g. `-iname`, `-exec` and conditionals) instead +of piping into multiple instances of grep. +Simplify line counting by using wc from find. +--- + Makefile | 24 ++++++++++++------------ + 1 file changed, 12 insertions(+), 12 deletions(-) + +diff --git a/Makefile b/Makefile +index 7bc3788c..a78568e9 100644 +--- a/Makefile ++++ b/Makefile +@@ -13,7 +13,7 @@ linux: + # force rebuilding all code that depends on hotloading. + touch src/mruby-widget-lib/src/api.c + cd mruby && $(HOTLOADING) MRUBY_CONFIG=../build_config.rb rake +- $(CC) -shared -o libzest.so `find mruby/build/host -type f | grep -v mrbc | grep -e "\.o$$" | grep -v bin` ./deps/libnanovg.a \ ++ $(CC) -shared -o libzest.so `find mruby/build/host -type f \( -not -iwholename "*mrbc*" -a -not -iwholename "*bin*" -a -iname "*.o" \)` \ + ./deps/libnanovg.a \ + src/osc-bridge/libosc-bridge.a \ + `pkg-config --libs libuv` -lm -lX11 -lGL -lpthread +@@ -30,7 +30,7 @@ osx: deps/libuv.a + cd deps/pugl && python2 ./waf + cd src/osc-bridge && CFLAGS="-I ../../deps/libuv/include " make lib + cd mruby && MRUBY_CONFIG=../build_config.rb rake +- $(CC) -shared -o libzest.so `find mruby/build/host -type f | grep -v mrbc | grep -e "\.o$$" | grep -v bin` ./deps/libnanovg.a \ ++ $(CC) -shared -o libzest.so `find mruby/build/host -type f \( -not -iwholename "*mrbc*" -a -not -iwholename "*bin*" -a -iname "*.o" \)` ./deps/libnanovg.a \ + ./deps/libnanovg.a \ + src/osc-bridge/libosc-bridge.a \ + ./deps/libuv/.libs/libuv.a -lm -framework OpenGL -lpthread +@@ -41,7 +41,7 @@ windows: buildpuglwin deps/libuv-win.a + $(AR) rc deps/libnanovg.a deps/nanovg/src/*.o + cd src/osc-bridge && CFLAGS="-mstackrealign -I ../../deps/libuv/include " make lib + cd mruby && WINDOWS=1 MRUBY_CONFIG=../build_config.rb rake +- $(CC) -mstackrealign -shared -o libzest.dll -static-libgcc `find mruby/build/w64 -type f | grep -e "\.o$$" | grep -v bin` \ ++ $(CC) -mstackrealign -shared -o libzest.dll -static-libgcc `find mruby/build/w64 -type f \( -not -iwholename "*mrbc*" -a -not -iwholename "*bin*" -a -iname "*.o" \)` \ + ./deps/libnanovg.a \ + src/osc-bridge/libosc-bridge.a \ + ./deps/libuv-win.a \ +@@ -98,21 +98,21 @@ stats: + @echo 'mruby-qml-parse commits: ' `cd src/mruby-qml-parse && git log --oneline | wc -l` + @echo 'mruby-qml-spawn commits: ' `cd src/mruby-qml-spawn && git log --oneline | wc -l` + @echo 'osc-bridge commits: ' `cd src/osc-bridge && git log --oneline | wc -l` +- @echo 'number of qml files:' `find src/ -type f | grep -e qml$$ | wc -l` +- @echo 'number of ruby files:' `find src/ -type f | grep -e rb$$ | wc -l` +- @echo 'number of c files:' `find src/ -type f | grep -e c$$ | wc -l` +- @echo 'number of header files:' `find src/ -type f | grep -e h$$ | wc -l` ++ @echo 'number of qml files:' `find src/ -type f -iname "*.qml" | wc -l` ++ @echo 'number of ruby files:' `find src/ -type f -iname "*.rb" | wc -l` ++ @echo 'number of c files:' `find src/ -type f -iname "*.c" | wc -l` ++ @echo 'number of header files:' `find src/ -type f -iname "*.h" | wc -l` + @echo 'lines of OSC schema:' `wc -l src/osc-bridge/schema/test.json` + @echo 'lines of qml:' +- @wc -l `find src/ -type f | grep qml$$` | tail -n 1 ++ @`find src/ -type f -iname "*.qml" -exec wc -l {} +` | tail -n 1 + @echo 'lines of ruby:' +- @wc -l `find src/ -type f | grep -e rb$$ | grep -v fcache` | tail -n 1 ++ @`find src/ -type f \( -iname "*.rb" -a -not -iwholename "*fcache*" \) -exec wc -l {} +` | tail -n 1 + @echo 'lines of c source:' +- @wc -l `find src/ -type f | grep -e c$$` | tail -n 1 ++ @`find src/ -type f -iname "*.c" -exec wc -l {} +` | tail -n 1 + @echo 'lines of c header:' +- @wc -l `find src/ -type f | grep -e h$$` | tail -n 1 ++ @`find src/ -type f -iname "*.h" -exec wc -l {} +` | tail -n 1 + @echo 'total lines of code:' +- @wc -l `find src/ -type f | grep -Ee "(qml|rb|c|h)$$" | grep -v fcache` | tail -n 1 ++ @`find src/ -type f \( -iname "*.qml" -o -iname "*.rb" -o -iname "*.c" -o -iname "*.h" -a -not -iwholename "*fcache*" \) -exec wc -l {} +` | tail -n 1 + + + verbose: ## Compile mruby with --trace diff --git a/skip/zynaddsubfx/zynaddsubfx-mruby-zest-build-3.0.6-system_wide_location.patch b/skip/zynaddsubfx/zynaddsubfx-mruby-zest-build-3.0.6-system_wide_location.patch new file mode 100644 index 0000000..101ea3b --- /dev/null +++ b/skip/zynaddsubfx/zynaddsubfx-mruby-zest-build-3.0.6-system_wide_location.patch @@ -0,0 +1,46 @@ +diff --git i/src/mruby-widget-lib/mrblib/script.rb w/src/mruby-widget-lib/mrblib/script.rb +index 2d3e7fc..4dbd3c7 100644 +--- i/src/mruby-widget-lib/mrblib/script.rb ++++ w/src/mruby-widget-lib/mrblib/script.rb +@@ -160,13 +160,13 @@ class ZRunner + search = @search_path + search ||= "" + font_error = false +- sans = [search + "font/Roboto-Regular.ttf", "deps/nanovg/example/Roboto-Regular.ttf"] ++ sans = ["/usr/share/fonts/TTF/Roboto-Regular.ttf", search + "font/Roboto-Regular.ttf", "deps/nanovg/example/Roboto-Regular.ttf"] + if(@vg.create_font('sans', sans[0]) == -1 && @vg.create_font('sans', sans[1]) == -1) + GL::debug "[ERROR] could not find sans font" + font_error = true + end + +- bold = [search + "font/Roboto-Bold.ttf", "deps/nanovg/example/Roboto-Bold.ttf"] ++ bold = ["/usr/share/fonts/TTF/Roboto-Bold.ttf", search + "font/Roboto-Bold.ttf", "deps/nanovg/example/Roboto-Bold.ttf"] + if(@vg.create_font('bold', bold[0]) == -1 && @vg.create_font('bold', bold[1]) == -1) + GL::debug "[ERROR] could not find bold font" + font_error = true +diff --git i/src/mruby-widget-lib/src/api.c w/src/mruby-widget-lib/src/api.c +index 6949413..1118717 100644 +--- i/src/mruby-widget-lib/src/api.c ++++ w/src/mruby-widget-lib/src/api.c +@@ -110,7 +110,7 @@ zest_open(char *address) + if(strstr(path, "libzest")) + strstr(path, "libzest")[0] = 0; + char path2[256]; +- snprintf(path2, sizeof(path2), "%s%s", path, "./qml/MainWindow.qml"); ++ snprintf(path2, sizeof(path2), "%s%s", path, "../../share/zynaddsubfx/qml/MainWindow.qml"); + FILE *f = fopen(path2, "r"); + if(f) { + printf("[INFO:Zyn] Found Assets at %s\n", path); +diff --git i/src/osc-bridge/src/bridge.c w/src/osc-bridge/src/bridge.c +index f87c849..6405bbb 100644 +--- i/src/osc-bridge/src/bridge.c ++++ w/src/osc-bridge/src/bridge.c +@@ -431,7 +431,7 @@ schema_t br_get_schema(bridge_t *br, uri_t uri) + schema_t sch; + + //printf("[debug] loading json file\n"); +- FILE *f = fopen("schema/test.json", "r"); ++ FILE *f = fopen("/usr/share/zynaddsubfx/schema/test.json", "r"); + if(!f && br->search_path) { + char tmp[256]; + snprintf(tmp, sizeof(tmp), "%s%s", br->search_path, "schema/test.json"); diff --git a/skip/zynaddsubfx/zynaddsubfx.xibuild b/skip/zynaddsubfx/zynaddsubfx.xibuild new file mode 100644 index 0000000..6362364 --- /dev/null +++ b/skip/zynaddsubfx/zynaddsubfx.xibuild @@ -0,0 +1,23 @@ +#!/bin/sh + +NAME="zynaddsubfx" +DESC="Opensource software synthesizer capable of making a countless number of instruments." + +MAKEDEPS="cmake jack fltk portaudio mxml sndio bash-completion liblo" +DEPS="less " + +PKG_VER=3.0.6 +SOURCE="https://downloads.sourceforge.net/project/zynaddsubfx/zynaddsubfx/$PKG_VER/zynaddsubfx-$PKG_VER.tar.bz2" +ADDITIONAL=" +" + +build () { + cmake -B build \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=/usr/lib + cmake --build build +} + +package () { + DESTDIR="$PKG_DEST" cmake --install build +} diff --git a/wishlist.md b/wishlist.md index aa49aa3..1c5abb0 100644 --- a/wishlist.md +++ b/wishlist.md @@ -16,17 +16,20 @@ [x] sxiv [x] feh [x] gimp -[ ] lmms +[x] lmms [?] ardour [x] cava [x] pcmanfm [ ] thunar [x] zathura [x] polybar +[x] berry +[x] openbox +[x] i3wm [ ] gnu screen [x] tmux -[ ] ImageMagick +?[ ] ImageMagick [x] nmap [x] exiftool [x] mpc @@ -35,13 +38,9 @@ [x] working xorg [x] sshd (openssh) [ ] broadcom wl drivers -[ ] bluetoothctl +?[ ] bluetoothctl -!! -[x] lame [ ] the one true awk -[ ] mksh by default -[ ] full build using clang - +[x] mksh by default |