{"id":18365794,"url":"https://github.com/martchus/pkgbuilds","last_synced_at":"2025-04-04T13:08:22.910Z","repository":{"id":34166540,"uuid":"38011119","full_name":"Martchus/PKGBUILDs","owner":"Martchus","description":"PKGBUILDs for creating various Arch Linux packages (including lots of mingw-w64 cross compiler packages)","archived":false,"fork":false,"pushed_at":"2024-10-23T22:17:07.000Z","size":18914,"stargazers_count":119,"open_issues_count":4,"forks_count":45,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-10-24T11:14:31.291Z","etag":null,"topics":["android-development","arch-linux-packages","hacktoberfest","linux","mingw","pkgbuilds"],"latest_commit_sha":null,"homepage":"https://martchus.dyn.f3l.de/repo/arch/ownstuff","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Martchus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-06-24T21:09:43.000Z","updated_at":"2024-10-23T22:17:11.000Z","dependencies_parsed_at":"2023-02-18T11:17:45.000Z","dependency_job_id":"7f1c6ebb-3464-48a6-9255-319ac8cc0ff1","html_url":"https://github.com/Martchus/PKGBUILDs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Martchus%2FPKGBUILDs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Martchus%2FPKGBUILDs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Martchus%2FPKGBUILDs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Martchus%2FPKGBUILDs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Martchus","download_url":"https://codeload.github.com/Martchus/PKGBUILDs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247177062,"owners_count":20896576,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android-development","arch-linux-packages","hacktoberfest","linux","mingw","pkgbuilds"],"created_at":"2024-11-05T23:14:33.425Z","updated_at":"2025-04-04T13:08:22.892Z","avatar_url":"https://github.com/Martchus.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PKGBUILDs\nContains PKGBUILD files for creating Arch Linux packages. If you like to improve one of\nmy AUR packages, just create a PR here.\n\n## Overview over provided packages\n* Packages for my own applications and libraries such as\n  [Syncthing  Tray](https://github.com/Martchus/syncthingtray),\n  [Tag Editor](https://github.com/Martchus/tageditor),\n  [Password Manager](https://github.com/Martchus/passwordmanager), …\n* Packages [I maintain in the AUR](https://aur.archlinux.org/packages/?O=0\u0026SeB=M\u0026K=Martchus\u0026outdated=\u0026SB=v\u0026SO=d\u0026PP=50\u0026do_Search=Go)\n  and many more:\n    * misc packages, eg. Subtitle Composer, openelec-dvb-firmware, Jangouts\n    * `mingw-w64-*` packages which allow to build for Windows (i686/x86_64, libstdc++)\n      under Arch Linux with GCC, e.g. Boost, Qt 5 and Qt 6 and may more\n    * `mingw-w64-clang-aarch64-*` packages which allow to build for Windows (aarch64,\n      libc++) via LLVM/Clang as provided by Arch Linux, e.g. Boost, Qt 6 and may more\n        * These packages are mainly converted on the fly from `mingw-w64-*` packages\n          via `devel/conv-variant.pl`.\n    * `mingw-w64-aarch64-*` packages which allow to build for Windows (aarch64,\n      libstdc++) via GCC, so far no packages provided\n        * So far GCC does not support the `aarch64-w64-mingw32` target so no packages have\n          been created yet except `mingw-w64-clang-aarch64-binutils` which still needs to be\n          renamed to `mingw-w64-aarch64-binutils`.\n        * Note that these packages will conflict with `mingw-w64-clang-aarch64-*` packages\n          as they share the same install prefix.\n    * `static-compat-*` packages containing static libraries to build self-contained\n      applications running on older GNU/Linux distributions under Arch Linux, so far the most\n      important Qt 6 modules and other important C/C++ libraries provided\n    * `android-*` packages which allow to build for Android under Arch Linux using the Android\n      SDK, e.g. iconv, Boost, OpenSSL, CppUnit, Qt 6 and Kirigami\n    * `wasm-*` packages which allow to build for WebAssembly under Arch Linux using\n      the official `emscripten` package; so far limited to a few Qt 6 modules\n    * `apple-darwin-*` packages which allow to build for MaxOS X under Arch\n      Linux, e.g. osxcross and Qt 5 (still experimental, more or less discontinued)\n* Other packages imported from the AUR to build with slight modifications.\n\n## Binary repository\nI also provide a [binary repository](https://martchus.dyn.f3l.de/repo/arch/ownstuff/os)\ncontaining the packages found in this repository and a lot of packages found in\nthe AUR:\n\n```\n[ownstuff-testing]\nSigLevel = Optional TrustAll\nServer = https://martchus.dyn.f3l.de/repo/arch/$repo/os/$arch\nServer = https://ftp.f3l.de/~martchus/$repo/os/$arch\n\n[ownstuff]\nSigLevel = Optional TrustAll\nServer = https://martchus.dyn.f3l.de/repo/arch/$repo/os/$arch\nServer = https://ftp.f3l.de/~martchus/$repo/os/$arch\n```\n\nThe testing repository is required if you have the official testing repository\nenabled. (Packages contained by ownstuff-testing are linked against packages\nfound in the official testing repository.)\n\nThe repository is focusing on x86_64 but some packages are also provided for\ni686 and aarch64.\n\nNote that I can not assure that required rebuilds always happen fast enough\n(since the official developers obviously don't wait for me before releasing their\npackages from staging).\n\nRequests regarding binary packages can be tracked on the issue tracker of this\nGitHub project as well, e.g. within the [general discussion\nissue](https://github.com/Martchus/PKGBUILDs/issues/94).\n\n## Container image, building packages within a container\nThe directory `devel/container` contains the script `imagebuild` to build a\ncontainer image suitable to run Arch Linux's `makepkg` script so you can build\nfrom PKGBUILDs on any environment where Docker, Podman or any other suitable\ncontainer runtime is available.\n\nIt also contains a script called `makecontainerpkg` which behaves like\n`makechrootpkg` from Arch Linux's devtools but uses the previously mentioned\ncontainer image. Therefore it does *not* require devtools, a chroot setup and\nsystemd-nsapwn. Instead, any container runtime should be sufficient (tested with\nDocker and Podman).\n\nThe usage of `makecontainerpkg` is very similar to `makechrootpkg`. Simply run\nthe script in a directory containing a `PKGBUILD` file. If the directory\ncontains a file called `pacman.conf` and/or `makepkg.conf` those files are\nconfigured to be used during the build. The call syntax is the following:\n```\nmakecontainerpkg [cre args] --- [makepkg args]\n```\n\nSet the environment variable `CRE` to the container runtime executable (by\ndefault `docker`) and set `CRE_IMAGE` to use a different container image.\n\nNote that you can also set the environment variable `TOOL` to invoke a different\ntool instead of `makepkg`, e.g. `TOOL=updpkgsums makecontainerpkg` can be used\nto update checksums.\n\nExample where the host pacman cache and ccache directories are mounted into the\ncontainer and a package rebuild is forced via `makepkg`'s flag `-f`:\n```\nmakecontainerpkg -v /var/cache/pacman/pkg/ -v /run/media/devel/ccache:/ccache -- -f CCACHE_DIR=/ccache\n```\n\nExample using podman on a non-Arch system:\n```\nCRE=podman ../../devel/container/makecontainerpkg -v /hdd/cache/pacman/pkg:/var/cache/pacman/pkg -v /hdd/chroot/remote-config-x86_64:/cfg\n```\n\nIt makes still sense to specify a cache directory, even though pacman is not\nused on the host system. Here also a directory containing a custom `pacman.conf`\nand `makepkg.conf` is mounted into the container.\n\n### Podman-specific remarks\nTo use podman (instead of Docker) simply set `export CRE=podman`.\n\nTo be able to run podman without root, you need to ensure user/group IDs can be\nmapped. The mapping is configured in the files `/etc/subuid` and `/etc/subgid`.\nUse `sudo usermod --add-subuids 200000-265536 --add-subgids 200000-265536 $USER`\nto configure it for the current user and verify the configuration via\n`grep $USER /etc/sub{u,g}id`. Finally, run `podman system migrate` to apply.\n\nTo change storage paths so e.g. containers are stored at a different location,\nedit `~/.config/containers/storage.conf` (or `/etc/containers/storage.conf` for\nsystem-wide configuration) to set `runroot` and `graphroot` to different\nlocations.\n\n### Investigation of build failures\nBy default, `makecontainerpkg` removes the container in the end. Set `DEBUG=1`\nto prevent that. Then one can use e.g. `podman container exec -it … bash` to\nenter the container for manual investigation. Set `DEBUG=on-failure` to only\nkeep the container in case of a failure.\n\n### Using Arch-packages on another distribution via a container\nIf you want to cross-compile software on non-Arch distributions you can make use\nof the `android-*` and `mingw-w64-*` packages provided by this repository using\nan Arch Linux container. The container image mentioned before is also suitable\nfor this purpose.\n\nTo build my projects, have a look at\n[CMake presets](https://github.com/Martchus/cpp-utilities/blob/master/README.md#remarks-about-building-for-android)\nI provide for building on Android.\n\nOtherwise, checkout the following subsections for generic example commands to\nbuild CMake-based projects in a container for Windows and Android. Note that\nthese commands are intended to be run without root (see section \"Podman-specific\nremarks\" for details). In this case files that are created from within the\ncontainer in the build and source directories will have your normal user/group\noutside the container which is quite convenient (within the container they will\nbe owned by root).\n\n#### Setup\nCheckout the script under `devel/container/create-devel-container-example` for\nexample commands.\n\n#### Start interactive shell in container\n```\npodman container exec -it archlinux-devel-container bash\n```\n\n#### Install stuff you want, e.g. Qt packages for targeting mingw-w64 or Android\n```\npodman container exec -it archlinux-devel-container \\\n  pacman -Syu ninja git mingw-w64-cmake qt6-{base,tools} mingw-w64-qt6-{base,tools,translations,svg,5compat}\n```\n\n```\npodman container exec -it archlinux-devel-container \\\n  pacman -Syu clang ninja git extra-cmake-modules android-cmake qt6-{base,tools,declarative,shadertools} android-aarch64-qt6-{base,declarative,tools,translations,svg,5compat} android-aarch64-{boost,libiconv,qqc2-breeze-style}\n```\n\n#### Building for Windows using mingw-w64-* packages\nConfigure the build, e.g. run CMake:\n```\npodman container exec -it archlinux-devel-container x86_64-w64-mingw32-cmake \\\n  -G Ninja \\\n  -S /src/c++/cmake/PianoBooster \\\n  -B /build/pianobooster-x86_64-w64-mingw32-release \\\n  -DPKG_CONFIG_EXECUTABLE:FILEPATH=/usr/bin/x86_64-w64-mingw32-pkg-config \\\n  -DQT_PACKAGE_NAME:STRING=Qt6\n```\n\nConduct the build, e.g. invoke Ninja build system via CMake:\n```\npodman container exec -it archlinux-devel-container bash -c '\n  source /usr/bin/mingw-env x86_64-w64-mingw32\n  cmake --build /build/pianobooster-x86_64-w64-mingw32-release --verbose'\n```\n\n#### Building for Android using android-* packages\nUse `keytool` to generate a key for signing the APK:\n```\npodman container exec -it archlinux-devel-container keytool …\n```\n\nConfigure the build, e.g. run CMake:\n```\npodman container exec -it archlinux-devel-container bash -c '\n  android_arch=aarch64\n  export PATH=/usr/lib/jvm/java-17-openjdk/bin:$PATH\n  source /usr/bin/android-env $android_arch\n  android-$android_arch-cmake \\\n    -G Ninja \\\n    -S /src/c++/cmake/subdirs/passwordmanager \\\n    -B /build/passwordmanager-android-$android_arch-release \\\n    -DCMAKE_FIND_ROOT_PATH=\"${ANDROID_PREFIX}\" \\\n    -DANDROID_SDK_ROOT=\"${ANDROID_HOME}\" \\\n    -DPKG_CONFIG_EXECUTABLE:FILEPATH=/usr/bin/android-$android_arch-pkg-config \\\n    -DQT_PACKAGE_PREFIX:STRING=Qt6 \\\n    -DKF_PACKAGE_PREFIX:STRING=KF6'\n```\n\nConduct the build, e.g. invoke Ninja build system via CMake:\n```\npodman container exec -it archlinux-devel-container bash -c '\n  export PATH=/usr/lib/jvm/java-17-openjdk/bin:$PATH\n  source /usr/bin/android-env aarch64\n  cmake --build /build/passwordmanager-android-aarch64-release --verbose'\n```\n\n#### Deploy/debug Android package using tooling from android-sdk package\n```\n#  example values; ports for pairing and connection are distinct\nphone_ip=192.168.178.42 pairing_port=34765 pairing_code=922102 connection_port=32991\npodman container exec -it archlinux-devel-container \\\n  /opt/android-sdk/platform-tools/adb pair \"$phone_ip:$pairing_port\" \"$pairing_code\"\npodman container exec -it archlinux-devel-container \\\n  /opt/android-sdk/platform-tools/adb connect \"$phone_ip:$connection_port\"\npodman container exec -it archlinux-devel-container \\\n  /opt/android-sdk/platform-tools/adb logcat\npodman container exec -it archlinux-devel-container \\\n  /opt/android-sdk/platform-tools/adb install …\n```\n\n#### Delete container setup again (when no longer needed)\n```\npodman container stop archlinux-devel-container\npodman container rm archlinux-devel-container\n```\n\n### Other approaches\nThere's also the 3rdparty repository\n[docker-mingw-qt5](https://github.com/mdimura/docker-mingw-qt5) which contains\nan image with many mingw-w64 package pre-installed.\n\n## Structure\nEach package is in its own subdirectoy:\n```\ndefault-pkg-name/variant\n```\nwhere `default-pkg-name` is the default package name (eg. `qt5-base`) and\n`variant` usually one of:\n\n* `default`: the regular package\n* `git`/`svn`/`hg`: the development version\n* `mingw-w64`: the Windows version (i686/dw2 and x86_64/SEH)\n* `android-{aarch64,armv7a-eabi,x86-64,x86}`: the Android version (currently\n  only aarch64 actively maintained/tested)\n* `apple-darwin`: the MacOS X version (still experimental)\n\nThe repository does not contain `.SRCINFO` files.\n\n---\n\nThe subdirectoy `devel` contains additional files, mainly for development\npurposes. The subdirectoy `devel/archive` contains old packages that are no\nlonger updated (at least not via this repository).\n\n## Generated PKGBUILDs\nTo avoid repetition some PKGBUILDs are generated. These PKGBUILDs are determined\nby the presence of the file `PKGBUILD.sh.ep` besides the actual `PKGBUILD` file.\nThe `PKGBUILD` file is only present for read-only purposes in this case - do\n*not* edit it manually. Instead, edit the `PKGBUILD.sh.ep` file and invoke\n`devel/generator/generate.pl`. This requires the `perl-Mojolicious` package to\nbe installed. Set the environment variable `LOG_LEVEL` to adjust the log level\n(e.g. `debug`/`info`/`warn`/`error`). Template layouts/fragments are stored\nwithin `generator/templates`.\n\n### Documentation about the used templating system\n* [Syntax](https://mojolicious.org/perldoc/Mojo/Template#SYNTAX)\n* [Helper](https://mojolicious.org/perldoc/Mojolicious/Plugin/DefaultHelpers)\n* [Utilities](https://mojolicious.org/perldoc/Mojo/Util)\n\n## Contributing to patches\nPatches for most packages are managed in a fork of the project under my GitHub\nprofile. For instance, patches for `mingw-w64-qt5-base` are managed at\n[github.com/Martchus/qtbase](https://github.com/Martchus/qtbase).\n\nI usually create a dedicated branch for each version, eg. `5.10.1-mingw-w64`. It\ncontains all the patches based on Qt 5.10.1. When doing fixes later on, I\nusually preserve the original patches and create a new branch, eg.\n`5.10.1-mingw-w64-fixes`.\n\nSo in this case it would make sense to contribute directly there. To fix an\nexisting patch, just create a fixup commit. This (unusual) fixup workflow aims\nto keep the number of additional changes as small as possible.\n\nTo get the patches into the PKGBUILD files, the script\n`devel/qt5/update-patches.sh` is used.\n\n### Mass rebasing of Qt patches\nThis is always done by me. Please don't try to help here because it will only\ncause conflicts. However, the workflow is quite simple:\n\n1. Run `devel/qt5/rebase-patches.sh` on all Qt repository forks or just\n   `devel/qt5/rebase-all-patches.sh`\n    * e.g. `devel/rebase-patches.sh 5.11.0 5.10.1 mingw-w64-fixes` to create branch\n     `5.11.0-mingw-w64` based Qt 5.11.0 using commits from `5.10.1-mingw-w64-fixes`\n    * e.g. `devel/qt5/rebase-all-patches.sh 6.9.0-beta3 6.9.0-beta2 '' '' v6.9.0-beta3 v6.9.0-beta2`\n      to create `6.9.0-beta3` based on Qt v6.9.0-beta3 using commits from\n      `6.9.0-beta2` based on Qt v6.9.0-beta2\n    * after fixing possible conflicts, run `devel/qt5/continue-rebase-patches.sh`\n    * otherwise, that's it\n    * all scripts need to run in the Git repository directory of the Qt module\n      except `rebase-all-patches.sh` which needs the environment variable\n      `QT_GIT_REPOS_DIR` to be set\n2. Run `devel/qt5/update-patches.sh` or `devel/qt5/update-all-patches.sh` to\n   update PKGBUILDs\n    * e.g. `devel/qt5/update-all-patches.sh '' '' qt6` to update all Qt 6\n      packages\n    * e.g. `devel/qt5/update-all-patches.sh 6.9.0-beta3-mingw-w64 '' qt6 v6.9.0-beta3`\n      to update all Qt 6 packages using a special branch based on a special tag\n\n## Brief documentation about mingw-w64-qt packages\nThe Qt project does not support building Qt under GNU/Linux when targeting\nmingw-w64. With Qt 6 they also stopped 32-bit builds. They also don't provide\nstatic builds targeting mingw-w64. They are also relying a lot on their bundled\nlibraries while my builds aim to build dependencies separately. So expect some\nrough edges when using my packaging.\n\nNevertheless it make sense to follow the official documentation. For concrete\nexamples how to use this packaging with CMake, just checkout the mingw-w64\nvariants of e.g. `syncthingtray` within this repository. The Arch Wiki also has\na [section about mingw-w64\npackaging](https://wiki.archlinux.org/index.php/MinGW_package_guidelines).\n\nNote that the ANGLE and \"dynamic\" variants of Qt 5 packages do not work because\nthey would require `fxc.exe` to build.\n\n### Tested build and deployment tools for mingw-w64-qt5 packages\nCurrently, I test with qmake and CMake. With both build systems it is possible\nto use either the shared or the static libraries. Please read the comments in\nthe PKGBUILD file itself and the pinned comments in [the\nAUR](https://aur.archlinux.org/packages/mingw-w64-qt5-base) for further\ninformation.\n\nThere are also pkg-config files, but those aren't really tested.\n\n`qbs` and `windeployqt` currently don't work very well (see issues). Using the\nstatic libraries or mxedeployqt might be an alternative to windeployqt.\n\n### Tested build and deployment tools for mingw-w64-qt6 packages\nIn order to build a Qt-based project using mingw-w64-qt6 packages one also needs\nto install the regular `qt6-base` package for development tools such as `moc`.\nThe packages `qt6-tools`, `qt6-declarative` and `qt6-shadertools` contain also\nnative binaries which might be required by some projects. At this point the\nsetup can break if the version of regular packages and the versions of the\nmingw-w64 packages differ. I cannot do anything about it except trying to\nupgrade the mingw-w64 packages as fast as possible. There's actually a lengthy\ndiscussion about this topic on the\n[Qt development mailinglist](https://lists.qt-project.org/pipermail/development/2021-September/041732.html)\nso the situation might improve in the future. Note that as of\nqtbase commit `5ffc744b791a114a3180a425dd26e298f7399955` (requires Qt \u003e 6.2.1)\none can specify `-DQT_NO_PACKAGE_VERSION_CHECK=TRUE` to ignore the strict\nversioning check.\n\nCurrently, I test only CMake. It is possible to use either the shared or the\nstatic libraries. The static libraries are installed into a nested prefix\n(`/usr/i686-w64-mingw32/static` and `/usr/x86_64-w64-mingw32/static`) so this\nprefix needs to be prepended to `CMAKE_FIND_ROOT_PATH` for using the static\nlibraries. To generally prefer static libraries one might use the helper scripts\nprovided by the `mingw-w64-cmake-static` package.\n\nThe build systems qbs and qmake are not tested. It looks like Qt's build system\ndoes not install pkg-config files anymore and so far no effort has been taken to\nenable them.\n\nNote that windeployqt needed to be enabled by the official/regular `qt6-tools`\npackage but would likely not work very well anyways. Using the static libraries\nor mxdeployqt might be an alternative for windeployqt.\n\n### Static plugins and CMake\nQt 5 initially didn't support it so I added patches to make it work. After Qt 5\nadded support I still kept my own version because I didn't want to risk any\nregressions (which would be tedious to deal with). So the [official\ndocumentation](https://doc.qt.io/qt-5/qtcore-cmake-qt-import-plugins.html) does\n**not** apply to my packages. One simply has to link against the targets of the\nwanted static plugins manually.\n\nHowever, for Qt 6 I dropped my patches and the official documentation applies. I\nwould still recommended to set the target property `QT_DEFAULT_PLUGINS` of\nrelevant targets to `0` and link against wanted plugin targets manually. At\nleast in my cases the list of plugins selected by default seemed needlessly\nlong. I would also recommended to set the CMake variable\n`QT_SKIP_AUTO_QML_PLUGIN_INCLUSION` to a falsy value because this pulls in a lot\nof dependencies which are likely not needed.\n\n### Further documentation\nThe directory `qt5-base/mingw-w64` contains also a README with more Qt 5\nspecific information.\n\n## Running Windows executables built using mingw-w64 packages with WINE\nIt is recommended to use the scripts `x86_64-w64-mingw32-wine` and\n`i686-w64-mingw32-wine` provided by the `mingw-w64-wine` package. These scripts\nare a wrapper around the regular `wine` binary ensuring all the DLLs provided by\n`mingw-w64-*`-packages of the relevant architecture can be located. It also uses\na distinct `wine` prefix so your usual configuration (e.g. tailored to run\ncertain games) does not go into the way and is also not messed with.\n\nHere are nevertheless some useful hints to run WINE manually:\n\n* Set the environment variable `WINEPREFIX` to use a distinct WINE-prefix if\n  wanted.\n* Set `WINEPATH` for the search directories of needed DLLs, e.g.\n  `WINEPATH=$builds/libfoo;$builds/libbar;/usr/x86_64-w64-mingw32`.\n* Set `WINEARCH` to `win32` for a 32-bit environment (`win64` is the default\n  which will get you a 64-bit environment)\n* Set `WINEDLLOVERRIDES` to control loading DLLs, e.g.\n  `WINEDLLOVERRIDES=mscoree,mshtml=` disables the annoying Gecko popup.\n* To set environment variables like `PATH` or `QT_PLUGIN_PATH` for the Windows\n  program itself use the following approach:\n    1. Open `regedit`\n    2. Go to `HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Control\\Session Manager\\Environment`\n    3. Add/modify the variable, e.g. set\n       `PATH=C:\\windows\\system32;C:\\windows;Z:\\usr\\x86_64-w64-mingw32\\bin` and\n       `QT_PLUGIN_PATH=Z:/usr/x86_64-w64-mingw32/lib/qt6/plugins`\n* It is possible to run apps in an headless environment but be aware that WINE\n  is not designed for this. For instance, when an application crashes WINE\n  still attempts to show the crash window and the application stays stuck in\n  that state.\n* See https://wiki.winehq.org/Wine_User's_Guide for more information\n\n### Running aarch64 binaries compiled via mingw-w64-clang-aarch64 packages\nIt is possible to run aarch64 binaries on an x86_64 host using WINE and QEMU,\ncheckout [the linaro blog](https://www.linaro.org/blog/emulate-windows-on-arm)\nfor details. They also provide a container image that is easy to use:\n\n```\nsource mingw-clang-env aarch64-w64-mingw32\n$CXX $CXXFLAGS -mconsole -static main.cpp -o main.exe\npodman run -it --rm -v \"$PWD:/pwd\" linaro/wine-arm64 wine-arm64 /pwd/main.exe\n```\n\nYou can also use this approach to test graphical applications, e.g.:\n```\nxhost +local:\npodman run -it -e DISPLAY -v ~/.Xauthority:/root/.Xauthority:Z --ipc=host --net=host --rm -v \"$PWD:/pwd\" linaro/wine-arm64 wine-arm64 /pwd/syncthingtray.exe --windowed\n```\n\n## Static GNU/Linux libraries\nThis repository contains several `static-compat-*` packages providing static\nlibraries intended to distribute \"self-contained\" executables. These libraries\nare built against an older version of glibc to be able to run on older\ndistributions without having to link against glibc statically. The resulting\nbinaries should run on distributions with glibc 2.26 or newer (or Linux 4.4 and\nnewer when linking against glibc statically), e.g. openSUSE Leap 15.0, Fedora\n27, Debian 10 and Ubuntu 18.04. The packages might not be updated as regularly\nas their normal counterparts but the idea is to provide an environment with a\nrecent version of GCC/libstdc++ and other libraries such as Qt and Boost but\nstill be able to run the resulting executables on older distributions.\n\nTo use the packages, simply invoke `/usr/static-compat/bin/g++` instead of\n`/usr/bin/g++`. The package `static-compat-environment` provides a script to set\na few environment variables to make this easier. There are also packages\nproviding build system wrappers such as `static-compat-cmake`.\n\nIt would be conceivable to make fully statically linked executables. However, it\nwould not be possible to support OpenGL because glvnd and vendor provided OpenGL\nlibraries are always dynamic libraries. It makes also no sense to link against\nglibc (and possibly other core libraries) statically as they might use `dlopen`.\nTherefore this setup aims for a partially statically linked build instead, where\nstable core libraries like glibc/pthreads/OpenGL/… are assumed to be provided by\nthe GNU/Linux system but other libraries like libstdc++, Boost and Qt are linked\nagainst statically. This is similar to AppImage where a lot of libraries are\nbundled but certain core libraries are expected to be provided by the system.\n\nExamples for resulting binaries can be found in the release sections of my\nprojects [Tag Editor](https://github.com/Martchus/tageditor/releases) and\n[Syncthing Tray](https://github.com/Martchus/syncthingtray/releases). Those are\nQt 6 applications and the resulting binaries run on the mentioned platforms\nsupporting X11 and Wayland natively.\n\nNote that I decided to let static libraries live within the subprefix\n`/usr/static-compat` (in contrast to `-static` packages found in the AUR). The\nmain reason is that my packaging requires a custom glibc/GCC build for\ncompatibility and I suppose that simply needs to live within its own prefix.\nBesides, the version might not be kept 100 % in sync with the shared\ncounterpart. Hence it makes sense to make the static packages independent with\ntheir own headers and configuration files to avoid problems due to mismatching\nversions. Additionally, some projects (such as Qt) do not support installing\nshared and static libraries within the same prefix at the same time because the\nconfig files would clash.\n\n## Copyright notice and license\nCopyright © 2015-2025 Marius Kittler\n\nAll code is licensed under [GPL-2.0-or-later](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartchus%2Fpkgbuilds","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmartchus%2Fpkgbuilds","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartchus%2Fpkgbuilds/lists"}