From 5411a9d1fdc44c6654ca3941b65d705cb2f62502 Mon Sep 17 00:00:00 2001 From: Martchus Date: Mon, 7 Mar 2022 10:50:48 +0100 Subject: [PATCH] Update static libraries * Use an older glibc so resulting binaries can run on older systems (without having to link statically against glibc) * Call packages static-compat-* to make it clear that these packages are intended for compatibility with older distributions * Add further libraries to get static-compat-qt6-base and some other static-compat-qt6-* packages building --- README.md | 56 +- boost/static-compat/PKGBUILD | 85 + brotli/static-compat/PKGBUILD | 54 + bzip2/{static => static-compat}/PKGBUILD | 18 +- bzip2/{static => static-compat}/bzip2.pc | 0 c++utilities/static-compat/PKGBUILD | 49 + cmake/static-compat/PKGBUILD | 25 + cmake/static-compat/static-compat-cmake.sh | 14 + .../toolchain-static-compat.cmake | 13 + configure/static-compat/PKGBUILD | 17 + .../static-compat/static-compat-configure.sh | 19 + cppunit/default/PKGBUILD | 31 + cppunit/static-compat/PKGBUILD | 33 + dbus/{static => static-compat}/PKGBUILD | 33 +- .../dbus-reload.hook | 0 .../no-fatal-warnings.diff | 8 +- devel/generator/generate.pl | 5 +- .../layouts/static-compat-qt6-base.sh.ep | 108 + .../layouts/static-compat-qt6-module.sh.ep | 63 + devel/qt5/update-patches.sh | 7 +- double-conversion/static-compat/PKGBUILD | 30 + environment/static-compat/PKGBUILD | 15 + .../static-compat-environment.sh | 12 + expat/{static => static-compat}/PKGBUILD | 20 +- fontconfig/static-compat/PKGBUILD | 50 + fontconfig/static/PKGBUILD | 64 - freetype2-bootstrap/{static => static-compat} | 0 ...0001-Enable-table-validation-modules.patch | 43 +- .../0002-Enable-subpixel-rendering.patch | 23 +- ...3-Enable-infinality-subpixel-hinting.patch | 25 +- .../0004-Enable-long-PCF-family-names.patch | 23 +- ...0001-Enable-table-validation-modules.patch | 42 - .../0002-Enable-subpixel-rendering.patch | 22 - ...3-Enable-infinality-subpixel-hinting.patch | 24 - .../0004-Enable-long-PCF-family-names.patch | 22 - freetype2/static-bootstrap/PKGBUILD | 56 - ...0001-Enable-table-validation-modules.patch | 1 + .../0002-Enable-subpixel-rendering.patch | 1 + ...3-Enable-infinality-subpixel-hinting.patch | 1 + .../0004-Enable-long-PCF-family-names.patch | 1 + freetype2/static-compat-bootstrap/PKGBUILD | 66 + ...0001-Enable-table-validation-modules.patch | 1 + .../0002-Enable-subpixel-rendering.patch | 1 + ...3-Enable-infinality-subpixel-hinting.patch | 1 + .../0004-Enable-long-PCF-family-names.patch | 1 + freetype2/{static => static-compat}/PKGBUILD | 38 +- ...0001-Enable-table-validation-modules.patch | 42 - .../0002-Enable-subpixel-rendering.patch | 22 - ...3-Enable-infinality-subpixel-hinting.patch | 24 - .../0004-Enable-long-PCF-family-names.patch | 22 - gcc/static-compat/PKGBUILD | 378 +++ gcc/static-compat/PKGBUILD.orig | 468 +++ gcc/static-compat/c89 | 10 + gcc/static-compat/c99 | 10 + gcc/static-compat/gcc-ada-repro.patch | 15 + gcc/static-compat/gdc_phobos_path.patch | 14 + ...mas-Remove-noisy-deprecation-warnin.patch} | 19 +- glib2/{static => static-compat}/PKGBUILD | 40 +- glibc/static-compat/PKGBUILD | 194 ++ glibc/static-compat/PKGBUILD.orig | 211 ++ glibc/static-compat/bz20338.patch | 114 + graphite/{static => static-compat}/PKGBUILD | 15 +- harfbuzz/{static => static-compat}/PKGBUILD | 26 +- keyutils/{static => static-compat}/PKGBUILD | 19 +- .../reproducible.patch | 0 .../request-key.conf.patch | 0 libb2/{static => static-compat}/PKGBUILD | 18 +- libcap/static-compat/PKGBUILD | 43 + ...1_install_the_mouse-dpi-tool_man_page.diff | 27 + libevdev/static-compat/PKGBUILD | 47 + libffi/{static => static-compat}/PKGBUILD | 14 +- libgcrypt/{static => static-compat}/PKGBUILD | 17 +- libglvnd/{static => static-compat}/LICENSE | 0 libglvnd/static-compat/PKGBUILD | 37 + libglvnd/static/PKGBUILD | 35 - .../{static => static-compat}/PKGBUILD | 17 +- libgudev/static-compat/PKGBUILD | 47 + libice/{static => static-compat}/PKGBUILD | 16 +- libinput/default/PKGBUILD | 44 + libinput/static-compat/PKGBUILD | 53 + libjpeg-turbo/static-compat/PKGBUILD | 51 + libpng/{static => static-compat}/PKGBUILD | 14 +- libsm/{static => static-compat}/PKGBUILD | 13 +- libwacom/static-compat/PKGBUILD | 43 + libx11/static-compat/PKGBUILD | 45 + libx11/static/PKGBUILD | 45 - libxau/{static => static-compat}/PKGBUILD | 12 +- libxcb/{static => static-compat}/PKGBUILD | 14 +- libxcomposite/static-compat/PKGBUILD | 34 + libxdamage/static-compat/PKGBUILD | 31 + libxdmcp/{static => static-compat}/PKGBUILD | 16 +- libxext/{static => static-compat}/PKGBUILD | 13 +- libxfixes/static-compat/PKGBUILD | 37 + .../{static => static-compat}/PKGBUILD | 19 +- libxml2/static-compat/PKGBUILD | 78 + ...libxml2-2.9.8-python3-unicode-errors.patch | 0 libxml2/static-compat/no-fuzz.diff | 24 + libxml2/static/PKGBUILD | 89 - ...relaxed-approach-to-nested-documents.patch | 33 - .../libxml2-2.9.10-CVE-2019-20388.patch | 33 - .../libxml2-2.9.10-CVE-2020-24977.patch | 36 - .../static/libxml2-2.9.10-CVE-2020-7595.patch | 32 - .../libxml2-2.9.10-fix-integer-overflow.patch | 41 - libxml2/static/libxml2-2.9.10-icu68.patch | 28 - ...xml2-2.9.10-parenthesize-type-checks.patch | 92 - libxmu/static-compat/PKGBUILD | 32 + libxt/static-compat/PKGBUILD | 37 + libxxf86vm/static-compat/PKGBUILD | 35 + linux-api-headers/static-compat/PKGBUILD | 35 + lz4/static-compat/PKGBUILD | 50 + lz4/static/PKGBUILD | 33 - md4c/static-compat/PKGBUILD | 29 + meson/static-compat/PKGBUILD | 16 + .../static-compat/meson-static-compat-wrapper | 22 + mtdev/static-compat/PKGBUILD | 39 + ncurses/static-compat/PKGBUILD | 62 + ncurses/static-compat/ncurses-6.3-libs.patch | 58 + .../static-compat/ncurses-6.3-pkgconfig.patch | 24 + openssl/{static => static-compat}/PKGBUILD | 21 +- .../{static => static-compat}/ca-dir.patch | 0 pcre/{static => static-compat}/PKGBUILD | 17 +- pcre2/{static => static-compat}/PKGBUILD | 13 +- qt6-5compat/static-compat/PKGBUILD | 49 + qt6-5compat/static-compat/PKGBUILD.sh.ep | 12 + .../static-compat/qt5compat-sha256.txt | 1 + ...via-pkg-config-for-correct-handling-.patch | 1 + ...-dependency-of-xcb-image-on-xcb-util.patch | 1 + ...erties-of-PkgConfig-targets-for-glib.patch | 1 + qt6-base/android-aarch64/PKGBUILD | 22 +- qt6-base/default/qt6-base-cflags.patch | 46 + qt6-base/default/qt6-base-nostrip.patch | 13 + ...via-pkg-config-for-correct-handling-.patch | 1 + ...-dependency-of-xcb-image-on-xcb-util.patch | 1 + ...erties-of-PkgConfig-targets-for-glib.patch | 1 + qt6-base/mingw-w64-static/PKGBUILD | 22 +- ...Make-s-default-import-library-suffix.patch | 4 +- .../mingw-w64/0002-Fix-finding-D-Bus.patch | 4 +- ...03-Fix-using-static-PCRE2-and-DBus-1.patch | 4 +- ...ive-dependencies-of-static-libraries.patch | 4 +- ...orkaround-for-conflict-with-rpcndr.h.patch | 4 +- ...inding-static-MariaDB-client-library.patch | 4 +- ...-CMAKE_FIND_LIBRARY_SUFFIXES-to-pref.patch | 4 +- ...s-in-rasterization-code-using-setjmp.patch | 4 +- ...via-pkg-config-for-correct-handling-.patch | 63 + ...-dependency-of-xcb-image-on-xcb-util.patch | 48 + ...erties-of-PkgConfig-targets-for-glib.patch | 74 + qt6-base/mingw-w64/PKGBUILD | 24 +- ...Make-s-default-import-library-suffix.patch | 1 + .../0002-Fix-finding-D-Bus.patch | 1 + ...03-Fix-using-static-PCRE2-and-DBus-1.patch | 1 + ...ive-dependencies-of-static-libraries.patch | 1 + ...orkaround-for-conflict-with-rpcndr.h.patch | 1 + ...inding-static-MariaDB-client-library.patch | 1 + ...-CMAKE_FIND_LIBRARY_SUFFIXES-to-pref.patch | 1 + ...s-in-rasterization-code-using-setjmp.patch | 1 + ...via-pkg-config-for-correct-handling-.patch | 1 + ...-dependency-of-xcb-image-on-xcb-util.patch | 1 + ...erties-of-PkgConfig-targets-for-glib.patch | 1 + qt6-base/static-compat/PKGBUILD | 120 + qt6-base/static-compat/PKGBUILD.sh.ep | 1 + qt6-base/static-compat/qtbase-sha256.txt | 1 + qt6-charts/static-compat/PKGBUILD | 48 + qt6-charts/static-compat/PKGBUILD.sh.ep | 11 + qt6-charts/static-compat/qtcharts-sha256.txt | 1 + qt6-connectivity/static-compat/PKGBUILD | 49 + qt6-connectivity/static-compat/PKGBUILD.sh.ep | 12 + .../static-compat/qtconnectivity-sha256.txt | 1 + qt6-datavis3d/static-compat/PKGBUILD | 49 + qt6-datavis3d/static-compat/PKGBUILD.sh.ep | 12 + .../static-compat/qtdatavis3d-sha256.txt | 1 + qt6-declarative/static-compat/PKGBUILD | 48 + qt6-declarative/static-compat/PKGBUILD.sh.ep | 11 + .../static-compat/qtdeclarative-sha256.txt | 1 + qt6-imageformats/static-compat/PKGBUILD | 51 + qt6-imageformats/static-compat/PKGBUILD.sh.ep | 14 + .../static-compat/qtimageformats-sha256.txt | 1 + qt6-lottie/static-compat/PKGBUILD | 49 + qt6-lottie/static-compat/PKGBUILD.sh.ep | 12 + qt6-lottie/static-compat/qtlottie-sha256.txt | 1 + qt6-multimedia/static-compat/PKGBUILD | 49 + qt6-multimedia/static-compat/PKGBUILD.sh.ep | 12 + .../static-compat/qtmultimedia-sha256.txt | 1 + qt6-networkauth/default/PKGBUILD | 31 + qt6-networkauth/static-compat/PKGBUILD | 48 + qt6-networkauth/static-compat/PKGBUILD.sh.ep | 11 + .../static-compat/qtnetworkauth-sha256.txt | 1 + qt6-quick3d/static-compat/PKGBUILD | 50 + qt6-quick3d/static-compat/PKGBUILD.sh.ep | 17 + .../static-compat/qtquick3d-sha256.txt | 1 + qt6-shadertools/static-compat/PKGBUILD | 48 + qt6-shadertools/static-compat/PKGBUILD.sh.ep | 11 + .../static-compat/qtshadertools-sha256.txt | 1 + qt6-svg/static-compat/PKGBUILD | 48 + qt6-svg/static-compat/PKGBUILD.sh.ep | 11 + qt6-svg/static-compat/qtsvg-sha256.txt | 1 + qt6-tools/static-compat/PKGBUILD | 73 + qt6-tools/static-compat/PKGBUILD.sh.ep | 43 + qt6-tools/static-compat/qttools-sha256.txt | 1 + qt6-translations/static-compat/PKGBUILD | 44 + qt6-translations/static-compat/PKGBUILD.sh.ep | 11 + .../static-compat/qttranslations-sha256.txt | 1 + qt6-virtualkeyboard/static-compat/PKGBUILD | 48 + .../static-compat/PKGBUILD.sh.ep | 11 + .../qtvirtualkeyboard-sha256.txt | 1 + qt6-wayland/static-compat/PKGBUILD | 48 + qt6-wayland/static-compat/PKGBUILD.sh.ep | 11 + .../static-compat/qtwayland-sha256.txt | 1 + qtforkawesome/static-compat/PKGBUILD | 60 + qtutilities/static-compat/PKGBUILD | 50 + readline/static-compat/PKGBUILD | 65 + readline/static-compat/inputrc | 36 + sqlite/static-compat/PKGBUILD | 74 + sqlite/static-compat/license.txt | 33 + .../sqlite-lemon-system-template.patch | 13 + syncthingtray/mingw-w64-qt6/PKGBUILD | 2 +- syncthingtray/mingw-w64/PKGBUILD | 2 +- syncthingtray/static-compat/PKGBUILD | 126 + .../0001-Strip-down-build-script.patch | 2561 +++++++++++++++++ ...-Use-Arch-Linux-device-access-groups.patch | 176 ++ systemd/static-compat/PKGBUILD | 198 ++ tageditor/static-compat/PKGBUILD | 76 + tagparser/static-compat/PKGBUILD | 53 + tcl/static-compat/PKGBUILD | 67 + util-linux/{static => static-compat}/PKGBUILD | 43 +- ...symfollow-for-helpers-on-user-mounts.patch | 37 - vulkan-headers/static-compat/PKGBUILD | 31 + wayland/{static => static-compat}/PKGBUILD | 27 +- xcb-proto/static-compat/PKGBUILD | 39 + .../{static => static-compat}/LICENSE | 0 .../{static => static-compat}/PKGBUILD | 21 +- .../{static => static-compat}/LICENSE | 0 .../{static => static-compat}/PKGBUILD | 11 +- .../{static => static-compat}/LICENSE | 0 .../{static => static-compat}/PKGBUILD | 11 +- xcb-util-wm/{static => static-compat}/LICENSE | 0 .../{static => static-compat}/PKGBUILD | 17 +- xcb-util/{static => static-compat}/PKGBUILD | 16 +- xorgproto/static-compat/PKGBUILD | 51 + xtrans/static-compat/PKGBUILD | 35 + xz/{static => static-compat}/PKGBUILD | 17 +- zlib/default/PKGBUILD | 64 + zlib/static-compat/PKGBUILD | 73 + zstd/static-compat/PKGBUILD | 42 + zstd/static/PKGBUILD | 36 - 244 files changed, 9027 insertions(+), 1362 deletions(-) create mode 100644 boost/static-compat/PKGBUILD create mode 100644 brotli/static-compat/PKGBUILD rename bzip2/{static => static-compat}/PKGBUILD (64%) rename bzip2/{static => static-compat}/bzip2.pc (100%) create mode 100644 c++utilities/static-compat/PKGBUILD create mode 100644 cmake/static-compat/PKGBUILD create mode 100644 cmake/static-compat/static-compat-cmake.sh create mode 100644 cmake/static-compat/toolchain-static-compat.cmake create mode 100644 configure/static-compat/PKGBUILD create mode 100644 configure/static-compat/static-compat-configure.sh create mode 100644 cppunit/default/PKGBUILD create mode 100644 cppunit/static-compat/PKGBUILD rename dbus/{static => static-compat}/PKGBUILD (50%) rename dbus/{static => static-compat}/dbus-reload.hook (100%) rename dbus/{static => static-compat}/no-fatal-warnings.diff (61%) create mode 100644 devel/generator/templates/layouts/static-compat-qt6-base.sh.ep create mode 100644 devel/generator/templates/layouts/static-compat-qt6-module.sh.ep create mode 100644 double-conversion/static-compat/PKGBUILD create mode 100644 environment/static-compat/PKGBUILD create mode 100644 environment/static-compat/static-compat-environment.sh rename expat/{static => static-compat}/PKGBUILD (64%) create mode 100644 fontconfig/static-compat/PKGBUILD delete mode 100644 fontconfig/static/PKGBUILD rename freetype2-bootstrap/{static => static-compat} (100%) mode change 100644 => 120000 freetype2/mingw-w64-bootstrap/0001-Enable-table-validation-modules.patch mode change 100644 => 120000 freetype2/mingw-w64-bootstrap/0002-Enable-subpixel-rendering.patch mode change 100644 => 120000 freetype2/mingw-w64-bootstrap/0003-Enable-infinality-subpixel-hinting.patch mode change 100644 => 120000 freetype2/mingw-w64-bootstrap/0004-Enable-long-PCF-family-names.patch delete mode 100644 freetype2/static-bootstrap/0001-Enable-table-validation-modules.patch delete mode 100644 freetype2/static-bootstrap/0002-Enable-subpixel-rendering.patch delete mode 100644 freetype2/static-bootstrap/0003-Enable-infinality-subpixel-hinting.patch delete mode 100644 freetype2/static-bootstrap/0004-Enable-long-PCF-family-names.patch delete mode 100644 freetype2/static-bootstrap/PKGBUILD create mode 120000 freetype2/static-compat-bootstrap/0001-Enable-table-validation-modules.patch create mode 120000 freetype2/static-compat-bootstrap/0002-Enable-subpixel-rendering.patch create mode 120000 freetype2/static-compat-bootstrap/0003-Enable-infinality-subpixel-hinting.patch create mode 120000 freetype2/static-compat-bootstrap/0004-Enable-long-PCF-family-names.patch create mode 100644 freetype2/static-compat-bootstrap/PKGBUILD create mode 120000 freetype2/static-compat/0001-Enable-table-validation-modules.patch create mode 120000 freetype2/static-compat/0002-Enable-subpixel-rendering.patch create mode 120000 freetype2/static-compat/0003-Enable-infinality-subpixel-hinting.patch create mode 120000 freetype2/static-compat/0004-Enable-long-PCF-family-names.patch rename freetype2/{static => static-compat}/PKGBUILD (51%) delete mode 100644 freetype2/static/0001-Enable-table-validation-modules.patch delete mode 100644 freetype2/static/0002-Enable-subpixel-rendering.patch delete mode 100644 freetype2/static/0003-Enable-infinality-subpixel-hinting.patch delete mode 100644 freetype2/static/0004-Enable-long-PCF-family-names.patch create mode 100644 gcc/static-compat/PKGBUILD create mode 100644 gcc/static-compat/PKGBUILD.orig create mode 100644 gcc/static-compat/c89 create mode 100644 gcc/static-compat/c99 create mode 100644 gcc/static-compat/gcc-ada-repro.patch create mode 100644 gcc/static-compat/gdc_phobos_path.patch rename glib2/{static/noisy-glib-compile-schemas.diff => static-compat/0001-glib-compile-schemas-Remove-noisy-deprecation-warnin.patch} (56%) rename glib2/{static => static-compat}/PKGBUILD (52%) create mode 100644 glibc/static-compat/PKGBUILD create mode 100644 glibc/static-compat/PKGBUILD.orig create mode 100644 glibc/static-compat/bz20338.patch rename graphite/{static => static-compat}/PKGBUILD (80%) rename harfbuzz/{static => static-compat}/PKGBUILD (63%) rename keyutils/{static => static-compat}/PKGBUILD (64%) rename keyutils/{static => static-compat}/reproducible.patch (100%) rename keyutils/{static => static-compat}/request-key.conf.patch (100%) rename libb2/{static => static-compat}/PKGBUILD (59%) create mode 100644 libcap/static-compat/PKGBUILD create mode 100644 libevdev/static-compat/0001_install_the_mouse-dpi-tool_man_page.diff create mode 100644 libevdev/static-compat/PKGBUILD rename libffi/{static => static-compat}/PKGBUILD (77%) rename libgcrypt/{static => static-compat}/PKGBUILD (79%) rename libglvnd/{static => static-compat}/LICENSE (100%) create mode 100644 libglvnd/static-compat/PKGBUILD delete mode 100644 libglvnd/static/PKGBUILD rename libgpg-error/{static => static-compat}/PKGBUILD (69%) create mode 100644 libgudev/static-compat/PKGBUILD rename libice/{static => static-compat}/PKGBUILD (62%) create mode 100644 libinput/default/PKGBUILD create mode 100644 libinput/static-compat/PKGBUILD create mode 100644 libjpeg-turbo/static-compat/PKGBUILD rename libpng/{static => static-compat}/PKGBUILD (77%) rename libsm/{static => static-compat}/PKGBUILD (61%) create mode 100644 libwacom/static-compat/PKGBUILD create mode 100644 libx11/static-compat/PKGBUILD delete mode 100644 libx11/static/PKGBUILD rename libxau/{static => static-compat}/PKGBUILD (72%) rename libxcb/{static => static-compat}/PKGBUILD (73%) create mode 100644 libxcomposite/static-compat/PKGBUILD create mode 100644 libxdamage/static-compat/PKGBUILD rename libxdmcp/{static => static-compat}/PKGBUILD (63%) rename libxext/{static => static-compat}/PKGBUILD (73%) create mode 100644 libxfixes/static-compat/PKGBUILD rename libxkbcommon/{static => static-compat}/PKGBUILD (69%) create mode 100644 libxml2/static-compat/PKGBUILD rename libxml2/{static => static-compat}/libxml2-2.9.8-python3-unicode-errors.patch (100%) create mode 100644 libxml2/static-compat/no-fuzz.diff delete mode 100644 libxml2/static/PKGBUILD delete mode 100644 libxml2/static/fix-relaxed-approach-to-nested-documents.patch delete mode 100644 libxml2/static/libxml2-2.9.10-CVE-2019-20388.patch delete mode 100644 libxml2/static/libxml2-2.9.10-CVE-2020-24977.patch delete mode 100644 libxml2/static/libxml2-2.9.10-CVE-2020-7595.patch delete mode 100644 libxml2/static/libxml2-2.9.10-fix-integer-overflow.patch delete mode 100644 libxml2/static/libxml2-2.9.10-icu68.patch delete mode 100644 libxml2/static/libxml2-2.9.10-parenthesize-type-checks.patch create mode 100644 libxmu/static-compat/PKGBUILD create mode 100644 libxt/static-compat/PKGBUILD create mode 100644 libxxf86vm/static-compat/PKGBUILD create mode 100644 linux-api-headers/static-compat/PKGBUILD create mode 100644 lz4/static-compat/PKGBUILD delete mode 100644 lz4/static/PKGBUILD create mode 100644 md4c/static-compat/PKGBUILD create mode 100644 meson/static-compat/PKGBUILD create mode 100644 meson/static-compat/meson-static-compat-wrapper create mode 100644 mtdev/static-compat/PKGBUILD create mode 100644 ncurses/static-compat/PKGBUILD create mode 100644 ncurses/static-compat/ncurses-6.3-libs.patch create mode 100644 ncurses/static-compat/ncurses-6.3-pkgconfig.patch rename openssl/{static => static-compat}/PKGBUILD (72%) rename openssl/{static => static-compat}/ca-dir.patch (100%) rename pcre/{static => static-compat}/PKGBUILD (75%) rename pcre2/{static => static-compat}/PKGBUILD (82%) create mode 100644 qt6-5compat/static-compat/PKGBUILD create mode 100644 qt6-5compat/static-compat/PKGBUILD.sh.ep create mode 100644 qt6-5compat/static-compat/qt5compat-sha256.txt create mode 120000 qt6-base/android-aarch64/0009-Find-fontconfig-via-pkg-config-for-correct-handling-.patch create mode 120000 qt6-base/android-aarch64/0010-Fix-dependency-of-xcb-image-on-xcb-util.patch create mode 120000 qt6-base/android-aarch64/0011-Allow-using-properties-of-PkgConfig-targets-for-glib.patch create mode 100644 qt6-base/default/qt6-base-cflags.patch create mode 100644 qt6-base/default/qt6-base-nostrip.patch create mode 120000 qt6-base/mingw-w64-static/0009-Find-fontconfig-via-pkg-config-for-correct-handling-.patch create mode 120000 qt6-base/mingw-w64-static/0010-Fix-dependency-of-xcb-image-on-xcb-util.patch create mode 120000 qt6-base/mingw-w64-static/0011-Allow-using-properties-of-PkgConfig-targets-for-glib.patch create mode 100644 qt6-base/mingw-w64/0009-Find-fontconfig-via-pkg-config-for-correct-handling-.patch create mode 100644 qt6-base/mingw-w64/0010-Fix-dependency-of-xcb-image-on-xcb-util.patch create mode 100644 qt6-base/mingw-w64/0011-Allow-using-properties-of-PkgConfig-targets-for-glib.patch create mode 120000 qt6-base/static-compat/0001-Use-CMake-s-default-import-library-suffix.patch create mode 120000 qt6-base/static-compat/0002-Fix-finding-D-Bus.patch create mode 120000 qt6-base/static-compat/0003-Fix-using-static-PCRE2-and-DBus-1.patch create mode 120000 qt6-base/static-compat/0004-Fix-transitive-dependencies-of-static-libraries.patch create mode 120000 qt6-base/static-compat/0005-Fix-libjpeg-workaround-for-conflict-with-rpcndr.h.patch create mode 120000 qt6-base/static-compat/0006-Support-finding-static-MariaDB-client-library.patch create mode 120000 qt6-base/static-compat/0007-Allow-overriding-CMAKE_FIND_LIBRARY_SUFFIXES-to-pref.patch create mode 120000 qt6-base/static-compat/0008-Fix-crashes-in-rasterization-code-using-setjmp.patch create mode 120000 qt6-base/static-compat/0009-Find-fontconfig-via-pkg-config-for-correct-handling-.patch create mode 120000 qt6-base/static-compat/0010-Fix-dependency-of-xcb-image-on-xcb-util.patch create mode 120000 qt6-base/static-compat/0011-Allow-using-properties-of-PkgConfig-targets-for-glib.patch create mode 100644 qt6-base/static-compat/PKGBUILD create mode 100644 qt6-base/static-compat/PKGBUILD.sh.ep create mode 120000 qt6-base/static-compat/qtbase-sha256.txt create mode 100644 qt6-charts/static-compat/PKGBUILD create mode 100644 qt6-charts/static-compat/PKGBUILD.sh.ep create mode 100644 qt6-charts/static-compat/qtcharts-sha256.txt create mode 100644 qt6-connectivity/static-compat/PKGBUILD create mode 100644 qt6-connectivity/static-compat/PKGBUILD.sh.ep create mode 100644 qt6-connectivity/static-compat/qtconnectivity-sha256.txt create mode 100644 qt6-datavis3d/static-compat/PKGBUILD create mode 100644 qt6-datavis3d/static-compat/PKGBUILD.sh.ep create mode 100644 qt6-datavis3d/static-compat/qtdatavis3d-sha256.txt create mode 100644 qt6-declarative/static-compat/PKGBUILD create mode 100644 qt6-declarative/static-compat/PKGBUILD.sh.ep create mode 100644 qt6-declarative/static-compat/qtdeclarative-sha256.txt create mode 100644 qt6-imageformats/static-compat/PKGBUILD create mode 100644 qt6-imageformats/static-compat/PKGBUILD.sh.ep create mode 100644 qt6-imageformats/static-compat/qtimageformats-sha256.txt create mode 100644 qt6-lottie/static-compat/PKGBUILD create mode 100644 qt6-lottie/static-compat/PKGBUILD.sh.ep create mode 100644 qt6-lottie/static-compat/qtlottie-sha256.txt create mode 100644 qt6-multimedia/static-compat/PKGBUILD create mode 100644 qt6-multimedia/static-compat/PKGBUILD.sh.ep create mode 100644 qt6-multimedia/static-compat/qtmultimedia-sha256.txt create mode 100644 qt6-networkauth/default/PKGBUILD create mode 100644 qt6-networkauth/static-compat/PKGBUILD create mode 100644 qt6-networkauth/static-compat/PKGBUILD.sh.ep create mode 100644 qt6-networkauth/static-compat/qtnetworkauth-sha256.txt create mode 100644 qt6-quick3d/static-compat/PKGBUILD create mode 100644 qt6-quick3d/static-compat/PKGBUILD.sh.ep create mode 100644 qt6-quick3d/static-compat/qtquick3d-sha256.txt create mode 100644 qt6-shadertools/static-compat/PKGBUILD create mode 100644 qt6-shadertools/static-compat/PKGBUILD.sh.ep create mode 100644 qt6-shadertools/static-compat/qtshadertools-sha256.txt create mode 100644 qt6-svg/static-compat/PKGBUILD create mode 100644 qt6-svg/static-compat/PKGBUILD.sh.ep create mode 100644 qt6-svg/static-compat/qtsvg-sha256.txt create mode 100644 qt6-tools/static-compat/PKGBUILD create mode 100644 qt6-tools/static-compat/PKGBUILD.sh.ep create mode 100644 qt6-tools/static-compat/qttools-sha256.txt create mode 100644 qt6-translations/static-compat/PKGBUILD create mode 100644 qt6-translations/static-compat/PKGBUILD.sh.ep create mode 100644 qt6-translations/static-compat/qttranslations-sha256.txt create mode 100644 qt6-virtualkeyboard/static-compat/PKGBUILD create mode 100644 qt6-virtualkeyboard/static-compat/PKGBUILD.sh.ep create mode 100644 qt6-virtualkeyboard/static-compat/qtvirtualkeyboard-sha256.txt create mode 100644 qt6-wayland/static-compat/PKGBUILD create mode 100644 qt6-wayland/static-compat/PKGBUILD.sh.ep create mode 100644 qt6-wayland/static-compat/qtwayland-sha256.txt create mode 100644 qtforkawesome/static-compat/PKGBUILD create mode 100644 qtutilities/static-compat/PKGBUILD create mode 100644 readline/static-compat/PKGBUILD create mode 100644 readline/static-compat/inputrc create mode 100644 sqlite/static-compat/PKGBUILD create mode 100644 sqlite/static-compat/license.txt create mode 100644 sqlite/static-compat/sqlite-lemon-system-template.patch create mode 100644 syncthingtray/static-compat/PKGBUILD create mode 100644 systemd/static-compat/0001-Strip-down-build-script.patch create mode 100644 systemd/static-compat/0001-Use-Arch-Linux-device-access-groups.patch create mode 100644 systemd/static-compat/PKGBUILD create mode 100644 tageditor/static-compat/PKGBUILD create mode 100644 tagparser/static-compat/PKGBUILD create mode 100644 tcl/static-compat/PKGBUILD rename util-linux/{static => static-compat}/PKGBUILD (73%) delete mode 100644 util-linux/static/0001-libmount-don-t-use-symfollow-for-helpers-on-user-mounts.patch create mode 100644 vulkan-headers/static-compat/PKGBUILD rename wayland/{static => static-compat}/PKGBUILD (56%) create mode 100644 xcb-proto/static-compat/PKGBUILD rename xcb-util-image/{static => static-compat}/LICENSE (100%) rename xcb-util-image/{static => static-compat}/PKGBUILD (58%) rename xcb-util-keysyms/{static => static-compat}/LICENSE (100%) rename xcb-util-keysyms/{static => static-compat}/PKGBUILD (75%) rename xcb-util-renderutil/{static => static-compat}/LICENSE (100%) rename xcb-util-renderutil/{static => static-compat}/PKGBUILD (75%) rename xcb-util-wm/{static => static-compat}/LICENSE (100%) rename xcb-util-wm/{static => static-compat}/PKGBUILD (66%) rename xcb-util/{static => static-compat}/PKGBUILD (60%) create mode 100644 xorgproto/static-compat/PKGBUILD create mode 100644 xtrans/static-compat/PKGBUILD rename xz/{static => static-compat}/PKGBUILD (70%) create mode 100644 zlib/default/PKGBUILD create mode 100644 zlib/static-compat/PKGBUILD create mode 100644 zstd/static-compat/PKGBUILD delete mode 100644 zstd/static/PKGBUILD diff --git a/README.md b/README.md index 23916430..f4323b53 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,8 @@ Contains PKGBUILD files for creating Arch Linux packages: * misc packages, eg. Subtitle Composer, openelec-dvb-firmware, Jangouts * `mingw-w64-*` packages which allow to build for Windows under Arch Linux, eg. FreeType 2, Qt 5 and Qt 6 - * `*-static` packages containing static libraries + * `static-compat-*` packages containing static libraries to build self-contained + applications running on older GNU/Linux distributions under Arch Linux * `android-*` packages which allow to build for Android under Arch Linux, eg. iconv, Boost, OpenSSL, CppUnit, Qt 5 and Kirigami * `apple-darwin-*` packages which allow to build for MaxOS X under Arch @@ -232,28 +233,43 @@ Here are neverthless some useful hints to run WINE manually: * See https://wiki.winehq.org/Wine_User's_Guide for more information ## Static GNU/Linux libraries -This repository contains several `*-static` packages providing static libraries -intended to distribute "self-contained" executables. These packages are still -experimental and are not be regularily updated at this point. +This repository contains several `static-compat-*` packages providing static +libraries intended to distribute "self-contained" executables. These libraries +are built against and older version of glibc to be able to run on older +distributions without having to link against glibc statically. The resulting +binaries should run on distributions with glibc 2.26 or newer (or Linux 4.4 or +newer when linking against glibc statically), e.g. openSUSE Leap 15.0, Fedora +27, Debian 10 and Ubuntu 18.04. The packages might not be updated as regularily +as their normal counterparts but the idea is to provide an environment with a +recent version of GCC/libstdc++ and other libraries such as Qt and Boost but +still be able to run the resulting executables on older distributions. Note that +these packages are still experimental at this point. -It would conceivable to build even Qt as a static library and make even a fully -statically linked executable. However, it would not be possible to support -OpenGL because glvnd and vendor provided OpenGL libraries are always dynamic -libraries. It is also not clear whether it makes sense to link against libc and -X11/Wayland client libraries statically. Maybe it makes sense to aim for a -partially statically linked build instead where libc/OpenGL/X11/Wayland are -assumed to be provided by the GNU/Linux system but other libraries like Qt are -linked against statically. This would be similar to AppImage where a lot of -libraries are bundled but certain "core libraries" are expected to be provided -by the system. +To use the packages, simply invoke `/usr/static-compat/bin/g++` instead of +`/usr/bin/g++`. The package `static-compat-environment` provide a script to set +a few environment variables to make this easier. There are also packages +providing build system wrappers such as `static-compat-cmake`. + +It would be conceivable to make fully statically linked executables. However, it +would not be possible to support OpenGL because glvnd and vendor provided OpenGL +libraries are always dynamic libraries. It makes also no sense to link against +glibc (and possibly other core libraries) statically as they might use `dlopen`. +Therefore this setup aims for a partially statically linked build instead, where +stable core libraries like glibc/pthreads/OpenGL/… are assumed to be provided by +the GNU/Linux system but other libraries like libstdc++, Boost and Qt are linked +against statically. This is similar to AppImage where a lot of libraries are +bundled but certain core libraries are expected to be provided by the system. Note that I decided to let static libraries live within the subprefix -`/usr/static` (in contrast to packages found in the AUR). The reason is that the -version might not be kept 100 % in sync with the shared counterpart. Hence it -makes sense to make the static packages independent with their own headers and -configuration files to avoid problems due to mismatching versions. Besides, some -projects (such as Qt) do not support installing shared and static libraries -within the same prefix at the same time because the config files would clash. +`/usr/static-compat` (in contrast to `-static` packages found in the AUR). The +main reason is that my packaging requires a custom glibc/GCC build for +compatibility and I suppose that simply needs to live within its own prefix. +Besides, the version might not be kept 100 % in sync with the shared +counterpart. Hence it makes sense to make the static packages independent with +their own headers and configuration files to avoid problems due to mismatching +versions. Additionally, some projects (such as Qt) do not support installing +shared and static libraries within the same prefix at the same time because the +config files would clash. ## Copyright notice and license Copyright © 2015-2022 Marius Kittler diff --git a/boost/static-compat/PKGBUILD b/boost/static-compat/PKGBUILD new file mode 100644 index 00000000..04333a7e --- /dev/null +++ b/boost/static-compat/PKGBUILD @@ -0,0 +1,85 @@ +# Contributor: Evangelos Foutras +# Contributor: Levente Polyak +# Contributor: Bartłomiej Piotrowski +# Contributor: Marius Knaust +# Contributor: Ionut Biru +# Contributor: Stéphane Gaudreault +# Contributor: kevin +# Contributor: Giovanni Scafora +# Contributor: Kritoke +# Contributor: Luca Roccia + +_pkgname=boost +pkgname=static-compat-$_pkgname +pkgver=1.78.0 +pkgrel=1 +_srcname=boost_${pkgver//./_} +pkgdesc="Free peer-reviewed portable C++ source libraries" +arch=('x86_64') +url="https://www.boost.org/" +license=('custom') +options=('staticlibs') +depends=('static-compat-zlib' 'static-compat-zstd' 'static-compat-bzip2') +makedepends=('static-compat-environment') +source=(https://boostorg.jfrog.io/artifactory/main/release/$pkgver/source/$_srcname.tar.gz + $_pkgname-b2-fix-lib-install.patch::https://github.com/bfgroup/b2/commit/78fd284a42ca.patch + $_pkgname-ublas-c++20-iterator.patch::https://github.com/boostorg/ublas/commit/a31e5cffa85f.patch) +sha256sums=('94ced8b72956591c4775ae2207a9763d3600b30d9d7446562c552f0a14a63be7' + 'd233b16920ad7da8bb6e02bf5fb4e429592057b4f4db28d4babf3850e837a8db' + 'aa38addb40d5f44b4a8472029b475e7e6aef1c460509eb7d8edf03491dc1b5ee') + +prepare() { + cd $_srcname + + # https://github.com/bfgroup/b2/issues/104 + patch -Np1 -d tools/build <../$_pkgname-b2-fix-lib-install.patch + + # https://github.com/boostorg/ublas/pull/97 + patch -Np2 -i ../$_pkgname-ublas-c++20-iterator.patch +} + +build() { + source static-compat-environment + local JOBS="$(sed 's/.*\(-j *[0-9]\+\).*/\1/' <<<$MAKEFLAGS)" + + pushd $_srcname/tools/build + ./bootstrap.sh --cxxflags="$CXXFLAGS $LDFLAGS" + ./b2 install --prefix="$srcdir"/fakeinstall + ln -s b2 "$srcdir"/fakeinstall/bin/bjam + popd + + cd $_srcname + ./bootstrap.sh --with-toolset=gcc + + # boostbook is needed by quickbook + install -dm755 "$srcdir"/fakeinstall/share/boostbook + cp -a tools/boostbook/{xsl,dtd} "$srcdir"/fakeinstall/share/boostbook/ + + # install to $srcdir/fakeinstall in preparation for split packaging + ./b2 install \ + variant=release \ + debug-symbols=off \ + threading=multi \ + runtime-link=static \ + link=static \ + toolset=gcc \ + --without-python --without-mpi --without-graph_parallel \ + cflags="$CPPFLAGS $CFLAGS -fPIC -O3 -ffat-lto-objects" \ + cxxflags="$CPPFLAGS $CXXFLAGS -fPIC -O3 -ffat-lto-objects" \ + linkflags="$LDFLAGS" \ + --layout=system \ + $JOBS \ + \ + --prefix="$srcdir"/fakeinstall +} + +package() { + source static-compat-environment + + install -d "$pkgdir/$static_compat_prefix"/lib + cp -a fakeinstall/lib/*.a "$pkgdir/$static_compat_prefix"/lib/ + cp -a fakeinstall/lib/cmake "$pkgdir/$static_compat_prefix"/lib/ + cp -a fakeinstall/{bin,include,share/boost-build} "$pkgdir/$static_compat_prefix"/ + + install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" $_srcname/LICENSE_1_0.txt +} diff --git a/brotli/static-compat/PKGBUILD b/brotli/static-compat/PKGBUILD new file mode 100644 index 00000000..8992fb54 --- /dev/null +++ b/brotli/static-compat/PKGBUILD @@ -0,0 +1,54 @@ +# Contributor: Felix Yan +# Contributor: Levente Polyak +# Contributor: Lex Black +# Contributor: TingPing +# Contributor: Guillaume Horel + +pkgname=static-compat-brotli +_gitcommit=e61745a6b7add50d380cfd7d3883dd6c62fc2c71 +pkgver=1.0.9 +pkgrel=1 +pkgdesc='Generic-purpose lossless compression algorithm' +url='https://github.com/google/brotli' +arch=('x86_64') +license=('MIT') +depends=('gcc-libs-static-compat') +makedepends=('static-compat-cmake' 'git') +options=('staticlibs') +source=(${pkgname}::"git+${url}#commit=${_gitcommit}") +sha512sums=('SKIP') + +prepare() { + cd ${pkgbase} + git cherry-pick -n 09b0992b6acb7faa6fd3b23f9bc036ea117230fc # Fix broken Libs: in pc file +} + +pkgver() { + cd ${pkgbase} + git describe --tags --match 'v*' | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' +} + +build() { + source static-compat-environment + cd ${pkgbase} + static-compat-cmake -B build \ + -DCMAKE_BUILD_TYPE=Release + make -C build VERBOSE=1 +} + +check() { + source static-compat-environment + cd ${pkgbase} + make test +} + +package() { + source static-compat-environment + cd ${pkgbase} + make -C build DESTDIR="$pkgdir" install + find "$pkgdir/$static_compat_prefix" -iname '*.so*' -delete + for file in "$pkgdir/$static_compat_prefix"/lib/pkgconfig/*.pc; do + sed -i -E 's/-lbrotli(enc|dec|common)/\0-static/g' "$file" + done + install -Dm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname" +} diff --git a/bzip2/static/PKGBUILD b/bzip2/static-compat/PKGBUILD similarity index 64% rename from bzip2/static/PKGBUILD rename to bzip2/static-compat/PKGBUILD index b21166c2..ae6329ce 100644 --- a/bzip2/static/PKGBUILD +++ b/bzip2/static-compat/PKGBUILD @@ -2,14 +2,15 @@ # Contributor: Judd _pkgname=bzip2 -pkgname=$_pkgname-static +pkgname=static-compat-$_pkgname pkgver=1.0.8 pkgrel=1 pkgdesc="A high-quality data compression program" arch=('x86_64') license=('BSD') url="https://sourceware.org/bzip2/" -depends=('glibc' 'sh') +depends=('glibc-static-compat') +makedepends=('static-compat-environment') options=(staticlibs) source=(https://sourceware.org/pub/bzip2/$_pkgname-$pkgver.tar.gz{,.sig} bzip2.pc) @@ -25,22 +26,25 @@ prepare() { } build() { + source static-compat-environment cd $_pkgname-$pkgver - make libbz2.a CC="gcc $CFLAGS $CPPFLAGS $LDFLAGS" + make libbz2.a CC="$CC $CFLAGS $CPPFLAGS $LDFLAGS" } check() { + source static-compat-environment cd $_pkgname-$pkgver make test } package() { + source static-compat-environment cd $_pkgname-$pkgver - install -dm755 "$pkgdir"/usr/static/{lib,include} - cp -a libbz2.a "$pkgdir"/usr/static/lib - install -m644 bzlib.h "$pkgdir"/usr/static/include/ - install -Dm644 bzip2.pc -t "$pkgdir"/usr/static/lib/pkgconfig + install -dm755 "$pkgdir/$static_compat_prefix"/{lib,include} + cp -a libbz2.a "$pkgdir/$static_compat_prefix"/lib + install -m644 bzlib.h "$pkgdir/$static_compat_prefix"/include/ + install -Dm644 bzip2.pc -t "$pkgdir/$static_compat_prefix"/lib/pkgconfig install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/${pkgname}/LICENSE } diff --git a/bzip2/static/bzip2.pc b/bzip2/static-compat/bzip2.pc similarity index 100% rename from bzip2/static/bzip2.pc rename to bzip2/static-compat/bzip2.pc diff --git a/c++utilities/static-compat/PKGBUILD b/c++utilities/static-compat/PKGBUILD new file mode 100644 index 00000000..4ddfc851 --- /dev/null +++ b/c++utilities/static-compat/PKGBUILD @@ -0,0 +1,49 @@ +# Maintainer: Martchus + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +_reponame=cpp-utilities +pkgname=static-compat-c++utilities +_name=${pkgname#static-compat-} +pkgver=5.14.0 +pkgrel=1 +arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64') +pkgdesc='Common C++ classes and routines such as argument parser, IO and conversion utilities' +license=('GPL') +depends=('gcc-libs-static-compat') +optdepends=("$_name-doc: API documentation") +makedepends=('ninja' 'static-compat-cmake') +checkdepends=('static-compat-cppunit') +url="https://github.com/Martchus/${_reponame}" +source=("${_name}-${pkgver}.tar.gz::https://github.com/Martchus/${_reponame}/archive/v${pkgver}.tar.gz") +sha256sums=('7a173bb2355a9b5fef17d3fe6795f026f58afe63b1295f8567c042422e2cde0e') + +prepare() { + cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}" +} + +build() { + check_buildoption ccache y && ccache_args=' + -DCMAKE_C_COMPILER_LAUNCHER=ccache + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache' + source static-compat-environment + cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}" + static-compat-cmake \ + -G Ninja \ + -DCMAKE_BUILD_TYPE:STRING='Release' \ + . + ninja +} + +check() { + source static-compat-environment + cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}" + ninja check +} + +package() { + source static-compat-environment + cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}" + DESTDIR="${pkgdir}" ninja install +} diff --git a/cmake/static-compat/PKGBUILD b/cmake/static-compat/PKGBUILD new file mode 100644 index 00000000..69287436 --- /dev/null +++ b/cmake/static-compat/PKGBUILD @@ -0,0 +1,25 @@ +pkgname=static-compat-cmake +pkgver=1 +pkgrel=1 +arch=('any') +pkgdesc="CMake wrapper to use gcc-static-compat" +depends=('cmake' 'static-compat-environment') +license=('GPL') +url="https://github.com/Martchus/PKGBUILDs" +source=("static-compat-cmake.sh") +# "toolchain-static-compat.cmake") +sha256sums=('SKIP' 'SKIP') + +build() { + source static-compat-environment + #sed "s|@PREFIX@|$static_compat_prefix|g;s|@PROCESSOR@|$CARCH|g" toolchain-static-compat.cmake > "toolchain-static-compat-#$CARCH.cmake" +} + +package() { + source static-compat-environment + install -d "${pkgdir}"/usr/bin + #install -d "${pkgdir}/$static_compat_prefix"/share/cmake-toolchain + #install -m 644 "toolchain-static-compat-$CARCH.cmake" "${pkgdir}/$static_compat_prefix"/share/cmake-toolchain + install -m 755 "static-compat-cmake.sh" "${pkgdir}"/usr/bin/static-compat-cmake +} + diff --git a/cmake/static-compat/static-compat-cmake.sh b/cmake/static-compat/static-compat-cmake.sh new file mode 100644 index 00000000..6cc29b6e --- /dev/null +++ b/cmake/static-compat/static-compat-cmake.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +source static-compat-environment + +cmake \ + -DCMAKE_INSTALL_PREFIX:PATH="$static_compat_prefix" \ + -DCMAKE_INSTALL_LIBDIR:PATH=lib \ + -DCMAKE_FIND_ROOT_PATH:PATH="$static_compat_prefix" \ + -DCMAKE_C_COMPILER:PATH="$static_compat_prefix/bin/gcc" \ + -DCMAKE_CXX_COMPILER:PATH="$static_compat_prefix/bin/g++" \ + -DCMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES:PATH="$static_compat_prefix"/include \ + -DCMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES:PATH="$static_compat_prefix"/include \ + -DBUILD_SHARED_LIBS:BOOL=OFF \ + "$@" diff --git a/cmake/static-compat/toolchain-static-compat.cmake b/cmake/static-compat/toolchain-static-compat.cmake new file mode 100644 index 00000000..4f7338ed --- /dev/null +++ b/cmake/static-compat/toolchain-static-compat.cmake @@ -0,0 +1,13 @@ +set (CMAKE_SYSTEM_NAME Linux) +set (CMAKE_SYSTEM_PROCESSOR @PROCESSOR@) + +# specify the cross compiler +set (CMAKE_C_COMPILER @PREFIX@/bin/gcc) +set (CMAKE_CXX_COMPILER @PREFIX@/bin/g++) + +# where is the target environment +set (CMAKE_FIND_ROOT_PATH @PREFIX@) +set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH) +set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH) +set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH) +set (CMAKE_FIND_ROOT_PATH_MODE_PACKAGE BOTH) diff --git a/configure/static-compat/PKGBUILD b/configure/static-compat/PKGBUILD new file mode 100644 index 00000000..5af4be31 --- /dev/null +++ b/configure/static-compat/PKGBUILD @@ -0,0 +1,17 @@ + +pkgname=static-compat-configure +pkgver=1 +pkgrel=1 +arch=('any') +pkgdesc="configure wrapper for gcc-static-compat" +depends=('static-compat-environment') +license=('GPL') +url="https://github.com/Martchus/PKGBUILDs" +source=("static-compat-configure.sh") +md5sums=('SKIP') + +package() { + install -d "${pkgdir}"/usr/bin + install -m 755 static-compat-configure.sh "${pkgdir}"/usr/bin/static-compat-configure +} + diff --git a/configure/static-compat/static-compat-configure.sh b/configure/static-compat/static-compat-configure.sh new file mode 100644 index 00000000..7a3852a5 --- /dev/null +++ b/configure/static-compat/static-compat-configure.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +# check if last arg is a path to configure, else use parent +for last; do true; done +if test -x "${last}/configure"; then + config_path="$last" +elif [[ -e ./configure ]]; then + config_path=. +else + config_path=.. +fi + +source static-compat-environment + +${config_path}/configure \ + --prefix="$static_compat_prefix" \ + --libdir="$static_compat_prefix/lib" \ + --includedir="$static_compat_prefix/include" \ + "$@" diff --git a/cppunit/default/PKGBUILD b/cppunit/default/PKGBUILD new file mode 100644 index 00000000..e5c7d979 --- /dev/null +++ b/cppunit/default/PKGBUILD @@ -0,0 +1,31 @@ +# Maintainer: Stéphane Gaudreault +# Contributor: Jeff 'codemac' Mickey + +pkgname=cppunit +pkgver=1.15.1 +pkgrel=2 +pkgdesc="A C++ unit testing framework" +arch=('x86_64') +url="https://www.freedesktop.org/wiki/Software/cppunit" +license=('LGPL') +depends=('sh' 'gcc-libs') +makedepends=('doxygen') +options=('!emptydirs') +source=(https://dev-www.libreoffice.org/src/${pkgname}-${pkgver}.tar.gz) +sha256sums=('89c5c6665337f56fd2db36bc3805a5619709d51fb136e51937072f63fcc717a7') + +build() { + cd ${pkgname}-${pkgver} + ./configure --prefix=/usr --disable-static + make +} + +check() { + cd ${pkgname}-${pkgver} + make check +} + +package() { + cd ${pkgname}-${pkgver} + make DESTDIR="${pkgdir}" install +} \ No newline at end of file diff --git a/cppunit/static-compat/PKGBUILD b/cppunit/static-compat/PKGBUILD new file mode 100644 index 00000000..fe9302bf --- /dev/null +++ b/cppunit/static-compat/PKGBUILD @@ -0,0 +1,33 @@ +_pkgname=cppunit +pkgname=static-compat-$_pkgname +pkgver=1.15.1 +pkgrel=1 +pkgdesc="A C++ unit testing framework" +arch=('x86_64') +url="https://www.freedesktop.org/wiki/Software/cppunit" +license=('LGPL') +depends=('sh' 'gcc-libs-static-compat') +makedepends=('static-compat-configure') +options=('!emptydirs' 'staticlibs') +source=(https://dev-www.libreoffice.org/src/${_pkgname}-${pkgver}.tar.gz) +sha256sums=('89c5c6665337f56fd2db36bc3805a5619709d51fb136e51937072f63fcc717a7') + +build() { + source static-compat-environment + cd ${_pkgname}-${pkgver} + static-compat-configure --disable-shared + make +} + +check() { + source static-compat-environment + cd ${_pkgname}-${pkgver} + make check +} + +package() { + source static-compat-environment + cd ${_pkgname}-${pkgver} + make DESTDIR="${pkgdir}" install + rm -r "$pkgdir/$static_compat_prefix/share" +} diff --git a/dbus/static/PKGBUILD b/dbus/static-compat/PKGBUILD similarity index 50% rename from dbus/static/PKGBUILD rename to dbus/static-compat/PKGBUILD index 5f374547..da7ebfc0 100644 --- a/dbus/static/PKGBUILD +++ b/dbus/static-compat/PKGBUILD @@ -4,24 +4,24 @@ # Contributor: Link Dupont _pkgname=dbus -pkgname=$_pkgname-static -pkgver=1.12.20 +pkgname=static-compat-$_pkgname +pkgver=1.14.0 pkgrel=1 pkgdesc="Freedesktop.org message bus system" url="https://wiki.freedesktop.org/www/Software/dbus/" arch=(x86_64) license=(GPL custom) -depends=(expat-static) -makedepends=(xmlto python yelp-tools git autoconf-archive) +depends=(static-compat-expat) +makedepends=(static-compat-configure xmlto python yelp-tools git autoconf-archive) options=(!emptydirs staticlibs) -#source=("git+https://gitlab.freedesktop.org/dbus/dbus.git?signed#tag=dbus-$pkgver" -source=("git+https://gitlab.freedesktop.org/dbus/dbus.git#tag=dbus-$pkgver" +source=("git+https://gitlab.freedesktop.org/dbus/dbus.git?signed#tag=dbus-$pkgver" no-fatal-warnings.diff) sha256sums=('SKIP' - '6958eeec07557b92a28419eb1702331ee2f0a6fd17285e37dfb6130b9fa4cf6e') -#validpgpkeys=('DA98F25C0871C49A59EAFF2C4DE8FF2A63C7CC90') # Simon McVittie + 'c10395be67e1127a58d7173b587fbbf16f8a8b271c41293558fcf9e27c185478') +validpgpkeys=('DA98F25C0871C49A59EAFF2C4DE8FF2A63C7CC90') # Simon McVittie prepare() { + source static-compat-environment cd dbus # Allow us to enable checks without them being fatal @@ -31,12 +31,12 @@ prepare() { } build() { + source static-compat-environment cd dbus - ./configure \ - --prefix=/usr/static \ + static-compat-configure \ --sysconfdir=/etc \ --localstatedir=/var \ - --libexecdir=/usr/static/lib/dbus-1.0 \ + --libexecdir="$static_compat_prefix"/lib/dbus-1.0 \ runstatedir=/run \ --enable-inotify \ --disable-audit \ @@ -52,12 +52,21 @@ build() { } check() { + source static-compat-environment make -C dbus check } package() { + source static-compat-environment DESTDIR="$pkgdir" make -C dbus install - rm -r "$pkgdir"/{etc,var,usr/lib,usr/static/bin,usr/static/share/doc} + rm -r "$pkgdir"/{etc,var} + rm -r "$pkgdir/$static_compat_prefix"/{bin,share/doc} + + # remove -DDBUS_STATIC_BUILD from pc file + # note: Qt's build script adds this as compiler flag `-D-DDBUS_STATIC_BUILD` which breaks + # compilation. There's a patch to cope with the missing define anyways (taken from + # mingw-w64 variant) so this should be fine. + sed -i 's|-DDBUS_STATIC_BUILD||g' "$pkgdir/$static_compat_prefix"/lib/pkgconfig/dbus-1.pc install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 dbus/COPYING } diff --git a/dbus/static/dbus-reload.hook b/dbus/static-compat/dbus-reload.hook similarity index 100% rename from dbus/static/dbus-reload.hook rename to dbus/static-compat/dbus-reload.hook diff --git a/dbus/static/no-fatal-warnings.diff b/dbus/static-compat/no-fatal-warnings.diff similarity index 61% rename from dbus/static/no-fatal-warnings.diff rename to dbus/static-compat/no-fatal-warnings.diff index 459da904..69fa78e4 100644 --- a/dbus/static/no-fatal-warnings.diff +++ b/dbus/static-compat/no-fatal-warnings.diff @@ -1,10 +1,10 @@ diff --git i/dbus/dbus-internals.c w/dbus/dbus-internals.c -index 267aef97..b1064e85 100644 +index ab498b15..cf86f4ae 100644 --- i/dbus/dbus-internals.c +++ w/dbus/dbus-internals.c -@@ -185,7 +185,7 @@ const char *_dbus_no_memory_message = "Not enough memory"; - - static dbus_bool_t warn_initted = FALSE; +@@ -193,7 +193,7 @@ static dbus_bool_t warn_initted = FALSE; + * threads, the worst that will happen is that warnings get their default + * fatal/non-fatal nature. */ static dbus_bool_t fatal_warnings = FALSE; -static dbus_bool_t fatal_warnings_on_check_failed = TRUE; +static dbus_bool_t fatal_warnings_on_check_failed = FALSE; diff --git a/devel/generator/generate.pl b/devel/generator/generate.pl index dec1baf7..6c007e24 100755 --- a/devel/generator/generate.pl +++ b/devel/generator/generate.pl @@ -12,7 +12,7 @@ use strict; use utf8; my @vcs_0_variant_suffixes = (qw(git svn hg)); -my @cfg_0_variant_suffixes = (qw(static)); +my @cfg_0_variant_suffixes = (qw(static static-compat)); my @cfg_1_variant_suffixes = (qw(doc test cli angle dynamic opengl noopengl)); my @variant_suffixes = (\@vcs_0_variant_suffixes, \@cfg_0_variant_suffixes, \@cfg_1_variant_suffixes); @@ -47,7 +47,8 @@ sub _render_deps { my ($package_prefix, $controller, @d) = @_; my $prefix = $controller->stash('package_name_prefix'); my $suffix = $controller->stash('package_name_suffix'); - return join(' ', map { "'${prefix}${package_prefix}-${_}${suffix}'" } @d); + my $quote = $prefix =~ qr/^(mingw-w64|android)/ ? "'" : ''; + return join(' ', map { "${quote}${prefix}${package_prefix}-${_}${suffix}${quote}" } @d); } sub _render_optdeps { my ($package_prefix, $controller, %d) = @_; diff --git a/devel/generator/templates/layouts/static-compat-qt6-base.sh.ep b/devel/generator/templates/layouts/static-compat-qt6-base.sh.ep new file mode 100644 index 00000000..62088961 --- /dev/null +++ b/devel/generator/templates/layouts/static-compat-qt6-base.sh.ep @@ -0,0 +1,108 @@ +# Maintainer: Martchus +<%== content_for 'additional_contributors' %>\ + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. +# Do not edit it manually! See README.md in the repository's root directory +# for more information. +% if ($patch_files->size) { + +# All patches are managed at https://github.com/Martchus/qt<%== $qt_module %> +% } + +pkgname=<%= $package_name %> +_qtver=6.3.0 +pkgver=${_qtver/-/} +pkgrel=1 +arch=(x86_64) +url='https://www.qt.io' +license=(GPL3 LGPL3 FDL custom) +pkgdesc='A cross-platform application and UI framework' +depends=(shared-mime-info + static-compat-brotli static-compat-dbus static-compat-double-conversion + static-compat-fontconfig static-compat-libb2 static-compat-libglvnd + static-compat-libice static-compat-libinput static-compat-libjpeg-turbo + static-compat-libxdamage static-compat-libxkbcommon static-compat-libxmu + static-compat-libxxf86vm static-compat-md4c static-compat-pcre2 + static-compat-sqlite static-compat-xcb-util-image static-compat-xcb-util-keysyms + static-compat-xcb-util-renderutil static-compat-vulkan-headers + static-compat-xcb-util-wm static-compat-xorgproto static-compat-xtrans) +makedepends=(static-compat-cmake xdg-utils ninja) +options=('!strip' '!buildflags' 'staticlibs' '!emptydirs') +_pkgfqn="qt<%== $qt_module %>-everywhere-src-${_qtver}" +source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${_qtver}/submodules/${_pkgfqn}.tar.xz"\ +<%== include 'fragments/source_file_list', relevant_files => $patch_files %>) +sha256sums=('<%== $qt_module_sha256 %>'\ +<%== include 'fragments/sha256_list', relevant_files => $patch_files %>) + +% if ($patch_files->size || content_for('prepare')->size) { +prepare () { + cd $_pkgfqn + +% if ($patch_files->size) { + # apply patches; further descriptions can be found in patch files itself + for patch in "$srcdir/"*.patch; do + msg2 "Applying patch $patch" + patch -p1 -i "$patch" + done +% } +<%== content_for 'prepare' %>\ +} + +% } +build() { + check_buildoption ccache y && ccache_args=' + -DCMAKE_C_COMPILER_LAUNCHER=ccache + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache' + source static-compat-environment + export PATH=$PWD:$PATH + printf '#!/usr/bin/bash\nexec /usr/bin/pkg-config --static "$@"\n' > pkg-config + chmod +x pkg-config + static-compat-cmake<%== $static_suffix %> -G Ninja -B build -S $_pkgfqn \\ + $ccache_args \\ + -DCMAKE_SKIP_INSTALL_RPATH=ON \\ + -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \\ + -DINSTALL_BINDIR=lib/qt6/bin \\ + -DINSTALL_DOCDIR=share/doc/qt6 \\ + -DINSTALL_ARCHDATADIR=lib/qt6 \\ + -DINSTALL_DATADIR=share/qt6 \\ + -DINSTALL_INCLUDEDIR=include/qt6 \\ + -DINSTALL_MKSPECSDIR=lib/qt6/mkspecs \\ + -DINSTALL_EXAMPLESDIR=share/doc/qt6/examples \\ + -DINPUT_openssl=linked \\ + -DQT_FEATURE_openssl_linked=ON \\ + -DQT_FEATURE_static_runtime=ON \\ + -DQT_FEATURE_system_sqlite=ON \\ + -DQT_FEATURE_system_xcb_xinput=ON \\ + -DQT_FEATURE_xcb=ON \\ + -DQT_FEATURE_xcb_sm=ON \\ + -DQT_FEATURE_icu=OFF \\ + -DQT_FEATURE_kms=OFF \\ + -DQT_FEATURE_eglfs=OFF \\ + -DQT_FEATURE_gbm=OFF \\ + -DQT_FEATURE_linuxfb=OFF \\ + -DQT_FEATURE_gssapi=OFF \\ + -DQT_FEATURE_fontconfig=ON \\ + -DGLIB2_USE_PKG_CONFIG=ON \\ + -DCMAKE_INSTALL_OLDINCLUDEDIR=$static_compat_prefix/include \\ + -DGSSAPI_INCLUDE_DIRS=$static_compat_prefix/include \\ + -DICU_INCLUDE_DIR=$static_compat_prefix/include \\ + -DLibdrm_INCLUDE_DIR=$static_compat_prefix/include \\ + -Dgbm_INCLUDE_DIR=$static_compat_prefix/include + VERBOSE=1 cmake --build build +} + +package() { + source static-compat-environment + DESTDIR="$pkgdir" cmake --install build + + install -Dm644 $_pkgfqn/LICENSE* -t "$pkgdir"/usr/share/licenses/$pkgname + + # Drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "$pkgdir" -type f -name '*.prl' \\ + -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; + + rm -r "$pkgdir/$static_compat_prefix"/share/doc +} diff --git a/devel/generator/templates/layouts/static-compat-qt6-module.sh.ep b/devel/generator/templates/layouts/static-compat-qt6-module.sh.ep new file mode 100644 index 00000000..9c18a74f --- /dev/null +++ b/devel/generator/templates/layouts/static-compat-qt6-module.sh.ep @@ -0,0 +1,63 @@ +# Maintainer: Martchus +<%== content_for 'additional_contributors' %>\ + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +<%== content_for 'comment_header' %>\ +pkgname=static-compat-qt6-<%== $qt_module %> +<%== content %>\ +options=('!strip' '!buildflags' 'staticlibs' '!emptydirs') +_pkgfqn="qt<%== $qt_module %>-everywhere-src-${_qtver}" +<%== include 'fragments/qt6-source' %>\ +<%== include 'fragments/source_file_list', relevant_files => $patch_files %>) +sha256sums=('<%== stash('git_commit') ? 'SKIP' : $qt_module_sha256 %>'\ +<%== include 'fragments/sha256_list', relevant_files => $patch_files %>) + +% if ($patch_files->size || content_for('prepare')->size) { +prepare () { + cd $_pkgfqn + +% if ($patch_files->size) { + # apply patches; further descriptions can be found in patch files itself + for patch in "$srcdir/"*.patch; do + msg2 "Applying patch $patch" + patch -p1 -i "$patch" + done +% } +<%== content_for 'prepare' %>\ +} + +% } +build() { + check_buildoption ccache y && ccache_args=' + -DCMAKE_C_COMPILER_LAUNCHER=ccache + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache' + source static-compat-environment + export PATH=$PWD:$PATH + printf '#!/usr/bin/bash\nexec /usr/bin/pkg-config --static "$@"\n' > pkg-config + chmod +x pkg-config +<%== content_for 'before_build_config' %>\ + static-compat-cmake -G Ninja -B build -S $_pkgfqn \\ + $ccache_args \\ + -DCMAKE_SKIP_INSTALL_RPATH=ON \\ + -DGLIB2_USE_PKG_CONFIG=ON \\ + -DQT_FEATURE_static_runtime=ON \\ + -DFEATURE_pkg_config=ON<%== content_for 'additional_cmake_args' %> + VERBOSE=1 cmake --build build +} + +package() { + source static-compat-environment +<%== content_for 'before_package_install' %>\ + DESTDIR="$pkgdir" cmake --install build + +% unless (stash('no_libs')) { + # Drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "$pkgdir/$static_compat_prefix/lib" -type f -name '*.prl' \\ + -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; + +% } + install -d "$pkgdir"/usr/share/licenses + ln -s /usr/share/licenses/static-compat-qt6-base "$pkgdir"/usr/share/licenses/$pkgname +} diff --git a/devel/qt5/update-patches.sh b/devel/qt5/update-patches.sh index 047a6d22..e5be5b22 100755 --- a/devel/qt5/update-patches.sh +++ b/devel/qt5/update-patches.sh @@ -99,12 +99,13 @@ msg2 "Exporting patches for branch '$branch' (based on '$tag')" git format-patch "$tag" --output-directory "$dest" new_patches=("$dest"/*.patch) also_covered_variants=none # for sake of simplicity: use same set of patches also for android packages -[[ $variant == mingw-w64 ]] && also_covered_variants=android- -for other_variant_dir in "$dest/../$variant"?* "$dest/../$also_covered_variants"?*; do +more_covered_variants=none +[[ $variant == mingw-w64 ]] && also_covered_variants=android- more_covered_variants=static-compat +for other_variant_dir in "$dest/../$variant"?* "$dest/../$also_covered_variants"?* "$dest/../$more_covered_variants"*; do [[ -d $other_variant_dir ]] || continue find "$other_variant_dir" -iname '*.patch' -delete if [[ ${#new_patches[@]} -gt 0 ]]; then - ln --symbolic --relative --target-directory="$other_variant_dir" "${new_patches[@]}" + ln --verbose --symbolic --relative --target-directory="$other_variant_dir" "${new_patches[@]}" fi done popd > /dev/null diff --git a/double-conversion/static-compat/PKGBUILD b/double-conversion/static-compat/PKGBUILD new file mode 100644 index 00000000..e3bfaf87 --- /dev/null +++ b/double-conversion/static-compat/PKGBUILD @@ -0,0 +1,30 @@ +# Contributor: Antonio Rojas +# Contributor: Anatol Pomozov +# Contributor: Joel Teichroeb +# Contributor: Jonas Heinrich + +_pkgname=double-conversion +pkgname=static-compat-$_pkgname +pkgver=3.2.0 +pkgrel=1 +pkgdesc='Binary-decimal and decimal-binary routines for IEEE doubles' +arch=(x86_64) +url='https://github.com/google/double-conversion' +license=(BSD) +depends=(gcc-libs-static-compat) +makedepends=(static-compat-cmake) +source=(https://github.com/google/double-conversion/archive/v$pkgver/$_pkgname-$pkgver.tar.gz) +sha256sums=('3dbcdf186ad092a8b71228a5962009b5c96abde9a315257a3452eb988414ea3b') + +build() { + source static-compat-environment + static-compat-cmake -B build -S $_pkgname-$pkgver + cmake --build build +} + +package () { + source static-compat-environment + DESTDIR="$pkgdir" cmake --install build + + install -Dm644 $_pkgname-$pkgver/LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname +} diff --git a/environment/static-compat/PKGBUILD b/environment/static-compat/PKGBUILD new file mode 100644 index 00000000..46527b5f --- /dev/null +++ b/environment/static-compat/PKGBUILD @@ -0,0 +1,15 @@ +pkgname=static-compat-environment +pkgver=1 +pkgrel=1 +arch=('any') +pkgdesc="Script providing common environment variables to use gcc-static-compat" +license=('GPL') +depends=('gcc-static-compat') +url="https://github.com/Martchus/PKGBUILDs" +source=("static-compat-environment.sh") +sha256sums=('SKIP') + +package() { + install -d "${pkgdir}"/usr/bin + install -m 755 static-compat-environment.sh "${pkgdir}"/usr/bin/static-compat-environment +} diff --git a/environment/static-compat/static-compat-environment.sh b/environment/static-compat/static-compat-environment.sh new file mode 100644 index 00000000..9b326d8f --- /dev/null +++ b/environment/static-compat/static-compat-environment.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +static_compat_prefix=/usr/static-compat +export PATH=$static_compat_prefix/bin:$PATH +export CC=$static_compat_prefix/bin/gcc +export CXX=$static_compat_prefix/bin/g++ +export CFLAGS="$CFLAGS -fPIC" +export CXXFLAGS="$CXXFLAGS -fPIC" +export CPPFLAGS="$CPPFLAGS" +export PKG_CONFIG_PATH=${PKG_CONFIG_PATH:-$static_compat_prefix/usr/lib/pkgconfig:$static_compat_prefix/usr/share/pkgconfig} +export PKG_CONFIG_SYSROOT_DIR=${PKG_CONFIG_SYSROOT_DIR:-$static_compat_prefix} +export PKG_CONFIG_LIBDIR=${PKG_CONFIG_LIBDIR:-$static_compat_prefix/lib/pkgconfig:$static_compat_prefix/share/pkgconfig} diff --git a/expat/static/PKGBUILD b/expat/static-compat/PKGBUILD similarity index 64% rename from expat/static/PKGBUILD rename to expat/static-compat/PKGBUILD index 958cf196..121016ad 100644 --- a/expat/static/PKGBUILD +++ b/expat/static-compat/PKGBUILD @@ -4,27 +4,27 @@ # Contributor: Judd Vinet _pkgname=expat -pkgname=$_pkgname-static -pkgver=2.2.10 +pkgname=static-compat-$_pkgname +pkgver=2.4.8 pkgrel=1 pkgdesc='An XML parser library' arch=('x86_64') url="https://libexpat.github.io/" license=('MIT') -depends=('glibc') -makedepends=('cmake') +depends=('glibc-static-compat') +makedepends=('static-compat-cmake') options=(staticlibs) source=("https://github.com/libexpat/libexpat/releases/download/R_${pkgver//./_}/expat-${pkgver}.tar.bz2"{,.asc}) -sha512sums=('9623e86024d09e3bb0cf51fd0d56ecaee5fb8c8acb71589104a63b510f73c1e84abb0ccea4e2c196bdf1d30b5ad0633a915758f75813717d031d633e34f022b7' +sha512sums=('46cc9d725f359b77681a2875bfefa15ceee50eb9513f6577607c0c5833dfa4241565c74f26b84b38d802c3cd8c32f00204fd74272bcecbd21229425764eef86c' 'SKIP') -b2sums=('e837353deb2fa6a9fbeff9c1843e63f33a1622bf26f6a914a1e2e572324d4826165bf175ac13038666c8e4eb785167bd3dafe7bc5b4c98e92e608f20709f053d' +b2sums=('a829bd94d2cc9b305874ae2539dd4388ea99eaed21d2da17bbd99a1e7735b0f7cb910d096f72c71b128dcb8ffdff9021109e7ff5e562d8cefad228fd8d66f897' 'SKIP') validpgpkeys=(3176EF7DB2367F1FCA4F306B1F9B0E909AF37285) # Sebastian Pipping build() { + source static-compat-environment cd "$_pkgname-$pkgver" - cmake -DCMAKE_INSTALL_PREFIX=/usr/static \ - -DCMAKE_BUILD_TYPE='None' \ + static-compat-cmake \ -DEXPAT_SHARED_LIBS=OFF \ -DEXPAT_BUILD_TOOLS=OFF \ -DEXPAT_BUILD_EXAMPLES=OFF \ @@ -35,13 +35,15 @@ build() { } check() { + source static-compat-environment cd "$_pkgname-$pkgver" make VERBOSE=1 -C build test } package() { + source static-compat-environment cd "$_pkgname-$pkgver" make VERBOSE=1 DESTDIR="$pkgdir" -C build install - rm -r "$pkgdir"/usr/static/share + rm -r "$pkgdir/$static_compat_prefix"/share install -vDm 644 COPYING -t "${pkgdir}/usr/share/licenses/$pkgname/" } diff --git a/fontconfig/static-compat/PKGBUILD b/fontconfig/static-compat/PKGBUILD new file mode 100644 index 00000000..89e5a42f --- /dev/null +++ b/fontconfig/static-compat/PKGBUILD @@ -0,0 +1,50 @@ +# Contributor: Jan Alexander Steffens (heftig) +# Contributor: Jan de Groot + +_pkgname=fontconfig +pkgname=static-compat-$_pkgname +pkgver=2.14.0 +pkgrel=1 +epoch=2 +pkgdesc="Library for configuring and customizing font access" +url="https://www.freedesktop.org/wiki/Software/fontconfig/" +arch=(x86_64) +license=(custom) +depends=(static-compat-expat static-compat-freetype2) +makedepends=(static-compat-meson git autoconf-archive gperf python-lxml python-six docbook-utils) +checkdepends=(unzip) +_commit=fcb042028126d79ea5a5fa015b2b034b98656e73 # master +options=(!emptydirs !docs staticlibs) +_commit=911b19f19f1334d51c452756f9ce222c1101097b # tags/2.14.0^0 +source=("git+https://gitlab.freedesktop.org/fontconfig/fontconfig.git#commit=$_commit") +b2sums=('SKIP') + +# a nice page to test font matching: +# http://zipcon.net/~swhite/docs/computers/browsers/fonttest.html +# http://getemoji.com/ + +pkgver() { + cd fontconfig + git describe --tags | sed 's/-/+/g' +} + +build() { + export CFLAGS+=' -lstdc++' # for __gxx_personality_v0 required by harfbuzz.a + source static-compat-environment + static-compat-meson $_pkgname build -Ddoc=disabled + meson compile -C build +} + +check() { + source static-compat-environment + meson test -C build --print-errorlogs +} + +package() { + source static-compat-environment + meson install -C build --destdir="$pkgdir" + + install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 $_pkgname/COPYING +} + +# vim:set sw=2 et: diff --git a/fontconfig/static/PKGBUILD b/fontconfig/static/PKGBUILD deleted file mode 100644 index 96c3492a..00000000 --- a/fontconfig/static/PKGBUILD +++ /dev/null @@ -1,64 +0,0 @@ -# Contributor: Jan Alexander Steffens (heftig) -# Contributor: Jan de Groot - -_pkgname=fontconfig -pkgname=$_pkgname-static -pkgver=2.13.91+48+gfcb0420 -pkgrel=2 -epoch=2 -pkgdesc="Library for configuring and customizing font access" -url="https://www.freedesktop.org/wiki/Software/fontconfig/" -arch=(x86_64) -license=(custom) -depends=(expat-static freetype2-static) -makedepends=(git autoconf-archive gperf python-lxml python-six docbook-utils) -checkdepends=(unzip) -_commit=fcb042028126d79ea5a5fa015b2b034b98656e73 # master -options=(!emptydirs !docs staticlibs) -source=("git+https://gitlab.freedesktop.org/fontconfig/fontconfig.git#commit=$_commit") -sha256sums=('SKIP') - -# a nice page to test font matching: -# http://zipcon.net/~swhite/docs/computers/browsers/fonttest.html -# http://getemoji.com/ - -pkgver() { - cd fontconfig - git describe --tags | sed 's/-/+/g' -} - -prepare() { - cd fontconfig - NOCONFIGURE=1 ./autogen.sh -} - -build() { - cd fontconfig - export PKG_CONFIG_PATH=/usr/static/lib/pkgconfig:/usr/lib/pkgconfig - export PATH=$PWD:$PATH - printf '#!/usr/bin/bash\nexec /usr/bin/pkg-config --static "$@"\n' > pkg-config - chmod +x pkg-config - ./configure --prefix=/usr/static \ - --sysconfdir=/etc \ - --with-templatedir=/etc/fonts/conf.avail \ - --localstatedir=/var \ - --disable-shared \ - --enable-static \ - --disable-docs - make -} - -check() { - cd fontconfig - make -k check -} - -package() { - cd fontconfig - make DESTDIR="$pkgdir" install - - rm -r "$pkgdir/usr/static/bin" "$pkgdir/etc" "$pkgdir/var" - install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 COPYING -} - -# vim:set sw=2 et: diff --git a/freetype2-bootstrap/static b/freetype2-bootstrap/static-compat similarity index 100% rename from freetype2-bootstrap/static rename to freetype2-bootstrap/static-compat diff --git a/freetype2/mingw-w64-bootstrap/0001-Enable-table-validation-modules.patch b/freetype2/mingw-w64-bootstrap/0001-Enable-table-validation-modules.patch deleted file mode 100644 index 969e6025..00000000 --- a/freetype2/mingw-w64-bootstrap/0001-Enable-table-validation-modules.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: "Jan Alexander Steffens (heftig)" -Date: Tue, 23 Jun 2015 08:40:29 +0200 -Subject: [PATCH] Enable table validation modules - ---- - modules.cfg | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/modules.cfg b/modules.cfg -index aded92e5e922..f133c65b27e2 100644 ---- a/modules.cfg -+++ b/modules.cfg -@@ -117,26 +117,26 @@ AUX_MODULES += cache - - # TrueType GX/AAT table validation. Needs `ftgxval.c' below. - # --# AUX_MODULES += gxvalid -+AUX_MODULES += gxvalid - - # Support for streams compressed with gzip (files with suffix .gz). - # - # See include/freetype/ftgzip.h for the API. - AUX_MODULES += gzip - - # Support for streams compressed with LZW (files with suffix .Z). - # - # See include/freetype/ftlzw.h for the API. - AUX_MODULES += lzw - - # Support for streams compressed with bzip2 (files with suffix .bz2). - # - # See include/freetype/ftbzip2.h for the API. - AUX_MODULES += bzip2 - - # OpenType table validation. Needs `ftotval.c' below. - # --# AUX_MODULES += otvalid -+AUX_MODULES += otvalid - - # Auxiliary PostScript driver component to share common code. - # diff --git a/freetype2/mingw-w64-bootstrap/0001-Enable-table-validation-modules.patch b/freetype2/mingw-w64-bootstrap/0001-Enable-table-validation-modules.patch new file mode 120000 index 00000000..f16a4748 --- /dev/null +++ b/freetype2/mingw-w64-bootstrap/0001-Enable-table-validation-modules.patch @@ -0,0 +1 @@ +../mingw-w64/0001-Enable-table-validation-modules.patch \ No newline at end of file diff --git a/freetype2/mingw-w64-bootstrap/0002-Enable-subpixel-rendering.patch b/freetype2/mingw-w64-bootstrap/0002-Enable-subpixel-rendering.patch deleted file mode 100644 index 8f16e7a5..00000000 --- a/freetype2/mingw-w64-bootstrap/0002-Enable-subpixel-rendering.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: "Jan Alexander Steffens (heftig)" -Date: Tue, 23 Jun 2015 08:43:07 +0200 -Subject: [PATCH] Enable subpixel rendering - ---- - include/freetype/config/ftoption.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h -index c5bde243b127..77d6efb2e5f2 100644 ---- a/include/freetype/config/ftoption.h -+++ b/include/freetype/config/ftoption.h -@@ -123,7 +123,7 @@ FT_BEGIN_HEADER - * When this macro is not defined, FreeType offers alternative LCD - * rendering technology that produces excellent output. - */ --/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */ -+#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING - - - /************************************************************************** diff --git a/freetype2/mingw-w64-bootstrap/0002-Enable-subpixel-rendering.patch b/freetype2/mingw-w64-bootstrap/0002-Enable-subpixel-rendering.patch new file mode 120000 index 00000000..ae8cd9aa --- /dev/null +++ b/freetype2/mingw-w64-bootstrap/0002-Enable-subpixel-rendering.patch @@ -0,0 +1 @@ +../mingw-w64/0002-Enable-subpixel-rendering.patch \ No newline at end of file diff --git a/freetype2/mingw-w64-bootstrap/0003-Enable-infinality-subpixel-hinting.patch b/freetype2/mingw-w64-bootstrap/0003-Enable-infinality-subpixel-hinting.patch deleted file mode 100644 index eee5e3ee..00000000 --- a/freetype2/mingw-w64-bootstrap/0003-Enable-infinality-subpixel-hinting.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: "Jan Alexander Steffens (heftig)" -Date: Mon, 29 Aug 2016 08:43:10 +0200 -Subject: [PATCH] Enable infinality subpixel hinting - ---- - include/freetype/config/ftoption.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h -index 77d6efb2e5f2..c33c51eeb2e7 100644 ---- a/include/freetype/config/ftoption.h -+++ b/include/freetype/config/ftoption.h -@@ -706,8 +706,8 @@ FT_BEGIN_HEADER - * https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx - */ - /* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING 1 */ --#define TT_CONFIG_OPTION_SUBPIXEL_HINTING 2 --/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING ( 1 | 2 ) */ -+/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING 2 */ -+#define TT_CONFIG_OPTION_SUBPIXEL_HINTING ( 1 | 2 ) - - - /************************************************************************** diff --git a/freetype2/mingw-w64-bootstrap/0003-Enable-infinality-subpixel-hinting.patch b/freetype2/mingw-w64-bootstrap/0003-Enable-infinality-subpixel-hinting.patch new file mode 120000 index 00000000..4b606bcd --- /dev/null +++ b/freetype2/mingw-w64-bootstrap/0003-Enable-infinality-subpixel-hinting.patch @@ -0,0 +1 @@ +../mingw-w64/0003-Enable-infinality-subpixel-hinting.patch \ No newline at end of file diff --git a/freetype2/mingw-w64-bootstrap/0004-Enable-long-PCF-family-names.patch b/freetype2/mingw-w64-bootstrap/0004-Enable-long-PCF-family-names.patch deleted file mode 100644 index 93e04473..00000000 --- a/freetype2/mingw-w64-bootstrap/0004-Enable-long-PCF-family-names.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: "Jan Alexander Steffens (heftig)" -Date: Sun, 14 May 2017 18:09:31 +0200 -Subject: [PATCH] Enable long PCF family names - ---- - include/freetype/config/ftoption.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h -index c33c51eeb2e7..c33ddb4bf60c 100644 ---- a/include/freetype/config/ftoption.h -+++ b/include/freetype/config/ftoption.h -@@ -895,7 +895,7 @@ FT_BEGIN_HEADER - * If this option is activated, it can be controlled with the - * `no-long-family-names` property of the 'pcf' driver module. - */ --/* #define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */ -+#define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES - - - /*************************************************************************/ diff --git a/freetype2/mingw-w64-bootstrap/0004-Enable-long-PCF-family-names.patch b/freetype2/mingw-w64-bootstrap/0004-Enable-long-PCF-family-names.patch new file mode 120000 index 00000000..da824dc9 --- /dev/null +++ b/freetype2/mingw-w64-bootstrap/0004-Enable-long-PCF-family-names.patch @@ -0,0 +1 @@ +../mingw-w64/0004-Enable-long-PCF-family-names.patch \ No newline at end of file diff --git a/freetype2/static-bootstrap/0001-Enable-table-validation-modules.patch b/freetype2/static-bootstrap/0001-Enable-table-validation-modules.patch deleted file mode 100644 index 4c469faf..00000000 --- a/freetype2/static-bootstrap/0001-Enable-table-validation-modules.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: "Jan Alexander Steffens (heftig)" -Date: Tue, 23 Jun 2015 08:40:29 +0200 -Subject: [PATCH] Enable table validation modules - ---- - modules.cfg | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/modules.cfg b/modules.cfg -index d6cdbe523..181f91541 100644 ---- a/modules.cfg -+++ b/modules.cfg -@@ -111,26 +111,26 @@ AUX_MODULES += cache - - # TrueType GX/AAT table validation. Needs `ftgxval.c' below. - # --# AUX_MODULES += gxvalid -+AUX_MODULES += gxvalid - - # Support for streams compressed with gzip (files with suffix .gz). - # - # See include/freetype/ftgzip.h for the API. - AUX_MODULES += gzip - - # Support for streams compressed with LZW (files with suffix .Z). - # - # See include/freetype/ftlzw.h for the API. - AUX_MODULES += lzw - - # Support for streams compressed with bzip2 (files with suffix .bz2). - # - # See include/freetype/ftbzip2.h for the API. - AUX_MODULES += bzip2 - - # OpenType table validation. Needs `ftotval.c' below. - # --# AUX_MODULES += otvalid -+AUX_MODULES += otvalid - - # Auxiliary PostScript driver component to share common code. - # diff --git a/freetype2/static-bootstrap/0002-Enable-subpixel-rendering.patch b/freetype2/static-bootstrap/0002-Enable-subpixel-rendering.patch deleted file mode 100644 index 26360b5c..00000000 --- a/freetype2/static-bootstrap/0002-Enable-subpixel-rendering.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: "Jan Alexander Steffens (heftig)" -Date: Tue, 23 Jun 2015 08:43:07 +0200 -Subject: [PATCH] Enable subpixel rendering - ---- - include/freetype/config/ftoption.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h -index 097f19b8a..e5de62e35 100644 ---- a/include/freetype/config/ftoption.h -+++ b/include/freetype/config/ftoption.h -@@ -124,7 +124,7 @@ FT_BEGIN_HEADER - * When this macro is not defined, FreeType offers alternative LCD - * rendering technology that produces excellent output. - */ --/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */ -+#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING - - - /************************************************************************** diff --git a/freetype2/static-bootstrap/0003-Enable-infinality-subpixel-hinting.patch b/freetype2/static-bootstrap/0003-Enable-infinality-subpixel-hinting.patch deleted file mode 100644 index d2369893..00000000 --- a/freetype2/static-bootstrap/0003-Enable-infinality-subpixel-hinting.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: "Jan Alexander Steffens (heftig)" -Date: Mon, 29 Aug 2016 08:43:10 +0200 -Subject: [PATCH] Enable infinality subpixel hinting - ---- - include/freetype/config/ftoption.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h -index e5de62e35..acb4d6d6a 100644 ---- a/include/freetype/config/ftoption.h -+++ b/include/freetype/config/ftoption.h -@@ -672,8 +672,8 @@ FT_BEGIN_HEADER - * https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx - */ - /* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING 1 */ --#define TT_CONFIG_OPTION_SUBPIXEL_HINTING 2 --/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING ( 1 | 2 ) */ -+/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING 2 */ -+#define TT_CONFIG_OPTION_SUBPIXEL_HINTING ( 1 | 2 ) - - - /************************************************************************** diff --git a/freetype2/static-bootstrap/0004-Enable-long-PCF-family-names.patch b/freetype2/static-bootstrap/0004-Enable-long-PCF-family-names.patch deleted file mode 100644 index 45fb72c4..00000000 --- a/freetype2/static-bootstrap/0004-Enable-long-PCF-family-names.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: "Jan Alexander Steffens (heftig)" -Date: Sun, 14 May 2017 18:09:31 +0200 -Subject: [PATCH] Enable long PCF family names - ---- - include/freetype/config/ftoption.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h -index acb4d6d6a..efa13b9c6 100644 ---- a/include/freetype/config/ftoption.h -+++ b/include/freetype/config/ftoption.h -@@ -861,7 +861,7 @@ FT_BEGIN_HEADER - * If this option is activated, it can be controlled with the - * `no-long-family-names` property of the 'pcf' driver module. - */ --/* #define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */ -+#define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES - - - /*************************************************************************/ diff --git a/freetype2/static-bootstrap/PKGBUILD b/freetype2/static-bootstrap/PKGBUILD deleted file mode 100644 index bf961b95..00000000 --- a/freetype2/static-bootstrap/PKGBUILD +++ /dev/null @@ -1,56 +0,0 @@ -# Contributor: Jan Alexander Steffens (heftig) -# Contributor: Jan de Groot - -_pkgname=freetype2 -pkgname=$_pkgname-bootstrap-static -pkgver=2.10.4 -pkgrel=1 -pkgdesc="Font rasterization library" -url="https://www.freetype.org/" -arch=(x86_64) -license=(GPL) -depends=(zlib bzip2-static libpng-static) -makedepends=(libx11-static) -provides=($_pkgname-static) -conflicts=($_pkgname-static) -options=(staticlibs) -source=(https://download-mirror.savannah.gnu.org/releases/freetype/freetype-$pkgver.tar.xz{,.sig} - 0001-Enable-table-validation-modules.patch - 0002-Enable-subpixel-rendering.patch - 0003-Enable-infinality-subpixel-hinting.patch - 0004-Enable-long-PCF-family-names.patch) -sha256sums=('86a854d8905b19698bbc8f23b860bc104246ce4854dcea8e3b0fb21284f75784' - 'SKIP' - 'f41df4f336d5e82e58733c7a4594476c9216cfc85c096327745a7e1b559e17e1' - 'dc77c1cfee4bf8e7e0690628c95d211df09e0d0750e4c8f075b78b5f105514f7' - '21a62bc12b848320c686d602d8d4e3bcd51294a9def4dc9c301736e077b59f3f' - '266384222f87a02fb02b2179828f6c26fe6d7b1fd09d1f7e3734e7fcb09cda2e') -validpgpkeys=(58E0C111E39F5408C5D3EC76C1A60EACE707FDA5) # Werner Lemberg - -prepare() { - cd freetype-$pkgver - patch -Np1 -i ../0001-Enable-table-validation-modules.patch - patch -Np1 -i ../0002-Enable-subpixel-rendering.patch - patch -Np1 -i ../0003-Enable-infinality-subpixel-hinting.patch - patch -Np1 -i ../0004-Enable-long-PCF-family-names.patch -} - -build() { - cd freetype-$pkgver - export PKG_CONFIG_PATH=/usr/static/lib/pkgconfig:/usr/lib/pkgconfig - ./configure --prefix=/usr/static --disable-shared --enable-static - make -} - -check() { - cd freetype-$pkgver - make -k check -} - -package() { - cd freetype-$pkgver - make DESTDIR="$pkgdir" install - rm -rf "${pkgdir}"/usr/static/share/ -} - -# vim:set ts=2 sw=2 et: diff --git a/freetype2/static-compat-bootstrap/0001-Enable-table-validation-modules.patch b/freetype2/static-compat-bootstrap/0001-Enable-table-validation-modules.patch new file mode 120000 index 00000000..f16a4748 --- /dev/null +++ b/freetype2/static-compat-bootstrap/0001-Enable-table-validation-modules.patch @@ -0,0 +1 @@ +../mingw-w64/0001-Enable-table-validation-modules.patch \ No newline at end of file diff --git a/freetype2/static-compat-bootstrap/0002-Enable-subpixel-rendering.patch b/freetype2/static-compat-bootstrap/0002-Enable-subpixel-rendering.patch new file mode 120000 index 00000000..ae8cd9aa --- /dev/null +++ b/freetype2/static-compat-bootstrap/0002-Enable-subpixel-rendering.patch @@ -0,0 +1 @@ +../mingw-w64/0002-Enable-subpixel-rendering.patch \ No newline at end of file diff --git a/freetype2/static-compat-bootstrap/0003-Enable-infinality-subpixel-hinting.patch b/freetype2/static-compat-bootstrap/0003-Enable-infinality-subpixel-hinting.patch new file mode 120000 index 00000000..4b606bcd --- /dev/null +++ b/freetype2/static-compat-bootstrap/0003-Enable-infinality-subpixel-hinting.patch @@ -0,0 +1 @@ +../mingw-w64/0003-Enable-infinality-subpixel-hinting.patch \ No newline at end of file diff --git a/freetype2/static-compat-bootstrap/0004-Enable-long-PCF-family-names.patch b/freetype2/static-compat-bootstrap/0004-Enable-long-PCF-family-names.patch new file mode 120000 index 00000000..da824dc9 --- /dev/null +++ b/freetype2/static-compat-bootstrap/0004-Enable-long-PCF-family-names.patch @@ -0,0 +1 @@ +../mingw-w64/0004-Enable-long-PCF-family-names.patch \ No newline at end of file diff --git a/freetype2/static-compat-bootstrap/PKGBUILD b/freetype2/static-compat-bootstrap/PKGBUILD new file mode 100644 index 00000000..46446ea5 --- /dev/null +++ b/freetype2/static-compat-bootstrap/PKGBUILD @@ -0,0 +1,66 @@ +# Contributor: Jan Alexander Steffens (heftig) +# Contributor: Jan de Groot + +_pkgname=freetype2 +pkgname=static-compat-$_pkgname-bootstrap +pkgver=2.12.0 +pkgrel=1 +pkgdesc="Font rasterization library" +url="https://www.freetype.org/" +arch=(x86_64) +license=(GPL) +# adding harfbuzz for improved OpenType features auto-hinting +# introduces a cycle dep to harfbuzz depending on freetype wanted by upstream +depends=(static-compat-zlib static-compat-bzip2 static-compat-libpng static-compat-brotli) +makedepends=(static-compat-libx11 static-compat-meson) +conflicts=(static-compat-$_pkgname) +provides=(static-compat-$_pkgname) +options=(staticlibs) +source=(https://download-mirror.savannah.gnu.org/releases/freetype/freetype-$pkgver.tar.xz + 0001-Enable-table-validation-modules.patch + 0002-Enable-subpixel-rendering.patch + 0003-Enable-infinality-subpixel-hinting.patch + 0004-Enable-long-PCF-family-names.patch) +sha256sums=('ef5c336aacc1a079ff9262d6308d6c2a066dd4d2a905301c4adda9b354399033' + '12c869eeba212c74d07d3d7815848b047ecb5282d5463dffb3bb6d219315d4da' + '2497dcb3650271db9bb7ad4f3379b5b3c6a19f5ca5388dd9ba7d42b5c15c8c4f' + 'caa0bc7d3dfa3b4c6b9beecda6141405dafe540f99a655dc83d1704fa232ac20' + '8bf978cd1abd73f54c53f7d214c368b1fd8921cd9800d2cc84427c662ffbbdcb') +validpgpkeys=(E30674707856409FF1948010BE6C3AAC63AD8E3F) # Werner Lemberg + +prepare() { + cd freetype-$pkgver + patch -Np1 -i ../0001-Enable-table-validation-modules.patch + patch -Np1 -i ../0002-Enable-subpixel-rendering.patch + patch -Np1 -i ../0003-Enable-infinality-subpixel-hinting.patch + patch -Np1 -i ../0004-Enable-long-PCF-family-names.patch + + # meson sucks + sed -i 's|static: false|static: true|g' meson.build + + # meson sucks a lot + sed -i 's|ftoption_command.*FT_CONFIG_OPTION_USE_HARFBUZZ.*||g' meson.build + sed -i 's|ft2_deps.*harfbuzz_dep.*||g' meson.build +} + +build() { + source static-compat-environment + cd freetype-$pkgver + static-compat-meson build -D zlib=system -D bzip2=enabled -D png=enabled -D brotli=enabled -Dharfbuzz=disabled + meson compile -C build +} + +check() { + source static-compat-environment + cd freetype-$pkgver + meson test -C build --print-errorlogs +} + +package() { + source static-compat-environment + cd freetype-$pkgver + meson install -C build --destdir="$pkgdir" + rm -rf "${pkgdir}"/usr/static/share/ +} + +# vim:set ts=2 sw=2 et: diff --git a/freetype2/static-compat/0001-Enable-table-validation-modules.patch b/freetype2/static-compat/0001-Enable-table-validation-modules.patch new file mode 120000 index 00000000..f16a4748 --- /dev/null +++ b/freetype2/static-compat/0001-Enable-table-validation-modules.patch @@ -0,0 +1 @@ +../mingw-w64/0001-Enable-table-validation-modules.patch \ No newline at end of file diff --git a/freetype2/static-compat/0002-Enable-subpixel-rendering.patch b/freetype2/static-compat/0002-Enable-subpixel-rendering.patch new file mode 120000 index 00000000..ae8cd9aa --- /dev/null +++ b/freetype2/static-compat/0002-Enable-subpixel-rendering.patch @@ -0,0 +1 @@ +../mingw-w64/0002-Enable-subpixel-rendering.patch \ No newline at end of file diff --git a/freetype2/static-compat/0003-Enable-infinality-subpixel-hinting.patch b/freetype2/static-compat/0003-Enable-infinality-subpixel-hinting.patch new file mode 120000 index 00000000..4b606bcd --- /dev/null +++ b/freetype2/static-compat/0003-Enable-infinality-subpixel-hinting.patch @@ -0,0 +1 @@ +../mingw-w64/0003-Enable-infinality-subpixel-hinting.patch \ No newline at end of file diff --git a/freetype2/static-compat/0004-Enable-long-PCF-family-names.patch b/freetype2/static-compat/0004-Enable-long-PCF-family-names.patch new file mode 120000 index 00000000..da824dc9 --- /dev/null +++ b/freetype2/static-compat/0004-Enable-long-PCF-family-names.patch @@ -0,0 +1 @@ +../mingw-w64/0004-Enable-long-PCF-family-names.patch \ No newline at end of file diff --git a/freetype2/static/PKGBUILD b/freetype2/static-compat/PKGBUILD similarity index 51% rename from freetype2/static/PKGBUILD rename to freetype2/static-compat/PKGBUILD index 96ec6c9c..99f06359 100644 --- a/freetype2/static/PKGBUILD +++ b/freetype2/static-compat/PKGBUILD @@ -2,8 +2,8 @@ # Contributor: Jan de Groot _pkgname=freetype2 -pkgname=$_pkgname-static -pkgver=2.10.4 +pkgname=static-compat-$_pkgname +pkgver=2.12.0 pkgrel=1 pkgdesc="Font rasterization library" url="https://www.freetype.org/" @@ -11,21 +11,20 @@ arch=(x86_64) license=(GPL) # adding harfbuzz for improved OpenType features auto-hinting # introduces a cycle dep to harfbuzz depending on freetype wanted by upstream -depends=(zlib bzip2-static libpng-static harfbuzz-static) -makedepends=(libx11-static) +depends=(static-compat-zlib static-compat-bzip2 static-compat-libpng static-compat-brotli static-compat-harfbuzz) +makedepends=(static-compat-libx11 static-compat-meson) options=(staticlibs) -source=(https://download-mirror.savannah.gnu.org/releases/freetype/freetype-$pkgver.tar.xz{,.sig} +source=(https://download-mirror.savannah.gnu.org/releases/freetype/freetype-$pkgver.tar.xz 0001-Enable-table-validation-modules.patch 0002-Enable-subpixel-rendering.patch 0003-Enable-infinality-subpixel-hinting.patch 0004-Enable-long-PCF-family-names.patch) -sha256sums=('86a854d8905b19698bbc8f23b860bc104246ce4854dcea8e3b0fb21284f75784' - 'SKIP' - 'f41df4f336d5e82e58733c7a4594476c9216cfc85c096327745a7e1b559e17e1' - 'dc77c1cfee4bf8e7e0690628c95d211df09e0d0750e4c8f075b78b5f105514f7' - '21a62bc12b848320c686d602d8d4e3bcd51294a9def4dc9c301736e077b59f3f' - '266384222f87a02fb02b2179828f6c26fe6d7b1fd09d1f7e3734e7fcb09cda2e') -validpgpkeys=(58E0C111E39F5408C5D3EC76C1A60EACE707FDA5) # Werner Lemberg +sha256sums=('ef5c336aacc1a079ff9262d6308d6c2a066dd4d2a905301c4adda9b354399033' + '12c869eeba212c74d07d3d7815848b047ecb5282d5463dffb3bb6d219315d4da' + '2497dcb3650271db9bb7ad4f3379b5b3c6a19f5ca5388dd9ba7d42b5c15c8c4f' + 'caa0bc7d3dfa3b4c6b9beecda6141405dafe540f99a655dc83d1704fa232ac20' + '8bf978cd1abd73f54c53f7d214c368b1fd8921cd9800d2cc84427c662ffbbdcb') +validpgpkeys=(E30674707856409FF1948010BE6C3AAC63AD8E3F) # Werner Lemberg prepare() { cd freetype-$pkgver @@ -33,23 +32,28 @@ prepare() { patch -Np1 -i ../0002-Enable-subpixel-rendering.patch patch -Np1 -i ../0003-Enable-infinality-subpixel-hinting.patch patch -Np1 -i ../0004-Enable-long-PCF-family-names.patch + + # meson sucks + sed -i 's|static: false|static: true|g' meson.build } build() { + source static-compat-environment cd freetype-$pkgver - export PKG_CONFIG_PATH=/usr/static/lib/pkgconfig:/usr/lib/pkgconfig - ./configure --prefix=/usr/static --disable-shared --enable-static - make + static-compat-meson build -D zlib=system -D bzip2=enabled -D png=enabled -D brotli=enabled + meson compile -C build } check() { + source static-compat-environment cd freetype-$pkgver - make -k check + meson test -C build --print-errorlogs } package() { + source static-compat-environment cd freetype-$pkgver - make DESTDIR="$pkgdir" install + meson install -C build --destdir="$pkgdir" rm -rf "${pkgdir}"/usr/static/share/ } diff --git a/freetype2/static/0001-Enable-table-validation-modules.patch b/freetype2/static/0001-Enable-table-validation-modules.patch deleted file mode 100644 index 4c469faf..00000000 --- a/freetype2/static/0001-Enable-table-validation-modules.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: "Jan Alexander Steffens (heftig)" -Date: Tue, 23 Jun 2015 08:40:29 +0200 -Subject: [PATCH] Enable table validation modules - ---- - modules.cfg | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/modules.cfg b/modules.cfg -index d6cdbe523..181f91541 100644 ---- a/modules.cfg -+++ b/modules.cfg -@@ -111,26 +111,26 @@ AUX_MODULES += cache - - # TrueType GX/AAT table validation. Needs `ftgxval.c' below. - # --# AUX_MODULES += gxvalid -+AUX_MODULES += gxvalid - - # Support for streams compressed with gzip (files with suffix .gz). - # - # See include/freetype/ftgzip.h for the API. - AUX_MODULES += gzip - - # Support for streams compressed with LZW (files with suffix .Z). - # - # See include/freetype/ftlzw.h for the API. - AUX_MODULES += lzw - - # Support for streams compressed with bzip2 (files with suffix .bz2). - # - # See include/freetype/ftbzip2.h for the API. - AUX_MODULES += bzip2 - - # OpenType table validation. Needs `ftotval.c' below. - # --# AUX_MODULES += otvalid -+AUX_MODULES += otvalid - - # Auxiliary PostScript driver component to share common code. - # diff --git a/freetype2/static/0002-Enable-subpixel-rendering.patch b/freetype2/static/0002-Enable-subpixel-rendering.patch deleted file mode 100644 index 26360b5c..00000000 --- a/freetype2/static/0002-Enable-subpixel-rendering.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: "Jan Alexander Steffens (heftig)" -Date: Tue, 23 Jun 2015 08:43:07 +0200 -Subject: [PATCH] Enable subpixel rendering - ---- - include/freetype/config/ftoption.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h -index 097f19b8a..e5de62e35 100644 ---- a/include/freetype/config/ftoption.h -+++ b/include/freetype/config/ftoption.h -@@ -124,7 +124,7 @@ FT_BEGIN_HEADER - * When this macro is not defined, FreeType offers alternative LCD - * rendering technology that produces excellent output. - */ --/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */ -+#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING - - - /************************************************************************** diff --git a/freetype2/static/0003-Enable-infinality-subpixel-hinting.patch b/freetype2/static/0003-Enable-infinality-subpixel-hinting.patch deleted file mode 100644 index d2369893..00000000 --- a/freetype2/static/0003-Enable-infinality-subpixel-hinting.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: "Jan Alexander Steffens (heftig)" -Date: Mon, 29 Aug 2016 08:43:10 +0200 -Subject: [PATCH] Enable infinality subpixel hinting - ---- - include/freetype/config/ftoption.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h -index e5de62e35..acb4d6d6a 100644 ---- a/include/freetype/config/ftoption.h -+++ b/include/freetype/config/ftoption.h -@@ -672,8 +672,8 @@ FT_BEGIN_HEADER - * https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx - */ - /* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING 1 */ --#define TT_CONFIG_OPTION_SUBPIXEL_HINTING 2 --/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING ( 1 | 2 ) */ -+/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING 2 */ -+#define TT_CONFIG_OPTION_SUBPIXEL_HINTING ( 1 | 2 ) - - - /************************************************************************** diff --git a/freetype2/static/0004-Enable-long-PCF-family-names.patch b/freetype2/static/0004-Enable-long-PCF-family-names.patch deleted file mode 100644 index 45fb72c4..00000000 --- a/freetype2/static/0004-Enable-long-PCF-family-names.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: "Jan Alexander Steffens (heftig)" -Date: Sun, 14 May 2017 18:09:31 +0200 -Subject: [PATCH] Enable long PCF family names - ---- - include/freetype/config/ftoption.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h -index acb4d6d6a..efa13b9c6 100644 ---- a/include/freetype/config/ftoption.h -+++ b/include/freetype/config/ftoption.h -@@ -861,7 +861,7 @@ FT_BEGIN_HEADER - * If this option is activated, it can be controlled with the - * `no-long-family-names` property of the 'pcf' driver module. - */ --/* #define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */ -+#define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES - - - /*************************************************************************/ diff --git a/gcc/static-compat/PKGBUILD b/gcc/static-compat/PKGBUILD new file mode 100644 index 00000000..db18b250 --- /dev/null +++ b/gcc/static-compat/PKGBUILD @@ -0,0 +1,378 @@ +# toolchain build order: linux-api-headers->glibc->binutils->gcc->glibc->binutils->gcc +# NOTE: libtool requires rebuilt with each new gcc version + +pkgname=({gcc,gcc-libs,lib32-gcc-libs,gcc-fortran,gcc-ada,gcc-d}-static-compat) +pkgver=11.2.0 +_majorver=${pkgver%%.*} +_islver=0.24 +pkgrel=1 +pkgdesc='The GNU Compiler Collection' +arch=(x86_64) +license=(GPL LGPL FDL custom) +url='https://gcc.gnu.org' +makedepends=( + binutils + doxygen + gcc-ada + git + glibc-static-compat + lib32-glibc-static-compat + libisl + libmpc + libxcrypt + python + zstd +) +checkdepends=( + dejagnu + expect + inetutils + python-pytest + tcl +) +options=(!emptydirs !lto debug) +_prefix=/usr/static-compat +_libdir=usr/static-compat/lib/gcc/$CHOST/${pkgver%%+*} +# _commit=6beb39ee6c465c21d0cc547fd66b445100cdcc35 +# source=(git://gcc.gnu.org/git/gcc.git#commit=$_commit +source=(https://sourceware.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.xz{,.sig} + c89 c99 + gdc_phobos_path.patch + gcc-ada-repro.patch +) +validpgpkeys=(F3691687D867B81B51CE07D9BBE43771487328A9 # bpiotrowski@archlinux.org + 86CFFCA918CF3AF47147588051E8B148A9999C34 # evangelos@foutrelis.com + 13975A70E63C361C73AE69EF6EEB81F8981C74C7 # richard.guenther@gmail.com + D3A93CAD751C2AF4F8C7AD516C35B99309B5FA62) # Jakub Jelinek +sha256sums=('d08edc536b54c372a1010ff6619dd274c0f1603aa49212ba20f7aa2cda36fa8b' + 'SKIP' + 'de48736f6e4153f03d0a5d38ceb6c6fdb7f054e8f47ddd6af0a3dbf14f27b931' + '2513c6d9984dd0a2058557bf00f06d8d5181734e41dcfe07be7ed86f2959622a' + 'c86372c207d174c0918d4aedf1cb79f7fc093649eb1ad8d9450dccc46849d308' + '1773f5137f08ac1f48f0f7297e324d5d868d55201c03068670ee4602babdef2f') + +prepare() { + [[ ! -d gcc ]] && ln -s gcc-${pkgver/+/-} gcc + cd gcc + + # Do not run fixincludes + sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in + + # Arch Linux installs x86_64 libraries in lib and i686 ones in lib32 + sed -i '/m64=/s/lib64/lib/' gcc/config/i386/t-linux64 + sed -i 's|MULTILIB_DIRNAMES .*|MULTILIB_DIRNAMES = 64 32|' gcc/config/i386/t-linux64 + sed -i 's|m32=.*|m32=../lib32\$\(call if_multiarch,:i386-linux-gnu\)|' gcc/config/i386/t-linux64 + + # D hacks + patch -Np1 -i "$srcdir/gdc_phobos_path.patch" + + # Reproducible gcc-ada + patch -Np0 < "$srcdir/gcc-ada-repro.patch" + + mkdir -p "$srcdir/gcc-build" +} + +build() { + local _confflags="--prefix=$_prefix \ + --libdir=$_prefix/lib \ + --libexecdir=$_prefix/lib \ + --mandir=$_prefix/share/man \ + --infodir=$_prefix/share/info \ + --with-sysroot=$_prefix \ + --with-native-system-header-dir="/include" \ + --with-bugurl=https://github.com/Martchus/PKGBUILDs/issues \ + --with-linker-hash-style=gnu \ + --with-system-zlib \ + --enable-__cxa_atexit \ + --enable-cet=auto \ + --enable-checking=release \ + --enable-clocale=gnu \ + --enable-default-pie \ + --enable-default-ssp \ + --enable-gnu-indirect-function \ + --enable-gnu-unique-object \ + --enable-linker-build-id \ + --enable-lto \ + --disable-bootstrap \ + --enable-checking=release \ + --enable-multilib \ + --enable-plugin \ + --enable-shared \ + --enable-static \ + --enable-threads=posix \ + --disable-libssp \ + --disable-libstdcxx-pch \ + --disable-werror \ + --with-build-config=bootstrap-lto \ + --enable-link-serialization=1 \ + gdc_include_dir=$_prefix/include/dlang/gdc" + + cd gcc-build + + # Credits @allanmcrae + # https://github.com/allanmcrae/toolchain/blob/f18604d70c5933c31b51a320978711e4e6791cf1/gcc/PKGBUILD + # TODO: properly deal with the build issues resulting from this + CFLAGS=${CFLAGS/-Werror=format-security/} + CXXFLAGS=${CXXFLAGS/-Werror=format-security/} + + "$srcdir/gcc/configure" \ + --enable-languages=c,c++,ada,fortran,lto,d \ + $_confflags + make +} + +check() { + cd gcc-build + + # disable libphobos test to avoid segfaults and other unfunny ways to waste my time + sed -i '/maybe-check-target-libphobos \\/d' Makefile + + # do not abort on error as some are "expected" + make -O -k check || true + "$srcdir/gcc/contrib/test_summary" +} + +package_gcc-libs-static-compat() { + pkgdesc='Runtime libraries shipped by GCC' + depends=('glibc-static-compat>=2.26') + options=(!emptydirs !strip) + + cd gcc-build + make -C $CHOST/libgcc DESTDIR="$pkgdir" install-shared + rm -f "$pkgdir/$_libdir/libgcc_eh.a" + + for lib in libatomic \ + libquadmath \ + libgfortran \ + libgomp \ + libitm \ + libsanitizer/{a,l,ub,t}san \ + libstdc++-v3/src \ + libvtv; do + make -C $CHOST/$lib DESTDIR="$pkgdir" install-toolexeclibLTLIBRARIES + done + + make -C $CHOST/libobjc DESTDIR="$pkgdir" install-libs + make -C $CHOST/libstdc++-v3/po DESTDIR="$pkgdir" install + + make -C $CHOST/libphobos DESTDIR="$pkgdir" install + rm -rf "$pkgdir"/$_libdir/include/d/ + rm -f "$pkgdir"$_prefix/lib/libgphobos.spec + + for lib in libgomp \ + libitm \ + libquadmath; do + make -C $CHOST/$lib DESTDIR="$pkgdir" install-info + done + rm -r "$pkgdir"$_prefix/share/info/dir + + # remove files provided by lib32-gcc-libs + rm -rf "$pkgdir"$_prefix/lib32/ + + # Install Runtime Library Exception + install -Dm644 "$srcdir/gcc/COPYING.RUNTIME" \ + "$pkgdir$_prefix/share/licenses/gcc-libs/RUNTIME.LIBRARY.EXCEPTION" +} + +package_gcc-static-compat() { + pkgdesc="The GNU Compiler Collection - C and C++ frontends" + depends=("gcc-libs-static-compat=$pkgver-$pkgrel" 'binutils>=2.28' libmpc zstd libisl.so) + groups=('base-devel') + optdepends=('lib32-gcc-libs-static-compat: for generating code for 32-bit ABI') + options=(!emptydirs staticlibs debug) + + cd gcc-build + + make -C gcc DESTDIR="$pkgdir" install-driver install-cpp install-gcc-ar \ + c++.install-common install-headers install-plugin install-lto-wrapper + + install -m755 -t "$pkgdir$_prefix/bin/" gcc/gcov{,-tool} + install -m755 -t "$pkgdir/${_libdir}/" gcc/{cc1,cc1plus,collect2,lto1} + + make -C $CHOST/libgcc DESTDIR="$pkgdir" install + make -C $CHOST/32/libgcc DESTDIR="$pkgdir" install + rm -f "$pkgdir"$_prefix/lib{,32}/libgcc_s.so* + + make -C $CHOST/libstdc++-v3/src DESTDIR="$pkgdir" install + make -C $CHOST/libstdc++-v3/include DESTDIR="$pkgdir" install + make -C $CHOST/libstdc++-v3/libsupc++ DESTDIR="$pkgdir" install + make -C $CHOST/libstdc++-v3/python DESTDIR="$pkgdir" install + make -C $CHOST/32/libstdc++-v3/src DESTDIR="$pkgdir" install + make -C $CHOST/32/libstdc++-v3/include DESTDIR="$pkgdir" install + make -C $CHOST/32/libstdc++-v3/libsupc++ DESTDIR="$pkgdir" install + + make DESTDIR="$pkgdir" install-libcc1 + install -d "$pkgdir$_prefix/share/gdb/auto-load/usr/lib" + mv "$pkgdir"$_prefix/lib/libstdc++.so.6.*-gdb.py \ + "$pkgdir$_prefix/share/gdb/auto-load/usr/lib/" + rm "$pkgdir"$_prefix/lib{,32}/libstdc++.so* + + make DESTDIR="$pkgdir" install-fixincludes + make -C gcc DESTDIR="$pkgdir" install-mkheaders + + make -C lto-plugin DESTDIR="$pkgdir" install + install -dm755 "$pkgdir"$_prefix/lib/bfd-plugins/ + ln -s /${_libdir}/liblto_plugin.so \ + "$pkgdir$_prefix/lib/bfd-plugins/" + + make -C $CHOST/libgomp DESTDIR="$pkgdir" install-nodist_{libsubinclude,toolexeclib}HEADERS + make -C $CHOST/libitm DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS + make -C $CHOST/libquadmath DESTDIR="$pkgdir" install-nodist_libsubincludeHEADERS + make -C $CHOST/libsanitizer DESTDIR="$pkgdir" install-nodist_{saninclude,toolexeclib}HEADERS + make -C $CHOST/libsanitizer/asan DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS + make -C $CHOST/libsanitizer/tsan DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS + make -C $CHOST/libsanitizer/lsan DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS + make -C $CHOST/32/libgomp DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS + make -C $CHOST/32/libitm DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS + make -C $CHOST/32/libsanitizer DESTDIR="$pkgdir" install-nodist_{saninclude,toolexeclib}HEADERS + make -C $CHOST/32/libsanitizer/asan DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS + + make -C gcc DESTDIR="$pkgdir" install-man install-info + rm "$pkgdir"$_prefix/share/man/man1/{gfortran,gdc}.1 + rm "$pkgdir"$_prefix/share/info/{gfortran,gnat-style,gnat_rm,gnat_ugn,gdc}.info + rm -r "$pkgdir"$_prefix/share/info/dir + + make -C libcpp DESTDIR="$pkgdir" install + make -C gcc DESTDIR="$pkgdir" install-po + + # many packages expect this symlink + ln -s gcc "$pkgdir"$_prefix/bin/cc + + # POSIX conformance launcher scripts for c89 and c99 + install -Dm755 "$srcdir/c89" "$pkgdir$_prefix/bin/c89" + install -Dm755 "$srcdir/c99" "$pkgdir$_prefix/bin/c99" + + # install the libstdc++ man pages + make -C $CHOST/libstdc++-v3/doc DESTDIR="$pkgdir" doc-install-man + + # remove files provided by lib32-gcc-libs + rm -f "$pkgdir"$_prefix/lib32/lib{stdc++,gcc_s}.so + + # byte-compile python libraries + python -m compileall "$pkgdir$_prefix/share/gcc-${pkgver%%+*}/" + python -O -m compileall "$pkgdir$_prefix/share/gcc-${pkgver%%+*}/" + + # Install Runtime Library Exception + install -d "$pkgdir$_prefix/share/licenses/$pkgname/" + ln -s $_prefix/share/licenses/gcc-libs/RUNTIME.LIBRARY.EXCEPTION \ + "$pkgdir$_prefix/share/licenses/$pkgname/" +} + +package_gcc-fortran-static-compat() { + pkgdesc='Fortran front-end for GCC' + depends=("gcc-static-compat=$pkgver-$pkgrel" libisl.so) + + cd gcc-build + make -C $CHOST/libgfortran DESTDIR="$pkgdir" install-cafexeclibLTLIBRARIES \ + install-{toolexeclibDATA,nodist_fincludeHEADERS,gfor_cHEADERS} + make -C $CHOST/32/libgfortran DESTDIR="$pkgdir" install-cafexeclibLTLIBRARIES \ + install-{toolexeclibDATA,nodist_fincludeHEADERS,gfor_cHEADERS} + make -C $CHOST/libgomp DESTDIR="$pkgdir" install-nodist_fincludeHEADERS + make -C gcc DESTDIR="$pkgdir" fortran.install-{common,man,info} + install -Dm755 gcc/f951 "$pkgdir/${_libdir}/f951" + rm -r "$pkgdir"$_prefix/share/info/dir + + ln -s gfortran "$pkgdir$_prefix/bin/f95" + + # Install Runtime Library Exception + install -d "$pkgdir$_prefix/share/licenses/$pkgname/" + ln -s $_prefix/share/licenses/gcc-libs/RUNTIME.LIBRARY.EXCEPTION \ + "$pkgdir$_prefix/share/licenses/$pkgname/" +} + +package_gcc-ada-static-compat() { + pkgdesc='Ada front-end for GCC (GNAT)' + depends=("gcc-static-compat=$pkgver-$pkgrel" libisl.so) + options=(!emptydirs staticlibs debug) + + cd gcc-build/gcc + make DESTDIR="$pkgdir" ada.install-{common,info} + install -m755 gnat1 "$pkgdir/${_libdir}" + + cd "$srcdir"/gcc-build/$CHOST/libada + make DESTDIR="${pkgdir}" INSTALL="install" \ + INSTALL_DATA="install -m644" install-libada + + cd "$srcdir"/gcc-build/$CHOST/32/libada + make DESTDIR="${pkgdir}" INSTALL="install" \ + INSTALL_DATA="install -m644" install-libada + + ln -s gcc "$pkgdir$_prefix/bin/gnatgcc" + + # insist on dynamic linking, but keep static libraries because gnatmake complains + mv "$pkgdir"/${_libdir}/adalib/libgna{rl,t}-${_majorver}.so "$pkgdir$_prefix/lib" + ln -s libgnarl-${_majorver}.so "$pkgdir$_prefix/lib/libgnarl.so" + ln -s libgnat-${_majorver}.so "$pkgdir$_prefix/lib/libgnat.so" + rm -f "$pkgdir"/${_libdir}/adalib/libgna{rl,t}.so + rm -r "$pkgdir"$_prefix/share/info/dir + + install -d "$pkgdir$_prefix/lib32/" + mv "$pkgdir"/${_libdir}/32/adalib/libgna{rl,t}-${_majorver}.so "$pkgdir$_prefix/lib32" + ln -s libgnarl-${_majorver}.so "$pkgdir$_prefix/lib32/libgnarl.so" + ln -s libgnat-${_majorver}.so "$pkgdir$_prefix/lib32/libgnat.so" + rm -f "$pkgdir"/${_libdir}/32/adalib/libgna{rl,t}.so + + # Install Runtime Library Exception + install -d "$pkgdir$_prefix/share/licenses/$pkgname/" + ln -s $_prefix/share/licenses/gcc-libs/RUNTIME.LIBRARY.EXCEPTION \ + "$pkgdir$_prefix/share/licenses/$pkgname/" +} + +package_lib32-gcc-libs-static-compat() { + pkgdesc='32-bit runtime libraries shipped by GCC' + depends=('lib32-glibc>=2.26') + options=(!emptydirs !strip) + + cd gcc-build + + make -C $CHOST/32/libgcc DESTDIR="$pkgdir" install-shared + rm -f "$pkgdir/$_libdir/32/libgcc_eh.a" + + for lib in libatomic \ + libquadmath \ + libgfortran \ + libgomp \ + libitm \ + libsanitizer/{a,l,ub}san \ + libstdc++-v3/src \ + libvtv; do + make -C $CHOST/32/$lib DESTDIR="$pkgdir" install-toolexeclibLTLIBRARIES + done + + make -C $CHOST/32/libobjc DESTDIR="$pkgdir" install-libs + + make -C $CHOST/libphobos DESTDIR="$pkgdir" install + rm -f "$pkgdir"$_prefix/lib32/libgphobos.spec + + # remove files provided by gcc-libs + rm -rf "$pkgdir"$_prefix/lib + + # Install Runtime Library Exception + install -Dm644 "$srcdir/gcc/COPYING.RUNTIME" \ + "$pkgdir$_prefix/share/licenses/lib32-gcc-libs/RUNTIME.LIBRARY.EXCEPTION" +} + +package_gcc-d-static-compat() { + pkgdesc="D frontend for GCC" + depends=("gcc-static-compat=$pkgver-$pkgrel" libisl.so) + options=(staticlibs debug) + + cd gcc-build + make -C gcc DESTDIR="$pkgdir" d.install-{common,man,info} + + install -Dm755 gcc/gdc "$pkgdir"$_prefix/bin/gdc + install -Dm755 gcc/d21 "$pkgdir"/"$_libdir"/d21 + + make -C $CHOST/libphobos DESTDIR="$pkgdir" install + rm -f "$pkgdir$_prefix/lib/"lib{gphobos,gdruntime}.so* + rm -f "$pkgdir$_prefix/lib32/"lib{gphobos,gdruntime}.so* + rm -r "$pkgdir"$_prefix/share/info/dir + + install -d "$pkgdir"$_prefix/include/dlang + ln -s /"${_libdir}"/include/d "$pkgdir"$_prefix/include/dlang/gdc + + # Install Runtime Library Exception + install -d "$pkgdir$_prefix/share/licenses/$pkgname/" + ln -s $_prefix/share/licenses/gcc-libs/RUNTIME.LIBRARY.EXCEPTION \ + "$pkgdir$_prefix/share/licenses/$pkgname/" +} diff --git a/gcc/static-compat/PKGBUILD.orig b/gcc/static-compat/PKGBUILD.orig new file mode 100644 index 00000000..167aed24 --- /dev/null +++ b/gcc/static-compat/PKGBUILD.orig @@ -0,0 +1,468 @@ +# Maintainer: Giancarlo Razzolini +# Maintainer: Frederik Schwan +# Contributor: Bartłomiej Piotrowski +# Contributor: Allan McRae +# Contributor: Daniel Kozak + +# toolchain build order: linux-api-headers->glibc->binutils->gcc->glibc->binutils->gcc +# NOTE: libtool requires rebuilt with each new gcc version + +pkgname=(gcc gcc-libs lib32-gcc-libs gcc-fortran gcc-objc gcc-ada gcc-go gcc-d libgccjit) +pkgver=11.2.0 +_majorver=${pkgver%%.*} +_islver=0.24 +pkgrel=4 +pkgdesc='The GNU Compiler Collection' +arch=(x86_64) +license=(GPL LGPL FDL custom) +url='https://gcc.gnu.org' +makedepends=( + binutils + doxygen + gcc-ada + git + lib32-glibc + lib32-gcc-libs + libisl + libmpc + libxcrypt + python + zstd +) +checkdepends=( + dejagnu + expect + inetutils + python-pytest + tcl +) +options=(!emptydirs !lto debug) +_libdir=usr/lib/gcc/$CHOST/${pkgver%%+*} +# _commit=6beb39ee6c465c21d0cc547fd66b445100cdcc35 +# source=(git://gcc.gnu.org/git/gcc.git#commit=$_commit +source=(https://sourceware.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.xz{,.sig} + c89 c99 + gdc_phobos_path.patch + gcc-ada-repro.patch +) +validpgpkeys=(F3691687D867B81B51CE07D9BBE43771487328A9 # bpiotrowski@archlinux.org + 86CFFCA918CF3AF47147588051E8B148A9999C34 # evangelos@foutrelis.com + 13975A70E63C361C73AE69EF6EEB81F8981C74C7 # richard.guenther@gmail.com + D3A93CAD751C2AF4F8C7AD516C35B99309B5FA62) # Jakub Jelinek +sha256sums=('d08edc536b54c372a1010ff6619dd274c0f1603aa49212ba20f7aa2cda36fa8b' + 'SKIP' + 'de48736f6e4153f03d0a5d38ceb6c6fdb7f054e8f47ddd6af0a3dbf14f27b931' + '2513c6d9984dd0a2058557bf00f06d8d5181734e41dcfe07be7ed86f2959622a' + 'c86372c207d174c0918d4aedf1cb79f7fc093649eb1ad8d9450dccc46849d308' + '1773f5137f08ac1f48f0f7297e324d5d868d55201c03068670ee4602babdef2f') + +prepare() { + [[ ! -d gcc ]] && ln -s gcc-${pkgver/+/-} gcc + cd gcc + + # Do not run fixincludes + sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in + + # Arch Linux installs x86_64 libraries /lib + sed -i '/m64=/s/lib64/lib/' gcc/config/i386/t-linux64 + + # D hacks + patch -Np1 -i "$srcdir/gdc_phobos_path.patch" + + # Reproducible gcc-ada + patch -Np0 < "$srcdir/gcc-ada-repro.patch" + + mkdir -p "$srcdir/gcc-build" + mkdir -p "$srcdir/libgccjit-build" +} + +build() { + local _confflags="--prefix=/usr \ + --libdir=/usr/lib \ + --libexecdir=/usr/lib \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --with-bugurl=https://bugs.archlinux.org/ \ + --with-linker-hash-style=gnu \ + --with-system-zlib \ + --enable-__cxa_atexit \ + --enable-cet=auto \ + --enable-checking=release \ + --enable-clocale=gnu \ + --enable-default-pie \ + --enable-default-ssp \ + --enable-gnu-indirect-function \ + --enable-gnu-unique-object \ + --enable-linker-build-id \ + --enable-lto \ + --enable-multilib \ + --enable-plugin \ + --enable-shared \ + --enable-threads=posix \ + --disable-libssp \ + --disable-libstdcxx-pch \ + --disable-werror \ + --with-build-config=bootstrap-lto \ + --enable-link-serialization=1 \ + gdc_include_dir=/usr/include/dlang/gdc" + + cd gcc-build + + # Credits @allanmcrae + # https://github.com/allanmcrae/toolchain/blob/f18604d70c5933c31b51a320978711e4e6791cf1/gcc/PKGBUILD + # TODO: properly deal with the build issues resulting from this + CFLAGS=${CFLAGS/-Werror=format-security/} + CXXFLAGS=${CXXFLAGS/-Werror=format-security/} + + "$srcdir/gcc/configure" \ + --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++,d \ + --enable-bootstrap \ + $_confflags + + # see https://bugs.archlinux.org/task/71777 for rationale re *FLAGS handling + make -O STAGE1_CFLAGS="-O2" \ + BOOT_CFLAGS="$CFLAGS" \ + BOOT_LDFLAGS="$LDFLAGS" \ + LDFLAGS_FOR_TARGET="$LDFLAGS" \ + profiledbootstrap + + # make documentation + make -O -C $CHOST/libstdc++-v3/doc doc-man-doxygen + + # Build libgccjit separately, to avoid building all compilers with --enable-host-shared + # which brings a performance penalty + cd "${srcdir}"/libgccjit-build + + "$srcdir/gcc/configure" \ + --enable-languages=jit \ + --disable-bootstrap \ + --enable-host-shared \ + $_confflags + + # see https://bugs.archlinux.org/task/71777 for rationale re *FLAGS handling + make -O STAGE1_CFLAGS="-O2" \ + BOOT_CFLAGS="$CFLAGS" \ + BOOT_LDFLAGS="$LDFLAGS" \ + LDFLAGS_FOR_TARGET="$LDFLAGS" \ + all-gcc + + cp -a gcc/libgccjit.so* ../gcc-build/gcc/ +} + +check() { + cd gcc-build + + # disable libphobos test to avoid segfaults and other unfunny ways to waste my time + sed -i '/maybe-check-target-libphobos \\/d' Makefile + + # do not abort on error as some are "expected" + make -O -k check || true + "$srcdir/gcc/contrib/test_summary" +} + +package_gcc-libs() { + pkgdesc='Runtime libraries shipped by GCC' + depends=('glibc>=2.27') + options=(!emptydirs !strip) + provides=($pkgname-multilib libgo.so libgfortran.so libgphobos.so + libubsan.so libasan.so libtsan.so liblsan.so) + replaces=($pkgname-multilib libgphobos) + + cd gcc-build + make -C $CHOST/libgcc DESTDIR="$pkgdir" install-shared + rm -f "$pkgdir/$_libdir/libgcc_eh.a" + + for lib in libatomic \ + libgfortran \ + libgo \ + libgomp \ + libitm \ + libquadmath \ + libsanitizer/{a,l,ub,t}san \ + libstdc++-v3/src \ + libvtv; do + make -C $CHOST/$lib DESTDIR="$pkgdir" install-toolexeclibLTLIBRARIES + done + + make -C $CHOST/libobjc DESTDIR="$pkgdir" install-libs + make -C $CHOST/libstdc++-v3/po DESTDIR="$pkgdir" install + + make -C $CHOST/libphobos DESTDIR="$pkgdir" install + rm -rf "$pkgdir"/$_libdir/include/d/ + rm -f "$pkgdir"/usr/lib/libgphobos.spec + + for lib in libgomp \ + libitm \ + libquadmath; do + make -C $CHOST/$lib DESTDIR="$pkgdir" install-info + done + + # remove files provided by lib32-gcc-libs + rm -rf "$pkgdir"/usr/lib32/ + + # Install Runtime Library Exception + install -Dm644 "$srcdir/gcc/COPYING.RUNTIME" \ + "$pkgdir/usr/share/licenses/gcc-libs/RUNTIME.LIBRARY.EXCEPTION" +} + +package_gcc() { + pkgdesc="The GNU Compiler Collection - C and C++ frontends" + depends=("gcc-libs=$pkgver-$pkgrel" 'binutils>=2.28' libmpc zstd libisl.so) + groups=('base-devel') + optdepends=('lib32-gcc-libs: for generating code for 32-bit ABI') + provides=($pkgname-multilib) + replaces=($pkgname-multilib) + options=(!emptydirs staticlibs debug) + + cd gcc-build + + make -C gcc DESTDIR="$pkgdir" install-driver install-cpp install-gcc-ar \ + c++.install-common install-headers install-plugin install-lto-wrapper + + install -m755 -t "$pkgdir/usr/bin/" gcc/gcov{,-tool} + install -m755 -t "$pkgdir/${_libdir}/" gcc/{cc1,cc1plus,collect2,lto1} + + make -C $CHOST/libgcc DESTDIR="$pkgdir" install + make -C $CHOST/32/libgcc DESTDIR="$pkgdir" install + rm -f "$pkgdir"/usr/lib{,32}/libgcc_s.so* + + make -C $CHOST/libstdc++-v3/src DESTDIR="$pkgdir" install + make -C $CHOST/libstdc++-v3/include DESTDIR="$pkgdir" install + make -C $CHOST/libstdc++-v3/libsupc++ DESTDIR="$pkgdir" install + make -C $CHOST/libstdc++-v3/python DESTDIR="$pkgdir" install + make -C $CHOST/32/libstdc++-v3/src DESTDIR="$pkgdir" install + make -C $CHOST/32/libstdc++-v3/include DESTDIR="$pkgdir" install + make -C $CHOST/32/libstdc++-v3/libsupc++ DESTDIR="$pkgdir" install + + make DESTDIR="$pkgdir" install-libcc1 + install -d "$pkgdir/usr/share/gdb/auto-load/usr/lib" + mv "$pkgdir"/usr/lib/libstdc++.so.6.*-gdb.py \ + "$pkgdir/usr/share/gdb/auto-load/usr/lib/" + rm "$pkgdir"/usr/lib{,32}/libstdc++.so* + + make DESTDIR="$pkgdir" install-fixincludes + make -C gcc DESTDIR="$pkgdir" install-mkheaders + + make -C lto-plugin DESTDIR="$pkgdir" install + install -dm755 "$pkgdir"/usr/lib/bfd-plugins/ + ln -s /${_libdir}/liblto_plugin.so \ + "$pkgdir/usr/lib/bfd-plugins/" + + make -C $CHOST/libgomp DESTDIR="$pkgdir" install-nodist_{libsubinclude,toolexeclib}HEADERS + make -C $CHOST/libitm DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS + make -C $CHOST/libquadmath DESTDIR="$pkgdir" install-nodist_libsubincludeHEADERS + make -C $CHOST/libsanitizer DESTDIR="$pkgdir" install-nodist_{saninclude,toolexeclib}HEADERS + make -C $CHOST/libsanitizer/asan DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS + make -C $CHOST/libsanitizer/tsan DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS + make -C $CHOST/libsanitizer/lsan DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS + make -C $CHOST/32/libgomp DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS + make -C $CHOST/32/libitm DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS + make -C $CHOST/32/libsanitizer DESTDIR="$pkgdir" install-nodist_{saninclude,toolexeclib}HEADERS + make -C $CHOST/32/libsanitizer/asan DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS + + make -C gcc DESTDIR="$pkgdir" install-man install-info + rm "$pkgdir"/usr/share/man/man1/{gccgo,gfortran,gdc}.1 + rm "$pkgdir"/usr/share/info/{gccgo,gfortran,gnat-style,gnat_rm,gnat_ugn,gdc}.info + + make -C libcpp DESTDIR="$pkgdir" install + make -C gcc DESTDIR="$pkgdir" install-po + + # many packages expect this symlink + ln -s gcc "$pkgdir"/usr/bin/cc + + # POSIX conformance launcher scripts for c89 and c99 + install -Dm755 "$srcdir/c89" "$pkgdir/usr/bin/c89" + install -Dm755 "$srcdir/c99" "$pkgdir/usr/bin/c99" + + # install the libstdc++ man pages + make -C $CHOST/libstdc++-v3/doc DESTDIR="$pkgdir" doc-install-man + + # remove files provided by lib32-gcc-libs + rm -f "$pkgdir"/usr/lib32/lib{stdc++,gcc_s}.so + + # byte-compile python libraries + python -m compileall "$pkgdir/usr/share/gcc-${pkgver%%+*}/" + python -O -m compileall "$pkgdir/usr/share/gcc-${pkgver%%+*}/" + + # Install Runtime Library Exception + install -d "$pkgdir/usr/share/licenses/$pkgname/" + ln -s /usr/share/licenses/gcc-libs/RUNTIME.LIBRARY.EXCEPTION \ + "$pkgdir/usr/share/licenses/$pkgname/" +} + +package_gcc-fortran() { + pkgdesc='Fortran front-end for GCC' + depends=("gcc=$pkgver-$pkgrel" libisl.so) + provides=($pkgname-multilib) + replaces=($pkgname-multilib) + + cd gcc-build + make -C $CHOST/libgfortran DESTDIR="$pkgdir" install-cafexeclibLTLIBRARIES \ + install-{toolexeclibDATA,nodist_fincludeHEADERS,gfor_cHEADERS} + make -C $CHOST/32/libgfortran DESTDIR="$pkgdir" install-cafexeclibLTLIBRARIES \ + install-{toolexeclibDATA,nodist_fincludeHEADERS,gfor_cHEADERS} + make -C $CHOST/libgomp DESTDIR="$pkgdir" install-nodist_fincludeHEADERS + make -C gcc DESTDIR="$pkgdir" fortran.install-{common,man,info} + install -Dm755 gcc/f951 "$pkgdir/${_libdir}/f951" + + ln -s gfortran "$pkgdir/usr/bin/f95" + + # Install Runtime Library Exception + install -d "$pkgdir/usr/share/licenses/$pkgname/" + ln -s /usr/share/licenses/gcc-libs/RUNTIME.LIBRARY.EXCEPTION \ + "$pkgdir/usr/share/licenses/$pkgname/" +} + +package_gcc-objc() { + pkgdesc='Objective-C front-end for GCC' + depends=("gcc=$pkgver-$pkgrel" libisl.so) + provides=($pkgname-multilib) + replaces=($pkgname-multilib) + + cd gcc-build + make DESTDIR="$pkgdir" -C $CHOST/libobjc install-headers + install -dm755 "$pkgdir/${_libdir}" + install -m755 gcc/cc1obj{,plus} "$pkgdir/${_libdir}/" + + # Install Runtime Library Exception + install -d "$pkgdir/usr/share/licenses/$pkgname/" + ln -s /usr/share/licenses/gcc-libs/RUNTIME.LIBRARY.EXCEPTION \ + "$pkgdir/usr/share/licenses/$pkgname/" +} + +package_gcc-ada() { + pkgdesc='Ada front-end for GCC (GNAT)' + depends=("gcc=$pkgver-$pkgrel" libisl.so) + provides=($pkgname-multilib) + replaces=($pkgname-multilib) + options=(!emptydirs staticlibs debug) + + cd gcc-build/gcc + make DESTDIR="$pkgdir" ada.install-{common,info} + install -m755 gnat1 "$pkgdir/${_libdir}" + + cd "$srcdir"/gcc-build/$CHOST/libada + make DESTDIR="${pkgdir}" INSTALL="install" \ + INSTALL_DATA="install -m644" install-libada + + cd "$srcdir"/gcc-build/$CHOST/32/libada + make DESTDIR="${pkgdir}" INSTALL="install" \ + INSTALL_DATA="install -m644" install-libada + + ln -s gcc "$pkgdir/usr/bin/gnatgcc" + + # insist on dynamic linking, but keep static libraries because gnatmake complains + mv "$pkgdir"/${_libdir}/adalib/libgna{rl,t}-${_majorver}.so "$pkgdir/usr/lib" + ln -s libgnarl-${_majorver}.so "$pkgdir/usr/lib/libgnarl.so" + ln -s libgnat-${_majorver}.so "$pkgdir/usr/lib/libgnat.so" + rm -f "$pkgdir"/${_libdir}/adalib/libgna{rl,t}.so + + install -d "$pkgdir/usr/lib32/" + mv "$pkgdir"/${_libdir}/32/adalib/libgna{rl,t}-${_majorver}.so "$pkgdir/usr/lib32" + ln -s libgnarl-${_majorver}.so "$pkgdir/usr/lib32/libgnarl.so" + ln -s libgnat-${_majorver}.so "$pkgdir/usr/lib32/libgnat.so" + rm -f "$pkgdir"/${_libdir}/32/adalib/libgna{rl,t}.so + + # Install Runtime Library Exception + install -d "$pkgdir/usr/share/licenses/$pkgname/" + ln -s /usr/share/licenses/gcc-libs/RUNTIME.LIBRARY.EXCEPTION \ + "$pkgdir/usr/share/licenses/$pkgname/" +} + +package_gcc-go() { + pkgdesc='Go front-end for GCC' + depends=("gcc=$pkgver-$pkgrel" libisl.so) + provides=("go=1.12.2" $pkgname-multilib) + replaces=($pkgname-multilib) + conflicts=(go) + + cd gcc-build + make -C $CHOST/libgo DESTDIR="$pkgdir" install-exec-am + make -C $CHOST/32/libgo DESTDIR="$pkgdir" install-exec-am + make DESTDIR="$pkgdir" install-gotools + make -C gcc DESTDIR="$pkgdir" go.install-{common,man,info} + + rm -f "$pkgdir"/usr/lib{,32}/libgo.so* + install -Dm755 gcc/go1 "$pkgdir/${_libdir}/go1" + + # Install Runtime Library Exception + install -d "$pkgdir/usr/share/licenses/$pkgname/" + ln -s /usr/share/licenses/gcc-libs/RUNTIME.LIBRARY.EXCEPTION \ + "$pkgdir/usr/share/licenses/$pkgname/" +} + +package_lib32-gcc-libs() { + pkgdesc='32-bit runtime libraries shipped by GCC' + depends=('lib32-glibc>=2.27') + provides=(libgo.so libgfortran.so libubsan.so libasan.so) + groups=(multilib-devel) + options=(!emptydirs !strip) + + cd gcc-build + + make -C $CHOST/32/libgcc DESTDIR="$pkgdir" install-shared + rm -f "$pkgdir/$_libdir/32/libgcc_eh.a" + + for lib in libatomic \ + libgfortran \ + libgo \ + libgomp \ + libitm \ + libquadmath \ + libsanitizer/{a,l,ub}san \ + libstdc++-v3/src \ + libvtv; do + make -C $CHOST/32/$lib DESTDIR="$pkgdir" install-toolexeclibLTLIBRARIES + done + + make -C $CHOST/32/libobjc DESTDIR="$pkgdir" install-libs + + make -C $CHOST/libphobos DESTDIR="$pkgdir" install + rm -f "$pkgdir"/usr/lib32/libgphobos.spec + + # remove files provided by gcc-libs + rm -rf "$pkgdir"/usr/lib + + # Install Runtime Library Exception + install -Dm644 "$srcdir/gcc/COPYING.RUNTIME" \ + "$pkgdir/usr/share/licenses/lib32-gcc-libs/RUNTIME.LIBRARY.EXCEPTION" +} + +package_gcc-d() { + pkgdesc="D frontend for GCC" + depends=("gcc=$pkgver-$pkgrel" libisl.so) + provides=(gdc) + replaces=(gdc) + options=(staticlibs debug) + + cd gcc-build + make -C gcc DESTDIR="$pkgdir" d.install-{common,man,info} + + install -Dm755 gcc/gdc "$pkgdir"/usr/bin/gdc + install -Dm755 gcc/d21 "$pkgdir"/"$_libdir"/d21 + + make -C $CHOST/libphobos DESTDIR="$pkgdir" install + rm -f "$pkgdir/usr/lib/"lib{gphobos,gdruntime}.so* + rm -f "$pkgdir/usr/lib32/"lib{gphobos,gdruntime}.so* + + install -d "$pkgdir"/usr/include/dlang + ln -s /"${_libdir}"/include/d "$pkgdir"/usr/include/dlang/gdc + + # Install Runtime Library Exception + install -d "$pkgdir/usr/share/licenses/$pkgname/" + ln -s /usr/share/licenses/gcc-libs/RUNTIME.LIBRARY.EXCEPTION \ + "$pkgdir/usr/share/licenses/$pkgname/" +} + +package_libgccjit() { + pkgdesc="Just-In-Time Compilation with GCC backend" + depends=("gcc=$pkgver-$pkgrel" libisl.so) + + cd gcc-build + make -C gcc DESTDIR="$pkgdir" jit.install-common jit.install-info + + # Install Runtime Library Exception + install -d "$pkgdir/usr/share/licenses/$pkgname/" + ln -s /usr/share/licenses/gcc-libs/RUNTIME.LIBRARY.EXCEPTION \ + "$pkgdir/usr/share/licenses/$pkgname/" +} diff --git a/gcc/static-compat/c89 b/gcc/static-compat/c89 new file mode 100644 index 00000000..35486ea8 --- /dev/null +++ b/gcc/static-compat/c89 @@ -0,0 +1,10 @@ +#!/bin/sh +fl="-std=c89" +for opt; do + case "$opt" in + -ansi|-std=c89|-std=iso9899:1990) fl="";; + -std=*) echo "`basename $0` called with non ANSI/ISO C option $opt" >&2 + exit 1;; + esac +done +exec gcc $fl ${1+"$@"} diff --git a/gcc/static-compat/c99 b/gcc/static-compat/c99 new file mode 100644 index 00000000..88dd8064 --- /dev/null +++ b/gcc/static-compat/c99 @@ -0,0 +1,10 @@ +#!/bin/sh +fl="-std=c99" +for opt; do + case "$opt" in + -std=c99|-std=iso9899:1999) fl="";; + -std=*) echo "`basename $0` called with non ISO C99 option $opt" >&2 + exit 1;; + esac +done +exec gcc $fl ${1+"$@"} diff --git a/gcc/static-compat/gcc-ada-repro.patch b/gcc/static-compat/gcc-ada-repro.patch new file mode 100644 index 00000000..66256369 --- /dev/null +++ b/gcc/static-compat/gcc-ada-repro.patch @@ -0,0 +1,15 @@ +Avoid leaking current data on generated file for Ada. + +Index: gcc/ada/gcc-interface/Makefile.in +=================================================================== +--- gcc/ada/gcc-interface/Makefile.in (revision 268977) ++++ gcc/ada/gcc-interface/Makefile.in (working copy) +@@ -2407,6 +2407,7 @@ $(RTSDIR)/s-oscons.ads: ../stamp-gnatlib + $(OSCONS_CPP) ; \ + $(OSCONS_EXTRACT) ; \ + ../bldtools/oscons/xoscons s-oscons) ++ touch -r $(fsrcpfx)ada/gsocket.h $@ + + gnatlib: ../stamp-gnatlib1-$(RTSDIR) ../stamp-gnatlib2-$(RTSDIR) $(RTSDIR)/s-oscons.ads + test -f $(RTSDIR)/s-oscons.ads || exit 1 + diff --git a/gcc/static-compat/gdc_phobos_path.patch b/gcc/static-compat/gdc_phobos_path.patch new file mode 100644 index 00000000..6f43b6ee --- /dev/null +++ b/gcc/static-compat/gdc_phobos_path.patch @@ -0,0 +1,14 @@ +diff -Naur a/gcc/d/d-incpath.cc b/gcc/d/d-incpath.cc +--- a/gcc/d/d-incpath.cc 2019-01-01 13:31:55.000000000 +0100 ++++ b/gcc/d/d-incpath.cc 2019-06-28 08:32:00.326241502 +0200 +@@ -140,7 +140,7 @@ + path = xstrdup (p->fname); + + /* Add D-specific suffix. */ +- path = concat (path, "/d", NULL); ++ path = concat (path, "/dlang/gdc", NULL); + + /* Ignore duplicate entries. */ + bool found = false; + + diff --git a/glib2/static/noisy-glib-compile-schemas.diff b/glib2/static-compat/0001-glib-compile-schemas-Remove-noisy-deprecation-warnin.patch similarity index 56% rename from glib2/static/noisy-glib-compile-schemas.diff rename to glib2/static-compat/0001-glib-compile-schemas-Remove-noisy-deprecation-warnin.patch index f5f2d948..7be155bd 100644 --- a/glib2/static/noisy-glib-compile-schemas.diff +++ b/glib2/static-compat/0001-glib-compile-schemas-Remove-noisy-deprecation-warnin.patch @@ -1,8 +1,17 @@ -diff --git i/gio/glib-compile-schemas.c w/gio/glib-compile-schemas.c -index b8de0907248f6860..130f89b1728f7932 100644 ---- i/gio/glib-compile-schemas.c -+++ w/gio/glib-compile-schemas.c -@@ -1219,19 +1219,6 @@ parse_state_start_schema (ParseState *state, +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: "Jan Alexander Steffens (heftig)" +Date: Fri, 7 Jan 2022 18:59:10 +0000 +Subject: [PATCH] glib-compile-schemas: Remove noisy deprecation warnings + +--- + gio/glib-compile-schemas.c | 13 ------------- + 1 file changed, 13 deletions(-) + +diff --git a/gio/glib-compile-schemas.c b/gio/glib-compile-schemas.c +index 7e1152f6bf45..924a3e7f176a 100644 +--- a/gio/glib-compile-schemas.c ++++ b/gio/glib-compile-schemas.c +@@ -1232,19 +1232,6 @@ parse_state_start_schema (ParseState *state, return; } diff --git a/glib2/static/PKGBUILD b/glib2/static-compat/PKGBUILD similarity index 52% rename from glib2/static/PKGBUILD rename to glib2/static-compat/PKGBUILD index b9d89c67..27e0f99e 100644 --- a/glib2/static/PKGBUILD +++ b/glib2/static-compat/PKGBUILD @@ -2,23 +2,22 @@ # Contributor: Jan de Groot _pkgname=glib2 -pkgname=$_pkgname-static -pkgver=2.66.4 +pkgname=static-compat-$_pkgname +pkgver=2.72.0 pkgrel=2 pkgdesc="Low level core library" url="https://wiki.gnome.org/Projects/GLib" license=(LGPL) arch=(x86_64) -depends=(pcre-static libffi-static util-linux-static zlib) # regular zlib contains static lib -makedepends=(gettext shared-mime-info python libelf git util-linux - meson dbus sysprof pcre libffi) # shared libs required at build time for some plugins +depends=(static-compat-pcre static-compat-libffi static-compat-util-linux static-compat-zlib) +makedepends=(gettext shared-mime-info python libelf git static-compat-meson) checkdepends=(desktop-file-utils) options=(!strip !emptydirs staticlibs) _commit=bacbec652d356895ec493f3de2f2f6f4c7dafde0 # tags/2.66.4^0 source=("git+https://gitlab.gnome.org/GNOME/glib.git#commit=$_commit" - noisy-glib-compile-schemas.diff) + 0001-glib-compile-schemas-Remove-noisy-deprecation-warnin.patch) sha256sums=('SKIP' - '81a4df0b638730cffb7fa263c04841f7ca6b9c9578ee5045db6f30ff0c3fc531') + 'edb5e34ac0a77431978cab55b98e39754d73455e28a38f5003424e943bbe5fff') pkgver() { cd glib @@ -29,41 +28,40 @@ prepare() { cd glib # Suppress noise from glib-compile-schemas.hook - git apply -3 ../noisy-glib-compile-schemas.diff + git apply -3 ../0001-glib-compile-schemas-Remove-noisy-deprecation-warnin.patch } build() { - CFLAGS+=" -DG_DISABLE_CAST_CHECKS" - arch-meson glib build \ + export CFLAGS+=" -DG_DISABLE_CAST_CHECKS" + export LDFLAGS+=" -lblkid" + source static-compat-environment + static-compat-meson glib build \ -D selinux=disabled \ - -D sysprof=enabled \ + -Dsysprof=disabled \ -D man=false \ -D gtk_doc=false \ - -Dinternal_pcre=false \ - --prefix /usr/static \ - --default-library static + -Dinternal_pcre=false meson compile -C build } check() { + source static-compat-environment meson test -C build --no-suite flaky --print-errorlogs } package() { + source static-compat-environment DESTDIR="$pkgdir" meson install -C build # Strip messes up the LTO-enabled archive's index so strip libs manually and then run ranlib again find "$pkgdir" -name '*.a' -exec strip $STRIP_STATIC {} \; find "$pkgdir" -name '*.a' -exec ranlib {} \; - # Avoid a dep on sysprof - sed -i 's/, sysprof-capture-4//' "$pkgdir"/usr/static/lib/pkgconfig/*.pc - export PYTHONHASHSEED=0 - python -m compileall -d /usr/static/share/glib-2.0/codegen \ - "$pkgdir/usr/static/share/glib-2.0/codegen" - python -O -m compileall -d /usr/static/share/glib-2.0/codegen \ - "$pkgdir/usr/static/share/glib-2.0/codegen" + python -m compileall -d "$static_compat_prefix"/share/glib-2.0/codegen \ + "$pkgdir/$static_compat_prefix/share/glib-2.0/codegen" + python -O -m compileall -d "$static_compat_prefix"/share/glib-2.0/codegen \ + "$pkgdir/$static_compat_prefix/share/glib-2.0/codegen" } # vim:set sw=2 et: diff --git a/glibc/static-compat/PKGBUILD b/glibc/static-compat/PKGBUILD new file mode 100644 index 00000000..8bf22383 --- /dev/null +++ b/glibc/static-compat/PKGBUILD @@ -0,0 +1,194 @@ +# $Id$ +# Maintainer: Bartłomiej Piotrowski +# Contributor: Allan McRae + +# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc +# NOTE: valgrind requires rebuilt with each major glibc version + +pkgbase=glibc-static-compat +pkgname=(glibc-static-compat lib32-glibc-static-compat) +pkgver=2.26 +pkgrel=3 +arch=(x86_64) +url='http://www.gnu.org/software/libc' +license=(GPL LGPL) +makedepends=(git gd lib32-gcc-libs linux-api-headers-static-compat) +options=(!strip staticlibs) +#_commit=23158b08a0908f381459f273a984c6fd328363cb +_commit=de51f431ed6226ec68ca76e578f2cbd55b6262cb +source=(git+https://sourceware.org/git/glibc.git#commit=$_commit +#source=(https://ftp.gnu.org/gnu/glibc/glibc-$pkgver.tar.xz{,.sig} + bz20338.patch) +validpgpkeys=(7273542B39962DF7B299931416792B4EA25340F8) # Carlos O'Donell +md5sums=('898cd5656519ffbc3a03fe811dd89e82' + 'SKIP' + '07ac979b6ab5eeb778d55f041529d623' + '476e9113489f93b348b21e144b6a8fcf' + '6e052f1cb693d5d3203f50f9d4e8c33b' + 'dc0d3ad59aeaaf591b085a77de6e03e9') + +_prefix=/usr/static-compat + +prepare() { + mkdir -p glibc-build lib32-glibc-build + + [[ -d glibc-$pkgver ]] && ln -s glibc-$pkgver glibc + cd glibc + + local i; for i in ${source[@]}; do + case ${i%::*} in + *.patch) + msg2 "Applying ${i}" + patch -p1 -i "$srcdir/${i}" + ;; + esac + done +} + +build() { + local _configure_flags=( + --prefix=/ + --with-headers=$_prefix/include + --with-bugurl=https://github.com/Martchus/PKGBUILDs/issues + --enable-add-ons + --enable-bind-now + --enable-lock-elision + --enable-kernel=4.4 + --enable-multi-arch + --enable-obsolete-nsl + --enable-obsolete-rpc + --enable-stack-protector=strong + --enable-stackguard-randomization + --disable-profile + --disable-crypt + --disable-werror + ) + + cd "$srcdir/glibc-build" + + echo "slibdir=/lib" >> configparms + echo "rtlddir=/lib" >> configparms + echo "sbindir=/bin" >> configparms + echo "rootsbindir=/bin" >> configparms + + # remove fortify for building libraries + CPPFLAGS=${CPPFLAGS/-D_FORTIFY_SOURCE=2/} + + "$srcdir/glibc/configure" \ + --libdir=/lib \ + --libexecdir=/lib \ + ${_configure_flags[@]} +# + # build libraries with fortify disabled + echo "build-programs=no" >> configparms + make + + # re-enable fortify for programs + sed -i "/build-programs=/s#no#yes#" configparms + + echo "CC += -D_FORTIFY_SOURCE=2" >> configparms + echo "CXX += -D_FORTIFY_SOURCE=2" >> configparms + echo "building programs" + make + + cd "$srcdir/lib32-glibc-build" + export CC="gcc -m32 -mstackrealign" + export CXX="g++ -m32 -mstackrealign" + + echo "slibdir=/lib32" >> configparms + echo "rtlddir=/lib32" >> configparms + echo "sbindir=/bin" >> configparms + echo "rootsbindir=/bin" >> configparms + + # remove fortify for building libraries + CPPFLAGS=${CPPFLAGS/-D_FORTIFY_SOURCE=2/} + CFLAGS=${CFLAGS/-fno-plt/} + CXXFLAGS=${CXXFLAGS/-fno-plt/} + + "$srcdir/glibc/configure" \ + --host=i686-pc-linux-gnu \ + --libdir=/lib32 \ + --libexecdir=/lib32 \ + ${_configure_flags[@]} + + # build libraries with fortify disabled + echo "build-programs=no" >> configparms + make + + # re-enable fortify for programs + sed -i "/build-programs=/s#no#yes#" configparms + + echo "CC += -D_FORTIFY_SOURCE=2" >> configparms + echo "CXX += -D_FORTIFY_SOURCE=2" >> configparms + make + +} + +check() { + cd glibc-build + + # remove fortify in preparation to run test-suite + sed -i '/FORTIFY/d' configparms + + # some failures are "expected" + make check || true +} + +package_glibc-static-compat() { + pkgdesc='GNU C Library' + depends=('linux-api-headers-static-compat>=4.10' tzdata filesystem) + optdepends=('gd: for memusagestat') + + make -C glibc-build install_root="$pkgdir$_prefix" install + rm -rf "$pkgdir"$_prefix/{etc,sbin,var} + + cd glibc + + install -dm755 "$pkgdir"$_prefix/lib/{locale,systemd/system,tmpfiles.d} + install -m644 nscd/nscd.service "$pkgdir$_prefix/lib/systemd/system" + install -m644 nscd/nscd.tmpfiles "$pkgdir$_prefix/lib/tmpfiles.d/nscd.conf" + + if check_option 'debug' n; then + find "$pkgdir"$_prefix/bin -type f -executable -exec strip $STRIP_BINARIES {} + 2> /dev/null || true + find "$pkgdir"$_prefix/lib -name '*.a' -type f -exec strip $STRIP_STATIC {} + 2> /dev/null || true + + # Do not strip these for gdb and valgrind functionality, but strip the rest + find "$pkgdir"$_prefix/lib \ + -not -name 'ld-*.so' \ + -not -name 'libc-*.so' \ + -not -name 'libpthread-*.so' \ + -not -name 'libthread_db-*.so' \ + -name '*-*.so' -type f -exec strip $STRIP_SHARED {} + 2> /dev/null || true + fi +} + +package_lib32-glibc-static-compat() { + pkgdesc='GNU C Library (32-bit)' + depends=("glibc-static-compat=$pkgver") + + cd lib32-glibc-build + + make install_root="$pkgdir$_prefix" install + rm -rf "$pkgdir"$_prefix/{etc,sbin,var} + rm -rf "$pkgdir"$_prefix/{bin,sbin,share} + + # We need to keep 32 bit specific header files + find "$pkgdir$_prefix/include" -type f -not -name '*-32.h' -delete + + # Dynamic linker + install -d "$pkgdir$_prefix/lib" + ln -s ../lib32/ld-linux.so.2 "$pkgdir$_prefix/lib/" + + # Symlink /usr/lib32/locale to /usr/lib/locale + ln -s ../lib/locale "$pkgdir$_prefix/lib32/locale" + + if check_option 'debug' n; then + find "$pkgdir"$_prefix/lib32 -name '*.a' -type f -exec strip $STRIP_STATIC {} + 2> /dev/null || true + find "$pkgdir"$_prefix/lib32 \ + -not -name 'ld-*.so' \ + -not -name 'libc-*.so' \ + -not -name 'libpthread-*.so' \ + -not -name 'libthread_db-*.so' \ + -name '*-*.so' -type f -exec strip $STRIP_SHARED {} + 2> /dev/null || true + fi +} diff --git a/glibc/static-compat/PKGBUILD.orig b/glibc/static-compat/PKGBUILD.orig new file mode 100644 index 00000000..13dd5ebc --- /dev/null +++ b/glibc/static-compat/PKGBUILD.orig @@ -0,0 +1,211 @@ +# $Id$ +# Maintainer: Bartłomiej Piotrowski +# Contributor: Allan McRae + +# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc +# NOTE: valgrind requires rebuilt with each major glibc version + +pkgbase=glibc +pkgname=(glibc lib32-glibc) +pkgver=2.27 +pkgrel=3 +arch=(x86_64) +url='http://www.gnu.org/software/libc' +license=(GPL LGPL) +makedepends=(git gd lib32-gcc-libs) +options=(!strip staticlibs) +_commit=23158b08a0908f381459f273a984c6fd328363cb +#source=(git+https://sourceware.org/git/glibc.git#commit=$_commit +source=(https://ftp.gnu.org/gnu/glibc/glibc-$pkgver.tar.xz{,.sig} + locale.gen.txt + locale-gen + lib32-glibc.conf + bz20338.patch) +validpgpkeys=(7273542B39962DF7B299931416792B4EA25340F8) # Carlos O'Donell +md5sums=('898cd5656519ffbc3a03fe811dd89e82' + 'SKIP' + '07ac979b6ab5eeb778d55f041529d623' + '476e9113489f93b348b21e144b6a8fcf' + '6e052f1cb693d5d3203f50f9d4e8c33b' + 'dc0d3ad59aeaaf591b085a77de6e03e9') + +prepare() { + mkdir -p glibc-build lib32-glibc-build + + [[ -d glibc-$pkgver ]] && ln -s glibc-$pkgver glibc + cd glibc + + local i; for i in ${source[@]}; do + case ${i%::*} in + *.patch) + msg2 "Applying ${i}" + patch -p1 -i "$srcdir/${i}" + ;; + esac + done +} + +build() { + local _configure_flags=( + --prefix=/usr + --with-headers=/usr/include + --with-bugurl=https://bugs.archlinux.org/ + --enable-add-ons + --enable-bind-now + --enable-lock-elision + --enable-multi-arch + --enable-stack-protector=strong + --enable-stackguard-randomization + --enable-static-pie + --disable-profile + --disable-werror + ) + + cd "$srcdir/glibc-build" + + echo "slibdir=/usr/lib" >> configparms + echo "rtlddir=/usr/lib" >> configparms + echo "sbindir=/usr/bin" >> configparms + echo "rootsbindir=/usr/bin" >> configparms + + # remove fortify for building libraries + CPPFLAGS=${CPPFLAGS/-D_FORTIFY_SOURCE=2/} + + "$srcdir/glibc/configure" \ + --libdir=/usr/lib \ + --libexecdir=/usr/lib \ + ${_configure_flags[@]} + + # build libraries with fortify disabled + echo "build-programs=no" >> configparms + make + + # re-enable fortify for programs + sed -i "/build-programs=/s#no#yes#" configparms + + echo "CC += -D_FORTIFY_SOURCE=2" >> configparms + echo "CXX += -D_FORTIFY_SOURCE=2" >> configparms + make + + cd "$srcdir/lib32-glibc-build" + export CC="gcc -m32 -mstackrealign" + export CXX="g++ -m32 -mstackrealign" + + echo "slibdir=/usr/lib32" >> configparms + echo "rtlddir=/usr/lib32" >> configparms + echo "sbindir=/usr/bin" >> configparms + echo "rootsbindir=/usr/bin" >> configparms + + # remove fortify for building libraries + CPPFLAGS=${CPPFLAGS/-D_FORTIFY_SOURCE=2/} + CFLAGS=${CFLAGS/-fno-plt/} + CXXFLAGS=${CXXFLAGS/-fno-plt/} + + "$srcdir/glibc/configure" \ + --host=i686-pc-linux-gnu \ + --libdir=/usr/lib32 \ + --libexecdir=/usr/lib32 \ + ${_configure_flags[@]} + + # build libraries with fortify disabled + echo "build-programs=no" >> configparms + make + + # re-enable fortify for programs + sed -i "/build-programs=/s#no#yes#" configparms + + echo "CC += -D_FORTIFY_SOURCE=2" >> configparms + echo "CXX += -D_FORTIFY_SOURCE=2" >> configparms + make + +} + +check() { + cd glibc-build + + # remove fortify in preparation to run test-suite + sed -i '/FORTIFY/d' configparms + + # some failures are "expected" + make check || true +} + +package_glibc() { + pkgdesc='GNU C Library' + depends=('linux-api-headers>=4.10' tzdata filesystem) + optdepends=('gd: for memusagestat') + install=glibc.install + backup=(etc/gai.conf + etc/locale.gen + etc/nscd.conf) + groups=(base) + + install -dm755 "$pkgdir/etc" + touch "$pkgdir/etc/ld.so.conf" + + make -C glibc-build install_root="$pkgdir" install + rm -f "$pkgdir"/etc/ld.so.{cache,conf} + + cd glibc + + install -dm755 "$pkgdir"/usr/lib/{locale,systemd/system,tmpfiles.d} + install -m644 nscd/nscd.conf "$pkgdir/etc/nscd.conf" + install -m644 nscd/nscd.service "$pkgdir/usr/lib/systemd/system" + install -m644 nscd/nscd.tmpfiles "$pkgdir/usr/lib/tmpfiles.d/nscd.conf" + install -dm755 "$pkgdir/var/db/nscd" + + install -m644 posix/gai.conf "$pkgdir"/etc/gai.conf + + install -m755 "$srcdir/locale-gen" "$pkgdir/usr/bin" + + # Create /etc/locale.gen + install -m644 "$srcdir/locale.gen.txt" "$pkgdir/etc/locale.gen" + sed -e '1,3d' -e 's|/| |g' -e 's|\\| |g' -e 's|^|#|g' \ + "$srcdir/glibc/localedata/SUPPORTED" >> "$pkgdir/etc/locale.gen" + + if check_option 'debug' n; then + find "$pkgdir"/usr/bin -type f -executable -exec strip $STRIP_BINARIES {} + 2> /dev/null || true + find "$pkgdir"/usr/lib -name '*.a' -type f -exec strip $STRIP_STATIC {} + 2> /dev/null || true + + # Do not strip these for gdb and valgrind functionality, but strip the rest + find "$pkgdir"/usr/lib \ + -not -name 'ld-*.so' \ + -not -name 'libc-*.so' \ + -not -name 'libpthread-*.so' \ + -not -name 'libthread_db-*.so' \ + -name '*-*.so' -type f -exec strip $STRIP_SHARED {} + 2> /dev/null || true + fi +} + +package_lib32-glibc() { + pkgdesc='GNU C Library (32-bit)' + depends=("glibc=$pkgver") + + cd lib32-glibc-build + + make install_root="$pkgdir" install + rm -rf "$pkgdir"/{etc,sbin,usr/{bin,sbin,share},var} + + # We need to keep 32 bit specific header files + find "$pkgdir/usr/include" -type f -not -name '*-32.h' -delete + + # Dynamic linker + install -d "$pkgdir/usr/lib" + ln -s ../lib32/ld-linux.so.2 "$pkgdir/usr/lib/" + + # Add lib32 paths to the default library search path + install -Dm644 "$srcdir/lib32-glibc.conf" "$pkgdir/etc/ld.so.conf.d/lib32-glibc.conf" + + # Symlink /usr/lib32/locale to /usr/lib/locale + ln -s ../lib/locale "$pkgdir/usr/lib32/locale" + + if check_option 'debug' n; then + find "$pkgdir"/usr/lib32 -name '*.a' -type f -exec strip $STRIP_STATIC {} + 2> /dev/null || true + find "$pkgdir"/usr/lib32 \ + -not -name 'ld-*.so' \ + -not -name 'libc-*.so' \ + -not -name 'libpthread-*.so' \ + -not -name 'libthread_db-*.so' \ + -name '*-*.so' -type f -exec strip $STRIP_SHARED {} + 2> /dev/null || true + fi +} diff --git a/glibc/static-compat/bz20338.patch b/glibc/static-compat/bz20338.patch new file mode 100644 index 00000000..d223e9f0 --- /dev/null +++ b/glibc/static-compat/bz20338.patch @@ -0,0 +1,114 @@ +From 74250a7cdf106d4ca7d9506e6d5dc7c448dc3434 Mon Sep 17 00:00:00 2001 +From: David Michael +Date: Thu, 15 Dec 2016 15:22:57 -0800 +Subject: [PATCH] gshadow: Sync fgetsgent_r.c with grp/fgetgrent_r.c + + [BZ #20338] + * gshadow/fgetsgent_r.c: Include . + (flockfile): New macro. + (funlockfile): Likewise. + (__fgetsgent_r): Sync with __fgetgrent_r. + * nss/nss_files/files-sgrp.c: Fix "fgetsgent_r.c" typo. +--- + gshadow/fgetsgent_r.c | 35 ++++++++++++++++++++++++----------- + nss/nss_files/files-sgrp.c | 2 +- + 2 files changed, 25 insertions(+), 12 deletions(-) + +diff --git a/gshadow/fgetsgent_r.c b/gshadow/fgetsgent_r.c +index b70f6fa..02cd33a 100644 +--- a/gshadow/fgetsgent_r.c ++++ b/gshadow/fgetsgent_r.c +@@ -20,39 +20,44 @@ + #include + #include + ++#include ++#define flockfile(s) _IO_flockfile (s) ++#define funlockfile(s) _IO_funlockfile (s) ++ + /* Define a line parsing function using the common code + used in the nss_files module. */ + + #define STRUCTURE sgrp + #define ENTNAME sgent +-#define EXTERN_PARSER 1 ++#define EXTERN_PARSER 1 + struct sgent_data {}; + + #include + + +-/* Read one shadow entry from the given stream. */ ++/* Read one entry from the given stream. */ + int + __fgetsgent_r (FILE *stream, struct sgrp *resbuf, char *buffer, size_t buflen, + struct sgrp **result) + { + char *p; ++ int parse_result; + +- _IO_flockfile (stream); ++ flockfile (stream); + do + { + buffer[buflen - 1] = '\xff'; + p = fgets_unlocked (buffer, buflen, stream); +- if (p == NULL && feof_unlocked (stream)) ++ if (__builtin_expect (p == NULL, 0) && feof_unlocked (stream)) + { +- _IO_funlockfile (stream); ++ funlockfile (stream); + *result = NULL; + __set_errno (ENOENT); + return errno; + } +- if (p == NULL || buffer[buflen - 1] != '\xff') ++ if (__builtin_expect (p == NULL, 0) || buffer[buflen - 1] != '\xff') + { +- _IO_funlockfile (stream); ++ funlockfile (stream); + *result = NULL; + __set_errno (ERANGE); + return errno; +@@ -61,13 +66,21 @@ __fgetsgent_r (FILE *stream, struct sgrp *resbuf, char *buffer, size_t buflen, + /* Skip leading blanks. */ + while (isspace (*p)) + ++p; +- } while (*p == '\0' || *p == '#' || /* Ignore empty and comment lines. */ ++ } while (*p == '\0' || *p == '#' /* Ignore empty and comment lines. */ + /* Parse the line. If it is invalid, loop to + get the next line of the file to parse. */ +- ! parse_line (buffer, (void *) resbuf, (void *) buffer, buflen, +- &errno)); ++ || ! (parse_result = parse_line (p, resbuf, ++ (void *) buffer, buflen, ++ &errno))); ++ ++ funlockfile (stream); + +- _IO_funlockfile (stream); ++ if (__builtin_expect (parse_result, 0) == -1) ++ { ++ /* The parser ran out of space. */ ++ *result = NULL; ++ return errno; ++ } + + *result = resbuf; + return 0; +diff --git a/nss/nss_files/files-sgrp.c b/nss/nss_files/files-sgrp.c +index 15dc659..05c3805 100644 +--- a/nss/nss_files/files-sgrp.c ++++ b/nss/nss_files/files-sgrp.c +@@ -23,7 +23,7 @@ + #define DATABASE "gshadow" + struct sgent_data {}; + +-/* Our parser function is already defined in sgetspent_r.c, so use that ++/* Our parser function is already defined in sgetsgent_r.c, so use that + to parse lines from the database file. */ + #define EXTERN_PARSER + #include "files-parse.c" +-- +2.7.4 + diff --git a/graphite/static/PKGBUILD b/graphite/static-compat/PKGBUILD similarity index 80% rename from graphite/static/PKGBUILD rename to graphite/static-compat/PKGBUILD index a7e108be..3cff35a8 100644 --- a/graphite/static/PKGBUILD +++ b/graphite/static-compat/PKGBUILD @@ -1,7 +1,7 @@ # Contributor: AndyRTR _pkgname=graphite -pkgname=$_pkgname-static +pkgname=static-compat-$_pkgname pkgver=1.3.14 pkgrel=1 epoch=1 @@ -9,16 +9,16 @@ arch=('x86_64') url="https://github.com/silnrsi/graphite" pkgdesc='reimplementation of the SIL Graphite text processing engine' license=('LGPL' 'GPL' 'custom') -depends=('gcc-libs') -makedepends=('cmake' 'freetype2-static' 'python') +depends=('gcc-libs-static-compat') +makedepends=('static-compat-cmake' 'static-compat-freetype2' 'python') options=(!emptydirs !docs staticlibs) # https://github.com/silnrsi/graphite/releases/download/1.3.14/graphite2-1.3.14.sha256sum source=(https://github.com/silnrsi/graphite/releases/download/${pkgver}/graphite2-${pkgver}.tgz) sha256sums=('f99d1c13aa5fa296898a181dff9b82fb25f6cc0933dbaa7a475d8109bd54209d') build() { + source static-compat-environment mkdir build - export PKG_CONFIG_PATH=/usr/static/lib/pkgconfig:/usr/lib/pkgconfig cd graphite2-${pkgver} echo '' > doc/CMakeLists.txt echo '' > tests/CMakeLists.txt # TODO: fix linking tests @@ -26,12 +26,10 @@ build() { export PATH=$PWD:$PATH printf '#!/usr/bin/bash\nexec /usr/bin/pkg-config --static "$@"\n' > pkg-config chmod +x pkg-config - cmake -G "Unix Makefiles" ../graphite2-${pkgver} \ + static-compat-cmake -G "Unix Makefiles" ../graphite2-${pkgver} \ -DCMAKE_C_FLAGS:STRING="${CFLAGS}" \ - -DCMAKE_INSTALL_PREFIX=/usr/static \ -DCMAKE_BUILD_TYPE:STRING=Release \ - -DGRAPHITE2_COMPARE_RENDERER=OFF \ - -DBUILD_SHARED_LIBS=OFF \ + -DGRAPHITE2_COMPARE_RENDERER=OFF # fix unwanted -O3 cflag (taken form Debian) find . -type f ! -name "rules" ! -name "changelog" -exec sed -i -e 's/\-O3//g' {} \; @@ -40,6 +38,7 @@ build() { } package() { + source static-compat-environment cd "${srcdir}"/build make DESTDIR="$pkgdir/" install diff --git a/harfbuzz/static/PKGBUILD b/harfbuzz/static-compat/PKGBUILD similarity index 63% rename from harfbuzz/static/PKGBUILD rename to harfbuzz/static-compat/PKGBUILD index 5cb0b746..349632f0 100644 --- a/harfbuzz/static/PKGBUILD +++ b/harfbuzz/static-compat/PKGBUILD @@ -2,18 +2,18 @@ # Contributor: Jan de Groot _pkgname=harfbuzz -pkgname=$_pkgname-static -pkgver=2.7.4 +pkgname=static-compat-$_pkgname +pkgver=4.2.0 pkgrel=1 pkgdesc="OpenType text shaping engine" url="https://www.freedesktop.org/wiki/Software/HarfBuzz" arch=(x86_64) license=(MIT) -depends=(glib2-static freetype2-static graphite-static) -makedepends=(gobject-introspection ragel git python meson) +depends=(static-compat-glib2 static-compat-freetype2 static-compat-graphite) +makedepends=(gobject-introspection ragel git python static-compat-meson) checkdepends=(python-fonttools python-setuptools) options=(!emptydirs !docs staticlibs) -_commit=7236c7e29cef1c2d76c7a284c5081ff4d3aa1127 # tags/2.7.4^0 +_commit=9d5730b958974bc9db95e46e6bad52e9e9cd6e1c # tags/4.2.0^0 source=("git+https://github.com/harfbuzz/harfbuzz#commit=$_commit") sha256sums=('SKIP') @@ -27,34 +27,36 @@ prepare() { } build() { - export PKG_CONFIG_PATH=/usr/static/lib/pkgconfig:/usr/lib/pkgconfig + source static-compat-environment export PATH=$PWD:$PATH printf '#!/usr/bin/bash\nexec /usr/bin/pkg-config --static "$@"\n' > pkg-config chmod +x pkg-config # disable tools (and related tests) echo '' > harfbuzz/util/meson.build - echo '' > harfbuzz/test/shaping/meson.build + echo '' > harfbuzz/test/shape/meson.build echo '' > harfbuzz/test/subset/meson.build - arch-meson harfbuzz build \ + static-compat-meson harfbuzz build \ -Dgraphite=enabled \ -Dcairo=disabled \ -Dintrospection=disabled \ - -Dfontconfig=disabled \ -Dicu=disabled \ - -Ddocs=disabled \ - --prefix /usr/static \ - --default-library static + -Ddocs=disabled meson compile -C build } check() { + source static-compat-environment mkdir -p tmp TMPDIR="$PWD/tmp" meson test -C build --print-errorlogs rm -r tmp } package() { + source static-compat-environment DESTDIR="$pkgdir" meson install -C build + # remove CMake config as it is broken for a static build (the pkgconfig file alone should be good enough) + rm -r "$pkgdir/$static_compat_prefix"/lib/cmake/harfbuzz/harfbuzz-config.cmake + install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 harfbuzz/COPYING } diff --git a/keyutils/static/PKGBUILD b/keyutils/static-compat/PKGBUILD similarity index 64% rename from keyutils/static/PKGBUILD rename to keyutils/static-compat/PKGBUILD index 68007d50..1f21d7ff 100644 --- a/keyutils/static/PKGBUILD +++ b/keyutils/static-compat/PKGBUILD @@ -2,7 +2,7 @@ # Contributor: Tobias Powalowski _pkgname=keyutils -pkgname=$_pkgname-static +pkgname=static-compat-$_pkgname _tag='5678a1aae8834b5c16b5ed7dc72ef8836a29e122' # git rev-parse v${pkgver} pkgver=1.6.3 pkgrel=1 @@ -10,8 +10,8 @@ pkgdesc='Linux Key Management Utilities' arch=('x86_64') url='https://www.kernel.org/' license=('GPL2' 'LGPL2.1') -depends=('glibc') -makedepends=('git') +depends=('glibc-static-compat') +makedepends=('git' 'static-compat-environment') options=(!emptydirs staticlibs) #validpgpkeys=('A86E54B0D5E1B4E0AB7C640FFBB7576BA7CB0B6B') # David Howells #source=("git+https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/keyutils.git#tag=${_tag}?signed" @@ -22,6 +22,7 @@ sha256sums=('SKIP' '7bb7400b2b8c8f0288c86ec9191f8964a1e682745a204013d5fc7c2e1a253d8e') prepare() { + source static-compat-environment cd "${_pkgname}" # fix paths of binaries in /etc/request-key.conf patch -Np0 -i ../request-key.conf.patch @@ -31,20 +32,22 @@ prepare() { } build() { + source static-compat-environment cd "${_pkgname}" make CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" \ - PREFIX='/usr/static' SBINDIR='/usr/static/bin' BINDIR='/usr/static/bin' INCLUDEDIR='/usr/static/include' \ + PREFIX="$static_compat_prefix" SBINDIR="$static_compat_prefix"/bin BINDIR="$static_compat_prefix"/bin \ INCLUDEDIR="$static_compat_prefix"/include \ NO_SOLIB=1 } package() { + source static-compat-environment cd "${_pkgname}" make DESTDIR="${pkgdir}" \ - PREFIX='/usr/static' SBINDIR='/usr/static/bin' BINDIR='/usr/static/bin' LIBDIR='/usr/static/lib' \ - USRLIBDIR='/usr/static/lib' INCLUDEDIR='/usr/static/include' \ + PREFIX="$static_compat_prefix" SBINDIR="$static_compat_prefix"/bin BINDIR="$static_compat_prefix"/bin \ INCLUDEDIR="$static_compat_prefix"/include LIBDIR="$static_compat_prefix"/lib \ + USRLIBDIR="$static_compat_prefix"/lib \ NO_SOLIB=1 install pkgconfig - install -Dt "$pkgdir/usr/static/lib/pkgconfig" -m644 libkeyutils.pc - rm -r "${pkgdir}"/usr/static/bin + install -Dt "$pkgdir/$static_compat_prefix"/lib/pkgconfig -m644 libkeyutils.pc + rm -r "${pkgdir}/$static_compat_prefix"/bin rm -r "${pkgdir}"/usr/share rm -r "${pkgdir}"/etc } diff --git a/keyutils/static/reproducible.patch b/keyutils/static-compat/reproducible.patch similarity index 100% rename from keyutils/static/reproducible.patch rename to keyutils/static-compat/reproducible.patch diff --git a/keyutils/static/request-key.conf.patch b/keyutils/static-compat/request-key.conf.patch similarity index 100% rename from keyutils/static/request-key.conf.patch rename to keyutils/static-compat/request-key.conf.patch diff --git a/libb2/static/PKGBUILD b/libb2/static-compat/PKGBUILD similarity index 59% rename from libb2/static/PKGBUILD rename to libb2/static-compat/PKGBUILD index 4ed89a2a..40dcd92c 100644 --- a/libb2/static/PKGBUILD +++ b/libb2/static-compat/PKGBUILD @@ -3,34 +3,40 @@ # Contributor: Jesin _pkgname=libb2 -pkgname=$_pkgname-static +pkgname=static-compat-$_pkgname pkgver=0.98.1 pkgrel=2 arch=(x86_64) pkgdesc='C library providing BLAKE2b, BLAKE2s, BLAKE2bp, BLAKE2sp hash functions' url='https://blake2.net/' license=(custom:CC0) -depends=(gcc-libs) +depends=(gcc-libs-static-compat) +makedepends=(static-compat-configure) options=(staticlibs) source=("https://github.com/BLAKE2/libb2/releases/download/v$pkgver/$_pkgname-$pkgver.tar.gz") sha256sums=('53626fddce753c454a3fea581cbbc7fe9bbcf0bc70416d48fdbbf5d87ef6c72e') -# libb2's build system discards the $CFLAGS variable. -# We can get around this by putting those flags in $CC. -export CC="${CC-cc} $CFLAGS" build() { + source static-compat-environment + # libb2's build system discards the $CFLAGS variable. + # We can get around this by putting those flags in $CC. + export CC="${CC-cc} $CFLAGS" cd "$_pkgname-$pkgver" - ./configure --prefix=/usr/static --disable-shared --enable-static --disable-native --enable-fat + static-compat-configure --disable-shared --enable-static --disable-native --enable-fat make } check() { + source static-compat-environment + export CC="${CC-cc} $CFLAGS" cd $_pkgname-$pkgver make check } package() { + source static-compat-environment + export CC="${CC-cc} $CFLAGS" cd $_pkgname-$pkgver make DESTDIR="$pkgdir" install install -Dm644 COPYING -t "$pkgdir"/usr/share/licenses/$pkgname diff --git a/libcap/static-compat/PKGBUILD b/libcap/static-compat/PKGBUILD new file mode 100644 index 00000000..41628b94 --- /dev/null +++ b/libcap/static-compat/PKGBUILD @@ -0,0 +1,43 @@ +# Contributor: David Runge +# Contributor: Bartłomiej Piotrowski +# Contributor: Allan McRae +# Contributor: Hugo Doria + +_pkgname=libcap +pkgname=static-compat-$_pkgname +pkgver=2.63 +pkgrel=2 +pkgdesc="POSIX 1003.1e capabilities" +arch=(x86_64) +url="https://sites.google.com/site/fullycapable/" +license=(GPL2) +depends=(glibc-static-compat) +makedepends=(static-compat-environment) +options=(staticlibs) +source=("https://kernel.org/pub/linux/libs/security/linux-privs/${_pkgname}2/${_pkgname}-$pkgver.tar."{xz,sign} +) +sha512sums=('832842b71ca32db8f53ca5f1a3010f14e7f42693f62f29632e9948c860f990899bb094165c37307ce8b9e5bc5eb1c833e780ebca98442df3e6d900e4b238834b' + 'SKIP') +b2sums=('a49a628f5b9ddf5a3d077428544a53b9cdedf62053ff296a0aa7d61e12ca05f9ba7597f20ee16a3843736bee2417a3d1585ad6b336651fcb3e4ee29b108cfa0f' + 'SKIP') +validpgpkeys=(38A644698C69787344E954CE29EE848AE2CCF3F4) # Andrew G. Morgan + +build() { + source static-compat-environment + export DYNAMIC=no PAM_CAP=no KERNEL_HEADERS=$static_compat_prefix/include lib=lib + make prefix=$static_compat_prefix sbindir=bin -C $_pkgname-$pkgver +} + +check() { + source static-compat-environment + export DYNAMIC=no PAM_CAP=no KERNEL_HEADERS=$static_compat_prefix/include lib=lib + make test -k -C $_pkgname-$pkgver +} + +package() { + source static-compat-environment + export DYNAMIC=no PAM_CAP=no KERNEL_HEADERS=$static_compat_prefix/include lib=lib + make DESTDIR="$pkgdir" RAISE_SETFCAP=no lib=lib prefix=$static_compat_prefix sbindir=bin install -C $_pkgname-$pkgver + find "$pkgdir" -iname '*.so*' -delete + rm -r "$pkgdir/$static_compat_prefix"/share +} diff --git a/libevdev/static-compat/0001_install_the_mouse-dpi-tool_man_page.diff b/libevdev/static-compat/0001_install_the_mouse-dpi-tool_man_page.diff new file mode 100644 index 00000000..931031f8 --- /dev/null +++ b/libevdev/static-compat/0001_install_the_mouse-dpi-tool_man_page.diff @@ -0,0 +1,27 @@ +From de2daf8d361ce2387514c846fe3d741f3d7572ab Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Fri, 25 Mar 2022 14:37:28 +1000 +Subject: [PATCH] meson.build: install the mouse-dpi-tool man page + +Signed-off-by: Peter Hutterer +--- + meson.build | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index 63504ac..33365c9 100644 +--- a/meson.build ++++ b/meson.build +@@ -130,7 +130,8 @@ executable('libevdev-tweak-device', + dependencies: dep_libevdev, + install: true) + install_man('tools/libevdev-tweak-device.1', +- 'tools/touchpad-edge-detector.1') ++ 'tools/touchpad-edge-detector.1', ++ 'tools/mouse-dpi-tool.1') + + # tests + dep_check = dependency('check', version: '>= 0.9.9', +-- +GitLab + diff --git a/libevdev/static-compat/PKGBUILD b/libevdev/static-compat/PKGBUILD new file mode 100644 index 00000000..d2677f76 --- /dev/null +++ b/libevdev/static-compat/PKGBUILD @@ -0,0 +1,47 @@ +# Contributor: Andreas Radke + +_pkgname=libevdev +pkgname=static-compat-$_pkgname +pkgver=1.12.1 +pkgrel=1 +pkgdesc="Wrapper library for evdev devices" +arch=(x86_64) +url="https://www.freedesktop.org/wiki/Software/libevdev/" +license=(custom:MIT) +depends=('glibc-static-compat') +# 'static-compat-check' +makedepends=('python' 'valgrind' 'doxygen' 'static-compat-meson') +options=(staticlibs) +source=(https://freedesktop.org/software/$_pkgname/$_pkgname-$pkgver.tar.xz{,.sig} + 0001_install_the_mouse-dpi-tool_man_page.diff) +sha512sums=('eefce287a665e4f89eb2e0437dfefd45ecf8925c7dac35a1bdd46158541f77f2032c6146900a30a01321751d55a9b537bd1d61777cca9cfa02c39a6e31c97be4' + 'SKIP' + '5bfdb686c1ed1b936d199babae5d9294c3ee158ab4849930a358ad1ae17a50011bd7132ff18614326af0ed73ce5bb887da28c41143daa8f61b74d3d6d047b7d8') +validpgpkeys=('3C2C43D9447D5938EF4551EBE23B7E70B467F0BF') # Peter Hutterer (Who-T) + +prepare() { + cd $_pkgname-$pkgver + patch -Np1 -i ../0001_install_the_mouse-dpi-tool_man_page.diff +} + +build() { + source static-compat-environment + static-compat-meson $_pkgname-$pkgver build \ + -D documentation=disabled \ + -D tests=disabled + meson compile -C build +} + +#check() { +# source static-compat-environment +# meson test -C build +#} + +package() { + source static-compat-environment + DESTDIR="$pkgdir" meson install -C build + rm -r "$pkgdir/$static_compat_prefix"/share/man + + install -Dm644 $_pkgname-$pkgver/COPYING \ + "${pkgdir}/usr/share/licenses/${pkgname}/COPYING" +} diff --git a/libffi/static/PKGBUILD b/libffi/static-compat/PKGBUILD similarity index 77% rename from libffi/static/PKGBUILD rename to libffi/static-compat/PKGBUILD index 9af7172a..c33a963d 100644 --- a/libffi/static/PKGBUILD +++ b/libffi/static-compat/PKGBUILD @@ -4,14 +4,15 @@ # Contributor: Jan de Groot _pkgname=libffi -pkgname=$_pkgname-static +pkgname=static-compat-$_pkgname pkgver=3.4.2 pkgrel=1 pkgdesc='Portable foreign function interface library' arch=('x86_64') url='https://sourceware.org/libffi/' license=('MIT') -depends=('glibc') +depends=('glibc-static-compat') +makedepends=('static-compat-configure') checkdepends=('dejagnu') options=(!emptydirs staticlibs) source=(https://github.com/libffi/libffi/releases/download/v${pkgver}/libffi-${pkgver}.tar.gz) @@ -19,14 +20,15 @@ sha256sums=('540fb721619a6aba3bdeef7d940d8e9e0e6d2c193595bc243241b77ff9e93620') b2sums=('a8137bc895b819f949fd7705e405be627219c6d1fdef280253330f7407d4a548bb057d7bb0e9225d1767d42f9bf5f0ab3c455db1c3470d7cc876bb7b7d55d308') prepare() { + source static-compat-environment cd $_pkgname-$pkgver autoreconf -fiv } build() { + source static-compat-environment cd $_pkgname-$pkgver - ./configure \ - --prefix=/usr/static \ + static-compat-configure \ --disable-shared \ --enable-static \ --enable-pax_emutramp @@ -34,13 +36,15 @@ build() { } check() { + source static-compat-environment make -C $_pkgname-$pkgver check } package() { + source static-compat-environment cd $_pkgname-$pkgver make DESTDIR="$pkgdir" install - rm -r "$pkgdir"/usr/static/share/{man,info} + rm -r "$pkgdir/$static_compat_prefix"/share/{man,info} install -Dm 644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname } diff --git a/libgcrypt/static/PKGBUILD b/libgcrypt/static-compat/PKGBUILD similarity index 79% rename from libgcrypt/static/PKGBUILD rename to libgcrypt/static-compat/PKGBUILD index 2aa0e361..1ac1097f 100644 --- a/libgcrypt/static/PKGBUILD +++ b/libgcrypt/static-compat/PKGBUILD @@ -5,22 +5,24 @@ # then cp /usr/lib/libgcrypt.so.11 /var/lib/archbuild/staging-x86_64/root/usr/lib/ and do staging-x86_64-build _pkgname=libgcrypt -pkgname=$_pkgname-static -pkgver=1.9.4 +pkgname=static-compat-$_pkgname +pkgver=1.10.1 pkgrel=1 pkgdesc="General purpose cryptographic library based on the code from GnuPG" arch=(x86_64) url="https://www.gnupg.org" license=('LGPL') -depends=('libgpg-error-static') +depends=('static-compat-libgpg-error') +makedepends=('static-compat-configure') options=('!emptydirs' staticlibs) # https://www.gnupg.org/download/integrity_check.html source=(https://gnupg.org/ftp/gcrypt/${_pkgname}/${_pkgname}-${pkgver}.tar.bz2{,.sig}) -sha1sums=('1bccc8393482fa1953323ff429c6b5ba5676eb1a' +sha1sums=('de2cc32e7538efa376de7bf5d3eafa85626fb95f' 'SKIP') validpgpkeys=('6DAA6E64A76D2840571B4902528897B826403ADA') # "Werner Koch (dist signing 2020)" prepare() { + source static-compat-environment cd "${_pkgname}"-${pkgver} # tests fail due to systemd+libseccomp preventing memory syscalls when building in chroots # t-secmem: line 176: gcry_control (GCRYCTL_INIT_SECMEM, pool_size, 0) failed: General error @@ -33,9 +35,9 @@ prepare() { } build() { + source static-compat-environment cd "${_pkgname}"-${pkgver} - export PKG_CONFIG_PATH=/usr/static/lib/pkgconfig:/usr/lib/pkgconfig - ./configure --prefix=/usr/static \ + static-compat-configure \ --disable-shared \ --enable-static \ --disable-padlock-support @@ -48,7 +50,8 @@ check() { } package() { + source static-compat-environment cd "${_pkgname}"-${pkgver} make DESTDIR="${pkgdir}" install - rm -r "$pkgdir"/usr/static/share/{man,info} + rm -r "$pkgdir/$static_compat_prefix"/share/{man,info} } diff --git a/libglvnd/static/LICENSE b/libglvnd/static-compat/LICENSE similarity index 100% rename from libglvnd/static/LICENSE rename to libglvnd/static-compat/LICENSE diff --git a/libglvnd/static-compat/PKGBUILD b/libglvnd/static-compat/PKGBUILD new file mode 100644 index 00000000..0de90c7b --- /dev/null +++ b/libglvnd/static-compat/PKGBUILD @@ -0,0 +1,37 @@ +# Note that this is still a dynamic library, see https://gitlab.freedesktop.org/glvnd/libglvnd/-/issues/212 + +_pkgname=libglvnd +pkgname=static-compat-$_pkgname +pkgver=1.4.0 +pkgrel=1 +pkgdesc="The GL Vendor-Neutral Dispatch library" +arch=('x86_64') +url="https://github.com/NVIDIA/libglvnd" +license=('custom:BSD-like') +depends=('static-compat-libxext' 'mesa' 'opengl-driver') +makedepends=('static-compat-libx11' 'static-compat-xorgproto' 'python' 'static-compat-meson') +options=(staticlibs) +source=("$_pkgname-$pkgver.tar.gz::https://gitlab.freedesktop.org/glvnd/libglvnd/-/archive/v${pkgver}/libglvnd-v${pkgver}.tar.gz" + LICENSE) +sha512sums=('ca741bdd7ac2fba919f1f85e685e92396bc1cdc436e77bca921d87738bb273a6d48f77650e2781593ce9084dcec6b1fa8f78dc84534a225629e7f61d92df8d89' + 'bf0f4a7e04220a407400f89226ecc1f798cc43035f2538cc8860e5088e1f84140baf0d4b0b28f66e4b802d4d6925769a1297c24e1ba39c1c093902b2931781a5') + +build() { + source static-compat-environment + export PATH=$PWD:$PATH + export LDFLAGS+=" $static_compat_prefix/lib/libX11.a $static_compat_prefix/lib/libXau.a $static_compat_prefix/lib/libxcb.a $static_compat_prefix/lib/libXau.a $static_compat_prefix/lib/libXdmcp.a -ldl" + export LD=$GCC + printf '#!/usr/bin/bash\nexec /usr/bin/pkg-config --static "$@"\n' > pkg-config + static-compat-meson $_pkgname-v$pkgver build \ + -D gles1=false + + ninja -v -C build +} + +package() { + source static-compat-environment + # libglvnd needs mesa for indirect rendering + DESTDIR="$pkgdir" ninja -C build install + + install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE +} diff --git a/libglvnd/static/PKGBUILD b/libglvnd/static/PKGBUILD deleted file mode 100644 index 64950e0d..00000000 --- a/libglvnd/static/PKGBUILD +++ /dev/null @@ -1,35 +0,0 @@ -# NOT WORKING as it still produces dynamic libraries -# Building this as static library is also not useful, see https://gitlab.freedesktop.org/glvnd/libglvnd/-/issues/212 - -_pkgname=libglvnd -pkgname=$_pkgname-static -pkgver=1.3.2 -pkgrel=1 -pkgdesc="The GL Vendor-Neutral Dispatch library" -arch=('x86_64') -url="https://github.com/NVIDIA/libglvnd" -license=('custom:BSD-like') -depends=('libxext-static' 'mesa' 'opengl-driver') -makedepends=('libx11' 'xorgproto' 'python' 'meson') -options=(staticlibs) -source=("$_pkgname-$pkgver.tar.gz::https://gitlab.freedesktop.org/glvnd/libglvnd/-/archive/v${pkgver}/libglvnd-v${pkgver}.tar.gz" - LICENSE) -sha512sums=('01db155f02fa21f4217ee5ca6dd8eeed3d20672c8aaa43475bd112921716ee8d4124e01f80a89587ddc8ebfa4a552c5e02d70726222702cce1601a6e6f4bc22b' - 'bf0f4a7e04220a407400f89226ecc1f798cc43035f2538cc8860e5088e1f84140baf0d4b0b28f66e4b802d4d6925769a1297c24e1ba39c1c093902b2931781a5') - -build() { - export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/static/lib/pkgconfig - arch-meson $_pkgname-v$pkgver build \ - -D gles1=false \ - --prefix /usr/static \ - --default-library static - - ninja -C build -} - -package() { - # libglvnd needs mesa for indirect rendering - DESTDIR="$pkgdir" ninja -C build install - - install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE -} diff --git a/libgpg-error/static/PKGBUILD b/libgpg-error/static-compat/PKGBUILD similarity index 69% rename from libgpg-error/static/PKGBUILD rename to libgpg-error/static-compat/PKGBUILD index bd9ff830..246a8514 100644 --- a/libgpg-error/static/PKGBUILD +++ b/libgpg-error/static-compat/PKGBUILD @@ -2,42 +2,47 @@ # Contributor: judd _pkgname=libgpg-error -pkgname=$_pkgname-static -pkgver=1.42 +pkgname=static-compat-$_pkgname +pkgver=1.44 pkgrel=1 pkgdesc="Support library for libgcrypt" arch=(x86_64) url="https://www.gnupg.org" license=('LGPL') -depends=('glibc' 'sh') +depends=('glibc-static-compat' 'sh') +makedepends=('static-compat-configure') options=(staticlibs) source=(https://www.gnupg.org/ftp/gcrypt/libgpg-error/${_pkgname}-${pkgver}.tar.bz2{,.sig}) # https://www.gnupg.org/download/integrity_check.html -sha1sums=('5e620d71fc24d287a7ac2460b1d819074bb8b9bb' +sha1sums=('c16ab473d1e558ba1712c77ace38bd03e467cbb0' 'SKIP') validpgpkeys=('D8692123C4065DEA5E0F3AB5249B39D24F25E3B6' # Werner Koch '031EC2536E580D8EA286A9F22071B08A33BD3F06' # NIIBE Yutaka (GnuPG Release Key) '6DAA6E64A76D2840571B4902528897B826403ADA') # "Werner Koch (dist signing 2020)" prepare() { + source static-compat-environment cd ${_pkgname}-${pkgver} autoreconf -vfi } build() { + source static-compat-environment cd ${_pkgname}-${pkgver} - ./configure --prefix=/usr/static --disable-shared --enable-static + static-compat-configure --disable-shared --enable-static make } check() { + source static-compat-environment cd ${_pkgname}-${pkgver} #make check # note: fails with error message "FAIL: gpg-error-config-test.sh" } package() { + source static-compat-environment cd ${_pkgname}-${pkgver} make DESTDIR="${pkgdir}/" install - rm -r "$pkgdir"/usr/static/share/{man,info} + rm -r "$pkgdir/$static_compat_prefix"/share/{man,info} } diff --git a/libgudev/static-compat/PKGBUILD b/libgudev/static-compat/PKGBUILD new file mode 100644 index 00000000..7337b5c6 --- /dev/null +++ b/libgudev/static-compat/PKGBUILD @@ -0,0 +1,47 @@ +# Contributor: Evangelos Foutras + +_pkgname=libgudev +pkgname=static-compat-$_pkgname +pkgver=237 +pkgrel=1 +pkgdesc="GObject bindings for libudev" +url="https://wiki.gnome.org/Projects/libgudev" +arch=(x86_64) +license=(LGPL2.1) +depends=(static-compat-systemd-libs static-compat-glib2) +makedepends=(git umockdev vala static-compat-meson) +_commit=dff7a794e55d6ad7a10e8edacd73aa047593e74c # tags/237^0 +source=("git+https://gitlab.gnome.org/GNOME/libgudev.git#commit=$_commit") +sha256sums=('SKIP') + +pkgver() { + cd $_pkgname + git describe --tags | sed 's/-/+/g' +} + +prepare() { + cd $_pkgname + + # Use a locale with "," decimal separator that we + # actually have available in the build environments + sed -e 's/fr_FR\.UTF-8/de_DE.UTF-8/g' \ + -i tests/meson.build tests/test-double.c +} + +build() { + source static-compat-environment + static-compat-meson $_pkgname build -D gtk_doc=false + meson compile -C build +} + +check() { + source static-compat-environment + meson test -C build --print-errorlogs +} + +package() { + source static-compat-environment + meson install -C build --destdir "$pkgdir" +} + +# vim:set ts=2 sw=2 et: diff --git a/libice/static/PKGBUILD b/libice/static-compat/PKGBUILD similarity index 62% rename from libice/static/PKGBUILD rename to libice/static-compat/PKGBUILD index ef3bd3a4..394c1ec4 100644 --- a/libice/static/PKGBUILD +++ b/libice/static-compat/PKGBUILD @@ -1,16 +1,16 @@ -# Maintainer: AndyRTR -# Maintainer: Jan de Groot +# Contributor: AndyRTR +# Contributor: Jan de Groot # Contributor: Alexander Baldeck _pkgname=libice -pkgname=$_pkgname-static +pkgname=static-compat-$_pkgname pkgver=1.0.10 pkgrel=3 pkgdesc="X11 Inter-Client Exchange library" arch=('x86_64') url="https://xorg.freedesktop.org/" -depends=('glibc') -makedepends=('xtrans>=1.2.5' 'xorg-util-macros' 'xorgproto') +depends=('glibc-static-compat') +makedepends=('static-compat-configure' 'static-compat-xtrans>=1.2.5' 'xorg-util-macros' 'static-compat-xorgproto') options=(!emptydirs staticlibs) source=(${url}/releases/individual/lib/libICE-${pkgver}.tar.bz2{,.sig}) license=('custom') @@ -19,15 +19,17 @@ sha512sums=('2f1ef2c32c833c71894a08fa7e7ed53f301f6c7bd22485d71c12884d8e8b36b99f3 validpgpkeys=('4A193C06D35E7C670FA4EF0BA2FB9E081F2D130E') # "Alan Coopersmith " build() { + source static-compat-environment cd libICE-${pkgver} - ./configure --prefix=/usr/static --disable-shared --enable-static --sysconfdir=/etc + static-compat-configure --disable-shared --enable-static --sysconfdir=/etc make } package() { + source static-compat-environment cd libICE-${pkgver} make DESTDIR="${pkgdir}" install - rm -r "$pkgdir"/usr/static/share/doc + rm -r "$pkgdir/$static_compat_prefix"/share/doc install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING" } diff --git a/libinput/default/PKGBUILD b/libinput/default/PKGBUILD new file mode 100644 index 00000000..0d012031 --- /dev/null +++ b/libinput/default/PKGBUILD @@ -0,0 +1,44 @@ +# Maintainer: Andreas Radke + +pkgname=libinput +pkgver=1.20.0 +pkgrel=2 +pkgdesc="Input device management and event handling library" +url="https://gitlab.freedesktop.org/libinput" +arch=(x86_64) +license=(custom:X11) +depends=('mtdev' 'systemd' 'libevdev' 'libwacom') +# upstream doesn't recommend building docs +makedepends=('gtk4' 'meson' 'wayland-protocols' 'check') # 'doxygen' 'graphviz' 'python-sphinx' 'python-recommonmark' +optdepends=('gtk4: libinput debug-gui' + 'python-pyudev: libinput measure' + 'python-libevdev: libinput measure') +options=(debug) +source=(https://gitlab.freedesktop.org/libinput/libinput/-/archive/$pkgver/$pkgname-$pkgver.tar.bz2) +sha512sums=('145b0e0760929137ab442b2030b4b42f6df54a3ae61c47c929e1a74857a170f0f2a56bb7522b7d1d9c0943028ac54c7728cf8d66a0c384f6118f31d6625ab44c') +#source=(https://freedesktop.org/software/$pkgname/$pkgname-$pkgver.tar.xz{,.sig}) +#sha512sums=('f4b776d0da78c687ba21b430a04941ac6b43f68970c82ec9f7360358fdea5ed6a873948ce66a25bcdd64d4b95fa4bf705cc24dbc25c7c0f5fd2d0efbd763f298' +# 'SKIP') +#validpgpkeys=('3C2C43D9447D5938EF4551EBE23B7E70B467F0BF') # Peter Hutterer (Who-T) + +build() { + arch-meson $pkgname-$pkgver build \ + -D udev-dir=/usr/lib/udev \ + -D documentation=false + + # Print config + meson configure build + + meson compile -C build +} + +check() { + meson test -C build --print-errorlogs +} + +package() { + meson install -C build --destdir "$pkgdir" + + install -Dvm644 $pkgname-$pkgver/COPYING \ + "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} diff --git a/libinput/static-compat/PKGBUILD b/libinput/static-compat/PKGBUILD new file mode 100644 index 00000000..8f777ff7 --- /dev/null +++ b/libinput/static-compat/PKGBUILD @@ -0,0 +1,53 @@ +# Contributor: Andreas Radke + +_pkgname=libinput +pkgname=static-compat-$_pkgname +pkgver=1.20.0 +pkgrel=2 +pkgdesc="Input device management and event handling library" +url="https://gitlab.freedesktop.org/libinput" +arch=(x86_64) +license=(custom:X11) +depends=('static-compat-mtdev' 'static-compat-systemd-libs' 'static-compat-libevdev' 'static-compat-libwacom') +# upstream doesn't recommend building docs +makedepends=('static-compat-meson' 'static-compat-wayland') # 'check' 'doxygen' 'graphviz' 'python-sphinx' 'python-recommonmark' +options=(staticlibs !emptydirs) +source=(https://gitlab.freedesktop.org/libinput/libinput/-/archive/$pkgver/$_pkgname-$pkgver.tar.bz2) +sha512sums=('145b0e0760929137ab442b2030b4b42f6df54a3ae61c47c929e1a74857a170f0f2a56bb7522b7d1d9c0943028ac54c7728cf8d66a0c384f6118f31d6625ab44c') +#source=(https://freedesktop.org/software/$_pkgname/$_pkgname-$pkgver.tar.xz{,.sig}) +#sha512sums=('f4b776d0da78c687ba21b430a04941ac6b43f68970c82ec9f7360358fdea5ed6a873948ce66a25bcdd64d4b95fa4bf705cc24dbc25c7c0f5fd2d0efbd763f298' +# 'SKIP') +#validpgpkeys=('3C2C43D9447D5938EF4551EBE23B7E70B467F0BF') # Peter Hutterer (Who-T) + +prepare() { + sed -i 's|shared_library|library|g' $_pkgname-$pkgver/meson.build +} + +build() { + export LDFLAGS+=' -lrt -pthread' + source static-compat-environment + static-compat-meson $_pkgname-$pkgver build \ + -D udev-dir="$static_compat_prefix"/lib/udev \ + -D documentation=false \ + -D debug-gui=false \ + -D tests=false # requires check + + # Print config + meson configure build + + meson compile -C build +} + +check() { + source static-compat-environment + meson test -C build --print-errorlogs +} + +package() { + source static-compat-environment + meson install -C build --destdir "$pkgdir" + + install -Dvm644 $_pkgname-$pkgver/COPYING \ + "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + rm -r "$pkgdir/$static_compat_prefix"/share/{man,zsh} +} diff --git a/libjpeg-turbo/static-compat/PKGBUILD b/libjpeg-turbo/static-compat/PKGBUILD new file mode 100644 index 00000000..0c0163c0 --- /dev/null +++ b/libjpeg-turbo/static-compat/PKGBUILD @@ -0,0 +1,51 @@ +# Contributor: David Runge +# Contributor: Gaetan Bisson +# Contributor: Allan McRae +# Contributor: Simone Sclavi 'Ito' + +_pkgname=libjpeg-turbo +pkgname=static-compat-$_pkgname +pkgver=2.1.3 +pkgrel=1 +pkgdesc="JPEG image codec with accelerated baseline compression and decompression" +arch=(x86_64) +url="https://libjpeg-turbo.org/" +license=(BSD) +depends=(glibc-static-compat) +makedepends=(static-compat-cmake nasm) +options=(staticlibs) +source=(https://sourceforge.net/projects/$_pkgname/files/$pkgver/$_pkgname-$pkgver.tar.gz{,.sig}) +sha512sums=('975c9835de7d70c6c8c5a1959adfa18f7f956bc9946fde8f1b40c1d853245c38a3118ac06b93841ec3e90be6945c38d687d062b371496c2ee9b5638d7f60418d' + 'SKIP') +b2sums=('87ef47105e66b2ee918e95962ac59963b6adea5b49ab0db692810aee0a13a215a0ef7fe0b549ecd5151274549e12d09eb0b42439bf0a4bc1ad2c4e62dcceb77c' + 'SKIP') +validpgpkeys=('0338C8D8D9FDA62CF9C421BD7EC2DBB6F4DBF434') # The libjpeg-turbo Project (Signing key for official binaries) + +build() { + source static-compat-environment + static-compat-cmake -DCMAKE_INSTALL_LIBDIR="$static_compat_prefix"/lib \ + -DWITH_JAVA=OFF\ + -DWITH_JPEG8=ON \ + -W no-dev \ + -B build \ + -S $_pkgname-$pkgver + make VERBOSE=1 -C build +} + +check() { + source static-compat-environment + make test -C build +} + +package() { + source static-compat-environment + make VERBOSE=1 DESTDIR="$pkgdir" docdir="$static_compat_prefix"/share/doc/$_pkgname exampledir="$static_compat_prefix"/share/doc/$_pkgname install -C build + + install -d "$pkgdir/usr/share/licenses/$pkgname" + ln -s ../../doc/$_pkgname/LICENSE.md "$pkgdir/usr/share/licenses/$pkgname" + # header required by some dependants + # https://bugs.archlinux.org/task/24787 + install -vDm 644 $_pkgname-$pkgver/jpegint.h "$pkgdir/$static_compat_prefix/include" + rm -r "$pkgdir/$static_compat_prefix"/share + find "$pkgdir/$static_compat_prefix"/lib -iname '*.so*' -delete +} diff --git a/libpng/static/PKGBUILD b/libpng/static-compat/PKGBUILD similarity index 77% rename from libpng/static/PKGBUILD rename to libpng/static-compat/PKGBUILD index 047a8089..943ba8f1 100644 --- a/libpng/static/PKGBUILD +++ b/libpng/static-compat/PKGBUILD @@ -4,40 +4,42 @@ # Contributor: Douglas Soares de Andrade _pkgname=libpng -pkgname=$_pkgname-static +pkgname=static-compat-$_pkgname pkgver=1.6.37 pkgrel=3 pkgdesc="A collection of routines used to create PNG format graphics files" arch=('x86_64') url="http://www.libpng.org/pub/png/libpng.html" license=('custom') -depends=('zlib' 'sh') +depends=('static-compat-zlib' 'sh') +makedepends=('static-compat-configure') options=(!emptydirs staticlibs) validpgpkeys=('8048643BA2C840F4F92A195FF54984BFA16C640F') # Glenn Randers-Pehrson (mozilla) source=("https://downloads.sourceforge.net/sourceforge/$_pkgname/$_pkgname-$pkgver.tar.xz") sha256sums=('505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201fc80868d88ca') build() { + source static-compat-environment cd $_pkgname-$pkgver - - ./configure \ - --prefix=/usr/static \ + static-compat-configure \ --disable-shared \ --enable-static make } check() { + source static-compat-environment cd $_pkgname-$pkgver make check } package() { + source static-compat-environment cd $_pkgname-$pkgver make DESTDIR="$pkgdir" install - rm -r "$pkgdir"/usr/static/share/man + rm -r "$pkgdir/$static_compat_prefix"/share/man install -D -m0644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" } diff --git a/libsm/static/PKGBUILD b/libsm/static-compat/PKGBUILD similarity index 61% rename from libsm/static/PKGBUILD rename to libsm/static-compat/PKGBUILD index 837c8695..a0d8b0c2 100644 --- a/libsm/static/PKGBUILD +++ b/libsm/static-compat/PKGBUILD @@ -1,30 +1,31 @@ # Contributor: Jan de Groot _pkgname=libsm -pkgname=$_pkgname-static +pkgname=static-compat-$_pkgname pkgver=1.2.3 pkgrel=2 pkgdesc="X11 Session Management library" arch=('x86_64') license=('custom') url="https://xorg.freedesktop.org/" -depends=('libice-static' 'util-linux-static') -makedepends=('xorg-util-macros' 'xtrans' 'xorgproto') +depends=('static-compat-libice' 'static-compat-util-linux') +makedepends=('xorg-util-macros' 'static-compat-xtrans' 'static-compat-xorgproto' 'static-compat-configure') options=(!emptydirs staticlibs) source=(${url}/releases/individual/lib/libSM-${pkgver}.tar.bz2) sha512sums=('74c42e27029db78475e62025b4711dbac5e22d2f8e8a24be98a1c31b03c0fc4afe859928f851800ea0b76854f12147900dc4f27bbfd3d8ea45daaaf24b70a903') build() { + source static-compat-environment cd libSM-${pkgver} - export PKG_CONFIG_PATH=/usr/static/lib/pkgconfig:/usr/lib/pkgconfig - ./configure --prefix=/usr/static --disable-shared --enable-static --sysconfdir=/etc + static-compat-configure --disable-shared --enable-static --sysconfdir=/etc make } package() { + source static-compat-environment cd libSM-${pkgver} make DESTDIR="${pkgdir}" install - rm -r "${pkgdir}/usr/static/share/doc" + rm -r "$pkgdir/$static_compat_prefix"/share/doc install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING" } diff --git a/libwacom/static-compat/PKGBUILD b/libwacom/static-compat/PKGBUILD new file mode 100644 index 00000000..ad1c6a58 --- /dev/null +++ b/libwacom/static-compat/PKGBUILD @@ -0,0 +1,43 @@ +# Contributor: Jan Alexander Steffens (heftig) + +_pkgname=libwacom +pkgname=static-compat-$_pkgname +pkgver=2.2.0 +pkgrel=1 +pkgdesc="Library to identify Wacom tablets and their features" +arch=('x86_64') +url="https://github.com/linuxwacom/libwacom/wiki" +license=('MIT') +depends=('static-compat-glib2' 'static-compat-systemd-libs' 'static-compat-libgudev') +makedepends=('static-compat-libxml2' 'static-compat-meson') +checkdepends=('python-pytest' 'python-libevdev' 'python-pyudev') +options=('staticlibs') +validpgpkeys=('3C2C43D9447D5938EF4551EBE23B7E70B467F0BF') +source=(https://github.com/linuxwacom/libwacom/releases/download/${_pkgname}-${pkgver}/${_pkgname}-${pkgver}.tar.xz{,.sig}) +# https://github.com/linuxwacom/libwacom/releases +sha256sums=('e62ac9edb522d36ad2fa99adca35ddc02067383d4668eeaa13d7efccc30bb8c8' + 'SKIP') + +prepare() { + sed -i 's|shared_library|library|g' $_pkgname-$pkgver/meson.build +} + +build() { + export LDFLAGS+=' -llzma -lz -lm -lrt' + source static-compat-environment + static-compat-meson build $_pkgname-$pkgver + ninja -C build +} + +check() { + source static-compat-environment + ninja test -C build +} + +package() { + source static-compat-environment + DESTDIR="$pkgdir" ninja install -C build + install -D -m644 $_pkgname-$pkgver/COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + find "$pkgdir/$static_compat_prefix" -iname '*.so*' -delete + rm -r "$pkgdir/$static_compat_prefix"/share/man +} diff --git a/libx11/static-compat/PKGBUILD b/libx11/static-compat/PKGBUILD new file mode 100644 index 00000000..edd50529 --- /dev/null +++ b/libx11/static-compat/PKGBUILD @@ -0,0 +1,45 @@ +# Contributor: Andreas Radke +# Contributor: Jan de Groot + +_pkgname=libx11 +pkgname=static-compat-$_pkgname +pkgver=1.7.5 +pkgrel=3 +pkgdesc="X11 client-side library" +arch=(x86_64) +url="https://xorg.freedesktop.org/" +depends=('static-compat-libxcb') +makedepends=('static-compat-configure' 'xorg-util-macros' 'static-compat-xtrans' 'static-compat-xorgproto') +license=('custom') +options=(!emptydirs staticlibs) +source=(${url}/releases/individual/lib/libX11-${pkgver}.tar.xz{,.sig}) +sha512sums=('ef33e2f631226cab27657f46e1fd4cfc928f62f928d8297474e7b993017c8f92b60272eed6515990cdf3a9d34581837b7a3896e584f3546dd26f3790034df347' + 'SKIP') +#validpgpkeys=('4A193C06D35E7C670FA4EF0BA2FB9E081F2D130E') # Alan Coopersmith +#validpgpkeys=('C41C985FDCF1E5364576638B687393EE37D128F8') # Matthieu Herrb +validpgpkeys=('3BB639E56F861FA2E86505690FDD682D974CA72A') # Matt Turner +#validpgpkeys=('995ED5C8A6138EB0961F18474C09DD83CAAA50B2') # Adam Jackson +#validpgpkeys=('C383B778255613DFDB409D91DB221A6900000011') # "Keith Packard " + +build() { + source static-compat-environment + cd libX11-${pkgver} + static-compat-configure --disable-shared --enable-static --disable-xf86bigfont + make +} + +check() { + source static-compat-environment + cd libX11-${pkgver} + make check +} + +package() { + source static-compat-environment + cd "${srcdir}/libX11-${pkgver}" + make DESTDIR="${pkgdir}" install + rm -r "$pkgdir/$static_compat_prefix"/share/{man,doc} + + install -d -m755 "${pkgdir}/usr/share/licenses/${pkgname}" + install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/" +} diff --git a/libx11/static/PKGBUILD b/libx11/static/PKGBUILD deleted file mode 100644 index c5d7f087..00000000 --- a/libx11/static/PKGBUILD +++ /dev/null @@ -1,45 +0,0 @@ -# Contributor: Andreas Radke -# Contributor: Jan de Groot - -_pkgname=libx11 -pkgname=$_pkgname-static -pkgver=1.7.0 -pkgrel=3 -pkgdesc="X11 client-side library" -arch=(x86_64) -url="https://xorg.freedesktop.org/" -# keep xorgproto runtime dependency -# https://lists.archlinux.org/pipermail/arch-dev-public/2019-December/029767.html -depends=('libxcb-static' 'xorgproto') -makedepends=('xorg-util-macros' 'libx11' 'xtrans') -license=('custom') -options=(!emptydirs staticlibs) -source=(${url}/releases/individual/lib/libX11-${pkgver}.tar.bz2{,.sig}) -sha512sums=('f661ca90350fd8a94f054b00f12f5122cea068ebff706acfd399462236c189a296a2358d17d16166635101cf56cc19303dd407873a159932d093c9f33556f9fb' - 'SKIP') -validpgpkeys=('4A193C06D35E7C670FA4EF0BA2FB9E081F2D130E') # Alan Coopersmith -validpgpkeys+=('C41C985FDCF1E5364576638B687393EE37D128F8') # Matthieu Herrb -validpgpkeys+=('3BB639E56F861FA2E86505690FDD682D974CA72A') # Matt Turner -validpgpkeys+=('995ED5C8A6138EB0961F18474C09DD83CAAA50B2') # Adam Jackson -validpgpkeys=('C383B778255613DFDB409D91DB221A6900000011') # "Keith Packard " - -build() { - cd libX11-${pkgver} - #export PKG_CONFIG_PATH=/usr/static/lib/pkgconfig:/usr/lib/pkgconfig - ./configure --prefix=/usr/static --disable-shared --enable-static --disable-xf86bigfont - make -} - -check() { - cd libX11-${pkgver} - make check -} - -package() { - cd "${srcdir}/libX11-${pkgver}" - make DESTDIR="${pkgdir}" install - rm -r "$pkgdir"/usr/static/share/{man,doc} - - install -d -m755 "${pkgdir}/usr/share/licenses/${pkgname}" - install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/" -} diff --git a/libxau/static/PKGBUILD b/libxau/static-compat/PKGBUILD similarity index 72% rename from libxau/static/PKGBUILD rename to libxau/static-compat/PKGBUILD index 696f8cf0..02db26f6 100644 --- a/libxau/static/PKGBUILD +++ b/libxau/static-compat/PKGBUILD @@ -3,14 +3,14 @@ # Contributor: Alexander Baldeck _pkgname=libxau -pkgname=$_pkgname-static +pkgname=static-compat-$_pkgname pkgver=1.0.9 pkgrel=3 pkgdesc="X11 authorisation library" arch=('x86_64') url="https://xorg.freedesktop.org/" -depends=('glibc') -makedepends=('xorgproto') +depends=('glibc-static-compat') +makedepends=('static-compat-configure' 'static-compat-xorgproto') license=('custom') options=(!emptydirs staticlibs) source=(${url}/releases/individual/lib/libXau-${pkgver}.tar.bz2{,.sig}) @@ -19,15 +19,17 @@ sha512sums=('3ca454ba466a807ea28b0f715066d73dc76ad312697b121d43e4d5766215052e9b7 'SKIP') build() { + source static-compat-environment cd libXau-${pkgver} - ./configure --prefix=/usr/static --disable-shared --enable-static --sysconfdir=/etc + static-compat-configure --disable-shared --enable-static --sysconfdir=/etc make } package() { + source static-compat-environment cd libXau-${pkgver} make DESTDIR="${pkgdir}" install - rm -r "$pkgdir"/usr/static/share/man + rm -r "$pkgdir/$static_compat_prefix"/share/man install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING" } diff --git a/libxcb/static/PKGBUILD b/libxcb/static-compat/PKGBUILD similarity index 73% rename from libxcb/static/PKGBUILD rename to libxcb/static-compat/PKGBUILD index 00a80038..9738c2af 100644 --- a/libxcb/static/PKGBUILD +++ b/libxcb/static-compat/PKGBUILD @@ -3,14 +3,14 @@ # Contributor: Alexander Baldeck _pkgname=libxcb -pkgname=$_pkgname-static +pkgname=static-compat-$_pkgname pkgver=1.14 pkgrel=1 pkgdesc="X11 client-side library" arch=('x86_64') url="https://xcb.freedesktop.org/" -depends=('xcb-proto' 'libxdmcp' 'libxau-static') -makedepends=('libxslt' 'python' 'xorg-util-macros' 'xorgproto') +depends=('static-compat-xcb-proto' 'static-compat-libxdmcp' 'static-compat-libxau') +makedepends=('libxslt' 'python' 'xorg-util-macros' 'static-compat-xorgproto' 'static-compat-configure') license=('custom') options=(!emptydirs staticlibs) source=(https://xorg.freedesktop.org/archive/individual/lib/$_pkgname-$pkgver.tar.xz{,.sig}) @@ -20,9 +20,9 @@ validpgpkeys=('A66D805F7C9329B4C5D82767CCC4F07FAC641EFF') # "Daniel Stone " build() { + source static-compat-environment cd "$_pkgname-$pkgver" - export PKG_CONFIG_PATH=/usr/static/lib/pkgconfig:/usr/lib/pkgconfig - ./configure --prefix=/usr/static \ + static-compat-configure \ --enable-xinput \ --enable-xkb \ --disable-shared \ @@ -31,14 +31,16 @@ build() { } check() { + source static-compat-environment cd $_pkgname-$pkgver make -k check } package() { + source static-compat-environment cd "$_pkgname-$pkgver" make DESTDIR="$pkgdir" install - rm -r "${pkgdir}"/usr/static/share/{doc,man} + rm -r "${pkgdir}/$static_compat_prefix"/share/{doc,man} install -m755 -d "$pkgdir/usr/share/licenses/$pkgname" install -m644 COPYING "$pkgdir/usr/share/licenses/$pkgname" } diff --git a/libxcomposite/static-compat/PKGBUILD b/libxcomposite/static-compat/PKGBUILD new file mode 100644 index 00000000..d81c0fc6 --- /dev/null +++ b/libxcomposite/static-compat/PKGBUILD @@ -0,0 +1,34 @@ +# Contributor: Jan de Groot + +_pkgname=libxcomposite +pkgname=static-compat-$_pkgname +pkgver=0.4.5 +pkgrel=3 +pkgdesc="X11 Composite extension library" +arch=('x86_64') +url="https://xorg.freedesktop.org/" +license=('custom') +depends=('static-compat-libxfixes') +makedepends=('static-compat-configure' 'static-compat-xorgproto') +options=(staticlibs !docs !emptydirs) +source=("${url}/releases/individual/lib/libXcomposite-${pkgver}.tar.bz2"{,.sig}) +sha512sums=('502fd51fd9097bb3ca72174ac5b25b9d3b1ff240d32c4765199df03d89337d94b4ddea49e90b177b370862430089d966ce9c38988337156352cfeae911c2d3d5' + 'SKIP') +validpgpkeys=('4A193C06D35E7C670FA4EF0BA2FB9E081F2D130E') # "Alan Coopersmith " + +build() { + source static-compat-environment + cd libXcomposite-${pkgver} + static-compat-configure --enable-static --disable-shared + make +} + +package() { + source static-compat-environment + cd libXcomposite-${pkgver} + make DESTDIR="${pkgdir}" install + rm -r "$pkgdir/$static_compat_prefix"/share/man + + install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}" + install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/" +} diff --git a/libxdamage/static-compat/PKGBUILD b/libxdamage/static-compat/PKGBUILD new file mode 100644 index 00000000..3bae6488 --- /dev/null +++ b/libxdamage/static-compat/PKGBUILD @@ -0,0 +1,31 @@ +# Contributor: Jan de Groot + +_pkgname=libxdamage +pkgname=static-compat-$_pkgname +pkgver=1.1.5 +pkgrel=3 +pkgdesc="X11 damaged region extension library" +arch=('x86_64') +url="https://xorg.freedesktop.org/" +license=('custom') +depends=('static-compat-libxfixes') +makedepends=('static-compat-xorgproto' 'static-compat-configure') +options=(staticlibs !emptydirs) +source=(${url}/releases/individual/lib/libXdamage-${pkgver}.tar.bz2{,.sig}) +sha512sums=('a3ca6cc33b1727f717a3e2aa5593f660508a81a47918a0aa949e9e8fba105e303fe5071983b48caac92feea0fe6e8e01620805e4d19b41f21f20d837b191c124' + 'SKIP') +validpgpkeys=('4A193C06D35E7C670FA4EF0BA2FB9E081F2D130E') # "Alan Coopersmith " + +build() { + source static-compat-environment + cd libXdamage-${pkgver} + static-compat-configure --disable-shared --enable-static + make +} + +package() { + source static-compat-environment + cd libXdamage-${pkgver} + make DESTDIR="${pkgdir}" install + install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING" +} diff --git a/libxdmcp/static/PKGBUILD b/libxdmcp/static-compat/PKGBUILD similarity index 63% rename from libxdmcp/static/PKGBUILD rename to libxdmcp/static-compat/PKGBUILD index df6f33bd..701e4de8 100644 --- a/libxdmcp/static/PKGBUILD +++ b/libxdmcp/static-compat/PKGBUILD @@ -1,16 +1,16 @@ -# Maintainer: Andreas Radke -# Maintainer: Jan de Groot +# Contributor: Andreas Radke +# Contributor: Jan de Groot _pkgname=libxdmcp -pkgname=$_pkgname-static +pkgname=static-compat-$_pkgname pkgver=1.1.3 pkgrel=3 pkgdesc="X11 Display Manager Control Protocol library" arch=('x86_64') url="https://xorg.freedesktop.org/" license=('custom') -depends=('glibc') -makedepends=('xorg-util-macros' 'xorgproto') +depends=('glibc-static-compat') +makedepends=('xorg-util-macros' 'static-compat-xorgproto' 'static-compat-configure') options=(!emptydirs staticlibs) source=(${url}/releases/individual/lib/libXdmcp-${pkgver}.tar.bz2{,.sig}) sha512sums=('cb1d4650f97d66e73acd2465ec7d757b9b797cce2f85e301860a44997a461837eea845ec9bd5b639ec5ca34c804f8bdd870697a5ce3f4e270b687c9ef74f25ec' @@ -18,15 +18,17 @@ sha512sums=('cb1d4650f97d66e73acd2465ec7d757b9b797cce2f85e301860a44997a461837eea validpgpkeys=('4A193C06D35E7C670FA4EF0BA2FB9E081F2D130E') # Alan Coopersmith build() { + source static-compat-environment cd libXdmcp-${pkgver} - ./configure --prefix=/usr/static --disable-shared --enable-static --sysconfdir=/etc + static-compat-configure --disable-shared --enable-static --sysconfdir=/etc make } package() { + source static-compat-environment cd libXdmcp-${pkgver} make DESTDIR="${pkgdir}" install - rm -r "$pkgdir"/usr/static/share/doc + rm -r "$pkgdir/$static_compat_prefix"/share/doc install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}" install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/" diff --git a/libxext/static/PKGBUILD b/libxext/static-compat/PKGBUILD similarity index 73% rename from libxext/static/PKGBUILD rename to libxext/static-compat/PKGBUILD index 5b70ff16..1bf12875 100644 --- a/libxext/static/PKGBUILD +++ b/libxext/static-compat/PKGBUILD @@ -2,15 +2,15 @@ # Contributor: Jan de Groot _pkgname=libxext -pkgname=$_pkgname-static +pkgname=static-compat-$_pkgname pkgver=1.3.4 pkgrel=3 pkgdesc="X11 miscellaneous extensions library" arch=('x86_64') url="https://xorg.freedesktop.org/" license=('custom') -depends=('libx11-static') -makedepends=('xorg-util-macros' 'xorgproto') +depends=('static-compat-libx11') +makedepends=('xorg-util-macros' 'static-compat-xorgproto' 'static-compat-configure') options=(!emptydirs staticlibs) source=(${url}/releases/individual/lib/libXext-${pkgver}.tar.bz2{,.sig}) sha512sums=('09146397d95f80c04701be1cc0a9c580ab5a085842ac31d17dfb6d4c2e42b4253b89cba695e54444e520be359883a76ffd02f42484c9e2ba2c33a5a40c29df4a' @@ -19,16 +19,17 @@ validpgpkeys=('3C2C43D9447D5938EF4551EBE23B7E70B467F0BF') # "Peter Hutterer (Who validpgpkeys+=('4A193C06D35E7C670FA4EF0BA2FB9E081F2D130E') # Alan Coopersmith build() { + source static-compat-environment cd libXext-${pkgver} - export PKG_CONFIG_PATH=/usr/static/lib/pkgconfig:/usr/lib/pkgconfig - ./configure --prefix=/usr/static --sysconfdir=/etc --disable-shared --enable-static + static-compat-configure --sysconfdir=/etc --disable-shared --enable-static make } package() { + source static-compat-environment cd libXext-${pkgver} make DESTDIR="${pkgdir}" install - rm -r "$pkgdir"/usr/static/share/{doc,man} + rm -r "$pkgdir/$static_compat_prefix"/share/{doc,man} install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}" install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/" diff --git a/libxfixes/static-compat/PKGBUILD b/libxfixes/static-compat/PKGBUILD new file mode 100644 index 00000000..848f8696 --- /dev/null +++ b/libxfixes/static-compat/PKGBUILD @@ -0,0 +1,37 @@ +# Contributor: Andreas Radke +# Contributor: Jan de Groot + +_pkgname=libxfixes +pkgname=static-compat-$_pkgname +pkgver=6.0.0 +pkgrel=1 +pkgdesc="X11 miscellaneous 'fixes' extension library" +arch=('x86_64') +url="https://xorg.freedesktop.org/" +license=('custom') +depends=('static-compat-libx11') +makedepends=('static-compat-xorgproto' 'static-compat-configure') +options=(staticlibs !emptydirs) +source=(${url}/releases/individual/lib/libXfixes-${pkgver}.tar.bz2{,.sig}) +sha512sums=('1985ef156f382e9a7e1cc7e044e0f626de1e4c82557a511cbcf6431994c0ac25b1f8b3a0293bd3089331593db8ce01d3a71ddec68f19b5fe6029d5082fb6885d' + 'SKIP') + +validpgpkeys=('C41C985FDCF1E5364576638B687393EE37D128F8') # Matthieu Herrb +validpgpkeys+=('3C2C43D9447D5938EF4551EBE23B7E70B467F0BF') # Peter Hutterer (Who-T) + +build() { + source static-compat-environment + cd "libXfixes-${pkgver}" + static-compat-configure --disable-shared --enable-static + make +} + +package() { + source static-compat-environment + cd "libXfixes-${pkgver}" + make DESTDIR="${pkgdir}" install + rm -r "$pkgdir/$static_compat_prefix"/share/man + + install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}" + install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/" +} diff --git a/libxkbcommon/static/PKGBUILD b/libxkbcommon/static-compat/PKGBUILD similarity index 69% rename from libxkbcommon/static/PKGBUILD rename to libxkbcommon/static-compat/PKGBUILD index 380d46d2..c6735a32 100644 --- a/libxkbcommon/static/PKGBUILD +++ b/libxkbcommon/static-compat/PKGBUILD @@ -3,16 +3,15 @@ # Contributor: Mladen Pejakovic _pkgname=libxkbcommon -pkgname=$_pkgname-static -pkgver=1.0.3 +pkgname=static-compat-$_pkgname +pkgver=1.4.0 pkgrel=1 pkgdesc="Keymap handling library for toolkits and window systems" url="https://xkbcommon.org/" arch=(x86_64) license=(custom) -depends=(libxcb-static xkeyboard-config libxml2-static wayland-static libxml2-static) -makedepends=(xkeyboard-config libxml2 libxcb wayland wayland-protocols doxygen - git meson) +depends=(static-compat-libxcb xkeyboard-config static-compat-libxml2 static-compat-wayland) +makedepends=(xkeyboard-config wayland-protocols doxygen git static-compat-meson) checkdepends=(xorg-server-xvfb libgl) options=(!emptydirs !docs staticlibs) _commit=c60b77ea512bef92e481be38972b58dd71a34180 # tags/xkbcommon-1.0.3^0 @@ -29,22 +28,24 @@ prepare() { } build() { - export PKG_CONFIG_PATH=/usr/static/lib/pkgconfig:/usr/lib/pkgconfig + source static-compat-environment + export PKG_CONFIG_PATH=$static_compat_prefix/lib/pkgconfig:/usr/share/pkgconfig export PATH=$PWD:$PATH printf '#!/usr/bin/bash\nexec /usr/bin/pkg-config --static "$@"\n' > pkg-config chmod +x pkg-config - arch-meson $_pkgname build \ - --prefix /usr/static \ - --default-library static \ + static-compat-meson $_pkgname build \ -Denable-docs=false meson compile -C build } check() { + source static-compat-environment xvfb-run -s '-nolisten local' meson test -C build --print-errorlogs } package() { + source static-compat-environment DESTDIR="$pkgdir" meson install -C build + rm -r "$pkgdir/$static_compat_prefix"/share install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 $_pkgname/LICENSE } diff --git a/libxml2/static-compat/PKGBUILD b/libxml2/static-compat/PKGBUILD new file mode 100644 index 00000000..fdf8e3b3 --- /dev/null +++ b/libxml2/static-compat/PKGBUILD @@ -0,0 +1,78 @@ +# Contributor: Levente Polyak +# Contributor: Jan de Groot +# Contributor: Tom Gundersen +# Contributor: John Proctor + +_pkgname=libxml2 +pkgname=static-compat-$_pkgname +pkgver=2.9.13 +pkgrel=8 +pkgdesc='XML parsing library, version 2' +url='http://www.xmlsoft.org/' +arch=(x86_64) +license=(MIT) +depends=(static-compat-zlib static-compat-xz) +makedepends=(git) +options=(!emptydirs staticlibs) +_commit=41a34e1f4ffae2ce401600dbb5fe43f8fe402641 # tags/v2.9.10^0 +source=("git+https://gitlab.gnome.org/GNOME/libxml2.git#commit=$_commit" + libxml2-2.9.8-python3-unicode-errors.patch + no-fuzz.diff + https://www.w3.org/XML/Test/xmlts20130923.tar.gz) +sha256sums=('SKIP' + '37eb81a8ec6929eed1514e891bff2dd05b450bcf0c712153880c485b7366c17c' + '3fc010d8c42b93e6d6f1fca6b598a561e9d2c8780ff3ca0c76a31efabaea404f' + '9b61db9f5dbffa545f4b8d78422167083a8568c59bd1129f94138f936cf6fc1f') + +pkgver() { + cd libxml2 + git describe --tags | sed 's/-rc/rc/;s/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' +} + +prepare() { + source static-compat-environment + cd libxml2 + + mkdir build + + # Use xmlconf from conformance test suite + ln -s xmlconf build/xmlconf + + # https://src.fedoraproject.org/rpms/libxml2/tree/rawhide + git apply -3 ../libxml2-2.9.8-python3-unicode-errors.patch + + # Do not run fuzzing tests + git apply -3 ../no-fuzz.diff + + autoreconf -fiv +} + +build() ( + source static-compat-environment + cd libxml2/build + + static-compat-configure \ + --disable-shared \ + --enable-static \ + --with-threads \ + --without-history \ + --without-icu \ + --without-docbook \ + --without-html + sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0 /g' libtool + make +) + +#check() { +# source static-compat-environment +# make -C libxml2/build check +#} + +package() { + source static-compat-environment + make -C libxml2/build DESTDIR="$pkgdir" install + rm -r "$pkgdir/$static_compat_prefix"/{bin,share/man,share/doc,share/gtk-doc} + install -Dm 644 libxml2/COPYING -t "$pkgdir/usr/share/licenses/$pkgname" +} + +# vim: ts=2 sw=2 et: diff --git a/libxml2/static/libxml2-2.9.8-python3-unicode-errors.patch b/libxml2/static-compat/libxml2-2.9.8-python3-unicode-errors.patch similarity index 100% rename from libxml2/static/libxml2-2.9.8-python3-unicode-errors.patch rename to libxml2/static-compat/libxml2-2.9.8-python3-unicode-errors.patch diff --git a/libxml2/static-compat/no-fuzz.diff b/libxml2/static-compat/no-fuzz.diff new file mode 100644 index 00000000..67ab6cc0 --- /dev/null +++ b/libxml2/static-compat/no-fuzz.diff @@ -0,0 +1,24 @@ +diff --git i/Makefile.am w/Makefile.am +index 7917b595..f0f4b695 100644 +--- i/Makefile.am ++++ w/Makefile.am +@@ -2,9 +2,9 @@ + + ACLOCAL_AMFLAGS = -I m4 + +-SUBDIRS = include . doc example fuzz xstc $(PYTHON_SUBDIR) ++SUBDIRS = include . doc example xstc $(PYTHON_SUBDIR) + +-DIST_SUBDIRS = include . doc example fuzz python xstc ++DIST_SUBDIRS = include . doc example python xstc + + AM_CPPFLAGS = -I$(top_builddir)/include -I$(srcdir)/include + +@@ -210,7 +210,6 @@ runtests: runtest$(EXEEXT) testrecurse$(EXEEXT) testapi$(EXEEXT) \ + $(CHECKER) ./runxmlconf$(EXEEXT) + @(if [ "$(PYTHON_SUBDIR)" != "" ] ; then cd python ; \ + $(MAKE) tests ; fi) +- @cd fuzz; $(MAKE) tests + + check: all runtests + diff --git a/libxml2/static/PKGBUILD b/libxml2/static/PKGBUILD deleted file mode 100644 index b56310aa..00000000 --- a/libxml2/static/PKGBUILD +++ /dev/null @@ -1,89 +0,0 @@ -# Contributor: Levente Polyak -# Contributor: Jan de Groot -# Contributor: Tom Gundersen -# Contributor: John Proctor - -_pkgname=libxml2 -pkgname=$_pkgname-static -pkgver=2.9.10 -pkgrel=8 -pkgdesc='XML parsing library, version 2' -url='http://www.xmlsoft.org/' -arch=(x86_64) -license=(MIT) -depends=(zlib xz-static) -makedepends=(git) -options=(!emptydirs staticlibs) -_commit=41a34e1f4ffae2ce401600dbb5fe43f8fe402641 # tags/v2.9.10^0 -source=("git+https://gitlab.gnome.org/GNOME/libxml2.git#commit=$_commit" - libxml2-2.9.8-python3-unicode-errors.patch - fix-relaxed-approach-to-nested-documents.patch - libxml2-2.9.10-CVE-2019-20388.patch - libxml2-2.9.10-CVE-2020-7595.patch - libxml2-2.9.10-parenthesize-type-checks.patch - libxml2-2.9.10-CVE-2020-24977.patch - libxml2-2.9.10-fix-integer-overflow.patch - libxml2-2.9.10-icu68.patch - https://www.w3.org/XML/Test/xmlts20130923.tar.gz) -sha256sums=('SKIP' - '37eb81a8ec6929eed1514e891bff2dd05b450bcf0c712153880c485b7366c17c' - '50f04807b86a179d051fb86755e82f55ba7aac9d0c005eefea93d2599a911d01' - 'cfe1b3e0f026df6f979dbd77c1dcd1268e60acf3d7a8ff3f480b4e67bfcc19d6' - 'c6105ff40d7b1b140fcd821b5d64ab8c7b596708071c26964727e7352b07ac7e' - 'b63c161e4c8a6f0a65ba091c3d3ed09d3110d21f997ee61077c782b311fd4b33' - '62eafffc2b4949489c261c63883d27c2e83d688f1d4c899000b283e4c2a682be' - 'fd227780ad5699bebca7ef412d2d50fb1d21a54f6e3fdcad0bda5bdc8f8b2525' - 'f02a435761f26ff664041d49f9d05924dc627bf103c7f542feee891f69aa84a2' - '9b61db9f5dbffa545f4b8d78422167083a8568c59bd1129f94138f936cf6fc1f') - -pkgver() { - cd "$_pkgname" - git describe --always --tags | sed 's/-rc/rc/;s/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' -} - -prepare() { - cd "$_pkgname" - - # From https://src.fedoraproject.org/rpms/libxml2/tree/master - patch -Np1 -i ../libxml2-2.9.8-python3-unicode-errors.patch - patch -Np1 -i ../fix-relaxed-approach-to-nested-documents.patch - patch -Np1 -i ../libxml2-2.9.10-CVE-2019-20388.patch - patch -Np1 -i ../libxml2-2.9.10-CVE-2020-7595.patch - patch -Np1 -i ../libxml2-2.9.10-parenthesize-type-checks.patch - patch -Np1 -i ../libxml2-2.9.10-CVE-2020-24977.patch - patch -Np1 -i ../libxml2-2.9.10-fix-integer-overflow.patch - - patch -Np1 -i ../libxml2-2.9.10-icu68.patch - - NOCONFIGURE=1 ./autogen.sh -} - -build() ( - cd "$_pkgname" - export PKG_CONFIG_PATH=/usr/static/lib/pkgconfig:/usr/lib/pkgconfig - ./configure \ - --prefix=/usr/static \ - --disable-shared \ - --enable-static \ - --with-threads \ - --without-history \ - --without-icu \ - --without-docbook \ - --without-html - sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0 /g' libtool - make -) - -#check() { -# cd "$_pkgname" -# make check -#} - -package() { - cd "$_pkgname" - make DESTDIR="$pkgdir" install - rm -r "$pkgdir"/usr/static/{bin,share/man,share/doc,share/gtk-doc} - install -Dm 644 COPYING -t "$pkgdir/usr/share/licenses/$pkgname" -} - -# vim: ts=2 sw=2 et: diff --git a/libxml2/static/fix-relaxed-approach-to-nested-documents.patch b/libxml2/static/fix-relaxed-approach-to-nested-documents.patch deleted file mode 100644 index 0a636362..00000000 --- a/libxml2/static/fix-relaxed-approach-to-nested-documents.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 0815302dee2b78139832c2080348086a0564836b Mon Sep 17 00:00:00 2001 -From: Nick Wellnhofer -Date: Fri, 6 Dec 2019 12:27:29 +0100 -Subject: [PATCH] Fix freeing of nested documents - -Apparently, some libxslt RVTs can contain nested document nodes, see -issue #132. I'm not sure how this happens exactly but it can cause a -segfault in xmlFreeNodeList after the changes in commit 0762c9b6. - -Make sure not to touch the (nonexistent) `content` member of xmlDocs. ---- - tree.c | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/tree.c b/tree.c -index 070670f1..0d7fc98c 100644 ---- a/tree.c -+++ b/tree.c -@@ -3708,6 +3708,11 @@ xmlFreeNodeList(xmlNodePtr cur) { - (cur->type != XML_XINCLUDE_START) && - (cur->type != XML_XINCLUDE_END) && - (cur->type != XML_ENTITY_REF_NODE) && -+ (cur->type != XML_DOCUMENT_NODE) && -+#ifdef LIBXML_DOCB_ENABLED -+ (cur->type != XML_DOCB_DOCUMENT_NODE) && -+#endif -+ (cur->type != XML_HTML_DOCUMENT_NODE) && - (cur->content != (xmlChar *) &(cur->properties))) { - DICT_FREE(cur->content) - } --- -2.22.0 - diff --git a/libxml2/static/libxml2-2.9.10-CVE-2019-20388.patch b/libxml2/static/libxml2-2.9.10-CVE-2019-20388.patch deleted file mode 100644 index 3763354b..00000000 --- a/libxml2/static/libxml2-2.9.10-CVE-2019-20388.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 6088a74bcf7d0c42e24cff4594d804e1d3c9fbca Mon Sep 17 00:00:00 2001 -From: Zhipeng Xie -Date: Tue, 20 Aug 2019 16:33:06 +0800 -Subject: [PATCH] Fix memory leak in xmlSchemaValidateStream - -When ctxt->schema is NULL, xmlSchemaSAXPlug->xmlSchemaPreRun -alloc a new schema for ctxt->schema and set vctxt->xsiAssemble -to 1. Then xmlSchemaVStart->xmlSchemaPreRun initialize -vctxt->xsiAssemble to 0 again which cause the alloced schema -can not be freed anymore. - -Found with libFuzzer. - -Signed-off-by: Zhipeng Xie ---- - xmlschemas.c | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/xmlschemas.c b/xmlschemas.c -index 301c8449..39d92182 100644 ---- a/xmlschemas.c -+++ b/xmlschemas.c -@@ -28090,7 +28090,6 @@ xmlSchemaPreRun(xmlSchemaValidCtxtPtr vctxt) { - vctxt->nberrors = 0; - vctxt->depth = -1; - vctxt->skipDepth = -1; -- vctxt->xsiAssemble = 0; - vctxt->hasKeyrefs = 0; - #ifdef ENABLE_IDC_NODE_TABLES_TEST - vctxt->createIDCNodeTables = 1; --- -2.24.1 - diff --git a/libxml2/static/libxml2-2.9.10-CVE-2020-24977.patch b/libxml2/static/libxml2-2.9.10-CVE-2020-24977.patch deleted file mode 100644 index 67ef0aca..00000000 --- a/libxml2/static/libxml2-2.9.10-CVE-2020-24977.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 50f06b3efb638efb0abd95dc62dca05ae67882c2 Mon Sep 17 00:00:00 2001 -From: Nick Wellnhofer -Date: Fri, 7 Aug 2020 21:54:27 +0200 -Subject: [PATCH] Fix out-of-bounds read with 'xmllint --htmlout' - -Make sure that truncated UTF-8 sequences don't cause an out-of-bounds -array access. - -Thanks to @SuhwanSong and the Agency for Defense Development (ADD) for -the report. - -Fixes #178. ---- - xmllint.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/xmllint.c b/xmllint.c -index f6a8e463..c647486f 100644 ---- a/xmllint.c -+++ b/xmllint.c -@@ -528,6 +528,12 @@ static void - xmlHTMLEncodeSend(void) { - char *result; - -+ /* -+ * xmlEncodeEntitiesReentrant assumes valid UTF-8, but the buffer might -+ * end with a truncated UTF-8 sequence. This is a hack to at least avoid -+ * an out-of-bounds read. -+ */ -+ memset(&buffer[sizeof(buffer)-4], 0, 4); - result = (char *) xmlEncodeEntitiesReentrant(NULL, BAD_CAST buffer); - if (result) { - xmlGenericError(xmlGenericErrorContext, "%s", result); --- -2.28.0.rc2 - diff --git a/libxml2/static/libxml2-2.9.10-CVE-2020-7595.patch b/libxml2/static/libxml2-2.9.10-CVE-2020-7595.patch deleted file mode 100644 index 3dd67749..00000000 --- a/libxml2/static/libxml2-2.9.10-CVE-2020-7595.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 0e1a49c8907645d2e155f0d89d4d9895ac5112b5 Mon Sep 17 00:00:00 2001 -From: Zhipeng Xie -Date: Thu, 12 Dec 2019 17:30:55 +0800 -Subject: [PATCH] Fix infinite loop in xmlStringLenDecodeEntities - -When ctxt->instate == XML_PARSER_EOF,xmlParseStringEntityRef -return NULL which cause a infinite loop in xmlStringLenDecodeEntities - -Found with libFuzzer. - -Signed-off-by: Zhipeng Xie ---- - parser.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/parser.c b/parser.c -index d1c31963..a34bb6cd 100644 ---- a/parser.c -+++ b/parser.c -@@ -2646,7 +2646,8 @@ xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len, - else - c = 0; - while ((c != 0) && (c != end) && /* non input consuming loop */ -- (c != end2) && (c != end3)) { -+ (c != end2) && (c != end3) && -+ (ctxt->instate != XML_PARSER_EOF)) { - - if (c == 0) break; - if ((c == '&') && (str[1] == '#')) { --- -2.24.1 - diff --git a/libxml2/static/libxml2-2.9.10-fix-integer-overflow.patch b/libxml2/static/libxml2-2.9.10-fix-integer-overflow.patch deleted file mode 100644 index b5a7bec1..00000000 --- a/libxml2/static/libxml2-2.9.10-fix-integer-overflow.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 8e7c20a1af8776677d7890f30b7a180567701a49 Mon Sep 17 00:00:00 2001 -From: Nick Wellnhofer -Date: Mon, 3 Aug 2020 17:30:41 +0200 -Subject: [PATCH] Fix integer overflow when comparing schema dates - -Found by OSS-Fuzz. ---- - xmlschemastypes.c | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/xmlschemastypes.c b/xmlschemastypes.c -index 4249d700..d6b9f924 100644 ---- a/xmlschemastypes.c -+++ b/xmlschemastypes.c -@@ -3691,6 +3691,8 @@ xmlSchemaCompareDurations(xmlSchemaValPtr x, xmlSchemaValPtr y) - minday = 0; - maxday = 0; - } else { -+ if (myear > LONG_MAX / 366) -+ return -2; - /* FIXME: This doesn't take leap year exceptions every 100/400 years - into account. */ - maxday = 365 * myear + (myear + 3) / 4; -@@ -4079,6 +4081,14 @@ xmlSchemaCompareDates (xmlSchemaValPtr x, xmlSchemaValPtr y) - if ((x == NULL) || (y == NULL)) - return -2; - -+ if ((x->value.date.year > LONG_MAX / 366) || -+ (x->value.date.year < LONG_MIN / 366) || -+ (y->value.date.year > LONG_MAX / 366) || -+ (y->value.date.year < LONG_MIN / 366)) { -+ /* Possible overflow when converting to days. */ -+ return -2; -+ } -+ - if (x->value.date.tz_flag) { - - if (!y->value.date.tz_flag) { --- -2.28.0.rc2 - diff --git a/libxml2/static/libxml2-2.9.10-icu68.patch b/libxml2/static/libxml2-2.9.10-icu68.patch deleted file mode 100644 index fc11cceb..00000000 --- a/libxml2/static/libxml2-2.9.10-icu68.patch +++ /dev/null @@ -1,28 +0,0 @@ -From b516ed189eb440e909f36baca1557b98e4d9ffd7 Mon Sep 17 00:00:00 2001 -From: Frederik Seiffert -Date: Thu, 12 Nov 2020 12:53:43 +0100 -Subject: [PATCH] Fix building with ICU 68. - -ICU 68 no longer defines the TRUE macro. - -Closes #204. ---- - encoding.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/encoding.c b/encoding.c -index c34aca44..264f60bb 100644 ---- a/encoding.c -+++ b/encoding.c -@@ -2004,7 +2004,7 @@ xmlEncOutputChunk(xmlCharEncodingHandler *handler, unsigned char *out, - #ifdef LIBXML_ICU_ENABLED - else if (handler->uconv_out != NULL) { - ret = xmlUconvWrapper(handler->uconv_out, 0, out, outlen, in, inlen, -- TRUE); -+ 1); - } - #endif /* LIBXML_ICU_ENABLED */ - else { --- -GitLab - diff --git a/libxml2/static/libxml2-2.9.10-parenthesize-type-checks.patch b/libxml2/static/libxml2-2.9.10-parenthesize-type-checks.patch deleted file mode 100644 index 14f5332f..00000000 --- a/libxml2/static/libxml2-2.9.10-parenthesize-type-checks.patch +++ /dev/null @@ -1,92 +0,0 @@ -From edc7b6abb0c125eeb888748c334897f60aab0854 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= -Date: Fri, 28 Feb 2020 12:48:14 +0100 -Subject: [PATCH] Parenthesize Py_Check() in ifs - -In C, if expressions should be parenthesized. -PyLong_Check, PyUnicode_Check etc. happened to expand to a parenthesized -expression before, but that's not API to rely on. - -Since Python 3.9.0a4 it needs to be parenthesized explicitly. - -Fixes https://gitlab.gnome.org/GNOME/libxml2/issues/149 ---- - python/libxml.c | 4 ++-- - python/types.c | 12 ++++++------ - 2 files changed, 8 insertions(+), 8 deletions(-) - -diff --git a/python/libxml.c b/python/libxml.c -index bc676c4e..81e709f3 100644 ---- a/python/libxml.c -+++ b/python/libxml.c -@@ -294,7 +294,7 @@ xmlPythonFileReadRaw (void * context, char * buffer, int len) { - lenread = PyBytes_Size(ret); - data = PyBytes_AsString(ret); - #ifdef PyUnicode_Check -- } else if PyUnicode_Check (ret) { -+ } else if (PyUnicode_Check (ret)) { - #if PY_VERSION_HEX >= 0x03030000 - Py_ssize_t size; - const char *tmp; -@@ -359,7 +359,7 @@ xmlPythonFileRead (void * context, char * buffer, int len) { - lenread = PyBytes_Size(ret); - data = PyBytes_AsString(ret); - #ifdef PyUnicode_Check -- } else if PyUnicode_Check (ret) { -+ } else if (PyUnicode_Check (ret)) { - #if PY_VERSION_HEX >= 0x03030000 - Py_ssize_t size; - const char *tmp; -diff --git a/python/types.c b/python/types.c -index c2bafeb1..ed284ec7 100644 ---- a/python/types.c -+++ b/python/types.c -@@ -602,16 +602,16 @@ libxml_xmlXPathObjectPtrConvert(PyObject *obj) - if (obj == NULL) { - return (NULL); - } -- if PyFloat_Check (obj) { -+ if (PyFloat_Check (obj)) { - ret = xmlXPathNewFloat((double) PyFloat_AS_DOUBLE(obj)); -- } else if PyLong_Check(obj) { -+ } else if (PyLong_Check(obj)) { - #ifdef PyLong_AS_LONG - ret = xmlXPathNewFloat((double) PyLong_AS_LONG(obj)); - #else - ret = xmlXPathNewFloat((double) PyInt_AS_LONG(obj)); - #endif - #ifdef PyBool_Check -- } else if PyBool_Check (obj) { -+ } else if (PyBool_Check (obj)) { - - if (obj == Py_True) { - ret = xmlXPathNewBoolean(1); -@@ -620,14 +620,14 @@ libxml_xmlXPathObjectPtrConvert(PyObject *obj) - ret = xmlXPathNewBoolean(0); - } - #endif -- } else if PyBytes_Check (obj) { -+ } else if (PyBytes_Check (obj)) { - xmlChar *str; - - str = xmlStrndup((const xmlChar *) PyBytes_AS_STRING(obj), - PyBytes_GET_SIZE(obj)); - ret = xmlXPathWrapString(str); - #ifdef PyUnicode_Check -- } else if PyUnicode_Check (obj) { -+ } else if (PyUnicode_Check (obj)) { - #if PY_VERSION_HEX >= 0x03030000 - xmlChar *str; - const char *tmp; -@@ -650,7 +650,7 @@ libxml_xmlXPathObjectPtrConvert(PyObject *obj) - ret = xmlXPathWrapString(str); - #endif - #endif -- } else if PyList_Check (obj) { -+ } else if (PyList_Check (obj)) { - int i; - PyObject *node; - xmlNodePtr cur; --- -2.24.1 - diff --git a/libxmu/static-compat/PKGBUILD b/libxmu/static-compat/PKGBUILD new file mode 100644 index 00000000..7c3657c4 --- /dev/null +++ b/libxmu/static-compat/PKGBUILD @@ -0,0 +1,32 @@ +# Contributor: Jan de Groot + +_pkgname=libxmu +pkgname=static-compat-$_pkgname +pkgver=1.1.3 +pkgrel=2 +pkgdesc="X11 miscellaneous micro-utility library" +arch=('x86_64') +url="https://xorg.freedesktop.org/" +depends=('static-compat-libxext' 'static-compat-libxt') +makedepends=('static-compat-configure' 'static-compat-xorgproto') +options=(staticlibs !emptydirs) +license=('custom') +source=("${url}/releases/individual/lib/libXmu-${pkgver}.tar.bz2") +sha512sums=('8c6cc65b22aa031ad870dd92736681a068a0878a425a53dbed909943da1136c4a24034d467cfd3785c3a8d78f66850b69f1ebe1eb24aaf9bc176b1d171a5c762') + +build() { + source static-compat-environment + cd libXmu-${pkgver} + static-compat-configure --disable-shared --enable-static + make +} + +package() { + source static-compat-environment + cd libXmu-${pkgver} + make DESTDIR="${pkgdir}" install + rm -r "$pkgdir/$static_compat_prefix"/share/doc + + install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}" + install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/" +} diff --git a/libxt/static-compat/PKGBUILD b/libxt/static-compat/PKGBUILD new file mode 100644 index 00000000..263fccdc --- /dev/null +++ b/libxt/static-compat/PKGBUILD @@ -0,0 +1,37 @@ +# Contributor: AndyRTR +# Contributor: Jan de Groot + +_pkgname=libxt +pkgname=static-compat-$_pkgname +pkgver=1.2.1 +pkgrel=1 +pkgdesc="X11 toolkit intrinsics library" +arch=('x86_64') +url="https://xorg.freedesktop.org/" +license=('custom') +depends=('static-compat-libsm' 'static-compat-libx11') +makedepends=('static-compat-configure' 'static-compat-xorgproto') +options=(staticlibs !emptydirs) +source=(${url}/releases/individual/lib/libXt-${pkgver}.tar.bz2{,.sig}) +sha512sums=('6877af61ba91eeed6b6f80471b84f354ad0ec0827249c7ee0a00c13508063fe8d2696dd400a4bdbc6ca2ff67cbe1317ad5ac24522fd96099dc56535e33ca052c' + 'SKIP') +validpgpkeys=('4A193C06D35E7C670FA4EF0BA2FB9E081F2D130E') #Alan Coopersmith +validpgpkeys+=('C52048C0C0748FEE227D47A2702353E0F7E48EDB') # "Thomas Dickey " +validpgpkeys+=('3BB639E56F861FA2E86505690FDD682D974CA72A') #"Matt Turner " + +build() { + source static-compat-environment + cd libXt-${pkgver} + static-compat-configure --disable-shared --enable-static + make +} + +package() { + source static-compat-environment + cd libXt-${pkgver} + make DESTDIR="${pkgdir}" install + rm -r "$pkgdir/$static_compat_prefix"/share/{man,doc} + + install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}" + install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/" +} diff --git a/libxxf86vm/static-compat/PKGBUILD b/libxxf86vm/static-compat/PKGBUILD new file mode 100644 index 00000000..662f67ea --- /dev/null +++ b/libxxf86vm/static-compat/PKGBUILD @@ -0,0 +1,35 @@ +# Contributor: AndyRTR +# Contributor: Jan de Groot + +_pkgname=libxxf86vm +pkgname=static-compat-$_pkgname +pkgver=1.1.4 +pkgrel=4 +pkgdesc="X11 XFree86 video mode extension library" +arch=('x86_64') +license=('custom') +url="https://xorg.freedesktop.org/" +depends=('static-compat-libxext') +makedepends=('static-compat-configure' 'static-compat-xorgproto') +options=(staticlibs !emptydirs) +source=(${url}/releases/individual/lib/libXxf86vm-${pkgver}.tar.bz2{,.sig}) +sha512sums=('c5f92d86e143db02ebb36bcd25618acaa2cb2831f5a23800a06dd431cd73b6702d95de8fe7407ce626336bf614c288d5256f4d87ea7781fad2ab6c517cbf09e0' + 'SKIP') +validpgpkeys=('4A193C06D35E7C670FA4EF0BA2FB9E081F2D130E') # Alan Coopersmith + +build() { + source static-compat-environment + cd libXxf86vm-${pkgver} + static-compat-configure --disable-shared --enable-static + make +} + +package() +{ + source static-compat-environment + cd libXxf86vm-${pkgver} + make DESTDIR="${pkgdir}" install + rm -r "$pkgdir/$static_compat_prefix"/share/man + + install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING" +} diff --git a/linux-api-headers/static-compat/PKGBUILD b/linux-api-headers/static-compat/PKGBUILD new file mode 100644 index 00000000..65f5dfc5 --- /dev/null +++ b/linux-api-headers/static-compat/PKGBUILD @@ -0,0 +1,35 @@ +# Maintainer: Giancarlo Razzolini +# Maintainer: Frederik Schwan +# Contributor: Bartłomiej Piotrowski +# Contributor: Allan McRae + +# toolchain build order: linux-api-headers->glibc->binutils->gcc->glibc->binutils->gcc + +pkgname=linux-api-headers-static-compat +pkgver=5.16.8 +pkgrel=1 +pkgdesc='Kernel headers sanitized for use in userspace' +arch=(any) +url='https://www.gnu.org/software/libc' +license=(GPL2) +makedepends=(rsync) +source=(https://www.kernel.org/pub/linux/kernel/v${pkgver:0:1}.x/linux-${pkgver}.tar.{xz,sign}) +sha256sums=('52aa5f05ee8addcc1ec0020f50e5f88ea1a308c2afac4a2305e1e4cf42580316' + 'SKIP') +validpgpkeys=('ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds + '647F28654894E3BD457199BE38DBBDC86092693E') # Greg Kroah-Hartman + +build() { + cd linux-$pkgver + + make mrproper + make headers_check +} + +package() { + cd linux-$pkgver + make INSTALL_HDR_PATH="$pkgdir/usr/static-compat" headers_install + + # use headers from libdrm + rm -r "$pkgdir/usr/static-compat/include/drm" +} diff --git a/lz4/static-compat/PKGBUILD b/lz4/static-compat/PKGBUILD new file mode 100644 index 00000000..92982f74 --- /dev/null +++ b/lz4/static-compat/PKGBUILD @@ -0,0 +1,50 @@ +# Contributor: Sébastien Luttringer + +_pkgname=lz4 +pkgname=static-compat-$_pkgname +epoch=1 +pkgver=1.9.3 +pkgrel=1 +pkgdesc='Extremely fast compression algorithm' +arch=('x86_64') +url='http://www.lz4.org/' +license=('GPL2') +makedepends=('git' 'static-compat-environment') +depends=('glibc-static-compat') +options=(!emptydirs staticlibs) +source=("git+https://github.com/lz4/lz4.git#tag=v$pkgver" + 'https://github.com/lz4/lz4/commit/8301a21773ef61656225e264f4f06ae14462bca7.patch') +sha256sums=('SKIP' + 'c99da650a79a42db4db23e72146701cce9106383ba45709c5ac89022e36dcfb2') + +prepare() { + cd $_pkgname + # apply patch from the source array (should be a pacman feature) + local src + for src in "${source[@]}"; do + src="${src%%::*}" + src="${src##*/}" + [[ $src = *.patch ]] || continue + msg2 "Applying patch $src..." + patch -Np1 < "../$src" + done +} + +build() { + source static-compat-environment + # do not use the main makefile, it calls sub make with -e + # exported CLFAGS by makepkg break the version. see FS#50071 + cd $_pkgname + make -C lib PREFIX="$static_compat_prefix" +} + +package() { + source static-compat-environment + cd $_pkgname + make install PREFIX="$static_compat_prefix" DESTDIR="$pkgdir" + rm -r "$pkgdir/$static_compat_prefix"/bin + rm -r "$pkgdir/$static_compat_prefix"/share/man + find "$pkgdir" -iname '*.so*' -delete +} + +# vim:set ts=2 sw=2 et: diff --git a/lz4/static/PKGBUILD b/lz4/static/PKGBUILD deleted file mode 100644 index afc6fd1a..00000000 --- a/lz4/static/PKGBUILD +++ /dev/null @@ -1,33 +0,0 @@ -# Contributor: Sébastien Luttringer - -_pkgname=lz4 -pkgname=$_pkgname-static -epoch=1 -pkgver=1.9.3 -pkgrel=1 -pkgdesc='Extremely fast compression algorithm' -arch=('x86_64') -url='http://www.lz4.org/' -license=('GPL2') -makedepends=('git') -depends=('glibc') -options=(!emptydirs staticlibs) -source=("git+https://github.com/lz4/lz4.git#tag=v$pkgver") -md5sums=('SKIP') - -build() { - # do not use the main makefile, it calls sub make with -e - # exported CLFAGS by makepkg break the version. see FS#50071 - cd $_pkgname - make -C lib PREFIX=/usr/static -} - -package() { - cd $_pkgname - make install PREFIX=/usr/static DESTDIR="$pkgdir" - rm -r "$pkgdir"/usr/static/bin - rm -r "$pkgdir"/usr/static/share/man - find "$pkgdir" -iname '*.so*' -delete -} - -# vim:set ts=2 sw=2 et: diff --git a/md4c/static-compat/PKGBUILD b/md4c/static-compat/PKGBUILD new file mode 100644 index 00000000..1504209d --- /dev/null +++ b/md4c/static-compat/PKGBUILD @@ -0,0 +1,29 @@ +# Contributor: Antonio Rojas + +_pkgname=md4c +pkgname=static-compat-$_pkgname +pkgver=0.4.8 +pkgrel=1 +pkgdesc='C Markdown parser' +arch=(x86_64) +url='https://github.com/mity/md4c' +license=(MIT) +depends=(glibc-static-compat) +makedepends=(static-compat-cmake) +options=(staticlibs !emptydirs) +source=($_pkgname-$pkgver.tar.gz::"https://github.com/mity/md4c/archive/release-$pkgver.tar.gz") +sha256sums=('4a457df853425b6bb6e3457aa1d1a13bccec587a04c38c622b1013a0da41439f') + +build() { + source static-compat-environment + static-compat-cmake -B build -S $_pkgname-release-$pkgver + cmake --build build +} + +package() { + source static-compat-environment + DESTDIR="$pkgdir" cmake --install build + rm -r "$pkgdir/$static_compat_prefix"/share/man + + install -Dm644 $_pkgname-release-$pkgver/LICENSE.md -t "$pkgdir"/usr/share/licenses/$pkgname/ +} diff --git a/meson/static-compat/PKGBUILD b/meson/static-compat/PKGBUILD new file mode 100644 index 00000000..7209f0ce --- /dev/null +++ b/meson/static-compat/PKGBUILD @@ -0,0 +1,16 @@ +pkgname=static-compat-meson +pkgver=1 +pkgrel=1 +arch=('any') +pkgdesc="Meson wrapper to use gcc-static-compat" +depends=('meson' 'static-compat-environment') +license=('GPL') +url="https://github.com/Martchus/PKGBUILDs" +source=("meson-static-compat-wrapper") +sha256sums=('SKIP') + +package() { + source static-compat-environment + install -d "${pkgdir}"/usr/bin + install -m 755 "${srcdir}/meson-static-compat-wrapper" "$pkgdir"/usr/bin/$pkgname +} diff --git a/meson/static-compat/meson-static-compat-wrapper b/meson/static-compat/meson-static-compat-wrapper new file mode 100644 index 00000000..6612190c --- /dev/null +++ b/meson/static-compat/meson-static-compat-wrapper @@ -0,0 +1,22 @@ +#!/bin/sh + +source static-compat-environment +meson setup \ + --prefix "$static_compat_prefix" \ + --libdir "$static_compat_prefix"/lib \ + --libexecdir "$static_compat_prefix"/lib \ + --bindir "$static_compat_prefix"/bin \ + --sbindir "$static_compat_prefix"/bin \ + --includedir "$static_compat_prefix"/include \ + --datadir "$static_compat_prefix"/share \ + --mandir "$static_compat_prefix"/share/man \ + --infodir "$static_compat_prefix"/share/info \ + --localedir "$static_compat_prefix"/share/locale \ + --sysconfdir "$static_compat_prefix"/etc \ + --localstatedir "$static_compat_prefix"/var \ + --sharedstatedir "$static_compat_prefix"/var/lib \ + --buildtype release \ + --wrap-mode nofallback \ + --strip \ + --default-library static \ + "$@" diff --git a/mtdev/static-compat/PKGBUILD b/mtdev/static-compat/PKGBUILD new file mode 100644 index 00000000..008539e2 --- /dev/null +++ b/mtdev/static-compat/PKGBUILD @@ -0,0 +1,39 @@ +# Contributor: AndyRTR +# Contributor: SpepS + +_pkgname=mtdev +pkgname=static-compat-$_pkgname +pkgver=1.1.6 +pkgrel=1 +pkgdesc="A stand-alone library which transforms all variants of kernel MT events to the slotted type B protocol" +arch=('x86_64') +url="https://bitmath.org/code/mtdev/" +license=('custom:MIT') +depends=('glibc-static-compat') +makedepends=('static-compat-configure') +options=(staticlibs) +source=("$url$_pkgname-$pkgver.tar.bz2") +sha512sums=('859fb0803f330ecaae69f80713ff5a5235c0cb00de6d5ac2717ad82cea856a92b866f0c272ecfe743186abcf925f95585149ba4828b4c91555cfeb2f2a1c98f1') + +build() { + source static-compat-environment + cd "$_pkgname-$pkgver" + static-compat-configure --disable-shared --enable-static + make +} + +check() { + source static-compat-environment + cd "$_pkgname-$pkgver" + make -k check +} + +package() { + source static-compat-environment + cd "$_pkgname-$pkgver" + make DESTDIR="$pkgdir/" install + + # license + install -Dm644 COPYING \ + "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} diff --git a/ncurses/static-compat/PKGBUILD b/ncurses/static-compat/PKGBUILD new file mode 100644 index 00000000..5511ccc2 --- /dev/null +++ b/ncurses/static-compat/PKGBUILD @@ -0,0 +1,62 @@ +# Contributor: David Runge +# Contributor: Bartłomiej Piotrowski +# Contributor: Allan McRae +# Contributor: judd + +_pkgname=ncurses +pkgname=static-compat-$_pkgname +pkgver=6.3 +pkgrel=2 +pkgdesc='System V Release 4.0 curses emulation library' +arch=(x86_64) +url='https://invisible-island.net/ncurses/ncurses.html' +license=(MIT) +depends=(glibc gcc-libs-static-compat) +makedepends=(autoconf-archive static-compat-configure) +options=(staticlibs) +source=( + "https://invisible-mirror.net/archives/${_pkgname}/${_pkgname}-${pkgver}.tar.gz"{,.asc} + "${_pkgname}-6.3-libs.patch" + "${_pkgname}-6.3-pkgconfig.patch" +) +sha512sums=('5373f228cba6b7869210384a607a2d7faecfcbfef6dbfcd7c513f4e84fbd8bcad53ac7db2e7e84b95582248c1039dcfc7c4db205a618f7da22a166db482f0105' + 'SKIP' + 'adb02b838c40f1e58a1b31c26d5cd0f2a1c43f3b6d68e839981764c0f6c905a9eb51dd36ff018628fdeb20747cc7467727d57135408ab4848259384077a52b28' + '2d2c0ec3c880e638ab4aa3dbff5e28e4cd233153e24816bd87e077f848aa3edd5114cd0f2a7f6e8869dd1861a2746e512886c18264ff1676927dcc320c5ef958') +b2sums=('b2c174ac48d587b4d3aa054f04e4ec8bffd8a657a4aff5f090104965c741901e600712c8f8e5e98f3b8a26bc558996a1e14a746f113854832853b855e9d406c3' + 'SKIP' + '31bb10e82dd018a75e57252052650d9f0f5eb5e7e887118c2ea40032b11f59ec6aa4d9bae804c615cbecdf3382f3434e0c9e9e8440fdefe66a507be020b8965c' + 'fb6cf606cf3db7f6b306272696a63bce83d52cfa91e850f9a7bdb9d3d8455a26943529a9cf79731dddc7f763c27211a9afab9c4c31dbb6d12fd720eb390eb0a3') +validpgpkeys=('19882D92DDA4C400C22C0D56CC2AF4472167BE03') # Thomas Dickey + +prepare() { + cd $_pkgname-$pkgver + # do not link against test libraries + patch -Np1 -i ../"${_pkgname}-6.3-libs.patch" + # do not leak build-time LDFLAGS into the pkgconfig files: + # https://bugs.archlinux.org/task/68523 + patch -Np1 -i ../"${_pkgname}-6.3-pkgconfig.patch" + # NOTE: can't run autoreconf because the autotools setup is custom and ancient +} + +build() { + source static-compat-environment + cd $_pkgname-$pkgver + + static-compat-configure \ + --enable-widec \ + --enable-pc-files \ + --with-cxx-binding \ + --with-versioned-syms \ + --without-ada + make +} + +package() { + source static-compat-environment + make DESTDIR="$pkgdir" install -C $_pkgname-$pkgver + mv "$pkgdir/$static_compat_prefix/lib/pkgconfig:$static_compat_prefix/share/pkgconfig" "$pkgdir/$static_compat_prefix/lib/pkgconfig" + rm -r "$pkgdir/$static_compat_prefix/lib/pkgconfig:" + rm -r "$pkgdir/$static_compat_prefix/share/man" + install -vDm 644 $_pkgname-$pkgver/COPYING -t "$pkgdir/usr/share/licenses/$pkgname/" +} diff --git a/ncurses/static-compat/ncurses-6.3-libs.patch b/ncurses/static-compat/ncurses-6.3-libs.patch new file mode 100644 index 00000000..1933a541 --- /dev/null +++ b/ncurses/static-compat/ncurses-6.3-libs.patch @@ -0,0 +1,58 @@ +diff -ruN a/c++/Makefile.in b/c++/Makefile.in +--- a/c++/Makefile.in 2021-07-03 20:53:57.000000000 +0200 ++++ b/c++/Makefile.in 2021-11-03 10:58:04.147647447 +0100 +@@ -118,7 +118,7 @@ + -l@FORM_NAME@@USE_LIB_SUFFIX@ \ + -l@MENU_NAME@@USE_LIB_SUFFIX@ \ + -l@PANEL_NAME@@USE_LIB_SUFFIX@ \ +- -lncurses@USE_LIB_SUFFIX@ @SHLIB_LIST@ ++ -lncurses@USE_LIB_SUFFIX@ + + LIBROOT = ncurses++ + +@@ -157,8 +157,7 @@ + LDFLAGS_DEFAULT = $(LINK_@DFT_UPR_MODEL@) $(LDFLAGS_@DFT_UPR_MODEL@) + + # flags for library built by this makefile +-LDFLAGS = $(TEST_ARGS) @LDFLAGS@ \ +- @LD_MODEL@ $(TEST_LIBS) @LIBS@ $(CXXLIBS) ++LDFLAGS = @LDFLAGS@ @LD_MODEL@ @LIBS@ $(CXXLIBS) + + AUTO_SRC = \ + etip.h +diff -ruN a/form/Makefile.in b/form/Makefile.in +--- a/form/Makefile.in 2021-07-03 17:45:33.000000000 +0200 ++++ b/form/Makefile.in 2021-11-03 10:58:45.301114373 +0100 +@@ -110,7 +110,7 @@ + LDFLAGS = @LDFLAGS@ @LD_MODEL@ @LIBS@ + + SHLIB_DIRS = -L../lib +-SHLIB_LIST = $(SHLIB_DIRS) -lncurses@USE_LIB_SUFFIX@ @SHLIB_LIST@ ++SHLIB_LIST = $(SHLIB_DIRS) -lncurses@USE_LIB_SUFFIX@ + + RPATH_LIST = @RPATH_LIST@ + RESULTING_SYMS = @RESULTING_SYMS@ +diff -ruN a/menu/Makefile.in b/menu/Makefile.in +--- a/menu/Makefile.in 2021-07-03 17:45:33.000000000 +0200 ++++ b/menu/Makefile.in 2021-11-03 10:58:59.461160284 +0100 +@@ -110,7 +110,7 @@ + LDFLAGS = @LDFLAGS@ @LD_MODEL@ @LIBS@ + + SHLIB_DIRS = -L../lib +-SHLIB_LIST = $(SHLIB_DIRS) -lncurses@USE_LIB_SUFFIX@ @SHLIB_LIST@ ++SHLIB_LIST = $(SHLIB_DIRS) -lncurses@USE_LIB_SUFFIX@ + + RPATH_LIST = @RPATH_LIST@ + RESULTING_SYMS = @RESULTING_SYMS@ +diff -ruN a/panel/Makefile.in b/panel/Makefile.in +--- a/panel/Makefile.in 2021-07-03 17:45:33.000000000 +0200 ++++ b/panel/Makefile.in 2021-11-03 10:59:33.957938691 +0100 +@@ -112,7 +112,7 @@ + LDFLAGS = @LDFLAGS@ @LD_MODEL@ @LIBS@ + + SHLIB_DIRS = -L../lib +-SHLIB_LIST = $(SHLIB_DIRS) -lncurses@USE_LIB_SUFFIX@ @SHLIB_LIST@ ++SHLIB_LIST = $(SHLIB_DIRS) -lncurses@USE_LIB_SUFFIX@ + + RPATH_LIST = @RPATH_LIST@ + RESULTING_SYMS = @RESULTING_SYMS@ diff --git a/ncurses/static-compat/ncurses-6.3-pkgconfig.patch b/ncurses/static-compat/ncurses-6.3-pkgconfig.patch new file mode 100644 index 00000000..e3b5d465 --- /dev/null +++ b/ncurses/static-compat/ncurses-6.3-pkgconfig.patch @@ -0,0 +1,24 @@ +diff -ruN a/misc/gen-pkgconfig.in b/misc/gen-pkgconfig.in +--- a/misc/gen-pkgconfig.in 2021-08-07 23:36:33.000000000 +0200 ++++ b/misc/gen-pkgconfig.in 2021-11-03 11:12:51.127160950 +0100 +@@ -83,7 +83,7 @@ + fi + + lib_flags= +-for opt in -L$libdir @EXTRA_PKG_LDFLAGS@ @LIBS@ ++for opt in -L$libdir @LIBS@ + do + case $opt in + -l*) # LIBS is handled specially below +diff -ruN a/misc/ncurses-config.in b/misc/ncurses-config.in +--- a/misc/ncurses-config.in 2021-08-07 23:36:14.000000000 +0200 ++++ b/misc/ncurses-config.in 2021-11-03 11:26:12.393533954 +0100 +@@ -101,7 +101,7 @@ + # There is no portable way to find the list of standard library directories. + # Require a POSIX shell anyway, to keep this simple. + lib_flags= +-for opt in -L$libdir @EXTRA_PKG_LDFLAGS@ $LIBS ++for opt in -L$libdir $LIBS + do + case $opt in + -specs*) # ignore linker specs-files which were used to build library diff --git a/openssl/static/PKGBUILD b/openssl/static-compat/PKGBUILD similarity index 72% rename from openssl/static/PKGBUILD rename to openssl/static-compat/PKGBUILD index 30f8c18a..bd3283c4 100644 --- a/openssl/static/PKGBUILD +++ b/openssl/static-compat/PKGBUILD @@ -1,8 +1,8 @@ # Contributor: Pierre Schmitz _pkgname=openssl -pkgname=$_pkgname-static -_ver=1.1.1i +pkgname=static-compat-$_pkgname +_ver=1.1.1n # use a pacman compatible version scheme pkgver=${_ver/[a-z]/.${_ver//[0-9.]/}} pkgrel=2 @@ -10,15 +10,15 @@ pkgdesc='The Open Source toolkit for Secure Sockets Layer and Transport Layer Se arch=('x86_64') url='https://www.openssl.org' license=('custom:BSD') -depends=('glibc') -makedepends=('perl') +depends=('glibc-static-compat') +makedepends=('perl' 'static-compat-environment') optdepends=('ca-certificates') options=(!emptydirs staticlibs) source=("https://www.openssl.org/source/${_pkgname}-${_ver}.tar.gz"{,.asc} 'ca-dir.patch') -sha256sums=('e8be6a35fe41d10603c3cc635e93289ed00bf34b79671a3a4de64fcee00d5242' - 'SKIP' - '75aa8c2c638c8a3ebfd9fa146fc61c7ff878fc997dc6aa10d39e4b2415d669b2') +sha256sums=('40dceb51a4f6a5275bde0e6bf20ef4b91bfc32ed57c0552e2e8e15463372b17a' + 'SKIP' + '75aa8c2c638c8a3ebfd9fa146fc61c7ff878fc997dc6aa10d39e4b2415d669b2') validpgpkeys=('8657ABB260F056B1E5190839D9C4D26D0E604491' '7953AC1FBC3DC8B3B292393ED5E9E43F7DF9EE8C') @@ -30,10 +30,11 @@ prepare() { } build() { + source static-compat-environment cd "$srcdir/$_pkgname-$_ver" # mark stack as non-executable: http://bugs.archlinux.org/task/12434 - ./Configure --prefix=/usr/static --openssldir=/etc/ssl --libdir=lib \ + ./Configure --prefix="$static_compat_prefix" --openssldir=/etc/ssl --libdir=lib \ no-shared no-ssl3-method enable-ec_nistp_64_gcc_128 linux-x86_64 \ "-Wa,--noexecstack ${CPPFLAGS} ${CFLAGS} ${LDFLAGS}" @@ -42,6 +43,7 @@ build() { } check() { + source static-compat-environment cd "$srcdir/$_pkgname-$_ver" # the test fails due to missing write permissions in /etc/ssl @@ -56,10 +58,11 @@ check() { } package() { + source static-compat-environment cd "$srcdir/$_pkgname-$_ver" make DESTDIR="$pkgdir" install_sw - rm -r "$pkgdir"/usr/static/bin + rm -r "$pkgdir/$static_compat_prefix"/bin install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" } diff --git a/openssl/static/ca-dir.patch b/openssl/static-compat/ca-dir.patch similarity index 100% rename from openssl/static/ca-dir.patch rename to openssl/static-compat/ca-dir.patch diff --git a/pcre/static/PKGBUILD b/pcre/static-compat/PKGBUILD similarity index 75% rename from pcre/static/PKGBUILD rename to pcre/static-compat/PKGBUILD index 57817789..24380568 100644 --- a/pcre/static/PKGBUILD +++ b/pcre/static-compat/PKGBUILD @@ -4,18 +4,19 @@ # Contributor: John Proctor _pkgname=pcre -pkgname=$_pkgname-static -pkgver=8.44 +pkgname=static-compat-$_pkgname +pkgver=8.45 pkgrel=1 pkgdesc='A library that implements Perl 5-style regular expressions' arch=('x86_64') url='https://www.pcre.org/' license=('BSD') -depends=('gcc-libs') +depends=('gcc-libs-static-compat') +makedepends=('static-compat-configure') options=(!emptydirs staticlibs) validpgpkeys=('45F68D54BBE23FB3039B46E59766E084FB0F43D8') # Philip Hazel source=("https://ftp.pcre.org/pub/pcre/$_pkgname-$pkgver.tar.bz2"{,.sig}) -sha512sums=('f26d850aab5228799e58ac8c2306fb313889332c39e29b118ef1de57677c5c90f970d68d3f475cabc64f8b982a77f04eca990ff1057f3ccf5e19bd137997c4ac' +sha512sums=('91bff52eed4a2dfc3f3bfdc9c672b88e7e2ffcf3c4b121540af8a4ae8c1ce05178430aa6b8000658b9bb7b4252239357250890e20ceb84b79cdfcde05154061a' 'SKIP') prepare() { @@ -32,9 +33,9 @@ prepare() { } build() { + source static-compat-environment cd $_pkgname-$pkgver - ./configure \ - --prefix=/usr/static \ + static-compat-configure \ --disable-shared \ --enable-static \ --enable-unicode-properties \ @@ -48,14 +49,16 @@ build() { } check() { + source static-compat-environment cd $_pkgname-$pkgver make -j1 check } package() { + source static-compat-environment cd $_pkgname-$pkgver make DESTDIR="$pkgdir" install - rm -r "$pkgdir"/usr/static/share/{doc,man} + rm -r "$pkgdir/$static_compat_prefix"/share/{doc,man} install -Dm644 LICENCE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" } diff --git a/pcre2/static/PKGBUILD b/pcre2/static-compat/PKGBUILD similarity index 82% rename from pcre2/static/PKGBUILD rename to pcre2/static-compat/PKGBUILD index 38c13417..f2cd61b9 100644 --- a/pcre2/static/PKGBUILD +++ b/pcre2/static-compat/PKGBUILD @@ -6,14 +6,15 @@ # Contributor: John Proctor _pkgname=pcre2 -pkgname=$_pkgname-static +pkgname=static-compat-$_pkgname pkgver=10.39 pkgrel=1 pkgdesc='A library that implements Perl 5-style regular expressions. 2nd version' arch=('x86_64') url='https://www.pcre.org/' license=('BSD') -depends=('gcc-libs') +depends=('gcc-libs-static-compat') +makedepends=('static-compat-configure') options=(!emptydirs staticlibs) source=("https://github.com/PhilipHazel/${_pkgname}/releases/download/${_pkgname}-$pkgver/${_pkgname}-$pkgver.tar.bz2"{,.sig}) sha512sums=('b3d898198f4b5ffc3453d2ba56fe2a7298c01c52e5f67d45f1e046fc0dee62e16a4024fcb65839ac9c367beedb531647affd6f8599fbeb102f19423c150d80d4' @@ -21,9 +22,9 @@ sha512sums=('b3d898198f4b5ffc3453d2ba56fe2a7298c01c52e5f67d45f1e046fc0dee62e16a4 validpgpkeys=('45F68D54BBE23FB3039B46E59766E084FB0F43D8') # Philip Hazel build() { + source static-compat-environment cd $_pkgname-$pkgver - ./configure \ - --prefix=/usr/static \ + static-compat-configure \ --disable-shared \ --enable-static \ --enable-pcre2-16 \ @@ -36,14 +37,16 @@ build() { } check() { + source static-compat-environment cd $_pkgname-$pkgver make -j1 check } package() { + source static-compat-environment cd $_pkgname-$pkgver make DESTDIR="$pkgdir" install - rm -r "$pkgdir"/usr/static/share/{doc,man} + rm -r "$pkgdir/$static_compat_prefix"/share/{doc,man} install -Dm644 LICENCE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" } diff --git a/qt6-5compat/static-compat/PKGBUILD b/qt6-5compat/static-compat/PKGBUILD new file mode 100644 index 00000000..46abca5d --- /dev/null +++ b/qt6-5compat/static-compat/PKGBUILD @@ -0,0 +1,49 @@ +# Maintainer: Martchus + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +pkgname=static-compat-qt6-5compat +_qtver=6.3.0 +pkgver=${_qtver/-/} +pkgrel=1 +arch=(x86_64) +url='https://www.qt.io' +license=(GPL3 LGPL3 FDL custom) +pkgdesc='Module that contains unsupported Qt 5 APIs' +depends=(static-compat-qt6-base) +optdepends=('static-compat-qt6-declarative: for QtGraphicalEffects') +makedepends=(static-compat-cmake static-compat-qt6-declarative ninja) +options=('!strip' '!buildflags' 'staticlibs' '!emptydirs') +_pkgfqn="qt5compat-everywhere-src-${_qtver}" +source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${_qtver}/submodules/${_pkgfqn}.tar.xz") +sha256sums=('114a7f5f69c53449c545a03262b55c223cf32f276188e7bead4dfa2f3672c1c0') + +build() { + check_buildoption ccache y && ccache_args=' + -DCMAKE_C_COMPILER_LAUNCHER=ccache + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache' + source static-compat-environment + export PATH=$PWD:$PATH + printf '#!/usr/bin/bash\nexec /usr/bin/pkg-config --static "$@"\n' > pkg-config + chmod +x pkg-config + static-compat-cmake -G Ninja -B build -S $_pkgfqn \ + $ccache_args \ + -DCMAKE_SKIP_INSTALL_RPATH=ON \ + -DGLIB2_USE_PKG_CONFIG=ON \ + -DQT_FEATURE_static_runtime=ON \ + -DFEATURE_pkg_config=ON + VERBOSE=1 cmake --build build +} + +package() { + source static-compat-environment + DESTDIR="$pkgdir" cmake --install build + + # Drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "$pkgdir/$static_compat_prefix/lib" -type f -name '*.prl' \ + -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; + + install -d "$pkgdir"/usr/share/licenses + ln -s /usr/share/licenses/static-compat-qt6-base "$pkgdir"/usr/share/licenses/$pkgname +} diff --git a/qt6-5compat/static-compat/PKGBUILD.sh.ep b/qt6-5compat/static-compat/PKGBUILD.sh.ep new file mode 100644 index 00000000..01b823a6 --- /dev/null +++ b/qt6-5compat/static-compat/PKGBUILD.sh.ep @@ -0,0 +1,12 @@ +% layout 'static-compat-qt6-module'; +\ +_qtver=6.3.0 +pkgver=${_qtver/-/} +pkgrel=1 +arch=(x86_64) +url='https://www.qt.io' +license=(GPL3 LGPL3 FDL custom) +pkgdesc='Module that contains unsupported Qt 5 APIs' +depends=(<%== qt6deps qw(base) %>) +optdepends=(<%== qt6optdeps declarative => 'for QtGraphicalEffects' %>) +makedepends=(static-compat-cmake <%== qt6deps qw(declarative) %> ninja) diff --git a/qt6-5compat/static-compat/qt5compat-sha256.txt b/qt6-5compat/static-compat/qt5compat-sha256.txt new file mode 100644 index 00000000..367ef9f9 --- /dev/null +++ b/qt6-5compat/static-compat/qt5compat-sha256.txt @@ -0,0 +1 @@ +114a7f5f69c53449c545a03262b55c223cf32f276188e7bead4dfa2f3672c1c0 diff --git a/qt6-base/android-aarch64/0009-Find-fontconfig-via-pkg-config-for-correct-handling-.patch b/qt6-base/android-aarch64/0009-Find-fontconfig-via-pkg-config-for-correct-handling-.patch new file mode 120000 index 00000000..bde9d513 --- /dev/null +++ b/qt6-base/android-aarch64/0009-Find-fontconfig-via-pkg-config-for-correct-handling-.patch @@ -0,0 +1 @@ +../mingw-w64/0009-Find-fontconfig-via-pkg-config-for-correct-handling-.patch \ No newline at end of file diff --git a/qt6-base/android-aarch64/0010-Fix-dependency-of-xcb-image-on-xcb-util.patch b/qt6-base/android-aarch64/0010-Fix-dependency-of-xcb-image-on-xcb-util.patch new file mode 120000 index 00000000..76768246 --- /dev/null +++ b/qt6-base/android-aarch64/0010-Fix-dependency-of-xcb-image-on-xcb-util.patch @@ -0,0 +1 @@ +../mingw-w64/0010-Fix-dependency-of-xcb-image-on-xcb-util.patch \ No newline at end of file diff --git a/qt6-base/android-aarch64/0011-Allow-using-properties-of-PkgConfig-targets-for-glib.patch b/qt6-base/android-aarch64/0011-Allow-using-properties-of-PkgConfig-targets-for-glib.patch new file mode 120000 index 00000000..2dcbc4f8 --- /dev/null +++ b/qt6-base/android-aarch64/0011-Allow-using-properties-of-PkgConfig-targets-for-glib.patch @@ -0,0 +1 @@ +../mingw-w64/0011-Allow-using-properties-of-PkgConfig-targets-for-glib.patch \ No newline at end of file diff --git a/qt6-base/android-aarch64/PKGBUILD b/qt6-base/android-aarch64/PKGBUILD index 090993ed..e30dce04 100644 --- a/qt6-base/android-aarch64/PKGBUILD +++ b/qt6-base/android-aarch64/PKGBUILD @@ -35,16 +35,20 @@ source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${_qtver}/subm '0005-Fix-libjpeg-workaround-for-conflict-with-rpcndr.h.patch' '0006-Support-finding-static-MariaDB-client-library.patch' '0007-Allow-overriding-CMAKE_FIND_LIBRARY_SUFFIXES-to-pref.patch' - '0008-Fix-crashes-in-rasterization-code-using-setjmp.patch') + '0008-Fix-crashes-in-rasterization-code-using-setjmp.patch' + '0009-Find-fontconfig-via-pkg-config-for-correct-handling-.patch' + '0010-Fix-dependency-of-xcb-image-on-xcb-util.patch') sha256sums=('b865aae43357f792b3b0a162899d9bf6a1393a55c4e5e4ede5316b157b1a0f99' - 'bff8b8af7b4eec0961890190bc1d31d98c2270985698a8071b5ee1434a12f13a' - 'bdc4834c7c88176113770356e24104040622c30779a770da3292e487d0b451c8' - '08647a0b4f3beef39a2308cea4ed7b63887e58ef7b8f53294ba8d136eaf32109' - 'e1f619607afca17031c3eebdc01a95a7de4296b8ce01b15c9797475a4e7918f1' - '1994ab8f69ac4146c9332aff1bbaacecb87fcfc1d2c521ddfa0f6fd7e3b1aa63' - 'e9170a6b158b500e34913b0ee78641bf95fcfb5f84d27934a8a7c08b7a45e345' - '45a0bf8e485d0c21e916c8260ebbf4a1869d9902f4d749a41804535f05ef54b4' - 'a018bb72f3424c30c04f1f72429d891dd6b615566c98642d55a9a72e6110fd76') + '51385552296c9619edb47092db5923b13e8c52a2b2bbd94c6d723cb507548e90' + 'd6ec35f546d1fc62e918915a4eeb499dfdcb7247d94d0f0e3a9cdd1fa8f47f79' + '93d7bfe745df2052e5ac03b8120146df4b9aa0ce5ac48ebfdea9f8f12328cc6d' + '0a55d56e8b9bd8872f318b63e93c72c093e723c4de2c812f1190de84eeed19a7' + 'a8aa5645301e691b3f8fc2cdd98904824398059bdd8702ecfc4713d407ef2f3f' + 'ae7694ac78749a7359b20eabc61ddaae680e7dce0b7c1ed14b87af7ebef3c358' + 'c209e6ada57740385a800837df5c68d808c64f2071225bec415a9cb1f67f9858' + '0b021f6518a0191f960ace699adea2a6869e426859e8b3bb5bb6b60efced5692' + '1dab76d9f9f7307266cd1d5cc7ed6a854a6b715cb962126f80f575282110b819' + '66d3d03686594ae49087e46db40f2d3b9d996e33e6094e9ef7571b2f1aababc1') prepare () { cd $_pkgfqn diff --git a/qt6-base/default/qt6-base-cflags.patch b/qt6-base/default/qt6-base-cflags.patch new file mode 100644 index 00000000..33250161 --- /dev/null +++ b/qt6-base/default/qt6-base-cflags.patch @@ -0,0 +1,46 @@ +diff --git a/mkspecs/common/g++-unix.conf b/mkspecs/common/g++-unix.conf +index a493cd5984..41342f5020 100644 +--- a/mkspecs/common/g++-unix.conf ++++ b/mkspecs/common/g++-unix.conf +@@ -10,5 +10,6 @@ + + include(g++-base.conf) + +-QMAKE_LFLAGS_RELEASE += -Wl,-O1 ++SYSTEM_LDFLAGS = $$(LDFLAGS) ++!isEmpty(SYSTEM_LDFLAGS) { eval(QMAKE_LFLAGS_RELEASE += $$(LDFLAGS)) } else { QMAKE_LFLAGS_RELEASE += -Wl,-O1 } + QMAKE_LFLAGS_NOUNDEF += -Wl,--no-undefined +diff --git a/mkspecs/common/gcc-base.conf b/mkspecs/common/gcc-base.conf +index 1f919d270a..7ef6046326 100644 +--- a/mkspecs/common/gcc-base.conf ++++ b/mkspecs/common/gcc-base.conf +@@ -40,9 +40,11 @@ QMAKE_CFLAGS_OPTIMIZE_SIZE = -Os + QMAKE_CFLAGS_DEPS += -M + QMAKE_CFLAGS_WARN_ON += -Wall -Wextra + QMAKE_CFLAGS_WARN_OFF += -w +-QMAKE_CFLAGS_RELEASE += $$QMAKE_CFLAGS_OPTIMIZE +-QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_OPTIMIZE -g +-QMAKE_CFLAGS_DEBUG += -g ++SYSTEM_CFLAGS = $$(CFLAGS) ++SYSTEM_DEBUG_CFLAGS = $$(DEBUG_CFLAGS) ++!isEmpty(SYSTEM_CFLAGS) { eval(QMAKE_CFLAGS_RELEASE += $$(CFLAGS)) } else { QMAKE_CFLAGS_RELEASE += $$QMAKE_CFLAGS_OPTIMIZE } ++!isEmpty(SYSTEM_CFLAGS) { eval(QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -g $$(CFLAGS)) } else { QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_OPTIMIZE -g } ++!isEmpty(SYSTEM_DEBUG_CFLAGS) { eval(QMAKE_CFLAGS_DEBUG += $$(DEBUG_CFLAGS)) } else { QMAKE_CFLAGS_DEBUG += -g } + QMAKE_CFLAGS_SHLIB += $$QMAKE_CFLAGS_PIC + QMAKE_CFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_PIC + QMAKE_CFLAGS_APP += $$QMAKE_CFLAGS_PIC +@@ -59,9 +61,11 @@ QMAKE_CXXFLAGS += $$QMAKE_CFLAGS + QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS + QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON + QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF +-QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE +-QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO +-QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG ++SYSTEM_CXXFLAGS = $$(CXXFLAGS) ++SYSTEM_DEBUG_CXXFLAGS = $$(DEBUG_CXXFLAGS) ++!isEmpty(SYSTEM_CXXFLAGS) { eval(QMAKE_CXXFLAGS_RELEASE += $$(CXXFLAGS)) } else { QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_OPTIMIZE } ++!isEmpty(SYSTEM_CXXFLAGS) { eval(QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += -g $$(CXXFLAGS)) } else { QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_OPTIMIZE -g } ++!isEmpty(SYSTEM_DEBUG_CXXFLAGS) { eval(QMAKE_CXXFLAGS_DEBUG += $$(DEBUG_CXXFLAGS)) } else { QMAKE_CXXFLAGS_DEBUG += -g } + QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB + QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB + QMAKE_CXXFLAGS_APP += $$QMAKE_CFLAGS_APP diff --git a/qt6-base/default/qt6-base-nostrip.patch b/qt6-base/default/qt6-base-nostrip.patch new file mode 100644 index 00000000..17d24b4b --- /dev/null +++ b/qt6-base/default/qt6-base-nostrip.patch @@ -0,0 +1,13 @@ +diff --git a/mkspecs/common/gcc-base.conf b/mkspecs/common/gcc-base.conf +index 99d77156fd..fc840fe9f6 100644 +--- a/mkspecs/common/gcc-base.conf ++++ b/mkspecs/common/gcc-base.conf +@@ -31,6 +31,8 @@ + # you can use the manual test in tests/manual/mkspecs. + # + ++CONFIG += nostrip ++ + QMAKE_CFLAGS_OPTIMIZE = -O2 + QMAKE_CFLAGS_OPTIMIZE_FULL = -O3 + QMAKE_CFLAGS_OPTIMIZE_DEBUG = -Og diff --git a/qt6-base/mingw-w64-static/0009-Find-fontconfig-via-pkg-config-for-correct-handling-.patch b/qt6-base/mingw-w64-static/0009-Find-fontconfig-via-pkg-config-for-correct-handling-.patch new file mode 120000 index 00000000..bde9d513 --- /dev/null +++ b/qt6-base/mingw-w64-static/0009-Find-fontconfig-via-pkg-config-for-correct-handling-.patch @@ -0,0 +1 @@ +../mingw-w64/0009-Find-fontconfig-via-pkg-config-for-correct-handling-.patch \ No newline at end of file diff --git a/qt6-base/mingw-w64-static/0010-Fix-dependency-of-xcb-image-on-xcb-util.patch b/qt6-base/mingw-w64-static/0010-Fix-dependency-of-xcb-image-on-xcb-util.patch new file mode 120000 index 00000000..76768246 --- /dev/null +++ b/qt6-base/mingw-w64-static/0010-Fix-dependency-of-xcb-image-on-xcb-util.patch @@ -0,0 +1 @@ +../mingw-w64/0010-Fix-dependency-of-xcb-image-on-xcb-util.patch \ No newline at end of file diff --git a/qt6-base/mingw-w64-static/0011-Allow-using-properties-of-PkgConfig-targets-for-glib.patch b/qt6-base/mingw-w64-static/0011-Allow-using-properties-of-PkgConfig-targets-for-glib.patch new file mode 120000 index 00000000..2dcbc4f8 --- /dev/null +++ b/qt6-base/mingw-w64-static/0011-Allow-using-properties-of-PkgConfig-targets-for-glib.patch @@ -0,0 +1 @@ +../mingw-w64/0011-Allow-using-properties-of-PkgConfig-targets-for-glib.patch \ No newline at end of file diff --git a/qt6-base/mingw-w64-static/PKGBUILD b/qt6-base/mingw-w64-static/PKGBUILD index 92d39241..58d17b42 100644 --- a/qt6-base/mingw-w64-static/PKGBUILD +++ b/qt6-base/mingw-w64-static/PKGBUILD @@ -38,16 +38,20 @@ source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${_qtver}/subm '0005-Fix-libjpeg-workaround-for-conflict-with-rpcndr.h.patch' '0006-Support-finding-static-MariaDB-client-library.patch' '0007-Allow-overriding-CMAKE_FIND_LIBRARY_SUFFIXES-to-pref.patch' - '0008-Fix-crashes-in-rasterization-code-using-setjmp.patch') + '0008-Fix-crashes-in-rasterization-code-using-setjmp.patch' + '0009-Find-fontconfig-via-pkg-config-for-correct-handling-.patch' + '0010-Fix-dependency-of-xcb-image-on-xcb-util.patch') sha256sums=('b865aae43357f792b3b0a162899d9bf6a1393a55c4e5e4ede5316b157b1a0f99' - 'bff8b8af7b4eec0961890190bc1d31d98c2270985698a8071b5ee1434a12f13a' - 'bdc4834c7c88176113770356e24104040622c30779a770da3292e487d0b451c8' - '08647a0b4f3beef39a2308cea4ed7b63887e58ef7b8f53294ba8d136eaf32109' - 'e1f619607afca17031c3eebdc01a95a7de4296b8ce01b15c9797475a4e7918f1' - '1994ab8f69ac4146c9332aff1bbaacecb87fcfc1d2c521ddfa0f6fd7e3b1aa63' - 'e9170a6b158b500e34913b0ee78641bf95fcfb5f84d27934a8a7c08b7a45e345' - '45a0bf8e485d0c21e916c8260ebbf4a1869d9902f4d749a41804535f05ef54b4' - 'a018bb72f3424c30c04f1f72429d891dd6b615566c98642d55a9a72e6110fd76') + '51385552296c9619edb47092db5923b13e8c52a2b2bbd94c6d723cb507548e90' + 'd6ec35f546d1fc62e918915a4eeb499dfdcb7247d94d0f0e3a9cdd1fa8f47f79' + '93d7bfe745df2052e5ac03b8120146df4b9aa0ce5ac48ebfdea9f8f12328cc6d' + '0a55d56e8b9bd8872f318b63e93c72c093e723c4de2c812f1190de84eeed19a7' + 'a8aa5645301e691b3f8fc2cdd98904824398059bdd8702ecfc4713d407ef2f3f' + 'ae7694ac78749a7359b20eabc61ddaae680e7dce0b7c1ed14b87af7ebef3c358' + 'c209e6ada57740385a800837df5c68d808c64f2071225bec415a9cb1f67f9858' + '0b021f6518a0191f960ace699adea2a6869e426859e8b3bb5bb6b60efced5692' + '1dab76d9f9f7307266cd1d5cc7ed6a854a6b715cb962126f80f575282110b819' + '66d3d03686594ae49087e46db40f2d3b9d996e33e6094e9ef7571b2f1aababc1') _architectures='i686-w64-mingw32 x86_64-w64-mingw32' diff --git a/qt6-base/mingw-w64/0001-Use-CMake-s-default-import-library-suffix.patch b/qt6-base/mingw-w64/0001-Use-CMake-s-default-import-library-suffix.patch index 662bd92b..0d55812d 100644 --- a/qt6-base/mingw-w64/0001-Use-CMake-s-default-import-library-suffix.patch +++ b/qt6-base/mingw-w64/0001-Use-CMake-s-default-import-library-suffix.patch @@ -1,7 +1,7 @@ From 9636662a15e67ba2a1e9f1374537d3b390e9d04d Mon Sep 17 00:00:00 2001 From: Martchus Date: Thu, 5 Nov 2020 22:08:10 +0100 -Subject: [PATCH 1/8] Use CMake's default import library suffix +Subject: [PATCH 01/11] Use CMake's default import library suffix Change-Id: I3dbedaec74683e5bfd008f7f2fd1e046dfb921b2 --- @@ -110,5 +110,5 @@ index b0a5fad15f..a81297e03f 100644 get_target_property(target_type ${target} TYPE) if(target_type STREQUAL "STATIC_LIBRARY") -- -2.35.1 +2.36.0 diff --git a/qt6-base/mingw-w64/0002-Fix-finding-D-Bus.patch b/qt6-base/mingw-w64/0002-Fix-finding-D-Bus.patch index 46bda6a6..dbd861a6 100644 --- a/qt6-base/mingw-w64/0002-Fix-finding-D-Bus.patch +++ b/qt6-base/mingw-w64/0002-Fix-finding-D-Bus.patch @@ -1,7 +1,7 @@ From 0ee959c716f76b22e32bbcd74d4d3c27c45054eb Mon Sep 17 00:00:00 2001 From: Martchus Date: Wed, 7 Oct 2020 12:13:37 +0200 -Subject: [PATCH 2/8] Fix finding D-Bus +Subject: [PATCH 02/11] Fix finding D-Bus Change-Id: Ie21eb9cbc6b1b5d9c8b34eea46f54718e5926986 --- @@ -20,5 +20,5 @@ index e227d224e0..bdbcab9eb3 100644 + set_property(TARGET dbus-1 PROPERTY IMPORTED_IMPLIB ${DBus1_LIBRARY}) +endif() -- -2.35.1 +2.36.0 diff --git a/qt6-base/mingw-w64/0003-Fix-using-static-PCRE2-and-DBus-1.patch b/qt6-base/mingw-w64/0003-Fix-using-static-PCRE2-and-DBus-1.patch index e4bbed14..8388cfb7 100644 --- a/qt6-base/mingw-w64/0003-Fix-using-static-PCRE2-and-DBus-1.patch +++ b/qt6-base/mingw-w64/0003-Fix-using-static-PCRE2-and-DBus-1.patch @@ -1,7 +1,7 @@ From c32b8866da5b01a75b61c26a288d4c1497bd197b Mon Sep 17 00:00:00 2001 From: Martchus Date: Thu, 5 Nov 2020 21:13:19 +0100 -Subject: [PATCH 3/8] Fix using static PCRE2 and DBus-1 +Subject: [PATCH 03/11] Fix using static PCRE2 and DBus-1 When making a static build of Qt we're using the static version of these libraries and must define the corresponding macros. @@ -44,5 +44,5 @@ index accaa4f5ed..4b11c74caa 100644 # include #else -- -2.35.1 +2.36.0 diff --git a/qt6-base/mingw-w64/0004-Fix-transitive-dependencies-of-static-libraries.patch b/qt6-base/mingw-w64/0004-Fix-transitive-dependencies-of-static-libraries.patch index 44ec6239..2c58e49a 100644 --- a/qt6-base/mingw-w64/0004-Fix-transitive-dependencies-of-static-libraries.patch +++ b/qt6-base/mingw-w64/0004-Fix-transitive-dependencies-of-static-libraries.patch @@ -1,7 +1,7 @@ From ffdf568ee684a97d59e4668eea92d9e3cedaed30 Mon Sep 17 00:00:00 2001 From: Martchus Date: Thu, 5 Nov 2020 21:59:33 +0100 -Subject: [PATCH 4/8] Fix transitive dependencies (of static libraries) +Subject: [PATCH 04/11] Fix transitive dependencies (of static libraries) The dependencies of these libraries are not reliably picked up by their corresponding find modules. This change allows adding the required @@ -132,5 +132,5 @@ index d3a6a8588e..743154fc50 100644 Qt::CorePrivate Qt::SqlPrivate -- -2.35.1 +2.36.0 diff --git a/qt6-base/mingw-w64/0005-Fix-libjpeg-workaround-for-conflict-with-rpcndr.h.patch b/qt6-base/mingw-w64/0005-Fix-libjpeg-workaround-for-conflict-with-rpcndr.h.patch index ce493d44..1e186da3 100644 --- a/qt6-base/mingw-w64/0005-Fix-libjpeg-workaround-for-conflict-with-rpcndr.h.patch +++ b/qt6-base/mingw-w64/0005-Fix-libjpeg-workaround-for-conflict-with-rpcndr.h.patch @@ -1,7 +1,7 @@ From dda151c4601c0f5453ffa7b80f4c77f65ae04bcd Mon Sep 17 00:00:00 2001 From: Martchus Date: Mon, 2 Nov 2020 13:47:45 +0100 -Subject: [PATCH 5/8] Fix libjpeg workaround for conflict with rpcndr.h +Subject: [PATCH 05/11] Fix libjpeg workaround for conflict with rpcndr.h Otherwise it won't compile against mingw-w64-libjpeg-turbo. This version of libjpeg seems to take care of the conflict already as long as jconfig.h is @@ -25,5 +25,5 @@ index a17afc0f69..72708145f4 100644 #ifdef const # undef const // remove crazy C hackery in jconfig.h -- -2.35.1 +2.36.0 diff --git a/qt6-base/mingw-w64/0006-Support-finding-static-MariaDB-client-library.patch b/qt6-base/mingw-w64/0006-Support-finding-static-MariaDB-client-library.patch index 109b7889..75ed133b 100644 --- a/qt6-base/mingw-w64/0006-Support-finding-static-MariaDB-client-library.patch +++ b/qt6-base/mingw-w64/0006-Support-finding-static-MariaDB-client-library.patch @@ -1,7 +1,7 @@ From d0bbc1ae7e19e0622d1015f9d773a0d5d2d891f6 Mon Sep 17 00:00:00 2001 From: Martchus Date: Sun, 8 Nov 2020 00:33:12 +0100 -Subject: [PATCH 6/8] Support finding static MariaDB client library +Subject: [PATCH 06/11] Support finding static MariaDB client library We need to reverse the order to look for mariadb first (and only then for mysql) because otherwise it would pick up the static library @@ -27,5 +27,5 @@ index 0fcba2148e..ab4f6fdc9e 100644 include(FindPackageHandleStandardArgs) -- -2.35.1 +2.36.0 diff --git a/qt6-base/mingw-w64/0007-Allow-overriding-CMAKE_FIND_LIBRARY_SUFFIXES-to-pref.patch b/qt6-base/mingw-w64/0007-Allow-overriding-CMAKE_FIND_LIBRARY_SUFFIXES-to-pref.patch index f38bf9f8..821acb1c 100644 --- a/qt6-base/mingw-w64/0007-Allow-overriding-CMAKE_FIND_LIBRARY_SUFFIXES-to-pref.patch +++ b/qt6-base/mingw-w64/0007-Allow-overriding-CMAKE_FIND_LIBRARY_SUFFIXES-to-pref.patch @@ -1,7 +1,7 @@ From f2f0f4c188747c95a80317e95c71a1c75ccc9bd3 Mon Sep 17 00:00:00 2001 From: Martchus Date: Sun, 8 Nov 2020 00:34:09 +0100 -Subject: [PATCH 7/8] Allow overriding CMAKE_FIND_LIBRARY_SUFFIXES to prefer +Subject: [PATCH 07/11] Allow overriding CMAKE_FIND_LIBRARY_SUFFIXES to prefer static libraries Change-Id: I4c617e0706044d31da1bd56ae51615dc8ed37099 @@ -25,5 +25,5 @@ index a515fcd43d..75fb3f6e9b 100644 # # Macros and functions for building Qt modules -- -2.35.1 +2.36.0 diff --git a/qt6-base/mingw-w64/0008-Fix-crashes-in-rasterization-code-using-setjmp.patch b/qt6-base/mingw-w64/0008-Fix-crashes-in-rasterization-code-using-setjmp.patch index ea99ad92..8443fea3 100644 --- a/qt6-base/mingw-w64/0008-Fix-crashes-in-rasterization-code-using-setjmp.patch +++ b/qt6-base/mingw-w64/0008-Fix-crashes-in-rasterization-code-using-setjmp.patch @@ -1,7 +1,7 @@ From 3a7e6c01e86ff8b4ffaec5a7690d680198d59f57 Mon Sep 17 00:00:00 2001 From: Martchus Date: Sat, 26 Jun 2021 22:24:12 +0200 -Subject: [PATCH 8/8] Fix crashes in rasterization code using setjmp +Subject: [PATCH 08/11] Fix crashes in rasterization code using setjmp MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -248,5 +248,5 @@ index e2326a56c1..7b30969ec8 100644 "Description": "FreeType is a freely available software library to render fonts.", "Homepage": "http://www.freetype.org", -- -2.35.1 +2.36.0 diff --git a/qt6-base/mingw-w64/0009-Find-fontconfig-via-pkg-config-for-correct-handling-.patch b/qt6-base/mingw-w64/0009-Find-fontconfig-via-pkg-config-for-correct-handling-.patch new file mode 100644 index 00000000..81e8ac95 --- /dev/null +++ b/qt6-base/mingw-w64/0009-Find-fontconfig-via-pkg-config-for-correct-handling-.patch @@ -0,0 +1,63 @@ +From f15877ee90f492397687f667127daada5e169d98 Mon Sep 17 00:00:00 2001 +From: Martchus +Date: Sun, 24 Apr 2022 23:00:27 +0200 +Subject: [PATCH 09/11] Find fontconfig via pkg-config for correct handling of + its dependencies + +CMake's own find module unforunately does not consider fontconfig's deps so +static builds will break due to expat missing on the linker-line. + +Change-Id: I331cd6b1af4f2857279c90920d777977e80fdce5 +--- + cmake/FindFontconfig.cmake | 11 +++++++++++ + src/gui/CMakeLists.txt | 2 +- + src/gui/configure.cmake | 2 +- + 3 files changed, 13 insertions(+), 2 deletions(-) + create mode 100644 cmake/FindFontconfig.cmake + +diff --git a/cmake/FindFontconfig.cmake b/cmake/FindFontconfig.cmake +new file mode 100644 +index 0000000000..1a52327ae6 +--- /dev/null ++++ b/cmake/FindFontconfig.cmake +@@ -0,0 +1,11 @@ ++find_package(PkgConfig QUIET) ++ ++if(NOT TARGET PkgConfig::Fontconfig) ++ pkg_check_modules(Fontconfig fontconfig IMPORTED_TARGET) ++ ++ if (NOT TARGET PkgConfig::Fontconfig) ++ set(Fontconfig_FOUND 0) ++ endif() ++else() ++ set(Fontconfig_FOUND 1) ++endif() +diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt +index 4c5c42abb6..62e125cba8 100644 +--- a/src/gui/CMakeLists.txt ++++ b/src/gui/CMakeLists.txt +@@ -730,7 +730,7 @@ qt_internal_extend_target(Gui CONDITION QT_FEATURE_fontconfig AND QT_FEATURE_fre + text/unix/qfontconfigdatabase.cpp text/unix/qfontconfigdatabase_p.h + text/unix/qfontenginemultifontconfig.cpp text/unix/qfontenginemultifontconfig_p.h + LIBRARIES +- Fontconfig::Fontconfig ++ PkgConfig::Fontconfig + ) + + qt_internal_extend_target(Gui CONDITION APPLE AND NOT MACOS +diff --git a/src/gui/configure.cmake b/src/gui/configure.cmake +index f59f0ab264..7f4be2da2c 100644 +--- a/src/gui/configure.cmake ++++ b/src/gui/configure.cmake +@@ -35,7 +35,7 @@ set_package_properties(WrapFreetype PROPERTIES TYPE REQUIRED) + if(QT_FEATURE_system_zlib) + qt_add_qmake_lib_dependency(freetype zlib) + endif() +-qt_find_package(Fontconfig PROVIDED_TARGETS Fontconfig::Fontconfig MODULE_NAME gui QMAKE_LIB fontconfig) ++qt_find_package(Fontconfig PROVIDED_TARGETS PkgConfig::Fontconfig MODULE_NAME gui QMAKE_LIB fontconfig) + qt_add_qmake_lib_dependency(fontconfig freetype) + qt_find_package(gbm PROVIDED_TARGETS gbm::gbm MODULE_NAME gui QMAKE_LIB gbm) + qt_find_package(WrapSystemHarfbuzz 2.6.0 PROVIDED_TARGETS WrapSystemHarfbuzz::WrapSystemHarfbuzz MODULE_NAME gui QMAKE_LIB harfbuzz) +-- +2.36.0 + diff --git a/qt6-base/mingw-w64/0010-Fix-dependency-of-xcb-image-on-xcb-util.patch b/qt6-base/mingw-w64/0010-Fix-dependency-of-xcb-image-on-xcb-util.patch new file mode 100644 index 00000000..ecabdf28 --- /dev/null +++ b/qt6-base/mingw-w64/0010-Fix-dependency-of-xcb-image-on-xcb-util.patch @@ -0,0 +1,48 @@ +From 66ccefd5a9d47ce11cb8cdcb0a507f8f2bce9a4b Mon Sep 17 00:00:00 2001 +From: Martchus +Date: Sun, 24 Apr 2022 23:49:36 +0200 +Subject: [PATCH 10/11] Fix dependency of xcb-image on xcb-util + +Considering this linker error, xcb-image apparently depends on xcb-util: +``` +/usr/bin/ld: /usr/static-compat/lib/libxcb-image.a(xcb_image.o): in function `xcb_create_pixmap_from_bitmap_data': +(.text+0x14b7): undefined reference to `xcb_aux_create_gc' +``` + +Change-Id: Ic87a94ec664c126a5af1012d31b068d3dc7ec947 +--- + cmake/3rdparty/extra-cmake-modules/find-modules/FindXCB.cmake | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/cmake/3rdparty/extra-cmake-modules/find-modules/FindXCB.cmake b/cmake/3rdparty/extra-cmake-modules/find-modules/FindXCB.cmake +index d530d2d7f4..f5298642ca 100644 +--- a/cmake/3rdparty/extra-cmake-modules/find-modules/FindXCB.cmake ++++ b/cmake/3rdparty/extra-cmake-modules/find-modules/FindXCB.cmake +@@ -108,6 +108,7 @@ set(XCB_known_components + EWMH + GLX + ICCCM ++ UTIL + IMAGE + KEYSYMS + PRESENT +@@ -117,7 +118,6 @@ set(XCB_known_components + RES + SCREENSAVER + SYNC +- UTIL + XEVIE + XF86DRI + XINERAMA +@@ -146,7 +146,7 @@ endforeach() + set(XCB_XCB_component_deps) + set(XCB_COMPOSITE_component_deps XCB XFIXES) + set(XCB_DAMAGE_component_deps XCB XFIXES) +-set(XCB_IMAGE_component_deps XCB SHM) ++set(XCB_IMAGE_component_deps XCB SHM UTIL) + set(XCB_RENDERUTIL_component_deps XCB RENDER) + set(XCB_XFIXES_component_deps XCB RENDER SHAPE) + set(XCB_XVMC_component_deps XCB XV) +-- +2.36.0 + diff --git a/qt6-base/mingw-w64/0011-Allow-using-properties-of-PkgConfig-targets-for-glib.patch b/qt6-base/mingw-w64/0011-Allow-using-properties-of-PkgConfig-targets-for-glib.patch new file mode 100644 index 00000000..342c9c94 --- /dev/null +++ b/qt6-base/mingw-w64/0011-Allow-using-properties-of-PkgConfig-targets-for-glib.patch @@ -0,0 +1,74 @@ +From 3945a806c0b87d64ef13e6fb1d72a9f82b5f95e6 Mon Sep 17 00:00:00 2001 +From: Martchus +Date: Tue, 26 Apr 2022 20:16:31 +0200 +Subject: [PATCH 11/11] Allow using properties of PkgConfig targets for glib2 + to handle deps of static glib2 + +Change-Id: I37d20256d17ae9cc0775e32aa479f1e433ece908 +--- + .../find-modules/FindGLIB2.cmake | 22 +++++++++++++++---- + 1 file changed, 18 insertions(+), 4 deletions(-) + +diff --git a/cmake/3rdparty/extra-cmake-modules/find-modules/FindGLIB2.cmake b/cmake/3rdparty/extra-cmake-modules/find-modules/FindGLIB2.cmake +index a6a16b494f..a5da57824c 100644 +--- a/cmake/3rdparty/extra-cmake-modules/find-modules/FindGLIB2.cmake ++++ b/cmake/3rdparty/extra-cmake-modules/find-modules/FindGLIB2.cmake +@@ -52,7 +52,7 @@ + #============================================================================= + + find_package(PkgConfig QUIET) +-pkg_check_modules(PC_GLIB2 QUIET glib-2.0) ++pkg_check_modules(PC_GLIB2 QUIET glib-2.0 IMPORTED_TARGET) + + find_path(GLIB2_INCLUDE_DIRS + NAMES glib.h +@@ -64,14 +64,14 @@ find_library(GLIB2_LIBRARIES + HINTS ${PC_GLIB2_LIBDIR} + ) + +-pkg_check_modules(PC_GTHREAD2 QUIET gthread-2.0) ++pkg_check_modules(PC_GTHREAD2 QUIET gthread-2.0 IMPORTED_TARGET) + + find_library(GTHREAD2_LIBRARIES + NAMES gthread-2.0 + HINTS ${PC_GTHREAD2_LIBDIR} + ) + +-pkg_check_modules(PC_GOBJECT QUIET gobject-2.0) ++pkg_check_modules(PC_GOBJECT QUIET gobject-2.0 IMPORTED_TARGET) + + find_path(GLIB2_GOBJECT_INCLUDE_DIRS + NAMES glib-object.h +@@ -83,7 +83,7 @@ find_library(GLIB2_GOBJECT_LIBRARIES + HINTS ${PC_GOBJECT_LIBDIR} + ) + +-pkg_check_modules(PC_GIO QUIET gio-2.0) ++pkg_check_modules(PC_GIO QUIET gio-2.0 IMPORTED_TARGET) + + find_path(GLIB2_GIO_INCLUDE_DIRS + NAMES gio/gio.h +@@ -160,6 +160,20 @@ mark_as_advanced(GLIB2_INCLUDE_DIRS GLIB2_INCLUDE_DIR + GLIB2_GIO_INCLUDE_DIRS GLIB2_GIO_INCLUDE_DIR + GLIB2_GIO_LIBRARIES GLIB2_GIO_LIBRARY) + ++option(GLIB2_USE_PKG_CONFIG "Use properties from PkgConfig targets" OFF) ++if(GLIB2_USE_PKG_CONFIG) ++ foreach(TARGET_NAME GLIB2 GOBJECT GIO) ++ if(TARGET "GLIB2::${TARGET_NAME}") ++ foreach(PROP_NAME INTERFACE_LINK_OPTIONS INTERFACE_LINK_LIBRARIES ++ INTERFACE_COMPILE_OPTIONS INTERFACE_COMPILE_DEFINITIONS ++ INTERFACE_INCLUDE_DIRECTORIES) ++ get_target_property(PROP_VAL "PkgConfig::PC_${TARGET_NAME}" "${PROP_NAME}") ++ set_target_properties("GLIB2::${TARGET_NAME}" PROPERTIES "${PROP_NAME}" "${PROP_VAL}") ++ endforeach() ++ endif() ++ endforeach() ++endif() ++ + include(FeatureSummary) + set_package_properties(GLIB2 PROPERTIES + URL "https://wiki.gnome.org/Projects/GLib" +-- +2.36.0 + diff --git a/qt6-base/mingw-w64/PKGBUILD b/qt6-base/mingw-w64/PKGBUILD index 59443618..209c8b2b 100644 --- a/qt6-base/mingw-w64/PKGBUILD +++ b/qt6-base/mingw-w64/PKGBUILD @@ -38,16 +38,22 @@ source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${_qtver}/subm '0005-Fix-libjpeg-workaround-for-conflict-with-rpcndr.h.patch' '0006-Support-finding-static-MariaDB-client-library.patch' '0007-Allow-overriding-CMAKE_FIND_LIBRARY_SUFFIXES-to-pref.patch' - '0008-Fix-crashes-in-rasterization-code-using-setjmp.patch') + '0008-Fix-crashes-in-rasterization-code-using-setjmp.patch' + '0009-Find-fontconfig-via-pkg-config-for-correct-handling-.patch' + '0010-Fix-dependency-of-xcb-image-on-xcb-util.patch' + '0011-Allow-using-properties-of-PkgConfig-targets-for-glib.patch') sha256sums=('b865aae43357f792b3b0a162899d9bf6a1393a55c4e5e4ede5316b157b1a0f99' - 'bff8b8af7b4eec0961890190bc1d31d98c2270985698a8071b5ee1434a12f13a' - 'bdc4834c7c88176113770356e24104040622c30779a770da3292e487d0b451c8' - '08647a0b4f3beef39a2308cea4ed7b63887e58ef7b8f53294ba8d136eaf32109' - 'e1f619607afca17031c3eebdc01a95a7de4296b8ce01b15c9797475a4e7918f1' - '1994ab8f69ac4146c9332aff1bbaacecb87fcfc1d2c521ddfa0f6fd7e3b1aa63' - 'e9170a6b158b500e34913b0ee78641bf95fcfb5f84d27934a8a7c08b7a45e345' - '45a0bf8e485d0c21e916c8260ebbf4a1869d9902f4d749a41804535f05ef54b4' - 'a018bb72f3424c30c04f1f72429d891dd6b615566c98642d55a9a72e6110fd76') + 'c570a73b499f2b7c6d24da37bcfbaef900d5cde131c1d78ef871e8def0043395' + '2ccf9394c8d9eebbef1ce21bd854b995240084defafc9f1ff72a5cb6859f4da3' + '4fa0d685cee2b918e7bbfe9e870a707eca6dcd74a53a3c95c032d9bd91fa21bf' + '8f520ef33be9cf2d9b1b9f99deae3608770837ba587039c7bd534bded4a919dd' + '482d48e8f0462e85155d1d02a64e7372b6d852a45d74e677f33d3726d01d3ab4' + '30ab970e33d7ceaec711ec20aeeb2d9d4c84615cfca92e657d3fb72f83e1e6a5' + '414413e6882746457259e7d2c2d332566fa818b0fb8396c0344b2931d106c7c3' + '6d48fa790e14af053eb2dd0146688bc7334bb9123b7575d4229e2a030f0f5a75' + '909e94ac3566475a858302f92bcc2c5297721ec49f1598bf1708389761c15f05' + 'dc4dfcb55e1de9e9f7d2d16fca3d743f03f35418989e908b39a533b22375c099' + '50a2d5ee429e9fc9994175a5cb8f205ad4b252e35e800d3508c1d49382adcf85') _architectures='i686-w64-mingw32 x86_64-w64-mingw32' diff --git a/qt6-base/static-compat/0001-Use-CMake-s-default-import-library-suffix.patch b/qt6-base/static-compat/0001-Use-CMake-s-default-import-library-suffix.patch new file mode 120000 index 00000000..ec6be50b --- /dev/null +++ b/qt6-base/static-compat/0001-Use-CMake-s-default-import-library-suffix.patch @@ -0,0 +1 @@ +../mingw-w64/0001-Use-CMake-s-default-import-library-suffix.patch \ No newline at end of file diff --git a/qt6-base/static-compat/0002-Fix-finding-D-Bus.patch b/qt6-base/static-compat/0002-Fix-finding-D-Bus.patch new file mode 120000 index 00000000..4436c596 --- /dev/null +++ b/qt6-base/static-compat/0002-Fix-finding-D-Bus.patch @@ -0,0 +1 @@ +../mingw-w64/0002-Fix-finding-D-Bus.patch \ No newline at end of file diff --git a/qt6-base/static-compat/0003-Fix-using-static-PCRE2-and-DBus-1.patch b/qt6-base/static-compat/0003-Fix-using-static-PCRE2-and-DBus-1.patch new file mode 120000 index 00000000..da87c14f --- /dev/null +++ b/qt6-base/static-compat/0003-Fix-using-static-PCRE2-and-DBus-1.patch @@ -0,0 +1 @@ +../mingw-w64/0003-Fix-using-static-PCRE2-and-DBus-1.patch \ No newline at end of file diff --git a/qt6-base/static-compat/0004-Fix-transitive-dependencies-of-static-libraries.patch b/qt6-base/static-compat/0004-Fix-transitive-dependencies-of-static-libraries.patch new file mode 120000 index 00000000..f578c4c8 --- /dev/null +++ b/qt6-base/static-compat/0004-Fix-transitive-dependencies-of-static-libraries.patch @@ -0,0 +1 @@ +../mingw-w64/0004-Fix-transitive-dependencies-of-static-libraries.patch \ No newline at end of file diff --git a/qt6-base/static-compat/0005-Fix-libjpeg-workaround-for-conflict-with-rpcndr.h.patch b/qt6-base/static-compat/0005-Fix-libjpeg-workaround-for-conflict-with-rpcndr.h.patch new file mode 120000 index 00000000..9e8f5c4e --- /dev/null +++ b/qt6-base/static-compat/0005-Fix-libjpeg-workaround-for-conflict-with-rpcndr.h.patch @@ -0,0 +1 @@ +../mingw-w64/0005-Fix-libjpeg-workaround-for-conflict-with-rpcndr.h.patch \ No newline at end of file diff --git a/qt6-base/static-compat/0006-Support-finding-static-MariaDB-client-library.patch b/qt6-base/static-compat/0006-Support-finding-static-MariaDB-client-library.patch new file mode 120000 index 00000000..7daf86d2 --- /dev/null +++ b/qt6-base/static-compat/0006-Support-finding-static-MariaDB-client-library.patch @@ -0,0 +1 @@ +../mingw-w64/0006-Support-finding-static-MariaDB-client-library.patch \ No newline at end of file diff --git a/qt6-base/static-compat/0007-Allow-overriding-CMAKE_FIND_LIBRARY_SUFFIXES-to-pref.patch b/qt6-base/static-compat/0007-Allow-overriding-CMAKE_FIND_LIBRARY_SUFFIXES-to-pref.patch new file mode 120000 index 00000000..b6654436 --- /dev/null +++ b/qt6-base/static-compat/0007-Allow-overriding-CMAKE_FIND_LIBRARY_SUFFIXES-to-pref.patch @@ -0,0 +1 @@ +../mingw-w64/0007-Allow-overriding-CMAKE_FIND_LIBRARY_SUFFIXES-to-pref.patch \ No newline at end of file diff --git a/qt6-base/static-compat/0008-Fix-crashes-in-rasterization-code-using-setjmp.patch b/qt6-base/static-compat/0008-Fix-crashes-in-rasterization-code-using-setjmp.patch new file mode 120000 index 00000000..8b0d2003 --- /dev/null +++ b/qt6-base/static-compat/0008-Fix-crashes-in-rasterization-code-using-setjmp.patch @@ -0,0 +1 @@ +../mingw-w64/0008-Fix-crashes-in-rasterization-code-using-setjmp.patch \ No newline at end of file diff --git a/qt6-base/static-compat/0009-Find-fontconfig-via-pkg-config-for-correct-handling-.patch b/qt6-base/static-compat/0009-Find-fontconfig-via-pkg-config-for-correct-handling-.patch new file mode 120000 index 00000000..bde9d513 --- /dev/null +++ b/qt6-base/static-compat/0009-Find-fontconfig-via-pkg-config-for-correct-handling-.patch @@ -0,0 +1 @@ +../mingw-w64/0009-Find-fontconfig-via-pkg-config-for-correct-handling-.patch \ No newline at end of file diff --git a/qt6-base/static-compat/0010-Fix-dependency-of-xcb-image-on-xcb-util.patch b/qt6-base/static-compat/0010-Fix-dependency-of-xcb-image-on-xcb-util.patch new file mode 120000 index 00000000..76768246 --- /dev/null +++ b/qt6-base/static-compat/0010-Fix-dependency-of-xcb-image-on-xcb-util.patch @@ -0,0 +1 @@ +../mingw-w64/0010-Fix-dependency-of-xcb-image-on-xcb-util.patch \ No newline at end of file diff --git a/qt6-base/static-compat/0011-Allow-using-properties-of-PkgConfig-targets-for-glib.patch b/qt6-base/static-compat/0011-Allow-using-properties-of-PkgConfig-targets-for-glib.patch new file mode 120000 index 00000000..2dcbc4f8 --- /dev/null +++ b/qt6-base/static-compat/0011-Allow-using-properties-of-PkgConfig-targets-for-glib.patch @@ -0,0 +1 @@ +../mingw-w64/0011-Allow-using-properties-of-PkgConfig-targets-for-glib.patch \ No newline at end of file diff --git a/qt6-base/static-compat/PKGBUILD b/qt6-base/static-compat/PKGBUILD new file mode 100644 index 00000000..a54c1d56 --- /dev/null +++ b/qt6-base/static-compat/PKGBUILD @@ -0,0 +1,120 @@ +# Maintainer: Martchus + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. +# Do not edit it manually! See README.md in the repository's root directory +# for more information. + +# All patches are managed at https://github.com/Martchus/qtbase + +pkgname=static-compat-qt6-base +_qtver=6.3.0 +pkgver=${_qtver/-/} +pkgrel=1 +arch=(x86_64) +url='https://www.qt.io' +license=(GPL3 LGPL3 FDL custom) +pkgdesc='A cross-platform application and UI framework' +depends=(shared-mime-info + static-compat-brotli static-compat-dbus static-compat-double-conversion + static-compat-fontconfig static-compat-libb2 static-compat-libglvnd + static-compat-libice static-compat-libinput static-compat-libjpeg-turbo + static-compat-libxdamage static-compat-libxkbcommon static-compat-libxmu + static-compat-libxxf86vm static-compat-md4c static-compat-pcre2 + static-compat-sqlite static-compat-xcb-util-image static-compat-xcb-util-keysyms + static-compat-xcb-util-renderutil static-compat-vulkan-headers + static-compat-xcb-util-wm static-compat-xorgproto static-compat-xtrans) +makedepends=(static-compat-cmake xdg-utils ninja) +options=('!strip' '!buildflags' 'staticlibs' '!emptydirs') +_pkgfqn="qtbase-everywhere-src-${_qtver}" +source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${_qtver}/submodules/${_pkgfqn}.tar.xz" + '0001-Use-CMake-s-default-import-library-suffix.patch' + '0002-Fix-finding-D-Bus.patch' + '0003-Fix-using-static-PCRE2-and-DBus-1.patch' + '0004-Fix-transitive-dependencies-of-static-libraries.patch' + '0005-Fix-libjpeg-workaround-for-conflict-with-rpcndr.h.patch' + '0006-Support-finding-static-MariaDB-client-library.patch' + '0007-Allow-overriding-CMAKE_FIND_LIBRARY_SUFFIXES-to-pref.patch' + '0008-Fix-crashes-in-rasterization-code-using-setjmp.patch' + '0009-Find-fontconfig-via-pkg-config-for-correct-handling-.patch' + '0010-Fix-dependency-of-xcb-image-on-xcb-util.patch' + '0011-Allow-using-properties-of-PkgConfig-targets-for-glib.patch') +sha256sums=('b865aae43357f792b3b0a162899d9bf6a1393a55c4e5e4ede5316b157b1a0f99' + 'c570a73b499f2b7c6d24da37bcfbaef900d5cde131c1d78ef871e8def0043395' + '2ccf9394c8d9eebbef1ce21bd854b995240084defafc9f1ff72a5cb6859f4da3' + '4fa0d685cee2b918e7bbfe9e870a707eca6dcd74a53a3c95c032d9bd91fa21bf' + '8f520ef33be9cf2d9b1b9f99deae3608770837ba587039c7bd534bded4a919dd' + '482d48e8f0462e85155d1d02a64e7372b6d852a45d74e677f33d3726d01d3ab4' + '30ab970e33d7ceaec711ec20aeeb2d9d4c84615cfca92e657d3fb72f83e1e6a5' + '414413e6882746457259e7d2c2d332566fa818b0fb8396c0344b2931d106c7c3' + '6d48fa790e14af053eb2dd0146688bc7334bb9123b7575d4229e2a030f0f5a75' + '909e94ac3566475a858302f92bcc2c5297721ec49f1598bf1708389761c15f05' + 'dc4dfcb55e1de9e9f7d2d16fca3d743f03f35418989e908b39a533b22375c099' + '50a2d5ee429e9fc9994175a5cb8f205ad4b252e35e800d3508c1d49382adcf85') + +prepare () { + cd $_pkgfqn + + # apply patches; further descriptions can be found in patch files itself + for patch in "$srcdir/"*.patch; do + msg2 "Applying patch $patch" + patch -p1 -i "$patch" + done +} + +build() { + check_buildoption ccache y && ccache_args=' + -DCMAKE_C_COMPILER_LAUNCHER=ccache + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache' + source static-compat-environment + export PATH=$PWD:$PATH + printf '#!/usr/bin/bash\nexec /usr/bin/pkg-config --static "$@"\n' > pkg-config + chmod +x pkg-config + static-compat-cmake -G Ninja -B build -S $_pkgfqn \ + $ccache_args \ + -DCMAKE_SKIP_INSTALL_RPATH=ON \ + -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \ + -DINSTALL_BINDIR=lib/qt6/bin \ + -DINSTALL_DOCDIR=share/doc/qt6 \ + -DINSTALL_ARCHDATADIR=lib/qt6 \ + -DINSTALL_DATADIR=share/qt6 \ + -DINSTALL_INCLUDEDIR=include/qt6 \ + -DINSTALL_MKSPECSDIR=lib/qt6/mkspecs \ + -DINSTALL_EXAMPLESDIR=share/doc/qt6/examples \ + -DINPUT_openssl=linked \ + -DQT_FEATURE_openssl_linked=ON \ + -DQT_FEATURE_static_runtime=ON \ + -DQT_FEATURE_system_sqlite=ON \ + -DQT_FEATURE_system_xcb_xinput=ON \ + -DQT_FEATURE_xcb=ON \ + -DQT_FEATURE_xcb_sm=ON \ + -DQT_FEATURE_icu=OFF \ + -DQT_FEATURE_kms=OFF \ + -DQT_FEATURE_eglfs=OFF \ + -DQT_FEATURE_gbm=OFF \ + -DQT_FEATURE_linuxfb=OFF \ + -DQT_FEATURE_gssapi=OFF \ + -DQT_FEATURE_fontconfig=ON \ + -DGLIB2_USE_PKG_CONFIG=ON \ + -DCMAKE_INSTALL_OLDINCLUDEDIR=$static_compat_prefix/include \ + -DGSSAPI_INCLUDE_DIRS=$static_compat_prefix/include \ + -DICU_INCLUDE_DIR=$static_compat_prefix/include \ + -DLibdrm_INCLUDE_DIR=$static_compat_prefix/include \ + -Dgbm_INCLUDE_DIR=$static_compat_prefix/include + VERBOSE=1 cmake --build build +} + +package() { + source static-compat-environment + DESTDIR="$pkgdir" cmake --install build + + install -Dm644 $_pkgfqn/LICENSE* -t "$pkgdir"/usr/share/licenses/$pkgname + + # Drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "$pkgdir" -type f -name '*.prl' \ + -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; + + rm -r "$pkgdir/$static_compat_prefix"/share/doc +} diff --git a/qt6-base/static-compat/PKGBUILD.sh.ep b/qt6-base/static-compat/PKGBUILD.sh.ep new file mode 100644 index 00000000..26a4b57e --- /dev/null +++ b/qt6-base/static-compat/PKGBUILD.sh.ep @@ -0,0 +1 @@ +% layout 'static-compat-qt6-base'; diff --git a/qt6-base/static-compat/qtbase-sha256.txt b/qt6-base/static-compat/qtbase-sha256.txt new file mode 120000 index 00000000..af839e03 --- /dev/null +++ b/qt6-base/static-compat/qtbase-sha256.txt @@ -0,0 +1 @@ +../mingw-w64/qtbase-sha256.txt \ No newline at end of file diff --git a/qt6-charts/static-compat/PKGBUILD b/qt6-charts/static-compat/PKGBUILD new file mode 100644 index 00000000..4771d767 --- /dev/null +++ b/qt6-charts/static-compat/PKGBUILD @@ -0,0 +1,48 @@ +# Maintainer: Martchus + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +pkgname=static-compat-qt6-charts +_qtver=6.3.0 +pkgver=${_qtver/-/} +pkgrel=1 +arch=(x86_64) +url='https://www.qt.io' +license=(GPL3 LGPL3 FDL custom) +pkgdesc='Provides a set of easy to use chart components' +depends=(static-compat-qt6-declarative) +makedepends=(static-compat-cmake static-compat-vulkan-headers ninja) +options=('!strip' '!buildflags' 'staticlibs' '!emptydirs') +_pkgfqn="qtcharts-everywhere-src-${_qtver}" +source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${_qtver}/submodules/${_pkgfqn}.tar.xz") +sha256sums=('672762c5f641ccc88a30aeedefb63f03c0f837649b334f46eea57592e87e36cd') + +build() { + check_buildoption ccache y && ccache_args=' + -DCMAKE_C_COMPILER_LAUNCHER=ccache + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache' + source static-compat-environment + export PATH=$PWD:$PATH + printf '#!/usr/bin/bash\nexec /usr/bin/pkg-config --static "$@"\n' > pkg-config + chmod +x pkg-config + static-compat-cmake -G Ninja -B build -S $_pkgfqn \ + $ccache_args \ + -DCMAKE_SKIP_INSTALL_RPATH=ON \ + -DGLIB2_USE_PKG_CONFIG=ON \ + -DQT_FEATURE_static_runtime=ON \ + -DFEATURE_pkg_config=ON + VERBOSE=1 cmake --build build +} + +package() { + source static-compat-environment + DESTDIR="$pkgdir" cmake --install build + + # Drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "$pkgdir/$static_compat_prefix/lib" -type f -name '*.prl' \ + -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; + + install -d "$pkgdir"/usr/share/licenses + ln -s /usr/share/licenses/static-compat-qt6-base "$pkgdir"/usr/share/licenses/$pkgname +} diff --git a/qt6-charts/static-compat/PKGBUILD.sh.ep b/qt6-charts/static-compat/PKGBUILD.sh.ep new file mode 100644 index 00000000..74a5b961 --- /dev/null +++ b/qt6-charts/static-compat/PKGBUILD.sh.ep @@ -0,0 +1,11 @@ +% layout 'static-compat-qt6-module'; +\ +_qtver=6.3.0 +pkgver=${_qtver/-/} +pkgrel=1 +arch=(x86_64) +url='https://www.qt.io' +license=(GPL3 LGPL3 FDL custom) +pkgdesc='Provides a set of easy to use chart components' +depends=(<%== qt6deps qw(declarative) %>) +makedepends=(static-compat-cmake static-compat-vulkan-headers ninja) diff --git a/qt6-charts/static-compat/qtcharts-sha256.txt b/qt6-charts/static-compat/qtcharts-sha256.txt new file mode 100644 index 00000000..1d9e8898 --- /dev/null +++ b/qt6-charts/static-compat/qtcharts-sha256.txt @@ -0,0 +1 @@ +672762c5f641ccc88a30aeedefb63f03c0f837649b334f46eea57592e87e36cd diff --git a/qt6-connectivity/static-compat/PKGBUILD b/qt6-connectivity/static-compat/PKGBUILD new file mode 100644 index 00000000..0e9b2af6 --- /dev/null +++ b/qt6-connectivity/static-compat/PKGBUILD @@ -0,0 +1,49 @@ +# Maintainer: Martchus + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +pkgname=static-compat-qt6-connectivity +_qtver=6.3.0 +pkgver=${_qtver/-/} +pkgrel=1 +arch=(x86_64) +url='https://www.qt.io' +license=(GPL3 LGPL3 FDL custom) +pkgdesc='Provides access to Bluetooth hardware' +depends=(static-compat-qt6-base static-compat-bluez-libs) +optdepends=('static-compat-qt6-declarative: QML bindings') +makedepends=(static-compat-cmake static-compat-qt6-declarative static-compat-vulkan-headers ninja) +options=('!strip' '!buildflags' 'staticlibs' '!emptydirs') +_pkgfqn="qtconnectivity-everywhere-src-${_qtver}" +source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${_qtver}/submodules/${_pkgfqn}.tar.xz") +sha256sums=('98f7132e3aa56db2be4800897a0514248a7ae83791b69f8162d628e187b0e61a') + +build() { + check_buildoption ccache y && ccache_args=' + -DCMAKE_C_COMPILER_LAUNCHER=ccache + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache' + source static-compat-environment + export PATH=$PWD:$PATH + printf '#!/usr/bin/bash\nexec /usr/bin/pkg-config --static "$@"\n' > pkg-config + chmod +x pkg-config + static-compat-cmake -G Ninja -B build -S $_pkgfqn \ + $ccache_args \ + -DCMAKE_SKIP_INSTALL_RPATH=ON \ + -DGLIB2_USE_PKG_CONFIG=ON \ + -DQT_FEATURE_static_runtime=ON \ + -DFEATURE_pkg_config=ON + VERBOSE=1 cmake --build build +} + +package() { + source static-compat-environment + DESTDIR="$pkgdir" cmake --install build + + # Drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "$pkgdir/$static_compat_prefix/lib" -type f -name '*.prl' \ + -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; + + install -d "$pkgdir"/usr/share/licenses + ln -s /usr/share/licenses/static-compat-qt6-base "$pkgdir"/usr/share/licenses/$pkgname +} diff --git a/qt6-connectivity/static-compat/PKGBUILD.sh.ep b/qt6-connectivity/static-compat/PKGBUILD.sh.ep new file mode 100644 index 00000000..d003df73 --- /dev/null +++ b/qt6-connectivity/static-compat/PKGBUILD.sh.ep @@ -0,0 +1,12 @@ +% layout 'static-compat-qt6-module'; +\ +_qtver=6.3.0 +pkgver=${_qtver/-/} +pkgrel=1 +arch=(x86_64) +url='https://www.qt.io' +license=(GPL3 LGPL3 FDL custom) +pkgdesc='Provides access to Bluetooth hardware' +depends=(<%== qt6deps qw(base) %> static-compat-bluez-libs) +optdepends=(<%== qt6optdeps declarative => 'QML bindings' %>) +makedepends=(static-compat-cmake <%== qt6deps qw(declarative) %> static-compat-vulkan-headers ninja) diff --git a/qt6-connectivity/static-compat/qtconnectivity-sha256.txt b/qt6-connectivity/static-compat/qtconnectivity-sha256.txt new file mode 100644 index 00000000..615c5599 --- /dev/null +++ b/qt6-connectivity/static-compat/qtconnectivity-sha256.txt @@ -0,0 +1 @@ +98f7132e3aa56db2be4800897a0514248a7ae83791b69f8162d628e187b0e61a diff --git a/qt6-datavis3d/static-compat/PKGBUILD b/qt6-datavis3d/static-compat/PKGBUILD new file mode 100644 index 00000000..a47ee27d --- /dev/null +++ b/qt6-datavis3d/static-compat/PKGBUILD @@ -0,0 +1,49 @@ +# Maintainer: Martchus + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +pkgname=static-compat-qt6-datavis3d +_qtver=6.3.0 +pkgver=${_qtver/-/} +pkgrel=1 +arch=(x86_64) +url='https://www.qt.io' +license=(GPL3 LGPL3 FDL custom) +pkgdesc='Qt6 Data Visualization module' +depends=(static-compat-qt6-base) +optdepends=('static-compat-qt6-declarative: QML bindings') +makedepends=(static-compat-cmake static-compat-qt6-declarative static-compat-vulkan-headers ninja) +options=('!strip' '!buildflags' 'staticlibs' '!emptydirs') +_pkgfqn="qtdatavis3d-everywhere-src-${_qtver}" +source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${_qtver}/submodules/${_pkgfqn}.tar.xz") +sha256sums=('09512ef3b2b28ff8defaea96498736418ada008f3778220a9185c09dd59e0d8d') + +build() { + check_buildoption ccache y && ccache_args=' + -DCMAKE_C_COMPILER_LAUNCHER=ccache + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache' + source static-compat-environment + export PATH=$PWD:$PATH + printf '#!/usr/bin/bash\nexec /usr/bin/pkg-config --static "$@"\n' > pkg-config + chmod +x pkg-config + static-compat-cmake -G Ninja -B build -S $_pkgfqn \ + $ccache_args \ + -DCMAKE_SKIP_INSTALL_RPATH=ON \ + -DGLIB2_USE_PKG_CONFIG=ON \ + -DQT_FEATURE_static_runtime=ON \ + -DFEATURE_pkg_config=ON + VERBOSE=1 cmake --build build +} + +package() { + source static-compat-environment + DESTDIR="$pkgdir" cmake --install build + + # Drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "$pkgdir/$static_compat_prefix/lib" -type f -name '*.prl' \ + -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; + + install -d "$pkgdir"/usr/share/licenses + ln -s /usr/share/licenses/static-compat-qt6-base "$pkgdir"/usr/share/licenses/$pkgname +} diff --git a/qt6-datavis3d/static-compat/PKGBUILD.sh.ep b/qt6-datavis3d/static-compat/PKGBUILD.sh.ep new file mode 100644 index 00000000..c7e38a02 --- /dev/null +++ b/qt6-datavis3d/static-compat/PKGBUILD.sh.ep @@ -0,0 +1,12 @@ +% layout 'static-compat-qt6-module'; +\ +_qtver=6.3.0 +pkgver=${_qtver/-/} +pkgrel=1 +arch=(x86_64) +url='https://www.qt.io' +license=(GPL3 LGPL3 FDL custom) +pkgdesc='Qt6 Data Visualization module' +depends=(<%== qt6deps qw(base) %>) +optdepends=(<%== qt6optdeps declarative => 'QML bindings' %>) +makedepends=(static-compat-cmake <%== qt6deps qw(declarative) %> static-compat-vulkan-headers ninja) diff --git a/qt6-datavis3d/static-compat/qtdatavis3d-sha256.txt b/qt6-datavis3d/static-compat/qtdatavis3d-sha256.txt new file mode 100644 index 00000000..de5c5bb0 --- /dev/null +++ b/qt6-datavis3d/static-compat/qtdatavis3d-sha256.txt @@ -0,0 +1 @@ +09512ef3b2b28ff8defaea96498736418ada008f3778220a9185c09dd59e0d8d diff --git a/qt6-declarative/static-compat/PKGBUILD b/qt6-declarative/static-compat/PKGBUILD new file mode 100644 index 00000000..9130c0b6 --- /dev/null +++ b/qt6-declarative/static-compat/PKGBUILD @@ -0,0 +1,48 @@ +# Maintainer: Martchus + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +pkgname=static-compat-qt6-declarative +_qtver=6.3.0 +pkgver=${_qtver/-/} +pkgrel=1 +arch=(x86_64) +url='https://www.qt.io' +license=(GPL3 LGPL3 FDL custom) +pkgdesc='Classes for QML and JavaScript languages' +depends=(static-compat-qt6-base) +makedepends=(static-compat-cmake static-compat-qt6-shadertools python at-spi2-core ninja) +options=('!strip' '!buildflags' 'staticlibs' '!emptydirs') +_pkgfqn="qtdeclarative-everywhere-src-${_qtver}" +source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${_qtver}/submodules/${_pkgfqn}.tar.xz") +sha256sums=('f623518d14ac1ea9d2a5a1e8962be36f86a2e77393a315518a34c78931bcb389') + +build() { + check_buildoption ccache y && ccache_args=' + -DCMAKE_C_COMPILER_LAUNCHER=ccache + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache' + source static-compat-environment + export PATH=$PWD:$PATH + printf '#!/usr/bin/bash\nexec /usr/bin/pkg-config --static "$@"\n' > pkg-config + chmod +x pkg-config + static-compat-cmake -G Ninja -B build -S $_pkgfqn \ + $ccache_args \ + -DCMAKE_SKIP_INSTALL_RPATH=ON \ + -DGLIB2_USE_PKG_CONFIG=ON \ + -DQT_FEATURE_static_runtime=ON \ + -DFEATURE_pkg_config=ON + VERBOSE=1 cmake --build build +} + +package() { + source static-compat-environment + DESTDIR="$pkgdir" cmake --install build + + # Drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "$pkgdir/$static_compat_prefix/lib" -type f -name '*.prl' \ + -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; + + install -d "$pkgdir"/usr/share/licenses + ln -s /usr/share/licenses/static-compat-qt6-base "$pkgdir"/usr/share/licenses/$pkgname +} diff --git a/qt6-declarative/static-compat/PKGBUILD.sh.ep b/qt6-declarative/static-compat/PKGBUILD.sh.ep new file mode 100644 index 00000000..48fac57a --- /dev/null +++ b/qt6-declarative/static-compat/PKGBUILD.sh.ep @@ -0,0 +1,11 @@ +% layout 'static-compat-qt6-module', has_binaries => 1; +\ +_qtver=6.3.0 +pkgver=${_qtver/-/} +pkgrel=1 +arch=(x86_64) +url='https://www.qt.io' +license=(GPL3 LGPL3 FDL custom) +pkgdesc='Classes for QML and JavaScript languages' +depends=(<%== qt6deps qw(base) %>) +makedepends=(static-compat-cmake <%== qt6deps qw(shadertools) %> python at-spi2-core ninja) diff --git a/qt6-declarative/static-compat/qtdeclarative-sha256.txt b/qt6-declarative/static-compat/qtdeclarative-sha256.txt new file mode 100644 index 00000000..5c78efd7 --- /dev/null +++ b/qt6-declarative/static-compat/qtdeclarative-sha256.txt @@ -0,0 +1 @@ +f623518d14ac1ea9d2a5a1e8962be36f86a2e77393a315518a34c78931bcb389 diff --git a/qt6-imageformats/static-compat/PKGBUILD b/qt6-imageformats/static-compat/PKGBUILD new file mode 100644 index 00000000..14afe7e2 --- /dev/null +++ b/qt6-imageformats/static-compat/PKGBUILD @@ -0,0 +1,51 @@ +# Maintainer: Martchus + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +pkgname=static-compat-qt6-imageformats +_qtver=6.3.0 +pkgver=${_qtver/-/} +pkgrel=1 +arch=(x86_64) +url='https://www.qt.io' +license=(GPL3 LGPL3 FDL custom) +# keep it basic for now +#pkgdesc='Plugins for additional image formats: TIFF, MNG, TGA, WBMP' +#depends=(static-compat-qt6-base static-compat-jasper static-compat-libmng static-compat-libwebp) +pkgdesc='Plugins for additional image formats: TIFF, TGA' +depends=(static-compat-qt6-base) +makedepends=(static-compat-cmake ninja) +options=('!strip' '!buildflags' 'staticlibs' '!emptydirs') +_pkgfqn="qtimageformats-everywhere-src-${_qtver}" +source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${_qtver}/submodules/${_pkgfqn}.tar.xz") +sha256sums=('025d0d17ed75b42a7eb6b523731ab8f17025421a8810cade25caffe05d93abef') + +build() { + check_buildoption ccache y && ccache_args=' + -DCMAKE_C_COMPILER_LAUNCHER=ccache + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache' + source static-compat-environment + export PATH=$PWD:$PATH + printf '#!/usr/bin/bash\nexec /usr/bin/pkg-config --static "$@"\n' > pkg-config + chmod +x pkg-config + static-compat-cmake -G Ninja -B build -S $_pkgfqn \ + $ccache_args \ + -DCMAKE_SKIP_INSTALL_RPATH=ON \ + -DGLIB2_USE_PKG_CONFIG=ON \ + -DQT_FEATURE_static_runtime=ON \ + -DFEATURE_pkg_config=ON + VERBOSE=1 cmake --build build +} + +package() { + source static-compat-environment + DESTDIR="$pkgdir" cmake --install build + + # Drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "$pkgdir/$static_compat_prefix/lib" -type f -name '*.prl' \ + -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; + + install -d "$pkgdir"/usr/share/licenses + ln -s /usr/share/licenses/static-compat-qt6-base "$pkgdir"/usr/share/licenses/$pkgname +} diff --git a/qt6-imageformats/static-compat/PKGBUILD.sh.ep b/qt6-imageformats/static-compat/PKGBUILD.sh.ep new file mode 100644 index 00000000..7bf19d03 --- /dev/null +++ b/qt6-imageformats/static-compat/PKGBUILD.sh.ep @@ -0,0 +1,14 @@ +% layout 'static-compat-qt6-module'; +\ +_qtver=6.3.0 +pkgver=${_qtver/-/} +pkgrel=1 +arch=(x86_64) +url='https://www.qt.io' +license=(GPL3 LGPL3 FDL custom) +# keep it basic for now +#pkgdesc='Plugins for additional image formats: TIFF, MNG, TGA, WBMP' +#depends=(<%== qt6deps qw(base) %> static-compat-jasper static-compat-libmng static-compat-libwebp) +pkgdesc='Plugins for additional image formats: TIFF, TGA' +depends=(<%== qt6deps qw(base) %>) +makedepends=(static-compat-cmake ninja) diff --git a/qt6-imageformats/static-compat/qtimageformats-sha256.txt b/qt6-imageformats/static-compat/qtimageformats-sha256.txt new file mode 100644 index 00000000..31bae9f2 --- /dev/null +++ b/qt6-imageformats/static-compat/qtimageformats-sha256.txt @@ -0,0 +1 @@ +025d0d17ed75b42a7eb6b523731ab8f17025421a8810cade25caffe05d93abef diff --git a/qt6-lottie/static-compat/PKGBUILD b/qt6-lottie/static-compat/PKGBUILD new file mode 100644 index 00000000..de8df8ce --- /dev/null +++ b/qt6-lottie/static-compat/PKGBUILD @@ -0,0 +1,49 @@ +# Maintainer: Martchus + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +pkgname=static-compat-qt6-lottie +_qtver=6.3.0 +pkgver=${_qtver/-/} +pkgrel=1 +arch=(x86_64) +url='https://www.qt.io' +license=(GPL3 LGPL3 FDL custom) +pkgdesc='A family of player software for a certain json-based file format for describing 2d vector graphics animations' +depends=(static-compat-qt6-base) +optdepends=('static-compat-qt6-declarative: QML bindings') +makedepends=(static-compat-cmake static-compat-qt6-declarative static-compat-vulkan-headers ninja) +options=('!strip' '!buildflags' 'staticlibs' '!emptydirs') +_pkgfqn="qtlottie-everywhere-src-${_qtver}" +source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${_qtver}/submodules/${_pkgfqn}.tar.xz") +sha256sums=('39db570bbba5b527a1eb6a5774bed47398ace2f7217bbf45b1194ada6cf97deb') + +build() { + check_buildoption ccache y && ccache_args=' + -DCMAKE_C_COMPILER_LAUNCHER=ccache + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache' + source static-compat-environment + export PATH=$PWD:$PATH + printf '#!/usr/bin/bash\nexec /usr/bin/pkg-config --static "$@"\n' > pkg-config + chmod +x pkg-config + static-compat-cmake -G Ninja -B build -S $_pkgfqn \ + $ccache_args \ + -DCMAKE_SKIP_INSTALL_RPATH=ON \ + -DGLIB2_USE_PKG_CONFIG=ON \ + -DQT_FEATURE_static_runtime=ON \ + -DFEATURE_pkg_config=ON + VERBOSE=1 cmake --build build +} + +package() { + source static-compat-environment + DESTDIR="$pkgdir" cmake --install build + + # Drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "$pkgdir/$static_compat_prefix/lib" -type f -name '*.prl' \ + -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; + + install -d "$pkgdir"/usr/share/licenses + ln -s /usr/share/licenses/static-compat-qt6-base "$pkgdir"/usr/share/licenses/$pkgname +} diff --git a/qt6-lottie/static-compat/PKGBUILD.sh.ep b/qt6-lottie/static-compat/PKGBUILD.sh.ep new file mode 100644 index 00000000..0eab00f2 --- /dev/null +++ b/qt6-lottie/static-compat/PKGBUILD.sh.ep @@ -0,0 +1,12 @@ +% layout 'static-compat-qt6-module'; +\ +_qtver=6.3.0 +pkgver=${_qtver/-/} +pkgrel=1 +arch=(x86_64) +url='https://www.qt.io' +license=(GPL3 LGPL3 FDL custom) +pkgdesc='A family of player software for a certain json-based file format for describing 2d vector graphics animations' +depends=(<%== qt6deps qw(base) %>) +optdepends=(<%== qt6optdeps declarative => 'QML bindings' %>) +makedepends=(static-compat-cmake <%== qt6deps qw(declarative) %> static-compat-vulkan-headers ninja) diff --git a/qt6-lottie/static-compat/qtlottie-sha256.txt b/qt6-lottie/static-compat/qtlottie-sha256.txt new file mode 100644 index 00000000..edcaa3a7 --- /dev/null +++ b/qt6-lottie/static-compat/qtlottie-sha256.txt @@ -0,0 +1 @@ +39db570bbba5b527a1eb6a5774bed47398ace2f7217bbf45b1194ada6cf97deb diff --git a/qt6-multimedia/static-compat/PKGBUILD b/qt6-multimedia/static-compat/PKGBUILD new file mode 100644 index 00000000..5dc0a824 --- /dev/null +++ b/qt6-multimedia/static-compat/PKGBUILD @@ -0,0 +1,49 @@ +# Maintainer: Martchus + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +pkgname=static-compat-qt6-multimedia +_qtver=6.3.0 +pkgver=${_qtver/-/} +pkgrel=1 +arch=(x86_64) +url='https://www.qt.io' +license=(GPL3 LGPL3 FDL custom) +pkgdesc='Classes for audio, video, radio and camera functionality' +depends=(static-compat-qt6-base) +optdepends=('static-compat-qt6-declarative: QML bindings') +makedepends=(static-compat-cmake static-compat-qt6-declarative static-compat-qt6-shadertools static-compat-vulkan-headers ninja) +options=('!strip' '!buildflags' 'staticlibs' '!emptydirs') +_pkgfqn="qtmultimedia-everywhere-src-${_qtver}" +source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${_qtver}/submodules/${_pkgfqn}.tar.xz") +sha256sums=('d050247ff82974a8480c05ce602fd39e03d9e2d1b82bb78a3f42cf29b3a7fe3e') + +build() { + check_buildoption ccache y && ccache_args=' + -DCMAKE_C_COMPILER_LAUNCHER=ccache + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache' + source static-compat-environment + export PATH=$PWD:$PATH + printf '#!/usr/bin/bash\nexec /usr/bin/pkg-config --static "$@"\n' > pkg-config + chmod +x pkg-config + static-compat-cmake -G Ninja -B build -S $_pkgfqn \ + $ccache_args \ + -DCMAKE_SKIP_INSTALL_RPATH=ON \ + -DGLIB2_USE_PKG_CONFIG=ON \ + -DQT_FEATURE_static_runtime=ON \ + -DFEATURE_pkg_config=ON + VERBOSE=1 cmake --build build +} + +package() { + source static-compat-environment + DESTDIR="$pkgdir" cmake --install build + + # Drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "$pkgdir/$static_compat_prefix/lib" -type f -name '*.prl' \ + -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; + + install -d "$pkgdir"/usr/share/licenses + ln -s /usr/share/licenses/static-compat-qt6-base "$pkgdir"/usr/share/licenses/$pkgname +} diff --git a/qt6-multimedia/static-compat/PKGBUILD.sh.ep b/qt6-multimedia/static-compat/PKGBUILD.sh.ep new file mode 100644 index 00000000..7172b904 --- /dev/null +++ b/qt6-multimedia/static-compat/PKGBUILD.sh.ep @@ -0,0 +1,12 @@ +% layout 'static-compat-qt6-module'; +\ +_qtver=6.3.0 +pkgver=${_qtver/-/} +pkgrel=1 +arch=(x86_64) +url='https://www.qt.io' +license=(GPL3 LGPL3 FDL custom) +pkgdesc='Classes for audio, video, radio and camera functionality' +depends=(<%== qt6deps qw(base) %>) +optdepends=(<%== qt6optdeps declarative => 'QML bindings' %>) +makedepends=(static-compat-cmake <%== qt6deps qw(declarative shadertools) %> static-compat-vulkan-headers ninja) diff --git a/qt6-multimedia/static-compat/qtmultimedia-sha256.txt b/qt6-multimedia/static-compat/qtmultimedia-sha256.txt new file mode 100644 index 00000000..3dd706ae --- /dev/null +++ b/qt6-multimedia/static-compat/qtmultimedia-sha256.txt @@ -0,0 +1 @@ +d050247ff82974a8480c05ce602fd39e03d9e2d1b82bb78a3f42cf29b3a7fe3e diff --git a/qt6-networkauth/default/PKGBUILD b/qt6-networkauth/default/PKGBUILD new file mode 100644 index 00000000..364fcd3c --- /dev/null +++ b/qt6-networkauth/default/PKGBUILD @@ -0,0 +1,31 @@ +# Maintainer: Antonio Rojas +# Maintainer: Felix Yan +# Contributor: Andrea Scarpino + +pkgname=qt6-networkauth +_qtver=6.3.0 +pkgver=${_qtver/-/} +pkgrel=1 +arch=(x86_64) +url='https://www.qt.io' +license=(GPL3 LGPL3 FDL custom) +pkgdesc='Network authentication module' +depends=(qt6-base) +makedepends=(cmake ninja) +groups=(qt6) +options=(debug) +_pkgfn=${pkgname/6-/}-everywhere-src-$_qtver +source=(https://download.qt.io/official_releases/qt/${pkgver%.*}/$_qtver/submodules/$_pkgfn.tar.xz) +sha256sums=('203a98942919028520038f90a20cd7ee32b537233545d11e429c3e2c1ad9069f') + +build() { + cmake -B build -S $_pkgfn -G Ninja + cmake --build build +} + +package() { + DESTDIR="$pkgdir" cmake --install build + + install -d "$pkgdir"/usr/share/licenses + ln -s /usr/share/licenses/qt6-base "$pkgdir"/usr/share/licenses/$pkgname +} diff --git a/qt6-networkauth/static-compat/PKGBUILD b/qt6-networkauth/static-compat/PKGBUILD new file mode 100644 index 00000000..e4b32dd3 --- /dev/null +++ b/qt6-networkauth/static-compat/PKGBUILD @@ -0,0 +1,48 @@ +# Maintainer: Martchus + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +pkgname=static-compat-qt6-networkauth +_qtver=6.3.0 +pkgver=${_qtver/-/} +pkgrel=1 +arch=(x86_64) +url='https://www.qt.io' +license=(GPL3 LGPL3 FDL custom) +pkgdesc='Network authentication module' +depends=(static-compat-qt6-base) +makedepends=(static-compat-cmake ninja) +options=('!strip' '!buildflags' 'staticlibs' '!emptydirs') +_pkgfqn="qtnetworkauth-everywhere-src-${_qtver}" +source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${_qtver}/submodules/${_pkgfqn}.tar.xz") +sha256sums=('203a98942919028520038f90a20cd7ee32b537233545d11e429c3e2c1ad9069f') + +build() { + check_buildoption ccache y && ccache_args=' + -DCMAKE_C_COMPILER_LAUNCHER=ccache + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache' + source static-compat-environment + export PATH=$PWD:$PATH + printf '#!/usr/bin/bash\nexec /usr/bin/pkg-config --static "$@"\n' > pkg-config + chmod +x pkg-config + static-compat-cmake -G Ninja -B build -S $_pkgfqn \ + $ccache_args \ + -DCMAKE_SKIP_INSTALL_RPATH=ON \ + -DGLIB2_USE_PKG_CONFIG=ON \ + -DQT_FEATURE_static_runtime=ON \ + -DFEATURE_pkg_config=ON + VERBOSE=1 cmake --build build +} + +package() { + source static-compat-environment + DESTDIR="$pkgdir" cmake --install build + + # Drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "$pkgdir/$static_compat_prefix/lib" -type f -name '*.prl' \ + -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; + + install -d "$pkgdir"/usr/share/licenses + ln -s /usr/share/licenses/static-compat-qt6-base "$pkgdir"/usr/share/licenses/$pkgname +} diff --git a/qt6-networkauth/static-compat/PKGBUILD.sh.ep b/qt6-networkauth/static-compat/PKGBUILD.sh.ep new file mode 100644 index 00000000..fc42b091 --- /dev/null +++ b/qt6-networkauth/static-compat/PKGBUILD.sh.ep @@ -0,0 +1,11 @@ +% layout 'static-compat-qt6-module'; +\ +_qtver=6.3.0 +pkgver=${_qtver/-/} +pkgrel=1 +arch=(x86_64) +url='https://www.qt.io' +license=(GPL3 LGPL3 FDL custom) +pkgdesc='Network authentication module' +depends=(<%== qt6deps qw(base) %>) +makedepends=(static-compat-cmake ninja) diff --git a/qt6-networkauth/static-compat/qtnetworkauth-sha256.txt b/qt6-networkauth/static-compat/qtnetworkauth-sha256.txt new file mode 100644 index 00000000..db6bb1d2 --- /dev/null +++ b/qt6-networkauth/static-compat/qtnetworkauth-sha256.txt @@ -0,0 +1 @@ +203a98942919028520038f90a20cd7ee32b537233545d11e429c3e2c1ad9069f diff --git a/qt6-quick3d/static-compat/PKGBUILD b/qt6-quick3d/static-compat/PKGBUILD new file mode 100644 index 00000000..4a52924f --- /dev/null +++ b/qt6-quick3d/static-compat/PKGBUILD @@ -0,0 +1,50 @@ +# Maintainer: Martchus + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +pkgname=static-compat-qt6-quick3d +_qtver=6.3.0 +pkgver=${_qtver/-/} +pkgrel=1 +arch=(x86_64) +url='https://www.qt.io' +license=(GPL3 LGPL3 FDL custom) +pkgdesc='Qt module and API for defining 3D content in Qt Quick' +depends=(static-compat-qt6-declarative) +makedepends=(static-compat-cmake static-compat-vulkan-headers + static-compat-qt6-shadertools ninja) +options=('!strip' '!buildflags' 'staticlibs' '!emptydirs') +_pkgfqn="qtquick3d-everywhere-src-${_qtver}" +source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${_qtver}/submodules/${_pkgfqn}.tar.xz") +sha256sums=('0ad05bd1ee1f784b18220a2d2625ee8de91662c88fdc7b798662953d86eb327e') + +build() { + check_buildoption ccache y && ccache_args=' + -DCMAKE_C_COMPILER_LAUNCHER=ccache + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache' + source static-compat-environment + export PATH=$PWD:$PATH + printf '#!/usr/bin/bash\nexec /usr/bin/pkg-config --static "$@"\n' > pkg-config + chmod +x pkg-config + static-compat-cmake -G Ninja -B build -S $_pkgfqn \ + $ccache_args \ + -DCMAKE_SKIP_INSTALL_RPATH=ON \ + -DGLIB2_USE_PKG_CONFIG=ON \ + -DQT_FEATURE_static_runtime=ON \ + -DFEATURE_pkg_config=ON \ + -DFEATURE_quick3d_assimp=OFF + VERBOSE=1 cmake --build build +} + +package() { + source static-compat-environment + DESTDIR="$pkgdir" cmake --install build + + # Drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "$pkgdir/$static_compat_prefix/lib" -type f -name '*.prl' \ + -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; + + install -d "$pkgdir"/usr/share/licenses + ln -s /usr/share/licenses/static-compat-qt6-base "$pkgdir"/usr/share/licenses/$pkgname +} diff --git a/qt6-quick3d/static-compat/PKGBUILD.sh.ep b/qt6-quick3d/static-compat/PKGBUILD.sh.ep new file mode 100644 index 00000000..0053a006 --- /dev/null +++ b/qt6-quick3d/static-compat/PKGBUILD.sh.ep @@ -0,0 +1,17 @@ +% layout 'static-compat-qt6-module', has_binaries => 1; +\ +_qtver=6.3.0 +pkgver=${_qtver/-/} +pkgrel=1 +arch=(x86_64) +url='https://www.qt.io' +license=(GPL3 LGPL3 FDL custom) +pkgdesc='Qt module and API for defining 3D content in Qt Quick' +depends=(<%== qt6deps qw(declarative) %>) +makedepends=(static-compat-cmake static-compat-vulkan-headers + <%== qt6deps qw(shadertools) %> ninja) +% \ +% content_for additional_cmake_args => begin + \\ + -DFEATURE_quick3d_assimp=OFF\ +% end diff --git a/qt6-quick3d/static-compat/qtquick3d-sha256.txt b/qt6-quick3d/static-compat/qtquick3d-sha256.txt new file mode 100644 index 00000000..3e30b022 --- /dev/null +++ b/qt6-quick3d/static-compat/qtquick3d-sha256.txt @@ -0,0 +1 @@ +0ad05bd1ee1f784b18220a2d2625ee8de91662c88fdc7b798662953d86eb327e diff --git a/qt6-shadertools/static-compat/PKGBUILD b/qt6-shadertools/static-compat/PKGBUILD new file mode 100644 index 00000000..679ff50b --- /dev/null +++ b/qt6-shadertools/static-compat/PKGBUILD @@ -0,0 +1,48 @@ +# Maintainer: Martchus + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +pkgname=static-compat-qt6-shadertools +_qtver=6.3.0 +pkgver=${_qtver/-/} +pkgrel=1 +arch=(x86_64) +url='https://www.qt.io' +license=(GPL3 LGPL3 FDL custom) +pkgdesc='Experimental module providing APIs and a host tool to host tool to perform graphics and compute shader conditioning for the upcoming Qt graphics abstraction layer' +depends=(static-compat-qt6-base) +makedepends=(static-compat-cmake ninja) +options=('!strip' '!buildflags' 'staticlibs' '!emptydirs') +_pkgfqn="qtshadertools-everywhere-src-${_qtver}" +source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${_qtver}/submodules/${_pkgfqn}.tar.xz") +sha256sums=('4129357f7318c9e7879b2b3570c94e62dedc0d7a5b27f585fc411d5c06d80d35') + +build() { + check_buildoption ccache y && ccache_args=' + -DCMAKE_C_COMPILER_LAUNCHER=ccache + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache' + source static-compat-environment + export PATH=$PWD:$PATH + printf '#!/usr/bin/bash\nexec /usr/bin/pkg-config --static "$@"\n' > pkg-config + chmod +x pkg-config + static-compat-cmake -G Ninja -B build -S $_pkgfqn \ + $ccache_args \ + -DCMAKE_SKIP_INSTALL_RPATH=ON \ + -DGLIB2_USE_PKG_CONFIG=ON \ + -DQT_FEATURE_static_runtime=ON \ + -DFEATURE_pkg_config=ON + VERBOSE=1 cmake --build build +} + +package() { + source static-compat-environment + DESTDIR="$pkgdir" cmake --install build + + # Drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "$pkgdir/$static_compat_prefix/lib" -type f -name '*.prl' \ + -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; + + install -d "$pkgdir"/usr/share/licenses + ln -s /usr/share/licenses/static-compat-qt6-base "$pkgdir"/usr/share/licenses/$pkgname +} diff --git a/qt6-shadertools/static-compat/PKGBUILD.sh.ep b/qt6-shadertools/static-compat/PKGBUILD.sh.ep new file mode 100644 index 00000000..7c57e11b --- /dev/null +++ b/qt6-shadertools/static-compat/PKGBUILD.sh.ep @@ -0,0 +1,11 @@ +% layout 'static-compat-qt6-module'; +\ +_qtver=6.3.0 +pkgver=${_qtver/-/} +pkgrel=1 +arch=(x86_64) +url='https://www.qt.io' +license=(GPL3 LGPL3 FDL custom) +pkgdesc='Experimental module providing APIs and a host tool to host tool to perform graphics and compute shader conditioning for the upcoming Qt graphics abstraction layer' +depends=(<%== qt6deps qw(base) %>) +makedepends=(static-compat-cmake ninja) diff --git a/qt6-shadertools/static-compat/qtshadertools-sha256.txt b/qt6-shadertools/static-compat/qtshadertools-sha256.txt new file mode 100644 index 00000000..0ff17687 --- /dev/null +++ b/qt6-shadertools/static-compat/qtshadertools-sha256.txt @@ -0,0 +1 @@ +4129357f7318c9e7879b2b3570c94e62dedc0d7a5b27f585fc411d5c06d80d35 diff --git a/qt6-svg/static-compat/PKGBUILD b/qt6-svg/static-compat/PKGBUILD new file mode 100644 index 00000000..a83e5e95 --- /dev/null +++ b/qt6-svg/static-compat/PKGBUILD @@ -0,0 +1,48 @@ +# Maintainer: Martchus + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +pkgname=static-compat-qt6-svg +_qtver=6.3.0 +pkgver=${_qtver/-/} +pkgrel=1 +arch=(x86_64) +url='https://www.qt.io' +license=(GPL3 LGPL3 FDL custom) +pkgdesc='Classes for displaying the contents of SVG files' +depends=(static-compat-qt6-base) +makedepends=(static-compat-cmake ninja) +options=('!strip' '!buildflags' 'staticlibs' '!emptydirs') +_pkgfqn="qtsvg-everywhere-src-${_qtver}" +source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${_qtver}/submodules/${_pkgfqn}.tar.xz") +sha256sums=('3164504d7e3f640439308235739b112605ab5fc9cc517ca0b28f9fb93a8db0e3') + +build() { + check_buildoption ccache y && ccache_args=' + -DCMAKE_C_COMPILER_LAUNCHER=ccache + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache' + source static-compat-environment + export PATH=$PWD:$PATH + printf '#!/usr/bin/bash\nexec /usr/bin/pkg-config --static "$@"\n' > pkg-config + chmod +x pkg-config + static-compat-cmake -G Ninja -B build -S $_pkgfqn \ + $ccache_args \ + -DCMAKE_SKIP_INSTALL_RPATH=ON \ + -DGLIB2_USE_PKG_CONFIG=ON \ + -DQT_FEATURE_static_runtime=ON \ + -DFEATURE_pkg_config=ON + VERBOSE=1 cmake --build build +} + +package() { + source static-compat-environment + DESTDIR="$pkgdir" cmake --install build + + # Drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "$pkgdir/$static_compat_prefix/lib" -type f -name '*.prl' \ + -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; + + install -d "$pkgdir"/usr/share/licenses + ln -s /usr/share/licenses/static-compat-qt6-base "$pkgdir"/usr/share/licenses/$pkgname +} diff --git a/qt6-svg/static-compat/PKGBUILD.sh.ep b/qt6-svg/static-compat/PKGBUILD.sh.ep new file mode 100644 index 00000000..fe36710e --- /dev/null +++ b/qt6-svg/static-compat/PKGBUILD.sh.ep @@ -0,0 +1,11 @@ +% layout 'static-compat-qt6-module'; +\ +_qtver=6.3.0 +pkgver=${_qtver/-/} +pkgrel=1 +arch=(x86_64) +url='https://www.qt.io' +license=(GPL3 LGPL3 FDL custom) +pkgdesc='Classes for displaying the contents of SVG files' +depends=(<%== qt6deps qw(base) %>) +makedepends=(static-compat-cmake ninja) diff --git a/qt6-svg/static-compat/qtsvg-sha256.txt b/qt6-svg/static-compat/qtsvg-sha256.txt new file mode 100644 index 00000000..84df0c91 --- /dev/null +++ b/qt6-svg/static-compat/qtsvg-sha256.txt @@ -0,0 +1 @@ +3164504d7e3f640439308235739b112605ab5fc9cc517ca0b28f9fb93a8db0e3 diff --git a/qt6-tools/static-compat/PKGBUILD b/qt6-tools/static-compat/PKGBUILD new file mode 100644 index 00000000..07301b66 --- /dev/null +++ b/qt6-tools/static-compat/PKGBUILD @@ -0,0 +1,73 @@ +# Maintainer: Martchus + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +pkgname=static-compat-qt6-tools +_qtver=6.3.0 +pkgver=${_qtver/-/} +pkgrel=1 +arch=(x86_64) +url='https://www.qt.io' +license=(GPL3 LGPL3 FDL custom) +pkgdesc='A cross-platform application and UI framework (Development Tools, QtHelp)' +depends=(static-compat-qt6-base hicolor-icon-theme) +makedepends=(static-compat-cmake static-compat-qt6-declarative static-compat-vulkan-headers llvm clang ninja) +optdepends=('clang: for qdoc and lupdate') +options=('!strip' '!buildflags' 'staticlibs' '!emptydirs') +_pkgfqn="qttools-everywhere-src-${_qtver}" +source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${_qtver}/submodules/${_pkgfqn}.tar.xz") +sha256sums=('6fe789cf7e1abc7f0ac39027c53e7880433425b234d448d1500e583e9c3ba498') + +build() { + check_buildoption ccache y && ccache_args=' + -DCMAKE_C_COMPILER_LAUNCHER=ccache + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache' + source static-compat-environment + export PATH=$PWD:$PATH + printf '#!/usr/bin/bash\nexec /usr/bin/pkg-config --static "$@"\n' > pkg-config + chmod +x pkg-config + # use llvm/clang from regular prefix (by linking into a custom prefix as we must avoid `-isystem /usr/include`) + # note: Depending on Arch's normal LLVM/Clang is ok here as those tools are only used during build time and not + # distributed. + [[ -e prefix ]] && rm -r prefix + mkdir -p prefix/bin + pacman -Ql llvm clang | grep /usr/bin | cut -d ' ' -f 2 | xargs ln -frs --target-directory=prefix/bin + mkdir -p prefix/include + ln -frs --target-directory=prefix/include /usr/include/{llvm,clang}{,-c} + mkdir -p prefix/lib/cmake + cp -r --target-directory=prefix/lib/cmake /usr/lib/cmake/llvm + ln -frs --target-directory=prefix/lib/cmake /usr/lib/cmake/clang + ln -frs --target-directory=prefix/lib /usr/lib/*LLVM* + ln -frs --target-directory=prefix/lib /usr/lib/libLTO* + ln -frs --target-directory=prefix/lib /usr/lib/libRemarks* + ln -frs --target-directory=prefix/lib /usr/lib/libclang* + ln -frs --target-directory=prefix/lib /usr/lib/clang + # ensure targets linking against system LLVM are also linked against system libc/libdl/libm + echo 'set_target_properties(LLVM PROPERTIES + INTERFACE_LINK_LIBRARIES "/usr/lib/libpthread.so.0;/usr/lib/libm.so.6;/usr/lib/libmvec.so.1;/usr/lib/libdl.so.2;/usr/lib/libc.so.6;/usr/lib/libc_nonshared.a;/usr/lib/ld-linux-x86-64.so.2")' \ + >> prefix/lib/cmake/llvm/LLVMExports-release.cmake + static-compat-cmake -G Ninja -B build -S $_pkgfqn \ + $ccache_args \ + -DCMAKE_SKIP_INSTALL_RPATH=ON \ + -DGLIB2_USE_PKG_CONFIG=ON \ + -DQT_FEATURE_static_runtime=ON \ + -DFEATURE_pkg_config=ON \ + -DLLVM_DIR="$PWD/prefix/lib/cmake/llvm" \ + -DClang_DIR="$PWD/prefix/lib/cmake/clang" + # ensure system libc/libdl/libm is present on the linker-line before other libs + sed -i -E 's|(LINK_LIBRARIES = )(.*libLLVM-13.so.*)|\1/usr/lib/libpthread.so.0 /usr/lib/libm.so.6 /usr/lib/libmvec.so.1 /usr/lib/libdl.so.2 /usr/lib/libc.so.6 \2|g' build/build.ninja + VERBOSE=1 cmake --build build +} + +package() { + source static-compat-environment + DESTDIR="$pkgdir" cmake --install build + + # Drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "$pkgdir/$static_compat_prefix/lib" -type f -name '*.prl' \ + -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; + + install -d "$pkgdir"/usr/share/licenses + ln -s /usr/share/licenses/static-compat-qt6-base "$pkgdir"/usr/share/licenses/$pkgname +} diff --git a/qt6-tools/static-compat/PKGBUILD.sh.ep b/qt6-tools/static-compat/PKGBUILD.sh.ep new file mode 100644 index 00000000..490f548d --- /dev/null +++ b/qt6-tools/static-compat/PKGBUILD.sh.ep @@ -0,0 +1,43 @@ +% layout 'static-compat-qt6-module', has_binaries => 1; +\ +_qtver=6.3.0 +pkgver=${_qtver/-/} +pkgrel=1 +arch=(x86_64) +url='https://www.qt.io' +license=(GPL3 LGPL3 FDL custom) +pkgdesc='A cross-platform application and UI framework (Development Tools, QtHelp)' +depends=(<%== qt6deps qw(base) %> hicolor-icon-theme) +makedepends=(static-compat-cmake <%== qt6deps qw(declarative) %> static-compat-vulkan-headers llvm clang ninja) +optdepends=('clang: for qdoc and lupdate') +% \ +% content_for before_build_config => begin + # use llvm/clang from regular prefix (by linking into a custom prefix as we must avoid `-isystem /usr/include`) + # note: Depending on Arch's normal LLVM/Clang is ok here as those tools are only used during build time and not + # distributed. + [[ -e prefix ]] && rm -r prefix + mkdir -p prefix/bin + pacman -Ql llvm clang | grep /usr/bin | cut -d ' ' -f 2 | xargs ln -frs --target-directory=prefix/bin + mkdir -p prefix/include + ln -frs --target-directory=prefix/include /usr/include/{llvm,clang}{,-c} + mkdir -p prefix/lib/cmake + cp -r --target-directory=prefix/lib/cmake /usr/lib/cmake/llvm + ln -frs --target-directory=prefix/lib/cmake /usr/lib/cmake/clang + ln -frs --target-directory=prefix/lib /usr/lib/*LLVM* + ln -frs --target-directory=prefix/lib /usr/lib/libLTO* + ln -frs --target-directory=prefix/lib /usr/lib/libRemarks* + ln -frs --target-directory=prefix/lib /usr/lib/libclang* + ln -frs --target-directory=prefix/lib /usr/lib/clang + # ensure targets linking against system LLVM are also linked against system libc/libdl/libm + echo 'set_target_properties(LLVM PROPERTIES + INTERFACE_LINK_LIBRARIES "/usr/lib/libpthread.so.0;/usr/lib/libm.so.6;/usr/lib/libmvec.so.1;/usr/lib/libdl.so.2;/usr/lib/libc.so.6;/usr/lib/libc_nonshared.a;/usr/lib/ld-linux-x86-64.so.2")' \\ + >> prefix/lib/cmake/llvm/LLVMExports-release.cmake +% end +% \ +% content_for additional_cmake_args => begin + \\ + -DLLVM_DIR="$PWD/prefix/lib/cmake/llvm" \\ + -DClang_DIR="$PWD/prefix/lib/cmake/clang" + # ensure system libc/libdl/libm is present on the linker-line before other libs + sed -i -E 's|(LINK_LIBRARIES = )(.*libLLVM-13.so.*)|\1/usr/lib/libpthread.so.0 /usr/lib/libm.so.6 /usr/lib/libmvec.so.1 /usr/lib/libdl.so.2 /usr/lib/libc.so.6 \2|g' build/build.ninja\ +% end diff --git a/qt6-tools/static-compat/qttools-sha256.txt b/qt6-tools/static-compat/qttools-sha256.txt new file mode 100644 index 00000000..20ac2b90 --- /dev/null +++ b/qt6-tools/static-compat/qttools-sha256.txt @@ -0,0 +1 @@ +6fe789cf7e1abc7f0ac39027c53e7880433425b234d448d1500e583e9c3ba498 diff --git a/qt6-translations/static-compat/PKGBUILD b/qt6-translations/static-compat/PKGBUILD new file mode 100644 index 00000000..77c89ed6 --- /dev/null +++ b/qt6-translations/static-compat/PKGBUILD @@ -0,0 +1,44 @@ +# Maintainer: Martchus + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +pkgname=static-compat-qt6-translations +_qtver=6.3.0 +pkgver=${_qtver/-/} +pkgrel=1 +arch=(any) +url='https://www.qt.io' +license=(GPL3 LGPL3 FDL custom) +pkgdesc='A cross-platform application and UI framework (Translations)' +depends=(static-compat-qt6-base) +makedepends=(static-compat-cmake static-compat-qt6-tools ninja) +options=('!strip' '!buildflags' 'staticlibs' '!emptydirs') +_pkgfqn="qttranslations-everywhere-src-${_qtver}" +source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${_qtver}/submodules/${_pkgfqn}.tar.xz") +sha256sums=('7da1d59db9ab5d25acce79cfefe51fbca79076e0fcb0a0abbfc2043324f140c6') + +build() { + check_buildoption ccache y && ccache_args=' + -DCMAKE_C_COMPILER_LAUNCHER=ccache + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache' + source static-compat-environment + export PATH=$PWD:$PATH + printf '#!/usr/bin/bash\nexec /usr/bin/pkg-config --static "$@"\n' > pkg-config + chmod +x pkg-config + static-compat-cmake -G Ninja -B build -S $_pkgfqn \ + $ccache_args \ + -DCMAKE_SKIP_INSTALL_RPATH=ON \ + -DGLIB2_USE_PKG_CONFIG=ON \ + -DQT_FEATURE_static_runtime=ON \ + -DFEATURE_pkg_config=ON + VERBOSE=1 cmake --build build +} + +package() { + source static-compat-environment + DESTDIR="$pkgdir" cmake --install build + + install -d "$pkgdir"/usr/share/licenses + ln -s /usr/share/licenses/static-compat-qt6-base "$pkgdir"/usr/share/licenses/$pkgname +} diff --git a/qt6-translations/static-compat/PKGBUILD.sh.ep b/qt6-translations/static-compat/PKGBUILD.sh.ep new file mode 100644 index 00000000..639791ea --- /dev/null +++ b/qt6-translations/static-compat/PKGBUILD.sh.ep @@ -0,0 +1,11 @@ +% layout 'static-compat-qt6-module', no_libs => 1; +\ +_qtver=6.3.0 +pkgver=${_qtver/-/} +pkgrel=1 +arch=(any) +url='https://www.qt.io' +license=(GPL3 LGPL3 FDL custom) +pkgdesc='A cross-platform application and UI framework (Translations)' +depends=(<%== qt6deps qw(base) %>) +makedepends=(static-compat-cmake <%== qt6deps qw(tools) %> ninja) diff --git a/qt6-translations/static-compat/qttranslations-sha256.txt b/qt6-translations/static-compat/qttranslations-sha256.txt new file mode 100644 index 00000000..12a5bfdd --- /dev/null +++ b/qt6-translations/static-compat/qttranslations-sha256.txt @@ -0,0 +1 @@ +7da1d59db9ab5d25acce79cfefe51fbca79076e0fcb0a0abbfc2043324f140c6 diff --git a/qt6-virtualkeyboard/static-compat/PKGBUILD b/qt6-virtualkeyboard/static-compat/PKGBUILD new file mode 100644 index 00000000..4f34f76a --- /dev/null +++ b/qt6-virtualkeyboard/static-compat/PKGBUILD @@ -0,0 +1,48 @@ +# Maintainer: Martchus + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +pkgname=static-compat-qt6-virtualkeyboard +_qtver=6.3.0 +pkgver=${_qtver/-/} +pkgrel=1 +arch=(x86_64) +url='https://www.qt.io' +license=(GPL3 LGPL3 FDL custom) +pkgdesc='Virtual keyboard framework' +depends=(static-compat-qt6-declarative static-compat-qt6-svg) +makedepends=(static-compat-cmake static-compat-qt6-shadertools ninja) +options=('!strip' '!buildflags' 'staticlibs' '!emptydirs') +_pkgfqn="qtvirtualkeyboard-everywhere-src-${_qtver}" +source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${_qtver}/submodules/${_pkgfqn}.tar.xz") +sha256sums=('89aaf15acf5432af8f5cf4ec45cb32d87a3348906215dd56e81cb294eb276573') + +build() { + check_buildoption ccache y && ccache_args=' + -DCMAKE_C_COMPILER_LAUNCHER=ccache + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache' + source static-compat-environment + export PATH=$PWD:$PATH + printf '#!/usr/bin/bash\nexec /usr/bin/pkg-config --static "$@"\n' > pkg-config + chmod +x pkg-config + static-compat-cmake -G Ninja -B build -S $_pkgfqn \ + $ccache_args \ + -DCMAKE_SKIP_INSTALL_RPATH=ON \ + -DGLIB2_USE_PKG_CONFIG=ON \ + -DQT_FEATURE_static_runtime=ON \ + -DFEATURE_pkg_config=ON + VERBOSE=1 cmake --build build +} + +package() { + source static-compat-environment + DESTDIR="$pkgdir" cmake --install build + + # Drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "$pkgdir/$static_compat_prefix/lib" -type f -name '*.prl' \ + -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; + + install -d "$pkgdir"/usr/share/licenses + ln -s /usr/share/licenses/static-compat-qt6-base "$pkgdir"/usr/share/licenses/$pkgname +} diff --git a/qt6-virtualkeyboard/static-compat/PKGBUILD.sh.ep b/qt6-virtualkeyboard/static-compat/PKGBUILD.sh.ep new file mode 100644 index 00000000..949d1388 --- /dev/null +++ b/qt6-virtualkeyboard/static-compat/PKGBUILD.sh.ep @@ -0,0 +1,11 @@ +% layout 'static-compat-qt6-module'; +\ +_qtver=6.3.0 +pkgver=${_qtver/-/} +pkgrel=1 +arch=(x86_64) +url='https://www.qt.io' +license=(GPL3 LGPL3 FDL custom) +pkgdesc='Virtual keyboard framework' +depends=(<%== qt6deps qw(declarative svg) %>) +makedepends=(static-compat-cmake static-compat-qt6-shadertools ninja) diff --git a/qt6-virtualkeyboard/static-compat/qtvirtualkeyboard-sha256.txt b/qt6-virtualkeyboard/static-compat/qtvirtualkeyboard-sha256.txt new file mode 100644 index 00000000..80689bea --- /dev/null +++ b/qt6-virtualkeyboard/static-compat/qtvirtualkeyboard-sha256.txt @@ -0,0 +1 @@ +89aaf15acf5432af8f5cf4ec45cb32d87a3348906215dd56e81cb294eb276573 diff --git a/qt6-wayland/static-compat/PKGBUILD b/qt6-wayland/static-compat/PKGBUILD new file mode 100644 index 00000000..67fa992c --- /dev/null +++ b/qt6-wayland/static-compat/PKGBUILD @@ -0,0 +1,48 @@ +# Maintainer: Martchus + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +pkgname=static-compat-qt6-wayland +_qtver=6.3.0 +pkgver=${_qtver/-/} +pkgrel=1 +arch=(x86_64) +url='https://www.qt.io' +license=(GPL3 LGPL3 FDL custom) +pkgdesc='Provides APIs for Wayland' +depends=(static-compat-qt6-declarative static-compat-libxcomposite) +makedepends=(static-compat-cmake static-compat-vulkan-headers ninja) +options=('!strip' '!buildflags' 'staticlibs' '!emptydirs') +_pkgfqn="qtwayland-everywhere-src-${_qtver}" +source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${_qtver}/submodules/${_pkgfqn}.tar.xz") +sha256sums=('a54d6530588998f2e011fc873f5744f0ab194f2286241f4aa8d7a7bc2967576f') + +build() { + check_buildoption ccache y && ccache_args=' + -DCMAKE_C_COMPILER_LAUNCHER=ccache + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache' + source static-compat-environment + export PATH=$PWD:$PATH + printf '#!/usr/bin/bash\nexec /usr/bin/pkg-config --static "$@"\n' > pkg-config + chmod +x pkg-config + static-compat-cmake -G Ninja -B build -S $_pkgfqn \ + $ccache_args \ + -DCMAKE_SKIP_INSTALL_RPATH=ON \ + -DGLIB2_USE_PKG_CONFIG=ON \ + -DQT_FEATURE_static_runtime=ON \ + -DFEATURE_pkg_config=ON + VERBOSE=1 cmake --build build +} + +package() { + source static-compat-environment + DESTDIR="$pkgdir" cmake --install build + + # Drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "$pkgdir/$static_compat_prefix/lib" -type f -name '*.prl' \ + -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; + + install -d "$pkgdir"/usr/share/licenses + ln -s /usr/share/licenses/static-compat-qt6-base "$pkgdir"/usr/share/licenses/$pkgname +} diff --git a/qt6-wayland/static-compat/PKGBUILD.sh.ep b/qt6-wayland/static-compat/PKGBUILD.sh.ep new file mode 100644 index 00000000..34d8c7c7 --- /dev/null +++ b/qt6-wayland/static-compat/PKGBUILD.sh.ep @@ -0,0 +1,11 @@ +% layout 'static-compat-qt6-module'; +\ +_qtver=6.3.0 +pkgver=${_qtver/-/} +pkgrel=1 +arch=(x86_64) +url='https://www.qt.io' +license=(GPL3 LGPL3 FDL custom) +pkgdesc='Provides APIs for Wayland' +depends=(<%== qt6deps qw(declarative) %> static-compat-libxcomposite) +makedepends=(static-compat-cmake static-compat-vulkan-headers ninja) diff --git a/qt6-wayland/static-compat/qtwayland-sha256.txt b/qt6-wayland/static-compat/qtwayland-sha256.txt new file mode 100644 index 00000000..3024de28 --- /dev/null +++ b/qt6-wayland/static-compat/qtwayland-sha256.txt @@ -0,0 +1 @@ +a54d6530588998f2e011fc873f5744f0ab194f2286241f4aa8d7a7bc2967576f diff --git a/qtforkawesome/static-compat/PKGBUILD b/qtforkawesome/static-compat/PKGBUILD new file mode 100644 index 00000000..5f31db27 --- /dev/null +++ b/qtforkawesome/static-compat/PKGBUILD @@ -0,0 +1,60 @@ +# Maintainer: Martchus + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +_reponame=qtforkawesome +_pkgver_forkawesome=1.2.0 +_reponame_forkawesome=Fork-Awesome-$_pkgver_forkawesome +pkgname=static-compat-qtforkawesome +_name=${pkgname#static-compat-} +pkgver=0.0.3 +pkgrel=1 +arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64') +pkgdesc='Library that bundles ForkAwesome for use within Qt applications' +license=('GPL') +depends=('static-compat-qt6-base') +makedepends=('static-compat-cmake' 'ninja' 'perl-yaml-libyaml' 'static-compat-qtutilities' 'static-compat-qt6-declarative' 'clang') +optdepends=( + 'static-compat-qt6-declarative: Qt Quick integration' + "$_name-doc: API documentation" +) +url="https://github.com/Martchus/${_reponame}" +source=("${_name}-${pkgver}.tar.gz::https://github.com/Martchus/${_reponame}/archive/v${pkgver}.tar.gz" + "${_reponame_forkawesome}::https://github.com/ForkAwesome/Fork-Awesome/archive/refs/tags/${_pkgver_forkawesome}.tar.gz") +sha256sums=('052cb462ee2711692ea13528a21a3fc907421ed370c0f18658fe40693eb46e3a' + '23fba5f191f204e0414c547bf4c9b10fd7ca42c151260e8f64698449a75fbdb3') + +build() { + check_buildoption ccache y && ccache_args=' + -DCMAKE_C_COMPILER_LAUNCHER=ccache + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache' + export CXXFLAGS+=' -static-libgcc -static-libstdc++' + source static-compat-environment + export PATH=$PWD:$PATH + printf '#!/usr/bin/bash\nexec /usr/bin/pkg-config --static "$@"\n' > pkg-config + chmod +x pkg-config + cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}" + static-compat-cmake \ + -G Ninja \ + -DQT_PACKAGE_PREFIX:STRING='Qt6' \ + -DBUILTIN_TRANSLATIONS:BOOL=ON \ + -DSVG_SUPPORT:BOOL=OFF \ + -DSVG_ICON_SUPPORT:BOOL=OFF \ + -DFORK_AWESOME_FONT_FILE="$srcdir/${_reponame_forkawesome}/fonts/forkawesome-webfont.woff2" \ + -DFORK_AWESOME_ICON_DEFINITIONS="$srcdir/${_reponame_forkawesome}/src/icons/icons.yml" \ + . + ninja +} + +check() { + source static-compat-environment + cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}" + QT_QPA_PLATFORM=offscreen ninja check +} + +package() { + source static-compat-environment + cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}" + DESTDIR="${pkgdir}" ninja install +} diff --git a/qtutilities/static-compat/PKGBUILD b/qtutilities/static-compat/PKGBUILD new file mode 100644 index 00000000..d7190865 --- /dev/null +++ b/qtutilities/static-compat/PKGBUILD @@ -0,0 +1,50 @@ +# Maintainer: Martchus + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +_reponame=qtutilities +pkgname=static-compat-qtutilities +_name=${pkgname#static-compat-} +pkgver=6.6.0 +pkgrel=1 +arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64') +pkgdesc='Common Qt related C++ classes and routines used by my applications such as dialogs, widgets and models' +license=('GPL') +depends=('static-compat-c++utilities' 'static-compat-qt6-base') +makedepends=('static-compat-cmake' 'ninja' 'static-compat-qt6-tools' 'clang') +optdepends=("$_name-doc: API documentation") +url="https://github.com/Martchus/${_reponame}" +source=("${_name}-${pkgver}.tar.gz::https://github.com/Martchus/${_reponame}/archive/v${pkgver}.tar.gz") +sha256sums=('2dda37fd6e1cd957f0a2b395ce424ca23cfc893310c0cebc82d89dc960239d13') + +build() { + check_buildoption ccache y && ccache_args=' + -DCMAKE_C_COMPILER_LAUNCHER=ccache + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache' + export CXXFLAGS+=' -static-libgcc -static-libstdc++' + source static-compat-environment + export PATH=$PWD:$PATH + printf '#!/usr/bin/bash\nexec /usr/bin/pkg-config --static "$@"\n' > pkg-config + chmod +x pkg-config + cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}" + static-compat-cmake -G Ninja \ + -DQT_PACKAGE_PREFIX:STRING='Qt6' \ + -DBUILTIN_TRANSLATIONS:BOOL=ON \ + -DSVG_SUPPORT:BOOL=OFF \ + -DSVG_ICON_SUPPORT:BOOL=OFF \ + . + ninja +} + +check() { + source static-compat-environment + cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}" + QT_QPA_PLATFORM=offscreen ninja check +} + +package() { + source static-compat-environment + cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}" + DESTDIR="${pkgdir}" ninja install +} diff --git a/readline/static-compat/PKGBUILD b/readline/static-compat/PKGBUILD new file mode 100644 index 00000000..7fe5d56a --- /dev/null +++ b/readline/static-compat/PKGBUILD @@ -0,0 +1,65 @@ +# Contributor: Giancarlo Razzolini +# Contributor: Bartłomiej Piotrowski +# Contributor: Allan McRae +# Contributor: judd + +_pkgname=readline +pkgname=static-compat-$_pkgname +_basever=8.1 +_patchlevel=002 +pkgver=${_basever}.${_patchlevel} +pkgrel=1 +pkgdesc='GNU readline library' +arch=('x86_64') +url='https://tiswww.case.edu/php/chet/readline/rltop.html' +license=('GPL') +backup=('etc/inputrc') +depends=(glibc-static-compat static-compat-ncurses) +makedepends=(static-compat-configure) +options=('!emptydirs' 'staticlibs') +source=(https://ftp.gnu.org/gnu/readline/readline-$_basever.tar.gz{,.sig} + inputrc) +validpgpkeys=('7C0135FB088AAF6C66C650B9BB5869F064EA74AB') # Chet Ramey + +if [ $_patchlevel -gt 0 ]; then + for (( _p=1; _p <= $((10#${_patchlevel})); _p++ )); do + source=(${source[@]} https://ftp.gnu.org/gnu/readline/readline-$_basever-patches/readline${_basever//.}-$(printf "%03d" $_p){,.sig}) + done +fi + +prepare() { + cd $_pkgname-$_basever + for (( _p=1; _p <= $((10#${_patchlevel})); _p++ )); do + msg "applying patch readline${_basever//.}-$(printf "%03d" $_p)" + patch -p0 -i ../readline${_basever//.}-$(printf "%03d" $_p) + done + + # remove RPATH from shared objects (FS#14366) + sed -i 's|-Wl,-rpath,$(libdir) ||g' support/shobj-conf +} + +build() { + source static-compat-environment + cd $_pkgname-$_basever + + # build with -fPIC for x86_64 (FS#15634) + [[ $CARCH == "x86_64" ]] && CFLAGS="$CFLAGS -fPIC" + + static-compat-configure --disable-shared + make SHLIB_LIBS=-lncurses +} + +package() { + source static-compat-environment + make -C $_pkgname-$_basever DESTDIR="$pkgdir" install + rm -r "$pkgdir/$static_compat_prefix"/share/{doc,info,man} + find "$pkgdir/$static_compat_prefix"/lib -iname '*.so*' -delete +} + +md5sums=('e9557dd5b1409f5d7b37ef717c64518e' + 'SKIP' + '58d54966c1191db45973cb3191ac621a' + '8d127cb06ae797a05fba88ada117e6f7' + 'SKIP' + '41cd79733ec880809f3cee0c2e8e2483' + 'SKIP') diff --git a/readline/static-compat/inputrc b/readline/static-compat/inputrc new file mode 100644 index 00000000..fd13a673 --- /dev/null +++ b/readline/static-compat/inputrc @@ -0,0 +1,36 @@ +# do not bell on tab-completion +#set bell-style none + +set meta-flag on +set input-meta on +set convert-meta off +set output-meta on + +$if mode=emacs + +# for linux console and RH/Debian xterm +"\e[1~": beginning-of-line +"\e[4~": end-of-line +"\e[5~": beginning-of-history +"\e[6~": end-of-history +"\e[7~": beginning-of-line +"\e[3~": delete-char +"\e[2~": quoted-insert +"\e[5C": forward-word +"\e[5D": backward-word +"\e\e[C": forward-word +"\e\e[D": backward-word +"\e[1;5C": forward-word +"\e[1;5D": backward-word + +# for rxvt +"\e[8~": end-of-line + +# for non RH/Debian xterm, can't hurt for RH/DEbian xterm +"\eOH": beginning-of-line +"\eOF": end-of-line + +# for freebsd console +"\e[H": beginning-of-line +"\e[F": end-of-line +$endif diff --git a/sqlite/static-compat/PKGBUILD b/sqlite/static-compat/PKGBUILD new file mode 100644 index 00000000..6694cdfa --- /dev/null +++ b/sqlite/static-compat/PKGBUILD @@ -0,0 +1,74 @@ +# Contributor: Andreas Radke +# Contributor: Tom Newsom + +_pkgname=sqlite +pkgname=static-compat-$_pkgname +_srcver=3380200 +_docver=${_srcver} +#_docver=3330000 +pkgver=3.38.2 +pkgrel=1 +pkgdesc="A C library that implements an SQL database engine" +arch=('x86_64') +license=('custom:Public Domain') +url="https://www.sqlite.org/" +depends=(static-compat-zlib static-compat-readline) +makedepends=(static-compat-configure static-compat-tcl patchelf) +source=(https://www.sqlite.org/2022/sqlite-src-${_srcver}.zip + sqlite-lemon-system-template.patch + license.txt) +options=('!emptydirs' '!makeflags' 'staticlibs') # json extensions breaks parallel build +# upstream now switched to sha3sums - currently not suppoerted by makepkg +sha256sums=('c7c0f070a338c92eb08805905c05f254fa46d1c4dda3548a02474f6fb567329a' + '55746d93b0df4b349c4aa4f09535746dac3530f9fd6de241c9f38e2c92e8ee97' + '4e57d9ac979f1c9872e69799c2597eeef4c6ce7224f3ede0bf9dc8d217b1e65d') + +prepare() { + cd sqlite-src-$_srcver + + # patch taken from Fedora + # https://src.fedoraproject.org/rpms/sqlite/blob/master/f/sqlite.spec + patch -Np1 -i ../sqlite-lemon-system-template.patch + + #autoreconf -vfi +} + +build() { + source static-compat-environment + export PATH=$PWD:$PATH + printf '#!/usr/bin/bash\nexec /usr/bin/pkg-config --static "$@"\n' > pkg-config + chmod +x pkg-config + export CPPFLAGS="$CPPFLAGS \ + -DSQLITE_ENABLE_COLUMN_METADATA=1 \ + -DSQLITE_ENABLE_UNLOCK_NOTIFY \ + -DSQLITE_ENABLE_DBSTAT_VTAB=1 \ + -DSQLITE_ENABLE_FTS3_TOKENIZER=1 \ + -DSQLITE_SECURE_DELETE \ + -DSQLITE_ENABLE_STMTVTAB \ + -DSQLITE_MAX_VARIABLE_NUMBER=250000 \ + -DSQLITE_MAX_EXPR_DEPTH=10000 \ + -DSQLITE_ENABLE_MATH_FUNCTIONS" + + # build sqlite + cd sqlite-src-$_srcver + static-compat-configure \ + --disable-amalgamation \ + --disable-shared \ + --enable-fts3 \ + --enable-fts4 \ + --enable-fts5 \ + --enable-rtree \ + --enable-json1 \ + TCLLIBDIR="$static_compat_prefix"/lib/sqlite$pkgver + sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool + make +} + +package() { + source static-compat-environment + cd sqlite-src-$_srcver + make DESTDIR="${pkgdir}" install + + patchelf --remove-rpath "${pkgdir}/$static_compat_prefix"/bin/sqlite3 + install -D -m644 "${srcdir}"/license.txt "${pkgdir}"/usr/share/licenses/${pkgname}/license.txt +} diff --git a/sqlite/static-compat/license.txt b/sqlite/static-compat/license.txt new file mode 100644 index 00000000..118c5d5e --- /dev/null +++ b/sqlite/static-compat/license.txt @@ -0,0 +1,33 @@ +SQLite Copyright +SQLite is in the +Public Domain + + +All of the deliverable code in SQLite has been dedicated to the public domain by the authors. All code authors, and representatives of the companies they work for, have signed affidavits dedicating their contributions to the public domain and originals of those signed affidavits are stored in a firesafe at the main offices of Hwaci. Anyone is free to copy, modify, publish, use, compile, sell, or distribute the original SQLite code, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. + +The previous paragraph applies to the deliverable code in SQLite - those parts of the SQLite library that you actually bundle and ship with a larger application. Portions of the documentation and some code used as part of the build process might fall under other licenses. The details here are unclear. We do not worry about the licensing of the documentation and build code so much because none of these things are part of the core deliverable SQLite library. + +All of the deliverable code in SQLite has been written from scratch. No code has been taken from other projects or from the open internet. Every line of code can be traced back to its original author, and all of those authors have public domain dedications on file. So the SQLite code base is clean and is uncontaminated with licensed code from other projects. +Obtaining An Explicit License To Use SQLite + +Even though SQLite is in the public domain and does not require a license, some users want to obtain a license anyway. Some reasons for obtaining a license include: +You are using SQLite in a jurisdiction that does not recognize the public domain. +You are using SQLite in a jurisdiction that does not recognize the right of an author to dedicate their work to the public domain. +You want to hold a tangible legal document as evidence that you have the legal right to use and distribute SQLite. +Your legal department tells you that you have to purchase a license. + +If you feel like you really have to purchase a license for SQLite, Hwaci, the company that employs the architect and principal developers of SQLite, will sell you one. +Contributed Code + +In order to keep SQLite completely free and unencumbered by copyright, all new contributors to the SQLite code base are asked to dedicate their contributions to the public domain. If you want to send a patch or enhancement for possible inclusion in the SQLite source tree, please accompany the patch with the following statement: +The author or authors of this code dedicate any and all copyright interest in this code to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this code under copyright law. + +We are not able to accept patches or changes to SQLite that are not accompanied by a statement such as the above. In addition, if you make changes or enhancements as an employee, then a simple statement such as the above is insufficient. You must also send by surface mail a copyright release signed by a company officer. A signed original of the copyright release should be mailed to: +Hwaci +6200 Maple Cove Lane +Charlotte, NC 28269 +USA + +A template copyright release is available in PDF or HTML. You can use this release to make future changes. + +see http://www.sqlite.org/copyright.html \ No newline at end of file diff --git a/sqlite/static-compat/sqlite-lemon-system-template.patch b/sqlite/static-compat/sqlite-lemon-system-template.patch new file mode 100644 index 00000000..d4ed6c0b --- /dev/null +++ b/sqlite/static-compat/sqlite-lemon-system-template.patch @@ -0,0 +1,13 @@ +diff --git a/tool/lemon.c b/tool/lemon.c +index 54c8946..ac14a06 100644 +--- a/tool/lemon.c ++++ b/tool/lemon.c +@@ -3668,6 +3668,8 @@ PRIVATE FILE *tplt_open(struct lemon *lemp) + tpltname = buf; + }else if( access(templatename,004)==0 ){ + tpltname = templatename; ++ }else if( access("/usr/share/lemon/lempar.c", R_OK)==0){ ++ tpltname = "/usr/share/lemon/lempar.c"; + }else{ + toFree = tpltname = pathsearch(lemp->argv0,templatename,0); + } diff --git a/syncthingtray/mingw-w64-qt6/PKGBUILD b/syncthingtray/mingw-w64-qt6/PKGBUILD index 15c6ac07..b366056d 100644 --- a/syncthingtray/mingw-w64-qt6/PKGBUILD +++ b/syncthingtray/mingw-w64-qt6/PKGBUILD @@ -10,7 +10,7 @@ _webview_provider=${MINGW_W64_SYNCTHING_TRAY_WEBVIEW_PROVIDER:-none} _js_provider=${MINGW_W64_SYNCTHING_TRAY_JS_PROVIDER:-qml} # set whether libsyncthing should be enabled: either ON or OFF -_enable_libsyncthing=${MINGW_W64_SYNCTHING_TRAY_JS_PROVIDER:-ON} +_enable_libsyncthing=${MINGW_W64_SYNCTHING_TRAY_ENABLE_LIBSYNCTHING:-ON} _reponame=syncthingtray pkgname=mingw-w64-syncthingtray-qt6 diff --git a/syncthingtray/mingw-w64/PKGBUILD b/syncthingtray/mingw-w64/PKGBUILD index 49ae0148..dd5b7a28 100644 --- a/syncthingtray/mingw-w64/PKGBUILD +++ b/syncthingtray/mingw-w64/PKGBUILD @@ -10,7 +10,7 @@ _webview_provider=${MINGW_W64_SYNCTHING_TRAY_WEBVIEW_PROVIDER:-none} _js_provider=${MINGW_W64_SYNCTHING_TRAY_JS_PROVIDER:-qml} # set whether libsyncthing should be enabled: either ON or OFF -_enable_libsyncthing=${MINGW_W64_SYNCTHING_TRAY_JS_PROVIDER:-ON} +_enable_libsyncthing=${MINGW_W64_SYNCTHING_TRAY_ENABLE_LIBSYNCTHING:-ON} _reponame=syncthingtray pkgname=mingw-w64-syncthingtray diff --git a/syncthingtray/static-compat/PKGBUILD b/syncthingtray/static-compat/PKGBUILD new file mode 100644 index 00000000..5e5f6d5a --- /dev/null +++ b/syncthingtray/static-compat/PKGBUILD @@ -0,0 +1,126 @@ +# Maintainer: Martchus + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +# if tests fail due to timeout, you can try to increase the timeout +# by setting SYNCTHING_TEST_TIMEOUT_FACTOR + +# set the web view provider: either webkit, webengine, auto or none +_webview_provider=${SYNCTHING_TRAY_WEBVIEW_PROVIDER:-none} + +# set the JavaScript provider: either script, qml, auto or none +_js_provider=${SYNCTHING_TRAY_JS_PROVIDER:-qml} + +# set to non-empty string to enable KIO plugin to show Syncthing actions in +# Dolphin file browser +_enable_kio_plugin=${SYNCTHING_TRAY_ENABLE_KIO_PLUGIN:-0} + +# set to non-empty string to enable Plasmoid for Plasma 5 desktop +_enable_plasmoid=${SYNCTHING_TRAY_ENABLE_PLASMOID:-0} + +# set whether libsyncthing should be enabled: either ON or OFF +_enable_libsyncthing=${SYNCTHING_TRAY_ENABLE_LIBSYNCTHING:-ON} + +[[ $_enable_kio_plugin == 0 ]] && _enable_kio_plugin= +[[ $_enable_plasmoid == 0 ]] && _enable_plasmoid= + +_reponame=syncthingtray +pkgname=static-compat-syncthingtray +_name=${pkgname#static-compat-} +pkgver=1.1.17 +pkgrel=1 +arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64') +pkgdesc='Tray application for Syncthing' +license=('GPL') +depends=('static-compat-qtutilities' 'static-compat-qtforkawesome' 'static-compat-boost' 'static-compat-qt6-svg' 'static-compat-openssl') +[[ $_webview_provider == none ]] && depends+=('static-compat-qt6-base') +[[ $_webview_provider == webkit ]] && depends+=('static-compat-qt6-webkit') +[[ $_webview_provider == webengine ]] && depends+=('static-compat-qt6-webengine') +[[ $_js_provider == script ]] && depends+=('static-compat-qt6-script') +[[ $_js_provider == qml ]] && depends+=('static-compat-qt6-declarative') +[[ $_enable_kio_plugin ]] && optdepends+=('static-compat-kio: KIO plugin for Syncthing actions in Dolphin') +[[ $_enable_plasmoid ]] && optdepends+=('static-compat-plasma-workspace: Plasmoid for Plasma 6 desktop') +makedepends=('static-compat-cmake' 'ninja' 'static-compat-qt6-tools' 'clang') +[[ $_enable_libsyncthing == ON ]] && makedepends+=('git' 'go') +checkdepends=('static-compat-cppunit' 'syncthing' 'iproute2') +[[ $_enable_kio_plugin ]] && makedepends+=('static-compat-kio') +[[ $_enable_plasmoid ]] && makedepends+=('static-compat-plasma-framework' 'extra-cmake-modules') +url="https://github.com/Martchus/${_reponame}" +source=("${_name}-${pkgver}.tar.gz::https://github.com/Martchus/${_reponame}/archive/v${pkgver}.tar.gz") +[[ $_enable_libsyncthing == ON ]] && source+=("syncthing::git+https://github.com/Martchus/syncthing.git#branch=libsyncthing-latest") +sha256sums=('11cdc8fdc3f5109af0bff0359ecb12f254348abf55c64c790c487d2c9b0af973' + 'SKIP') + +[[ $_enable_libsyncthing == ON ]] && _disable_libsyncthing=OFF || _disable_libsyncthing=ON + +ephemeral_port() { + comm -23 <(seq 49152 65535) <(ss -tan | awk '{print $4}' | cut -d':' -f2 | grep "[0-9]\{1,5\}" | sort | uniq) | shuf | head -n 1 +} + +prepare() { + cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}" + [[ $_enable_libsyncthing == ON ]] || return 0 + + # ensure path where the libsyncthing Git submodule would be cloned into exists + mkdir -p 'libsyncthing/go/src/github.com/syncthing' + pushd 'libsyncthing/go/src/github.com/syncthing' + + # delete empty sub directory of the Git submodule present in the archive from GitHub + [[ -d syncthing ]] && rm -r syncthing + + # link libsyncthing repo where the Git submodule would have been cloned into + ln -sf "$srcdir/syncthing" . + + popd +} + +build() { + check_buildoption ccache y && ccache_args=' + -DCMAKE_C_COMPILER_LAUNCHER=ccache + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache' + export CXXFLAGS+=' -static-libgcc -static-libstdc++' + export LDFLAGS+=' -static-libgcc -static-libstdc++' + source static-compat-environment + export PATH=$PWD:$PATH + printf '#!/usr/bin/bash\nexec /usr/bin/pkg-config --static "$@"\n' > pkg-config + chmod +x pkg-config + cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}" + + local additional_args= + [[ $_enable_kio_plugin ]] || additional_args+=' -DNO_FILE_ITEM_ACTION_PLUGIN=ON' + [[ $_enable_plasmoid ]] || additional_args+=' -DNO_PLASMOID=ON' + + static-compat-cmake \ + -G Ninja \ + -DQT_PACKAGE_PREFIX:STRING='Qt6' \ + -DBUILTIN_TRANSLATIONS:BOOL=ON \ + -DBUILTIN_TRANSLATIONS_OF_QT:BOOL=ON \ + -DWEBVIEW_PROVIDER="${_webview_provider}" \ + -DJS_PROVIDER="${_js_provider}" \ + -DSYSTEMD_SUPPORT=ON \ + -DBoost_USE_STATIC_RUNTIME:BOOL=ON \ + -DNO_LIBSYNCTHING:BOOL="${_disable_libsyncthing}" \ + -DUSE_LIBSYNCTHING:BOOL="${_enable_libsyncthing}" \ + $additional_args \ + . + ninja +} + +check() { + check_buildoption ccache y && ccache_args=' + -DCMAKE_C_COMPILER_LAUNCHER=ccache + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache' + export CXXFLAGS+=' -static-libgcc -static-libstdc++' + export LDFLAGS+=' -static-libgcc -static-libstdc++' + source static-compat-environment + export PATH=$PWD:$PATH + cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}" + SYNCTHING_PORT=$(ephemeral_port) SYNCTHING_TEST_TIMEOUT_FACTOR=3 ninja check +} + +package() { + source static-compat-environment + cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}" + DESTDIR="${pkgdir}" ninja install +} diff --git a/systemd/static-compat/0001-Strip-down-build-script.patch b/systemd/static-compat/0001-Strip-down-build-script.patch new file mode 100644 index 00000000..891ec046 --- /dev/null +++ b/systemd/static-compat/0001-Strip-down-build-script.patch @@ -0,0 +1,2561 @@ +From 1cae5feb791183394dd700fdc9284be154362e2b Mon Sep 17 00:00:00 2001 +From: Martchus +Date: Thu, 14 Apr 2022 22:28:31 +0200 +Subject: [PATCH] Strip down build script + +--- + meson.build | 1711 ------------------------------------ + src/libsystemd/meson.build | 134 --- + src/test/meson.build | 616 ------------- + src/udev/meson.build | 6 - + 4 files changed, 2467 deletions(-) + +diff --git a/meson.build b/meson.build +index cb9936ee8b..e94665cf94 100644 +--- a/meson.build ++++ b/meson.build +@@ -1902,1633 +1902,9 @@ if conf.get('HAVE_LIBCRYPTSETUP_PLUGINS') == 1 + endif + endif + +-############################################################ +- +-# systemd-analyze requires 'libcore' +-subdir('src/core') +-# systemd-journal-remote requires 'libjournal_core' +-subdir('src/journal') +-# systemd-networkd requires 'libsystemd_network' +-subdir('src/libsystemd-network') +- +-subdir('src/analyze') +-subdir('src/busctl') +-subdir('src/coredump') +-subdir('src/cryptenroll') +-subdir('src/cryptsetup') +-subdir('src/home') +-subdir('src/hostname') +-subdir('src/import') +-subdir('src/journal-remote') +-subdir('src/kernel-install') + subdir('src/locale') +-subdir('src/login') +-subdir('src/machine') +-subdir('src/network') +-subdir('src/nspawn') +-subdir('src/oom') +-subdir('src/partition') +-subdir('src/portable') +-subdir('src/pstore') +-subdir('src/resolve') +-subdir('src/rpm') +-subdir('src/shutdown') +-subdir('src/sysext') +-subdir('src/systemctl') +-subdir('src/timedate') +-subdir('src/timesync') +-subdir('src/tmpfiles') +-subdir('src/userdb') +-subdir('src/vconsole') +-subdir('src/xdg-autostart-generator') +- + subdir('src/systemd') +- + subdir('src/test') +-subdir('src/fuzz') +-subdir('rules.d') +-subdir('test') +- +-############################################################ +- +-# only static linking apart from libdl, to make sure that the +-# module is linked to all libraries that it uses. +-test_dlopen = executable( +- 'test-dlopen', +- test_dlopen_c, +- disable_mempool_c, +- include_directories : includes, +- link_with : [libbasic], +- dependencies : [libdl], +- build_by_default : want_tests != 'false') +- +-foreach tuple : [['myhostname', 'ENABLE_NSS_MYHOSTNAME'], +- ['systemd', 'ENABLE_NSS_SYSTEMD', ['nss-systemd.h', 'userdb-glue.c', 'userdb-glue.h']], +- ['mymachines', 'ENABLE_NSS_MYMACHINES'], +- ['resolve', 'ENABLE_NSS_RESOLVE', [], resolve_includes]] +- +- condition = tuple[1] == '' or conf.get(tuple[1]) == 1 +- if condition +- module = tuple[0] +- +- sym = 'src/nss-@0@/nss-@0@.sym'.format(module) +- version_script_arg = project_source_root / sym +- +- sources = ['src/nss-@0@/nss-@0@.c'.format(module)] +- if tuple.length() > 2 +- foreach s : tuple[2] +- sources += ['src/nss-@0@/@1@'.format(module, s)] +- endforeach +- endif +- +- incs = tuple.length() > 3 ? tuple[3] : includes +- +- nss = shared_library( +- 'nss_' + module, +- sources, +- disable_mempool_c, +- version : '2', +- include_directories : incs, +- # Note that we link NSS modules with '-z nodelete' so that mempools never get orphaned +- link_args : ['-Wl,-z,nodelete', +- '-shared', +- '-Wl,--version-script=' + version_script_arg], +- link_with : [libsystemd_static, +- libshared_static, +- libbasic], +- dependencies : [threads, +- librt], +- link_depends : sym, +- install : true, +- install_dir : rootlibdir) +- +- # We cannot use shared_module because it does not support version suffix. +- # Unfortunately shared_library insists on creating the symlink… +- meson.add_install_script('sh', '-c', +- 'rm $DESTDIR@0@/libnss_@1@.so' +- .format(rootlibdir, module)) +- +- if want_tests != 'false' +- test('dlopen-nss_' + module, +- test_dlopen, +- # path to dlopen must include a slash +- args : nss.full_path()) +- endif +- endif +-endforeach +- +-############################################################ +- +-dbus_programs += executable( +- 'systemd', +- systemd_sources, +- include_directories : includes, +- link_with : [libcore, +- libshared], +- dependencies : [versiondep, +- threads, +- librt, +- libseccomp, +- libselinux, +- libmount, +- libblkid], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +- +-meson.add_install_script(meson_make_symlink, +- rootlibexecdir / 'systemd', +- rootsbindir / 'init') +- +-public_programs += executable( +- 'systemd-analyze', +- systemd_analyze_sources, +- include_directories : core_includes, +- link_with : [libcore, +- libshared], +- dependencies : [versiondep, +- threads, +- librt, +- libseccomp, +- libselinux, +- libmount, +- libblkid], +- install_rpath : rootlibexecdir, +- install : conf.get('ENABLE_ANALYZE')) +- +-executable( +- 'systemd-journald', +- systemd_journald_sources, +- include_directories : includes, +- link_with : [libjournal_core, +- libshared], +- dependencies : [threads, +- libxz, +- liblz4, +- libselinux, +- libzstd], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +- +-public_programs += executable( +- 'systemd-cat', +- systemd_cat_sources, +- include_directories : includes, +- link_with : [libjournal_core, +- libshared], +- dependencies : [threads], +- install_rpath : rootlibexecdir, +- install : true) +- +-public_programs += executable( +- 'journalctl', +- journalctl_sources, +- include_directories : includes, +- link_with : [libshared], +- dependencies : [threads, +- libdl, +- libxz, +- liblz4, +- libzstd, +- libdl], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootbindir) +- +-executable( +- 'systemd-getty-generator', +- 'src/getty-generator/getty-generator.c', +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : systemgeneratordir) +- +-executable( +- 'systemd-debug-generator', +- 'src/debug-generator/debug-generator.c', +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : systemgeneratordir) +- +-executable( +- 'systemd-run-generator', +- 'src/run-generator/run-generator.c', +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : systemgeneratordir) +- +-exe = executable( +- 'systemd-fstab-generator', +- 'src/fstab-generator/fstab-generator.c', +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : systemgeneratordir) +- +-if want_tests != 'false' +- test('test-fstab-generator', +- test_fstab_generator_sh, +- # https://github.com/mesonbuild/meson/issues/2681 +- args : exe.full_path()) +-endif +- +-if conf.get('ENABLE_ENVIRONMENT_D') == 1 +- executable( +- '30-systemd-environment-d-generator', +- 'src/environment-d-generator/environment-d-generator.c', +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : userenvgeneratordir) +- +- meson.add_install_script(meson_make_symlink, +- sysconfdir / 'environment', +- environmentdir / '99-environment.conf') +-endif +- +-if conf.get('ENABLE_HIBERNATE') == 1 +- executable( +- 'systemd-hibernate-resume-generator', +- 'src/hibernate-resume/hibernate-resume-generator.c', +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : systemgeneratordir) +- +- executable( +- 'systemd-hibernate-resume', +- 'src/hibernate-resume/hibernate-resume.c', +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +-endif +- +-if conf.get('HAVE_BLKID') == 1 +- executable( +- 'systemd-gpt-auto-generator', +- 'src/gpt-auto-generator/gpt-auto-generator.c', +- include_directories : includes, +- link_with : [libshared], +- dependencies : libblkid, +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : systemgeneratordir) +- +- public_programs += executable( +- 'systemd-dissect', +- 'src/dissect/dissect.c', +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true) +-endif +- +-if conf.get('ENABLE_RESOLVE') == 1 +- dbus_programs += executable( +- 'systemd-resolved', +- systemd_resolved_sources, +- include_directories : resolve_includes, +- link_with : [libshared, +- libbasic_gcrypt, +- libsystemd_resolve_core], +- dependencies : systemd_resolved_dependencies, +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +- +- public_programs += executable( +- 'resolvectl', +- resolvectl_sources, +- include_directories : includes, +- link_with : [libshared, +- libbasic_gcrypt, +- libsystemd_resolve_core], +- dependencies : [threads, +- lib_openssl_or_gcrypt, +- libm, +- libidn], +- install_rpath : rootlibexecdir, +- install : true) +- +- meson.add_install_script(meson_make_symlink, +- bindir / 'resolvectl', +- rootsbindir / 'resolvconf') +- +- meson.add_install_script(meson_make_symlink, +- bindir / 'resolvectl', +- bindir / 'systemd-resolve') +-endif +- +-if conf.get('ENABLE_LOGIND') == 1 +- dbus_programs += executable( +- 'systemd-logind', +- systemd_logind_sources, +- include_directories : includes, +- link_with : [liblogind_core, +- libshared], +- dependencies : [threads, +- libacl], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +- +- public_programs += executable( +- 'loginctl', +- loginctl_sources, +- include_directories : includes, +- link_with : [libshared], +- dependencies : [threads, +- liblz4, +- libxz, +- libzstd], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootbindir) +- +- public_programs += executable( +- 'systemd-inhibit', +- 'src/login/inhibit.c', +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootbindir) +- +- if conf.get('HAVE_PAM') == 1 +- version_script_arg = project_source_root / pam_systemd_sym +- pam_systemd = shared_library( +- 'pam_systemd', +- pam_systemd_c, +- name_prefix : '', +- include_directories : includes, +- link_args : ['-shared', +- '-Wl,--version-script=' + version_script_arg], +- link_with : [libsystemd_static, +- libshared_static], +- dependencies : [threads, +- libpam, +- libpam_misc], +- link_depends : pam_systemd_sym, +- install : true, +- install_dir : pamlibdir) +- +- if want_tests != 'false' +- test('dlopen-pam_systemd', +- test_dlopen, +- # path to dlopen must include a slash +- args : pam_systemd.full_path()) +- endif +- endif +- +- executable( +- 'systemd-user-runtime-dir', +- user_runtime_dir_sources, +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +-endif +- +-if conf.get('HAVE_PAM') == 1 +- executable( +- 'systemd-user-sessions', +- 'src/user-sessions/user-sessions.c', +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +-endif +- +-if conf.get('HAVE_BLKID') == 1 and conf.get('HAVE_GNU_EFI') == 1 +- if get_option('link-boot-shared') +- boot_link_with = [libshared] +- else +- boot_link_with = [libsystemd_static, libshared_static] +- endif +- +- public_programs += executable( +- 'bootctl', +- 'src/boot/bootctl.c', +- include_directories : includes, +- link_with : [boot_link_with], +- dependencies : [libblkid], +- install_rpath : rootlibexecdir, +- install : true) +- +- public_programs += executable( +- 'systemd-bless-boot', +- 'src/boot/bless-boot.c', +- include_directories : includes, +- link_with : [boot_link_with], +- dependencies : [libblkid], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +- +- executable( +- 'systemd-bless-boot-generator', +- 'src/boot/bless-boot-generator.c', +- include_directories : includes, +- link_with : [boot_link_with], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : systemgeneratordir) +-endif +- +-executable( +- 'systemd-boot-check-no-failures', +- 'src/boot/boot-check-no-failures.c', +- include_directories : includes, +- link_with : [libshared], +- dependencies : [libblkid], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +- +-public_programs += executable( +- 'systemd-socket-activate', +- 'src/activate/activate.c', +- include_directories : includes, +- link_with : [libshared], +- dependencies : [threads], +- install_rpath : rootlibexecdir, +- install : true) +- +-public_programs += executable( +- 'systemctl', +- systemctl_sources, +- include_directories : includes, +- link_with : systemctl_link_with, +- dependencies : [threads, +- libcap, +- libselinux, +- libxz, +- liblz4, +- libzstd], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootbindir) +- +-if conf.get('ENABLE_PORTABLED') == 1 +- dbus_programs += executable( +- 'systemd-portabled', +- systemd_portabled_sources, +- include_directories : includes, +- link_with : [libshared], +- dependencies : [threads, libselinux], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +- +- public_programs += executable( +- 'portablectl', +- 'src/portable/portablectl.c', +- include_directories : includes, +- link_with : [libshared], +- dependencies : [threads], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootbindir) +-endif +- +-if conf.get('ENABLE_SYSEXT') == 1 +- public_programs += executable( +- 'systemd-sysext', +- systemd_sysext_sources, +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootbindir) +-endif +- +-if conf.get('ENABLE_USERDB') == 1 +- executable( +- 'systemd-userwork', +- systemd_userwork_sources, +- include_directories : includes, +- link_with : [libshared], +- dependencies : [threads], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +- +- executable( +- 'systemd-userdbd', +- systemd_userdbd_sources, +- include_directories : includes, +- link_with : [libshared], +- dependencies : [threads], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +- +- public_programs += executable( +- 'userdbctl', +- userdbctl_sources, +- include_directories : includes, +- link_with : [libshared], +- dependencies : [threads], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootbindir) +-endif +- +-if conf.get('ENABLE_HOMED') == 1 +- executable( +- 'systemd-homework', +- systemd_homework_sources, +- include_directories : includes, +- link_with : [libshared], +- dependencies : [threads, +- libblkid, +- libcrypt, +- libopenssl, +- libfdisk, +- libp11kit], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +- +- dbus_programs += executable( +- 'systemd-homed', +- systemd_homed_sources, +- include_directories : home_includes, +- link_with : [libshared], +- dependencies : [threads, +- libcrypt, +- libopenssl, +- libm], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +- +- public_programs += executable( +- 'homectl', +- homectl_sources, +- include_directories : includes, +- link_with : [libshared], +- dependencies : [threads, +- libcrypt, +- libopenssl, +- libp11kit, +- libdl], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootbindir) +- +- if conf.get('HAVE_PAM') == 1 +- version_script_arg = project_source_root / pam_systemd_home_sym +- pam_systemd = shared_library( +- 'pam_systemd_home', +- pam_systemd_home_c, +- name_prefix : '', +- include_directories : includes, +- link_args : ['-shared', +- '-Wl,--version-script=' + version_script_arg], +- link_with : [libsystemd_static, +- libshared_static], +- dependencies : [threads, +- libpam, +- libpam_misc, +- libcrypt], +- link_depends : pam_systemd_home_sym, +- install : true, +- install_dir : pamlibdir) +- endif +-endif +- +-foreach alias : (['halt', 'poweroff', 'reboot', 'shutdown'] + +- (conf.get('HAVE_SYSV_COMPAT') == 1 ? ['runlevel', 'telinit'] : [])) +- meson.add_install_script(meson_make_symlink, +- rootbindir / 'systemctl', +- rootsbindir / alias) +-endforeach +- +-meson.add_install_script(meson_make_symlink, +- rootbindir / 'udevadm', +- rootlibexecdir / 'systemd-udevd') +- +-if conf.get('ENABLE_BACKLIGHT') == 1 +- executable( +- 'systemd-backlight', +- 'src/backlight/backlight.c', +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +-endif +- +-if conf.get('ENABLE_RFKILL') == 1 +- executable( +- 'systemd-rfkill', +- 'src/rfkill/rfkill.c', +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +-endif +- +-executable( +- 'systemd-system-update-generator', +- 'src/system-update-generator/system-update-generator.c', +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : systemgeneratordir) +- +-if conf.get('HAVE_LIBCRYPTSETUP') == 1 +- executable( +- 'systemd-cryptsetup', +- systemd_cryptsetup_sources, +- include_directories : includes, +- link_with : [libshared], +- dependencies : [libcryptsetup, +- libp11kit], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +- +- executable( +- 'systemd-cryptsetup-generator', +- 'src/cryptsetup/cryptsetup-generator.c', +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : systemgeneratordir) +- +- executable( +- 'systemd-veritysetup', +- 'src/veritysetup/veritysetup.c', +- include_directories : includes, +- link_with : [libshared], +- dependencies : [libcryptsetup], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +- +- executable( +- 'systemd-veritysetup-generator', +- 'src/veritysetup/veritysetup-generator.c', +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : systemgeneratordir) +- +- executable( +- 'systemd-cryptenroll', +- systemd_cryptenroll_sources, +- include_directories : includes, +- link_with : [libshared], +- dependencies : [libcryptsetup, +- libdl, +- libopenssl, +- libp11kit], +- install_rpath : rootlibexecdir, +- install : true) +- +- executable( +- 'systemd-integritysetup', +- ['src/integritysetup/integritysetup.c', 'src/integritysetup/integrity-util.c'], +- include_directories : includes, +- link_with : [libshared], +- dependencies : [libcryptsetup], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +- +- executable( +- 'systemd-integritysetup-generator', +- ['src/integritysetup/integritysetup-generator.c', 'src/integritysetup/integrity-util.c'], +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : systemgeneratordir) +-endif +- +-if conf.get('HAVE_SYSV_COMPAT') == 1 +- executable( +- 'systemd-sysv-generator', +- 'src/sysv-generator/sysv-generator.c', +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : systemgeneratordir) +- +- executable( +- 'systemd-rc-local-generator', +- 'src/rc-local-generator/rc-local-generator.c', +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : systemgeneratordir) +-endif +- +-if conf.get('ENABLE_XDG_AUTOSTART') == 1 +- executable( +- 'systemd-xdg-autostart-generator', +- systemd_xdg_autostart_generator_sources, +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : usergeneratordir) +- +- executable( +- 'systemd-xdg-autostart-condition', +- 'src/xdg-autostart-generator/xdg-autostart-condition.c', +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +-endif +- +-if conf.get('ENABLE_HOSTNAMED') == 1 +- dbus_programs += executable( +- 'systemd-hostnamed', +- 'src/hostname/hostnamed.c', +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +- +- public_programs += executable( +- 'hostnamectl', +- 'src/hostname/hostnamectl.c', +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true) +-endif +- +-if conf.get('ENABLE_LOCALED') == 1 +- if conf.get('HAVE_XKBCOMMON') == 1 +- # logind will load libxkbcommon.so dynamically on its own, but we still +- # need to specify where the headers are +- deps = [libdl, libxkbcommon.partial_dependency(compile_args: true)] +- else +- deps = [] +- endif +- +- dbus_programs += executable( +- 'systemd-localed', +- systemd_localed_sources, +- include_directories : includes, +- link_with : [libshared], +- dependencies : deps, +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +- +- public_programs += executable( +- 'localectl', +- localectl_sources, +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true) +-endif +- +-if conf.get('ENABLE_TIMEDATED') == 1 +- dbus_programs += executable( +- 'systemd-timedated', +- 'src/timedate/timedated.c', +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +-endif +- +-if conf.get('ENABLE_TIMEDATECTL') == 1 +- public_programs += executable( +- 'timedatectl', +- 'src/timedate/timedatectl.c', +- include_directories : includes, +- install_rpath : rootlibexecdir, +- link_with : [libshared], +- dependencies : [libm], +- install : true) +-endif +- +-if conf.get('ENABLE_TIMESYNCD') == 1 +- executable( +- 'systemd-timesyncd', +- systemd_timesyncd_sources, +- include_directories : includes, +- link_with : [libtimesyncd_core], +- dependencies : [threads, +- libm], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +- +- executable( +- 'systemd-time-wait-sync', +- 'src/timesync/wait-sync.c', +- include_directories : includes, +- link_with : [libtimesyncd_core], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +-endif +- +-if conf.get('ENABLE_MACHINED') == 1 +- dbus_programs += executable( +- 'systemd-machined', +- systemd_machined_sources, +- include_directories : includes, +- link_with : [libmachine_core, +- libshared], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +- +- public_programs += executable( +- 'machinectl', +- 'src/machine/machinectl.c', +- include_directories : includes, +- link_with : [libshared], +- dependencies : [threads, +- libxz, +- liblz4, +- libzstd], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootbindir) +-endif +- +-if conf.get('ENABLE_IMPORTD') == 1 +- dbus_programs += executable( +- 'systemd-importd', +- systemd_importd_sources, +- include_directories : includes, +- link_with : [libshared], +- dependencies : [threads], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +- +- systemd_pull = executable( +- 'systemd-pull', +- systemd_pull_sources, +- include_directories : includes, +- link_with : [libshared, +- lib_import_common], +- dependencies : [versiondep, +- libcurl, +- lib_openssl_or_gcrypt, +- libz, +- libbzip2, +- libxz], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +- +- systemd_import = executable( +- 'systemd-import', +- systemd_import_sources, +- include_directories : includes, +- link_with : [libshared, +- lib_import_common], +- dependencies : [libcurl, +- libz, +- libbzip2, +- libxz], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +- +- systemd_import_fs = executable( +- 'systemd-import-fs', +- systemd_import_fs_sources, +- include_directories : includes, +- link_with : [libshared, +- lib_import_common], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +- +- systemd_export = executable( +- 'systemd-export', +- systemd_export_sources, +- include_directories : includes, +- link_with : [libshared, +- lib_import_common], +- dependencies : [libcurl, +- libz, +- libbzip2, +- libxz], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +- +- public_programs += [systemd_pull, systemd_import, systemd_import_fs, systemd_export] +-endif +- +-if conf.get('ENABLE_REMOTE') == 1 and conf.get('HAVE_LIBCURL') == 1 +- public_programs += executable( +- 'systemd-journal-upload', +- systemd_journal_upload_sources, +- include_directories : includes, +- link_with : [libshared], +- dependencies : [versiondep, +- threads, +- libcurl, +- libgnutls, +- libxz, +- liblz4, +- libzstd], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +-endif +- +-if conf.get('ENABLE_REMOTE') == 1 and conf.get('HAVE_MICROHTTPD') == 1 +- public_programs += executable( +- 'systemd-journal-remote', +- systemd_journal_remote_sources, +- include_directories : journal_includes, +- link_with : [libshared, +- libsystemd_journal_remote], +- dependencies : [threads, +- libmicrohttpd, +- libgnutls, +- libxz, +- liblz4, +- libzstd], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +- +- public_programs += executable( +- 'systemd-journal-gatewayd', +- systemd_journal_gatewayd_sources, +- include_directories : journal_includes, +- link_with : [libshared], +- dependencies : [threads, +- libmicrohttpd, +- libgnutls, +- libxz, +- liblz4, +- libzstd], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +-endif +- +-if conf.get('ENABLE_COREDUMP') == 1 +- executable( +- 'systemd-coredump', +- systemd_coredump_sources, +- include_directories : includes, +- link_with : [libshared], +- dependencies : [threads, +- libacl, +- libxz, +- liblz4, +- libzstd], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +- +- public_programs += executable( +- 'coredumpctl', +- coredumpctl_sources, +- include_directories : includes, +- link_with : [libshared], +- dependencies : [threads, +- libxz, +- liblz4, +- libzstd], +- install_rpath : rootlibexecdir, +- install : true) +-endif +- +-if conf.get('ENABLE_PSTORE') == 1 +- executable( +- 'systemd-pstore', +- systemd_pstore_sources, +- include_directories : includes, +- link_with : [libshared], +- dependencies : [threads, +- libacl, +- libxz, +- liblz4, +- libzstd], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +-endif +- +-if conf.get('ENABLE_OOMD') == 1 +- dbus_programs += executable('systemd-oomd', +- systemd_oomd_sources, +- include_directories : includes, +- link_with : [libshared], +- dependencies : [], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +- +- public_programs += executable( +- 'oomctl', +- oomctl_sources, +- include_directories : includes, +- link_with : [libshared], +- dependencies : [], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootbindir) +-endif +- +-if conf.get('ENABLE_BINFMT') == 1 +- public_programs += executable( +- 'systemd-binfmt', +- 'src/binfmt/binfmt.c', +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +- +- meson.add_install_script('sh', '-c', +- mkdir_p.format(binfmtdir)) +- if install_sysconfdir +- meson.add_install_script('sh', '-c', +- mkdir_p.format(sysconfdir / 'binfmt.d')) +- endif +-endif +- +-if conf.get('ENABLE_REPART') == 1 +- exe = executable( +- 'systemd-repart', +- systemd_repart_sources, +- include_directories : includes, +- link_with : [libshared], +- dependencies : [threads, +- libblkid, +- libfdisk], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootbindir) +- public_programs += exe +- +- if want_tests != 'false' +- test('test-repart', +- test_repart_sh, +- args : exe.full_path()) +- endif +-endif +- +-if conf.get('ENABLE_VCONSOLE') == 1 +- executable( +- 'systemd-vconsole-setup', +- 'src/vconsole/vconsole-setup.c', +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +-endif +- +-if conf.get('ENABLE_RANDOMSEED') == 1 +- executable( +- 'systemd-random-seed', +- 'src/random-seed/random-seed.c', +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +-endif +- +-if conf.get('ENABLE_FIRSTBOOT') == 1 +- executable( +- 'systemd-firstboot', +- 'src/firstboot/firstboot.c', +- include_directories : includes, +- link_with : [libshared], +- dependencies : [libcrypt], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootbindir) +-endif +- +-executable( +- 'systemd-remount-fs', +- 'src/remount-fs/remount-fs.c', +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +- +-executable( +- 'systemd-machine-id-setup', +- 'src/machine-id-setup/machine-id-setup-main.c', +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootbindir) +- +-executable( +- 'systemd-fsck', +- 'src/fsck/fsck.c', +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +- +-executable('systemd-growfs', +- 'src/partition/growfs.c', +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +- +-executable( +- 'systemd-makefs', +- 'src/partition/makefs.c', +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +- +-executable( +- 'systemd-sleep', +- 'src/sleep/sleep.c', +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +- +-if install_sysconfdir_samples +- install_data('src/sleep/sleep.conf', +- install_dir : pkgsysconfdir) +-endif +- +-public_programs += executable( +- 'systemd-sysctl', +- 'src/sysctl/sysctl.c', +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +- +-executable( +- 'systemd-ac-power', +- 'src/ac-power/ac-power.c', +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +- +-public_programs += executable( +- 'systemd-detect-virt', +- 'src/detect-virt/detect-virt.c', +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true) +- +-public_programs += executable( +- 'systemd-delta', +- 'src/delta/delta.c', +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true) +- +-public_programs += executable( +- 'systemd-escape', +- 'src/escape/escape.c', +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootbindir) +- +-public_programs += executable( +- 'systemd-notify', +- 'src/notify/notify.c', +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootbindir) +- +-public_programs += executable( +- 'systemd-creds', +- 'src/creds/creds.c', +- include_directories : includes, +- link_with : [libshared], +- dependencies : [threads, +- libopenssl], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootbindir) +- +-executable( +- 'systemd-volatile-root', +- 'src/volatile-root/volatile-root.c', +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : conf.get('ENABLE_INITRD') == 1, +- install_dir : rootlibexecdir) +- +-executable( +- 'systemd-cgroups-agent', +- 'src/cgroups-agent/cgroups-agent.c', +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +- +-public_programs += executable( +- 'systemd-id128', +- 'src/id128/id128.c', +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true) +- +-public_programs += executable( +- 'systemd-path', +- 'src/path/path.c', +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true) +- +-public_programs += executable( +- 'systemd-ask-password', +- 'src/ask-password/ask-password.c', +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootbindir) +- +-executable( +- 'systemd-reply-password', +- 'src/reply-password/reply-password.c', +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +- +-public_programs += executable( +- 'systemd-tty-ask-password-agent', +- 'src/tty-ask-password-agent/tty-ask-password-agent.c', +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootbindir) +- +-public_programs += executable( +- 'systemd-cgls', +- 'src/cgls/cgls.c', +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true) +- +-public_programs += executable( +- 'systemd-cgtop', +- 'src/cgtop/cgtop.c', +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true) +- +-executable( +- 'systemd-initctl', +- 'src/initctl/initctl.c', +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : (conf.get('HAVE_SYSV_COMPAT') == 1), +- install_dir : rootlibexecdir) +- +-public_programs += executable( +- 'systemd-mount', +- 'src/mount/mount-tool.c', +- include_directories : includes, +- link_with : [libshared], +- dependencies: [libmount], +- install_rpath : rootlibexecdir, +- install : true) +- +-meson.add_install_script(meson_make_symlink, +- 'systemd-mount', bindir / 'systemd-umount') +- +-public_programs += executable( +- 'systemd-run', +- 'src/run/run.c', +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true) +- +-public_programs += executable( +- 'systemd-stdio-bridge', +- 'src/stdio-bridge/stdio-bridge.c', +- include_directories : includes, +- link_with : [libshared], +- dependencies : [versiondep], +- install_rpath : rootlibexecdir, +- install : true) +- +-public_programs += executable( +- 'busctl', +- busctl_sources, +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true) +- +-if enable_sysusers +- exe = executable( +- 'systemd-sysusers', +- 'src/sysusers/sysusers.c', +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootbindir) +- public_programs += exe +- +- if want_tests != 'false' +- test('test-sysusers', +- test_sysusers_sh, +- # https://github.com/mesonbuild/meson/issues/2681 +- args : exe.full_path()) +- endif +- +- if have_standalone_binaries +- exe = executable( +- 'systemd-sysusers.standalone', +- 'src/sysusers/sysusers.c', +- include_directories : includes, +- c_args : '-DSTANDALONE', +- link_with : [libshared_static, +- libbasic, +- libbasic_gcrypt, +- libsystemd_static], +- install : true, +- install_dir : rootbindir) +- public_programs += exe +- +- if want_tests != 'false' +- test('test-sysusers.standalone', +- test_sysusers_sh, +- # https://github.com/mesonbuild/meson/issues/2681 +- args : exe.full_path()) +- endif +- endif +-endif +- +-if conf.get('ENABLE_TMPFILES') == 1 +- exe = executable( +- 'systemd-tmpfiles', +- systemd_tmpfiles_sources, +- include_directories : includes, +- link_with : [libshared], +- dependencies : [libacl], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootbindir) +- public_programs += exe +- +- if want_tests != 'false' +- test('test-systemd-tmpfiles', +- test_systemd_tmpfiles_py, +- # https://github.com/mesonbuild/meson/issues/2681 +- args : exe.full_path()) +- endif +- +- if have_standalone_binaries +- public_programs += executable( +- 'systemd-tmpfiles.standalone', +- systemd_tmpfiles_sources, +- include_directories : includes, +- c_args : '-DSTANDALONE', +- link_with : [libshared_static, +- libbasic, +- libbasic_gcrypt, +- libsystemd_static], +- dependencies : [libacl], +- install : true, +- install_dir : rootbindir) +- endif +-endif +- +-if conf.get('ENABLE_HWDB') == 1 +- systemd_hwdb = executable( +- 'systemd-hwdb', +- 'src/hwdb/hwdb.c', +- include_directories : includes, +- link_with : udev_link_with, +- install_rpath : udev_rpath, +- install : true, +- install_dir : rootbindir) +- public_programs += systemd_hwdb +- +- if want_tests != 'false' +- test('hwdb-test', +- hwdb_test_sh, +- args : [systemd_hwdb.full_path()], +- timeout : 90) +- endif +-endif +- +-if conf.get('ENABLE_QUOTACHECK') == 1 +- executable( +- 'systemd-quotacheck', +- 'src/quotacheck/quotacheck.c', +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +-endif +- +-public_programs += executable( +- 'systemd-socket-proxyd', +- 'src/socket-proxy/socket-proxyd.c', +- include_directories : includes, +- link_with : [libshared], +- dependencies : [threads], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +- +-public_programs += executable( +- 'udevadm', +- udevadm_sources, +- include_directories : includes, +- link_with : [libudevd_core], +- dependencies : [versiondep, +- threads, +- libkmod, +- libidn, +- libacl, +- libblkid], +- install_rpath : udev_rpath, +- install : true, +- install_dir : rootbindir) +- +-executable( +- 'systemd-shutdown', +- systemd_shutdown_sources, +- include_directories : includes, +- link_with : [libshared], +- dependencies : [libmount], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +- +-executable( +- 'systemd-update-done', +- 'src/update-done/update-done.c', +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +- +-executable( +- 'systemd-update-utmp', +- 'src/update-utmp/update-utmp.c', +- include_directories : includes, +- link_with : [libshared], +- dependencies : [libaudit], +- install_rpath : rootlibexecdir, +- install : (conf.get('ENABLE_UTMP') == 1), +- install_dir : rootlibexecdir) +- +-if conf.get('HAVE_KMOD') == 1 +- executable( +- 'systemd-modules-load', +- 'src/modules-load/modules-load.c', +- include_directories : includes, +- link_with : [libshared], +- dependencies : [libkmod], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +- +- meson.add_install_script('sh', '-c', +- mkdir_p.format(modulesloaddir)) +- if install_sysconfdir +- meson.add_install_script('sh', '-c', +- mkdir_p.format(sysconfdir / 'modules-load.d')) +- endif +-endif +- +-public_programs += executable( +- 'systemd-nspawn', +- systemd_nspawn_sources, +- include_directories : includes, +- link_with : [libnspawn_core, +- libshared], +- dependencies : [libblkid, +- libseccomp], +- install_rpath : rootlibexecdir, +- install : true) +- +-if conf.get('ENABLE_NETWORKD') == 1 +- dbus_programs += executable( +- 'systemd-networkd', +- systemd_networkd_sources, +- include_directories : network_includes, +- link_with : [libnetworkd_core, +- libsystemd_network, +- networkd_link_with], +- dependencies : [threads], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +- +- executable( +- 'systemd-networkd-wait-online', +- systemd_networkd_wait_online_sources, +- include_directories : includes, +- link_with : [networkd_link_with], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +- +- public_programs += executable( +- 'networkctl', +- networkctl_sources, +- include_directories : libsystemd_network_includes, +- link_with : [libsystemd_network, +- networkd_link_with], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootbindir) +-endif +- +-exe = executable( +- 'systemd-network-generator', +- network_generator_sources, +- include_directories : includes, +- link_with : [networkd_link_with], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) +- +-if want_tests != 'false' +- test('test-network-generator-conversion', +- test_network_generator_conversion_sh, +- # https://github.com/mesonbuild/meson/issues/2681 +- args : exe.full_path()) +-endif +- +-executable( +- 'systemd-sulogin-shell', +- 'src/sulogin-shell/sulogin-shell.c', +- include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) + + ############################################################ + +@@ -3686,34 +2062,12 @@ foreach tuple : fuzzers + build_by_default : fuzzer_build) + fuzzer_exes += exe + +- if want_tests != 'false' +- # Run the fuzz regression tests without any sanitizers enabled. +- # Additional invocations with sanitizers may be added below. +- foreach p : fuzz_regression_tests +- b = p.split('/')[-2] +- c = p.split('/')[-1] +- +- if b == name +- test('@0@_@1@'.format(b, c), +- exe, +- args : [project_source_root / p]) +- endif +- endforeach +- endif + endforeach + + alias_target('fuzzers', fuzzer_exes) + + ############################################################ + +-subdir('modprobe.d') +-subdir('sysctl.d') +-subdir('sysusers.d') +-subdir('tmpfiles.d') +-subdir('hwdb.d') +-subdir('units') +-subdir('presets') +-subdir('network') + subdir('man') + subdir('shell-completion/bash') + subdir('shell-completion/zsh') +@@ -3775,62 +2129,6 @@ foreach exec : public_programs + endif + endforeach + +-############################################################ +- +-check_directives_sh = find_program('tools/check-directives.sh') +- +-if want_tests != 'false' +- test('check-directives', +- check_directives_sh, +- args : [project_source_root, project_build_root]) +-endif +- +-############################################################ +- +-# Enable tests for all supported sanitizers +-foreach tuple : sanitizers +- sanitizer = tuple[0] +- build = tuple[1] +- +- if cc.has_link_argument('-fsanitize=@0@'.format(sanitizer)) +- prev = '' +- foreach p : fuzz_regression_tests +- b = p.split('/')[-2] +- c = p.split('/')[-1] +- +- name = '@0@:@1@'.format(b, sanitizer) +- +- if name != prev +- if want_tests == 'false' +- message('Not compiling @0@ because tests is set to false'.format(name)) +- elif fuzz_tests +- exe = custom_target( +- name, +- output : name, +- depends : build, +- command : [ln, '-fs', +- build.full_path() / b, +- '@OUTPUT@'], +- build_by_default : true) +- else +- message('Not compiling @0@ because fuzz-tests is set to false'.format(name)) +- endif +- endif +- prev = name +- +- if fuzz_tests +- test('@0@_@1@_@2@'.format(b, c, sanitizer), +- env, +- env : ['UBSAN_OPTIONS=print_stacktrace=1:print_summary=1:halt_on_error=1'], +- timeout : 60, +- args : [exe.full_path(), +- project_source_root / p]) +- endif +- endforeach +- endif +-endforeach +- +- + ############################################################ + + if git.found() +@@ -3889,15 +2187,6 @@ run_target( + alias_target('update-dbus-docs', update_dbus_docs) + alias_target('update-man-rules', update_man_rules) + +-if not meson.is_cross_build() +- custom_target( +- 'export-dbus-interfaces', +- output : 'interfaces', +- install : dbus_interfaces_dir != 'no', +- install_dir : dbus_interfaces_dir, +- command : [export_dbus_interfaces_py, '@OUTPUT@', dbus_programs]) +-endif +- + ############################################################ + + alt_time_epoch = run_command('date', '-Is', '-u', '-d', '@@0@'.format(time_epoch), +diff --git a/src/libsystemd/meson.build b/src/libsystemd/meson.build +index c21841258b..e9716833d8 100644 +--- a/src/libsystemd/meson.build ++++ b/src/libsystemd/meson.build +@@ -189,137 +189,3 @@ custom_target( + command : [meson_render_jinja2, config_h, '@INPUT@', '@OUTPUT@'], + install : pkgconfiglibdir != 'no', + install_dir : pkgconfiglibdir) +- +-############################################################ +- +-tests += [ +- [['src/libsystemd/sd-journal/test-journal-send.c']], +- +- [['src/libsystemd/sd-journal/test-journal-match.c']], +- +- [['src/libsystemd/sd-journal/test-journal-enum.c'], +- [], [], [], '', 'timeout=360'], +- +- [['src/libsystemd/sd-journal/test-journal-init.c']], +- +- [['src/libsystemd/sd-journal/test-mmap-cache.c']], +- +- [['src/libsystemd/sd-journal/test-catalog.c']], +- +- [['src/libsystemd/sd-journal/test-compress.c'], +- [], +- [liblz4, +- libzstd, +- libxz]], +- +- [['src/libsystemd/sd-journal/test-compress-benchmark.c'], +- [], +- [liblz4, +- libzstd, +- libxz], +- [], '', 'timeout=90'], +- +- [['src/libsystemd/sd-journal/test-audit-type.c']], +-] +- +-############################################################ +- +-tests += [ +- [['src/libsystemd/sd-bus/test-bus-address.c'], +- [], +- [threads]], +- +- [['src/libsystemd/sd-bus/test-bus-marshal.c'], +- [], +- [threads, +- libglib, +- libgobject, +- libgio, +- libdbus]], +- +- [['src/libsystemd/sd-bus/test-bus-signature.c'], +- [], +- [threads]], +- +- [['src/libsystemd/sd-bus/test-bus-queue-ref-cycle.c'], +- [], +- [threads]], +- +- [['src/libsystemd/sd-bus/test-bus-watch-bind.c'], +- [], +- [threads], +- [], '', 'timeout=120'], +- +- [['src/libsystemd/sd-bus/test-bus-chat.c'], +- [], +- [threads]], +- +- [['src/libsystemd/sd-bus/test-bus-cleanup.c'], +- [], +- [threads, +- libseccomp]], +- +- [['src/libsystemd/sd-bus/test-bus-track.c'], +- [], +- [libseccomp]], +- +- [['src/libsystemd/sd-bus/test-bus-server.c'], +- [], +- [threads]], +- +- [['src/libsystemd/sd-bus/test-bus-objects.c'], +- [], +- [threads]], +- +- [['src/libsystemd/sd-bus/test-bus-vtable.c', +- 'src/libsystemd/sd-bus/test-vtable-data.h']], +- +- [['src/libsystemd/sd-bus/test-bus-gvariant.c'], +- [], +- [libglib, +- libgobject, +- libgio]], +- +- [['src/libsystemd/sd-bus/test-bus-creds.c']], +- +- [['src/libsystemd/sd-bus/test-bus-match.c']], +- +- [['src/libsystemd/sd-bus/test-bus-benchmark.c'], +- [], +- [threads], +- [], '', 'manual'], +- +- [['src/libsystemd/sd-bus/test-bus-introspect.c', +- 'src/libsystemd/sd-bus/test-vtable-data.h']], +- +- [['src/libsystemd/sd-event/test-event.c']], +- +- [['src/libsystemd/sd-netlink/test-netlink.c']], +- +- [['src/libsystemd/sd-resolve/test-resolve.c'], +- [], +- [threads], +- [], '', 'timeout=120'], +- +- [['src/libsystemd/sd-login/test-login.c']], +- +- [['src/libsystemd/sd-device/test-sd-device.c']], +- +- [['src/libsystemd/sd-device/test-device-util.c']], +- +- [['src/libsystemd/sd-device/test-sd-device-monitor.c']], +-] +- +-if cxx_cmd != '' +- tests += [ +- [['src/libsystemd/sd-bus/test-bus-vtable-cc.cc']], +- ] +-endif +- +-############################################################ +- +-fuzzers += [ +- [['src/libsystemd/sd-bus/fuzz-bus-message.c']], +- +- [['src/libsystemd/sd-bus/fuzz-bus-match.c']], +-] +diff --git a/src/test/meson.build b/src/test/meson.build +index 42d34a209e..29203a1bb5 100644 +--- a/src/test/meson.build ++++ b/src/test/meson.build +@@ -40,609 +40,6 @@ test_dlopen_c = files('test-dlopen.c') + + ############################################################ + +-tests += [ +- [['src/test/test-device-nodes.c']], +- +- [['src/test/test-ether-addr-util.c']], +- +- [['src/test/test-engine.c'], +- [libcore, +- libshared], +- [threads, +- librt, +- libseccomp, +- libselinux, +- libmount, +- libblkid], +- core_includes], +- +- [['src/test/test-emergency-action.c'], +- [libcore, +- libshared], +- [], +- core_includes], +- +- [['src/test/test-chown-rec.c'], +- [libcore, +- libshared], +- [], +- core_includes], +- +- [['src/test/test-dlopen-so.c']], +- +- [['src/test/test-job-type.c'], +- [libcore, +- libshared], +- [threads, +- librt, +- libseccomp, +- libselinux, +- libmount, +- libblkid], +- core_includes], +- +- [['src/test/test-ns.c'], +- [libcore, +- libshared], +- [threads, +- librt, +- libseccomp, +- libselinux, +- libmount, +- libblkid], +- core_includes, '', 'manual'], +- +- [['src/test/test-loopback.c'], +- [libcore, +- libshared], +- [threads, +- librt, +- libseccomp, +- libselinux, +- libmount, +- libblkid], +- core_includes], +- +- [['src/test/test-dns-domain.c']], +- +- [['src/test/test-boot-timestamps.c'], +- [], [], [], 'ENABLE_EFI'], +- +- [['src/test/test-unit-file.c']], +- +- [['src/test/test-unit-name.c'], +- [libcore, +- libshared], +- [threads, +- librt, +- libseccomp, +- libselinux, +- libmount, +- libblkid], +- core_includes], +- +- [['src/test/test-load-fragment.c'], +- [libcore, +- libshared], +- [threads, +- librt, +- libseccomp, +- libselinux, +- libmount, +- libblkid], +- core_includes], +- +- [['src/test/test-serialize.c']], +- +- [['src/test/test-unit-serialize.c'], +- [libcore, +- libshared], +- [threads, +- librt, +- libseccomp, +- libselinux, +- libmount, +- libblkid], +- core_includes], +- +- [['src/test/test-utf8.c']], +- +- [['src/test/test-kbd-util.c']], +- +- [['src/test/test-blockdev-util.c']], +- +- [['src/test/test-dev-setup.c']], +- +- [['src/test/test-capability.c'], +- [], +- [libcap]], +- +- [['src/test/test-async.c'], +- [], [], [], '', 'timeout=120'], +- +- [['src/test/test-locale-util.c']], +- +- [['src/test/test-copy.c']], +- +- [['src/test/test-recurse-dir.c']], +- +- [['src/test/test-data-fd-util.c']], +- +- [['src/test/test-static-destruct.c']], +- +- [['src/test/test-sigbus.c']], +- +- [['src/test/test-condition.c']], +- +- [['src/test/test-fdset.c']], +- +- [['src/test/test-fstab-util.c']], +- +- [['src/test/test-random-util.c'], +- [], +- [libm], +- [], '', 'timeout=120'], +- +- [['src/test/test-format-table.c']], +- +- [['src/test/test-format-util.c']], +- +- [['src/test/test-ratelimit.c']], +- +- [['src/test/test-util.c']], +- +- [['src/test/test-macro.c']], +- +- [['src/test/test-json.c']], +- +- [['src/test/test-mkdir.c']], +- +- [['src/test/test-modhex.c']], +- +- [['src/test/test-libmount.c'], +- [], +- [threads, +- libmount]], +- +- [['src/test/test-mount-util.c']], +- +- [['src/test/test-mountpoint-util.c']], +- +- [['src/test/test-exec-util.c']], +- +- [['src/test/test-hexdecoct.c']], +- +- [['src/test/test-alloc-util.c']], +- +- [['src/test/test-xattr-util.c']], +- +- [['src/test/test-io-util.c']], +- +- [['src/test/test-glob-util.c']], +- +- [['src/test/test-fs-util.c']], +- +- [['src/test/test-install-file.c']], +- +- [['src/test/test-umask-util.c']], +- +- [['src/test/test-proc-cmdline.c']], +- +- [['src/test/test-fd-util.c'], +- [], +- [libseccomp]], +- +- [['src/test/test-web-util.c']], +- +- [['src/test/test-cpu-set-util.c']], +- +- [['src/test/test-stat-util.c']], +- +- [['src/test/test-os-util.c']], +- +- [['src/test/test-libcrypt-util.c'], +- [], [libcrypt], [], '', 'timeout=120'], +- +- [['src/test/test-escape.c']], +- +- [['src/test/test-exit-status.c']], +- +- [['src/test/test-specifier.c']], +- +- [['src/test/test-string-util.c']], +- +- [['src/test/test-extract-word.c']], +- +- [['src/test/test-parse-argument.c']], +- +- [['src/test/test-parse-socket-bind-item.c']], +- +- [['src/test/test-parse-util.c']], +- +- [['src/test/test-sysctl-util.c']], +- +- [['src/test/test-import-util.c']], +- +- [['src/test/test-uid-alloc-range.c']], +- +- [['src/test/test-user-util.c']], +- +- [['src/test/test-hostname-setup.c']], +- +- [['src/test/test-hostname-util.c']], +- +- [['src/test/test-process-util.c']], +- +- [['src/test/test-terminal-util.c']], +- +- [['src/test/test-path-lookup.c']], +- +- [['src/test/test-pretty-print.c']], +- +- [['src/test/test-uid-range.c']], +- +- [['src/test/test-cap-list.c', +- generated_gperf_headers], +- [], +- [libcap]], +- +- [['src/test/test-socket-util.c']], +- +- [['src/test/test-socket-netlink.c']], +- +- [['src/test/test-in-addr-util.c']], +- +- [['src/test/test-in-addr-prefix-util.c']], +- +- [['src/test/test-barrier.c']], +- +- [['src/test/test-tmpfiles.c']], +- +- [['src/test/test-namespace.c'], +- [libcore, +- libshared], +- [threads, +- libblkid], +- core_includes], +- +- [['src/test/test-verbs.c']], +- +- [['src/test/test-install-root.c']], +- +- [['src/test/test-acl-util.c'], +- [], [], [], 'HAVE_ACL'], +- +- [['src/test/test-seccomp.c'], +- [], +- [libseccomp], +- [], 'HAVE_SECCOMP'], +- +- [['src/test/test-rlimit-util.c']], +- +- [['src/test/test-ask-password-api.c'], +- [], [], [], '', 'manual'], +- +- [['src/test/test-signal-util.c']], +- +- [['src/test/test-loop-block.c'], +- [libcore, +- libshared], +- [threads, +- libblkid], +- core_includes, '', '', [], false], +- +- [['src/test/test-selinux.c']], +- +- [['src/test/test-sizeof.c'], +- [libbasic]], +- +- [['src/test/test-bpf-devices.c'], +- [libcore, +- libshared], +- [libmount, +- threads, +- librt, +- libseccomp, +- libselinux, +- libblkid], +- core_includes], +- +- [['src/test/test-bpf-firewall.c'], +- [libcore, +- libshared], +- [libmount, +- threads, +- librt, +- libseccomp, +- libselinux, +- libblkid], +- core_includes], +- +- [['src/test/test-bpf-foreign-programs.c'], +- [libcore, +- libshared], +- [], +- core_includes], +- +- [['src/test/test-bpf-lsm.c'], +- [libcore, +- libshared], +- [libmount, +- threads, +- librt, +- libseccomp, +- libselinux, +- libblkid], +- core_includes], +- +- [['src/test/test-watch-pid.c'], +- [libcore, +- libshared], +- [libmount, +- threads, +- librt, +- libseccomp, +- libselinux, +- libblkid], +- core_includes], +- +- [['src/test/test-hashmap.c', +- 'src/test/test-hashmap-plain.c', +- test_hashmap_ordered_c], +- [], [], [], '', 'timeout=180'], +- +- [['src/test/test-set.c']], +- +- [['src/test/test-ordered-set.c']], +- +- [['src/test/test-set-disable-mempool.c'], +- [], +- [threads]], +- +- [['src/test/test-hash-funcs.c']], +- +- [['src/test/test-bitmap.c']], +- +- [['src/test/test-xml.c']], +- +- [['src/test/test-list.c']], +- +- [['src/test/test-procfs-util.c']], +- +- [['src/test/test-unaligned.c']], +- +- [['src/test/test-tables.c'], +- [libcore, +- libjournal_core, +- libudevd_core, +- libshared], +- [threads, +- libseccomp, +- libmount, +- libxz, +- liblz4, +- libblkid], +- [core_includes, journal_includes, udev_includes]], +- +- [['src/test/test-prioq.c']], +- +- [['src/test/test-fileio.c']], +- +- [['src/test/test-time-util.c']], +- +- [['src/test/test-clock.c']], +- +- [['src/test/test-tmpfile-util.c']], +- +- [['src/test/test-architecture.c']], +- +- [['src/test/test-gpt.c']], +- +- [['src/test/test-log.c']], +- +- [['src/test/test-ipcrm.c'], +- [], [], [], '', 'unsafe'], +- +- [['src/test/test-btrfs.c'], +- [], [], [], '', 'manual'], +- +- [['src/test/test-firewall-util.c']], +- +- [['src/test/test-net-naming-scheme.c']], +- +- [['src/test/test-netlink-manual.c'], +- [], +- [libkmod], +- [], 'HAVE_KMOD', 'manual'], +- +- [['src/test/test-ellipsize.c']], +- +- [['src/test/test-date.c']], +- +- [['src/test/test-sleep.c']], +- +- [['src/test/test-tpm2.c']], +- +- [['src/test/test-replace-var.c']], +- +- [['src/test/test-calendarspec.c']], +- +- [['src/test/test-strip-tab-ansi.c']], +- +- [['src/test/test-coredump-util.c']], +- +- [['src/test/test-daemon.c']], +- +- [['src/test/test-cgroup.c']], +- +- [['src/test/test-cgroup-cpu.c'], +- [libcore, +- libshared], +- [], +- core_includes], +- +- [['src/test/test-cgroup-unit-default.c'], +- [libcore, +- libshared], +- [], +- core_includes], +- +- [['src/test/test-cgroup-mask.c'], +- [libcore, +- libshared], +- [threads, +- librt, +- libseccomp, +- libselinux, +- libmount, +- libblkid], +- core_includes], +- +- [['src/test/test-varlink.c'], +- [], +- [threads]], +- +- [['src/test/test-cgroup-util.c']], +- +- [['src/test/test-cgroup-setup.c']], +- +- [['src/test/test-env-file.c']], +- +- [['src/test/test-env-util.c']], +- +- [['src/test/test-strbuf.c']], +- +- [['src/test/test-strv.c']], +- +- [['src/test/test-path-util.c']], +- +- [['src/test/test-rm-rf.c']], +- +- [['src/test/test-chase-symlinks.c'], +- [], [], [], '', 'manual'], +- +- [['src/test/test-path.c'], +- [libcore, +- libshared], +- [threads, +- librt, +- libseccomp, +- libselinux, +- libmount, +- libblkid], +- core_includes, '', 'timeout=120'], +- +- [['src/test/test-execute.c'], +- [libcore, +- libshared], +- [threads, +- librt, +- libseccomp, +- libselinux, +- libmount, +- libblkid], +- core_includes, '', 'timeout=360'], +- +- [['src/test/test-siphash24.c']], +- +- [['src/test/test-strxcpyx.c']], +- +- [['src/test/test-install.c'], +- [libcore, +- libshared], +- [], +- core_includes, '', 'manual'], +- +- [['src/test/test-watchdog.c'], +- [], [], [], '', 'unsafe'], +- +- [['src/test/test-sched-prio.c'], +- [libcore, +- libshared], +- [threads, +- librt, +- libseccomp, +- libselinux, +- libmount, +- libblkid], +- core_includes], +- +- [['src/test/test-conf-files.c']], +- +- [['src/test/test-conf-parser.c']], +- +- [['src/test/test-af-list.c', +- generated_gperf_headers]], +- +- [['src/test/test-arphrd-util.c', +- generated_gperf_headers]], +- +- [['src/test/test-errno-list.c', +- generated_gperf_headers]], +- +- [['src/test/test-ip-protocol-list.c', +- shared_generated_gperf_headers]], +- +- [['src/test/test-journal-importer.c']], +- +- [['src/test/test-udev.c'], +- [libudevd_core, +- libshared], +- [threads, +- librt, +- libblkid, +- libkmod, +- libacl, +- libselinux], +- udev_includes, '', 'manual'], +- +- [['src/test/test-udev-util.c']], +- +- [['src/test/test-id128.c']], +- +- [['src/test/test-cryptolib.c'], +- [libshared], +- [lib_openssl_or_gcrypt], +- [], 'HAVE_OPENSSL_OR_GCRYPT'], +- +- [['src/test/test-nss-hosts.c', +- 'src/test/nss-test-util.c', +- 'src/test/nss-test-util.h'], +- [], +- [libdl], +- [], 'ENABLE_NSS', 'manual'], +- +- [['src/test/test-nss-users.c', +- 'src/test/nss-test-util.c', +- 'src/test/nss-test-util.h'], +- [], +- [libdl], +- [], 'ENABLE_NSS', 'manual'], +- +- [['src/test/test-bus-util.c']], +- +- [['src/test/test-percent-util.c']], +- +- [['src/test/test-sd-hwdb.c']], +- +- [['src/test/test-sd-path.c']], +- +- [['src/test/test-local-addresses.c']], +- +- [['src/test/test-psi-util.c']], +- +- [['src/test/test-qrcode-util.c'], +- [], +- [libdl]], +- +- [['src/test/test-nscd-flush.c'], +- [], [], [], 'ENABLE_NSCD', 'manual'], +- +- [['src/test/test-hmac.c']], +-] +- +-############################################################ +- + # define some tests here, because the link_with deps were not defined earlier + + tests += [ +@@ -650,20 +47,7 @@ tests += [ + [libshared_static, + libsystemd_static]], + +- [['src/libsystemd/sd-device/test-sd-device-thread.c'], +- [libsystemd], +- [threads]], +- + [['src/libudev/test-udev-device-thread.c'], + [libudev], + [threads]], + ] +- +-tests += [ +- [['src/test/test-socket-bind.c'], +- [libcore, +- libshared], +- [libdl], +- core_includes, +- 'BPF_FRAMEWORK'], +-] +diff --git a/src/udev/meson.build b/src/udev/meson.build +index d55e9073ae..335ac9f984 100644 +--- a/src/udev/meson.build ++++ b/src/udev/meson.build +@@ -195,12 +195,6 @@ fuzzers += [ + ] + + tests += [ +- [['src/udev/test-udev-event.c'], +- [libudevd_core, +- libshared], +- [threads, +- libacl]], +- + [['src/udev/test-udev-node.c'], + [libudevd_core, + libshared], +-- +2.35.2 + diff --git a/systemd/static-compat/0001-Use-Arch-Linux-device-access-groups.patch b/systemd/static-compat/0001-Use-Arch-Linux-device-access-groups.patch new file mode 100644 index 00000000..6f7dd4a1 --- /dev/null +++ b/systemd/static-compat/0001-Use-Arch-Linux-device-access-groups.patch @@ -0,0 +1,176 @@ +From f7d07e298c819a81eab965efbdbf53a2ce67fc0e Mon Sep 17 00:00:00 2001 +From: "Jan Alexander Steffens (heftig)" +Date: Tue, 6 Mar 2018 23:39:47 +0100 +Subject: [PATCH] Use Arch Linux' device access groups + + cdrom → optical + dialout → uucp + tape → storage +--- + meson.build | 6 +++--- + meson_options.txt | 12 ++++++------ + rules.d/50-udev-default.rules.in | 14 +++++++------- + sysusers.d/basic.conf.in | 6 +++--- + 4 files changed, 19 insertions(+), 19 deletions(-) + +diff --git a/meson.build b/meson.build +index 32e5413a62..f781e06fed 100644 +--- a/meson.build ++++ b/meson.build +@@ -796,19 +796,19 @@ conf.set_quoted('NOBODY_GROUP_NAME', nobody_group) + static_ugids = [] + foreach option : ['adm-gid', + 'audio-gid', +- 'cdrom-gid', +- 'dialout-gid', + 'disk-gid', + 'input-gid', + 'kmem-gid', + 'kvm-gid', + 'lp-gid', ++ 'optical-gid', + 'render-gid', + 'sgx-gid', +- 'tape-gid', ++ 'storage-gid', + 'tty-gid', + 'users-gid', + 'utmp-gid', ++ 'uucp-gid', + 'video-gid', + 'wheel-gid', + 'systemd-journal-gid', +diff --git a/meson_options.txt b/meson_options.txt +index 5048de755d..676e5e2e0d 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -235,10 +235,6 @@ option('adm-gid', type : 'integer', value : '-1', + description : 'soft-static allocation for the "adm" group') + option('audio-gid', type : 'integer', value : '-1', + description : 'soft-static allocation for the "audio" group') +-option('cdrom-gid', type : 'integer', value : '-1', +- description : 'soft-static allocation for the "cdrom" group') +-option('dialout-gid', type : 'integer', value : '-1', +- description : 'soft-static allocation for the "dialout" group') + option('disk-gid', type : 'integer', value : '-1', + description : 'soft-static allocation for the "disk" group') + option('input-gid', type : 'integer', value : '-1', +@@ -249,18 +245,22 @@ option('kvm-gid', type : 'integer', value : '-1', + description : 'soft-static allocation for the "kvm" group') + option('lp-gid', type : 'integer', value : '-1', + description : 'soft-static allocation for the "lp" group') ++option('optical-gid', type : 'integer', value : '-1', ++ description : 'soft-static allocation for the "optical" group') + option('render-gid', type : 'integer', value : '-1', + description : 'soft-static allocation for the "render" group') + option('sgx-gid', type : 'integer', value : '-1', + description : 'soft-static allocation for the "sgx" group') +-option('tape-gid', type : 'integer', value : '-1', +- description : 'soft-static allocation for the "tape" group') ++option('storage-gid', type : 'integer', value : '-1', ++ description : 'soft-static allocation for the "storage" group') + option('tty-gid', type : 'integer', value : 5, + description : 'the numeric GID of the "tty" group') + option('users-gid', type : 'integer', value : '-1', + description : 'soft-static allocation for the "users" group') + option('utmp-gid', type : 'integer', value : '-1', + description : 'soft-static allocation for the "utmp" group') ++option('uucp-gid', type : 'integer', value : '-1', ++ description : 'soft-static allocation for the "uucp" group') + option('video-gid', type : 'integer', value : '-1', + description : 'soft-static allocation for the "video" group') + option('wheel-gid', type : 'integer', value : '-1', +diff --git a/rules.d/50-udev-default.rules.in b/rules.d/50-udev-default.rules.in +index 18a3cf46bf..f3c440fd89 100644 +--- a/rules.d/50-udev-default.rules.in ++++ b/rules.d/50-udev-default.rules.in +@@ -22,7 +22,7 @@ SUBSYSTEM=="tty", KERNEL=="sclp_line[0-9]*", GROUP="tty", MODE="0620" + SUBSYSTEM=="tty", KERNEL=="ttysclp[0-9]*", GROUP="tty", MODE="0620" + SUBSYSTEM=="tty", KERNEL=="3270/tty[0-9]*", GROUP="tty", MODE="0620" + SUBSYSTEM=="vc", KERNEL=="vcs*|vcsa*", GROUP="tty" +-KERNEL=="tty[A-Z]*[0-9]|ttymxc[0-9]*|pppox[0-9]*|ircomm[0-9]*|noz[0-9]*|rfcomm[0-9]*", GROUP="dialout" ++KERNEL=="tty[A-Z]*[0-9]|ttymxc[0-9]*|pppox[0-9]*|ircomm[0-9]*|noz[0-9]*|rfcomm[0-9]*", GROUP="uucp" + + SUBSYSTEM=="mem", KERNEL=="mem|kmem|port", GROUP="kmem", MODE="0640" + +@@ -67,13 +67,13 @@ KERNEL=="irlpt[0-9]*", GROUP="lp" + SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:0701??:*", GROUP="lp" + + SUBSYSTEM=="block", GROUP="disk" +-SUBSYSTEM=="block", KERNEL=="sr[0-9]*", GROUP="cdrom" +-SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="4|5", GROUP="cdrom" +-KERNEL=="sch[0-9]*", GROUP="cdrom" +-KERNEL=="pktcdvd[0-9]*", GROUP="cdrom" +-KERNEL=="pktcdvd", GROUP="cdrom" ++SUBSYSTEM=="block", KERNEL=="sr[0-9]*", GROUP="optical" ++SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="4|5", GROUP="optical" ++KERNEL=="sch[0-9]*", GROUP="optical" ++KERNEL=="pktcdvd[0-9]*", GROUP="optical" ++KERNEL=="pktcdvd", GROUP="optical" + +-SUBSYSTEM=="scsi_generic|scsi_tape", SUBSYSTEMS=="scsi", ATTRS{type}=="1|8", GROUP="tape" ++SUBSYSTEM=="scsi_generic|scsi_tape", SUBSYSTEMS=="scsi", ATTRS{type}=="1|8", GROUP="storage" + SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="0", GROUP="disk" + KERNEL=="qft[0-9]*|nqft[0-9]*|zqft[0-9]*|nzqft[0-9]*|rawqft[0-9]*|nrawqft[0-9]*", GROUP="disk" + KERNEL=="loop-control", GROUP="disk", OPTIONS+="static_node=loop-control" +diff --git a/sysusers.d/basic.conf.in b/sysusers.d/basic.conf.in +index 8cc1a7cad2..21bb6d8948 100644 +--- a/sysusers.d/basic.conf.in ++++ b/sysusers.d/basic.conf.in +@@ -22,17 +22,17 @@ g utmp {{UTMP_GID }} - - + + # Physical and virtual hardware access groups + g audio {{AUDIO_GID }} - - +-g cdrom {{CDROM_GID }} - - +-g dialout {{DIALOUT_GID}} - - + g disk {{DISK_GID }} - - + g input {{INPUT_GID }} - - + g kmem {{KMEM_GID }} - - + g kvm {{KVM_GID }} - - + g lp {{LP_GID }} - - ++g optical {{OPTICAL_GID}} - - + g render {{RENDER_GID }} - - + g sgx {{SGX_GID }} - - +-g tape {{TAPE_GID }} - - ++g storage {{STORAGE_GID}} - - + g tty {{TTY_GID }} - - ++g uucp {{UUCP_GID }} - - + g video {{VIDEO_GID }} - - + + # Default group for normal users +From 14de5ced41edc9fa8e380330c03adc89ef257fbc Mon Sep 17 00:00:00 2001 +From: Christian Hesse +Date: Mon, 27 Dec 2021 23:32:42 +0100 +Subject: [PATCH] generate tmpfiles.d/legacy.conf +--- + tmpfiles.d/legacy.conf.in | 3 --- + tmpfiles.d/meson.build | 2 +- + 2 files changed, 1 insertion(+), 4 deletions(-) + +diff --git a/tmpfiles.d/legacy.conf.in b/tmpfiles.d/legacy.conf.in +index 4f2c0d7c43..62e2ae0986 100644 +--- a/tmpfiles.d/legacy.conf.in ++++ b/tmpfiles.d/legacy.conf.in +@@ -12,9 +12,6 @@ + + d /run/lock 0755 root root - + L /var/lock - - - - ../run/lock +-{% if CREATE_LOG_DIRS %} +-L /var/log/README - - - - ../..{{DOC_DIR}}/README.logs +-{% endif %} + + # /run/lock/subsys is used for serializing SysV service execution, and + # hence without use on SysV-less systems. +diff --git a/tmpfiles.d/meson.build b/tmpfiles.d/meson.build +index b8d3919025..000bd0bd22 100644 +--- a/tmpfiles.d/meson.build ++++ b/tmpfiles.d/meson.build +@@ -27,7 +27,7 @@ foreach pair : files + endforeach + + in_files = [['etc.conf', ''], +- ['legacy.conf', 'HAVE_SYSV_COMPAT'], ++ ['legacy.conf', ''], + ['static-nodes-permissions.conf', ''], + ['systemd.conf', ''], + ['var.conf', ''], diff --git a/systemd/static-compat/PKGBUILD b/systemd/static-compat/PKGBUILD new file mode 100644 index 00000000..d6a64d8a --- /dev/null +++ b/systemd/static-compat/PKGBUILD @@ -0,0 +1,198 @@ +# Contributor: Christian Hesse +# Contributor: Dave Reisner +# Contributor: Tom Gundersen + +_pkgname=systemd +pkgname=static-compat-$_pkgname-libs +_tag='5aba21f1561d48fdcf7f4670263ba109c25c1ea6' # git rev-parse v${_tag_name} +_tag_name=250.4 +pkgver="${_tag_name/-/}" +pkgrel=2 +arch=('x86_64') +url='https://www.github.com/systemd/systemd' +pkgdesc='systemd client libraries' +license=('LGPL2.1') +depends=('glibc-static-compat' 'static-compat-libgcrypt' 'static-compat-lz4' 'static-compat-xz' 'static-compat-zstd' + 'static-compat-util-linux' 'static-compat-openssl' 'static-compat-libcap') +makedepends=('static-compat-meson' 'git' 'python-jinja' 'gperf' 'static-compat-pcre2') +options=('strip' 'staticlibs') +validpgpkeys=('63CDA1E5D3FC22B998D20DD6327F26951A015CC4' # Lennart Poettering + 'A9EA9081724FFAE0484C35A1A81CEA22BC8C7E2E' # Luca Boccassi + '5C251B5FC54EB2F80F407AAAC54CA336CFEB557E') # Zbigniew Jędrzejewski-Szmek +source=("git+https://github.com/systemd/systemd-stable#tag=${_tag}?signed" + "git+https://github.com/systemd/systemd#tag=v${_tag_name%.*}?signed" + '0001-Use-Arch-Linux-device-access-groups.patch' + '0001-Strip-down-build-script.patch') +sha512sums=('SKIP' + 'SKIP' + 'cc0c2ffb5f7c3a7176cd68f3dddd85ca000dcc4cdf3044746a20147234adb6811800fd28a4713faa6a59bf8c02be9fd43c2d6aa6695fd1dbf03ae773a91d090c' + 'c7a91d2d26ee79a147c582941c4eb111093a1e4e2e9cbcdb9c1c70f65996bd935f684222d6b745fd9b81fc916b96153955ce76424ecdbf4c6ef983900bf639da') + +_backports=( + # bus: Use OrderedSet for introspection + 'acac88340ace3cd631126eebb6d0390cd54e8231' + # resolved: DoT fixes (https://github.com/systemd/systemd-stable/pull/187) + '88b4e8f74ed981000ded8e23ead930a6f68eebc8~..6d3e2f0188f8a10412c56dc987198104a4dfff0f' +) + +_reverts=( +) + +prepare() { + cd "$_pkgname-stable" + + # add upstream repository for cherry-picking + git remote add -f upstream ../systemd + + local _c + for _c in "${_backports[@]}"; do + if [[ $_c == *..* ]]; then + git log --oneline --reverse "${_c}" + else + git log --oneline -1 "${_c}" + fi + git cherry-pick -n "${_c}" + done + for _c in "${_reverts[@]}"; do + git log --oneline -1 "${_c}" + git revert -n "${_c}" + done + + # Replace cdrom/dialout/tape groups with optical/uucp/storage + patch -Np1 -i ../0001-Use-Arch-Linux-device-access-groups.patch + + # Strip down build script to avoid running into errors despite the minimal/static setup + patch -Np1 -i ../0001-Strip-down-build-script.patch + + # Fix symbol clash with libmount + find \( -iname '*.c' -o -iname '*.h' \) -exec \ + sed -E -i -e 's|(((\$\|[^\w_])parse_)(size\|range))\(|\1_2\(|g' {} \; +} + +build() { + export CFLAGS+=" -lgpg-error -lcrypt -lpthread -ldl -lrt" + source static-compat-environment + + # Add $static_compat_prefix to runtime path for libcrypt.so.1 which unfortunately gets + # linked against dynamically + export LD_LIBRARY_PATH=/usr/lib:$static_compat_prefix/lib + + # Invoke pkg-config with --stativc + export PATH=$PWD:$PATH + printf '#!/usr/bin/bash\nexec /usr/bin/pkg-config --static "$@"\n' > pkg-config + chmod +x pkg-config + + local _timeservers=({0..3}.arch.pool.ntp.org) + local _nameservers=( + # We use these public name services, ordered by their privacy policy (hopefully): + # * Cloudflare (https://1.1.1.1/) + # * Quad9 (https://www.quad9.net/) + # * Google (https://developers.google.com/speed/public-dns/) + '1.1.1.1#cloudflare-dns.com' + '9.9.9.9#dns.quad9.net' + '8.8.8.8#dns.google' + '2606:4700:4700::1111#cloudflare-dns.com' + '2620:fe::9#dns.quad9.net' + '2001:4860:4860::8888#dns.google' + ) + + local _meson_options=( + -Drootprefix=$static_compat_prefix + + # internal version comparison is incompatible with pacman: + # 249~rc1 < 249 < 249.1 < 249rc + -Dversion-tag="${_tag_name/-/\~}-${pkgrel}-arch" + -Dmode=release + + -Dgnu-efi=true + -Dima=false + -Dlibidn2=true + -Dlz4=true + -Dman=false + + # We disable DNSSEC by default, it still causes trouble: + # https://github.com/systemd/systemd/issues/10579 + + -Ddbuspolicydir=$static_compat_prefix/share/dbus-1/system.d + -Ddefault-dnssec=no + -Ddefault-hierarchy=unified + -Ddefault-kill-user-processes=false + -Ddefault-locale=C + -Dlocalegen-path=$static_compat_prefix/bin/locale-gen + -Ddns-over-tls=openssl + -Dfallback-hostname='archlinux' + -Dnologin-path=/usr/bin/nologin + -Dntp-servers="${_timeservers[*]}" + -Ddns-servers="${_nameservers[*]}" + -Drpmmacrosdir=no + -Dsysvinit-path= + -Dsysvrcnd-path= + + # Enable static libs + -Dlink-udev-shared=false + -Dstatic-libsystemd=true + -Dstatic-libudev=true + + # Disable most of the features, we're only interested in libs + -Dman=false + -Dhtml=false + -Dbpf-framework=false + -Dlibidn2=false + -Dlibidn=false + -Dlogind=false + -Dcoredump=false + -Dpstore=false + -Dtmpfiles=false + -Dstandalone-binaries=false + -Dacl=false + -Dpam=false + -Doomd=false + -Dhostnamed=false + -Dlocaled=false + -Dmachined=false + -Dportabled=false + -Dsysext=false + -Duserdb=false + -Dhomed=false + -Dnetworkd=false + -Dtimedated=false + -Dtimesyncd=false + -Dremote=false + -Dnss-myhostname=false + -Dnss-mymachines=false + -Dnss-resolve=false + -Dnss-systemd=false + -Dfirstboot=false + -Dquotacheck=false + -Dsysusers=false + -Dimportd=false + -Drfkill=false + -Dxdg-autostart=false + -Dgnu-efi=false + + -Dsbat-distro='arch' + -Dsbat-distro-summary='Static compat environment' + -Dsbat-distro-pkgname="${pkgname}" + -Dsbat-distro-version="${pkgver}" + -Dsbat-distro-url="https://github.com/Martchus/PKGBUILDs" + ) + + static-compat-meson "$_pkgname-stable" build "${_meson_options[@]}" + meson compile --verbose -C build +} + +check() { + source static-compat-environment + export LD_LIBRARY_PATH=/usr/lib:$static_compat_prefix/lib + meson test -C build +} + +package() { + source static-compat-environment + DESTDIR="$pkgdir" meson install -C build + find "$pkgdir/$static_compat_prefix" -iname '*.so*' -delete + rm -r "$pkgdir/$static_compat_prefix"/share/{bash-completion,doc,factory,zsh} + rm -r "$pkgdir/$static_compat_prefix"/var +} + +# vim:ft=sh syn=sh et sw=2: diff --git a/tageditor/static-compat/PKGBUILD b/tageditor/static-compat/PKGBUILD new file mode 100644 index 00000000..1480a36d --- /dev/null +++ b/tageditor/static-compat/PKGBUILD @@ -0,0 +1,76 @@ +# Maintainer: Martchus + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +# set the web view provider: either webkit, webengine, auto or none +_webview_provider=${TAGEDITOR_WEBVIEW_PROVIDER:-none} + +# set the JavaScript provider: either script, qml, auto or none +_js_provider=${TAGEDITOR_JS_PROVIDER:-none} + +# whether the Qt GUI is enabled: ON or OFF +_qt_gui=${TAGEDITOR_QT_GUI:-OFF} + +# whether the experimental JSON export is enabled: ON or OFF +_json_export=${TAGEDITOR_JSON_EXPORT:-OFF} + +_reponame=tageditor +pkgname=static-compat-tageditor +_name=${pkgname#static-compat} +pkgver=3.7.0 +pkgrel=1 +arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64') +pkgdesc='A tag editor with Qt GUI and command-line interface supporting MP4/M4A/AAC (iTunes), ID3, Vorbis, Opus, FLAC and Matroska' +license=('GPL') +[[ $_webview_provider == none ]] && [[ $_js_provider == none ]] && [[ $_qt_gui == ON ]] && depends+=('static-compat-qt6-base') +[[ $_webview_provider == webkit ]] && depends+=('static-compat-qt6-webkit') +[[ $_webview_provider == webengine ]] && depends+=('static-compat-qt6-webengine') +[[ $_js_provider == script ]] && depends+=('static-compat-qt6-script') +[[ $_js_provider == qml ]] && depends+=('qt6-declarative') +makedepends=('static-compat-cmake' 'static-compat-tagparser' 'ninja') +[[ $_json_export == ON ]] && makedepends+=('reflective-rapidjson') +[[ $_qt_gui == ON ]] && makedepends+=('static-compat-qtutilities' 'static-compat-xdg-utils' 'static-compat-qt6-tools' 'clang' 'mesa') +checkdepends=('static-compat-cppunit' 'jq') +url="https://github.com/Martchus/${_reponame}" +source=("${_name}-${pkgver}.tar.gz::https://github.com/Martchus/${_reponame}/archive/v${pkgver}.tar.gz") +sha256sums=('e3814efdb9ca9bc386b51c602f8f4f507e8698ecdaf39a5849ed1795ddaa5c38') + +build() { + check_buildoption ccache y && ccache_args=' + -DCMAKE_C_COMPILER_LAUNCHER=ccache + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache' + source static-compat-environment + cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}" + static-compat-cmake \ + -G Ninja \ + -DCMAKE_BUILD_TYPE:STRING='Release' \ + -DBUILTIN_TRANSLATIONS:BOOL=ON \ + -DBUILTIN_TRANSLATIONS_OF_QT:BOOL=ON \ + -DWEBVIEW_PROVIDER="${_webview_provider}" \ + -DWIDGETS_GUI="${_qt_gui}" \ + -DQUICK_GUI=OFF \ + -DJS_PROVIDER="${_js_provider}" \ + -DENABLE_JSON_EXPORT="${_json_export}" \ + -DREFLECTION_GENERATOR_EXECUTABLE:FILEPATH='/usr/bin/reflective_rapidjson_generator' \ + -DSTATIC_LINKAGE:BOOL=ON \ + -DNO_STATIC_ENFORCE:BOOL=ON \ + . + ninja +} + +check() { + source static-compat-environment + cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}" + if [[ $TEST_FILE_PATH ]]; then + ninja check + else + msg2 'Skipping execution of testsuite because the environment variable TEST_FILE_PATH is not set.' + fi +} + +package() { + source static-compat-environment + cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}" + DESTDIR="${pkgdir}" ninja install +} diff --git a/tagparser/static-compat/PKGBUILD b/tagparser/static-compat/PKGBUILD new file mode 100644 index 00000000..42e427b3 --- /dev/null +++ b/tagparser/static-compat/PKGBUILD @@ -0,0 +1,53 @@ +# Maintainer: Martchus + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +_reponame=tagparser +pkgname=static-compat-tagparser +_name=${pkgname#static-compat-} +pkgver=11.1.0 +pkgrel=1 +arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64') +pkgdesc='C++ library for reading and writing MP4/M4A/AAC (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags' +license=('GPL') +depends=('static-compat-c++utilities' 'static-compat-zlib') +makedepends=('static-compat-cmake' 'ninja' 'iso-codes') +checkdepends=('static-compat-cppunit' 'static-compat-openssl') +optdepends=("$_name-doc: API documentation") +url="https://github.com/Martchus/${_reponame}" +source=("${_name}-${pkgver}.tar.gz::https://github.com/Martchus/${_reponame}/archive/v${pkgver}.tar.gz") +sha256sums=('dc3bd56ee7ddd3220062d2637b89dffc27747c3027c4b223a4697d693e55e2f1') + +prepare() { + [[ -d tagparser ]] || ln -s "${PROJECT_DIR_NAME:-$_reponame-$pkgver}" tagparser +} + +build() { + check_buildoption ccache y && ccache_args=' + -DCMAKE_C_COMPILER_LAUNCHER=ccache + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache' + source static-compat-environment + cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}" + static-compat-cmake \ + -G Ninja \ + -DCMAKE_BUILD_TYPE:STRING='Release' \ + . + ninja +} + +check() { + source static-compat-environment + cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}" + if [[ $TEST_FILE_PATH ]]; then + ninja check + else + msg2 'Skipping execution of testsuite because the environment variable TEST_FILE_PATH is not set.' + fi +} + +package() { + source static-compat-environment + cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}" + DESTDIR="${pkgdir}" ninja install +} diff --git a/tcl/static-compat/PKGBUILD b/tcl/static-compat/PKGBUILD new file mode 100644 index 00000000..ced06ae2 --- /dev/null +++ b/tcl/static-compat/PKGBUILD @@ -0,0 +1,67 @@ +# Contributor: Eric Bélanger + +_pkgname=tcl +pkgname=static-compat-$_pkgname +pkgver=8.6.12 +pkgrel=3 +pkgdesc="Powerful, easy-to-learn dynamic programming language" +arch=('x86_64') +url="http://tcl.sourceforge.net/" +license=('custom') +depends=('static-compat-zlib') +makedepends=('static-compat-configure') +options=('staticlibs' '!lto') +source=(https://downloads.sourceforge.net/sourceforge/tcl/tcl${pkgver}-src.tar.gz) +sha256sums=('26c995dd0f167e48b11961d891ee555f680c175f7173ff8cb829f4ebcde4c1a6') + +prepare() { + cd tcl${pkgver} + # we build the tcl sqlite interface in sqlite-tcl package + rm -rf pkgs/sqlite3* +} + +build() { + source static-compat-environment + cd tcl${pkgver}/unix + static-compat-configure --disable-shared --disable-rpath --mandir="$static_compat_prefix"/share/man --enable-threads --enable-64bit + make +} + +check() { + source static-compat-environment + cd tcl${pkgver}/unix + make test +} + +package() { + source static-compat-environment + cd tcl${pkgver}/unix + make INSTALL_ROOT="${pkgdir}" install install-private-headers + ln -sf tclsh${pkgver%.*} "${pkgdir}/$static_compat_prefix/bin/tclsh" + #ln -sf libtcl${pkgver%.*}.so "${pkgdir}/usr/lib/libtcl.so" + install -Dm644 ../license.terms "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + install -Dm644 tcl.m4 -t "$pkgdir/$static_compat_prefix"/share/aclocal + chmod 644 "$pkgdir/$static_compat_prefix/lib/libtclstub8.6.a" + + # remove buildroot traces + _tclver=8.6 + sed -e "s#${srcdir}/tcl${pkgver}/unix#/usr/lib#" \ + -e "s#${srcdir}/tcl${pkgver}#/usr/include#" \ + -e "s#'{/usr/lib} '#'/usr/lib/tcl$_tclver'#" \ + -i "${pkgdir}/$static_compat_prefix/lib/tclConfig.sh" + + tdbcver=tdbc1.1.3 + sed -e "s#${srcdir}/tcl${pkgver}/unix/pkgs/$tdbcver#$static_compat_prefix/lib/$tdbcver#" \ + -e "s#${srcdir}/tcl${pkgver}/pkgs/$tdbcver/generic#$static_compat_prefix/include#" \ + -e "s#${srcdir}/tcl${pkgver}/pkgs/$tdbcver/library#$static_compat_prefix/lib/tcl${pkgver%.*}#" \ + -e "s#${srcdir}/tcl${pkgver}/pkgs/$tdbcver#$static_compat_prefix/include#" \ + -i "${pkgdir}/$static_compat_prefix/lib/$tdbcver/tdbcConfig.sh" + + itclver=itcl4.2.2 + sed -e "s#${srcdir}/tcl${pkgver}/unix/pkgs/$itclver#$static_compat_prefix/lib/$itclver#" \ + -e "s#${srcdir}/tcl${pkgver}/pkgs/$itclver/generic#$static_compat_prefix/include#" \ + -e "s#${srcdir}/tcl${pkgver}/pkgs/$itclver#$static_compat_prefix/include#" \ + -i "${pkgdir}/$static_compat_prefix/lib/$itclver/itclConfig.sh" + + rm -r "$pkgdir/$static_compat_prefix"/share/man +} diff --git a/util-linux/static/PKGBUILD b/util-linux/static-compat/PKGBUILD similarity index 73% rename from util-linux/static/PKGBUILD rename to util-linux/static-compat/PKGBUILD index bd535b8e..94a2ce74 100644 --- a/util-linux/static/PKGBUILD +++ b/util-linux/static-compat/PKGBUILD @@ -3,31 +3,26 @@ # Contributor: judd _pkgname=util-linux -pkgname=$_pkgname-static -_pkgmajor=2.36 -pkgver=${_pkgmajor}.1 -pkgrel=4 +pkgname=static-compat-$_pkgname +_pkgmajor=2.38 +_realver=${_pkgmajor} +pkgver=${_realver/-/} +pkgrel=1 pkgdesc='Miscellaneous system utilities for Linux' url='https://github.com/karelzak/util-linux' arch=('x86_64') -makedepends=('systemd' 'python' 'libcap-ng' 'libxcrypt') +depends=('glibc-static-compat') +makedepends=('systemd' 'python' 'libcap-ng' 'libxcrypt' 'static-compat-configure') license=('GPL2') -options=('strip') +options=(!emptydirs staticlibs strip) validpgpkeys=('B0C64D14301CC6EFAEDF60E4E4B71D5EEC39C284') # Karel Zak options=(staticlibs) -source=("https://www.kernel.org/pub/linux/utils/util-linux/v$_pkgmajor/$_pkgname-$pkgver.tar."{xz,sign} - '0001-libmount-don-t-use-symfollow-for-helpers-on-user-mounts.patch') -sha256sums=('09fac242172cd8ec27f0739d8d192402c69417617091d8c6e974841568f37eed' - 'SKIP' - '91db684edd908dd89ce9b5f00c56789d0a0eeeb5249f1bb4578e6024491823b4') - -prepare() { - cd "$_pkgname-$pkgver" - - patch -Np1 < ../0001-libmount-don-t-use-symfollow-for-helpers-on-user-mounts.patch -} +source=("https://www.kernel.org/pub/linux/utils/util-linux/v${_pkgmajor}/${_pkgname}-${_realver}.tar."{xz,sign}) +sha256sums=('6d111cbe4d55b336db2f1fbeffbc65b89908704c01136371d32aa9bec373eb64' + 'SKIP') build() { + source static-compat-environment cd "$_pkgname-$pkgver" # We ship Debian's hardlink in package 'hardlink', Fedora's hardlink was @@ -36,11 +31,10 @@ build() { # https://bugs.archlinux.org/task/62896 # https://github.com/karelzak/util-linux/issues/808 - ./configure \ - --prefix=/usr/static \ - --libdir=/usr/static/lib \ - --bindir=/usr/static/bin \ - --sbindir=/usr/static/bin \ + static-compat-configure \ + --libdir="$static_compat_prefix"/lib \ + --bindir="$static_compat_prefix"/bin \ + --sbindir="$static_compat_prefix"/bin \ --localstatedir=/var \ --disable-shared \ --enable-static \ @@ -119,9 +113,10 @@ build() { } package() { + source static-compat-environment cd "$_pkgname-$pkgver" make DESTDIR="$pkgdir" install - rm -r "$pkgdir"/usr/static/{sbin,bin} - rm -r "$pkgdir"/usr/static/share/{locale,man,doc,bash-completion} + rm -r "$pkgdir/$static_compat_prefix"/{sbin,bin} + rm -r "$pkgdir/$static_compat_prefix"/share/{locale,man,doc,bash-completion} } diff --git a/util-linux/static/0001-libmount-don-t-use-symfollow-for-helpers-on-user-mounts.patch b/util-linux/static/0001-libmount-don-t-use-symfollow-for-helpers-on-user-mounts.patch deleted file mode 100644 index 403bdc7e..00000000 --- a/util-linux/static/0001-libmount-don-t-use-symfollow-for-helpers-on-user-mounts.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 76bb9b30cfcf54b59591a57a3d2a747e514469b2 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Thu, 19 Nov 2020 09:49:16 +0100 -Subject: libmount: don't use "symfollow" for helpers on user mounts - -Addresses: https://github.com/karelzak/util-linux/issues/1193 -Signed-off-by: Karel Zak ---- - libmount/src/context_mount.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/libmount/src/context_mount.c b/libmount/src/context_mount.c -index 8c394c1ff..dd1786176 100644 ---- a/libmount/src/context_mount.c -+++ b/libmount/src/context_mount.c -@@ -415,6 +415,9 @@ static int generate_helper_optstr(struct libmnt_context *cxt, char **optstr) - * string, because there is nothing like MS_EXEC (we only have - * MS_NOEXEC in mount flags and we don't care about the original - * mount string in libmount for VFS options). -+ * -+ * This use-case makes sense for MS_SECURE flags only (see -+ * mnt_optstr_get_flags() and mnt_context_merge_mflags()). - */ - if (!(cxt->mountflags & MS_NOEXEC)) - mnt_optstr_append_option(optstr, "exec", NULL); -@@ -422,11 +425,8 @@ static int generate_helper_optstr(struct libmnt_context *cxt, char **optstr) - mnt_optstr_append_option(optstr, "suid", NULL); - if (!(cxt->mountflags & MS_NODEV)) - mnt_optstr_append_option(optstr, "dev", NULL); -- if (!(cxt->mountflags & MS_NOSYMFOLLOW)) -- mnt_optstr_append_option(optstr, "symfollow", NULL); - } - -- - if (cxt->flags & MNT_FL_SAVED_USER) - rc = mnt_optstr_set_option(optstr, "user", cxt->orig_user); - if (rc) diff --git a/vulkan-headers/static-compat/PKGBUILD b/vulkan-headers/static-compat/PKGBUILD new file mode 100644 index 00000000..e872ce16 --- /dev/null +++ b/vulkan-headers/static-compat/PKGBUILD @@ -0,0 +1,31 @@ +# Contributor: Laurent Carlier + +pkgname=static-compat-vulkan-headers +_pkgname=Vulkan-Headers +pkgver=1.3.211 +pkgrel=1 +epoch=1 +pkgdesc="Vulkan header files" +arch=(any) +url="https://www.khronos.org/vulkan/" +license=('APACHE') +makedepends=(static-compat-cmake git) +provides=("static-compat-vulkan-hpp=${pkgver}") +source=("${pkgname}-${pkgver}.tar.gz::https://github.com/KhronosGroup/Vulkan-Headers/archive/v${pkgver}.tar.gz") +sha256sums=('67ab69142f69389dfdf5f1c7922e62aa4a03ba286b9229dd7f7f3e827232463c') + +build() { + source static-compat-environment + cd Vulkan-Headers* + + rm -rf build ; mkdir build ; cd build + static-compat-cmake .. + make +} + +package() { + source static-compat-environment + cd Vulkan-Headers*/build + + make DESTDIR="${pkgdir}" install +} diff --git a/wayland/static/PKGBUILD b/wayland/static-compat/PKGBUILD similarity index 56% rename from wayland/static/PKGBUILD rename to wayland/static-compat/PKGBUILD index 831d3455..9298cf51 100644 --- a/wayland/static/PKGBUILD +++ b/wayland/static-compat/PKGBUILD @@ -3,36 +3,41 @@ # Contributor: Joel Teichroeb _pkgname=wayland -pkgname=$_pkgname-static -pkgver=1.18.0 +pkgname=static-compat-$_pkgname +pkgver=1.20.0 pkgrel=2 pkgdesc='A computer display server protocol' arch=('x86_64') url='https://wayland.freedesktop.org/' license=('MIT') -depends=('glibc' 'libffi-static' 'expat-static') +depends=('static-compat-libffi' 'static-compat-expat' 'static-compat-libxml2') options=(!emptydirs staticlibs) -makedepends=('meson' 'ninja' 'libxslt' 'xmlto' 'doxygen' 'graphviz' 'docbook-xsl') +makedepends=('static-compat-meson' 'ninja' 'libxslt' 'xmlto' 'doxygen' 'graphviz' 'docbook-xsl') validpgpkeys=('C7223EBE4EF66513B892598911A30156E0E67611' # Bryce Harrington 'C0066D7DB8E9AC6844D728715E54498E697F11D7' # Derek Foreman '34FF9526CFEF0E97A340E2E40FDE7BE0E88F5E48') # emersion source=("https://wayland.freedesktop.org/releases/$_pkgname-$pkgver.tar.xz"{,.sig}) -sha256sums=('4675a79f091020817a98fd0484e7208c8762242266967f55a67776936c2e294d' +sha256sums=('b8a034154c7059772e0fdbd27dbfcda6c732df29cae56a82274f6ec5d7cd8725' 'SKIP') build() { - export PKG_CONFIG_PATH=/usr/static/lib/pkgconfig:/usr/lib/pkgconfig - meson build $_pkgname-$pkgver --buildtype=release --prefix /usr/static --default-library static + source static-compat-environment + export PATH=$PWD:$PATH + printf '#!/usr/bin/bash\nexec /usr/bin/pkg-config --static "$@"\n' > pkg-config + chmod +x pkg-config + static-compat-meson build $_pkgname-$pkgver ninja -C build } -#check() { -# ninja -C build test -#} +check() { + source static-compat-environment + ninja -C build test +} package() { + source static-compat-environment DESTDIR="$pkgdir" ninja -C build install - rm -r "$pkgdir"/usr/static/share/{doc,man} + rm -r "$pkgdir/$static_compat_prefix"/share/{doc,man} install -Dm 644 $_pkgname-$pkgver/COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING" } diff --git a/xcb-proto/static-compat/PKGBUILD b/xcb-proto/static-compat/PKGBUILD new file mode 100644 index 00000000..2af87b80 --- /dev/null +++ b/xcb-proto/static-compat/PKGBUILD @@ -0,0 +1,39 @@ +# Contributor: Andreas Radke +# Contributor: Jan de Groot + +_pkgname=xcb-proto +pkgname=static-compat-$_pkgname +pkgver=1.14.1 +pkgrel=5 +pkgdesc="XML-XCB protocol descriptions" +arch=(any) +url="https://xcb.freedesktop.org/" +license=('custom') +makedepends=('python' 'libxml2' 'static-compat-configure') +source=(https://xorg.freedesktop.org/archive/individual/proto/$_pkgname-$pkgver.tar.xz{,.sig}) +sha512sums=('140fbf48483bacc7f6b70fdcf76f9e4ff0e87df9cb3a071cea47d8fe4574407cdefcfbd674099014d297e5fc010748e71d8609fca4cc32e8b25c634f928b727d' + 'SKIP') +validpgpkeys=('A66D805F7C9329B4C5D82767CCC4F07FAC641EFF') # "Daniel Stone " +validpgpkeys+=('3BB639E56F861FA2E86505690FDD682D974CA72A') # "Matt Turner " +validpgpkeys+=('4A193C06D35E7C670FA4EF0BA2FB9E081F2D130E') # "Alan Coopersmith " + +build() { + source static-compat-environment + cd $_pkgname-$pkgver + static-compat-configure + make +} + +check() { + source static-compat-environment + cd $_pkgname-$pkgver + make check +} + +package() { + source static-compat-environment + cd $_pkgname-$pkgver + make DESTDIR="$pkgdir" install + install -m755 -d "$pkgdir/usr/share/licenses/$pkgname" + install -m644 COPYING "$pkgdir/usr/share/licenses/$pkgname" +} diff --git a/xcb-util-image/static/LICENSE b/xcb-util-image/static-compat/LICENSE similarity index 100% rename from xcb-util-image/static/LICENSE rename to xcb-util-image/static-compat/LICENSE diff --git a/xcb-util-image/static/PKGBUILD b/xcb-util-image/static-compat/PKGBUILD similarity index 58% rename from xcb-util-image/static/PKGBUILD rename to xcb-util-image/static-compat/PKGBUILD index deb68539..1c23f7d7 100644 --- a/xcb-util-image/static/PKGBUILD +++ b/xcb-util-image/static-compat/PKGBUILD @@ -2,38 +2,45 @@ # Contributor: Andreas Radke _pkgname=xcb-util-image -pkgname=$_pkgname-static +pkgname=static-compat-$_pkgname pkgver=0.4.0 pkgrel=3 pkgdesc="Utility libraries for XC Binding - Port of Xlib's XImage and XShmImage functions" arch=('x86_64') url="https://xcb.freedesktop.org" license=('custom') -depends=('libxcb-static>=1.7' 'xcb-util-static>=0.3.9') -makedepends=('xorg-util-macros' 'xorgproto') -options=(!emptydirs !docs staticlibs) +depends=('static-compat-xcb-util') +makedepends=('xorg-util-macros' 'static-compat-xorgproto' 'static-compat-configure') +options=(staticlibs) source=("https://xcb.freedesktop.org/dist/${_pkgname}-${pkgver}.tar.bz2") sha512sums=('9b7202c054e1160f9ca97a86be1210d9fb47f2119f89ca85f15f20909cca884bfe0cb88e3e71c75b65e1a0a72b980066ccac810e41a91db895c74dde77440d4f') build() { + source static-compat-environment cd ${_pkgname}-${pkgver} - export PKG_CONFIG_PATH=/usr/static/lib/pkgconfig:/usr/lib/pkgconfig export PATH=$PWD:$PATH printf '#!/usr/bin/bash\nexec /usr/bin/pkg-config --static "$@"\n' > pkg-config chmod +x pkg-config - ./configure --prefix=/usr/static --disable-shared --enable-static + static-compat-configure --disable-shared --enable-static make } check() { + source static-compat-environment cd ${_pkgname}-${pkgver} make check } -package() { +package() { + source static-compat-environment cd ${_pkgname}-${pkgver} make DESTDIR="${pkgdir}" install + # avoid linker error + # /usr/bin/ld: /usr/static-compat/lib/libxcb-image.a(xcb_image.o): in function `xcb_create_pixmap_from_bitmap_data': + # (.text+0x14b7): undefined reference to `xcb_aux_create_gc' + sed -i 's|Requires:.*|\0 xcb-util|g' "$pkgdir/$static_compat_prefix"/lib/pkgconfig/xcb-image.pc + install -D -m644 COPYING \ "${pkgdir}"/usr/share/licenses/${pkgname}/COPYING } diff --git a/xcb-util-keysyms/static/LICENSE b/xcb-util-keysyms/static-compat/LICENSE similarity index 100% rename from xcb-util-keysyms/static/LICENSE rename to xcb-util-keysyms/static-compat/LICENSE diff --git a/xcb-util-keysyms/static/PKGBUILD b/xcb-util-keysyms/static-compat/PKGBUILD similarity index 75% rename from xcb-util-keysyms/static/PKGBUILD rename to xcb-util-keysyms/static-compat/PKGBUILD index 9548cda1..da821af5 100644 --- a/xcb-util-keysyms/static/PKGBUILD +++ b/xcb-util-keysyms/static-compat/PKGBUILD @@ -2,15 +2,15 @@ # Contributor: Andreas Radke _pkgname=xcb-util-keysyms -pkgname=$_pkgname-static +pkgname=static-compat-$_pkgname pkgver=0.4.0 pkgrel=3 pkgdesc="Utility libraries for XC Binding - Standard X key constants and conversion to/from keycodes" arch=('x86_64') url="https://xcb.freedesktop.org" license=('custom') -depends=('libxcb>=1.7') -makedepends=('xorg-util-macros' 'xorgproto') +depends=('static-compat-libxcb>=1.7') +makedepends=('xorg-util-macros' 'static-compat-xorgproto' 'static-compat-configure') options=(staticlibs) source=("https://xcb.freedesktop.org/dist/${_pkgname}-${pkgver}.tar.bz2" 'LICENSE') @@ -18,17 +18,20 @@ sha512sums=('b14b3100c3ae2379f9df799c0780a1ee39267101e58e4c1c6f390f039348ca2b370 '62f83468f9d9503a5a8c1ebaac78cbaefe3c485f8bfd7192817ec59254872fe2914ed66ae8b9e7f7a6ef5af283048c11390f44eb8f0f70b1c136ef5c75282e8c') build() { + source static-compat-environment cd ${_pkgname}-${pkgver} - ./configure --prefix=/usr/static --disable-shared --enable-static + static-compat-configure --disable-shared --enable-static make } check() { + source static-compat-environment cd ${_pkgname}-${pkgver} make check } package() { + source static-compat-environment cd ${_pkgname}-${pkgver} make DESTDIR="${pkgdir}" install diff --git a/xcb-util-renderutil/static/LICENSE b/xcb-util-renderutil/static-compat/LICENSE similarity index 100% rename from xcb-util-renderutil/static/LICENSE rename to xcb-util-renderutil/static-compat/LICENSE diff --git a/xcb-util-renderutil/static/PKGBUILD b/xcb-util-renderutil/static-compat/PKGBUILD similarity index 75% rename from xcb-util-renderutil/static/PKGBUILD rename to xcb-util-renderutil/static-compat/PKGBUILD index 79cbd5e4..63fde3b6 100644 --- a/xcb-util-renderutil/static/PKGBUILD +++ b/xcb-util-renderutil/static-compat/PKGBUILD @@ -2,15 +2,15 @@ # Contributor: Andreas Radke _pkgname=xcb-util-renderutil -pkgname=$_pkgname-static +pkgname=static-compat-$_pkgname pkgver=0.3.9 pkgrel=3 pkgdesc="Utility libraries for XC Binding - Convenience functions for the Render extension" arch=('x86_64') url="https://xcb.freedesktop.org" license=('custom') -depends=('libxcb>=1.7') -makedepends=('xorg-util-macros' 'xorgproto') +depends=('static-compat-libxcb>=1.7') +makedepends=('xorg-util-macros' 'static-compat-xorgproto' 'static-compat-configure') options=(staticlibs) source=("https://xcb.freedesktop.org/dist/${_pkgname}-${pkgver}.tar.bz2" 'LICENSE') @@ -18,17 +18,20 @@ sha512sums=('24b567992ecde7e69a406efd0ffb62266610d73b4dc0e5c71093221090fa134c14b '62f83468f9d9503a5a8c1ebaac78cbaefe3c485f8bfd7192817ec59254872fe2914ed66ae8b9e7f7a6ef5af283048c11390f44eb8f0f70b1c136ef5c75282e8c') build() { + source static-compat-environment cd ${_pkgname}-${pkgver} - ./configure --prefix=/usr/static --disable-shared --enable-static + static-compat-configure --disable-shared --enable-static make } check() { + source static-compat-environment cd ${_pkgname}-${pkgver} make check } package() { + source static-compat-environment cd ${_pkgname}-${pkgver} make DESTDIR="${pkgdir}" install diff --git a/xcb-util-wm/static/LICENSE b/xcb-util-wm/static-compat/LICENSE similarity index 100% rename from xcb-util-wm/static/LICENSE rename to xcb-util-wm/static-compat/LICENSE diff --git a/xcb-util-wm/static/PKGBUILD b/xcb-util-wm/static-compat/PKGBUILD similarity index 66% rename from xcb-util-wm/static/PKGBUILD rename to xcb-util-wm/static-compat/PKGBUILD index 66383dba..7469fb3f 100644 --- a/xcb-util-wm/static/PKGBUILD +++ b/xcb-util-wm/static-compat/PKGBUILD @@ -1,16 +1,16 @@ -# Maintainer: Jan de Groot -# Maintainer: Andreas Radke +# Contributor: Jan de Groot +# Contributor: Andreas Radke _pkgname=xcb-util-wm -pkgname=$_pkgname-static +pkgname=static-compat-$_pkgname pkgver=0.4.1 pkgrel=3 pkgdesc="Utility libraries for XC Binding - client and window-manager helpers for ICCCM" arch=('x86_64') url="https://xcb.freedesktop.org" license=('custom') -depends=('libxcb>=1.7') -makedepends=('xorg-util-macros' 'xorgproto') +depends=('static-compat-libxcb>=1.7') +makedepends=('xorg-util-macros' 'static-compat-xorgproto' 'static-compat-configure') options=(staticlibs) source=("https://xcb.freedesktop.org/dist/${_pkgname}-${pkgver}.tar.bz2" 'LICENSE') @@ -18,17 +18,20 @@ sha512sums=('cd1b3bcf9fcfc52e329ddc42b370d50dcf7d473c8e94f01cf7ea7fdbe0dc9176790 '62f83468f9d9503a5a8c1ebaac78cbaefe3c485f8bfd7192817ec59254872fe2914ed66ae8b9e7f7a6ef5af283048c11390f44eb8f0f70b1c136ef5c75282e8c') build() { + source static-compat-environment cd ${_pkgname}-${pkgver} - ./configure --prefix=/usr/static --disable-shared --enable-static + static-compat-configure --disable-shared --enable-static make } check() { + source static-compat-environment cd ${_pkgname}-${pkgver} make check } -package() { +package() { + source static-compat-environment cd ${_pkgname}-${pkgver} make DESTDIR="${pkgdir}" install diff --git a/xcb-util/static/PKGBUILD b/xcb-util/static-compat/PKGBUILD similarity index 60% rename from xcb-util/static/PKGBUILD rename to xcb-util/static-compat/PKGBUILD index 74127954..ddbe67b8 100644 --- a/xcb-util/static/PKGBUILD +++ b/xcb-util/static-compat/PKGBUILD @@ -1,34 +1,36 @@ -# Maintainer: Jan de Groot -# Maintainer: Andreas Radke +# Contributor: Jan de Groot +# Contributor: Andreas Radke # Contributor: Andrea Scarpino _pkgname=xcb-util -pkgname=$_pkgname-static +pkgname=static-compat-$_pkgname pkgver=0.4.0 pkgrel=3 pkgdesc="Utility libraries for XC Binding" arch=('x86_64') url="https://xcb.freedesktop.org" license=('custom') -depends=('libxcb-static>=1.7') -makedepends=('gperf' 'xorg-util-macros' 'xorgproto') +depends=('static-compat-libxcb>=1.7') +makedepends=('gperf' 'xorg-util-macros' 'static-compat-xorgproto' 'static-compat-configure') options=(staticlibs) source=("https://xcb.freedesktop.org/dist/${_pkgname}-${pkgver}.tar.bz2") sha512sums=('e60aaa6f582eacd05896c5fd7c8417938318a1288146f3a5b339f77eed24e211c6099963f8813daa621c94173d2934228936b491c0ed79b09a8a67d835867d0e') build() { + source static-compat-environment cd ${_pkgname}-${pkgver} - export PKG_CONFIG_PATH=/usr/static/lib/pkgconfig:/usr/lib/pkgconfig - ./configure --prefix=/usr/static --disable-shared --enable-static + static-compat-configure --prefix="$static_compat_prefix" --disable-shared --enable-static make } check() { + source static-compat-environment cd ${_pkgname}-${pkgver} make check } package() { + source static-compat-environment cd ${_pkgname}-${pkgver} make DESTDIR="${pkgdir}" install diff --git a/xorgproto/static-compat/PKGBUILD b/xorgproto/static-compat/PKGBUILD new file mode 100644 index 00000000..06d39b70 --- /dev/null +++ b/xorgproto/static-compat/PKGBUILD @@ -0,0 +1,51 @@ +# Contributor: AndyRTR + +# When releasing a xorgproto version with updated keysyms, rebuild libx11 + +_pkgname=xorgproto +pkgname=static-compat-$_pkgname +pkgver=2021.5 +pkgrel=1 +pkgdesc="combined X.Org X11 Protocol headers" +arch=('any') +url="https://xorg.freedesktop.org/" +license=('custom') +makedepends=('xorg-util-macros' 'static-compat-meson') +checkdepends=('python-libevdev') +source=(https://xorg.freedesktop.org/archive/individual/proto/$_pkgname-$pkgver.tar.bz2{,.sig}) +sha512sums=('0f5c4ee4fd56cd46f4d5850bcf3e04c92d2e98de54d0113987cb49fc83cf1f4d0e50e976333179c72fe2178cfa15ec6c1bfc4e76fc3bc2a4be80616ce079da87' + 'SKIP') +#validpgpkeys=('3C2C43D9447D5938EF4551EBE23B7E70B467F0BF') # "Peter Hutterer (Who-T) " +validpgpkeys=('FD0004A26EADFE43A4C3F249C6F7AE200374452D') # "Povilas Kanapickas " + +prepare() { + mkdir build +} + +build() { + source static-compat-environment + static-compat-meson "$_pkgname"-$pkgver build + ninja -C build +} + +check() { + source static-compat-environment + meson test -C build +} + +package() { + source static-compat-environment + DESTDIR="$pkgdir" ninja -C build install + + # licenses + install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}" + install -m644 "$_pkgname"-$pkgver/COPYING* "${pkgdir}/usr/share/licenses/${pkgname}/" + # remove licences of legacy stuff we don't ship anymore + rm -f "${pkgdir}"/usr/share/licenses/${pkgname}/COPYING-{evieproto,fontcacheproto,lg3dproto,printproto,xcalibrateproto,xf86rushproto} + + # cleanup + rm -f "${pkgdir}/$static_compat_prefix"/usr/include/X11/extensions/apple* + rm -f "${pkgdir}"/usr/share/licenses/${_pkgname}/COPYING-{apple,windows}wmproto + rm -f "${pkgdir}/$static_compat_prefix"/share/pkgconfig/applewmproto.pc + rm -rf "${pkgdir}/$static_compat_prefix"/share/doc +} diff --git a/xtrans/static-compat/PKGBUILD b/xtrans/static-compat/PKGBUILD new file mode 100644 index 00000000..0a6d9c88 --- /dev/null +++ b/xtrans/static-compat/PKGBUILD @@ -0,0 +1,35 @@ +# Contributor: Andreas Radke +# Contributor: Jan de Groot + +_pkgname=xtrans +pkgname=static-compat-$_pkgname +pkgver=1.4.0 +pkgrel=2 +pkgdesc="X transport library" +arch=('any') +license=('custom') +url="https://xorg.freedesktop.org/" +makedepends=(static-compat-configure) +options=(!emptydirs) +source=(${url}/releases/individual/lib/${_pkgname}-${pkgver}.tar.bz2{,.sig}) +sha512sums=('4fea89a3455c0e13321cbefa43340016dbb59bdd0dbdb5b796c1a6d2a6b1fd63cf1327b769ab426286b9c54b32ec764a50cd2b46228e4e43b841bda6b94de214' + 'SKIP') +validpgpkeys=('C383B778255613DFDB409D91DB221A6900000011') # "Keith Packard " +validpgpkeys+=('4A193C06D35E7C670FA4EF0BA2FB9E081F2D130E') # Alan Coopersmith + +build() { + source static-compat-environment + cd ${_pkgname}-${pkgver} + static-compat-configure +} + +package() { + source static-compat-environment + cd ${_pkgname}-${pkgver} + make DESTDIR="${pkgdir}" install + + install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING" + + install -m755 -d "${pkgdir}/$static_compat_prefix/lib" + mv "${pkgdir}/$static_compat_prefix/share/pkgconfig" "${pkgdir}/$static_compat_prefix/lib/pkgconfig" +} diff --git a/xz/static/PKGBUILD b/xz/static-compat/PKGBUILD similarity index 70% rename from xz/static/PKGBUILD rename to xz/static-compat/PKGBUILD index feab4ddb..ffdd398a 100644 --- a/xz/static/PKGBUILD +++ b/xz/static-compat/PKGBUILD @@ -2,14 +2,15 @@ # Contributor: François Charette _pkgname=xz -pkgname=$_pkgname-static +pkgname=static-compat-$_pkgname pkgver=5.2.5 pkgrel=1 pkgdesc='Library and command line tools for XZ and LZMA compressed files' arch=('x86_64') url='https://tukaani.org/xz/' license=('GPL' 'LGPL' 'custom') -depends=('glibc') +depends=('glibc-static-compat') +makedepends=('static-compat-configure') options=(!emptydirs staticlibs) source=("https://tukaani.org/${_pkgname}/${_pkgname}-${pkgver}.tar.gz"{,.sig}) sha256sums=('f6f4910fd033078738bd82bfba4f49219d03b17eb0794eb91efbae419f4aba10' @@ -17,25 +18,25 @@ sha256sums=('f6f4910fd033078738bd82bfba4f49219d03b17eb0794eb91efbae419f4aba10' validpgpkeys=('3690C240CE51B4670D30AD1C38EE757D69184620') build() { + source static-compat-environment cd "${srcdir}/${_pkgname}-${pkgver}" - ./configure --prefix=/usr/static \ - --disable-rpath \ - --disable-shared \ - --enable-static + static-compat-configure --disable-shared --enable-static --disable-rpath make } check() { + source static-compat-environment cd "${srcdir}/${_pkgname}-${pkgver}" make check } package() { + source static-compat-environment cd "${srcdir}/${_pkgname}-${pkgver}" make DESTDIR="${pkgdir}" install install -d -m755 "${pkgdir}/usr/share/licenses/${pkgname}/" ln -sf /usr/static/share/doc/xz/COPYING "${pkgdir}/usr/share/licenses/${pkgname}/" - rm -r "$pkgdir"/usr/static/bin - rm -r "$pkgdir"/usr/static/share/{man,doc,locale} + rm -r "$pkgdir/$static_compat_prefix"/bin + rm -r "$pkgdir/$static_compat_prefix"/share/{man,doc,locale} } diff --git a/zlib/default/PKGBUILD b/zlib/default/PKGBUILD new file mode 100644 index 00000000..8c619ed1 --- /dev/null +++ b/zlib/default/PKGBUILD @@ -0,0 +1,64 @@ +# Maintainer: Pierre Schmitz + +pkgbase=zlib +pkgname=(zlib minizip) +epoch=1 +pkgver=1.2.12 +pkgrel=1 +arch=('x86_64') +license=('custom') +url="https://www.zlib.net/" +depends=('glibc') +options=('staticlibs') # needed by binutils testsuite +source=("https://zlib.net/zlib-${pkgver}.tar.gz"{,.asc}) +sha256sums=('91844808532e5ce316b3c010929493c0244f3d37593afd6de04f71821d5136d9' + 'SKIP') +validpgpkeys=('5ED46A6721D365587791E2AA783FCD8E58BCAFBA') + +prepare() { + cd "${srcdir}/zlib-$pkgver" + grep -A 24 '^ Copyright' zlib.h > LICENSE +} + +build() { + cd "${srcdir}/zlib-$pkgver" + + CFLAGS+=" -ffat-lto-objects" + ./configure --prefix=/usr + make + + cd contrib/minizip + cp Makefile Makefile.orig + cp ../README.contrib readme.txt + autoreconf --install + ./configure --prefix=/usr --enable-static=no + make +} + +check() { + cd "${srcdir}/zlib-$pkgver" + make test + + cd contrib/minizip + make -f Makefile.orig test +} + +package_zlib() { + pkgdesc='Compression library implementing the deflate compression method found in gzip and PKZIP' + + cd "${srcdir}/zlib-$pkgver" + make install DESTDIR="${pkgdir}" + install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/zlib/LICENSE" +} + +package_minizip() { + pkgdesc='Mini zip and unzip based on zlib' + depends=('zlib') + + cd "${srcdir}/zlib-$pkgver/contrib/minizip" + make install DESTDIR="${pkgdir}" + install -D -m644 "${srcdir}/zlib-$pkgver/LICENSE" "${pkgdir}/usr/share/licenses/minizip/LICENSE" + + # https://github.com/madler/zlib/pull/229 + rm "${pkgdir}/usr/include/minizip/crypt.h" +} diff --git a/zlib/static-compat/PKGBUILD b/zlib/static-compat/PKGBUILD new file mode 100644 index 00000000..52d90e9f --- /dev/null +++ b/zlib/static-compat/PKGBUILD @@ -0,0 +1,73 @@ +pkgbase=zlib-static-compat +pkgname=(static-compat-zlib static-compat-minizip) +epoch=1 +pkgver=1.2.12 +pkgrel=1 +arch=('x86_64') +license=('custom') +url="https://www.zlib.net/" +makedepends=('static-compat-configure') +options=('staticlibs') +source=("https://zlib.net/zlib-${pkgver}.tar.gz"{,.asc}) +sha256sums=('91844808532e5ce316b3c010929493c0244f3d37593afd6de04f71821d5136d9' + 'SKIP') +validpgpkeys=('5ED46A6721D365587791E2AA783FCD8E58BCAFBA') + +prepare() { + cd "${srcdir}/zlib-$pkgver" + grep -A 24 '^ Copyright' zlib.h > LICENSE +} + +build() { + source static-compat-environment + + cd "${srcdir}/zlib-$pkgver" + + static-compat-configure + make + + cd contrib/minizip + cp Makefile Makefile.orig + cp ../README.contrib readme.txt + autoreconf --install + static-compat-configure + make +} + +check() { + source static-compat-environment + + cd "${srcdir}/zlib-$pkgver" + make test + + cd contrib/minizip + make -f Makefile.orig test +} + +package_static-compat-zlib() { + pkgdesc='Compression library implementing the deflate compression method found in gzip and PKZIP' + depends=('gcc-libs-static-compat') + + source static-compat-environment + + cd "${srcdir}/zlib-$pkgver" + make install DESTDIR="${pkgdir}" + rm -r "${pkgdir}/$static_compat_prefix/share/man" + rm "${pkgdir}/$static_compat_prefix/lib"/*.so* + install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/static-compat-zlib/LICENSE" +} + +package_static-compat-minizip() { + pkgdesc='Mini zip and unzip based on zlib' + depends=('zlib-static-compat') + + source static-compat-environment + + cd "${srcdir}/zlib-$pkgver/contrib/minizip" + make install DESTDIR="${pkgdir}" + rm "${pkgdir}/$static_compat_prefix/lib"/*.so* + install -D -m644 "${srcdir}/zlib-$pkgver/LICENSE" "${pkgdir}/usr/share/licenses/static-compat-minizip/LICENSE" + + # https://github.com/madler/zlib/pull/229 + rm "${pkgdir}/$static_compat_prefix/include/minizip/crypt.h" +} diff --git a/zstd/static-compat/PKGBUILD b/zstd/static-compat/PKGBUILD new file mode 100644 index 00000000..a17b5a21 --- /dev/null +++ b/zstd/static-compat/PKGBUILD @@ -0,0 +1,42 @@ +# Contributor: Bartłomiej Piotrowski +# Contributor: Andrzej Giniewicz +# Contributor: Johan Förberg + +_pkgname=zstd +pkgname=static-compat-$_pkgname +pkgver=1.5.2 +pkgrel=1 +pkgdesc='Zstandard - Fast real-time compression algorithm' +arch=(x86_64) +url='https://facebook.github.io/zstd/' +license=(BSD GPL2) +depends=(static-compat-{zlib,xz,lz4}) +makedepends=(gtest static-compat-environment) +options=(!emptydirs staticlibs) +source=(https://github.com/facebook/zstd/releases/download/v${pkgver}/zstd-${pkgver}.tar.zst{,.sig}) +sha256sums=('3ea06164971edec7caa2045a1932d757c1815858e4c2b68c7ef812647535c23f' + 'SKIP') +b2sums=('513e4526a92bcb59416b3457d186a30e554f9e0cf21d7114eb3e9fbcbd9d662c8d95cf0b06237f6fe3f756862c63de0aa146d6a23cb4111c16e6459608d115f1' + 'SKIP') +validpgpkeys=(4EF4AC63455FC9F4545D9B7DEF8FE99528B52FFD) + +build() { + source static-compat-environment + cd $_pkgname-$pkgver + make +} + +check() { + source static-compat-environment + cd $_pkgname-$pkgver + make check +} + +package() { + source static-compat-environment + cd $_pkgname-$pkgver + make PREFIX="$static_compat_prefix" DESTDIR="$pkgdir/" install + rm -r "$pkgdir/$static_compat_prefix"/{bin,share/man} + find "$pkgdir/$static_compat_prefix" -iname '*.so*' -delete + install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} diff --git a/zstd/static/PKGBUILD b/zstd/static/PKGBUILD deleted file mode 100644 index 35a97c24..00000000 --- a/zstd/static/PKGBUILD +++ /dev/null @@ -1,36 +0,0 @@ -# Contributor: Bartłomiej Piotrowski -# Contributor: Andrzej Giniewicz -# Contributor: Johan Förberg - -_pkgname=zstd -pkgname=$_pkgname-static -pkgver=1.4.8 -pkgrel=1 -pkgdesc='Zstandard - Fast real-time compression algorithm' -arch=(x86_64) -url='https://facebook.github.io/zstd/' -license=(BSD GPL2) -depends=(zlib xz-static lz4-static) # zlib contains static lib -makedepends=(gtest) -options=(!emptydirs staticlibs) -source=(https://github.com/facebook/zstd/releases/download/v${pkgver}/zstd-${pkgver}.tar.zst) -sha256sums=('c7ea10e20dd61b457220455e3cf553069987b968b7c63d1b9d46acbdb45623eb') - -build() { - cd $_pkgname-$pkgver - export PKG_CONFIG_PATH=/usr/static/lib/pkgconfig:/usr/lib/pkgconfig - make -} - -check() { - cd $_pkgname-$pkgver - make check -} - -package() { - cd $_pkgname-$pkgver - make PREFIX=/usr/static DESTDIR="$pkgdir/" install - rm -r "$pkgdir"/usr/static/{bin,share/man} - find "$pkgdir/usr/static" -iname '*.so*' -delete - install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" -}