Compare commits

..

1 Commits

Author SHA1 Message Date
Martchus 051f572ec4 Update mingw-w64-mariadb-connector-c to 3.3.2 2022-11-07 22:40:28 +01:00
804 changed files with 8507 additions and 16516 deletions

View File

@ -1,23 +0,0 @@
---
name: Issue with binary repository
about: Report an issue about the binary repository mentioned in the README
title: ''
labels: bug
assignees: ''
---
Before reporting and issue, make sure to have **followed the instructions** on
https://martchus.no-ip.biz/repo/arch/ownstuff.
Note that packages are always built against the latest Arch Linux repository
so other distributions such as Manjaro are *not* supported.
Please prefer the `ftp.f3l.de` mirror as `martchus.no-ip.biz` is self-hosted.
---
Affected package (name and version): …
Used mirror: …
Brief description of the problem: …

View File

@ -1,32 +0,0 @@
---
name: General issue
about: Ask a question or report a problem about a specific (set of) packages
title: ''
labels:
assignees: ''
---
**Before reporting an issue**, check whether there are pinned/recent comments on
the AUR and whether your request is really in-line with
https://wiki.archlinux.org/title/PKGBUILD.
**For more general discussions and questions** about related topics such as
mingw-w64 packaging in general, feel free to open or join a discussion on
https://github.com/Martchus/PKGBUILDs/discussions.
**Note that I cannot help with AUR helpers.** Please report problems with AUR
helpers to their vendors.
**Note that only Arch Linux is supported.** Packages may not build on other
distributions such as Manjaro.
---
Relevant packages: …
Your modifications to the build environment (e.g. changes in `makepkg.conf`):
Question/request or brief description of the problem:

131
README.md
View File

@ -52,16 +52,16 @@ GitHub project as well, e.g. within the [general discussion
issue](https://github.com/Martchus/PKGBUILDs/issues/94).
## Container image, building packages within a container
The directory `devel/container` contains the script `imagebuild` to build a
container image suitable to run Arch Linux's `makepkg` script so you can build
from PKGBUILDs on any environment where Docker, Podman or any other suitable
container runtime is available.
The directory `devel/container` contains a script to build a container image
suitable to run Arch Linux's `makepkg` script so you can build from PKGBUILDs on
any environment where Docker, Podman or any other suitable container runtime is
available.
It also contains a script called `makecontainerpkg` which behaves like
`makechrootpkg` from Arch Linux's devtools but uses the previously mentioned
container image. Therefore it does *not* require devtools, a chroot setup and
systemd-nsapwn. Instead, any container runtime should be sufficient (tested with
Docker and Podman).
Docker).
The usage of `makecontainerpkg` is very similar to `makechrootpkg`. Simply run
the script in a directory containing a `PKGBUILD` file. If the directory
@ -71,124 +71,17 @@ configured to be used during the build. The call syntax is the following:
makecontainerpkg [cre args] --- [makepkg args]
```
Set the environment variable `CRE` to the container runtime executable (by
default `docker`) and set `CRE_IMAGE` to use a different container image.
Note that you can also set the environment variable `TOOL` to invoke a different
tool instead of `makepkg`, e.g. `TOOL=updpkgsums makecontainerpkg` can be used
to update checksums.
Example where the host pacman cache and ccache directories are mounted into the
container and a package rebuild is forced via `makepkg`'s flag `-f`:
```
makecontainerpkg -v /var/cache/pacman/pkg/ -v /run/media/devel/ccache:/ccache -- -f CCACHE_DIR=/ccache
```
Example using podman on a non-Arch system:
```
CRE=podman ../../devel/container/makecontainerpkg -v /hdd/cache/pacman/pkg:/var/cache/pacman/pkg -v /hdd/chroot/remote-config-x86_64:/cfg
```
Set the environment variable `CRE` to the container runtime executable (by
default `docker`) and set `CRE_IMAGE` to use a different container image.
It makes still sense to specify a cache directory, even though pacman is not
used on the host system. Here also a directory containing a custom `pacman.conf`
and `makepkg.conf` is mounted into the container.
---
### Podman-specific remarks
To use podman (instead of Docker) simply set `export CRE=podman`.
To be able to run podman without root, you need to ensure user/group IDs can be
mapped. The mapping is configured in the files `/etc/subuid` and `/etc/subgid`.
Use `sudo usermod --add-subuids 200000-265536 --add-subgids 200000-265536 $USER`
to configure it for the current user and verify the configuration via
`grep $USER /etc/sub{u,g}id`. Finally, run `podman system migrate` to apply.
To change storage paths so e.g. containers are stored at a different location,
edit `~/.config/containers/storage.conf` (or `/etc/containers/storage.conf` for
system-wide configuration) to set `runroot` and `graphroot` to different
locations.
### Investigation of build failures
By default, `makecontainerpkg` removes the container in the end. Set `DEBUG=1`
to prevent that. Then one can use e.g. `podman container exec -it … bash` to
enter the container for manual investigation. Set `DEBUG=on-failure` to only
keep the container in case of a failure.
### Using Arch-packages on another distribution via a container
If you want to cross-compile software on non-Arch distributions you can make use
of the `android-*` and `mingw-w64-*` packages provided by this repository using
an Arch Linux container. The container image mentioned before is also suitable
for this purpose.
Here are some example commands how one might do that:
```
# do basic container setup
containers/create-devel-container-example
# start interactive shell in container
podman container exec -it archlinux-devel-container bash
# install stuff you want, e.g. mingw-w64 or android Qt packages
podman container exec -it archlinux-devel-container \
pacman -Syu ninja git mingw-w64-cmake qt6-{base,tools} mingw-w64-qt6-{base,tools,translations,svg,5compat}
podman container exec -it archlinux-devel-container \
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}
# configure the build using mingw-w64 packages, e.g. run CMake
podman container exec -it archlinux-devel-container x86_64-w64-mingw32-cmake \
-G Ninja \
-S /src/c++/cmake/PianoBooster \
-B /build/pianobooster-x86_64-w64-mingw32-release \
-DPKG_CONFIG_EXECUTABLE:FILEPATH=/usr/bin/x86_64-w64-mingw32-pkg-config \
-DQT_PACKAGE_NAME:STRING=Qt6
# conduct the build using mingw-w64 packages, e.g. invoke Ninja build system via CMake
podman container exec -it archlinux-devel-container bash -c '
source /usr/bin/mingw-env x86_64-w64-mingw32 && \
cmake --build /build/pianobooster-x86_64-w64-mingw32-release --verbose'
# configure the build using android packages, e.g. run CMake
podman container exec -it archlinux-devel-container bash -c '
android_arch=aarch64
export PATH=/usr/lib/jvm/java-17-openjdk/bin:$PATH
source /usr/bin/android-env $android_arch && \
android-$android_arch-cmake \
-G Ninja \
-S /src/c++/cmake/subdirs/passwordmanager \
-B /build/passwordmanager-android-$android_arch-release \
-DCMAKE_FIND_ROOT_PATH="${ANDROID_PREFIX}" \
-DANDROID_SDK_ROOT="${ANDROID_HOME}" \
-DPKG_CONFIG_EXECUTABLE:FILEPATH=/usr/bin/android-$android_arch-pkg-config \
-DQT_PACKAGE_PREFIX:STRING=Qt6 \
-DKF_PACKAGE_PREFIX:STRING=KF6'
# conduct the build using android packages, e.g. invoke Ninja build system via CMake
podman container exec -it archlinux-devel-container bash -c '
export PATH=/usr/lib/jvm/java-17-openjdk/bin:$PATH
source /usr/bin/android-env aarch64 && \
cmake --build /build/passwordmanager-android-aarch64-release --verbose'
# use additional Android-related tooling from container
# note: These are just example values. The ports for pairing and connection are distinct.
phone_ip=192.168.178.42 pairing_port=34765 pairing_code=922102 connection_port=32991
podman container exec -it archlinux-devel-container \
/opt/android-sdk/platform-tools/adb pair "$phone_ip:$pairing_port" "$pairing_code"
podman container exec -it archlinux-devel-container \
/opt/android-sdk/platform-tools/adb connect "$phone_ip:$connection_port"
podman container exec -it archlinux-devel-container \
/opt/android-sdk/platform-tools/adb logcat
# get rid of the container when no longer needed
podman container stop archlinux-devel-container
podman container rm archlinux-devel-container
```
Note that these commands are intended to be run without root (see section
"Podman-specific remarks" for details). In this case files that are created
from within the container in the build and source directories will have your
normal user/group outside the container which is quite convenient (within the
container they will be owned by root).
### Other approaches
There's also the 3rdparty repository
[docker-mingw-qt5](https://github.com/mdimura/docker-mingw-qt5) which contains
an image with many mingw-w64 package pre-installed.
@ -243,7 +136,7 @@ usually preserve the original patches and create a new branch, eg.
So in this case it would make sense to contribute directly there. To fix an
existing patch, just create a fixup commit. This (unusual) fixup workflow aims
to keep the number of additional changes as small as possible.
to keep the number of additional changes as small as possbile.
To get the patches into the PKGBUILD files, the script
`devel/qt5/update-patches.sh` is used.
@ -303,7 +196,7 @@ native binaries which might be required by some projects. At this point the
setup can break if the version of regular packages and the versions of the
mingw-w64 packages differ. I cannot do anything about it except trying to
upgrade the mingw-w64 packages as fast as possible. There's actually a lengthy
discussion about this topic on the
discussion about this topi on the
[Qt development mailinglist](https://lists.qt-project.org/pipermail/development/2021-September/041732.html)
so the situation might improve in the future. Note that as of
qtbase commit `5ffc744b791a114a3180a425dd26e298f7399955` (requires Qt > 6.2.1)
@ -389,7 +282,7 @@ 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.
To use the packages, simply invoke `/usr/static-compat/bin/g++` instead of
`/usr/bin/g++`. The package `static-compat-environment` provides a script to set
`/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`.
@ -421,6 +314,6 @@ shared and static libraries within the same prefix at the same time because the
config files would clash.
## Copyright notice and license
Copyright © 2015-2024 Marius Kittler
Copyright © 2015-2022 Marius Kittler
All code is licensed under [GPL-2-or-later](LICENSE).

View File

@ -1,52 +0,0 @@
_pkgname=alsa-lib
pkgname=static-compat-$_pkgname
pkgver=1.2.10
pkgrel=3
pkgdesc="An alternative implementation of Linux sound support"
arch=(x86_64)
url="https://www.alsa-project.org"
license=(LGPL-2.1-or-later)
depends=('gcc-libs-static-compat')
makedepends=('static-compat-configure')
source=(
https://www.alsa-project.org/files/pub/lib/$_pkgname-$pkgver.tar.bz2{,.sig}
$_pkgname-1.2.10-config_header.patch::https://github.com/alsa-project/alsa-lib/commit/0e3dfb9f705ca78be34cd70fd59d67c431e29cc7.patch
)
sha512sums=('4ccbd1dc5a612044571c26290923009e4c3f7959b30a5d0bed47daa68bbefaff9059c4f0fa3bc16f22c1eed2d36f079139369f40243da5921ae4de02a4541939'
'SKIP'
'4c10050fb92da9c61e08eb742b60245314362bf8b7f5c34d5edade2f0bcaa0930c1d30267db0a95de2391c01a4aa59f5565423a1c41e42471f3dc9614b4d9b8a')
b2sums=('b2e4f8431e61f5bb56b2b5d124e67d5a68bbca3c647bebfa93f5e5ff092ec9ef3f6cb6315801fcd93e21151784814ff238d357313b8b44f32d4e7c9ee565388f'
'SKIP'
'73ce802cfcefed592d3820e4e8fdc2cfcb0666e60e07ede87f5581acf751e2c7552bc9347c1075552337047ec4c2cb64dbc92433d4e4b2e52cf6cad36f2679f2')
validpgpkeys=('F04DF50737AC1A884C4B3D718380596DA6E59C91') # ALSA Release Team (Package Signing Key v1) <release@alsa-project.org>
prepare() {
source static-compat-environment
# fix crashes with 32bit applications: https://bugs.archlinux.org/task/79628
patch -Np1 -d $_pkgname-$pkgver -i ../$_pkgname-1.2.10-config_header.patch
cd $_pkgname-$pkgver
autoreconf -fiv
}
build() {
source static-compat-environment
# -flto=auto is not supported: https://github.com/alsa-project/alsa-lib/issues/110
CFLAGS+=" -flto-partition=none"
cd $_pkgname-$pkgver
static-compat-configure --prefix=/usr --disable-shared --enable-static --without-debug
# prevent excessive overlinking due to libtool
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
make
}
check() {
source static-compat-environment
export LD_LIBRARY_PATH="$_pkgname-$pkgver/src/.libs/:$LD_LIBRARY_PATH"
make -k check -C $_pkgname-$pkgver || true
}
package() {
source static-compat-environment
make DESTDIR="$pkgdir" install -C $_pkgname-$pkgver
rm -r $pkgdir/usr/{bin,share/alsa,share/aclocal}
}

View File

@ -6,15 +6,12 @@
_reponame=arch-repo-manager
pkgname=arch-repo-manager-git
_name=${pkgname%-git}
_liburing=OFF
pkgver=340.599185d
pkgrel=3
pkgver=323.407e315
pkgrel=2
arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64')
pkgdesc='Tool for managing custom Arch Linux repositories'
license=('GPL')
depends=('libc++utilities-git.so' 'libpasswordfile-git.so' 'libboost_filesystem.so' 'libarchive.so' 'libcrypto.so' 'libssl.so' 'lmdb'
'devtools-custom>=1.1.1')
[[ $_liburing != OFF ]] && depends+=('liburing.so')
depends=('libc++utilities-git.so' 'libpasswordfile-git.so' 'libboost_filesystem.so' 'libarchive.so' 'lmdb' 'liburing')
optdepends=('reflective-rapidjson-git: development with libpkg/librepomgr'
"$_name-doc: API documentation")
makedepends=('cmake' 'git' 'ninja' 'boost' 'catch2' 'rapidjson-git' 'reflective-rapidjson-git')
@ -53,7 +50,7 @@ build() {
-DBUILD_SHARED_LIBS:BOOL=ON \
-DDUMMY_BUILD_ACTION_ENABLED:BOOL=ON \
-DREFLECTION_GENERATOR_EXECUTABLE:FILEPATH='/usr/bin/reflective_rapidjson_generator-git' \
-DBOOST_ASIO_IO_URING:BOOL=$_liburing \
-DBOOST_ASIO_IO_URING:BOOL=OFF \
.
VERBOSE=1 ninja
}

View File

@ -2,7 +2,7 @@
# Contributor: Florian Bruhin (The Compiler) <archlinux.org@the-compiler.org>
pkgname=baikal
pkgver=0.9.5
pkgver=0.9.2
pkgrel=1
pkgdesc='Lightweight CalDAV+CardDAV server'
url='http://sabre.io/baikal/'
@ -12,21 +12,17 @@ depends=('php')
optdepends=('sqlite: Database' 'mariadb: Alternate database' 'php-sqlite: To use the sqlite backend')
source=("https://github.com/fruux/Baikal/releases/download/$pkgver/baikal-$pkgver.zip"
'baikal.install')
sha512sums=('e544ed39047788bf001c81a44eb69a3db30a871253cb6bf12b54d5d476eaadc63d723192d41b67f2cf908a72d4c722def03d853df68b7fd464a4093e08ed0f19'
'4e28980100ce9fc820a6c40a9cd528a90d62997ac18fb4ea353d8eaba58b320f9c653ba9b066036ff598f1d5a0aafb49ba444f9187c0d3616cbe6fa45222ca3f')
sha1sums=('67b8c10e7d6d2ae6d331896c3f76314fe6ed33dd'
'deb948e61c3cd8d6ad560321f78c0b288f7a6210')
options=('!strip')
install=baikal.install
prepare() {
cd "${srcdir}/baikal/vendor/sabre/dav"
}
package() {
cd "${srcdir}/baikal"
install -dm 755 "$pkgdir"/usr/share/{webapps,doc}"/$pkgname"
install -dm 700 "$pkgdir/var/lib/$pkgname"
install -dm 700 "$pkgdir/var/lib/$pkgname/config"
install -dm 700 -o http -g http "$pkgdir/var/lib/$pkgname"
install -dm 700 -o http -g http "$pkgdir/var/lib/$pkgname/config"
cp -R Core html vendor "$pkgdir/usr/share/webapps/$pkgname"
install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname"
ln -s "/var/lib/$pkgname" "$pkgdir/usr/share/webapps/$pkgname/Specific"

View File

@ -4,8 +4,8 @@
# you also find the URL of a binary repository.
pkgname=bento4
pkgver=1.6.0.641
_pkgverstr=1-6-0-641
pkgver=1.6.0.639
_pkgverstr=1-6-0-639
pkgrel=1
pkgdesc='C++ class library and tools designed to read and write ISO-MP4 files'
arch=('i686' 'x86_64' 'arm' 'armv6h' 'armv7h' 'aarch64')
@ -14,14 +14,14 @@ license=('GPL')
makedepends=('cmake')
optdepends=('python')
source=("http://zebulon.bok.net/Bento4/source/Bento4-SRC-${_pkgverstr}.zip")
sha256sums=('8258faf0de7253f2aac016018f33d4a04c16d9060735e14ec8711f84aaedf0c8')
sha1sums=('d3351ffb425aadc698227ba84f5ec3401cad795a')
build() {
cd "${srcdir}"
sed -i "s/ STATIC / SHARED /" CMakeLists.txt
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="/usr" -DCMAKE_SKIP_BUILD_RPATH=ON
cmake --build .
make
}
package() {

View File

@ -1,71 +1,59 @@
# Maintainer of official package: Felix Yan <felixonmars@archlinux.org>
# $Id: PKGBUILD 182460 2016-07-07 13:03:56Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: rubenvb vanboxem <dottie> ruben <attie> gmail <dottie> com
# Same as official package but uses symlinks instead of hard links allowing
# installation when /usr/i686-w64-mingw32 and /usr/x86_64-w64-mingw32 are
# bound from another partition.
_targets="i686-w64-mingw32 x86_64-w64-mingw32"
pkgname=mingw-w64-binutils-symlinks
pkgver=2.42
pkgver=2.32
pkgrel=1
pkgdesc="Cross binutils for the MinGW-w64 cross-compiler"
arch=('x86_64')
pkgdesc="Cross binutils for the MinGW-w64 cross-compiler (uses symlinks instead of hard links)"
arch=('i686' 'x86_64')
url="http://www.gnu.org/software/binutils"
license=(GPL-2.0-or-later GPL-3.0-or-later LGPL-2.0-or-later LGPL-3.0-or-later GFDL-1.3 FSFAP)
license=('GPL')
groups=('mingw-w64-toolchain' 'mingw-w64')
depends=('zlib')
provides=('mingw-w64-binutils')
conflicts=('mingw-w64-binutils');
conflicts=('mingw-w64-binutils')
options=('!libtool' '!emptydirs')
validpgpkeys=('3A24BC1E8FB409FA9F14371813FCEF89DD9E3C4F') # Nick Clifton (Chief Binutils Maintainer) <nickc@redhat.com>
validpgpkeys=('3A24BC1E8FB409FA9F14371813FCEF89DD9E3C4F')
source=("https://ftp.gnu.org/gnu/binutils/binutils-${pkgver}.tar.gz"{,.sig})
sha512sums=('1e4ee462513eadd3c540e4782f9661df62ecbcd4d6297d61dcc0845ae7d30243c57571787706af3bb4d561e4350609d7057307290e81d76290a301f159a6abc5'
sha256sums=('9b0d97b3d30df184d302bced12f976aa1e5fbf4b0be696cdebc6cca30411a46e'
'SKIP')
_targets="i686-w64-mingw32 x86_64-w64-mingw32"
prepare() {
cd "$srcdir"/binutils-${pkgver}
cd ${srcdir}/binutils-${pkgver}
#do not install libiberty
sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in
# hack! - libiberty configure tests for header files using "$CPP $CPPFLAGS"
sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure
}
build() {
# Fix the check for limits.h and certain other checks by dropping the fortify flag from CPPFLAGS
# note: Otherwise libiberty/config.h lacks HAVE_LIMITS_H and the compilation runs into errors like:
# /build/gcc-static-compat/src/gcc/libiberty/fibheap.c:38:25: error: LONG_MIN undeclared (first use in this function)
# 38 | #define FIBHEAPKEY_MIN LONG_MIN
# | ^~~~~~~~
# /build/gcc-static-compat/src/gcc/libiberty/fibheap.c:220:30: note: in expansion of macro FIBHEAPKEY_MIN
# 220 | if (okey == key && okey != FIBHEAPKEY_MIN)
# | ^~~~~~~~~~~~~~
# /build/gcc-static-compat/src/gcc/libiberty/fibheap.c:36:1: note: LONG_MIN is defined in header <limits.h>; did you forget to #include <limits.h>?
# 35 | #include "fibheap.h"
# +++ |+#include <limits.h>
CPPFLAGS=${CPPFLAGS/-D_FORTIFY_SOURCE=2}
for _target in $_targets; do
echo "Building ${_target} cross binutils"
mkdir -p "$srcdir"/binutils-${_target} && cd "${srcdir}/binutils-${_target}"
"$srcdir"/binutils-${pkgver}/configure --prefix=/usr \
msg "Building ${_target} cross binutils"
mkdir -p ${srcdir}/binutils-${_target} && cd "${srcdir}/binutils-${_target}"
$srcdir/binutils-${pkgver}/configure --prefix=/usr \
--target=${_target} \
--infodir=/usr/share/info/${_target} \
--enable-lto --enable-plugins \
--enable-deterministic-archives \
--disable-multilib --disable-nls \
--disable-werror
make -O
make
done
}
package() {
for _target in ${_targets}; do
echo "Installing ${_target} cross binutils"
cd "$srcdir"/binutils-${_target}
make DESTDIR="$pkgdir" install
rm "$pkgdir"/usr/lib/bfd-plugins/libdep.so
msg "Installing ${_target} cross binutils"
cd ${srcdir}/binutils-${_target}
make DESTDIR=${pkgdir} install
done
cd "${pkgdir}/usr/bin"
for file in *; do
if [[ ! -L $file ]] && [[ ! -d $file ]]; then

View File

@ -1,62 +0,0 @@
# Maintainer of official package: Felix Yan <felixonmars@archlinux.org>
pkgname=mingw-w64-binutils
pkgver=2.42
pkgrel=1
pkgdesc="Cross binutils for the MinGW-w64 cross-compiler"
arch=('x86_64')
url="http://www.gnu.org/software/binutils"
license=(GPL-2.0-or-later GPL-3.0-or-later LGPL-2.0-or-later LGPL-3.0-or-later GFDL-1.3 FSFAP)
groups=('mingw-w64-toolchain' 'mingw-w64')
depends=('zlib')
options=('!libtool' '!emptydirs')
validpgpkeys=('3A24BC1E8FB409FA9F14371813FCEF89DD9E3C4F') # Nick Clifton (Chief Binutils Maintainer) <nickc@redhat.com>
source=("https://ftp.gnu.org/gnu/binutils/binutils-${pkgver}.tar.gz"{,.sig})
sha512sums=('1e4ee462513eadd3c540e4782f9661df62ecbcd4d6297d61dcc0845ae7d30243c57571787706af3bb4d561e4350609d7057307290e81d76290a301f159a6abc5'
'SKIP')
_targets="i686-w64-mingw32 x86_64-w64-mingw32"
prepare() {
cd "$srcdir"/binutils-${pkgver}
#do not install libiberty
sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in
}
build() {
# Fix the check for limits.h and certain other checks by dropping the fortify flag from CPPFLAGS
# note: Otherwise libiberty/config.h lacks HAVE_LIMITS_H and the compilation runs into errors like:
# /build/gcc-static-compat/src/gcc/libiberty/fibheap.c:38:25: error: LONG_MIN undeclared (first use in this function)
# 38 | #define FIBHEAPKEY_MIN LONG_MIN
# | ^~~~~~~~
# /build/gcc-static-compat/src/gcc/libiberty/fibheap.c:220:30: note: in expansion of macro FIBHEAPKEY_MIN
# 220 | if (okey == key && okey != FIBHEAPKEY_MIN)
# | ^~~~~~~~~~~~~~
# /build/gcc-static-compat/src/gcc/libiberty/fibheap.c:36:1: note: LONG_MIN is defined in header <limits.h>; did you forget to #include <limits.h>?
# 35 | #include "fibheap.h"
# +++ |+#include <limits.h>
CPPFLAGS=${CPPFLAGS/-D_FORTIFY_SOURCE=2}
for _target in $_targets; do
echo "Building ${_target} cross binutils"
mkdir -p "$srcdir"/binutils-${_target} && cd "${srcdir}/binutils-${_target}"
"$srcdir"/binutils-${pkgver}/configure --prefix=/usr \
--target=${_target} \
--infodir=/usr/share/info/${_target} \
--enable-lto --enable-plugins \
--enable-deterministic-archives \
--disable-multilib --disable-nls \
--disable-werror
make -O
done
}
package() {
for _target in ${_targets}; do
echo "Installing ${_target} cross binutils"
cd "$srcdir"/binutils-${_target}
make DESTDIR="$pkgdir" install
rm "$pkgdir"/usr/lib/bfd-plugins/libdep.so
done
}

View File

@ -3,146 +3,153 @@
# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where
# you also find the URL of a binary repository.
_android_arch=aarch64
pkgname=android-${_android_arch}-boost
pkgver=1.84.0
pkgrel=1
_pkgname=boost
_pkg_arch=aarch64
_android_arch=arm64-v8a
_android_toolchain=$_pkg_arch-linux-android
_andoird_toolchain_dir=$_android_toolchain
_android_platform=24
_android_target=$_android_toolchain$_android_platform
_android_prefix=/opt/android-libs/$_pkg_arch
_android_ndk_path=/opt/android-ndk
_boost_arch=arm
_boost_address_model=64
pkgname=android-$_pkg_arch-$_pkgname
pkgver=1.76.0
_srcname=boost_${pkgver//./_}
pkgrel=1
url='https://www.boost.org/'
arch=('any')
pkgdesc="Free peer-reviewed portable C++ source libraries (Android, ${_android_arch})"
url="https://www.boost.org/"
license=('custom')
depends=("android-${_android_arch}-bzip2"
"android-${_android_arch}-icu"
"android-${_android_arch}-zlib"
"android-${_android_arch}-zstd")
makedepends=('android-environment')
if [[ $_android_arch == aarch64 ]] || [[ $_android_arch == x86-64 ]]; then
makedepends+=("android-${_android_arch}-openmpi")
optdepends+=("android-${_android_arch}-openmpi: for mpi support")
fi
options=(!strip !buildflags staticlibs !emptydirs)
source=("https://boostorg.jfrog.io/artifactory/main/release/$pkgver/source/$_srcname.tar.bz2"
"boost-1.81.0-phoenix-multiple-definitions.patch"
"boost-ublas-c++20-iterator.patch::https://github.com/boostorg/ublas/commit/a31e5cffa85f.patch"
"disable-version-check.patch")
md5sums=('9dcd632441e4da04a461082ebbafd337'
'cb1c25777e9b85af62366e7c930244b8'
'326826bf610c63c23247e70e648ff104'
'6290eb4fa0cab451aac92e12e85ef073')
pkgdesc="Free peer-reviewed portable C++ source libraries (Android, $_pkg_arch)"
depends=("android-$_pkg_arch-libiconv")
options=(!buildflags staticlibs !strip !emptydirs)
makedepends=('bzip2' 'zlib' 'android-ndk' 'android-sdk')
conflicts=("android-$_pkgname-$_android_arch")
replaces=("android-$_pkgname-$_android_arch")
source=(https://boostorg.jfrog.io/artifactory/main/release/$pkgver/source/$_srcname.tar.gz
$_pkgname-ublas-c++20-iterator.patch::https://github.com/boostorg/ublas/commit/a31e5cffa85f.patch
no-versioned-shlibs.patch)
sha256sums=('7bd7ddceec1a1dfdcbdb3e609b60d01739c38390a5f956385a12f3122049f0ca'
'aa38addb40d5f44b4a8472029b475e7e6aef1c460509eb7d8edf03491dc1b5ee'
'd82d0f15064812dcabb3456a7bcb1db0e0f6145980e4728e638372e0fd35af23')
prepare() {
cd "${srcdir}/$_srcname"
source android-env ${_android_arch}
# https://github.com/boostorg/phoenix/issues/111
patch -Np1 -i ../boost-1.81.0-phoenix-multiple-definitions.patch
cd ${_srcname}
# https://github.com/boostorg/ublas/pull/97
patch -Np2 -i ../boost-ublas-c++20-iterator.patch
patch -p1 -i ../disable-version-check.patch
patch -Np2 -i ../$_pkgname-ublas-c++20-iterator.patch
patch -i ../no-versioned-shlibs.patch
}
build() {
cd "${srcdir}/$_srcname"
source android-env ${_android_arch}
local _stagedir="${srcdir}/stagedir"
local jobs="$(sed -e 's/.*\(-j *[0-9]\+\).*/\1/' <<< ${MAKEFLAGS})"
local target_flags=" \
--target=$_android_target"
local common_flags=" \
$target_flags \
-isystem $_android_ndk_path/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1 \
-isystem $_android_ndk_path/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include \
-isystem $_android_ndk_path/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/$_android_toolchain \
-fexceptions \
-no-canonical-prefixes \
-D__ANDROID_API__=$_android_platform \
-O3 \
-fPIC \
-DBOOST_ASIO_HAS_STD_STRING_VIEW=1"
local ld_flags=" \
$target_flags \
-fexceptions \
$_android_ndk_path/sources/cxx-stl/llvm-libc++/libs/$_android_arch/libc++_shared.so \
-nostdlib++"
# Platform specific patches
case "$_android_arch" in
aarch64)
_boost_arch=arm
_boost_address_model=64
;;
armv7a-eabi)
_boost_arch=arm
_boost_address_model=32
;;
x86)
_boost_arch=x86
_boost_address_model=32
;;
x86-64)
_boost_arch=x86
_boost_address_model=64
;;
*)
;;
esac
cd ${_srcname}
./bootstrap.sh -with-toolset=gcc
./bootstrap.sh --with-toolset=gcc
# support for OpenMPI
if [[ _boost_address_model == 64 ]]; then
_boost_mpi='using mpi ;'
else
_boost_mpi=''
fi
install -Dm755 tools/build/src/engine/b2 "${_stagedir}"/bin/b2
userConfigs=$srcdir/$_srcname/user-config.jam
# Support for OpenMPI
echo "using mpi ;" >> project-config.jam
cat << EOF > "${userConfigs}"
${_boost_mpi}
using clang : android : ${ANDROID_CXX} :
<archiver>${ANDROID_AR} \
<assembler>${ANDROID_AS}
;
EOF
# boostbook is needed by quickbook
install -dm755 "${_stagedir}"/share/boostbook
cp -a tools/boostbook/{xsl,dtd} "${_stagedir}"/share/boostbook/
./b2 install \
--prefix="$srcdir/fakeinstall" \
--user-config="${userConfigs}" \
--layout=system \
--with-atomic \
--with-chrono \
--with-container \
--with-date_time \
--with-exception \
--with-fiber \
--with-filesystem \
--with-graph \
--with-graph_parallel \
--with-iostreams \
--with-locale \
--with-log \
--with-math \
--with-mpi \
--with-program_options \
--with-random \
--with-regex \
--with-serialization \
--with-system \
--with-test \
--with-thread \
--with-timer \
--with-type_erasure \
--with-wave \
--with-stacktrace \
-sICONV_PATH="${ANDROID_PREFIX}" \
variant=release \
debug-symbols=off \
runtime-link=shared \
link=shared,static \
target-os=android \
toolset=clang-android \
architecture=$_boost_arch \
threading=multi \
address-model=$_boost_address_model \
cflags="${CXXFLAGS}" \
cxxflags="${CFLAGS}" \
linkflags="${LDFLAGS}"
export PATH=$_android_ndk_path/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH
# default "minimal" install: "release link=shared,static
# runtime-link=shared threading=single,multi"
# --layout=tagged will add the "-mt" suffix for multithreaded libraries
# and installs includes in $_android_prefix/include/boost.
# --layout=system no longer adds the -mt suffix for multi-threaded libs.
# install to ${_stagedir} for consistency with regular boost package
"${_stagedir}"/bin/b2 \
--with-atomic \
--with-chrono \
--with-container \
--with-date_time \
--with-exception \
--with-fiber \
--with-filesystem \
--with-graph \
--with-graph_parallel \
--with-iostreams \
--with-locale \
--with-log \
--with-math \
--with-mpi \
--with-program_options \
--with-random \
--with-regex \
--with-serialization \
--with-system \
--with-test \
--with-thread \
--with-timer \
--with-type_erasure \
--with-wave \
--with-stacktrace \
variant=release \
debug-symbols=off \
threading=multi \
runtime-link=shared \
link=shared,static \
target-os=android \
toolset=clang-android \
architecture=$_boost_arch \
address-model=$_boost_address_model \
-sICONV_PATH="/opt/android-libs/$_pkg_arch" \
cflags="$common_flags" \
cxxflags="$common_flags -frtti -std=c++14" \
linkflags="$ld_flags" \
--layout=system \
${jobs} \
\
--prefix="${_stagedir}" \
install
}
package() {
cd "${srcdir}/$_srcname"
source android-env ${_android_arch}
local _stagedir="${srcdir}/stagedir"
install -dm755 "${pkgdir}"$_android_prefix
cp -a "${_stagedir}"/{include,share} "${pkgdir}"$_android_prefix
find "${srcdir}/fakeinstall"/lib -iname '*.a' -exec $ANDROID_STRIP -g {} \;
find "${srcdir}/fakeinstall"/lib -iname '*.so' -exec $ANDROID_STRIP --strip-unneeded {} \;
local libdir="${pkgdir}"$_android_prefix/lib
install -d "${libdir}"
cp -a "${_stagedir}"/lib/*.a "${libdir}"/
install -dm755 "$pkgdir/${ANDROID_PREFIX_LIB}/"
cp -a "${srcdir}/fakeinstall"/lib/*.{a,so} "$pkgdir/${ANDROID_PREFIX_LIB}/"
cp -a "${srcdir}/fakeinstall"/lib/cmake "$pkgdir/${ANDROID_PREFIX_LIB}/"
cp -a "${srcdir}/fakeinstall"/include "$pkgdir/${ANDROID_PREFIX}/"
install -dm755 "${pkgdir}"$_android_prefix
cp -a "${_stagedir}"/lib "${pkgdir}"$_android_prefix
install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE_1_0.txt
install -Dm644 "${srcdir}/"${_srcname}/LICENSE_1_0.txt \
"${pkgdir}"$_android_prefix/share/licenses/boost/LICENSE_1_0.txt
local strip=$_android_ndk_path/toolchains/$_android_toolchain-4.9/prebuilt/linux-x86_64/bin/$_android_toolchain-strip
find "${libdir}" -iname '*.a' -exec $strip -g {} \;
find "${libdir}" -iname '*.so' -exec $strip --strip-unneeded {} \;
}
# vim: ts=2 sw=2 et:

View File

@ -1,11 +0,0 @@
https://bugs.gentoo.org/887041
https://github.com/boostorg/phoenix/issues/111
--- a/boost/phoenix/stl.hpp
+++ b/boost/phoenix/stl.hpp
@@ -11,6 +11,5 @@
#include <boost/phoenix/stl/algorithm.hpp>
#include <boost/phoenix/stl/container.hpp>
-#include <boost/phoenix/stl/tuple.hpp>
#endif

View File

@ -1,59 +0,0 @@
From a31e5cffa85f58b64a39fa7c4a1bd3bd9228b069 Mon Sep 17 00:00:00 2001
From: Conrad Poelman <cpgithub@stellarscience.com>
Date: Tue, 4 Aug 2020 17:20:40 -0400
Subject: [PATCH] Remove deprecated inheritance from std::iterator (#97)
std::iterator was deprecated in C++17 and removed in C++20. I replaced the inheritance with the 5 equivalent typedefs, even though they're not all used by ublas, for compatibility in case clients depend on them.
---
.../boost/numeric/ublas/detail/iterator.hpp | 24 ++++++++++++++-----
1 file changed, 18 insertions(+), 6 deletions(-)
diff --git a/include/boost/numeric/ublas/detail/iterator.hpp b/include/boost/numeric/ublas/detail/iterator.hpp
index 1723a301c..7aebf2f9f 100644
--- a/include/boost/numeric/ublas/detail/iterator.hpp
+++ b/include/boost/numeric/ublas/detail/iterator.hpp
@@ -107,8 +107,12 @@ namespace boost { namespace numeric { namespace ublas {
* via the post increment operator.
*/
template<class IC, class I, class T>
- struct forward_iterator_base:
- public std::iterator<IC, T> {
+ struct forward_iterator_base {
+ typedef IC iterator_category;
+ typedef T value_type;
+ typedef std::ptrdiff_t difference_type;
+ typedef T* pointer;
+ typedef T& reference;
typedef I derived_iterator_type;
typedef T derived_value_type;
@@ -145,8 +149,12 @@ namespace boost { namespace numeric { namespace ublas {
* via the post increment and post decrement operator.
*/
template<class IC, class I, class T>
- struct bidirectional_iterator_base:
- public std::iterator<IC, T> {
+ struct bidirectional_iterator_base {
+ typedef IC iterator_category;
+ typedef T value_type;
+ typedef std::ptrdiff_t difference_type;
+ typedef T* pointer;
+ typedef T& reference;
typedef I derived_iterator_type;
typedef T derived_value_type;
@@ -200,8 +208,12 @@ namespace boost { namespace numeric { namespace ublas {
*/
template<class IC, class I, class T, class D = std::ptrdiff_t>
// ISSUE the default for D seems rather dangerous as it can easily be (silently) incorrect
- struct random_access_iterator_base:
- public std::iterator<IC, T> {
+ struct random_access_iterator_base {
+ typedef IC iterator_category;
+ typedef T value_type;
+ typedef D difference_type;
+ typedef T* pointer;
+ typedef T& reference;
typedef I derived_iterator_type;
typedef T derived_value_type;
typedef D derived_difference_type;

View File

@ -1,33 +1,27 @@
--- a/tools/build/src/tools/common.jam 2023-02-03 10:57:59.385098144 +0100
+++ b/tools/build/src/tools/common.jam 2023-02-03 11:00:34.982146918 +0100
@@ -1127,18 +1127,18 @@
import $(toolset) ;
local tool-version = [ $(toolset).get-full-version $(command) ] ;
- import version ;
- if ! [ version.version-compatible [ SPLIT_BY_CHARACTERS $(version) : . ]
- : [ SPLIT_BY_CHARACTERS $(tool-version) : . ] ]
- {
- errors.error toolset $(toolset) "initialization:"
- : version '$(version)' requested but
- '$(tool)-$(version)' not found and version
- '$(tool-version:J=.)' of default '$(command)'
- does not match
- : initialized from [ errors.nearest-user-location ]
- ;
- }
+ #import version ;
+ #if ! [ version.version-compatible [ SPLIT_BY_CHARACTERS $(version) : . ]
+ # : [ SPLIT_BY_CHARACTERS $(tool-version) : . ] ]
+ #{
+ # errors.error toolset $(toolset) "initialization:"
+ # : version '$(version)' requested but
+ # '$(tool)-$(version)' not found and version
+ # '$(tool-version:J=.)' of default '$(command)'
+ # does not match
+ # : initialized from [ errors.nearest-user-location ]
+ # ;
+ #}
--- a/tools/build/src/tools/common.jam 2019-09-18 16:03:02.035995695 +0200
+++ b/tools/build/src/tools/common.jam 2019-09-18 16:03:36.386156355 +0200
@@ -974,16 +974,16 @@
}
#3) default: no command and no version specified, try using "$(tool)"
else
# From GCC 5, versioning changes and minor becomes patch
- if $(tag) = gcc && [ numbers.less 4 $(version[1]) ]
- {
- version = $(version[1]) ;
- }
+ #if $(tag) = gcc && [ numbers.less 4 $(version[1]) ]
+ #{
+ # version = $(version[1]) ;
+ #}
# Ditto, from Clang 4
- if ( $(tag) = clang || $(tag) = clangw ) && [ numbers.less 3 $(version[1]) ]
- {
- version = $(version[1]) ;
- }
+ #if ( $(tag) = clang || $(tag) = clangw ) && [ numbers.less 3 $(version[1]) ]
+ #{
+ # version = $(version[1]) ;
+ #}
# On intel, version is not added, because it does not matter and it is the
# version of vc used as backend that matters. Ideally, we should encode the

View File

@ -0,0 +1,11 @@
--- boostcpp.jam.old 2018-08-01 22:50:40.000000000 +0200
+++ boostcpp.jam 2018-10-07 01:48:30.175912524 +0200
@@ -154,7 +154,7 @@
# libFoo.1.2.3.dylib format. AIX linkers do not accept version suffixes
# either. Pgi compilers can not accept a library with version suffix.
if $(type) = SHARED_LIB &&
- ! [ $(property-set).get <target-os> ] in windows cygwin darwin aix &&
+ ! [ $(property-set).get <target-os> ] in windows cygwin darwin aix android &&
! [ $(property-set).get <toolset> ] in pgi
{
result = $(result).$(BOOST_VERSION) ;

View File

@ -3,146 +3,153 @@
# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where
# you also find the URL of a binary repository.
_android_arch=armv7a-eabi
pkgname=android-${_android_arch}-boost
pkgver=1.84.0
pkgrel=1
_pkgname=boost
_pkg_arch=armv7a-eabi
_android_arch=armeabi-v7a
_android_toolchain=arm-linux-androideabi
_andoird_toolchain_dir=$_android_toolchain
_android_platform=24 # https://developer.android.com/about/dashboards/
_android_target=armv7a-linux-androideabi$_android_platform
_android_prefix=/opt/android-libs/$_pkg_arch
_android_ndk_path=/opt/android-ndk
_boost_arch=arm
_boost_address_model=32
pkgname=android-$_pkg_arch-$_pkgname
pkgver=1.76.0
_srcname=boost_${pkgver//./_}
pkgrel=1
url='https://www.boost.org/'
arch=('any')
pkgdesc="Free peer-reviewed portable C++ source libraries (Android, ${_android_arch})"
url="https://www.boost.org/"
license=('custom')
depends=("android-${_android_arch}-bzip2"
"android-${_android_arch}-icu"
"android-${_android_arch}-zlib"
"android-${_android_arch}-zstd")
makedepends=('android-environment')
if [[ $_android_arch == aarch64 ]] || [[ $_android_arch == x86-64 ]]; then
makedepends+=("android-${_android_arch}-openmpi")
optdepends+=("android-${_android_arch}-openmpi: for mpi support")
fi
options=(!strip !buildflags staticlibs !emptydirs)
source=("https://boostorg.jfrog.io/artifactory/main/release/$pkgver/source/$_srcname.tar.bz2"
"boost-1.81.0-phoenix-multiple-definitions.patch"
"boost-ublas-c++20-iterator.patch::https://github.com/boostorg/ublas/commit/a31e5cffa85f.patch"
"disable-version-check.patch")
md5sums=('9dcd632441e4da04a461082ebbafd337'
'cb1c25777e9b85af62366e7c930244b8'
'326826bf610c63c23247e70e648ff104'
'6290eb4fa0cab451aac92e12e85ef073')
pkgdesc="Free peer-reviewed portable C++ source libraries (Android, $_pkg_arch)"
depends=("android-$_pkg_arch-libiconv")
options=(!buildflags staticlibs !strip !emptydirs)
makedepends=('bzip2' 'zlib' 'android-ndk' 'android-sdk')
conflicts=("android-$_pkgname-$_android_arch")
replaces=("android-$_pkgname-$_android_arch")
source=(https://boostorg.jfrog.io/artifactory/main/release/$pkgver/source/$_srcname.tar.gz
$_pkgname-ublas-c++20-iterator.patch::https://github.com/boostorg/ublas/commit/a31e5cffa85f.patch
no-versioned-shlibs.patch)
sha256sums=('7bd7ddceec1a1dfdcbdb3e609b60d01739c38390a5f956385a12f3122049f0ca'
'aa38addb40d5f44b4a8472029b475e7e6aef1c460509eb7d8edf03491dc1b5ee'
'd82d0f15064812dcabb3456a7bcb1db0e0f6145980e4728e638372e0fd35af23')
prepare() {
cd "${srcdir}/$_srcname"
source android-env ${_android_arch}
# https://github.com/boostorg/phoenix/issues/111
patch -Np1 -i ../boost-1.81.0-phoenix-multiple-definitions.patch
cd ${_srcname}
# https://github.com/boostorg/ublas/pull/97
patch -Np2 -i ../boost-ublas-c++20-iterator.patch
patch -p1 -i ../disable-version-check.patch
patch -Np2 -i ../$_pkgname-ublas-c++20-iterator.patch
patch -i ../no-versioned-shlibs.patch
}
build() {
cd "${srcdir}/$_srcname"
source android-env ${_android_arch}
local _stagedir="${srcdir}/stagedir"
local jobs="$(sed -e 's/.*\(-j *[0-9]\+\).*/\1/' <<< ${MAKEFLAGS})"
local target_flags=" \
--target=$_android_target"
local common_flags=" \
$target_flags \
-isystem $_android_ndk_path/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1 \
-isystem $_android_ndk_path/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include \
-isystem $_android_ndk_path/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/$_android_toolchain \
-fexceptions \
-no-canonical-prefixes \
-D__ANDROID_API__=$_android_platform \
-O3 \
-fPIC \
-DBOOST_ASIO_HAS_STD_STRING_VIEW=1"
local ld_flags=" \
$target_flags \
-fexceptions \
$_android_ndk_path/sources/cxx-stl/llvm-libc++/libs/$_android_arch/libc++_shared.so \
-nostdlib++"
# Platform specific patches
case "$_android_arch" in
aarch64)
_boost_arch=arm
_boost_address_model=64
;;
armv7a-eabi)
_boost_arch=arm
_boost_address_model=32
;;
x86)
_boost_arch=x86
_boost_address_model=32
;;
x86-64)
_boost_arch=x86
_boost_address_model=64
;;
*)
;;
esac
cd ${_srcname}
./bootstrap.sh -with-toolset=gcc
./bootstrap.sh --with-toolset=gcc
# support for OpenMPI
if [[ _boost_address_model == 64 ]]; then
_boost_mpi='using mpi ;'
else
_boost_mpi=''
fi
install -Dm755 tools/build/src/engine/b2 "${_stagedir}"/bin/b2
userConfigs=$srcdir/$_srcname/user-config.jam
# Support for OpenMPI
echo "using mpi ;" >> project-config.jam
cat << EOF > "${userConfigs}"
${_boost_mpi}
using clang : android : ${ANDROID_CXX} :
<archiver>${ANDROID_AR} \
<assembler>${ANDROID_AS}
;
EOF
# boostbook is needed by quickbook
install -dm755 "${_stagedir}"/share/boostbook
cp -a tools/boostbook/{xsl,dtd} "${_stagedir}"/share/boostbook/
./b2 install \
--prefix="$srcdir/fakeinstall" \
--user-config="${userConfigs}" \
--layout=system \
--with-atomic \
--with-chrono \
--with-container \
--with-date_time \
--with-exception \
--with-fiber \
--with-filesystem \
--with-graph \
--with-graph_parallel \
--with-iostreams \
--with-locale \
--with-log \
--with-math \
--with-mpi \
--with-program_options \
--with-random \
--with-regex \
--with-serialization \
--with-system \
--with-test \
--with-thread \
--with-timer \
--with-type_erasure \
--with-wave \
--with-stacktrace \
-sICONV_PATH="${ANDROID_PREFIX}" \
variant=release \
debug-symbols=off \
runtime-link=shared \
link=shared,static \
target-os=android \
toolset=clang-android \
architecture=$_boost_arch \
threading=multi \
address-model=$_boost_address_model \
cflags="${CXXFLAGS}" \
cxxflags="${CFLAGS}" \
linkflags="${LDFLAGS}"
export PATH=$_android_ndk_path/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH
# default "minimal" install: "release link=shared,static
# runtime-link=shared threading=single,multi"
# --layout=tagged will add the "-mt" suffix for multithreaded libraries
# and installs includes in $_android_prefix/include/boost.
# --layout=system no longer adds the -mt suffix for multi-threaded libs.
# install to ${_stagedir} for consistency with regular boost package
"${_stagedir}"/bin/b2 \
--with-atomic \
--with-chrono \
--with-container \
--with-date_time \
--with-exception \
--with-fiber \
--with-filesystem \
--with-graph \
--with-graph_parallel \
--with-iostreams \
--with-locale \
--with-log \
--with-math \
--with-mpi \
--with-program_options \
--with-random \
--with-regex \
--with-serialization \
--with-system \
--with-test \
--with-thread \
--with-timer \
--with-type_erasure \
--with-wave \
--with-stacktrace \
variant=release \
debug-symbols=off \
threading=multi \
runtime-link=shared \
link=shared,static \
target-os=android \
toolset=clang-android \
architecture=$_boost_arch \
address-model=$_boost_address_model \
-sICONV_PATH="/opt/android-libs/$_pkg_arch" \
cflags="$common_flags" \
cxxflags="$common_flags -frtti -std=c++14" \
linkflags="$ld_flags" \
--layout=system \
${jobs} \
\
--prefix="${_stagedir}" \
install
}
package() {
cd "${srcdir}/$_srcname"
source android-env ${_android_arch}
local _stagedir="${srcdir}/stagedir"
install -dm755 "${pkgdir}"$_android_prefix
cp -a "${_stagedir}"/{include,share} "${pkgdir}"$_android_prefix
find "${srcdir}/fakeinstall"/lib -iname '*.a' -exec $ANDROID_STRIP -g {} \;
find "${srcdir}/fakeinstall"/lib -iname '*.so' -exec $ANDROID_STRIP --strip-unneeded {} \;
local libdir="${pkgdir}"$_android_prefix/lib
install -d "${libdir}"
cp -a "${_stagedir}"/lib/*.a "${libdir}"/
install -dm755 "$pkgdir/${ANDROID_PREFIX_LIB}/"
cp -a "${srcdir}/fakeinstall"/lib/*.{a,so} "$pkgdir/${ANDROID_PREFIX_LIB}/"
cp -a "${srcdir}/fakeinstall"/lib/cmake "$pkgdir/${ANDROID_PREFIX_LIB}/"
cp -a "${srcdir}/fakeinstall"/include "$pkgdir/${ANDROID_PREFIX}/"
install -dm755 "${pkgdir}"$_android_prefix
cp -a "${_stagedir}"/lib "${pkgdir}"$_android_prefix
install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE_1_0.txt
install -Dm644 "${srcdir}/"${_srcname}/LICENSE_1_0.txt \
"${pkgdir}"$_android_prefix/share/licenses/boost/LICENSE_1_0.txt
local strip=$_android_ndk_path/toolchains/$_android_toolchain-4.9/prebuilt/linux-x86_64/bin/$_android_toolchain-strip
find "${libdir}" -iname '*.a' -exec $strip -g {} \;
find "${libdir}" -iname '*.so' -exec $strip --strip-unneeded {} \;
}
# vim: ts=2 sw=2 et:

View File

@ -1,11 +0,0 @@
https://bugs.gentoo.org/887041
https://github.com/boostorg/phoenix/issues/111
--- a/boost/phoenix/stl.hpp
+++ b/boost/phoenix/stl.hpp
@@ -11,6 +11,5 @@
#include <boost/phoenix/stl/algorithm.hpp>
#include <boost/phoenix/stl/container.hpp>
-#include <boost/phoenix/stl/tuple.hpp>
#endif

View File

@ -1,59 +0,0 @@
From a31e5cffa85f58b64a39fa7c4a1bd3bd9228b069 Mon Sep 17 00:00:00 2001
From: Conrad Poelman <cpgithub@stellarscience.com>
Date: Tue, 4 Aug 2020 17:20:40 -0400
Subject: [PATCH] Remove deprecated inheritance from std::iterator (#97)
std::iterator was deprecated in C++17 and removed in C++20. I replaced the inheritance with the 5 equivalent typedefs, even though they're not all used by ublas, for compatibility in case clients depend on them.
---
.../boost/numeric/ublas/detail/iterator.hpp | 24 ++++++++++++++-----
1 file changed, 18 insertions(+), 6 deletions(-)
diff --git a/include/boost/numeric/ublas/detail/iterator.hpp b/include/boost/numeric/ublas/detail/iterator.hpp
index 1723a301c..7aebf2f9f 100644
--- a/include/boost/numeric/ublas/detail/iterator.hpp
+++ b/include/boost/numeric/ublas/detail/iterator.hpp
@@ -107,8 +107,12 @@ namespace boost { namespace numeric { namespace ublas {
* via the post increment operator.
*/
template<class IC, class I, class T>
- struct forward_iterator_base:
- public std::iterator<IC, T> {
+ struct forward_iterator_base {
+ typedef IC iterator_category;
+ typedef T value_type;
+ typedef std::ptrdiff_t difference_type;
+ typedef T* pointer;
+ typedef T& reference;
typedef I derived_iterator_type;
typedef T derived_value_type;
@@ -145,8 +149,12 @@ namespace boost { namespace numeric { namespace ublas {
* via the post increment and post decrement operator.
*/
template<class IC, class I, class T>
- struct bidirectional_iterator_base:
- public std::iterator<IC, T> {
+ struct bidirectional_iterator_base {
+ typedef IC iterator_category;
+ typedef T value_type;
+ typedef std::ptrdiff_t difference_type;
+ typedef T* pointer;
+ typedef T& reference;
typedef I derived_iterator_type;
typedef T derived_value_type;
@@ -200,8 +208,12 @@ namespace boost { namespace numeric { namespace ublas {
*/
template<class IC, class I, class T, class D = std::ptrdiff_t>
// ISSUE the default for D seems rather dangerous as it can easily be (silently) incorrect
- struct random_access_iterator_base:
- public std::iterator<IC, T> {
+ struct random_access_iterator_base {
+ typedef IC iterator_category;
+ typedef T value_type;
+ typedef D difference_type;
+ typedef T* pointer;
+ typedef T& reference;
typedef I derived_iterator_type;
typedef T derived_value_type;
typedef D derived_difference_type;

View File

@ -1,33 +1,27 @@
--- a/tools/build/src/tools/common.jam 2023-02-03 10:57:59.385098144 +0100
+++ b/tools/build/src/tools/common.jam 2023-02-03 11:00:34.982146918 +0100
@@ -1127,18 +1127,18 @@
import $(toolset) ;
local tool-version = [ $(toolset).get-full-version $(command) ] ;
- import version ;
- if ! [ version.version-compatible [ SPLIT_BY_CHARACTERS $(version) : . ]
- : [ SPLIT_BY_CHARACTERS $(tool-version) : . ] ]
- {
- errors.error toolset $(toolset) "initialization:"
- : version '$(version)' requested but
- '$(tool)-$(version)' not found and version
- '$(tool-version:J=.)' of default '$(command)'
- does not match
- : initialized from [ errors.nearest-user-location ]
- ;
- }
+ #import version ;
+ #if ! [ version.version-compatible [ SPLIT_BY_CHARACTERS $(version) : . ]
+ # : [ SPLIT_BY_CHARACTERS $(tool-version) : . ] ]
+ #{
+ # errors.error toolset $(toolset) "initialization:"
+ # : version '$(version)' requested but
+ # '$(tool)-$(version)' not found and version
+ # '$(tool-version:J=.)' of default '$(command)'
+ # does not match
+ # : initialized from [ errors.nearest-user-location ]
+ # ;
+ #}
--- a/tools/build/src/tools/common.jam 2019-09-18 16:03:02.035995695 +0200
+++ b/tools/build/src/tools/common.jam 2019-09-18 16:03:36.386156355 +0200
@@ -974,16 +974,16 @@
}
#3) default: no command and no version specified, try using "$(tool)"
else
# From GCC 5, versioning changes and minor becomes patch
- if $(tag) = gcc && [ numbers.less 4 $(version[1]) ]
- {
- version = $(version[1]) ;
- }
+ #if $(tag) = gcc && [ numbers.less 4 $(version[1]) ]
+ #{
+ # version = $(version[1]) ;
+ #}
# Ditto, from Clang 4
- if ( $(tag) = clang || $(tag) = clangw ) && [ numbers.less 3 $(version[1]) ]
- {
- version = $(version[1]) ;
- }
+ #if ( $(tag) = clang || $(tag) = clangw ) && [ numbers.less 3 $(version[1]) ]
+ #{
+ # version = $(version[1]) ;
+ #}
# On intel, version is not added, because it does not matter and it is the
# version of vc used as backend that matters. Ideally, we should encode the

View File

@ -0,0 +1,11 @@
--- boostcpp.jam.old 2018-08-01 22:50:40.000000000 +0200
+++ boostcpp.jam 2018-10-07 01:48:30.175912524 +0200
@@ -154,7 +154,7 @@
# libFoo.1.2.3.dylib format. AIX linkers do not accept version suffixes
# either. Pgi compilers can not accept a library with version suffix.
if $(type) = SHARED_LIB &&
- ! [ $(property-set).get <target-os> ] in windows cygwin darwin aix &&
+ ! [ $(property-set).get <target-os> ] in windows cygwin darwin aix android &&
! [ $(property-set).get <toolset> ] in pgi
{
result = $(result).$(BOOST_VERSION) ;

View File

@ -3,146 +3,153 @@
# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where
# you also find the URL of a binary repository.
_android_arch=x86-64
pkgname=android-${_android_arch}-boost
pkgver=1.84.0
pkgrel=1
_pkgname=boost
_pkg_arch=x86-64
_android_arch=x86_64
_android_toolchain=x86_64-linux-android$_android_platform
_andoird_toolchain_dir=$_android_arch
_android_platform=24 # https://developer.android.com/about/dashboards/
_android_target=$_android_toolchain
_android_prefix=/opt/android-libs/$_pkg_arch
_android_ndk_path=/opt/android-ndk
_boost_arch=x86
_boost_address_model=64
pkgname=android-$_pkg_arch-$_pkgname
pkgver=1.76.0
_srcname=boost_${pkgver//./_}
pkgrel=1
url='https://www.boost.org/'
arch=('any')
pkgdesc="Free peer-reviewed portable C++ source libraries (Android, ${_android_arch})"
url="https://www.boost.org/"
license=('custom')
depends=("android-${_android_arch}-bzip2"
"android-${_android_arch}-icu"
"android-${_android_arch}-zlib"
"android-${_android_arch}-zstd")
makedepends=('android-environment')
if [[ $_android_arch == aarch64 ]] || [[ $_android_arch == x86-64 ]]; then
makedepends+=("android-${_android_arch}-openmpi")
optdepends+=("android-${_android_arch}-openmpi: for mpi support")
fi
options=(!strip !buildflags staticlibs !emptydirs)
source=("https://boostorg.jfrog.io/artifactory/main/release/$pkgver/source/$_srcname.tar.bz2"
"boost-1.81.0-phoenix-multiple-definitions.patch"
"boost-ublas-c++20-iterator.patch::https://github.com/boostorg/ublas/commit/a31e5cffa85f.patch"
"disable-version-check.patch")
md5sums=('9dcd632441e4da04a461082ebbafd337'
'cb1c25777e9b85af62366e7c930244b8'
'326826bf610c63c23247e70e648ff104'
'6290eb4fa0cab451aac92e12e85ef073')
pkgdesc="Free peer-reviewed portable C++ source libraries (Android, $_pkg_arch)"
depends=("android-$_pkg_arch-libiconv")
options=(!buildflags staticlibs !strip !emptydirs)
makedepends=('bzip2' 'zlib' 'android-ndk' 'android-sdk')
conflicts=("android-$_pkgname-$_android_arch")
replaces=("android-$_pkgname-$_android_arch")
source=(https://boostorg.jfrog.io/artifactory/main/release/$pkgver/source/$_srcname.tar.gz
$_pkgname-ublas-c++20-iterator.patch::https://github.com/boostorg/ublas/commit/a31e5cffa85f.patch
no-versioned-shlibs.patch)
sha256sums=('7bd7ddceec1a1dfdcbdb3e609b60d01739c38390a5f956385a12f3122049f0ca'
'aa38addb40d5f44b4a8472029b475e7e6aef1c460509eb7d8edf03491dc1b5ee'
'd82d0f15064812dcabb3456a7bcb1db0e0f6145980e4728e638372e0fd35af23')
prepare() {
cd "${srcdir}/$_srcname"
source android-env ${_android_arch}
# https://github.com/boostorg/phoenix/issues/111
patch -Np1 -i ../boost-1.81.0-phoenix-multiple-definitions.patch
cd ${_srcname}
# https://github.com/boostorg/ublas/pull/97
patch -Np2 -i ../boost-ublas-c++20-iterator.patch
patch -p1 -i ../disable-version-check.patch
patch -Np2 -i ../$_pkgname-ublas-c++20-iterator.patch
patch -i ../no-versioned-shlibs.patch
}
build() {
cd "${srcdir}/$_srcname"
source android-env ${_android_arch}
local _stagedir="${srcdir}/stagedir"
local jobs="$(sed -e 's/.*\(-j *[0-9]\+\).*/\1/' <<< ${MAKEFLAGS})"
local target_flags=" \
--target=$_android_target"
local common_flags=" \
$target_flags \
-isystem $_android_ndk_path/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1 \
-isystem $_android_ndk_path/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include \
-isystem $_android_ndk_path/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/$_android_toolchain \
-fexceptions \
-no-canonical-prefixes \
-D__ANDROID_API__=$_android_platform \
-O3 \
-fPIC \
-DBOOST_ASIO_HAS_STD_STRING_VIEW=1"
local ld_flags=" \
$target_flags \
-fexceptions \
$_android_ndk_path/sources/cxx-stl/llvm-libc++/libs/$_android_arch/libc++_shared.so \
-nostdlib++"
# Platform specific patches
case "$_android_arch" in
aarch64)
_boost_arch=arm
_boost_address_model=64
;;
armv7a-eabi)
_boost_arch=arm
_boost_address_model=32
;;
x86)
_boost_arch=x86
_boost_address_model=32
;;
x86-64)
_boost_arch=x86
_boost_address_model=64
;;
*)
;;
esac
cd ${_srcname}
./bootstrap.sh -with-toolset=gcc
./bootstrap.sh --with-toolset=gcc
# support for OpenMPI
if [[ _boost_address_model == 64 ]]; then
_boost_mpi='using mpi ;'
else
_boost_mpi=''
fi
install -Dm755 tools/build/src/engine/b2 "${_stagedir}"/bin/b2
userConfigs=$srcdir/$_srcname/user-config.jam
# Support for OpenMPI
echo "using mpi ;" >> project-config.jam
cat << EOF > "${userConfigs}"
${_boost_mpi}
using clang : android : ${ANDROID_CXX} :
<archiver>${ANDROID_AR} \
<assembler>${ANDROID_AS}
;
EOF
# boostbook is needed by quickbook
install -dm755 "${_stagedir}"/share/boostbook
cp -a tools/boostbook/{xsl,dtd} "${_stagedir}"/share/boostbook/
./b2 install \
--prefix="$srcdir/fakeinstall" \
--user-config="${userConfigs}" \
--layout=system \
--with-atomic \
--with-chrono \
--with-container \
--with-date_time \
--with-exception \
--with-fiber \
--with-filesystem \
--with-graph \
--with-graph_parallel \
--with-iostreams \
--with-locale \
--with-log \
--with-math \
--with-mpi \
--with-program_options \
--with-random \
--with-regex \
--with-serialization \
--with-system \
--with-test \
--with-thread \
--with-timer \
--with-type_erasure \
--with-wave \
--with-stacktrace \
-sICONV_PATH="${ANDROID_PREFIX}" \
variant=release \
debug-symbols=off \
runtime-link=shared \
link=shared,static \
target-os=android \
toolset=clang-android \
architecture=$_boost_arch \
threading=multi \
address-model=$_boost_address_model \
cflags="${CXXFLAGS}" \
cxxflags="${CFLAGS}" \
linkflags="${LDFLAGS}"
export PATH=$_android_ndk_path/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH
# default "minimal" install: "release link=shared,static
# runtime-link=shared threading=single,multi"
# --layout=tagged will add the "-mt" suffix for multithreaded libraries
# and installs includes in $_android_prefix/include/boost.
# --layout=system no longer adds the -mt suffix for multi-threaded libs.
# install to ${_stagedir} for consistency with regular boost package
"${_stagedir}"/bin/b2 \
--with-atomic \
--with-chrono \
--with-container \
--with-date_time \
--with-exception \
--with-fiber \
--with-filesystem \
--with-graph \
--with-graph_parallel \
--with-iostreams \
--with-locale \
--with-log \
--with-math \
--with-mpi \
--with-program_options \
--with-random \
--with-regex \
--with-serialization \
--with-system \
--with-test \
--with-thread \
--with-timer \
--with-type_erasure \
--with-wave \
--with-stacktrace \
variant=release \
debug-symbols=off \
threading=multi \
runtime-link=shared \
link=shared,static \
target-os=android \
toolset=clang-android \
architecture=$_boost_arch \
address-model=$_boost_address_model \
-sICONV_PATH="/opt/android-libs/$_pkg_arch" \
cflags="$common_flags" \
cxxflags="$common_flags -frtti -std=c++14" \
linkflags="$ld_flags" \
--layout=system \
${jobs} \
\
--prefix="${_stagedir}" \
install
}
package() {
cd "${srcdir}/$_srcname"
source android-env ${_android_arch}
local _stagedir="${srcdir}/stagedir"
install -dm755 "${pkgdir}"$_android_prefix
cp -a "${_stagedir}"/{include,share} "${pkgdir}"$_android_prefix
find "${srcdir}/fakeinstall"/lib -iname '*.a' -exec $ANDROID_STRIP -g {} \;
find "${srcdir}/fakeinstall"/lib -iname '*.so' -exec $ANDROID_STRIP --strip-unneeded {} \;
local libdir="${pkgdir}"$_android_prefix/lib
install -d "${libdir}"
cp -a "${_stagedir}"/lib/*.a "${libdir}"/
install -dm755 "$pkgdir/${ANDROID_PREFIX_LIB}/"
cp -a "${srcdir}/fakeinstall"/lib/*.{a,so} "$pkgdir/${ANDROID_PREFIX_LIB}/"
cp -a "${srcdir}/fakeinstall"/lib/cmake "$pkgdir/${ANDROID_PREFIX_LIB}/"
cp -a "${srcdir}/fakeinstall"/include "$pkgdir/${ANDROID_PREFIX}/"
install -dm755 "${pkgdir}"$_android_prefix
cp -a "${_stagedir}"/lib "${pkgdir}"$_android_prefix
install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE_1_0.txt
install -Dm644 "${srcdir}/"${_srcname}/LICENSE_1_0.txt \
"${pkgdir}"$_android_prefix/share/licenses/boost/LICENSE_1_0.txt
local strip=$_android_ndk_path/toolchains/$_android_toolchain-4.9/prebuilt/linux-x86_64/bin/$_android_toolchain-strip
find "${libdir}" -iname '*.a' -exec $strip -g {} \;
find "${libdir}" -iname '*.so' -exec $strip --strip-unneeded {} \;
}
# vim: ts=2 sw=2 et:

View File

@ -1,11 +0,0 @@
https://bugs.gentoo.org/887041
https://github.com/boostorg/phoenix/issues/111
--- a/boost/phoenix/stl.hpp
+++ b/boost/phoenix/stl.hpp
@@ -11,6 +11,5 @@
#include <boost/phoenix/stl/algorithm.hpp>
#include <boost/phoenix/stl/container.hpp>
-#include <boost/phoenix/stl/tuple.hpp>
#endif

View File

@ -1,59 +0,0 @@
From a31e5cffa85f58b64a39fa7c4a1bd3bd9228b069 Mon Sep 17 00:00:00 2001
From: Conrad Poelman <cpgithub@stellarscience.com>
Date: Tue, 4 Aug 2020 17:20:40 -0400
Subject: [PATCH] Remove deprecated inheritance from std::iterator (#97)
std::iterator was deprecated in C++17 and removed in C++20. I replaced the inheritance with the 5 equivalent typedefs, even though they're not all used by ublas, for compatibility in case clients depend on them.
---
.../boost/numeric/ublas/detail/iterator.hpp | 24 ++++++++++++++-----
1 file changed, 18 insertions(+), 6 deletions(-)
diff --git a/include/boost/numeric/ublas/detail/iterator.hpp b/include/boost/numeric/ublas/detail/iterator.hpp
index 1723a301c..7aebf2f9f 100644
--- a/include/boost/numeric/ublas/detail/iterator.hpp
+++ b/include/boost/numeric/ublas/detail/iterator.hpp
@@ -107,8 +107,12 @@ namespace boost { namespace numeric { namespace ublas {
* via the post increment operator.
*/
template<class IC, class I, class T>
- struct forward_iterator_base:
- public std::iterator<IC, T> {
+ struct forward_iterator_base {
+ typedef IC iterator_category;
+ typedef T value_type;
+ typedef std::ptrdiff_t difference_type;
+ typedef T* pointer;
+ typedef T& reference;
typedef I derived_iterator_type;
typedef T derived_value_type;
@@ -145,8 +149,12 @@ namespace boost { namespace numeric { namespace ublas {
* via the post increment and post decrement operator.
*/
template<class IC, class I, class T>
- struct bidirectional_iterator_base:
- public std::iterator<IC, T> {
+ struct bidirectional_iterator_base {
+ typedef IC iterator_category;
+ typedef T value_type;
+ typedef std::ptrdiff_t difference_type;
+ typedef T* pointer;
+ typedef T& reference;
typedef I derived_iterator_type;
typedef T derived_value_type;
@@ -200,8 +208,12 @@ namespace boost { namespace numeric { namespace ublas {
*/
template<class IC, class I, class T, class D = std::ptrdiff_t>
// ISSUE the default for D seems rather dangerous as it can easily be (silently) incorrect
- struct random_access_iterator_base:
- public std::iterator<IC, T> {
+ struct random_access_iterator_base {
+ typedef IC iterator_category;
+ typedef T value_type;
+ typedef D difference_type;
+ typedef T* pointer;
+ typedef T& reference;
typedef I derived_iterator_type;
typedef T derived_value_type;
typedef D derived_difference_type;

View File

@ -1,33 +1,27 @@
--- a/tools/build/src/tools/common.jam 2023-02-03 10:57:59.385098144 +0100
+++ b/tools/build/src/tools/common.jam 2023-02-03 11:00:34.982146918 +0100
@@ -1127,18 +1127,18 @@
import $(toolset) ;
local tool-version = [ $(toolset).get-full-version $(command) ] ;
- import version ;
- if ! [ version.version-compatible [ SPLIT_BY_CHARACTERS $(version) : . ]
- : [ SPLIT_BY_CHARACTERS $(tool-version) : . ] ]
- {
- errors.error toolset $(toolset) "initialization:"
- : version '$(version)' requested but
- '$(tool)-$(version)' not found and version
- '$(tool-version:J=.)' of default '$(command)'
- does not match
- : initialized from [ errors.nearest-user-location ]
- ;
- }
+ #import version ;
+ #if ! [ version.version-compatible [ SPLIT_BY_CHARACTERS $(version) : . ]
+ # : [ SPLIT_BY_CHARACTERS $(tool-version) : . ] ]
+ #{
+ # errors.error toolset $(toolset) "initialization:"
+ # : version '$(version)' requested but
+ # '$(tool)-$(version)' not found and version
+ # '$(tool-version:J=.)' of default '$(command)'
+ # does not match
+ # : initialized from [ errors.nearest-user-location ]
+ # ;
+ #}
--- a/tools/build/src/tools/common.jam 2019-09-18 16:03:02.035995695 +0200
+++ b/tools/build/src/tools/common.jam 2019-09-18 16:03:36.386156355 +0200
@@ -974,16 +974,16 @@
}
#3) default: no command and no version specified, try using "$(tool)"
else
# From GCC 5, versioning changes and minor becomes patch
- if $(tag) = gcc && [ numbers.less 4 $(version[1]) ]
- {
- version = $(version[1]) ;
- }
+ #if $(tag) = gcc && [ numbers.less 4 $(version[1]) ]
+ #{
+ # version = $(version[1]) ;
+ #}
# Ditto, from Clang 4
- if ( $(tag) = clang || $(tag) = clangw ) && [ numbers.less 3 $(version[1]) ]
- {
- version = $(version[1]) ;
- }
+ #if ( $(tag) = clang || $(tag) = clangw ) && [ numbers.less 3 $(version[1]) ]
+ #{
+ # version = $(version[1]) ;
+ #}
# On intel, version is not added, because it does not matter and it is the
# version of vc used as backend that matters. Ideally, we should encode the

View File

@ -0,0 +1,11 @@
--- boostcpp.jam.old 2018-08-01 22:50:40.000000000 +0200
+++ boostcpp.jam 2018-10-07 01:48:30.175912524 +0200
@@ -154,7 +154,7 @@
# libFoo.1.2.3.dylib format. AIX linkers do not accept version suffixes
# either. Pgi compilers can not accept a library with version suffix.
if $(type) = SHARED_LIB &&
- ! [ $(property-set).get <target-os> ] in windows cygwin darwin aix &&
+ ! [ $(property-set).get <target-os> ] in windows cygwin darwin aix android &&
! [ $(property-set).get <toolset> ] in pgi
{
result = $(result).$(BOOST_VERSION) ;

View File

@ -3,146 +3,153 @@
# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where
# you also find the URL of a binary repository.
_pkgname=boost
_pkg_arch=x86
_android_arch=x86
pkgname=android-${_android_arch}-boost
pkgver=1.84.0
pkgrel=1
_android_toolchain=i686-linux-android$_android_platform
_andoird_toolchain_dir=$_android_arch
_android_platform=24 # https://developer.android.com/about/dashboards/
_android_target=$_android_toolchain
_android_prefix=/opt/android-libs/$_pkg_arch
_android_ndk_path=/opt/android-ndk
_boost_arch=x86
_boost_address_model=32
pkgname=android-$_pkg_arch-$_pkgname
pkgver=1.76.0
_srcname=boost_${pkgver//./_}
pkgrel=1
url='https://www.boost.org/'
arch=('any')
pkgdesc="Free peer-reviewed portable C++ source libraries (Android, ${_android_arch})"
url="https://www.boost.org/"
license=('custom')
depends=("android-${_android_arch}-bzip2"
"android-${_android_arch}-icu"
"android-${_android_arch}-zlib"
"android-${_android_arch}-zstd")
makedepends=('android-environment')
if [[ $_android_arch == aarch64 ]] || [[ $_android_arch == x86-64 ]]; then
makedepends+=("android-${_android_arch}-openmpi")
optdepends+=("android-${_android_arch}-openmpi: for mpi support")
fi
options=(!strip !buildflags staticlibs !emptydirs)
source=("https://boostorg.jfrog.io/artifactory/main/release/$pkgver/source/$_srcname.tar.bz2"
"boost-1.81.0-phoenix-multiple-definitions.patch"
"boost-ublas-c++20-iterator.patch::https://github.com/boostorg/ublas/commit/a31e5cffa85f.patch"
"disable-version-check.patch")
md5sums=('9dcd632441e4da04a461082ebbafd337'
'cb1c25777e9b85af62366e7c930244b8'
'326826bf610c63c23247e70e648ff104'
'6290eb4fa0cab451aac92e12e85ef073')
pkgdesc="Free peer-reviewed portable C++ source libraries (Android, $_pkg_arch)"
depends=("android-$_pkg_arch-libiconv")
options=(!buildflags staticlibs !strip !emptydirs)
makedepends=('bzip2' 'zlib' 'android-ndk' 'android-sdk')
conflicts=("android-$_pkgname-$_android_arch")
replaces=("android-$_pkgname-$_android_arch")
source=(https://boostorg.jfrog.io/artifactory/main/release/$pkgver/source/$_srcname.tar.gz
$_pkgname-ublas-c++20-iterator.patch::https://github.com/boostorg/ublas/commit/a31e5cffa85f.patch
no-versioned-shlibs.patch)
sha256sums=('7bd7ddceec1a1dfdcbdb3e609b60d01739c38390a5f956385a12f3122049f0ca'
'aa38addb40d5f44b4a8472029b475e7e6aef1c460509eb7d8edf03491dc1b5ee'
'd82d0f15064812dcabb3456a7bcb1db0e0f6145980e4728e638372e0fd35af23')
prepare() {
cd "${srcdir}/$_srcname"
source android-env ${_android_arch}
# https://github.com/boostorg/phoenix/issues/111
patch -Np1 -i ../boost-1.81.0-phoenix-multiple-definitions.patch
cd ${_srcname}
# https://github.com/boostorg/ublas/pull/97
patch -Np2 -i ../boost-ublas-c++20-iterator.patch
patch -p1 -i ../disable-version-check.patch
patch -Np2 -i ../$_pkgname-ublas-c++20-iterator.patch
patch -i ../no-versioned-shlibs.patch
}
build() {
cd "${srcdir}/$_srcname"
source android-env ${_android_arch}
local _stagedir="${srcdir}/stagedir"
local jobs="$(sed -e 's/.*\(-j *[0-9]\+\).*/\1/' <<< ${MAKEFLAGS})"
local target_flags=" \
--target=$_android_target"
local common_flags=" \
$target_flags \
-isystem $_android_ndk_path/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1 \
-isystem $_android_ndk_path/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include \
-isystem $_android_ndk_path/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/$_android_toolchain \
-fexceptions \
-no-canonical-prefixes \
-D__ANDROID_API__=$_android_platform \
-O3 \
-fPIC \
-DBOOST_ASIO_HAS_STD_STRING_VIEW=1"
local ld_flags=" \
$target_flags \
-fexceptions \
$_android_ndk_path/sources/cxx-stl/llvm-libc++/libs/$_android_arch/libc++_shared.so \
-nostdlib++"
# Platform specific patches
case "$_android_arch" in
aarch64)
_boost_arch=arm
_boost_address_model=64
;;
armv7a-eabi)
_boost_arch=arm
_boost_address_model=32
;;
x86)
_boost_arch=x86
_boost_address_model=32
;;
x86-64)
_boost_arch=x86
_boost_address_model=64
;;
*)
;;
esac
cd ${_srcname}
./bootstrap.sh -with-toolset=gcc
./bootstrap.sh --with-toolset=gcc
# support for OpenMPI
if [[ _boost_address_model == 64 ]]; then
_boost_mpi='using mpi ;'
else
_boost_mpi=''
fi
install -Dm755 tools/build/src/engine/b2 "${_stagedir}"/bin/b2
userConfigs=$srcdir/$_srcname/user-config.jam
# Support for OpenMPI
echo "using mpi ;" >> project-config.jam
cat << EOF > "${userConfigs}"
${_boost_mpi}
using clang : android : ${ANDROID_CXX} :
<archiver>${ANDROID_AR} \
<assembler>${ANDROID_AS}
;
EOF
# boostbook is needed by quickbook
install -dm755 "${_stagedir}"/share/boostbook
cp -a tools/boostbook/{xsl,dtd} "${_stagedir}"/share/boostbook/
./b2 install \
--prefix="$srcdir/fakeinstall" \
--user-config="${userConfigs}" \
--layout=system \
--with-atomic \
--with-chrono \
--with-container \
--with-date_time \
--with-exception \
--with-fiber \
--with-filesystem \
--with-graph \
--with-graph_parallel \
--with-iostreams \
--with-locale \
--with-log \
--with-math \
--with-mpi \
--with-program_options \
--with-random \
--with-regex \
--with-serialization \
--with-system \
--with-test \
--with-thread \
--with-timer \
--with-type_erasure \
--with-wave \
--with-stacktrace \
-sICONV_PATH="${ANDROID_PREFIX}" \
variant=release \
debug-symbols=off \
runtime-link=shared \
link=shared,static \
target-os=android \
toolset=clang-android \
architecture=$_boost_arch \
threading=multi \
address-model=$_boost_address_model \
cflags="${CXXFLAGS}" \
cxxflags="${CFLAGS}" \
linkflags="${LDFLAGS}"
export PATH=$_android_ndk_path/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH
# default "minimal" install: "release link=shared,static
# runtime-link=shared threading=single,multi"
# --layout=tagged will add the "-mt" suffix for multithreaded libraries
# and installs includes in $_android_prefix/include/boost.
# --layout=system no longer adds the -mt suffix for multi-threaded libs.
# install to ${_stagedir} for consistency with regular boost package
"${_stagedir}"/bin/b2 \
--with-atomic \
--with-chrono \
--with-container \
--with-date_time \
--with-exception \
--with-fiber \
--with-filesystem \
--with-graph \
--with-graph_parallel \
--with-iostreams \
--with-locale \
--with-log \
--with-math \
--with-mpi \
--with-program_options \
--with-random \
--with-regex \
--with-serialization \
--with-system \
--with-test \
--with-thread \
--with-timer \
--with-type_erasure \
--with-wave \
--with-stacktrace \
variant=release \
debug-symbols=off \
threading=multi \
runtime-link=shared \
link=shared,static \
target-os=android \
toolset=clang-android \
architecture=$_boost_arch \
address-model=$_boost_address_model \
-sICONV_PATH="/opt/android-libs/$_pkg_arch" \
cflags="$common_flags" \
cxxflags="$common_flags -frtti -std=c++14" \
linkflags="$ld_flags" \
--layout=system \
${jobs} \
\
--prefix="${_stagedir}" \
install
}
package() {
cd "${srcdir}/$_srcname"
source android-env ${_android_arch}
local _stagedir="${srcdir}/stagedir"
install -dm755 "${pkgdir}"$_android_prefix
cp -a "${_stagedir}"/{include,share} "${pkgdir}"$_android_prefix
find "${srcdir}/fakeinstall"/lib -iname '*.a' -exec $ANDROID_STRIP -g {} \;
find "${srcdir}/fakeinstall"/lib -iname '*.so' -exec $ANDROID_STRIP --strip-unneeded {} \;
local libdir="${pkgdir}"$_android_prefix/lib
install -d "${libdir}"
cp -a "${_stagedir}"/lib/*.a "${libdir}"/
install -dm755 "$pkgdir/${ANDROID_PREFIX_LIB}/"
cp -a "${srcdir}/fakeinstall"/lib/*.{a,so} "$pkgdir/${ANDROID_PREFIX_LIB}/"
cp -a "${srcdir}/fakeinstall"/lib/cmake "$pkgdir/${ANDROID_PREFIX_LIB}/"
cp -a "${srcdir}/fakeinstall"/include "$pkgdir/${ANDROID_PREFIX}/"
install -dm755 "${pkgdir}"$_android_prefix
cp -a "${_stagedir}"/lib "${pkgdir}"$_android_prefix
install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE_1_0.txt
install -Dm644 "${srcdir}/"${_srcname}/LICENSE_1_0.txt \
"${pkgdir}"$_android_prefix/share/licenses/boost/LICENSE_1_0.txt
local strip=$_android_ndk_path/toolchains/$_android_toolchain-4.9/prebuilt/linux-x86_64/bin/$_android_toolchain-strip
find "${libdir}" -iname '*.a' -exec $strip -g {} \;
find "${libdir}" -iname '*.so' -exec $strip --strip-unneeded {} \;
}
# vim: ts=2 sw=2 et:

View File

@ -1,11 +0,0 @@
https://bugs.gentoo.org/887041
https://github.com/boostorg/phoenix/issues/111
--- a/boost/phoenix/stl.hpp
+++ b/boost/phoenix/stl.hpp
@@ -11,6 +11,5 @@
#include <boost/phoenix/stl/algorithm.hpp>
#include <boost/phoenix/stl/container.hpp>
-#include <boost/phoenix/stl/tuple.hpp>
#endif

View File

@ -1,59 +0,0 @@
From a31e5cffa85f58b64a39fa7c4a1bd3bd9228b069 Mon Sep 17 00:00:00 2001
From: Conrad Poelman <cpgithub@stellarscience.com>
Date: Tue, 4 Aug 2020 17:20:40 -0400
Subject: [PATCH] Remove deprecated inheritance from std::iterator (#97)
std::iterator was deprecated in C++17 and removed in C++20. I replaced the inheritance with the 5 equivalent typedefs, even though they're not all used by ublas, for compatibility in case clients depend on them.
---
.../boost/numeric/ublas/detail/iterator.hpp | 24 ++++++++++++++-----
1 file changed, 18 insertions(+), 6 deletions(-)
diff --git a/include/boost/numeric/ublas/detail/iterator.hpp b/include/boost/numeric/ublas/detail/iterator.hpp
index 1723a301c..7aebf2f9f 100644
--- a/include/boost/numeric/ublas/detail/iterator.hpp
+++ b/include/boost/numeric/ublas/detail/iterator.hpp
@@ -107,8 +107,12 @@ namespace boost { namespace numeric { namespace ublas {
* via the post increment operator.
*/
template<class IC, class I, class T>
- struct forward_iterator_base:
- public std::iterator<IC, T> {
+ struct forward_iterator_base {
+ typedef IC iterator_category;
+ typedef T value_type;
+ typedef std::ptrdiff_t difference_type;
+ typedef T* pointer;
+ typedef T& reference;
typedef I derived_iterator_type;
typedef T derived_value_type;
@@ -145,8 +149,12 @@ namespace boost { namespace numeric { namespace ublas {
* via the post increment and post decrement operator.
*/
template<class IC, class I, class T>
- struct bidirectional_iterator_base:
- public std::iterator<IC, T> {
+ struct bidirectional_iterator_base {
+ typedef IC iterator_category;
+ typedef T value_type;
+ typedef std::ptrdiff_t difference_type;
+ typedef T* pointer;
+ typedef T& reference;
typedef I derived_iterator_type;
typedef T derived_value_type;
@@ -200,8 +208,12 @@ namespace boost { namespace numeric { namespace ublas {
*/
template<class IC, class I, class T, class D = std::ptrdiff_t>
// ISSUE the default for D seems rather dangerous as it can easily be (silently) incorrect
- struct random_access_iterator_base:
- public std::iterator<IC, T> {
+ struct random_access_iterator_base {
+ typedef IC iterator_category;
+ typedef T value_type;
+ typedef D difference_type;
+ typedef T* pointer;
+ typedef T& reference;
typedef I derived_iterator_type;
typedef T derived_value_type;
typedef D derived_difference_type;

View File

@ -1,33 +1,27 @@
--- a/tools/build/src/tools/common.jam 2023-02-03 10:57:59.385098144 +0100
+++ b/tools/build/src/tools/common.jam 2023-02-03 11:00:34.982146918 +0100
@@ -1127,18 +1127,18 @@
import $(toolset) ;
local tool-version = [ $(toolset).get-full-version $(command) ] ;
- import version ;
- if ! [ version.version-compatible [ SPLIT_BY_CHARACTERS $(version) : . ]
- : [ SPLIT_BY_CHARACTERS $(tool-version) : . ] ]
- {
- errors.error toolset $(toolset) "initialization:"
- : version '$(version)' requested but
- '$(tool)-$(version)' not found and version
- '$(tool-version:J=.)' of default '$(command)'
- does not match
- : initialized from [ errors.nearest-user-location ]
- ;
- }
+ #import version ;
+ #if ! [ version.version-compatible [ SPLIT_BY_CHARACTERS $(version) : . ]
+ # : [ SPLIT_BY_CHARACTERS $(tool-version) : . ] ]
+ #{
+ # errors.error toolset $(toolset) "initialization:"
+ # : version '$(version)' requested but
+ # '$(tool)-$(version)' not found and version
+ # '$(tool-version:J=.)' of default '$(command)'
+ # does not match
+ # : initialized from [ errors.nearest-user-location ]
+ # ;
+ #}
--- a/tools/build/src/tools/common.jam 2019-09-18 16:03:02.035995695 +0200
+++ b/tools/build/src/tools/common.jam 2019-09-18 16:03:36.386156355 +0200
@@ -974,16 +974,16 @@
}
#3) default: no command and no version specified, try using "$(tool)"
else
# From GCC 5, versioning changes and minor becomes patch
- if $(tag) = gcc && [ numbers.less 4 $(version[1]) ]
- {
- version = $(version[1]) ;
- }
+ #if $(tag) = gcc && [ numbers.less 4 $(version[1]) ]
+ #{
+ # version = $(version[1]) ;
+ #}
# Ditto, from Clang 4
- if ( $(tag) = clang || $(tag) = clangw ) && [ numbers.less 3 $(version[1]) ]
- {
- version = $(version[1]) ;
- }
+ #if ( $(tag) = clang || $(tag) = clangw ) && [ numbers.less 3 $(version[1]) ]
+ #{
+ # version = $(version[1]) ;
+ #}
# On intel, version is not added, because it does not matter and it is the
# version of vc used as backend that matters. Ideally, we should encode the

View File

@ -0,0 +1,11 @@
--- boostcpp.jam.old 2018-08-01 22:50:40.000000000 +0200
+++ boostcpp.jam 2018-10-07 01:48:30.175912524 +0200
@@ -154,7 +154,7 @@
# libFoo.1.2.3.dylib format. AIX linkers do not accept version suffixes
# either. Pgi compilers can not accept a library with version suffix.
if $(type) = SHARED_LIB &&
- ! [ $(property-set).get <target-os> ] in windows cygwin darwin aix &&
+ ! [ $(property-set).get <target-os> ] in windows cygwin darwin aix android &&
! [ $(property-set).get <toolset> ] in pgi
{
result = $(result).$(BOOST_VERSION) ;

View File

@ -1,6 +1,6 @@
_pkgbase=boost
pkgname=boost-doc
pkgver=1.81.0
pkgver=1.80.0
_srcname=boost_${pkgver//./_}
pkgrel=1
pkgdesc='Free peer-reviewed portable C++ source libraries (HTML documentation)'
@ -9,7 +9,7 @@ arch=('x86_64')
license=('custom')
makedepends=()
source=(https://boostorg.jfrog.io/artifactory/main/release/$pkgver/source/$_srcname.tar.bz2)
sha256sums=('71feeed900fbccca04a3b4f2f84a7c217186f28a940ed8b7ed4725986baf99fa')
sha256sums=('1e19565d82e43bc59209a168f5ac899d3ba471d55c7610c677d4ccf2c9c500c0')
options=(!strip)
package() {

View File

@ -11,7 +11,7 @@
_pkgname=boost
pkgname=static-compat-$_pkgname
pkgver=1.81.0
pkgver=1.80.0
pkgrel=1
_srcname=boost_${pkgver//./_}
pkgdesc="Free peer-reviewed portable C++ source libraries"
@ -22,18 +22,13 @@ 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.bz2
boost-1.81.0-phoenix-multiple-definitions.patch
$_pkgname-ublas-c++20-iterator.patch::https://github.com/boostorg/ublas/commit/a31e5cffa85f.patch)
sha256sums=('71feeed900fbccca04a3b4f2f84a7c217186f28a940ed8b7ed4725986baf99fa'
'3ebf428ef6be090a7b56a233330375539ac429333b83708e28fe5db049cfecdb'
sha256sums=('1e19565d82e43bc59209a168f5ac899d3ba471d55c7610c677d4ccf2c9c500c0'
'aa38addb40d5f44b4a8472029b475e7e6aef1c460509eb7d8edf03491dc1b5ee')
prepare() {
cd $_srcname
# https://github.com/boostorg/phoenix/issues/111
patch -Np1 -i ../boost-1.81.0-phoenix-multiple-definitions.patch
# https://github.com/boostorg/ublas/pull/97
patch -Np2 -i ../$_pkgname-ublas-c++20-iterator.patch
}

View File

@ -1 +0,0 @@
../android-aarch64/boost-1.81.0-phoenix-multiple-definitions.patch

View File

@ -1,17 +1,17 @@
# Maintainer in AUR: drakkan <nicola.murino at gmail dot com>
# Maintainer of AUR version: drakkan <nicola.murino at gmail dot com>
# This version includes the static library as well (in contrast
# to the version found in the AUR).
# This version removes the -R flag from the pkg-config file (required to build Qt 6
# which relies on the pkg-config file).
pkgname=mingw-w64-brotli
_pkgname=brotli
_gitcommit=ed738e842d2fbdf2d6459e39267a633c4a9b2f5d
pkgver=1.1.0
_gitcommit=e61745a6b7add50d380cfd7d3883dd6c62fc2c71
pkgver=1.0.9
pkgrel=2
pkgdesc='Brotli compression library (mingw-w64)'
arch=('any')
license=('MIT')
url='https://github.com/google/brotli.git'
url='https://github.com/google/brotli'
depends=('mingw-w64-gcc')
makedepends=('mingw-w64-cmake' 'git')
options=('!buildflags' '!strip' 'staticlibs')
@ -29,11 +29,7 @@ build() {
for _arch in ${_architectures}; do
cd "$srcdir"/${_pkgname}
mkdir -p build-${_arch} && pushd build-${_arch}
${_arch}-cmake -DBUILD_SHARED_LIBS=ON ..
make
popd
mkdir -p build-${_arch}-static && pushd build-${_arch}-static
${_arch}-cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=/usr/$_arch/static ..
${_arch}-cmake ..
make
popd
done
@ -41,9 +37,8 @@ build() {
package() {
for _arch in ${_architectures}; do
make -C "${srcdir}/${_pkgname}/build-${_arch}-static" DESTDIR="${pkgdir}" install
make -C "${srcdir}/${_pkgname}/build-${_arch}" DESTDIR="${pkgdir}" install
ln -s --verbose --relative --target-directory="$pkgdir"/usr/${_arch}/lib "$pkgdir"/usr/${_arch}/static/lib/*.a
cd "${srcdir}/${_pkgname}/build-${_arch}"
make DESTDIR="${pkgdir}" install
find "${pkgdir}/usr/${_arch}" -name "*.exe" -exec ${_arch}-strip --strip-all {} \;
${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.dll
${_arch}-strip -g "$pkgdir"/usr/${_arch}/lib/*.a

View File

@ -5,9 +5,9 @@
# Contributor: Guillaume Horel <guillaume.horel@gmail.com>
pkgname=static-compat-brotli
_gitcommit=ed738e842d2fbdf2d6459e39267a633c4a9b2f5d
pkgver=1.1.0
pkgrel=2
_gitcommit=e61745a6b7add50d380cfd7d3883dd6c62fc2c71
pkgver=1.0.9
pkgrel=1
pkgdesc='Generic-purpose lossless compression algorithm'
url='https://github.com/google/brotli'
arch=('x86_64')
@ -18,6 +18,11 @@ 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'
@ -28,20 +33,22 @@ build() {
cd ${pkgbase}
static-compat-cmake -B build \
-DCMAKE_BUILD_TYPE=Release
cmake --build build -v
make -C build VERBOSE=1
}
check() {
source static-compat-environment
cd ${pkgbase}
cd build
ctest --output-on-failure --stop-on-failure -j$(nproc)
make test
}
package() {
source static-compat-environment
cd ${pkgbase}
DESTDIR="$pkgdir" cmake --install build
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"
}

View File

@ -1,18 +0,0 @@
pkgname=buildenv
pkgver=1
pkgrel=2
pkgdesc='Build environment for my Arch Linux package builds'
arch=('any')
license=('GPL-2.0-or-later')
url='https://github.com/Martchus/PKGBUILDs'
depends=('base-devel' 'multilib-devel')
source=(android.sh parallel.sh)
sha256sums=(SKIP SKIP)
package() {
cd "$srcdir"
mkdir -p "$pkgdir/usr/share/makepkg/buildenv"
for src in android parallel; do
cp -v "$src.sh" "$pkgdir/usr/share/makepkg/buildenv/$src.sh"
done
}

View File

@ -1,12 +0,0 @@
#!/usr/bin/bash
[[ -n "$LIBMAKEPKG_BUILDENV_ANDROID_SH" ]] && return
LIBMAKEPKG_BUILDENV_ANDROID_SH=1
buildenv_functions+=('buildenv_android')
buildenv_vars+=('ANDROID_MINIMUM_PLATFORM')
buildenv_android() {
# set minimum Android version to Android 7.0
ANDROID_MINIMUM_PLATFORM=24
}

View File

@ -1,10 +0,0 @@
#!/usr/bin/bash
[[ -n "$LIBMAKEPKG_BUILDENV_PARALLEL_SH" ]] && return
LIBMAKEPKG_BUILDENV_PARALLEL_SH=1
buildenv_functions+=('buildenv_parallel')
buildenv_parallel() {
[[ $MAKEFLAGS ]] || MAKEFLAGS=-j$(nproc)
}

View File

@ -5,7 +5,7 @@
_reponame=cpp-utilities
pkgname=c++utilities
pkgver=5.24.8
pkgver=5.20.0
pkgrel=1
arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64')
pkgdesc='Common C++ classes and routines such as argument parser, IO and conversion utilities'
@ -17,7 +17,7 @@ checkdepends=('cppunit')
provides=(libc++utilities.so)
url="https://github.com/Martchus/${_reponame}"
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/Martchus/${_reponame}/archive/v${pkgver}.tar.gz")
sha256sums=('2175b45a53f5c71bb022aea1409535a82b115ce76dbcc5123b3be39f8557858a')
sha256sums=('0aeebdaab93ebdb70f5e77f008e229db765da8575989842dbe4cbe20f3dc08e7')
build() {
cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}"

View File

@ -6,7 +6,7 @@
_name=c++utilities
_reponame=cpp-utilities
pkgname=$_name-doc
pkgver=5.24.8
pkgver=5.20.0
pkgrel=1
arch=('any')
pkgdesc='Common C++ classes and routines such as argument parser, IO and conversion utilities (API documentation)'
@ -14,7 +14,7 @@ license=('GPL')
makedepends=('cmake' 'ninja' 'doxygen' 'graphviz')
url="https://github.com/Martchus/${_reponame}"
source=("${_name}-${pkgver}.tar.gz::https://github.com/Martchus/${_reponame}/archive/v${pkgver}.tar.gz")
sha256sums=('2175b45a53f5c71bb022aea1409535a82b115ce76dbcc5123b3be39f8557858a')
sha256sums=('0aeebdaab93ebdb70f5e77f008e229db765da8575989842dbe4cbe20f3dc08e7')
build() {
cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}"

View File

@ -6,18 +6,18 @@
_reponame=cpp-utilities
pkgname=mingw-w64-c++utilities
_name=${pkgname#mingw-w64-}
pkgver=5.24.8
pkgver=5.20.0
pkgrel=1
arch=('any')
pkgdesc='Common C++ classes and routines such as argument parser, IO and conversion utilities (mingw-w64)'
license=('GPL')
depends=('mingw-w64-crt' 'mingw-w64-libiconv' 'mingw-w64-boost')
depends=('mingw-w64-crt' 'mingw-w64-libiconv')
optdepends=("$_name-doc: API documentation")
checkdepends=('mingw-w64-cppunit' 'mingw-w64-wine')
makedepends=('mingw-w64-gcc' 'mingw-w64-cmake' 'ninja')
url="https://github.com/Martchus/${_reponame}"
source=("${_name}-${pkgver}.tar.gz::https://github.com/Martchus/${_reponame}/archive/v${pkgver}.tar.gz")
sha256sums=('2175b45a53f5c71bb022aea1409535a82b115ce76dbcc5123b3be39f8557858a')
sha256sums=('0aeebdaab93ebdb70f5e77f008e229db765da8575989842dbe4cbe20f3dc08e7')
options=(!buildflags staticlibs !strip !emptydirs)
_architectures=('i686-w64-mingw32' 'x86_64-w64-mingw32')

View File

@ -6,7 +6,7 @@
_reponame=cpp-utilities
pkgname=static-compat-c++utilities
_name=${pkgname#static-compat-}
pkgver=5.24.8
pkgver=5.20.0
pkgrel=1
arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64')
pkgdesc='Common C++ classes and routines such as argument parser, IO and conversion utilities'
@ -17,7 +17,7 @@ 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=('2175b45a53f5c71bb022aea1409535a82b115ce76dbcc5123b3be39f8557858a')
sha256sums=('0aeebdaab93ebdb70f5e77f008e229db765da8575989842dbe4cbe20f3dc08e7')
prepare() {
cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}"

View File

@ -5,14 +5,13 @@
pkgname=cmake-format
pkgver=0.6.13
pkgrel=3
pkgrel=2
pkgdesc='Source code formatter for CMake listfiles'
arch=('any')
url='https://github.com/cheshirekow/cmake_format'
license=('GPL-3.0-or-later')
depends=('python-six>=1.13.0')
makedepends=('python-setuptools')
optdepends=('python-yaml>=5.3: YAML config files' 'python-jinja>=2.10.3: complete HTML annotation' 'python-argcomplete: automatic shell completion')
license=('GPL3')
depends=('python-setuptools' 'python-six>=1.13.0')
optdepends=('python-yaml>=5.3' 'python-jinja>=2.10.3' 'python-argcomplete: automatic shell completion')
checkdepends=('cmake')
provides=('python-cmakelang')
conflicts=('python-cmakelang')

View File

@ -1,6 +1,6 @@
pkgname=mingw-w64-cmake-static
pkgver=1
pkgrel=4
pkgrel=2
arch=('any')
pkgdesc='CMake wrapper for MinGW (mingw-w64, static)'
depends=('mingw-w64-cmake')

View File

@ -5,8 +5,7 @@
include("/usr/share/mingw/toolchain-@TRIPLE@.cmake")
# prefer libraries from "static" sub-prefix
set(CMAKE_STATIC_PREFIX "/usr/@TRIPLE@/static")
set(CMAKE_FIND_ROOT_PATH "${CMAKE_STATIC_PREFIX};${CMAKE_FIND_ROOT_PATH}")
set(CMAKE_FIND_ROOT_PATH "/usr/@TRIPLE@/static;${CMAKE_FIND_ROOT_PATH}")
# prefer static libraries
# note: It is of no use to set the real variable CMAKE_FIND_LIBRARY_SUFFIXES here because it gets overridden by CMake
@ -22,16 +21,13 @@ set(BOOST_USE_STATIC_LIBS ON)
set(Vulkan_LIBRARY "/usr/@TRIPLE@/lib/libvulkan.dll.a" CACHE FILEPATH "shared Vulkan IDC library")
# workaround limitations in upstream pkg-config files and CMake find modules
set(pkgcfg_lib_libbrotlicommon_brotlicommon "${CMAKE_STATIC_PREFIX}/lib/libbrotlicommon.a" CACHE INTERNAL "static libbrotlicommon")
set(pkgcfg_lib_libbrotlienc_brotlienc "${CMAKE_STATIC_PREFIX}/lib/libbrotlienc.a;${CMAKE_STATIC_PREFIX}/lib/libbrotlicommon.a" CACHE INTERNAL "static libbrotliend")
set(pkgcfg_lib_libbrotlidec_brotlidec "${CMAKE_STATIC_PREFIX}/lib/libbrotlidec.a;${CMAKE_STATIC_PREFIX}/lib/libbrotlicommon.a" CACHE INTERNAL "static libbrotlidec")
set(pkgcfg_lib_libbrotlicommon_brotlicommon "/usr/@TRIPLE@/lib/libbrotlicommon-static.a" CACHE INTERNAL "static libbrotlicommon")
set(pkgcfg_lib_libbrotlienc_brotlienc "/usr/@TRIPLE@/lib/libbrotlienc-static.a;/usr/@TRIPLE@/lib/libbrotlicommon-static.a" CACHE INTERNAL "static libbrotliend")
set(pkgcfg_lib_libbrotlidec_brotlidec "/usr/@TRIPLE@/lib/libbrotlidec-static.a;/usr/@TRIPLE@/lib/libbrotlicommon-static.a" CACHE INTERNAL "static libbrotlidec")
set(libbrotlicommon_STATIC_LDFLAGS "${pkgcfg_lib_libbrotlicommon_brotlicommon}" CACHE INTERNAL "static libbrotlicommon")
set(libbrotlienc_STATIC_LDFLAGS "${pkgcfg_lib_libbrotlienc_brotlienc}" CACHE INTERNAL "static libbrotliend")
set(libbrotlidec_STATIC_LDFLAGS "${pkgcfg_lib_libbrotlidec_brotlidec}" CACHE INTERNAL "static libbrotlidec")
# disable use of find modules that don't work for static libraries
set(CMAKE_DISABLE_FIND_PACKAGE_harfbuzz TRUE)
# define dependencies of various static libraries as CMake doesn't pull them reliably automatically
# note: It would be possible to deduce the dependencies via pkg-config. However, for simplicity I'm hard-coding the dependencies for now.
# In some cases the pkg-config file wouldn't work anyways because it is only covering the shared version (despite use of `-static`).
@ -40,6 +36,6 @@ set(POSTGRESQL_DEPENDENCIES "-lpgcommon;-lpgport;-lintl;-lssl;-lcrypto;-lshell32
set(MYSQL_DEPENDENCIES "-lssl;-lcrypto;-lshlwapi;-lgdi32;-lws2_32;-lpthread;-lz;-lm" CACHE INTERNAL "dependencies of static MySQL/MariaDB libraries")
set(LIBPNG_DEPENDENCIES "-lz" CACHE INTERNAL "dependencies of static libpng")
set(GLIB2_DEPENDENCIES "-lintl;-lws2_32;-lole32;-lwinmm;-lshlwapi;-lm" CACHE INTERNAL "dependencies of static Glib2")
set(FREETYPE_DEPENDENCIES "-lbz2;-lharfbuzz;-lfreetype;-lbrotlidec;-lbrotlicommon" CACHE INTERNAL "dependencies of static FreeType2 library")
set(FREETYPE_DEPENDENCIES "-lbz2;-lharfbuzz;-lfreetype;-lbrotlidec-static;-lbrotlicommon-static" CACHE INTERNAL "dependencies of static FreeType2 library")
set(HARFBUZZ_DEPENDENCIES "-lglib-2.0;${GLIB2_DEPENDENCIES};-lintl;-lm;-lfreetype;-lgraphite2" CACHE INTERNAL "dependencies of static HarfBuzz library")
set(DBUS1_DEPENDENCIES "-lws2_32;-liphlpapi;-ldbghelp" CACHE INTERNAL "dependencies of static D-Bus1 library")

View File

@ -1,6 +1,6 @@
pkgname=static-compat-cmake
pkgver=1
pkgrel=2
pkgrel=1
arch=('any')
pkgdesc="CMake wrapper to use gcc-static-compat"
depends=('cmake' 'static-compat-environment')

View File

@ -5,13 +5,9 @@ set (CMAKE_SYSTEM_PROCESSOR @PROCESSOR@)
set (CMAKE_C_COMPILER @PREFIX@/bin/gcc)
set (CMAKE_CXX_COMPILER @PREFIX@/bin/g++)
# specify the root path of the target environment
# 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)
# disable use of find modules that don't work for static libraries
set(CMAKE_DISABLE_FIND_PACKAGE_harfbuzz TRUE)

View File

@ -1,80 +0,0 @@
# Maintainer: Martchus <martchus@gmx.net>
# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where
# you also find the URL of a binary repository.
_realname=cppwinrt
pkgname=mingw-w64-${_realname}
pkgver=2.0.240111.5
_windows_rs_ver=0.52.0
pkgrel=1
arch=('any')
pkgdesc='C++ language projection for Windows Runtime (WinRT) APIs (mingw-w64)'
url='https://aka.ms/cppwinrt'
license=('spdx:MIT')
depends=('mingw-w64-crt')
makedepends=('mingw-w64-gcc' 'mingw-w64-cmake' 'mingw-w64-wine' 'ninja' 'git')
source=("https://github.com/microsoft/cppwinrt/archive/${pkgver}/${_realname}-${pkgver}.tar.gz"
"https://github.com/microsoft/windows-rs/archive/${_windows_rs_ver}/windows-rs-${_windows_rs_ver}.tar.gz")
sha256sums=('5ec49e9de3467161ef93185f0c627be6ed37200f19e18ac79e29e47fbeb69d0d'
'fa6f1ad3677ee46ded34ad8811fc365a783d9aa414206a60b52dff261db85ef3')
options=(!buildflags staticlibs !strip !emptydirs)
_architectures=('i686-w64-mingw32' 'x86_64-w64-mingw32')
build() {
cd ${_realname}-${pkgver}
for _arch in "${_architectures[@]}"; do
mkdir -p "build-${_arch}" && pushd "build-${_arch}"
# build cppwinrt.exe
${_arch}-cmake \
-G Ninja \
-DCMAKE_BUILD_TYPE:STRING='Release' \
-DCMAKE_INSTALL_PREFIX="/usr/${_arch}" \
-DCPPWINRT_BUILD_VERSION="${pkgver}" \
-DBUILD_TESTING=OFF \
../
cmake --build .
# add Windows metadata
# note: The metadata comes from https://github.com/microsoft/win32metadata. However, at this point
# this build script cannot make use of that. Instead, one has to just point it to the metadata files
# usually found under C:/Windows/System32/WinMetadata via the WIN_METADATA environment variable.
input=()
if [[ -d $WIN_METADATA ]]; then
ln -s "$WIN_METADATA" win-metadata
input+=(-input win-metadata)
else
echo "You need to provide metadata files usually found under C:/Windows/System32/WinMetadata on a
Windows system and point this build script to it via the WIN_METADATA environment variable.
Otherwise this package will not contain all headers that are required by e.g. Qt 6."
fi
# add rust metadata provided by https://github.com/microsoft/windows-rs
echo "SPDX-License-Identifier: MIT OR Apache-2.0
SPDX-FileCopyrightText: Copyright (c) Microsoft Corporation
Generated using .winmd files from https://github.com/microsoft/windows-rs
" > license.txt
ln -s "${srcdir}/windows-rs-${_windows_rs_ver}/crates/libs/bindgen/default" rust-metadata
input+=(-license license.txt -input rust-metadata)
# generate headers using cppwinrt.exe
${_arch}-wine cppwinrt.exe "${input[@]}" -output "output"
popd
done
}
package() {
cd ${_realname}-${pkgver}
for _arch in "${_architectures[@]}"; do
pushd "build-${_arch}"
DESTDIR="${pkgdir}" cmake --install .
mkdir "${pkgdir}/usr/${_arch}/include"
cp -vr --target-directory="${pkgdir}/usr/${_arch}/include" output/*
${_arch}-strip --strip-all "$pkgdir"/usr/${_arch}/bin/*.exe
popd
done
install -Dm644 "${srcdir}/${_realname}-${pkgver}/LICENSE" "${pkgdir}/share/licenses/${pkgname}/LICENSE"
}

View File

@ -5,7 +5,7 @@
_pkgname=dbus
pkgname=static-compat-$_pkgname
pkgver=1.14.4
pkgver=1.14.0
pkgrel=1
pkgdesc="Freedesktop.org message bus system"
url="https://wiki.freedesktop.org/www/Software/dbus/"
@ -25,7 +25,7 @@ prepare() {
cd dbus
# Allow us to enable checks without them being fatal
git apply -3 ../no-fatal-warnings.diff
patch -Np1 -i ../no-fatal-warnings.diff
NOCONFIGURE=1 ./autogen.sh
}
@ -71,4 +71,4 @@ package() {
install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 dbus/COPYING
}
# vim:set sw=2 sts=-1 et:
# vim:set sw=2 et:

View File

@ -24,6 +24,7 @@ for pkgbuild_file in "${PKGBUILD_DIR:-.}"/*/*/PKGBUILD; do
|| $project_name == 'qt5-webview' # does not build for Windows, would require qt5-webengine
|| $project_name == 'qt5-canvas3d' # removed from official releases
|| $project_name == 'qt5-script' # extra case (still released, not on KDE branch)
|| $project_name == 'qt6-3d' # removed in beta1
|| $variant == 'mingw-w64-test' # just our own 'test' package (not used anymore)
]] && continue

View File

@ -2,16 +2,13 @@ FROM archlinux:base as base
MAINTAINER Martchus <martchus@gmx.net>
RUN mkdir -p /startdir /build && \
groupadd -g 1000 builduser && \
useradd -m -d /build -u 1000 -g 1000 -s /bin/bash builduser && \
chown -R builduser:builduser /startdir /build && \
echo 'builduser ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && \
useradd -m -d /build -u 1000 -U -s /bin/bash builduser && \
chown -R builduser:builduser /build && \
pacman-key --init && \
pacman-key --recv-keys B9E36A7275FC61B464B67907E06FE8F53CDC6A4C && \
pacman-key --finger B9E36A7275FC61B464B67907E06FE8F53CDC6A4C && \
pacman-key --lsign-key B9E36A7275FC61B464B67907E06FE8F53CDC6A4C && \
pacman -Sy --verbose --noconfirm --needed archlinux-keyring && \
pacman -Syu --verbose --noconfirm --needed base-devel pacman-contrib ccache && \
pacman -Syu --noconfirm --needed base-devel pacman-contrib ccache && \
pacman -Scc --noconfirm && \
paccache -r -k0 && \
rm -rf /usr/share/man/* /tmp/* /var/tmp/*

View File

@ -2,4 +2,5 @@
set -e
export LOGDEST=$PWD SRCPKGDEST=$PWD SRCDEST=$PWD PKGDEST=$PWD BUILDDIR=/build
export BUILDTOOL=makecontainerbuild BUILDTOOLVER="0.0.1"
exec
chown builduser:builduser "$PWD"
sudo --preserve-env=LOGDEST,SRCPKGDEST,SRCDEST,PKGDEST,BUILDDIR,BUILDTOOL,BUILDTOOLVER --user builduser makepkg

View File

@ -1,8 +1,7 @@
#!/bin/bash
set -e
[ "$(whoami)" == root ] && sudo= || sudo=sudo
for config_file in {/cfg/,}{makepkg,pacman}.conf; do
[[ -f $config_file ]] && $sudo cp --target-directory=/etc "$config_file"
for config_file in {makepkg,pacman}.conf; do
[[ -f $config_file ]] && cp --target-directory=/etc "$config_file"
done
[[ -f PKGBUILD ]] && source PKGBUILD
$sudo pacman -Syu --noconfirm --needed "${depends[@]}" "${makedepends[@]}" "${checkdepends[@]}"
source PKGBUILD
pacman -Syu --noconfirm --needed "${depends[@]}" "${makedepends[@]}" "${checkdepends[@]}"

View File

@ -1,19 +0,0 @@
#!/bin/bash
dev_dir=/hdd
bindir=$(dirname "$0")
# create a directory to store builds and new container and start it
mkdir -p "$dev_dir/build/container"
# create container sharing pacman cache, chroot directory and build and source directory with host
podman container create -it \
--name archlinux-devel-container \
-v "$dev_dir/cache/pacman/pkg:/var/cache/pacman/pkg" \
-v "$dev_dir/build/container:/build" \
-v "$dev_dir/projects:/src" \
-v "$dev_dir/chroot/remote-config-x86_64:/cfg" \
archlinux-base-devel
# configure pacman to use config from mounted directory
podman container start archlinux-devel-container
podman container exec archlinux-devel-container bash -c "$(cat "$bindir/containersync")"

View File

@ -1,5 +1,4 @@
#!/bin/bash
set -e
bindir=$(dirname "$0")
${CRE:-docker} image pull archlinux
${CRE:-docker} image build --no-cache --tag "${CRE_IMAGE:-archlinux-base-devel}" "$bindir/base-devel"
${CRE:-docker} image build --tag "${CRE_IMAGE:-archlinux-base-devel}" "$bindir/base-devel"

View File

@ -1,47 +1,13 @@
#!/bin/bash
set -e
# make tool to invoke configurable via environment variable to be able to invoke
# other tools like `repo-add` or `updpkgsums` as well
tool=${TOOL:-makepkg}
[[ $tool == 'makepkg' ]] && single_run= no_sync= || single_run=1 no_sync=1
# make basic arguments for cre
if [[ $CONTAINER ]]; then
name=$CONTAINER
else
if [[ $PKGNAME ]]; then
pkgname=$PKGNAME
else
source PKGBUILD
pkgname=$(echo "$pkgname" | tr '+' 'p')
fi
uuid=$(cat /proc/sys/kernel/random/uuid)
name=$tool-$pkgname-$uuid
fi
cre_args=(--name "$name" --workdir "/startdir" -v "$PWD":/startdir -it)
cre_rm_args=(--force)
# use "builduser" that has been created via the Dockerfile
uid=1000 gid=1000
if [[ $CRE == 'podman' ]]; then
cre_args+=(--userns="keep-id:uid=$uid,gid=$gid")
cre_rm_args+=(--time 0)
else
cre_args+=(--user="$uid:$gid")
# caveat: In contrast to Podman this gives a wrong gid for newly created files by
# default. Maybe it would help to pass `--userns-remap=…` to `dockerd`.
fi
# parse arguments
script_args= read_script_args=
cre_args=(--workdir "/startdir" -v "$PWD":/startdir --rm)
script_args= read_script_args= no_sync=
for arg in "$@"; do
if [[ $read_script_args ]]; then
if [[ $arg == '--nodeps' ]] || [[ $arg == '-d' ]]; then
no_sync=1
elif [[ $arg == '--printsrcinfo' ]] || [[ $arg == '--help' ]] || [[ $arg == '-h' ]]; then
no_sync=1
single_run=1
fi
script_args+=" '$arg'"
else
@ -53,18 +19,6 @@ for arg in "$@"; do
fi
done
# add arguments from environment
if [[ $PACMAN_PKG_CACHE_DIR ]]; then
cre_args+=(-v "$PACMAN_PKG_CACHE_DIR":/var/cache/pacman/pkg)
fi
if [[ $CONTAINER_BUILD_CFG_DIR ]]; then
cre_args+=(-v "$CONTAINER_BUILD_CFG_DIR":/cfg)
fi
if [[ $CONTAINER_BUILD_CCACHE_DIR ]]; then
cre_args+=(-v "$CONTAINER_BUILD_CCACHE_DIR":/ccache)
script_args+=' CCACHE_DIR=/ccache'
fi
# load "containerbuild" and "containersync" script
bindir=$(dirname "$0")
script=$(cat "$bindir/containerbuild")
@ -72,31 +26,9 @@ if ! [[ $no_sync ]]; then
script_sync=$(cat "$bindir/containersync")
fi
# invoke containerized build
ec=0 cre=${CRE:-docker}
if ! [[ $CONTAINER ]]; then
image=${CRE_IMAGE:-archlinux-base-devel}
if [[ $single_run ]]; then
"$cre" container run "${cre_args[@]}" "$image" bash \
-c "$script_sync $script '$tool' $script_args" || ec=$?
exit $ec
fi
"$cre" container create "${cre_args[@]}" "$image"
"$cre" container start "$name"
# allow one to prevent the container from stopping via DEBUG variable
if [[ $DEBUG ]]; then
script_args+=' ; sleep infinity'
fi
"$cre" container exec "$name" bash \
-c "$script_sync $script '$tool' $script_args" || ec=$?
# stop and remove container unless we want to keep it for debugging
[[ $ec == 0 && $DEBUG == on-failure || -z $DEBUG ]] && \
"$cre" container rm "${cre_rm_args[@]}" "$name"
# log message about commands to use for investigation
[[ $ec != 0 ]] && [[ $DEBUG ]] && echo \
"You may investigate the failure via:
$cre exec -it '$name' bash
$cre mount '$name'
You may retry the build using the same container again via:
CONTAINER='$name' DEBUG='$DEBUG' $0 $@"
exit $ec
${CRE:-docker} run "${cre_args[@]}" "${CRE_IMAGE:-archlinux-base-devel}" bash -c "$script_sync $script $script_args"

View File

@ -10,16 +10,12 @@ arch_pkgbuilds=$1
echo "expected version: $expected_version"
for pkgbuild in qt5-*/PKGBUILD ; do
git -C "${pkgbuild%/PKGBUILD}" pull --rebase origin main
done
for pkgbuild in qt5-*/PKGBUILD ; do
for pkgbuild in qt5-*/trunk/PKGBUILD ; do
source "$pkgbuild"
if [[ $pkgname != qt5-doc ]] && [[ $pkgver =~ $expected_version ]] && [[ $_commit ]]; then
if [[ $pkgver == "${versions[qt5]}" ]]; then
pkgver=0
fi
fi
echo "${pkgname##qt5-} => [${pkgver##*+r}, '$_commit']",
fi
done

View File

@ -1,5 +1,6 @@
#!/usr/bin/perl
use Encode 'encode';
use FindBin;
use Mojolicious;
use Mojo::File 'path';
@ -76,43 +77,43 @@ $mojolicious->helper(expand_libs => sub {
# define revisions of Qt modules from KDE fork
my %kde_fork_revisions = (
# module => [rev, 'commit on KDE fork', 'version bump to be reverted'],
activeqt => [0, '014285857ef1cfb2d9965cf7bad871bbc336ce60'],
winextras => [0, 'e6a85ae3306867400b8700600152949656eb21f7'],
'3d' => [0, '67bee4599a28e1cadc14ed9ea4adc7061e250b90'],
base => [138, 'b9906b5233a80cab372c95ac4dd68b25bdca0646'],
charts => [0, '3f3f14d69a509c3e8027bfb5d7ffca9b4f3ef003'],
connectivity => [4, '8024ef3d7269665ba104f528e5e284df9d9d8ae9'],
datavis3d => [0, '6ac6d23a8f558f36f1162b419858cc44dccd4d2b'],
declarative => [30, 'b99568135aa60de96ca2e121dc2e8d83fb1ca886'],
gamepad => [0, '44255e2ae53a14e9a3fb671da0782ec5d396220a'],
graphicaleffects => [0, '895f9753940156dda05aa83d3c7655571514407e'],
imageformats => [7, '63ec444cc7b30c45d4c8beb2c1071a1157d689eb'],
location => [6, 'c576985da4e6a4a0b85d5229263777e7197494e0'],
lottie => [0, '62f17bbc0ae8649178ac484afc434dbad16d6351'],
multimedia => [2, '7514352532f41d9f0f8b8d722e360b1854442731'],
networkauth => [0, 'ed2291d454fac207f6b1555d30b9227e51be611b'],
purchasing => [0, '7f4ead6f3e6431acee63987a0a1753ff140ac2d2'],
quick3d => [1, 'a0c37ca7615e95d69bcf6de8f19607bd46e8c37a'],
quickcontrols => [0, '77fbfa8d313bbdb8fb762f15dd6173a067be55e3'],
quickcontrols2 => [5, '1fc98160580fc7b791e20d34ba986c9992cae9c5'],
quicktimeline => [0, '29394e35db43acb20e7b4d5e978a733f5b4232a6'],
remoteobjects => [0, '18ef1cdce7bc4c93415f38f1c220ab697aa75908'],
scxml => [0, '6074956c2089dd0507d2930c638fa8c930f4e21c'],
sensors => [0, '7f8b55744f87155a4979dd8ba405bd7feec03042'],
serialbus => [0, '5efce7d821bad2f5db95ff3ada5eeddccbb58920'],
serialport => [0, 'fc0b6affe244e40366bd624d6e01c62712568eb8'],
speech => [1, '9b3738febbc751820ede496e8d619c5be56548dc'],
svg => [6, '080fed6443e9e7b2ad30e61f31163e9481dfad0f'],
tools => [4, 'ba4c633c4a4731ead0c376b908bf5449796f7de1'],
translations => [0, '40aabebd04a30ccef374bf20a7bfaa1d8d665b7f'],
virtualkeyboard => [0, '80565aa7fc37ecdb1c08e585d4ae3060618e3338'],
wayland => [60, '9c82b5461736f59a06923ab68c6f7584ecab4f77'],
webchannel => [3, 'c78ad286a90e3d7986292b4a6036a9927bbc155f'],
webglplugin => [0, '80257933d3bf3a026455d71106e6b3e70dead765'],
websockets => [2, '2c2b7691ae231f43129d7f2b43984c30883ca4b1'],
webview => [0, '3d9289d73c5c03ed5b2fe246589d0d81cfdaa22e'],
x11extras => [0, '415ac0d58521be2bb00ef4cecdb16f0b9001e88c'],
xmlpatterns => [0, 'eb59017f04b44667e0c6778aa3995f8e86c98e48'],
activeqt => [0, '80b43bfe4109820fb7feddb4a16e227a03bc1c4e'],
winextras => [0, '2a04b162451460ffc208c2c27acce16a18f763ce'],
'3d' => [6, '0ff905d194e273e04e95b72dbbfd4e58193ecbaa'],
base => [168, '08be11284246455bce4455138ebe396d2d8732a1'],
charts => [0, '055c6d6e49c5ea369990e7078fd534392a0ba6b9'],
connectivity => [5, '6796953f92a1d3af30d0676e56ec5dfd82199611'],
datavis3d => [0, '8e1a57efa1ba3eabbf44098ce6ede3d130c57b5d'],
declarative => [18, '45d43c04088efb8346979f633f72bb1f23183461'],
gamepad => [0, 'ce0202d67bf1ab2bb887f58122b20eab5b6c1d5d'],
graphicaleffects => [0, 'a2b1600300cda89804d48ec90e0068a075fecc8b'],
imageformats => [5, '1b83a9c73d6e5459ec4c2221b2bd7e5396b5e874'],
location => [3, 'f920a6cc2931402023840c223fce2fed321e28ea'],
lottie => [0, '8bb9237e4e1462f405d931a8a513ed4c27632d9e'],
multimedia => [1, 'f3dc18968c437c993886d3bfb668b62344a10860'],
networkauth => [0, 'f34ac77b5955126be60faa2b801be2d19dff896f'],
purchasing => [0, '25ead89b0834f669e0a193e6d6cf2da25d33a452'],
quick3d => [1, '95f52cb212f66e6022661fb7f2eb81a8c21e9f22'],
quickcontrols => [0, 'c7dae5f6041d6c076311f2d8ed13fcfe3598be70'],
quickcontrols2 => [5, '9ff77702cc3649cbaf94046742d682d77cdea698'],
quicktimeline => [0, 'e2438e010a98d731317c10a64c095e0282b51ab0'],
remoteobjects => [0, '5f2a598a9134167a0da2efcbf1249fc167ae3750'],
scxml => [0, 'e1faea1db52b91d90ef64dd57eb6529e323b5526'],
sensors => [0, '5f1f73fdba8906f58c4554cbef9c1a72edcf0230'],
serialbus => [0, '180cb13048a24510f9a1b20796772d27da762bdd'],
serialport => [0, '966cf2a2077a8470715894363ad46ea7df0665fa'],
speech => [1, 'd32f4a479d38a11f547598004b975f4356424a16'],
svg => [9, '83296f10ebdb9a666b11dc69f3a148c38b9c425c'],
tools => [1, 'c4750dd02070ce246ff98cc5d137193825043912'],
translations => [0, 'c38edd3a5501bcd53132e1e4abb7d25a98e0e1a9'],
virtualkeyboard => [0, '8aebadb96c1e57ba89bba2e5962399f676207a32'],
wayland => [49, '9c607c771acdb3d820be7f112db99213a6c6d7eb'],
webchannel => [3, '4e35fe9429920067c17596986b486fb1c1e95db0'],
webglplugin => [0, '3087cdd0758258163299602550f7d4e72edf2a80'],
websockets => [2, '594477769ecac4032ba116196493f3ba3db1aaed'],
webview => [0, 'b1605fea61a6bbb599b720c54282bc8ddb0aacf0'],
x11extras => [0, '9134cdba9386e408ce2ffe515ca0c3f6f6c66685'],
xmlpatterns => [0, 'b798a0f0265538a9dd12b5c7e4dad84ba8e1db4e'],
);
# $rev := git rev-list --count v5.15.2..$commit_on_kde_fork
@ -264,5 +265,5 @@ for my $page (@pages) {
$controller->stash($template_stash_variables) if defined $template_stash_variables;
my $output = $controller->render_to_string(%$template_params);
$log->debug($output);
$output_file->spew($output, 'UTF-8');
$output_file->spurt(encode('UTF-8', $output));
}

View File

@ -14,18 +14,18 @@
_android_arch=<%= $variant_prefix_part =~ s/android-// && $variant_prefix_part %>
pkgname=<%= $package_name %>
_qtver=6.7.0
_qtver=6.4.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 (android)'
depends=('java-runtime-headless-openjdk>=11' 'ant' 'android-ndk' 'android-sdk' 'android-sdk-build-tools'
depends=('java-runtime-headless-openjdk=8' 'ant' 'android-ndk' 'android-sdk' 'android-sdk-build-tools'
'android-sdk-platform-tools' 'android-platform' "android-${_android_arch}-libjpeg-turbo"
"android-${_android_arch}-libpng" "android-${_android_arch}-openssl" "android-${_android_arch}-zlib")
makedepends=('android-cmake<%= $static_suffix %>' 'android-pkg-config'
'java-environment-openjdk=17' 'qt6-base' 'ninja')
'java-environment-openjdk=8' 'qt6-base' 'ninja')
optdepends=('qt6-base: development tools')
options=('!strip' '!buildflags' 'staticlibs' '!emptydirs')
groups=(android-${_android_arch}-qt6)
@ -51,7 +51,6 @@ prepare () {
% }
build() {
export PATH=/usr/lib/jvm/java-17-openjdk/bin:$PATH
source android-env ${_android_arch}
android-${_android_arch}-cmake<%== $static_suffix %> -G Ninja -B build-$_android_arch -S $_pkgfqn \\
% if ($static_variant) {

View File

@ -32,7 +32,6 @@ prepare () {
% }
build() {
export PATH=/usr/lib/jvm/java-17-openjdk/bin:$PATH
source android-env ${_android_arch}
<%== content_for 'before_build_config' %>\
android-${_android_arch}-cmake<%== $static_suffix %> -G Ninja -B build-$_android_arch -S $_pkgfqn \\

View File

@ -31,7 +31,7 @@
_qt_module=qt<%== $qt_module %>
pkgname=<%= $package_name %>
pkgver=5.15.13<%== $kde_fork_revision ? "+kde+r$kde_fork_revision->[0]" : '' %>
pkgver=5.15.7<%== $kde_fork_revision ? "+kde+r$kde_fork_revision->[0]" : '' %>
pkgrel=1
% if ($kde_fork_revision) {
_basever=${pkgver%%+*}
@ -43,7 +43,7 @@ url='https://www.qt.io/'
license=('GPL3' 'LGPL3' 'FDL' 'custom')
depends=('mingw-w64-crt' 'mingw-w64-zlib' 'mingw-w64-libjpeg-turbo' 'mingw-w64-sqlite'
'mingw-w64-libpng' 'mingw-w64-openssl' 'mingw-w64-dbus' 'mingw-w64-harfbuzz'
'mingw-w64-pcre2'<%== $static_variant ? " 'mingw-w64-zstd'" : "" %>)
'mingw-w64-pcre2')
% if ($static_variant) {
depends+=(${pkgname%-static}) # the static version relies on the shared version for build tools and headers
% }

View File

@ -23,7 +23,7 @@ pkgname=mingw-w64-qt5-<%== $qt_module %><%== $static_variant ? '-static' : '' %>
<%== content %>\
% if ($kde_fork_revision) {
_commit=<%== $kde_fork_revision->[1] %>
_basever=${pkgver%%+*}
_basever=$pkgver
% if ($kde_fork_revision->[0] > 0) {
pkgver+=+kde+r<%== $kde_fork_revision->[0] %>
% }

View File

@ -14,14 +14,14 @@
% }
pkgname=<%= $package_name %>
_qtver=6.7.0
_qtver=6.4.0
pkgver=${_qtver/-/}
pkgrel=1
pkgrel=2
arch=(any)
url='https://www.qt.io'
license=(GPL3 LGPL3 FDL custom)
pkgdesc='A cross-platform application and UI framework (mingw-w64)'
depends=('mingw-w64-crt' 'mingw-w64-cppwinrt' 'mingw-w64-zlib' 'mingw-w64-libjpeg-turbo' 'mingw-w64-sqlite'
depends=('mingw-w64-crt' 'mingw-w64-zlib' 'mingw-w64-libjpeg-turbo' 'mingw-w64-sqlite'
'mingw-w64-libpng' 'mingw-w64-openssl' 'mingw-w64-dbus' 'mingw-w64-harfbuzz'
'mingw-w64-brotli' 'mingw-w64-pcre2' 'mingw-w64-zstd')
makedepends=('mingw-w64-cmake<%= $static_suffix %>' 'mingw-w64-postgresql' 'mingw-w64-mariadb-connector-c'
@ -38,13 +38,7 @@ source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${_qtver}/subm
sha256sums=('<%== $qt_module_sha256 %>'\
<%== include 'fragments/sha256_list', relevant_files => $patch_files %>)
# disable i686 build because 32-bit Windows is generally not supported by upstream and
# it does not build anymore as of GCC 14 (probably due to commit 9a19fa8b616f83474c35cc5b34a3865073ced829)
# remarks:
# - This is in-line with MSYS2's packaging of mingw-w64 Qt 6 packages.
# - You may override MINGW_W64_QT6_ARCHS by adding the variable to `/etc/makepkg.conf` in case you
# nevertheless want to attempt the i686 build.
_architectures=${MINGW_W64_QT6_ARCHS:-x86_64-w64-mingw32}
_architectures='i686-w64-mingw32 x86_64-w64-mingw32'
% if ($patch_files->size || content_for('prepare')->size) {
prepare () {
@ -64,22 +58,12 @@ prepare () {
build() {
for _arch in ${_architectures}; do
export PKG_CONFIG=/usr/bin/$_arch-pkg-config
local _enable_winrt_support=ON
if [[ ! -e /usr/${_arch}/include/winrt/Windows.Foundation.h ]]; then
echo "cppwinrt headers seem incomplete, disabling FEATURE_cpp_winrt"
_enable_winrt_support=OFF
fi
$_arch-cmake<%== $static_suffix %> -G Ninja -B build-$_arch -S $_pkgfqn \\
-DCMAKE_CXX_STANDARD=20 \\
-DCMAKE_CXX_FLAGS="$CXX_FLAGS -std=c++20" \\
% if ($static_variant) {
-DCMAKE_INSTALL_PREFIX:PATH="/usr/$_arch/static" \\
-DFEATURE_static_runtime=ON \\
-DFEATURE_openssl_linked=ON \\
% }
-DFEATURE_cpp_winrt=$_enable_winrt_support \\
-DFEATURE_pkg_config=ON \\
-DFEATURE_system_pcre2=ON \\
-DFEATURE_system_freetype=ON \\

View File

@ -15,7 +15,7 @@ _pkgfqn="qt<%== $qt_module %>-everywhere-src-${_qtver}"
sha256sums=('<%== stash('git_commit') ? 'SKIP' : $qt_module_sha256 %>'\
<%== include 'fragments/sha256_list', relevant_files => $patch_files %>)
_architectures=${MINGW_W64_QT6_ARCHS:-x86_64-w64-mingw32}
_architectures='i686-w64-mingw32 x86_64-w64-mingw32'
% if ($patch_files->size || content_for('prepare')->size) {
prepare () {
@ -39,7 +39,6 @@ build() {
$_arch-cmake<%== $static_suffix %> -G Ninja -B build-$_arch -S $_pkgfqn \\
% if ($static_variant) {
-DCMAKE_INSTALL_PREFIX:PATH="/usr/$_arch/static" \\
-DCMAKE_DISABLE_FIND_PACKAGE_harfbuzz=TRUE \\
-DFEATURE_static_runtime=ON \\
% }
-DFEATURE_pkg_config=ON<%== content_for 'additional_cmake_args' %>

View File

@ -13,7 +13,7 @@
% }
pkgname=<%= $package_name %>
_qtver=6.7.0
_qtver=6.4.0
pkgver=${_qtver/-/}
pkgrel=1
arch=(x86_64)
@ -27,7 +27,7 @@ depends=(shared-mime-info
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-xcb-util-cursor static-compat-vulkan-headers
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')

View File

@ -11,7 +11,6 @@ fi
for spec_file in "$OSC_DIR"/*/*/*.spec; do
trimmed_path=${spec_file#$OSC_DIR/*/*/}
project_name=${trimmed_path%*.spec}
project_name=${project_name%-qt6}
spec_dir=${spec_file%/*}
# skip packages with unknown version

View File

@ -21,8 +21,7 @@ do
echo "NEXT: $project -> $version"
# check whether CMakeLists.txt has been updated
echo "checking https://raw.githubusercontent.com/$gh_user/$gh_name/master/CMakeLists.txt"
cmake_lists=$(wget --no-cache -qO- "https://raw.githubusercontent.com/$gh_user/$gh_name/master/CMakeLists.txt" || echo -n '')
cmake_lists=$(wget -qO- "https://raw.githubusercontent.com/$gh_user/$gh_name/master/CMakeLists.txt" || echo -n '')
major_version_regex='set\(META_VERSION_MAJOR ([^\)]*)\)'
minor_version_regex='set\(META_VERSION_MINOR ([^\)]*)\)'
patch_version_regex='set\(META_VERSION_PATCH ([^\)]*)\)'

View File

@ -6,28 +6,7 @@ source "$(dirname $0)/../versions.sh"
if ! [[ $DRY_RUN ]] && ! [[ $GITHUB_TOKEN ]]; then
echo "Don't forget to set \$GITHUB_TOKEN."
exit 1
fi
# determine GPGKEY to use and test signing
if [[ -f /etc/makepkg.conf ]]; then
source /etc/makepkg.conf
fi
if ! [[ $GPGKEY ]] && ! [[ $SKIP_SIGNING ]]; then
echo "You must set \$GPGKEY for signing or \$SKIP_SIGNING to skip signing."
exit 2
fi
if [[ -n $GPGKEY ]]; then
# make helpers for signing used by buildservice available to this script as well
export PATH=/var/lib/buildservice-git/bin:/var/lib/buildservice:$PATH
SIGNWITHKEY=(-u "${GPGKEY}")
echo 'test' > /tmp/signing-test
if ! gpg --detach-sign --yes --use-agent "${SIGNWITHKEY[@]}" --no-armor /tmp/signing-test ; then
echo 'Not continuing, setup for signing is broken'
exit 3
fi
rm /tmp/signing-test*
echo "Will sign archives with key ${GPGKEY}"
exit -2
fi
if [[ $DRY_RUN ]]; then
@ -87,11 +66,9 @@ do
for arch in i686-w64-mingw32 x86_64-w64-mingw32; do
binaries=(usr/$arch/bin/*-static.exe)
for binary in ${binaries[@]}; do
binary_cli=${binary%-static.exe}-static-cli.exe
base_name=${binary##*/}
base_name=${base_name%-static.exe}
symlink_name=$base_name-$arch.exe
symlink_name_cli=$base_name-$arch-cli.exe
# consider Qt 6 the suffixless default and use suffix for Qt 5 version instead
if [[ $base_name =~ .*-qt6 ]]; then
base_name=${base_name%-qt6}
@ -99,7 +76,6 @@ do
base_name=${base_name}-qt5
fi
binary_name=$base_name-$version-$arch.exe
binary_name_cli=$base_name-$version-$arch-cli.exe
# check whether upload already exists
zip_file="$binary_name.zip"
@ -115,15 +91,9 @@ do
echo "zipping $binary to $zip_file"
mv "$binary" "$binary_name"
ln -s "$binary_name" "$symlink_name"
additional_files=()
if [[ -f $binary_cli ]]; then
mv "$binary_cli" "$binary_name_cli"
ln -s "$binary_name_cli" "$symlink_name_cli"
additional_files+=("$binary_name_cli")
fi
license_file_2=$project-$version-$arch-LICENSES.md
cp "$license_file" "$license_file_2"
bsdtar acf "$zip_file" "$binary_name" "$license_file_2" "${additional_files[@]}"
bsdtar acf "$zip_file" "$binary_name" "$license_file_2"
zip_files+=("$zip_file")
done
done
@ -173,29 +143,17 @@ do
done
fi
# try next project and print warning if no files could be created
# upload created zip files
if [[ ${#zip_files[@]} == 0 ]]; then
echo "no zip files for $project/v$version could be created (either all skipped or no executables found)"
continue
fi
# sign files
to_upload=()
for zip_file in ${zip_files[@]}; do
to_upload+=("$zip_file")
if ! [[ $GPGKEY ]]; then
continue
fi
echo "signing $project/v$version -> $zip_file"
gpg --detach-sign --yes --use-agent "${SIGNWITHKEY[@]}" --no-armor "$zip_file"
to_upload+=("$zip_file.sig")
done
# upload files
for zip_file in ${to_upload[@]}; do
for zip_file in ${zip_files[@]}; do
echo "uploading $project/v$version -> $zip_file"
if [[ $DRY_RUN ]]; then
mv --target-directory="$target" "$zip_file"
mv --target-directory="$target" "$zip_file"
continue
fi
if github-release upload --user martchus --repo "$gh_name" --tag "v$version" --file "$zip_file" --name "$zip_file"; then

View File

@ -1,45 +0,0 @@
#!/bin/bash
set -e
package=$1
variant=$2
official_packages=${OFFICIAL_PACKAGES:-/run/media/devel/src/svntogit-packages}
current_variant_file=$package/$variant/PKGBUILD
source "$current_variant_file"
variantver=$pkgver
echo "variant version: $variantver"
regular_file=$official_packages/$package/trunk/PKGBUILD
source "$regular_file"
regularver=$pkgver
echo "regular version: $regularver"
if [[ $variantver == "$regularver" ]]; then
echo "nothing to do, versions are the same"
exit 0
fi
commits=($(git -C "$official_packages" log -n 8 --pretty=format:%H HEAD~1 "$package/trunk/PKGBUILD"))
tempfile=/tmp/regular-pkgbuild
basecomit=
for commit in "${commits[@]}"; do
echo "checking diff as of commit $commit"
git -C "$official_packages" show "$commit:$package/trunk/PKGBUILD" > "$tempfile"
source "$tempfile"
if [[ $variantver != "$pkgver" ]]; then
continue
fi
echo "commit $commit is last commit of regular package with version $pkgver"
basecomit=$commit
break
done
if [[ ! $basecomit ]]; then
echo "unable to find commit of regular package with variant version"
exit 1
fi
cd "$package/$variant"
git -C "$official_packages" diff "$basecomit..origin/master" -- "$package/trunk/PKGBUILD" > regular.diff
patch -p3 -i regular.diff

View File

@ -1,20 +1,20 @@
#!/bin/bash
declare -A versions=(
[syncthingtray]=1.5.3
[c++utilities]=5.24.8
[qtutilities]=6.14.0
[qtforkawesome]=0.2.0
[tagparser]=12.1.0
[tageditor]=3.9.0
[passwordfile]=5.0.11
[passwordmanager]=4.2.0
[syncthingtray]=1.3.0
[c++utilities]=5.20.0
[qtutilities]=6.10.0
[qtforkawesome]=0.1.0
[tagparser]=11.5.0
[tageditor]=3.7.5
[passwordfile]=5.0.7
[passwordmanager]=4.1.10
[videodownloader]=1.3.6
[reflective-rapidjson]=0.0.15
[blackwidowcontrol]=1.1.0
[dbus-soundrecorder]=1.2.3
[geocoordinatecalculator]=1.1.3
[qt5]=5.15.13
[qt6]=6.7.0
[qt5]=5.15.7
[qt6]=6.4.0
)
declare -A github_names=(
[c++utilities]=cpp-utilities

View File

@ -8,8 +8,7 @@
pkgname=devtools-custom
_pkgname=devtools
epoch=1
pkgver=1.1.1
pkgver=20220621
pkgrel=1
pkgdesc='Tools for Arch Linux package maintainers (patches from ALARM and custom ones)'
arch=('any')
@ -17,39 +16,16 @@ license=('GPL')
url='https://martchus.no-ip.biz/gitea/Martchus/devtools/src/branch/custom'
conflicts=('devtools' 'devtools-alarm')
provides=('devtools' 'devtools-alarm')
depends=(
arch-install-scripts
awk
bash
binutils
coreutils
diffutils
fakeroot
findutils
grep
jq
openssh
parallel
rsync
sed
util-linux
breezy
git
mercurial
subversion
)
makedepends=(
asciidoc
shellcheck
)
depends=('bash' 'openssh' 'subversion' 'rsync' 'arch-install-scripts'
'git' 'bzr' 'mercurial' 'diffutils' 'util-linux' 'awk')
makedepends=('asciidoc')
optdepends=('btrfs-progs: btrfs support')
source=("git+https://martchus.no-ip.biz/gitea/Martchus/$_pkgname.git#branch=custom-v$pkgver")
sha256sums=('SKIP')
source=("git+https://martchus.no-ip.biz/gitea/Martchus/$_pkgname.git#branch=custom-$pkgver")
md5sums=('SKIP')
build() {
cd "$srcdir/${_pkgname}"
make BUILDTOOLVER="${epoch}:${pkgver}-${pkgrel}-${arch}" PREFIX=/usr
make PREFIX=/usr
}
package() {

0
diriterator/default/PKGBUILD Normal file → Executable file
View File

View File

@ -1,20 +1,15 @@
pkgname=(static-compat-{environment,pkgconf})
pkgname=static-compat-environment
pkgver=1
pkgrel=2
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 pkg-config.sh)
source=("static-compat-environment.sh")
sha256sums=('SKIP')
package_static-compat-environment() {
package() {
install -d "${pkgdir}"/usr/bin
install -m 755 static-compat-environment.sh "${pkgdir}"/usr/bin/static-compat-environment
}
package_static-compat-pkgconf() {
install -d "${pkgdir}"/usr/static-compat/bin/
install -m 755 pkg-config.sh "${pkgdir}"/usr/static-compat/bin/pkg-config
}

View File

@ -1,2 +0,0 @@
#!/usr/bin/bash
exec /usr/bin/pkg-config --static "$@"

View File

@ -5,7 +5,7 @@
_pkgname=expat
pkgname=static-compat-$_pkgname
pkgver=2.5.0
pkgver=2.4.8
pkgrel=1
pkgdesc='An XML parser library'
arch=('x86_64')
@ -14,10 +14,10 @@ license=('MIT')
depends=('glibc-static-compat')
makedepends=('static-compat-cmake')
options=(staticlibs)
source=(https://github.com/libexpat/libexpat/releases/download/R_${pkgver//./_}/$_pkgname-$pkgver.tar.bz2{,.asc})
sha512sums=('22fd904d75aab7506a85c03519b9cf79e44898c8e1ba6abf6cb7f95de71b8e63a7e2d5cf4395e3627d46035ea29342b3e631a8809fef8aad3f59976dc075ad17'
source=("https://github.com/libexpat/libexpat/releases/download/R_${pkgver//./_}/expat-${pkgver}.tar.bz2"{,.asc})
sha512sums=('46cc9d725f359b77681a2875bfefa15ceee50eb9513f6577607c0c5833dfa4241565c74f26b84b38d802c3cd8c32f00204fd74272bcecbd21229425764eef86c'
'SKIP')
b2sums=('15a5dcd3af17995fb4299301710b38d609c1fe7a8d6a6284581fedd96e89e0c16526d0342fb55773ac9d678cd65dc5cdb1532c764eeb3a20ccdf1e168b96e337'
b2sums=('a829bd94d2cc9b305874ae2539dd4388ea99eaed21d2da17bbd99a1e7735b0f7cb910d096f72c71b128dcb8ffdff9021109e7ff5e562d8cefad228fd8d66f897'
'SKIP')
validpgpkeys=(3176EF7DB2367F1FCA4F306B1F9B0E909AF37285) # Sebastian Pipping

View File

@ -1,6 +1,5 @@
_pkgname=extra-cmake-modules
pkgname=mingw-w64-$_pkgname
pkgver=6.0.0
pkgname=mingw-w64-extra-cmake-modules
pkgver=5.94.0
pkgrel=1
arch=(any)
pkgdesc="Extra modules and scripts for CMake (mingw-w64)"
@ -9,12 +8,12 @@ license=("LGPL")
depends=(mingw-w64-cmake)
options=(staticlibs !strip !buildflags)
url="https://community.kde.org/Frameworks"
source=(https://download.kde.org/stable/frameworks/${pkgver%.*}/$_pkgname-$pkgver.tar.xz{,.sig})
sha256sums=('23992bf19db717156b7d6dd13118caa79fd57f090beb062e8308db3c09f70d0c'
source=("http://download.kde.org/stable/frameworks/${pkgver%.*}/extra-cmake-modules-${pkgver}.tar.xz"{,.sig}
"set-AUTOSTATICPLUGINS.patch"
"05aa27dc0e14dab407379a4d22f895e9eff13cc0.patch")
sha256sums=('23548a8ce2b998cfa675fc00112bf93914ee25194f0bfdf832d283c8d678d279'
'SKIP')
validpgpkeys=(53E6B47B45CEA3E0D5B7457758D0EE648A48B3BB # David Faure <faure@kde.org>
E0A3EB202F8E57528E13E72FD7574483BB57B18D) # Jonathan Esk-Riddell <jr@jriddell.org>
options=(!buildflags staticlibs !strip !emptydirs)
validpgpkeys=(53E6B47B45CEA3E0D5B7457758D0EE648A48B3BB) # David Faure <faure@kde.org>
_architectures="i686-w64-mingw32 x86_64-w64-mingw32"

View File

@ -9,7 +9,7 @@
_name=ffmpeg
pkgname=ffmpeg-custom
pkgver=6.1.1
pkgver=5.1.1
pkgrel=1
epoch=1
pkgdesc='Complete solution to record, convert and stream audio and video (with more features enabled than regular ffmpeg)'
@ -20,11 +20,8 @@ depends=(
alsa-lib
aom
bzip2
cairo
fontconfig
fribidi
glib2
glibc
gmp
gnutls
gsm
@ -38,17 +35,13 @@ depends=(
libdrm
libfreetype.so
libgl
libharfbuzz.so
libiec61883
libjxl.so
libmfx
libmodplug
libopenmpt.so
libplacebo.so
libpulse
librav1e.so
libraw1394
librsvg-2.so
librubberband.so
libsoxr
libssh
libtheora
@ -60,6 +53,7 @@ depends=(
libvorbis.so
libvorbisenc.so
libvpx.so
libvulkan.so
libwebp
libx11
libx264.so
@ -71,30 +65,29 @@ depends=(
libxvidcore.so
libzimg.so
ocl-icd
onevpl
opencore-amr
openjpeg2
opus
sdl2
snappy
speex
srt
svt-av1
v4l-utils
vmaf
vulkan-icd-loader
xz
zlib
ocl-icd
libfdk-aac
librsvg
#glslang - see note below
vulkan-icd-loader
)
makedepends=(
amf-headers
avisynthplus
clang
ffnvcodec-headers
frei0r-plugins
git
ladspa
mesa
@ -106,12 +99,9 @@ makedepends=(
)
optdepends=(
'avisynthplus: AviSynthPlus support'
'frei0r-plugins: Frei0r video effects support'
'intel-media-sdk: Intel QuickSync support (legacy)'
'onevpl-intel-gpu: Intel QuickSync support'
'intel-media-sdk: Intel QuickSync support'
'ladspa: LADSPA filters'
'nvidia-utils: Nvidia NVDEC/NVENC support'
'onevpl-intel-gpu: Intel QuickSync support'
)
provides=(
libavcodec.so
@ -126,35 +116,24 @@ provides=(
"ffmpeg-librsvg=$pkgver"
)
conflicts=("$_name")
options=(
debug
)
_tag=6f4048827982a8f48f71f551a6e1ed2362816eec
_tag=8536e629f0c35c0e8a2b67e65d3bc60a088fe413
source=(
git+https://git.ffmpeg.org/ffmpeg.git#tag=${_tag}
git+https://git.ffmpeg.org/ffmpeg.git?signed#tag=${_tag}
add-av_stream_get_first_dts-for-chromium.patch
)
b2sums=('SKIP'
'555274228e09a233d92beb365d413ff5c718a782008075552cafb2130a3783cf976b51dfe4513c15777fb6e8397a34122d475080f2c4483e8feea5c0d878e6de')
b2sums=(
SKIP
555274228e09a233d92beb365d413ff5c718a782008075552cafb2130a3783cf976b51dfe4513c15777fb6e8397a34122d475080f2c4483e8feea5c0d878e6de
)
validpgpkeys=(DD1EC9E8DE085C629B3E1846B18E8928B3948D64) # Michael Niedermayer <michael@niedermayer.cc>
prepare() {
cd ffmpeg
# FS#79281: fix assembling with binutil as >= 2.41
git cherry-pick -n effadce6c756247ea8bae32dc13bb3e6f464f0eb
# FS#77813: fix playing ogg files with mplayer
git cherry-pick -n cbcc817353a019da4332ad43deb7bbc4e695d02a
patch -Np1 -i ../add-av_stream_get_first_dts-for-chromium.patch # https://crbug.com/1251779
# use non-deprecated nvenc GUID for conftest
git cherry-pick -n 03823ac0c6a38bd6ba972539e3203a592579792f
git cherry-pick -n d2b46c1ef768bc31ba9180f6d469d5b8be677500
# Fix VDPAU vo
git cherry-pick -n e9c93009fc34ca9dfcf0c6f2ed90ef1df298abf7
# Fix bug in av_fft_end
git cherry-pick -n a562cfee2e214252f8b3f516527272ae32ef9532
git cherry-pick -n 250471ea1745fc703eb346a2a662304536a311b1
# Fix build with latest vulkan headers
git cherry-pick -n fef22c87ada4517441701e6e61e062c9f4399c8e
}
pkgver() {
@ -164,7 +143,6 @@ pkgver() {
build() {
cd $_name
./configure \
--prefix=/usr \
--disable-debug \
@ -175,7 +153,6 @@ build() {
--enable-cuda-llvm \
--enable-lto \
--enable-fontconfig \
--enable-frei0r \
--enable-gmp \
--enable-gnutls \
--enable-gpl \
@ -189,22 +166,17 @@ build() {
--enable-libfribidi \
--enable-libiec61883 \
--enable-libjack \
--enable-libjxl \
--enable-libmodplug \
--enable-libmfx \
--enable-libgsm \
--enable-libharfbuzz \
--enable-libmodplug \
--enable-libmp3lame \
--enable-libopencore_amrnb \
--enable-libopencore_amrwb \
--enable-libopenjpeg \
--enable-libopenmpt \
--enable-libopus \
--enable-libplacebo \
--enable-libpulse \
--enable-librav1e \
--enable-librsvg \
--enable-librubberband \
--enable-libsnappy \
--enable-libsoxr \
--enable-libspeex \
--enable-libsrt \
@ -215,7 +187,6 @@ build() {
--enable-libvidstab \
--enable-libvmaf \
--enable-libvorbis \
--enable-libvpl \
--enable-libvpx \
--enable-libwebp \
--enable-libx264 \
@ -228,18 +199,16 @@ build() {
--enable-nvenc \
--enable-opencl \
--enable-opengl \
--enable-omx \
--enable-shared \
--enable-version3 \
--enable-vulkan \
--enable-omx \
--enable-libfdk_aac \
--enable-vaapi \
--enable-vdpau \
--enable-openal \
--enable-nonfree
# note: removing --enable-libglslang for now due to "ERROR: libglslang not found"
make
make tools/qt-faststart
make doc/ff{mpeg,play}.1

View File

@ -0,0 +1,955 @@
diff --git a/configure b/configure
index 94f513288a..493493b4c5 100755
--- a/configure
+++ b/configure
@@ -3751,7 +3751,7 @@ vaguedenoiser_filter_deps="gpl"
vflip_vulkan_filter_deps="vulkan spirv_compiler"
vidstabdetect_filter_deps="libvidstab"
vidstabtransform_filter_deps="libvidstab"
-libvmaf_filter_deps="libvmaf pthreads"
+libvmaf_filter_deps="libvmaf"
zmq_filter_deps="libzmq"
zoompan_filter_deps="swscale"
zscale_filter_deps="libzimg const_nan"
@@ -6626,7 +6626,7 @@ enabled libtwolame && require libtwolame twolame.h twolame_init -ltwolame
enabled libuavs3d && require_pkg_config libuavs3d "uavs3d >= 1.1.41" uavs3d.h uavs3d_decode
enabled libv4l2 && require_pkg_config libv4l2 libv4l2 libv4l2.h v4l2_ioctl
enabled libvidstab && require_pkg_config libvidstab "vidstab >= 0.98" vid.stab/libvidstab.h vsMotionDetectInit
-enabled libvmaf && require_pkg_config libvmaf "libvmaf >= 1.5.2" libvmaf.h compute_vmaf
+enabled libvmaf && require_pkg_config libvmaf "libvmaf >= 2.0.0" libvmaf.h vmaf_init
enabled libvo_amrwbenc && require libvo_amrwbenc vo-amrwbenc/enc_if.h E_IF_init -lvo-amrwbenc
enabled libvorbis && require_pkg_config libvorbis vorbis vorbis/codec.h vorbis_info_init &&
require_pkg_config libvorbisenc vorbisenc vorbis/vorbisenc.h vorbis_encode_init
diff --git a/doc/filters.texi b/doc/filters.texi
index 248c09caf8..9a890d1555 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -14666,68 +14666,60 @@ ffmpeg -i input.mov -vf lensfun=make=Canon:model="Canon EOS 100D":lens_model="Ca
@section libvmaf
-Obtain the VMAF (Video Multi-Method Assessment Fusion)
-score between two input videos.
+Calulate the VMAF (Video Multi-Method Assessment Fusion) score for a
+reference/distorted pair of input videos.
-The first input is the encoded video, and the second input is the reference video.
+The first input is the distorted video, and the second input is the reference video.
The obtained VMAF score is printed through the logging system.
It requires Netflix's vmaf library (libvmaf) as a pre-requisite.
After installing the library it can be enabled using:
@code{./configure --enable-libvmaf}.
-If no model path is specified it uses the default model: @code{vmaf_v0.6.1.pkl}.
The filter has following options:
@table @option
-@item model_path
-Set the model path which is to be used for SVM.
-Default value: @code{"/usr/local/share/model/vmaf_v0.6.1.pkl"}
-
-@item log_path
-Set the file path to be used to store logs.
+@item model
+A `|` delimited list of vmaf models. Each model can be configured with a number of parameters.
+Default value: @code{"version=vmaf_v0.6.1"}
-@item log_fmt
-Set the format of the log file (csv, json or xml).
+@item model_path
+Deprecated, use model='path=...'.
@item enable_transform
-This option can enable/disable the @code{score_transform} applied to the final predicted VMAF score,
-if you have specified score_transform option in the input parameter file passed to @code{run_vmaf_training.py}
-Default value: @code{false}
+Deprecated, use model='enable_transform=true'.
@item phone_model
-Invokes the phone model which will generate VMAF scores higher than in the
-regular model, which is more suitable for laptop, TV, etc. viewing conditions.
-Default value: @code{false}
+Deprecated, use model='enable_transform=true'.
+
+@item enable_conf_interval
+Deprecated, use model='enable_conf_interval=true'.
+
+@item feature
+A `|` delimited list of features. Each feature can be configured with a number of parameters.
@item psnr
-Enables computing psnr along with vmaf.
-Default value: @code{false}
+Deprecated, use feature='name=psnr'.
@item ssim
-Enables computing ssim along with vmaf.
-Default value: @code{false}
+Deprecated, use feature='name=ssim'.
@item ms_ssim
-Enables computing ms_ssim along with vmaf.
-Default value: @code{false}
+Deprecated, use feature='name=ms_ssim'.
-@item pool
-Set the pool method to be used for computing vmaf.
-Options are @code{min}, @code{harmonic_mean} or @code{mean} (default).
+@item log_path
+Set the file path to be used to store log files.
+
+@item log_fmt
+Set the format of the log file (xml, json, csv, or sub).
@item n_threads
-Set number of threads to be used when computing vmaf.
-Default value: @code{0}, which makes use of all available logical processors.
+Set number of threads to be used when initializing libvmaf.
+Default value: @code{0}, no threads.
@item n_subsample
-Set interval for frame subsampling used when computing vmaf.
-Default value: @code{1}
-
-@item enable_conf_interval
-Enables confidence interval.
-Default value: @code{false}
+Set frame subsampling interval to be used.
@end table
This filter also supports the @ref{framesync} options.
@@ -14735,23 +14727,31 @@ This filter also supports the @ref{framesync} options.
@subsection Examples
@itemize
@item
-On the below examples the input file @file{main.mpg} being processed is
-compared with the reference file @file{ref.mpg}.
+In the examples below, a distorted video @file{distorted.mpg} is
+compared with a reference file @file{reference.mpg}.
+@item
+Basic usage:
+@example
+ffmpeg -i distorted.mpg -i reference.mpg -lavfi libvmaf=log_path=output.xml -f null -
+@end example
+
+@item
+Example with multiple models:
@example
-ffmpeg -i main.mpg -i ref.mpg -lavfi libvmaf -f null -
+ffmpeg -i distorted.mpg -i reference.mpg -lavfi libvmaf='model=version=vmaf_v0.6.1\\:name=vmaf|version=vmaf_v0.6.1neg\\:name=vmaf_neg' -f null -
@end example
@item
-Example with options:
+Example with multiple addtional features:
@example
-ffmpeg -i main.mpg -i ref.mpg -lavfi libvmaf="psnr=1:log_fmt=json" -f null -
+ffmpeg -i distorted.mpg -i reference.mpg -lavfi libvmaf='feature=name=psnr|name=ciede' -f null -
@end example
@item
Example with options and different containers:
@example
-ffmpeg -i main.mpg -i ref.mkv -lavfi "[0:v]settb=AVTB,setpts=PTS-STARTPTS[main];[1:v]settb=AVTB,setpts=PTS-STARTPTS[ref];[main][ref]libvmaf=psnr=1:log_fmt=json" -f null -
+ffmpeg -i distorted.mpg -i reference.mkv -lavfi "[0:v]settb=AVTB,setpts=PTS-STARTPTS[main];[1:v]settb=AVTB,setpts=PTS-STARTPTS[ref];[main][ref]libvmaf=log_fmt=json:log_path=output.json" -f null -
@end example
@end itemize
diff --git a/libavfilter/vf_libvmaf.c b/libavfilter/vf_libvmaf.c
index 5d492126eb..eee1c280ef 100644
--- a/libavfilter/vf_libvmaf.c
+++ b/libavfilter/vf_libvmaf.c
@@ -24,8 +24,8 @@
* Calculate the VMAF between two input videos.
*/
-#include <pthread.h>
#include <libvmaf.h>
+
#include "libavutil/avstring.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
@@ -39,23 +39,9 @@
typedef struct LIBVMAFContext {
const AVClass *class;
FFFrameSync fs;
- const AVPixFmtDescriptor *desc;
- int width;
- int height;
- double vmaf_score;
- int vmaf_thread_created;
- pthread_t vmaf_thread;
- pthread_mutex_t lock;
- pthread_cond_t cond;
- int eof;
- AVFrame *gmain;
- AVFrame *gref;
- int frame_set;
char *model_path;
char *log_path;
char *log_fmt;
- int disable_clip;
- int disable_avx;
int enable_transform;
int phone_model;
int psnr;
@@ -65,184 +51,487 @@ typedef struct LIBVMAFContext {
int n_threads;
int n_subsample;
int enable_conf_interval;
- int error;
+ char *model_cfg;
+ char *feature_cfg;
+ VmafContext *vmaf;
+ VmafModel **model;
+ unsigned model_cnt;
+ unsigned frame_cnt;
+ unsigned bpc;
} LIBVMAFContext;
#define OFFSET(x) offsetof(LIBVMAFContext, x)
#define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
static const AVOption libvmaf_options[] = {
- {"model_path", "Set the model to be used for computing vmaf.", OFFSET(model_path), AV_OPT_TYPE_STRING, {.str="/usr/local/share/model/vmaf_v0.6.1.pkl"}, 0, 1, FLAGS},
- {"log_path", "Set the file path to be used to store logs.", OFFSET(log_path), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 1, FLAGS},
- {"log_fmt", "Set the format of the log (csv, json or xml).", OFFSET(log_fmt), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 1, FLAGS},
- {"enable_transform", "Enables transform for computing vmaf.", OFFSET(enable_transform), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, FLAGS},
- {"phone_model", "Invokes the phone model that will generate higher VMAF scores.", OFFSET(phone_model), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, FLAGS},
- {"psnr", "Enables computing psnr along with vmaf.", OFFSET(psnr), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, FLAGS},
- {"ssim", "Enables computing ssim along with vmaf.", OFFSET(ssim), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, FLAGS},
- {"ms_ssim", "Enables computing ms-ssim along with vmaf.", OFFSET(ms_ssim), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, FLAGS},
+ {"model_path", "use model='path=...'.", OFFSET(model_path), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 1, FLAGS|AV_OPT_FLAG_DEPRECATED},
+ {"log_path", "Set the file path to be used to write log.", OFFSET(log_path), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 1, FLAGS},
+ {"log_fmt", "Set the format of the log (csv, json, xml, or sub).", OFFSET(log_fmt), AV_OPT_TYPE_STRING, {.str="xml"}, 0, 1, FLAGS},
+ {"enable_transform", "use model='enable_transform=true'.", OFFSET(enable_transform), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, FLAGS|AV_OPT_FLAG_DEPRECATED},
+ {"phone_model", "use model='enable_transform=true'.", OFFSET(phone_model), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, FLAGS|AV_OPT_FLAG_DEPRECATED},
+ {"psnr", "use feature='name=psnr'.", OFFSET(psnr), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, FLAGS|AV_OPT_FLAG_DEPRECATED},
+ {"ssim", "use feature='name=ssim'.", OFFSET(ssim), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, FLAGS|AV_OPT_FLAG_DEPRECATED},
+ {"ms_ssim", "use feature='name=ms_ssim'.", OFFSET(ms_ssim), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, FLAGS|AV_OPT_FLAG_DEPRECATED},
{"pool", "Set the pool method to be used for computing vmaf.", OFFSET(pool), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 1, FLAGS},
{"n_threads", "Set number of threads to be used when computing vmaf.", OFFSET(n_threads), AV_OPT_TYPE_INT, {.i64=0}, 0, UINT_MAX, FLAGS},
{"n_subsample", "Set interval for frame subsampling used when computing vmaf.", OFFSET(n_subsample), AV_OPT_TYPE_INT, {.i64=1}, 1, UINT_MAX, FLAGS},
- {"enable_conf_interval", "Enables confidence interval.", OFFSET(enable_conf_interval), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, FLAGS},
+ {"enable_conf_interval", "model='enable_conf_interval=true'.", OFFSET(enable_conf_interval), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, FLAGS|AV_OPT_FLAG_DEPRECATED},
+ {"model", "Set the model to be used for computing vmaf.", OFFSET(model_cfg), AV_OPT_TYPE_STRING, {.str="version=vmaf_v0.6.1"}, 0, 1, FLAGS},
+ {"feature", "Set the feature to be used for computing vmaf.", OFFSET(feature_cfg), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 1, FLAGS},
{ NULL }
};
FRAMESYNC_DEFINE_CLASS(libvmaf, LIBVMAFContext, fs);
-#define read_frame_fn(type, bits) \
- static int read_frame_##bits##bit(float *ref_data, float *main_data, \
- float *temp_data, int stride, void *ctx) \
-{ \
- LIBVMAFContext *s = (LIBVMAFContext *) ctx; \
- int ret; \
- \
- pthread_mutex_lock(&s->lock); \
- \
- while (!s->frame_set && !s->eof) { \
- pthread_cond_wait(&s->cond, &s->lock); \
- } \
- \
- if (s->frame_set) { \
- int ref_stride = s->gref->linesize[0]; \
- int main_stride = s->gmain->linesize[0]; \
- \
- const type *ref_ptr = (const type *) s->gref->data[0]; \
- const type *main_ptr = (const type *) s->gmain->data[0]; \
- \
- float *ptr = ref_data; \
- float factor = 1.f / (1 << (bits - 8)); \
- \
- int h = s->height; \
- int w = s->width; \
- \
- int i,j; \
- \
- for (i = 0; i < h; i++) { \
- for ( j = 0; j < w; j++) { \
- ptr[j] = ref_ptr[j] * factor; \
- } \
- ref_ptr += ref_stride / sizeof(*ref_ptr); \
- ptr += stride / sizeof(*ptr); \
- } \
- \
- ptr = main_data; \
- \
- for (i = 0; i < h; i++) { \
- for (j = 0; j < w; j++) { \
- ptr[j] = main_ptr[j] * factor; \
- } \
- main_ptr += main_stride / sizeof(*main_ptr); \
- ptr += stride / sizeof(*ptr); \
- } \
- } \
- \
- ret = !s->frame_set; \
- \
- av_frame_unref(s->gref); \
- av_frame_unref(s->gmain); \
- s->frame_set = 0; \
- \
- pthread_cond_signal(&s->cond); \
- pthread_mutex_unlock(&s->lock); \
- \
- if (ret) { \
- return 2; \
- } \
- \
- return 0; \
+static enum VmafPixelFormat pix_fmt_map(enum AVPixelFormat av_pix_fmt)
+{
+ switch (av_pix_fmt) {
+ case AV_PIX_FMT_YUV420P:
+ case AV_PIX_FMT_YUV420P10LE:
+ case AV_PIX_FMT_YUV420P12LE:
+ case AV_PIX_FMT_YUV420P16LE:
+ return VMAF_PIX_FMT_YUV420P;
+ case AV_PIX_FMT_YUV422P:
+ case AV_PIX_FMT_YUV422P10LE:
+ case AV_PIX_FMT_YUV422P12LE:
+ case AV_PIX_FMT_YUV422P16LE:
+ return VMAF_PIX_FMT_YUV422P;
+ case AV_PIX_FMT_YUV444P:
+ case AV_PIX_FMT_YUV444P10LE:
+ case AV_PIX_FMT_YUV444P12LE:
+ case AV_PIX_FMT_YUV444P16LE:
+ return VMAF_PIX_FMT_YUV444P;
+ default:
+ return VMAF_PIX_FMT_UNKNOWN;
+ }
}
-read_frame_fn(uint8_t, 8);
-read_frame_fn(uint16_t, 10);
+static int copy_picture_data(AVFrame *src, VmafPicture *dst, unsigned bpc)
+{
+ int err = vmaf_picture_alloc(dst, pix_fmt_map(src->format), bpc,
+ src->width, src->height);
+ if (err)
+ return AVERROR(ENOMEM);
+
+ for (unsigned i = 0; i < 3; i++) {
+ uint8_t *src_data = src->data[i];
+ uint8_t *dst_data = dst->data[i];
+ for (unsigned j = 0; j < dst->h[i]; j++) {
+ memcpy(dst_data, src_data, sizeof(*dst_data) * dst->w[i]);
+ src_data += src->linesize[i];
+ dst_data += dst->stride[i];
+ }
+ }
+
+ return 0;
+}
-static void compute_vmaf_score(LIBVMAFContext *s)
+static int do_vmaf(FFFrameSync *fs)
{
- int (*read_frame)(float *ref_data, float *main_data, float *temp_data,
- int stride, void *ctx);
- char *format;
+ AVFilterContext *ctx = fs->parent;
+ LIBVMAFContext *s = ctx->priv;
+ VmafPicture pic_ref, pic_dist;
+ AVFrame *ref, *dist;
+ int err = 0;
- if (s->desc->comp[0].depth <= 8) {
- read_frame = read_frame_8bit;
- } else {
- read_frame = read_frame_10bit;
+ int ret = ff_framesync_dualinput_get(fs, &dist, &ref);
+ if (ret < 0)
+ return ret;
+ if (ctx->is_disabled || !ref)
+ return ff_filter_frame(ctx->outputs[0], dist);
+
+ err = copy_picture_data(ref, &pic_ref, s->bpc);
+ if (err) {
+ av_log(s, AV_LOG_ERROR, "problem during vmaf_picture_alloc.\n");
+ return AVERROR(ENOMEM);
+ }
+
+ err = copy_picture_data(dist, &pic_dist, s->bpc);
+ if (err) {
+ av_log(s, AV_LOG_ERROR, "problem during vmaf_picture_alloc.\n");
+ vmaf_picture_unref(&pic_ref);
+ return AVERROR(ENOMEM);
}
- format = (char *) s->desc->name;
+ err = vmaf_read_pictures(s->vmaf, &pic_ref, &pic_dist, s->frame_cnt++);
+ if (err) {
+ av_log(s, AV_LOG_ERROR, "problem during vmaf_read_pictures.\n");
+ return AVERROR(EINVAL);
+ }
- s->error = compute_vmaf(&s->vmaf_score, format, s->width, s->height,
- read_frame, s, s->model_path, s->log_path,
- s->log_fmt, 0, 0, s->enable_transform,
- s->phone_model, s->psnr, s->ssim,
- s->ms_ssim, s->pool,
- s->n_threads, s->n_subsample, s->enable_conf_interval);
+ return ff_filter_frame(ctx->outputs[0], dist);
}
-static void *call_vmaf(void *ctx)
+
+static AVDictionary **delimited_dict_parse(char *str, unsigned *cnt)
{
- LIBVMAFContext *s = (LIBVMAFContext *) ctx;
- compute_vmaf_score(s);
- if (!s->error) {
- av_log(ctx, AV_LOG_INFO, "VMAF score: %f\n",s->vmaf_score);
- } else {
- pthread_mutex_lock(&s->lock);
- pthread_cond_signal(&s->cond);
- pthread_mutex_unlock(&s->lock);
+ AVDictionary **dict = NULL;
+ char *str_copy = NULL;
+ char *saveptr = NULL;
+ unsigned cnt2;
+ int err = 0;
+
+ if (!str)
+ return NULL;
+
+ cnt2 = 1;
+ for (char *p = str; *p; p++) {
+ if (*p == '|')
+ cnt2++;
+ }
+
+ dict = av_calloc(cnt2, sizeof(*dict));
+ if (!dict)
+ goto fail;
+
+ str_copy = av_strdup(str);
+ if (!str_copy)
+ goto fail;
+
+ *cnt = 0;
+ for (unsigned i = 0; i < cnt2; i++) {
+ char *s = av_strtok(i == 0 ? str_copy : NULL, "|", &saveptr);
+ if (!s)
+ continue;
+ err = av_dict_parse_string(&dict[(*cnt)++], s, "=", ":", 0);
+ if (err)
+ goto fail;
+ }
+
+ av_free(str_copy);
+ return dict;
+
+fail:
+ if (dict) {
+ for (unsigned i = 0; i < *cnt; i++) {
+ if (dict[i])
+ av_dict_free(&dict[i]);
+ }
+ av_free(dict);
}
- pthread_exit(NULL);
+
+ av_free(str_copy);
+ *cnt = 0;
return NULL;
}
-static int do_vmaf(FFFrameSync *fs)
+static int parse_features(AVFilterContext *ctx)
{
- AVFilterContext *ctx = fs->parent;
LIBVMAFContext *s = ctx->priv;
- AVFrame *master, *ref;
- int ret;
+ AVDictionary **dict = NULL;
+ unsigned dict_cnt;
+ int err = 0;
- ret = ff_framesync_dualinput_get(fs, &master, &ref);
- if (ret < 0)
- return ret;
- if (!ref)
- return ff_filter_frame(ctx->outputs[0], master);
+ if (!s->feature_cfg)
+ return 0;
+
+ dict = delimited_dict_parse(s->feature_cfg, &dict_cnt);
+ if (!dict) {
+ av_log(ctx, AV_LOG_ERROR,
+ "could not parse feature config: %s\n", s->feature_cfg);
+ return AVERROR(EINVAL);
+ }
- pthread_mutex_lock(&s->lock);
+ for (unsigned i = 0; i < dict_cnt; i++) {
+ char *feature_name = NULL;
+ VmafFeatureDictionary *feature_opts_dict = NULL;
+ AVDictionaryEntry *e = NULL;
+
+ while (e = av_dict_get(dict[i], "", e, AV_DICT_IGNORE_SUFFIX)) {
+ if (av_stristr(e->key, "name")) {
+ feature_name = e->value;
+ continue;
+ }
+
+ err = vmaf_feature_dictionary_set(&feature_opts_dict, e->key,
+ e->value);
+ if (err) {
+ av_log(ctx, AV_LOG_ERROR,
+ "could not set feature option: %s.%s=%s\n",
+ feature_name, e->key, e->value);
+ goto exit;
+ }
+ }
+
+ err = vmaf_use_feature(s->vmaf, feature_name, feature_opts_dict);
+ if (err) {
+ av_log(ctx, AV_LOG_ERROR,
+ "problem during vmaf_use_feature: %s\n", feature_name);
+ goto exit;
+ }
+ }
- while (s->frame_set && !s->error) {
- pthread_cond_wait(&s->cond, &s->lock);
+exit:
+ for (unsigned i = 0; i < dict_cnt; i++) {
+ if (dict[i])
+ av_dict_free(&dict[i]);
}
+ av_free(dict);
+ return err;
+}
+
+static int parse_models(AVFilterContext *ctx)
+{
+ LIBVMAFContext *s = ctx->priv;
+ AVDictionary **dict;
+ unsigned dict_cnt;
+ int err = 0;
+
+ if (!s->model_cfg) return 0;
- if (s->error) {
+ dict_cnt = 0;
+ dict = delimited_dict_parse(s->model_cfg, &dict_cnt);
+ if (!dict) {
av_log(ctx, AV_LOG_ERROR,
- "libvmaf encountered an error, check log for details\n");
- pthread_mutex_unlock(&s->lock);
+ "could not parse model config: %s\n", s->model_cfg);
return AVERROR(EINVAL);
}
- av_frame_ref(s->gref, ref);
- av_frame_ref(s->gmain, master);
+ s->model_cnt = dict_cnt;
+ s->model = av_calloc(s->model_cnt, sizeof(*s->model));
+ if (!s->model)
+ return AVERROR(ENOMEM);
+
+ for (unsigned i = 0; i < dict_cnt; i++) {
+ VmafModelConfig model_cfg = { 0 };
+ AVDictionaryEntry *e = NULL;
+ char *version = NULL;
+ char *path = NULL;
+
+ while (e = av_dict_get(dict[i], "", e, AV_DICT_IGNORE_SUFFIX)) {
+ if (av_stristr(e->key, "disable_clip")) {
+ model_cfg.flags |= av_stristr(e->value, "true") ?
+ VMAF_MODEL_FLAG_DISABLE_CLIP : 0;
+ continue;
+ }
+
+ if (av_stristr(e->key, "enable_transform")) {
+ model_cfg.flags |= av_stristr(e->value, "true") ?
+ VMAF_MODEL_FLAG_ENABLE_TRANSFORM : 0;
+ continue;
+ }
+
+ if (av_stristr(e->key, "name")) {
+ model_cfg.name = e->value;
+ continue;
+ }
+
+ if (av_stristr(e->key, "version")) {
+ version = e->value;
+ continue;
+ }
+
+ if (av_stristr(e->key, "path")) {
+ path = e->value;
+ continue;
+ }
+ }
+
+ if (version) {
+ err = vmaf_model_load(&s->model[i], &model_cfg, version);
+ if (err) {
+ av_log(ctx, AV_LOG_ERROR,
+ "could not load libvmaf model with version: %s\n",
+ version);
+ goto exit;
+ }
+ }
+
+ if (path && !s->model[i]) {
+ err = vmaf_model_load_from_path(&s->model[i], &model_cfg, path);
+ if (err) {
+ av_log(ctx, AV_LOG_ERROR,
+ "could not load libvmaf model with path: %s\n",
+ path);
+ goto exit;
+ }
+ }
+
+ if (!s->model[i]) {
+ av_log(ctx, AV_LOG_ERROR,
+ "could not load libvmaf model with config: %s\n",
+ s->model_cfg);
+ goto exit;
+ }
+
+ while (e = av_dict_get(dict[i], "", e, AV_DICT_IGNORE_SUFFIX)) {
+ VmafFeatureDictionary *feature_opts_dict = NULL;
+ char *feature_opt = NULL;
+
+ char *feature_name = av_strtok(e->key, ".", &feature_opt);
+ if (!feature_opt)
+ continue;
+
+ err = vmaf_feature_dictionary_set(&feature_opts_dict,
+ feature_opt, e->value);
+ if (err) {
+ av_log(ctx, AV_LOG_ERROR,
+ "could not set feature option: %s.%s=%s\n",
+ feature_name, feature_opt, e->value);
+ err = AVERROR(EINVAL);
+ goto exit;
+ }
+
+ err = vmaf_model_feature_overload(s->model[i], feature_name,
+ feature_opts_dict);
+ if (err) {
+ av_log(ctx, AV_LOG_ERROR,
+ "could not overload feature: %s\n", feature_name);
+ err = AVERROR(EINVAL);
+ goto exit;
+ }
+ }
+ }
+
+ for (unsigned i = 0; i < s->model_cnt; i++) {
+ err = vmaf_use_features_from_model(s->vmaf, s->model[i]);
+ if (err) {
+ av_log(ctx, AV_LOG_ERROR,
+ "problem during vmaf_use_features_from_model\n");
+ err = AVERROR(EINVAL);
+ goto exit;
+ }
+ }
+
+exit:
+ for (unsigned i = 0; i < dict_cnt; i++) {
+ if (dict[i])
+ av_dict_free(&dict[i]);
+ }
+ av_free(dict);
+ return err;
+}
+
+static enum VmafLogLevel log_level_map(int log_level)
+{
+ switch (log_level) {
+ case AV_LOG_QUIET:
+ return VMAF_LOG_LEVEL_NONE;
+ case AV_LOG_ERROR:
+ return VMAF_LOG_LEVEL_ERROR;
+ case AV_LOG_WARNING:
+ return VMAF_LOG_LEVEL_WARNING;
+ case AV_LOG_INFO:
+ return VMAF_LOG_LEVEL_INFO;
+ case AV_LOG_DEBUG:
+ return VMAF_LOG_LEVEL_DEBUG;
+ default:
+ return VMAF_LOG_LEVEL_INFO;
+ }
+}
+
+static int parse_deprecated_options(AVFilterContext *ctx)
+{
+ LIBVMAFContext *s = ctx->priv;
+ VmafModel *model = NULL;
+ VmafModelCollection *model_collection = NULL;
+ enum VmafModelFlags flags = VMAF_MODEL_FLAGS_DEFAULT;
+ int err = 0;
+
+ VmafModelConfig model_cfg = {
+ .name = "vmaf",
+ .flags = flags,
+ };
+
+ if (s->enable_transform || s->phone_model)
+ flags |= VMAF_MODEL_FLAG_ENABLE_TRANSFORM;
+
+ if (!s->model_path)
+ goto extra_metrics_only;
+
+ if (s->enable_conf_interval) {
+ err = vmaf_model_collection_load_from_path(&model, &model_collection,
+ &model_cfg, s->model_path);
+ if (err) {
+ av_log(ctx, AV_LOG_ERROR,
+ "problem loading model file: %s\n", s->model_path);
+ goto exit;
+ }
+
+ err = vmaf_use_features_from_model_collection(s->vmaf, model_collection);
+ if (err) {
+ av_log(ctx, AV_LOG_ERROR,
+ "problem loading feature extractors from model file: %s\n",
+ s->model_path);
+ goto exit;
+ }
+ } else {
+ err = vmaf_model_load_from_path(&model, &model_cfg, s->model_path);
+ if (err) {
+ av_log(ctx, AV_LOG_ERROR,
+ "problem loading model file: %s\n", s->model_path);
+ goto exit;
+ }
+ err = vmaf_use_features_from_model(s->vmaf, model);
+ if (err) {
+ av_log(ctx, AV_LOG_ERROR,
+ "problem loading feature extractors from model file: %s\n",
+ s->model_path);
+ goto exit;
+ }
+ }
+
+extra_metrics_only:
+ if (s->psnr) {
+ VmafFeatureDictionary *d = NULL;
+ vmaf_feature_dictionary_set(&d, "enable_chroma", "false");
+
+ err = vmaf_use_feature(s->vmaf, "psnr", d);
+ if (err) {
+ av_log(ctx, AV_LOG_ERROR,
+ "problem loading feature extractor: psnr\n");
+ goto exit;
+ }
+ }
- s->frame_set = 1;
+ if (s->ssim) {
+ err = vmaf_use_feature(s->vmaf, "float_ssim", NULL);
+ if (err) {
+ av_log(ctx, AV_LOG_ERROR,
+ "problem loading feature extractor: ssim\n");
+ goto exit;
+ }
+ }
- pthread_cond_signal(&s->cond);
- pthread_mutex_unlock(&s->lock);
+ if (s->ms_ssim) {
+ err = vmaf_use_feature(s->vmaf, "float_ms_ssim", NULL);
+ if (err) {
+ av_log(ctx, AV_LOG_ERROR,
+ "problem loading feature extractor: ms_ssim\n");
+ goto exit;
+ }
+ }
- return ff_filter_frame(ctx->outputs[0], master);
+exit:
+ return err;
}
static av_cold int init(AVFilterContext *ctx)
{
LIBVMAFContext *s = ctx->priv;
+ int err = 0;
- s->gref = av_frame_alloc();
- s->gmain = av_frame_alloc();
- if (!s->gref || !s->gmain)
- return AVERROR(ENOMEM);
+ VmafConfiguration cfg = {
+ .log_level = log_level_map(av_log_get_level()),
+ .n_subsample = s->n_subsample,
+ .n_threads = s->n_threads,
+ };
+
+ err = vmaf_init(&s->vmaf, cfg);
+ if (err)
+ return AVERROR(EINVAL);
+
+ err = parse_deprecated_options(ctx);
+ if (err)
+ return err;
- s->error = 0;
+ err = parse_models(ctx);
+ if (err)
+ return err;
- s->vmaf_thread_created = 0;
- pthread_mutex_init(&s->lock, NULL);
- pthread_cond_init (&s->cond, NULL);
+ err = parse_features(ctx);
+ if (err)
+ return err;
s->fs.on_event = do_vmaf;
return 0;
@@ -256,26 +545,31 @@ static const enum AVPixelFormat pix_fmts[] = {
static int config_input_ref(AVFilterLink *inlink)
{
- AVFilterContext *ctx = inlink->dst;
+ AVFilterContext *ctx = inlink->dst;
LIBVMAFContext *s = ctx->priv;
- int th;
+ const AVPixFmtDescriptor *desc;
+ int err = 0;
- if (ctx->inputs[0]->w != ctx->inputs[1]->w ||
- ctx->inputs[0]->h != ctx->inputs[1]->h) {
- av_log(ctx, AV_LOG_ERROR, "Width and height of input videos must be same.\n");
- return AVERROR(EINVAL);
+ if (ctx->inputs[0]->w != ctx->inputs[1]->w) {
+ av_log(ctx, AV_LOG_ERROR, "input width must match.\n");
+ err |= AVERROR(EINVAL);
}
- s->desc = av_pix_fmt_desc_get(inlink->format);
- s->width = ctx->inputs[0]->w;
- s->height = ctx->inputs[0]->h;
+ if (ctx->inputs[0]->h != ctx->inputs[1]->h) {
+ av_log(ctx, AV_LOG_ERROR, "input height must match.\n");
+ err |= AVERROR(EINVAL);
+ }
- th = pthread_create(&s->vmaf_thread, NULL, call_vmaf, (void *) s);
- if (th) {
- av_log(ctx, AV_LOG_ERROR, "Thread creation failed.\n");
- return AVERROR(EINVAL);
+ if (ctx->inputs[0]->format != ctx->inputs[1]->format) {
+ av_log(ctx, AV_LOG_ERROR, "input pix_fmt must match.\n");
+ err |= AVERROR(EINVAL);
}
- s->vmaf_thread_created = 1;
+
+ if (err)
+ return err;
+
+ desc = av_pix_fmt_desc_get(inlink->format);
+ s->bpc = desc->comp[0].depth;
return 0;
}
@@ -307,28 +601,80 @@ static int activate(AVFilterContext *ctx)
return ff_framesync_activate(&s->fs);
}
+static enum VmafOutputFormat log_fmt_map(const char *log_fmt)
+{
+ if (log_fmt) {
+ if (av_stristr(log_fmt, "xml"))
+ return VMAF_OUTPUT_FORMAT_XML;
+ if (av_stristr(log_fmt, "json"))
+ return VMAF_OUTPUT_FORMAT_JSON;
+ if (av_stristr(log_fmt, "csv"))
+ return VMAF_OUTPUT_FORMAT_CSV;
+ if (av_stristr(log_fmt, "sub"))
+ return VMAF_OUTPUT_FORMAT_SUB;
+ }
+
+ return VMAF_OUTPUT_FORMAT_XML;
+}
+
+static enum VmafPoolingMethod pool_method_map(const char *pool_method)
+{
+ if (pool_method) {
+ if (av_stristr(pool_method, "min"))
+ return VMAF_POOL_METHOD_MIN;
+ if (av_stristr(pool_method, "mean"))
+ return VMAF_POOL_METHOD_MEAN;
+ if (av_stristr(pool_method, "harmonic_mean"))
+ return VMAF_POOL_METHOD_HARMONIC_MEAN;
+ }
+
+ return VMAF_POOL_METHOD_MEAN;
+}
+
static av_cold void uninit(AVFilterContext *ctx)
{
LIBVMAFContext *s = ctx->priv;
+ int err = 0;
ff_framesync_uninit(&s->fs);
- pthread_mutex_lock(&s->lock);
- s->eof = 1;
- pthread_cond_signal(&s->cond);
- pthread_mutex_unlock(&s->lock);
+ if (!s->frame_cnt)
+ goto clean_up;
- if (s->vmaf_thread_created)
- {
- pthread_join(s->vmaf_thread, NULL);
- s->vmaf_thread_created = 0;
+ err = vmaf_read_pictures(s->vmaf, NULL, NULL, 0);
+ if (err) {
+ av_log(ctx, AV_LOG_ERROR,
+ "problem flushing libvmaf context.\n");
}
- av_frame_free(&s->gref);
- av_frame_free(&s->gmain);
+ for (unsigned i = 0; i < s->model_cnt; i++) {
+ double vmaf_score;
+ err = vmaf_score_pooled(s->vmaf, s->model[i], pool_method_map(s->pool),
+ &vmaf_score, 0, s->frame_cnt - 1);
+ if (err) {
+ av_log(ctx, AV_LOG_ERROR,
+ "problem getting pooled vmaf score.\n");
+ }
+
+ av_log(ctx, AV_LOG_INFO, "VMAF score: %f\n", vmaf_score);
+ }
+
+ if (s->vmaf) {
+ if (s->log_path && !err)
+ vmaf_write_output(s->vmaf, s->log_path, log_fmt_map(s->log_fmt));
+ }
+
+clean_up:
+ if (s->model) {
+ for (unsigned i = 0; i < s->model_cnt; i++) {
+ if (s->model[i])
+ vmaf_model_destroy(s->model[i]);
+ }
+ av_free(s->model);
+ }
- pthread_mutex_destroy(&s->lock);
- pthread_cond_destroy(&s->cond);
+ if (s->vmaf)
+ vmaf_close(s->vmaf);
}
static const AVFilterPad libvmaf_inputs[] = {
--
2.20.1

View File

@ -1,43 +0,0 @@
# Maintainer in the AUR: Roboron <robertoms258 at gmail dot com>
_realname=fluidsynth
pkgname=mingw-w64-fluidsynth
pkgver=2.3.4
pkgrel=1
pkgdesc="A real-time software synthesizer based on the SoundFont 2 specifications (mingw-w64)"
url="http://www.fluidsynth.org/"
arch=('any')
license=('LGPL')
#depends=('mingw-w64-sdl2' 'mingw-w64-glib2')
depends=('mingw-w64-sdl2' 'mingw-w64-glib2' 'mingw-w64-libsndfile' 'mingw-w64-portaudio' 'mingw-w64-readline')
makedepends=('mingw-w64-cmake' 'mingw-w64-pkg-config' 'ninja')
options=('staticlibs' '!buildflags' '!strip')
source=("${_realname}-${pkgver}.tar.gz::https://github.com/FluidSynth/${_realname}/archive/v${pkgver}.tar.gz")
sha256sums=('1529ef5bc3b9ef3adc2a7964505912f7305103e269e50cc0316f500b22053ac9')
_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
build() {
cd fluidsynth-$pkgver
cflags_base=$CFLAGS
for _arch in ${_architectures}; do
mkdir -p build-${_arch} && pushd build-${_arch}
export CFLAGS="$cflags_base"
${_arch}-cmake -G Ninja -S .. -B shared -DBUILD_SHARED_LIBS=1 -Denable-portaudio=1 -Denable-dbus=0
VERBOSE=1 cmake --build shared
export CFLAGS="$cflags_base -DGLIB_STATIC_COMPILATION=1 -DGMODULE_STATIC_COMPILATION=1"
${_arch}-cmake -G Ninja -S .. -B static -DBUILD_SHARED_LIBS=0 -Denable-aufile=0 -Denable-dbus=0 -Denable-ipv6=0 -Denable-jack=0 -Denable-ladspa=0 -Denable-midishare=0 -Denable-opensles=0 -Denable-oboe=0 -Denable-oss=0 -Denable-readline=0 -Denable-winmidi=1 -Denable-waveout=0 -Denable-network=0 -Denable-pulseaudio=0 -Denable-dsound=0 -Denable-alsa=0 -Denable-libinstpatch=0 -Denable-portaudio=0 -Denable-wasapi=0 -Denable-openmp=1 -Denable-libsndfile=0 -Denable-sdl2=1
VERBOSE=1 cmake --build static
popd
done
}
package() {
for _arch in ${_architectures}; do
cd "$srcdir"/fluidsynth-${pkgver}/build-${_arch}
DESTDIR="$pkgdir" cmake --install shared
DESTDIR="$pkgdir" cmake --install static
done
}

View File

@ -1,39 +0,0 @@
_pkgname=fluidsynth
pkgname=static-compat-$_pkgname
pkgver=2.3.4
pkgrel=2
pkgdesc="A real-time software synthesizer based on the SoundFont 2 specifications"
arch=(x86_64)
url="https://www.fluidsynth.org/"
license=(LGPL-2.1-or-later)
depends=(static-compat-glib2 static-compat-alsa-lib)
makedepends=(static-compat-cmake ninja)
source=($_pkgname-$pkgver.tar.gz::https://github.com/$_pkgname/$_pkgname/archive/v$pkgver.tar.gz)
sha512sums=('79891116d78b9be1c38bce9e5759b9bb732c3d8ee31c6e57d1a3e2b5548879b91d19582e73ee7fb0fd243beba3bf1bbc341a26aab0b6440eef36fc55dce3e8b0')
b2sums=('5146c1f0243ac1fcc3d4f29ea65bb03b326c59bf9de1f53def447f4a924c7fdde31f8b33300051d2e7765087fb8bbdba3643b03c537e3366b02ca42b3b9d4311')
build() {
export CFLAGS+=' -ldl'
source static-compat-environment
local cmake_options=(
-G Ninja
-B build
-D LIB_SUFFIX=""
-S $_pkgname-$pkgver
-W no-dev
-Denable-aufile=0 -Denable-dbus=0 -Denable-ipv6=0 -Denable-jack=0 -Denable-ladspa=0 -Denable-midishare=0 -Denable-opensles=0 -Denable-oboe=0 -Denable-oss=0 -Denable-readline=0 -Denable-winmidi=1 -Denable-waveout=0 -Denable-network=0 -Denable-pulseaudio=0 -Denable-dsound=0 -Denable-alsa=1 -Denable-libinstpatch=0 -Denable-portaudio=0 -Denable-wasapi=0 -Denable-openmp=1 -Denable-libsndfile=0 -Denable-sdl2=0
)
static-compat-cmake "${cmake_options[@]}"
cmake --build build --verbose
}
check() {
source static-compat-environment
ctest build
}
package() {
source static-compat-environment
DESTDIR="$pkgdir" cmake --install build
}

View File

@ -3,7 +3,7 @@
_pkgname=fontconfig
pkgname=static-compat-$_pkgname
pkgver=2.14.2
pkgver=2.14.0
pkgrel=1
epoch=2
pkgdesc="Library for configuring and customizing font access"
@ -13,8 +13,9 @@ 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=7861a719616b4b132b9cac089c6c64f47832edb1 # tags/2.14.2^0
_commit=911b19f19f1334d51c452756f9ce222c1101097b # tags/2.14.0^0
source=("git+https://gitlab.freedesktop.org/fontconfig/fontconfig.git#commit=$_commit")
b2sums=('SKIP')
@ -28,20 +29,9 @@ pkgver() {
}
build() {
export CFLAGS+=' -lstdc++' # for __gxx_personality_v0 required by harfbuzz.a
source static-compat-environment
# Link against libstdc++ for __gxx_personality_v0 required by harfbuzz.a
export CFLAGS+=" $static_compat_prefix/lib/libstdc++.a"
# Invoke pkg-config with --static
export PATH=$PWD:$PATH
printf '#!/usr/bin/bash\nexec /usr/bin/pkg-config --static "$@"\n' > pkg-config
chmod +x pkg-config
static-compat-meson $_pkgname build \
-D default-hinting=slight \
-D default-sub-pixel-rendering=rgb \
-D doc=disabled
static-compat-meson $_pkgname build -Ddoc=disabled
meson compile -C build
}

View File

@ -0,0 +1 @@
../mingw-w64/0003-Enable-infinality-subpixel-hinting.patch

View File

@ -1 +0,0 @@
../mingw-w64/0003-Enable-long-PCF-family-names.patch

View File

@ -0,0 +1 @@
../mingw-w64/0004-Enable-long-PCF-family-names.patch

View File

@ -4,37 +4,39 @@
# you also find the URL of a binary repository.
pkgname=mingw-w64-freetype2-bootstrap
pkgver=2.13.2
pkgrel=1
pkgver=2.12.1
pkgrel=2
pkgdesc='Font rasterization library (mingw-w64)'
arch=('any')
url='https://www.freetype.org/'
license=('GPL')
depends=(mingw-w64-crt mingw-w64-zlib mingw-w64-bzip2 mingw-w64-brotli)
makedepends=(mingw-w64-gcc mingw-w64-meson)
provides=(mingw-w64-freetype)
replaces=(mingw-w64-freetype)
conflicts=(mingw-w64-freetype)
options=(!strip !buildflags !libtool 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-long-PCF-family-names.patch
)
b2sums=('cebc82180d9afaeb112a65ba78903d7bf7a9295a803166a033585ad2325add6023f05066852240c4665e56285345ba503b01ecd461d48f0478a8f3f56136988e'
'SKIP'
'2c148694e150b3faae9dc46ead824ae6d94cfe34f2918bc9066f45bab7e6b6f77b4d4b2fee00c3d466d866e1985132cea4a774dcf1bab95409b7cf55efff01e1'
'9598d13eae0411878c1af8e5d875c3b1fc09f4e6649edfbbf3b0a819c4c585648521f0b30ffd1318f5106cfde9c899d3db70c8ffe36dac59f3f98b5fd7dab115'
'66deb179d1f1f4e2e35f6d50acfbacce80595d5128f5fed8c1871838c210dbf1a7173a87dd937d64997844c8f478c8f81120f71e33b9d59d980e179d103ff31c')
validpgpkeys=(
E30674707856409FF1948010BE6C3AAC63AD8E3F # Werner Lemberg <wl@gnu.org>
)
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=('4766f20157cc4cf0cd292f80bf917f92d1c439b243ac3018debf6b9140c41a7f'
'SKIP'
'12c869eeba212c74d07d3d7815848b047ecb5282d5463dffb3bb6d219315d4da'
'2497dcb3650271db9bb7ad4f3379b5b3c6a19f5ca5388dd9ba7d42b5c15c8c4f'
'caa0bc7d3dfa3b4c6b9beecda6141405dafe540f99a655dc83d1704fa232ac20'
'8bf978cd1abd73f54c53f7d214c368b1fd8921cd9800d2cc84427c662ffbbdcb')
validpgpkeys=(E30674707856409FF1948010BE6C3AAC63AD8E3F) # Werner Lemberg <wl@gnu.org>
if [[ $pkgname = 'mingw-w64-freetype2-bootstrap' ]]; then
_provides=(${pkgname%-bootstrap})
_provides=${pkgname%-bootstrap}
else
_provides=(${pkgname}-bootstrap)
_provides=${pkgname}-bootstrap
# adding harfbuzz for improved OpenType features auto-hinting
# introduces a cycle dep to harfbuzz depending on freetype wanted by upstream
depends+=(mingw-w64-harfbuzz)
replaces+=(${_provides})
fi
provides+=(${_provides})
conflicts+=(${_provides})
@ -42,19 +44,19 @@ conflicts+=(${_provides})
_architectures='i686-w64-mingw32 x86_64-w64-mingw32'
prepare() {
cd freetype-$pkgver
cd "${srcdir}/freetype-${pkgver}"
patch -Np1 -i ../0001-Enable-table-validation-modules.patch
patch -Np1 -i ../0002-Enable-subpixel-rendering.patch
patch -Np1 -i ../0003-Enable-long-PCF-family-names.patch
patch -Np1 -i ../0003-Enable-infinality-subpixel-hinting.patch
patch -Np1 -i ../0004-Enable-long-PCF-family-names.patch
}
build() {
local harfbuzz_support=enabled
[[ $pkgname = 'mingw-w64-freetype2-bootstrap' ]] && harfbuzz_support=disabled
for _arch in ${_architectures}; do
mkdir -p "${srcdir}/freetype-${pkgver}/build-${_arch}"
cd "${srcdir}/freetype-${pkgver}/build-${_arch}"
${_arch}-meson --default-library both -D zlib=enabled -D bzip2=enabled -D png=disabled -D harfbuzz="$harfbuzz_support" -D brotli=enabled -D b_lto=false
${_arch}-meson --default-library both -D zlib=enabled -D bzip2=enabled -D png=disabled -D brotli=enabled -D b_lto=false
ninja
done
}

View File

@ -8,7 +8,7 @@ Subject: [PATCH] Enable table validation modules
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules.cfg b/modules.cfg
index 5b6c9b5a5c1d..b4933bea7654 100644
index aded92e5e922..f133c65b27e2 100644
--- a/modules.cfg
+++ b/modules.cfg
@@ -117,26 +117,26 @@ AUX_MODULES += cache

View File

@ -8,7 +8,7 @@ Subject: [PATCH] Enable subpixel rendering
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h
index 1976b33af959..b3425e55feec 100644
index c5bde243b127..77d6efb2e5f2 100644
--- a/include/freetype/config/ftoption.h
+++ b/include/freetype/config/ftoption.h
@@ -123,7 +123,7 @@ FT_BEGIN_HEADER

View File

@ -0,0 +1,24 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
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 )
/**************************************************************************

View File

@ -8,10 +8,10 @@ Subject: [PATCH] Enable long PCF family names
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h
index b3425e55feec..ecff3ccd12d6 100644
index c33c51eeb2e7..c33ddb4bf60c 100644
--- a/include/freetype/config/ftoption.h
+++ b/include/freetype/config/ftoption.h
@@ -887,7 +887,7 @@ FT_BEGIN_HEADER
@@ -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.
*/

View File

@ -4,37 +4,39 @@
# you also find the URL of a binary repository.
pkgname=mingw-w64-freetype2
pkgver=2.13.2
pkgrel=1
pkgver=2.12.1
pkgrel=2
pkgdesc='Font rasterization library (mingw-w64)'
arch=('any')
url='https://www.freetype.org/'
license=('GPL')
depends=(mingw-w64-crt mingw-w64-zlib mingw-w64-bzip2 mingw-w64-brotli)
makedepends=(mingw-w64-gcc mingw-w64-meson)
provides=(mingw-w64-freetype)
replaces=(mingw-w64-freetype)
conflicts=(mingw-w64-freetype)
options=(!strip !buildflags !libtool 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-long-PCF-family-names.patch
)
b2sums=('cebc82180d9afaeb112a65ba78903d7bf7a9295a803166a033585ad2325add6023f05066852240c4665e56285345ba503b01ecd461d48f0478a8f3f56136988e'
'SKIP'
'2c148694e150b3faae9dc46ead824ae6d94cfe34f2918bc9066f45bab7e6b6f77b4d4b2fee00c3d466d866e1985132cea4a774dcf1bab95409b7cf55efff01e1'
'9598d13eae0411878c1af8e5d875c3b1fc09f4e6649edfbbf3b0a819c4c585648521f0b30ffd1318f5106cfde9c899d3db70c8ffe36dac59f3f98b5fd7dab115'
'66deb179d1f1f4e2e35f6d50acfbacce80595d5128f5fed8c1871838c210dbf1a7173a87dd937d64997844c8f478c8f81120f71e33b9d59d980e179d103ff31c')
validpgpkeys=(
E30674707856409FF1948010BE6C3AAC63AD8E3F # Werner Lemberg <wl@gnu.org>
)
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=('4766f20157cc4cf0cd292f80bf917f92d1c439b243ac3018debf6b9140c41a7f'
'SKIP'
'12c869eeba212c74d07d3d7815848b047ecb5282d5463dffb3bb6d219315d4da'
'2497dcb3650271db9bb7ad4f3379b5b3c6a19f5ca5388dd9ba7d42b5c15c8c4f'
'caa0bc7d3dfa3b4c6b9beecda6141405dafe540f99a655dc83d1704fa232ac20'
'8bf978cd1abd73f54c53f7d214c368b1fd8921cd9800d2cc84427c662ffbbdcb')
validpgpkeys=(E30674707856409FF1948010BE6C3AAC63AD8E3F) # Werner Lemberg <wl@gnu.org>
if [[ $pkgname = 'mingw-w64-freetype2-bootstrap' ]]; then
_provides=(${pkgname%-bootstrap})
_provides=${pkgname%-bootstrap}
else
_provides=(${pkgname}-bootstrap)
_provides=${pkgname}-bootstrap
# adding harfbuzz for improved OpenType features auto-hinting
# introduces a cycle dep to harfbuzz depending on freetype wanted by upstream
depends+=(mingw-w64-harfbuzz)
replaces+=(${_provides})
fi
provides+=(${_provides})
conflicts+=(${_provides})
@ -42,19 +44,19 @@ conflicts+=(${_provides})
_architectures='i686-w64-mingw32 x86_64-w64-mingw32'
prepare() {
cd freetype-$pkgver
cd "${srcdir}/freetype-${pkgver}"
patch -Np1 -i ../0001-Enable-table-validation-modules.patch
patch -Np1 -i ../0002-Enable-subpixel-rendering.patch
patch -Np1 -i ../0003-Enable-long-PCF-family-names.patch
patch -Np1 -i ../0003-Enable-infinality-subpixel-hinting.patch
patch -Np1 -i ../0004-Enable-long-PCF-family-names.patch
}
build() {
local harfbuzz_support=enabled
[[ $pkgname = 'mingw-w64-freetype2-bootstrap' ]] && harfbuzz_support=disabled
for _arch in ${_architectures}; do
mkdir -p "${srcdir}/freetype-${pkgver}/build-${_arch}"
cd "${srcdir}/freetype-${pkgver}/build-${_arch}"
${_arch}-meson --default-library both -D zlib=enabled -D bzip2=enabled -D png=disabled -D harfbuzz="$harfbuzz_support" -D brotli=enabled -D b_lto=false
${_arch}-meson --default-library both -D zlib=enabled -D bzip2=enabled -D png=disabled -D brotli=enabled -D b_lto=false
ninja
done
}

View File

@ -0,0 +1 @@
../mingw-w64/0003-Enable-infinality-subpixel-hinting.patch

View File

@ -1 +0,0 @@
../mingw-w64/0003-Enable-long-PCF-family-names.patch

View File

@ -0,0 +1 @@
../mingw-w64/0004-Enable-long-PCF-family-names.patch

View File

@ -3,7 +3,7 @@
_pkgname=freetype2
pkgname=static-compat-$_pkgname
pkgver=2.13.2
pkgver=2.12.1
pkgrel=1
pkgdesc="Font rasterization library"
url="https://www.freetype.org/"
@ -11,38 +11,27 @@ 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-brotli
static-compat-bzip2
static-compat-harfbuzz
static-compat-libpng
static-compat-zlib
)
makedepends=(
static-compat-libx11
static-compat-meson
)
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}
0001-Enable-table-validation-modules.patch
0002-Enable-subpixel-rendering.patch
0003-Enable-long-PCF-family-names.patch
)
b2sums=('cebc82180d9afaeb112a65ba78903d7bf7a9295a803166a033585ad2325add6023f05066852240c4665e56285345ba503b01ecd461d48f0478a8f3f56136988e'
'SKIP'
'2c148694e150b3faae9dc46ead824ae6d94cfe34f2918bc9066f45bab7e6b6f77b4d4b2fee00c3d466d866e1985132cea4a774dcf1bab95409b7cf55efff01e1'
'9598d13eae0411878c1af8e5d875c3b1fc09f4e6649edfbbf3b0a819c4c585648521f0b30ffd1318f5106cfde9c899d3db70c8ffe36dac59f3f98b5fd7dab115'
'66deb179d1f1f4e2e35f6d50acfbacce80595d5128f5fed8c1871838c210dbf1a7173a87dd937d64997844c8f478c8f81120f71e33b9d59d980e179d103ff31c')
validpgpkeys=(
E30674707856409FF1948010BE6C3AAC63AD8E3F # Werner Lemberg <wl@gnu.org>
)
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=('4766f20157cc4cf0cd292f80bf917f92d1c439b243ac3018debf6b9140c41a7f'
'12c869eeba212c74d07d3d7815848b047ecb5282d5463dffb3bb6d219315d4da'
'2497dcb3650271db9bb7ad4f3379b5b3c6a19f5ca5388dd9ba7d42b5c15c8c4f'
'caa0bc7d3dfa3b4c6b9beecda6141405dafe540f99a655dc83d1704fa232ac20'
'8bf978cd1abd73f54c53f7d214c368b1fd8921cd9800d2cc84427c662ffbbdcb')
validpgpkeys=(E30674707856409FF1948010BE6C3AAC63AD8E3F) # Werner Lemberg <wl@gnu.org>
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-long-PCF-family-names.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
@ -68,4 +57,4 @@ package() {
rm -rf "${pkgdir}"/usr/static/share/
}
# vim:set sw=2 sts=-1 et:
# vim:set ts=2 sw=2 et:

View File

@ -1 +0,0 @@
ftgl

View File

@ -1,45 +0,0 @@
# Maintainer: Martchus <martchus@gmx.net>
# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where
# you also find the URL of a binary repository.
_pkgname=ftgl
pkgname=mingw-w64-$_pkgname
pkgver=2.4.0
pkgrel=1
pkgdesc='OpenGL library to use arbitrary fonts (mingw-w64)'
arch=('any')
url='https://github.com/frankheckenbach/ftgl'
license=('MIT')
depends=(mingw-w64-crt mingw-w64-freetype2)
makedepends=(mingw-w64-gcc mingw-w64-cmake git ninja)
options=(!strip !buildflags !libtool staticlibs)
_commit=483639219095ad080538e07ceb5996de901d4e74 # tags/v2.4.0
source=("git+https://github.com/frankheckenbach/ftgl#commit=$_commit")
sha256sums=('SKIP')
_architectures='i686-w64-mingw32 x86_64-w64-mingw32'
prepare() {
cd $_pkgname
git cherry-pick -n 835f2ba7911a6c15a1a314d5e3267fa089b5a319
}
build() {
for _arch in ${_architectures}; do
export PKG_CONFIG=/usr/bin/$_arch-pkg-config
$_arch-cmake -G Ninja -B build-$_arch -S $_pkgname
VERBOSE=1 cmake --build build-$_arch
done
}
package() {
for _arch in ${_architectures}; do
DESTDIR="$pkgdir" cmake --install build-$_arch
install -Dm644 $_pkgname/COPYING -t "$pkgdir"/usr/share/licenses/$pkgname
find "$pkgdir/usr/$_arch" -iname '*.exe' -exec $_arch-strip --strip-all {} \;
find "$pkgdir/usr/$_arch" -iname '*.dll' -exec $_arch-strip --strip-unneeded {} \;
find "$pkgdir/usr/$_arch" -iname '*.a' -exec $_arch-strip -g {} \;
done
}

View File

@ -1,49 +0,0 @@
_pkgname=ftgl
pkgname=static-compat-$_pkgname
pkgver=2.4.0
pkgrel=1
pkgdesc="OpenGL library to use arbitrary fonts"
arch=(x86_64)
url="https://github.com/frankheckenbach/ftgl"
license=(MIT)
depends=(static-compat-freetype2 static-compat-glu)
makedepends=(static-compat-cmake git ninja)
_commit=483639219095ad080538e07ceb5996de901d4e74 # tags/v2.4.0
source=("git+https://github.com/frankheckenbach/ftgl#commit=$_commit")
sha256sums=('SKIP')
pkgver() {
cd $_pkgname
git describe --tags | sed 's/^v//;s/-/+/g'
}
prepare() {
source static-compat-environment
cd $_pkgname
git cherry-pick -n 835f2ba7911a6c15a1a314d5e3267fa089b5a319
}
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 "${srcdir}/${_pkgname}"
VERBOSE=1 cmake --build build
}
package() {
source static-compat-environment
DESTDIR="$pkgdir" cmake --install build
# FS#23283: install missing headers for OpenCascade
#install -Dt "$pkgdir/$static_compat_prefix/include/FTGL" -m644 src/FT{Face,Size}.h
install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 $_pkgname/COPYING
}
# vim:set sw=2 et:

View File

@ -1,319 +0,0 @@
2024-05-08 Jakub Jelinek <jakub@redhat.com>
PR target/114968
gcc/
* target.def (use_atexit_for_cxa_atexit): Remove spurious space
from comment.
(adjust_cdtor_callabi_fntype): New cxx target hook.
* targhooks.h (default_cxx_adjust_cdtor_callabi_fntype): Declare.
* targhooks.cc (default_cxx_adjust_cdtor_callabi_fntype): New
function.
* doc/tm.texi.in (TARGET_CXX_ADJUST_CDTOR_CALLABI_FNTYPE): Add.
* doc/tm.texi: Regenerate.
* config/i386/i386.cc (ix86_cxx_adjust_cdtor_callabi_fntype): New
function.
(TARGET_CXX_ADJUST_CDTOR_CALLABI_FNTYPE): Redefine.
gcc/cp/
* cp-tree.h (atexit_fn_ptr_type_node, cleanup_type): Adjust macro
comments.
(get_cxa_atexit_fn_ptr_type): Declare.
* decl.cc (get_atexit_fn_ptr_type): Adjust function comment, only
build type for atexit argument.
(get_cxa_atexit_fn_ptr_type): New function.
(get_atexit_node): Call get_cxa_atexit_fn_ptr_type rather than
get_atexit_fn_ptr_type when using __cxa_atexit.
(get_thread_atexit_node): Call get_cxa_atexit_fn_ptr_type
rather than get_atexit_fn_ptr_type.
(start_cleanup_fn): Add fntype argument, don't call
get_atexit_fn_ptr_type for it.
(register_dtor_fn): Adjust start_cleanup_fn caller, use
get_cxa_atexit_fn_ptr_type rather than get_atexit_fn_ptr_type
when ob_parm is true.
* except.cc (build_throw): Use get_cxa_atexit_fn_ptr_type ().
--- a/gcc/target.def
+++ b/gcc/target.def
@@ -6498,7 +6498,7 @@ is in effect. The default is to return
hook_bool_void_false)
/* Returns true if target may use atexit in the same manner as
- __cxa_atexit to register static destructors. */
+ __cxa_atexit to register static destructors. */
DEFHOOK
(use_atexit_for_cxa_atexit,
"This hook returns true if the target @code{atexit} function can be used\n\
@@ -6509,6 +6509,17 @@ unloaded. The default is to return false
bool, (void),
hook_bool_void_false)
+/* Returns modified FUNCTION_TYPE for cdtor callabi. */
+DEFHOOK
+(adjust_cdtor_callabi_fntype,
+ "This hook returns a possibly modified @code{FUNCTION_TYPE} for arguments\n\
+to @code{__cxa_atexit}, @code{__cxa_thread_atexit} or @code{__cxa_throw}\n\
+function pointers. ABIs like mingw32 require special attributes to be added\n\
+to function types pointed to by arguments of these functions.\n\
+The default is to return the passed argument unmodified.",
+ tree, (tree fntype),
+ default_cxx_adjust_cdtor_callabi_fntype)
+
DEFHOOK
(adjust_class_at_definition,
"@var{type} is a C++ class (i.e., RECORD_TYPE or UNION_TYPE) that has just\n\
--- a/gcc/targhooks.h
+++ b/gcc/targhooks.h
@@ -65,6 +65,7 @@ extern machine_mode default_mode_for_suf
extern tree default_cxx_guard_type (void);
extern tree default_cxx_get_cookie_size (tree);
+extern tree default_cxx_adjust_cdtor_callabi_fntype (tree);
extern bool hook_pass_by_reference_must_pass_in_stack
(cumulative_args_t, const function_arg_info &);
--- a/gcc/targhooks.cc
+++ b/gcc/targhooks.cc
@@ -329,6 +329,14 @@ default_cxx_get_cookie_size (tree type)
return cookie_size;
}
+/* Returns modified FUNCTION_TYPE for cdtor callabi. */
+
+tree
+default_cxx_adjust_cdtor_callabi_fntype (tree fntype)
+{
+ return fntype;
+}
+
/* Return true if a parameter must be passed by reference. This version
of the TARGET_PASS_BY_REFERENCE hook uses just MUST_PASS_IN_STACK. */
--- a/gcc/doc/tm.texi.in
+++ b/gcc/doc/tm.texi.in
@@ -7223,6 +7223,8 @@ floating-point support; they are not inc
@hook TARGET_CXX_USE_ATEXIT_FOR_CXA_ATEXIT
+@hook TARGET_CXX_ADJUST_CDTOR_CALLABI_FNTYPE
+
@hook TARGET_CXX_ADJUST_CLASS_AT_DEFINITION
@hook TARGET_CXX_DECL_MANGLING_CONTEXT
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -11117,6 +11117,14 @@ shared libraries are run in the correct
unloaded. The default is to return false.
@end deftypefn
+@deftypefn {Target Hook} tree TARGET_CXX_ADJUST_CDTOR_CALLABI_FNTYPE (tree @var{fntype})
+This hook returns a possibly modified @code{FUNCTION_TYPE} for arguments
+to @code{__cxa_atexit}, @code{__cxa_thread_atexit} or @code{__cxa_throw}
+function pointers. ABIs like mingw32 require special attributes to be added
+to function types pointed to by arguments of these functions.
+The default is to return the passed argument unmodified.
+@end deftypefn
+
@deftypefn {Target Hook} void TARGET_CXX_ADJUST_CLASS_AT_DEFINITION (tree @var{type})
@var{type} is a C++ class (i.e., RECORD_TYPE or UNION_TYPE) that has just
been defined. Use this hook to make adjustments to the class (eg, tweak
--- a/gcc/config/i386/i386.cc
+++ b/gcc/config/i386/i386.cc
@@ -25799,6 +25799,20 @@ ix86_bitint_type_info (int n, struct bit
return true;
}
+/* Returns modified FUNCTION_TYPE for cdtor callabi. */
+tree
+ix86_cxx_adjust_cdtor_callabi_fntype (tree fntype)
+{
+ if (TARGET_64BIT
+ || TARGET_RTD
+ || ix86_function_type_abi (fntype) != MS_ABI)
+ return fntype;
+ /* For 32-bit MS ABI add thiscall attribute. */
+ tree attribs = tree_cons (get_identifier ("thiscall"), NULL_TREE,
+ TYPE_ATTRIBUTES (fntype));
+ return build_type_attribute_variant (fntype, attribs);
+}
+
/* Implement PUSH_ROUNDING. On 386, we have pushw instruction that
decrements by exactly 2 no matter what the position was, there is no pushb.
@@ -26410,6 +26424,8 @@ static const scoped_attribute_specs *con
#define TARGET_C_EXCESS_PRECISION ix86_get_excess_precision
#undef TARGET_C_BITINT_TYPE_INFO
#define TARGET_C_BITINT_TYPE_INFO ix86_bitint_type_info
+#undef TARGET_CXX_ADJUST_CDTOR_CALLABI_FNTYPE
+#define TARGET_CXX_ADJUST_CDTOR_CALLABI_FNTYPE ix86_cxx_adjust_cdtor_callabi_fntype
#undef TARGET_PROMOTE_PROTOTYPES
#define TARGET_PROMOTE_PROTOTYPES hook_bool_const_tree_true
#undef TARGET_PUSH_ARGUMENT
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -368,8 +368,7 @@ extern GTY(()) tree cp_global_trees[CPTI
#define throw_fn cp_global_trees[CPTI_THROW_FN]
#define rethrow_fn cp_global_trees[CPTI_RETHROW_FN]
-/* The type of the function-pointer argument to "__cxa_atexit" (or
- "std::atexit", if "__cxa_atexit" is not being used). */
+/* The type of the function-pointer argument to "std::atexit". */
#define atexit_fn_ptr_type_node cp_global_trees[CPTI_ATEXIT_FN_PTR_TYPE]
/* A pointer to `std::atexit'. */
@@ -384,7 +383,8 @@ extern GTY(()) tree cp_global_trees[CPTI
/* The declaration of the dynamic_cast runtime. */
#define dynamic_cast_node cp_global_trees[CPTI_DCAST]
-/* The type of a destructor. */
+/* The type of a destructor, passed to __cxa_atexit, __cxa_thread_atexit
+ or __cxa_throw. */
#define cleanup_type cp_global_trees[CPTI_CLEANUP_TYPE]
/* The type of the vtt parameter passed to subobject constructors and
@@ -7067,6 +7067,7 @@ extern tree check_default_argument (tre
extern int wrapup_namespace_globals ();
extern tree create_implicit_typedef (tree, tree);
extern int local_variable_p (const_tree);
+extern tree get_cxa_atexit_fn_ptr_type ();
extern tree register_dtor_fn (tree);
extern tmpl_spec_kind current_tmpl_spec_kind (int);
extern tree cxx_builtin_function (tree decl);
--- a/gcc/cp/decl.cc
+++ b/gcc/cp/decl.cc
@@ -93,7 +93,7 @@ static void record_key_method_defined (t
static tree create_array_type_for_decl (tree, tree, tree, location_t);
static tree get_atexit_node (void);
static tree get_dso_handle_node (void);
-static tree start_cleanup_fn (void);
+static tree start_cleanup_fn (tree);
static void end_cleanup_fn (void);
static tree cp_make_fname_decl (location_t, tree, int);
static void initialize_predefined_identifiers (void);
@@ -9678,34 +9678,39 @@ declare_global_var (tree name, tree type
return decl;
}
-/* Returns the type for the argument to "__cxa_atexit" (or "atexit",
- if "__cxa_atexit" is not being used) corresponding to the function
+/* Returns the type for the argument to "atexit" corresponding to the function
to be called when the program exits. */
static tree
-get_atexit_fn_ptr_type (void)
+get_atexit_fn_ptr_type ()
{
- tree fn_type;
-
if (!atexit_fn_ptr_type_node)
{
- tree arg_type;
- if (flag_use_cxa_atexit
- && !targetm.cxx.use_atexit_for_cxa_atexit ())
- /* The parameter to "__cxa_atexit" is "void (*)(void *)". */
- arg_type = ptr_type_node;
- else
- /* The parameter to "atexit" is "void (*)(void)". */
- arg_type = NULL_TREE;
-
- fn_type = build_function_type_list (void_type_node,
- arg_type, NULL_TREE);
+ tree fn_type = build_function_type_list (void_type_node, NULL_TREE);
atexit_fn_ptr_type_node = build_pointer_type (fn_type);
}
return atexit_fn_ptr_type_node;
}
+/* Returns the type for the argument to "__cxa_atexit", "__cxa_thread_atexit"
+ or "__cxa_throw" corresponding to the destructor to be called when the
+ program exits. */
+
+tree
+get_cxa_atexit_fn_ptr_type ()
+{
+ if (!cleanup_type)
+ {
+ tree fntype = build_function_type_list (void_type_node,
+ ptr_type_node, NULL_TREE);
+ fntype = targetm.cxx.adjust_cdtor_callabi_fntype (fntype);
+ cleanup_type = build_pointer_type (fntype);
+ }
+
+ return cleanup_type;
+}
+
/* Returns a pointer to the `atexit' function. Note that if
FLAG_USE_CXA_ATEXIT is nonzero, then this will actually be the new
`__cxa_atexit' function specified in the IA64 C++ ABI. */
@@ -9736,7 +9741,7 @@ get_atexit_node (void)
use_aeabi_atexit = targetm.cxx.use_aeabi_atexit ();
/* First, build the pointer-to-function type for the first
argument. */
- fn_ptr_type = get_atexit_fn_ptr_type ();
+ fn_ptr_type = get_cxa_atexit_fn_ptr_type ();
/* Then, build the rest of the argument types. */
argtype2 = ptr_type_node;
if (use_aeabi_atexit)
@@ -9819,7 +9824,7 @@ get_thread_atexit_node (void)
int __cxa_thread_atexit (void (*)(void *), void *, void *) */
tree fn_type = build_function_type_list (integer_type_node,
- get_atexit_fn_ptr_type (),
+ get_cxa_atexit_fn_ptr_type (),
ptr_type_node, ptr_type_node,
NULL_TREE);
@@ -9866,7 +9871,7 @@ get_dso_handle_node (void)
static GTY(()) int start_cleanup_cnt;
static tree
-start_cleanup_fn (void)
+start_cleanup_fn (tree fntype)
{
char name[32];
@@ -9878,7 +9883,6 @@ start_cleanup_fn (void)
/* Build the name of the function. */
sprintf (name, "__tcf_%d", start_cleanup_cnt++);
/* Build the function declaration. */
- tree fntype = TREE_TYPE (get_atexit_fn_ptr_type ());
tree fndecl = build_lang_decl (FUNCTION_DECL, get_identifier (name), fntype);
DECL_CONTEXT (fndecl) = FROB_CONTEXT (current_namespace);
/* It's a function with internal linkage, generated by the
@@ -9968,8 +9972,10 @@ register_dtor_fn (tree decl)
build_cleanup (decl);
/* Now start the function. */
- cleanup = start_cleanup_fn ();
-
+ cleanup = start_cleanup_fn (TREE_TYPE (ob_parm
+ ? get_cxa_atexit_fn_ptr_type ()
+ : get_atexit_fn_ptr_type ()));
+
/* Now, recompute the cleanup. It may contain SAVE_EXPRs that refer
to the original function, rather than the anonymous one. That
will make the back end think that nested functions are in use,
@@ -9998,7 +10004,8 @@ register_dtor_fn (tree decl)
{
/* We must convert CLEANUP to the type that "__cxa_atexit"
expects. */
- cleanup = build_nop (get_atexit_fn_ptr_type (), cleanup);
+ cleanup = build_nop (ob_parm ? get_cxa_atexit_fn_ptr_type ()
+ : get_atexit_fn_ptr_type (), cleanup);
/* "__cxa_atexit" will pass the address of DECL to the
cleanup function. */
mark_used (decl);
--- a/gcc/cp/except.cc
+++ b/gcc/cp/except.cc
@@ -645,11 +645,7 @@ build_throw (location_t loc, tree exp, t
/* The CLEANUP_TYPE is the internal type of a destructor. */
if (!cleanup_type)
- {
- tree tmp = build_function_type_list (void_type_node,
- ptr_type_node, NULL_TREE);
- cleanup_type = build_pointer_type (tmp);
- }
+ cleanup_type = get_cxa_atexit_fn_ptr_type ();
if (!throw_fn)
{

View File

@ -1,75 +0,0 @@
# Maintainer of official package: Felix Yan <felixonmars@archlinux.org>
pkgname=mingw-w64-gcc
pkgver=14.1.1+r1+g43b730b9134
pkgrel=2
pkgdesc="Cross GCC for the MinGW-w64 cross-compiler"
arch=('x86_64' 'aarch64')
url="https://gcc.gnu.org"
license=('GPL' 'LGPL' 'FDL' 'custom')
groups=('mingw-w64-toolchain' 'mingw-w64')
depends=('zlib' 'libisl' 'libmpc' 'mingw-w64-crt' 'mingw-w64-binutils' 'mingw-w64-winpthreads' 'mingw-w64-headers')
# gcc-d doesn't build as of 13.1.0
makedepends=("gcc-ada" "git")
options=('!strip' 'staticlibs' '!emptydirs' '!buildflags')
_commit=43b730b9134af60a8f1c5b107d625f7127ff23c5
source=(git+https://sourceware.org/git/gcc.git#commit=${_commit}
0001-missing-__thiscall-attribute-on-builtin-declaration-of-__cxa_thread_atexit.patch)
#source=(https://ftp.gnu.org/gnu/gcc/gcc-$pkgver/gcc-$pkgver.tar.xz{,.sig})
validpgpkeys=(F3691687D867B81B51CE07D9BBE43771487328A9 # bpiotrowski@archlinux.org
86CFFCA918CF3AF47147588051E8B148A9999C34 # evangelos@foutrelis.com
13975A70E63C361C73AE69EF6EEB81F8981C74C7 # richard.guenther@gmail.com
D3A93CAD751C2AF4F8C7AD516C35B99309B5FA62) # Jakub Jelinek <jakub@redhat.com>
sha512sums=('SKIP' 'SKIP')
_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
prepare() {
ln -sf gcc-${pkgver/+/-} gcc
cd gcc
patch -p1 -i "$srcdir/0001-missing-__thiscall-attribute-on-builtin-declaration-of-__cxa_thread_atexit.patch"
# mmapio.c:69:14: error: implicit declaration of function getpagesize
sed -i 's|\-Werror||g' libbacktrace/configure
}
build() {
# Avoid errors due to implicit function declarations and similar issues (which are treated as errors as of GCC 14,
# see https://gcc.gnu.org/gcc-14/porting_to.html)
export CFLAGS_FOR_TARGET=-fpermissive
for _arch in ${_architectures}; do
mkdir -p "$srcdir"/build-${_arch} && cd "$srcdir"/build-${_arch}
"$srcdir"/gcc/configure --prefix=/usr --libexecdir=/usr/lib \
--target=${_arch} \
--with-bugurl=https://bugs.archlinux.org/ \
--enable-languages=ada,c,c++,fortran,lto,objc,obj-c++ \
--enable-shared --enable-static \
--enable-threads=posix --enable-fully-dynamic-string \
--enable-libstdcxx-time=yes --enable-libstdcxx-filesystem-ts=yes \
--with-system-zlib --enable-cloog-backend=isl \
--enable-lto --enable-libgomp \
--disable-multilib --enable-checking=release \
--disable-sjlj-exceptions --with-dwarf2
make
done
}
package() {
for _arch in ${_architectures}; do
cd "$srcdir"/build-${_arch}
make DESTDIR="$pkgdir" install
${_arch}-strip "$pkgdir"/usr/${_arch}/lib/*.dll
strip "$pkgdir"/usr/bin/${_arch}-*
strip "$pkgdir"/usr/lib/gcc/${_arch}/*/{cc1*,collect2,gnat1,f951,lto*}
ln -s ${_arch}-gcc "$pkgdir"/usr/bin/${_arch}-cc
# mv dlls
mkdir -p "$pkgdir"/usr/${_arch}/bin/
mv "$pkgdir"/usr/${_arch}/lib/*.dll "$pkgdir"/usr/${_arch}/bin/
done
strip "$pkgdir"/usr/bin/*
# remove unnecessary files
rm -r "$pkgdir"/usr/share
rm "$pkgdir"/usr/lib/libcc1.*
}

View File

@ -1,9 +1,10 @@
# 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}-static-compat)
pkgver=14.1.1+r1+g43b730b9134
pkgname=({gcc,gcc-libs,lib32-gcc-libs,gcc-fortran,gcc-ada}-static-compat)
pkgver=12.2.0
_majorver=${pkgver%%.*}
_islver=0.24
pkgrel=1
pkgdesc='The GNU Compiler Collection'
arch=(x86_64)
@ -32,20 +33,21 @@ checkdepends=(
options=(!emptydirs !lto debug)
_prefix=/usr/static-compat
_libdir=usr/static-compat/lib/gcc/$CHOST/${pkgver%%+*}
_commit=43b730b9134af60a8f1c5b107d625f7127ff23c5
source=(git+https://sourceware.org/git/gcc.git#commit=$_commit
#source=(https://sourceware.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.xz{,.sig}
# _commit=2ee5e4300186a92ad73f1a1a64cb918dc76c8d67
# 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
gcc-ada-repro.patch
)
validpgpkeys=(F3691687D867B81B51CE07D9BBE43771487328A9 # bpiotrowski@archlinux.org
86CFFCA918CF3AF47147588051E8B148A9999C34 # evangelos@foutrelis.com
13975A70E63C361C73AE69EF6EEB81F8981C74C7 # richard.guenther@gmail.com
D3A93CAD751C2AF4F8C7AD516C35B99309B5FA62) # Jakub Jelinek <jakub@redhat.com>
#sha256sums=('e549cf9cf3594a00e27b6589d4322d70e0720cdd213f39beb4181e06926230ff'
# 'SKIP'
sha256sums=('SKIP'
sha256sums=('e549cf9cf3594a00e27b6589d4322d70e0720cdd213f39beb4181e06926230ff'
'SKIP'
'de48736f6e4153f03d0a5d38ceb6c6fdb7f054e8f47ddd6af0a3dbf14f27b931'
'2513c6d9984dd0a2058557bf00f06d8d5181734e41dcfe07be7ed86f2959622a')
'2513c6d9984dd0a2058557bf00f06d8d5181734e41dcfe07be7ed86f2959622a'
'1773f5137f08ac1f48f0f7297e324d5d868d55201c03068670ee4602babdef2f')
prepare() {
[[ ! -d gcc ]] && ln -s gcc-${pkgver/+/-} gcc
@ -59,6 +61,9 @@ prepare() {
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
# Reproducible gcc-ada
patch -Np0 < "$srcdir/gcc-ada-repro.patch"
mkdir -p "$srcdir/gcc-build"
}
@ -104,23 +109,9 @@ build() {
CFLAGS=${CFLAGS/-Werror=format-security/}
CXXFLAGS=${CXXFLAGS/-Werror=format-security/}
# Fix the check for limits.h and certain other checks by dropping the fortify flag from CPPFLAGS
# note: Otherwise libiberty/config.h lacks HAVE_LIMITS_H and the compilation runs into errors like:
# /build/gcc-static-compat/src/gcc/libiberty/fibheap.c:38:25: error: LONG_MIN undeclared (first use in this function)
# 38 | #define FIBHEAPKEY_MIN LONG_MIN
# | ^~~~~~~~
# /build/gcc-static-compat/src/gcc/libiberty/fibheap.c:220:30: note: in expansion of macro FIBHEAPKEY_MIN
# 220 | if (okey == key && okey != FIBHEAPKEY_MIN)
# | ^~~~~~~~~~~~~~
# /build/gcc-static-compat/src/gcc/libiberty/fibheap.c:36:1: note: LONG_MIN is defined in header <limits.h>; did you forget to #include <limits.h>?
# 35 | #include "fibheap.h"
# +++ |+#include <limits.h>
CPPFLAGS=${CPPFLAGS/-D_FORTIFY_SOURCE=2}
"$srcdir/gcc/configure" \
--enable-languages=c,c++,fortran,lto \
--enable-languages=c,c++,ada,fortran,lto \
$_confflags
make
}
@ -155,6 +146,7 @@ package_gcc-libs-static-compat() {
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
rm -rf "$pkgdir"/$_libdir/include/d/
@ -230,7 +222,7 @@ package_gcc-static-compat() {
make -C gcc DESTDIR="$pkgdir" install-man install-info
rm "$pkgdir"$_prefix/share/man/man1/gfortran.1
rm "$pkgdir"$_prefix/share/info/gfortran.info
rm "$pkgdir"$_prefix/share/info/{gfortran,gnat-style,gnat_rm,gnat_ugn}.info
rm -r "$pkgdir"$_prefix/share/info/dir
make -C libcpp DESTDIR="$pkgdir" install
@ -281,6 +273,44 @@ package_gcc-fortran-static-compat() {
"$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')

View File

@ -0,0 +1,468 @@
# Maintainer: Giancarlo Razzolini <grazzolini@archlinux.org>
# Maintainer: Frederik Schwan <freswa at archlinux dot org>
# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Allan McRae <allan@archlinux.org>
# Contributor: Daniel Kozak <kozzi11@gmail.com>
# 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 <jakub@redhat.com>
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/"
}

Some files were not shown because too many files have changed in this diff Show More