Compare commits

..

1 Commits

Author SHA1 Message Date
Martchus 9187815002 WIP: Add wxhexeditor 2022-07-11 21:37:50 +02:00
827 changed files with 8994 additions and 17029 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:

136
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)
@ -379,17 +272,18 @@ Here are nevertheless some useful hints to run WINE manually:
## Static GNU/Linux libraries
This repository contains several `static-compat-*` packages providing static
libraries intended to distribute "self-contained" executables. These libraries
are built against an older version of glibc to be able to run on older
are built against and older version of glibc to be able to run on older
distributions without having to link against glibc statically. The resulting
binaries should run on distributions with glibc 2.26 or newer (or Linux 4.4 and
newer when linking against glibc statically), e.g. openSUSE Leap 15.0, Fedora
27, Debian 10 and Ubuntu 18.04. The packages might not be updated as regularly
as their normal counterparts but the idea is to provide an environment with a
recent version of GCC/libstdc++ and other libraries such as Qt and Boost but
still be able to run the resulting executables on older distributions.
still be able to run the resulting executables on older distributions. Note that
these packages are still experimental at this point.
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 +315,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,21 +6,18 @@
_reponame=arch-repo-manager
pkgname=arch-repo-manager-git
_name=${pkgname%-git}
_liburing=OFF
pkgver=340.599185d
pkgrel=3
pkgver=297.1ae8604
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' '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')
checkdepends=('cppunit')
provides=(libpkg-git.so librepomgr-git.so)
options=(debug)
options=(!strip)
url="https://github.com/Martchus/${_reponame}"
source=("${_reponame}::${MARTCHUS_GIT_URL_PREFIX:-git+https://github.com/Martchus}/${_reponame}.git"
"lmdb-safe::${MARTCHUS_GIT_URL_PREFIX:-git+https://github.com/Martchus}/lmdb-safe.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,34 +14,26 @@ 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() {
cd "${srcdir}"
# install manually (there's no install target)
mkdir -p "${pkgdir}/usr/"{bin,lib,lib/bento4}
find -iname '*.so' -exec cp --target-directory="${pkgdir}/usr/lib" {} \;
find -maxdepth 1 -executable -type f -exec cp --target-directory="${pkgdir}/usr/bin" {} \;
find Source/Python/utils -iname '*.py' -exec cp --target-directory="${pkgdir}/usr/lib/bento4" {} \;
for file in mp4dash mp4dashclone mp4hls; do
sed -e 's!/../utils/!/../lib/bento4/!' "Source/Python/wrappers/$file" > "${pkgdir}/usr/bin/$file"
chmod 755 "${pkgdir}/usr/bin/$file"
done
# prevent conflict with libmp4v2
suffix=-bento4
for conflicting_file in mp4extract mp4info; do
mv "${pkgdir}/usr/bin/$conflicting_file" "${pkgdir}/usr/bin/$conflicting_file$suffix"
find "${pkgdir}/usr/lib/bento4" -iname '*.py' -exec sed -i -e "s#\(Bento4Command(.*\)\b$conflicting_file\b#\1$conflicting_file$suffix#g" {} \;
mv $conflicting_file $conflicting_file-bento4
done
# install manually (there's no install target)
mkdir -p "${pkgdir}/usr/"{lib,bin}
find -iname '*.so' -exec mv --target-directory="${pkgdir}/usr/lib" {} \;
find -maxdepth 1 -executable -type f -exec mv --target-directory="${pkgdir}/usr/bin" {} \;
}

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

@ -4,7 +4,7 @@
# you also find the URL of a binary repository.
pkgname=blackwidowcontrol
pkgver=1.1.0
pkgver=1.0.2
pkgrel=1
pkgdesc='Python script to enable macro keys of the Razer BlackWidow keyboard under GNU/Linux'
url='https://github.com/Martchus/blackwidowcontrol'
@ -12,7 +12,7 @@ arch=('any')
license=('GPL')
depends=('python-pyusb')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/Martchus/${pkgname}/archive/v${pkgver}.tar.gz")
sha256sums=('bd679a4574de8a4d2b7ab4d56bf57559cf3bff130104636b82d083a62251c00d')
sha256sums=('813a0726c78b8f057adf2d92a731c21e2afcd94d5b518625f4dc118db9d8216c')
package() {
local _srcdir="${srcdir}/${PROJECT_DIR_NAME:-$pkgname-$pkgver}"

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.79.0
_srcname=boost_${pkgver//./_}
pkgrel=1
pkgdesc='Free peer-reviewed portable C++ source libraries (HTML documentation)'
@ -8,8 +8,8 @@ url='https://www.boost.org/'
arch=('x86_64')
license=('custom')
makedepends=()
source=(https://boostorg.jfrog.io/artifactory/main/release/$pkgver/source/$_srcname.tar.bz2)
sha256sums=('71feeed900fbccca04a3b4f2f84a7c217186f28a940ed8b7ed4725986baf99fa')
source=(https://boostorg.jfrog.io/artifactory/main/release/$pkgver/source/$_srcname.tar.gz)
sha256sums=('273f1be93238a068aba4f9735a4a2b003019af067b9c183ed227780b8f36062c')
options=(!strip)
package() {

View File

@ -11,7 +11,7 @@
_pkgname=boost
pkgname=static-compat-$_pkgname
pkgver=1.81.0
pkgver=1.79.0
pkgrel=1
_srcname=boost_${pkgver//./_}
pkgdesc="Free peer-reviewed portable C++ source libraries"
@ -21,19 +21,14 @@ license=('custom')
options=('staticlibs')
depends=('static-compat-zlib' 'static-compat-zstd' 'static-compat-bzip2')
makedepends=('static-compat-environment')
source=(https://boostorg.jfrog.io/artifactory/main/release/$pkgver/source/$_srcname.tar.bz2
boost-1.81.0-phoenix-multiple-definitions.patch
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)
sha256sums=('71feeed900fbccca04a3b4f2f84a7c217186f28a940ed8b7ed4725986baf99fa'
'3ebf428ef6be090a7b56a233330375539ac429333b83708e28fe5db049cfecdb'
sha256sums=('273f1be93238a068aba4f9735a4a2b003019af067b9c183ed227780b8f36062c'
'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
}
@ -79,7 +74,7 @@ package() {
install -d "$pkgdir/$static_compat_prefix"/lib
cp -a fakeinstall/lib/*.a "$pkgdir/$static_compat_prefix"/lib/
cp -a fakeinstall/lib/cmake "$pkgdir/$static_compat_prefix"/lib/
cp -a fakeinstall/{bin,include} "$pkgdir/$static_compat_prefix"/
cp -a fakeinstall/{bin,include,share/boost-build} "$pkgdir/$static_compat_prefix"/
install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" $_srcname/LICENSE_1_0.txt
}

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,8 +5,8 @@
_reponame=cpp-utilities
pkgname=c++utilities
pkgver=5.24.8
pkgrel=1
pkgver=5.17.0
pkgrel=2
arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64')
pkgdesc='Common C++ classes and routines such as argument parser, IO and conversion utilities'
license=('GPL')
@ -17,7 +17,11 @@ 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=('05663fa9ca188cd7be44dc06f1257cfb39b0721443b158a5bbfdaf6400e66505')
prepare() {
cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}"
}
build() {
cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}"

View File

@ -6,15 +6,15 @@
_name=c++utilities
_reponame=cpp-utilities
pkgname=$_name-doc
pkgver=5.24.8
pkgver=5.17.0
pkgrel=1
arch=('any')
pkgdesc='Common C++ classes and routines such as argument parser, IO and conversion utilities (API documentation)'
license=('GPL')
makedepends=('cmake' 'ninja' 'doxygen' 'graphviz')
makedepends=('cmake' 'ninja' 'doxygen' 'dia' '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=('05663fa9ca188cd7be44dc06f1257cfb39b0721443b158a5bbfdaf6400e66505')
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.17.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=('05663fa9ca188cd7be44dc06f1257cfb39b0721443b158a5bbfdaf6400e66505')
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.17.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=('6bb14ed60e3f84ac53cce4c5a16945d7295f49ee9019a29874a59265db6908c3')
prepare() {
cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}"

View File

@ -5,17 +5,14 @@
pkgname=cmake-format
pkgver=0.6.13
pkgrel=3
pkgrel=1
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')
source=("$pkgname-$pkgver.tar.gz::https://github.com/cheshirekow/cmake_format/archive/v${pkgver}.tar.gz")
sha512sums=('eb7fde540860b6119d0bb528f22592fb4b507f9319aeda0999da10bcc89ee1348fd7d701fc49aa5dac7616e1577e436cbd73de94dbbab0cafdf28e1812612342')

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

@ -1,59 +0,0 @@
# Maintainer: Zion Nimchuk <zionnimchuk@gmail.com>
# Contributor: Martchus <martchus@gmx.net>
_pkgbase='cubeb'
pkgname=$_pkgbase-git
pkgver=r1534.dc511c6
provides=("cubeb=$pkgver" 'libcubeb.so')
conflicts=('cubeb')
pkgrel=2
pkgdesc="A cross platform audio library"
arch=('i686' 'x86_64')
url="https://github.com/mozilla/cubeb"
license=('GPL2')
depends=('sndio' 'alsa-lib' 'speexdsp')
makedepends=('git' 'cmake' 'libpulse' 'alsa-lib' 'jack2' 'sndio')
optdepends=('libpulse: for PulseAudio support'
'jack2: for JACK support')
source=("$_pkgbase::git+https://github.com/mozilla/cubeb"
'git+https://github.com/arsenm/sanitizers-cmake')
md5sums=('SKIP'
'SKIP')
pkgver() {
cd "$srcdir/$_pkgbase"
echo "r$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
}
prepare() {
cd "$srcdir/$_pkgbase"
mkdir -p build
git submodule init
git config submodule.cmake/sanitizers-cmake.url "$srcdir/sanitizers-cmake"
git submodule update
}
build() {
cd "$srcdir/$_pkgbase/build"
cmake .. \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_TESTS=False \
-DBUILD_SHARED_LIBS=true \
-DCMAKE_INSTALL_LIBDIR=/usr/lib \
-DUSE_PULSE=true \
-DUSE_ALSA=true \
-DUSE_JACK=true \
-DUSE_SNDIO=true \
-DUSE_OPENSL=false \
-DUSE_KAI=false
# What even is kai?
make
}
package() {
cd "$srcdir/$_pkgbase/build"
make DESTDIR="$pkgdir/" install
}

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

@ -23,7 +23,7 @@ for pkgbuild_file in "${PKGBUILD_DIR:-.}"/*/*/PKGBUILD; do
|| $project_name == 'qt5-webkit' # even revived version is dead
|| $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

@ -8,18 +8,9 @@ expected_version=${versions[qt5]}.*
arch_pkgbuilds=$1
[[ $arch_pkgbuilds ]] && cd "$arch_pkgbuilds"
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
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'],
'3d' => [17, '5fd3906445ac95bf1cca6e7a7e0aeb6e3bcf5016'],
activeqt => [0, '065ae50f6bf947f11b7bcaa3199df99a83667574'],
base => [135, 'e0a15c11b853954d4189b2e30aa2450184de0987'],
charts => [0, '16c2a8821135bf89369c4e3c5a1bdff8b05ffdb5'],
connectivity => [4, '25720ab6004cf37ae54ad85d22f87f5fc9e6e72e'],
datavis3d => [0, '5f8e2a037d5201c902149c828d102b71e90257e2'],
declarative => [17, '51efb2ed2f071beda188270a23ac450fe4b318f7'],
gamepad => [0, '8526b210146a2d030ae2f55ad44261befea4a087'],
graphicaleffects => [0, '4c6ec38635aa22cf0854df8e710733c529f4ec02'],
imageformats => [0, '8c5bcabbf6a2e27539c2ad689fd69f2406d5cf5c'],
location => [2, 'db3b6bc6afed6477e6ab2d8465e41efee30fb6d5'],
lottie => [0, 'ccba2b00bd7f10558edb8664d6b9a95e9fafe6ac'],
multimedia => [0, 'dc0ee181d4c56ff66c989bd3292dad7cc35e234b'],
networkauth => [0, '2b0c9499e4000858138802e8f5aa28aa2ebe14c0'],
purchasing => [0, '397c721847059b998d3b345149a3f6113579d7fe'],
quick3d => [2, 'd52bfdf7d967419a61c2a4492163626096838a99'],
quickcontrols => [0, 'd405bf6a29bc9d6da6e3dcefbd1b88f5ed70fb1b'],
quickcontrols2 => [4, '0d3d39e821ea7634c174a29910c18d7101bce6f7'],
quicktimeline => [0, '2ce816fa5822bcc1c47678447405b2e5dc1312c1'],
remoteobjects => [0, '809412e1cc2151c21f843796ef67705600f6aafb'],
scxml => [0, 'dcbd73cf3e8a07dbfa249d7db2257caafa83781b'],
sensors => [0, '1ab8d6c7257f9ec060739b648704be1cf1c16b05'],
serialbus => [0, 'e34053fbda8d687e3dc294fbd5e3a88bf94a7a66'],
serialport => [0, '191e67e428522a0e2e1e8d2f3440607a9760d441'],
speech => [1, 'c8a1dadc46ccdbeaef45aa805a9dc98d4b3220bd'],
svg => [10, '23b8cf7d833c335d7735855570c05e9e0893a9b7'],
tools => [0, '53ee43a51b5a3de2877dafffc78e71ff55926708'],
translations => [2, '527dcd684e8d5c645870c854b86df77edeedbc22'],
virtualkeyboard => [3, 'e8ae4757dd32e8dbf69a7c57f2bc5c1e238416db'],
wayland => [38, '36659e6130ed3fc2b3f0c91423408ef5ecb7b991'],
webchannel => [3, '8c842152da613f941892481d62267c73c4a4f006'],
webglplugin => [0, 'df60c61e640dc4fb6be0d9565a4ab08aee054f93'],
websockets => [3, '6a4991250793cd38efa5e8db858cd49c82439130'],
webview => [0, '826d2a33929c69807917536d48b7861e7682001e'],
winextras => [0, '96cfbd36ad9979ff1974cf137b68b9ae101022c3'],
x11extras => [0, '51b0a5a2e3e35f4cb17da1e7cb4babef6294bfb4'],
xmlpatterns => [0, 'dfcae10dec8c1c2c544ad0cd303cea113b0af51d'],
);
# $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.3.1
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) {
@ -97,7 +96,7 @@ package() {
source android-env ${_android_arch}
DESTDIR="$pkgdir" cmake --install build-$_android_arch
install -Dm644 $_pkgfqn/LICENSES/* -t "$pkgdir"/usr/share/licenses/$pkgname
install -Dm644 $_pkgfqn/LICENSE* -t "$pkgdir"/usr/share/licenses/$pkgname
# Drop QMAKE_PRL_BUILD_DIR because reference the build dir
find "$pkgdir/${ANDROID_PREFIX}/<%== $static_variant ? 'static/' : '' %>" -type f -name '*.prl' \\

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.4<%== $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,10 +23,8 @@ pkgname=mingw-w64-qt5-<%== $qt_module %><%== $static_variant ? '-static' : '' %>
<%== content %>\
% if ($kde_fork_revision) {
_commit=<%== $kde_fork_revision->[1] %>
_basever=${pkgver%%+*}
% if ($kde_fork_revision->[0] > 0) {
_basever=$pkgver
pkgver+=+kde+r<%== $kde_fork_revision->[0] %>
% }
makedepends+=('git')
% } elsif (stash('is_lts')) {
makedepends+=('git')

View File

@ -14,14 +14,14 @@
% }
pkgname=<%= $package_name %>
_qtver=6.7.0
_qtver=6.3.1
pkgver=${_qtver/-/}
pkgrel=1
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 \\
@ -101,7 +85,7 @@ package() {
for _arch in ${_architectures}; do
DESTDIR="$pkgdir" cmake --install build-$_arch
install -Dm644 $_pkgfqn/LICENSES/* -t "$pkgdir"/usr/share/licenses/$pkgname
install -Dm644 $_pkgfqn/LICENSE* -t "$pkgdir"/usr/share/licenses/$pkgname
% unless ($static_variant) {
# Add symlinks of DLLs in usual bin directory

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.3.1
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')
@ -102,7 +102,7 @@ package() {
source static-compat-environment
DESTDIR="$pkgdir" cmake --install build
install -Dm644 $_pkgfqn/LICENSES/* -t "$pkgdir"/usr/share/licenses/$pkgname
install -Dm644 $_pkgfqn/LICENSE* -t "$pkgdir"/usr/share/licenses/$pkgname
# Drop QMAKE_PRL_BUILD_DIR because reference the build dir
find "$pkgdir" -type f -name '*.prl' \\

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

@ -1,73 +0,0 @@
#!/bin/bash
set -e # abort on first error
shopt -s nullglob
source "$(dirname $0)/../versions.sh"
gh_user=Martchus
new_release_date=$(date --iso-8601)
old_release_date_regex='set\(META_RELEASE_DATE "([^\)]*)"\)'
# read project dirs; split colon separated path
OIFS=$IFS
IFS=':'
for dir in $DEFAULT_PROJECTS_DIR; do
projectsdirs+=("$dir")
done
IFS=$OIFS
# check whether the project will be released and set the current day as release date then
for project in "${!versions[@]}"
do
version=${versions[$project]}
gh_name=${github_names[$project]:-$project}
[[ $gh_name == 'skip' ]] && continue
[[ $version == 'none' ]] && continue
echo '------------------------------------------------------------------------'
echo "NEXT: $project -> $version"
# check whether release already exists
if github-release info --user "$gh_user" --repo "$gh_name" --tag "v$version"; then
echo "skipping $project -> v$version; release already present"
continue
fi
# locate project
project_dir=
for dir in "${projectsdirs[@]}"; do
[[ -d $dir/$project ]] && project_dir=$dir/$project && break
done
if [[ ! $project_dir ]]; then
echo "FAILURE: Unable to locate checkout of $project"
continue
fi
echo "entering '$project_dir'"
cd "$project_dir"
# check current release date
cmake_lists=$(cat CMakeLists.txt)
if ! [[ $cmake_lists =~ $old_release_date_regex ]]; then
echo "FAILURE: Unable to read current release date from CMakeLists.txt:\n$cmake_lists"
continue
fi
old_release_date=${BASH_REMATCH[1]}
if [[ $old_release_date == "$new_release_date" ]]; then
echo "skipping $project -> release date $old_release_date does not change"
continue
fi
if ! [ -z "$(git status --porcelain)" ]; then
echo "FAILURE: Git checkout '$PWD' is not clean"
continue
fi
# promt
read -p "update release date of $project -> v$version [y/n]? " -n 1 -r
echo
[[ $REPLY =~ ^[Yy]$ ]] || continue
# update release date
sed -i -e "s|set(META_RELEASE_DATE.*|set(META_RELEASE_DATE \"$new_release_date\")|" CMakeLists.txt
git add CMakeLists.txt
git commit -m 'Update release date'
git push
done

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.2.1
[c++utilities]=5.17.0
[qtutilities]=6.6.2
[qtforkawesome]=0.0.4
[tagparser]=11.3.0
[tageditor]=3.7.3
[passwordfile]=5.0.7
[passwordmanager]=4.1.9
[videodownloader]=1.3.6
[reflective-rapidjson]=0.0.15
[blackwidowcontrol]=1.1.0
[blackwidowcontrol]=1.0.2
[dbus-soundrecorder]=1.2.3
[geocoordinatecalculator]=1.1.3
[qt5]=5.15.13
[qt6]=6.7.0
[qt5]=5.15.4
[qt6]=6.3.1
)
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=20211129
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

@ -5,7 +5,7 @@
_pkgname=double-conversion
pkgname=static-compat-$_pkgname
pkgver=3.2.1
pkgver=3.2.0
pkgrel=1
pkgdesc='Binary-decimal and decimal-binary routines for IEEE doubles'
arch=(x86_64)
@ -14,7 +14,7 @@ license=(BSD)
depends=(gcc-libs-static-compat)
makedepends=(static-compat-cmake)
source=(https://github.com/google/double-conversion/archive/v$pkgver/$_pkgname-$pkgver.tar.gz)
sha256sums=('e40d236343cad807e83d192265f139481c51fc83a1c49e406ac6ce0a0ba7cd35')
sha256sums=('3dbcdf186ad092a8b71228a5962009b5c96abde9a315257a3452eb988414ea3b')
build() {
source static-compat-environment

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,8 +9,8 @@
_name=ffmpeg
pkgname=ffmpeg-custom
pkgver=6.1.1
pkgrel=1
pkgver=5.0.1
pkgrel=2
epoch=1
pkgdesc='Complete solution to record, convert and stream audio and video (with more features enabled than regular ffmpeg)'
arch=('x86_64')
@ -20,11 +20,8 @@ depends=(
alsa-lib
aom
bzip2
cairo
fontconfig
fribidi
glib2
glibc
gmp
gnutls
gsm
@ -33,22 +30,16 @@ depends=(
libass.so
libavc1394
libbluray.so
libbs2b.so
libdav1d.so
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
@ -70,48 +61,41 @@ depends=(
libxv
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
nasm
opencl-headers
vulkan-headers
opencl-clhpp
openal
)
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 +110,27 @@ provides=(
"ffmpeg-librsvg=$pkgver"
)
conflicts=("$_name")
options=(
debug
)
_tag=6f4048827982a8f48f71f551a6e1ed2362816eec
_tag=9687cae2b468e09e35df4cea92cc2e6a0e6c93b3
source=(
git+https://git.ffmpeg.org/ffmpeg.git#tag=${_tag}
ffmpeg-vmaf2.x.patch
add-av_stream_get_first_dts-for-chromium.patch
)
b2sums=('SKIP'
'555274228e09a233d92beb365d413ff5c718a782008075552cafb2130a3783cf976b51dfe4513c15777fb6e8397a34122d475080f2c4483e8feea5c0d878e6de')
validpgpkeys=(DD1EC9E8DE085C629B3E1846B18E8928B3948D64) # Michael Niedermayer <michael@niedermayer.cc>
b2sums=(
SKIP
65039aac811bfd143359e32720cd6ca64124f1789c1b624bd28a5bd75b37362b2a3b6b402203c4e9d137fb1d00895114f3789df40f8381091d38c98e7876cc8a
3f2ee7606500fa9444380d138959cd2bccfbba7d34629a17f4f6288c6bde29e931bbe922a7c25d861f057ddd4ba0b095bbd675c1930754746d5dd476b3ccbc13
)
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
git cherry-pick -n 988f2e9eb063db7c1a678729f58aab6eba59a55b # fix nvenc on older gpus
patch -Np1 -i ../ffmpeg-vmaf2.x.patch # vmaf 2.x support
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() {
@ -175,7 +151,6 @@ build() {
--enable-cuda-llvm \
--enable-lto \
--enable-fontconfig \
--enable-frei0r \
--enable-gmp \
--enable-gnutls \
--enable-gpl \
@ -183,28 +158,22 @@ build() {
--enable-libaom \
--enable-libass \
--enable-libbluray \
--enable-libbs2b \
--enable-libdav1d \
--enable-libfreetype \
--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 +184,6 @@ build() {
--enable-libvidstab \
--enable-libvmaf \
--enable-libvorbis \
--enable-libvpl \
--enable-libvpx \
--enable-libwebp \
--enable-libx264 \
@ -226,16 +194,15 @@ build() {
--enable-libzimg \
--enable-nvdec \
--enable-nvenc \
--enable-opencl \
--enable-opengl \
--enable-omx \
--enable-shared \
--enable-version3 \
--enable-vulkan \
--enable-libfdk_aac \
--enable-vaapi \
--enable-vdpau \
--enable-opencl \
--enable-openal \
--enable-vulkan \
--enable-nonfree
# note: removing --enable-libglslang for now due to "ERROR: libglslang not found"

View File

@ -1,7 +1,19 @@
diff '--color=auto' -rupN ffmpeg.orig/libavformat/avformat.h ffmpeg/libavformat/avformat.h
--- ffmpeg.orig/libavformat/avformat.h 2022-08-19 17:42:47.323422603 +0200
+++ ffmpeg/libavformat/avformat.h 2022-08-19 17:42:51.347130436 +0200
@@ -1128,6 +1128,10 @@ struct AVCodecParserContext *av_stream_g
From 95aab0fd83619408995720ce53d7a74790580220 Mon Sep 17 00:00:00 2001
From: "liberato@chromium.org" <liberato@chromium.org>
Date: Wed, 7 Jul 2021 19:01:22 -0700
Subject: [PATCH] Add av_stream_get_first_dts for Chromium
[foutrelis: adjust for new FFStream struct replacing AVStreamInternal]
---
libavformat/avformat.h | 4 ++++
libavformat/utils.c | 7 +++++++
2 files changed, 11 insertions(+)
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index cd7b0d941c..b4a6dce885 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -1010,6 +1010,10 @@ struct AVCodecParserContext *av_stream_get_parser(const AVStream *s);
*/
int64_t av_stream_get_end_pts(const AVStream *st);
@ -12,10 +24,11 @@ diff '--color=auto' -rupN ffmpeg.orig/libavformat/avformat.h ffmpeg/libavformat/
#define AV_PROGRAM_RUNNING 1
/**
diff '--color=auto' -rupN ffmpeg.orig/libavformat/mux_utils.c ffmpeg/libavformat/mux_utils.c
--- ffmpeg.orig/libavformat/mux_utils.c 2022-08-19 17:42:47.346758108 +0200
+++ ffmpeg/libavformat/mux_utils.c 2022-08-19 17:47:28.549589002 +0200
@@ -37,6 +37,13 @@ int64_t av_stream_get_end_pts(const AVSt
diff --git a/libavformat/utils.c b/libavformat/utils.c
index de7580c32d..0ef0fe530e 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -121,6 +121,13 @@ int64_t av_stream_get_end_pts(const AVStream *st)
return AV_NOPTS_VALUE;
}
@ -26,6 +39,6 @@ diff '--color=auto' -rupN ffmpeg.orig/libavformat/mux_utils.c ffmpeg/libavformat
+}
+// Chromium: We use the internal field first_dts ^^^
+
int avformat_query_codec(const AVOutputFormat *ofmt, enum AVCodecID codec_id,
int std_compliance)
struct AVCodecParserContext *av_stream_get_parser(const AVStream *st)
{
return st->internal->parser;

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
}

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