Compare commits

...

44 commits
edge ... v3.18

Author SHA1 Message Date
8d2350f5f4
forgejo-ci: use new forge repo 2024-08-21 10:56:27 -04:00
87ab391f09
README: update name 2024-08-12 12:56:35 -04:00
5cd6147d3a
README: update upstream 2024-08-12 12:55:38 -04:00
73cb204fc8
forgejo: initial implementation 2024-08-12 12:44:46 -04:00
bcb8f4a8ed
gitlab-ci: drop in favor of forgejo actions 2024-08-12 12:44:43 -04:00
1246c83c96
README.md: new repo location 2024-08-10 16:34:30 -04:00
583e4c78d5
gitlab-ci: use git-annex instead of git-lfs 2024-08-10 11:36:13 -04:00
2fe9942076
README: update for codeberg 2024-08-09 22:47:39 -04:00
521f420b21
user/zotero: upgrade to 7.0.0_beta57
l
2024-02-03 15:45:05 -05:00
7f268c3aaf
user/zotero: remove conflict with firefox-esr 2024-02-03 01:15:42 -05:00
2de862f68a
user/zotero: merge with firefox-esr 2024-02-02 23:56:13 -05:00
f890ad4479
user/firefox-esr: upgrade to 102.15.1 2024-01-31 23:00:19 -05:00
a3e0cf8b4f
user/zotero: upgrade to 7.0.0_git20240131 2024-01-31 22:49:09 -05:00
363dd4d7bf
backports/uranium: attempt int fix 2024-01-18 21:52:44 -05:00
bf854b7178
backports/uranium: fix SimpleButton bug 2024-01-18 21:30:47 -05:00
2d514ba200
backports/libspatialindex: new aport 2024-01-18 16:01:51 -05:00
a7d22ff9e5
backports/py3-svgpath: new aport 2024-01-18 15:38:47 -05:00
394c3e514b
backports/py3-rtree: new aport 2024-01-18 15:38:38 -05:00
38835d8697
backports/py3-pyinstrument: new aport 2024-01-18 15:38:29 -05:00
b059719a92
backports/py3-mapbox-earcut: new aport 2024-01-18 15:38:16 -05:00
18e87b0f9b
backports/libnest2: new aport 2024-01-18 15:38:06 -05:00
9cda465dc0
backports/py3-trimesh: new aport 2024-01-18 15:08:38 -05:00
4a6a864264
backports/nlopt: new aport 2024-01-18 15:08:23 -05:00
c80c39ddb0
backports/py3-utils: new aport 2024-01-18 15:07:55 -05:00
a7ec354240
backports/py3-pyqt6-sig: new aport 2024-01-18 15:07:18 -05:00
b7d9bea36e
backports/uranium: new aports 2024-01-18 15:03:42 -05:00
5c8d8ccd4e
backports/py3-qt6: new aports 2024-01-18 15:03:29 -05:00
aef6eb387e
backports/py3-pynest2d: new aports 2024-01-18 15:03:20 -05:00
c96ea5cc38
backports/py3-numpy-stl: new aports 2024-01-18 15:03:09 -05:00
4da665ff3a
backports/fdm-materials: new aports 2024-01-18 15:02:57 -05:00
7e2d4d3676
backports/py3-arcus: new aport 2024-01-18 14:59:08 -05:00
35ef17bf96
backports/cura: new aport 2024-01-18 14:58:46 -05:00
b3f75d6ca0
user/gitlab-foss: enable aarch64 2023-11-27 21:32:50 -05:00
6b902e8e1a
gitlab-ci: enable aarch64 builders 2023-11-27 21:12:19 -05:00
39194a3036
user/gitaly: upgrade to 16.3.6 2023-11-27 21:10:15 -05:00
341632fd16
user/gitlab-shell: upgrade to 14.26.0 2023-11-27 21:05:35 -05:00
0d290bee25
user/gitlab-foss: upgrade to 16.3.6 2023-11-27 20:56:18 -05:00
71db2e35c9
*/*: initial aarch64 port 2023-11-24 12:37:55 -05:00
bcd2ed707d user/caprine: upgrade to 2.59.1 2023-11-12 02:29:42 +00:00
c198ae525b
user/gitlab-foss: upgrade to 16.2.8 2023-10-02 10:42:57 -04:00
33f1541e0d user/gitlab-foss: upgrade to 16.2.7 2023-09-19 16:43:03 +00:00
a04086bcb5
user/mastodon: upgrade to 4.1.8 2023-09-19 12:06:23 -04:00
da9843e44f
user/gitlab-foss: upgrade to 16.2.5 2023-09-01 14:59:17 -04:00
5bdf21e125
user/authentik: security upgrade to 2023.5.6 2023-09-01 14:21:44 -04:00
98 changed files with 2847 additions and 2368 deletions

26
.forgejo/bin/deploy.sh Executable file
View file

@ -0,0 +1,26 @@
#!/bin/sh
# shellcheck disable=SC3040
set -eu -o pipefail
readonly REPOS="backports user"
readonly BASEBRANCH=$GITHUB_BASE_REF
readonly TARGET_REPO=$CI_ALPINE_REPO
apkgs=$(find package -type f -name "*.apk")
for apk in $apkgs; do
branch=$(echo $apk | awk -F '/' '{print $2}')
arch=$(echo $apk | awk -F '/' '{print $3}')
name=$(echo $apk | awk -F '/' '{print $4}')
echo "Sending $name of arch $arch to $TARGET_REPO/$BASEBRANCH/$branch"
return=$(curl -s --user $FORGE_REPO_USER:$FORGE_REPO_TOKEN --upload-file $apk $TARGET_REPO/$BASEBRANCH/$branch 2>&1)
echo $return
if [ "$return" == "package file already exists" ]; then
echo "Package already exists, refreshing..."
curl -s --user $FORGE_REPO_USER:$FORGE_REPO_TOKEN -X DELETE $TARGET_REPO/$BASEBRANCH/$branch/$arch/$name
curl -s --user $FORGE_REPO_USER:$FORGE_REPO_TOKEN --upload-file $apk $TARGET_REPO/$BASEBRANCH/$branch
fi
done

View file

@ -0,0 +1,66 @@
diff --git a/usr/local/bin/build.sh.orig b/usr/local/bin/build.sh
old mode 100644
new mode 100755
index c3b8f7a..f609018
--- a/usr/local/bin/build.sh.orig
+++ b/usr/local/bin/build.sh
@@ -7,13 +7,15 @@
set -eu -o pipefail
readonly APORTSDIR=$CI_PROJECT_DIR
-readonly REPOS="main community testing non-free"
+readonly REPOS="backports user"
+readonly ALPINE_REPOS="main community testing"
readonly ARCH=$(apk --print-arch)
# gitlab variables
readonly BASEBRANCH=$CI_MERGE_REQUEST_TARGET_BRANCH_NAME
: "${REPODEST:=$HOME/packages}"
-: "${MIRROR:=https://dl-cdn.alpinelinux.org/alpine}"
+: "${MIRROR:=https://ayakael.net/api/packages/forge/alpine}"
+: "${ALPINE_MIRROR:=http://dl-cdn.alpinelinux.org/alpine}"
: "${MAX_ARTIFACT_SIZE:=300000000}" #300M
: "${CI_DEBUG_BUILD:=}"
@@ -68,8 +70,8 @@ report() {
get_release() {
case $BASEBRANCH in
- *-stable) echo v"${BASEBRANCH%-*}";;
- master) echo edge;;
+ v*) echo v"${BASEBRANCH%-*}";;
+ edge) echo edge;;
*) die "Branch \"$BASEBRANCH\" not supported!"
esac
}
@@ -101,11 +103,11 @@ set_repositories_for() {
release=$(get_release)
for repo in $REPOS; do
[ "$repo" = "non-free" ] && continue
- [ "$release" != "edge" ] && [ "$repo" == "testing" ] && continue
+ [ "$release" == "edge" ] && [ "$repo" == "backports" ] && continue
repos="$repos $MIRROR/$release/$repo $REPODEST/$repo"
[ "$repo" = "$target_repo" ] && break
done
- doas sh -c "printf '%s\n' $repos > /etc/apk/repositories"
+ doas sh -c "printf '%s\n' $repos >> /etc/apk/repositories"
doas apk update
}
@@ -118,7 +120,15 @@ apply_offset_limit() {
}
setup_system() {
- doas sh -c "echo $MIRROR/$(get_release)/main > /etc/apk/repositories"
+ local repos='' repo=''
+ local release
+
+ release=$(get_release)
+ for repo in $ALPINE_REPOS; do
+ [ "$release" != "edge" ] && [ "$repo" == "testing" ] && continue
+ repos="$repos $ALPINE_MIRROR/$release/$repo"
+ done
+ doas sh -c "printf '%s\n' $repos > /etc/apk/repositories"
doas apk -U upgrade -a || apk fix || die "Failed to up/downgrade system"
abuild-keygen -ain
doas sed -i -E 's/export JOBS=[0-9]+$/export JOBS=$(nproc)/' /etc/abuild.conf

View file

@ -0,0 +1,52 @@
on:
pull_request:
types: [ assigned, opened, synchronize, reopened ]
jobs:
build-aarch64:
runs-on: aarch64
container:
image: alpinelinux/alpine-gitlab-ci:latest
env:
CI_PROJECT_DIR: ${{ github.workspace }}
CI_DEBUG_BUILD: ${{ runner.debug }}
CI_MERGE_REQUEST_PROJECT_URL: ${{ github.server_url }}/${{ github.repository }}
CI_MERGE_REQUEST_TARGET_BRANCH_NAME: ${{ github.base_ref }}
steps:
- name: Environment setup
run: |
doas apk add nodejs git patch curl
cd /etc/apk/keys
doas curl -JO https://ayakael.net/api/packages/forge/alpine/key
- name: Repo pull
uses: actions/checkout@v4
with:
fetch-depth: 500
- name: Package build
run: |
doas patch -d / -p1 -i ${{ github.workspace }}/.forgejo/patches/build.patch
build.sh
- name: Package upload
uses: forgejo/upload-artifact@v3
with:
name: package
path: packages
deploy-aarch64:
needs: [build-aarch64]
runs-on: aarch64
container:
image: alpine:latest
env:
CI_ALPINE_REPO: 'https://ayakael.net/api/packages/forge/alpine'
FORGE_REPO_TOKEN: ${{ secrets.FORGE_REPO_TOKEN }}
FORGE_REPO_USER: ${{ vars.FORGE_REPO_USER }}
steps:
- name: Setting up environment
run: apk add nodejs curl findutils git gawk
- name: Repo pull
uses: actions/checkout@v4
- name: Package download
uses: forgejo/download-artifact@v3
- name: Package deployment
run: ${{ github.workspace }}/.forgejo/bin/deploy.sh

View file

@ -0,0 +1,52 @@
on:
pull_request:
types: [ assigned, opened, synchronize, reopened ]
jobs:
build-x86_64:
runs-on: x86_64
container:
image: alpinelinux/alpine-gitlab-ci:latest
env:
CI_PROJECT_DIR: ${{ github.workspace }}
CI_DEBUG_BUILD: ${{ runner.debug }}
CI_MERGE_REQUEST_PROJECT_URL: ${{ github.server_url }}/${{ github.repository }}
CI_MERGE_REQUEST_TARGET_BRANCH_NAME: ${{ github.base_ref }}
steps:
- name: Environment setup
run: |
doas apk add nodejs git patch curl
cd /etc/apk/keys
doas curl -JO https://ayakael.net/api/packages/forge/alpine/key
- name: Repo pull
uses: actions/checkout@v4
with:
fetch-depth: 500
- name: Package build
run: |
doas patch -d / -p1 -i ${{ github.workspace }}/.forgejo/patches/build.patch
build.sh
- name: Package upload
uses: forgejo/upload-artifact@v3
with:
name: package
path: packages
deploy-x86_64:
needs: [build-x86_64]
runs-on: x86_64
container:
image: alpine:latest
env:
CI_ALPINE_REPO: 'https://ayakael.net/api/packages/forge/alpine'
FORGE_REPO_TOKEN: ${{ secrets.FORGE_REPO_TOKEN }}
FORGE_REPO_USER: ${{ vars.FORGE_REPO_USER }}
steps:
- name: Setting up environment
run: apk add nodejs curl findutils git gawk
- name: Repo pull
uses: actions/checkout@v4
- name: Package download
uses: forgejo/download-artifact@v3
- name: Package deployment
run: ${{ github.workspace }}/.forgejo/bin/deploy.sh

View file

@ -0,0 +1,21 @@
on:
pull_request:
types: [ assigned, opened, synchronize, reopened ]
jobs:
lint:
run-name: lint
runs-on: x86_64
container:
image: alpinelinux/apkbuild-lint-tools:latest
env:
CI_PROJECT_DIR: ${{ github.workspace }}
CI_DEBUG_BUILD: ${{ runner.debug }}
CI_MERGE_REQUEST_PROJECT_URL: ${{ github.server_url }}/${{ github.repository }}
CI_MERGE_REQUEST_TARGET_BRANCH_NAME: ${{ github.base_ref }}
steps:
- run: doas apk add nodejs git
- uses: actions/checkout@v4
with:
fetch-depth: 500
- run: lint

View file

@ -1,101 +0,0 @@
stages:
- verify
- build
- deploy
variables:
GIT_STRATEGY: clone
GIT_DEPTH: "500"
lint:
stage: verify
interruptible: true
script:
- |
sudo apk add shellcheck atools sudo abuild
export PATH="$PATH:$CI_PROJECT_DIR/.gitlab/bin"
lint
allow_failure: true
only:
- merge_requests
tags:
- apk-$CI_MERGE_REQUEST_TARGET_BRANCH_NAME-x86_64
.build:
stage: build
interruptible: true
script:
- |
sudo apk add alpine-sdk lua-aports sudo
sudo addgroup $USER abuild
export PATH="$PATH:$CI_PROJECT_DIR/.gitlab/bin"
sudo -Eu $USER build.sh
artifacts:
paths:
- packages/
- keys/
- logs/
expire_in: 7 days
only:
- merge_requests
.cross:
stage: build
interruptible: true
script:
- |
sudo apk add alpine-sdk lua-aports sudo gzip xz qemu-$CI_QEMU_TARGET_ARCH
sudo addgroup $USER abuild
export PATH="$PATH:$CI_PROJECT_DIR/.gitlab/bin"
build-rootfs.sh alpine${CI_MERGE_REQUEST_TARGET_BRANCH_NAME/v} $CI_ALPINE_TARGET_ARCH --rootfsdir $HOME/sysroot-$CI_ALPINE_TARGET_ARCH
cp /etc/apk/repositories $HOME/sysroot-$CI_ALPINE_TARGET_ARCH/etc/apk/.
sudo -Eu $USER CHOST=$CI_TARGET_ALPINE_ARCH build.sh
artifacts:
paths:
- packages/
- keys/
- logs/
expire_in: 7 days
only:
- merge_requests
build-x86_64:
extends: .build
when: always
tags:
- apk-$CI_MERGE_REQUEST_TARGET_BRANCH_NAME-x86_64
build-ppc64le:
extends: .build
when: manual
tags:
- apk-$CI_MERGE_REQUEST_TARGET_BRANCH_NAME-ppc64le
build-s390x:
extends: .build
when: manual
tags:
- apk-$CI_MERGE_REQUEST_TARGET_BRANCH_NAME-s390x
build-armv7:
extends: .cross
when: manual
tags:
- apk-$CI_MERGE_REQUEST_TARGET_BRANCH_NAME-x86_64
variables:
CI_ALPINE_TARGET_ARCH: armv7
CI_QEMU_TARGET_ARCH: arm
push:
interruptible: true
stage: deploy
script:
- |
sudo apk add abuild git-lfs findutils
export PATH="$PATH:$CI_PROJECT_DIR/.gitlab/bin"
push.sh
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
when: manual
tags:
- repo

View file

@ -1,111 +0,0 @@
#!/bin/sh
set -e
arch=
builddir=
checkdepends=
depends=
depends_dev=
depends_doc=
depends_libs=
depends_openrc=
depends_static=
install=
install_if=
langdir=
ldpath=
license=
makedepends=
makedepends_build=
makedepends_host=
md5sums=
options=
patch_args=
pkgbasedir=
pkgdesc=
pkgdir=
pkgname=
pkgrel=
pkgver=
pkggroups=
pkgusers=
provides=
provider_priority=
replaces=
sha256sums=
sha512sums=
sonameprefix=
source=
srcdir=
startdir=
subpackages=
subpkgdir=
subpkgname=
triggers=
url=
# abuild.conf
CFLAGS=
CXXFLAGS=
CPPFLAGS=
LDFLAGS=
JOBS=
MAKEFLAGS=
CMAKE_CROSSOPTS=
. ./APKBUILD
: "$arch"
: "$builddir"
: "$checkdepends"
: "$depends"
: "$depends_dev"
: "$depends_doc"
: "$depends_libs"
: "$depends_openrc"
: "$depends_static"
: "$install"
: "$install_if"
: "$langdir"
: "$ldpath"
: "$license"
: "$makedepends"
: "$makedepends_build"
: "$makedepends_host"
: "$md5sums"
: "$options"
: "$patch_args"
: "$pkgbasedir"
: "$pkgdesc"
: "$pkgdir"
: "$pkgname"
: "$pkgrel"
: "$pkgver"
: "$pkggroups"
: "$pkgusers"
: "$provides"
: "$provider_priority"
: "$replaces"
: "$sha256sums"
: "$sha512sums"
: "$sonameprefix"
: "$source"
: "$srcdir"
: "$startdir"
: "$subpackages"
: "$subpkgdir"
: "$subpkgname"
: "$triggers"
: "$url"
# abuild.conf
: "$CFLAGS"
: "$CXXFLAGS"
: "$CPPFLAGS"
: "$LDFLAGS"
: "$JOBS"
: "$MAKEFLAGS"
: "$CMAKE_CROSSOPTS"

View file

@ -1,16 +0,0 @@
#!/bin/sh
shellcheck -s ash \
-e SC3043 \
-e SC3057 \
-e SC3060 \
-e SC2016 \
-e SC2086 \
-e SC2169 \
-e SC2155 \
-e SC2100 \
-e SC2209 \
-e SC2030 \
-e SC2031 \
-e SC1090 \
-xa $CI_PROJECT_DIR/.gitlab/bin/APKBUILD_SHIM

View file

@ -1,556 +0,0 @@
#!/usr/bin/env bash
# Availabl here: https://lab.ilot.io/dotnet/arcade/-/blob/7f6d9796cc7f594772f798358dbdd8c69b6a97af/eng/common/cross/build-rootfs.sh
# Only modification: qemu-$arch-static becomes qemu-$arch
set -e
usage()
{
echo "Usage: $0 [BuildArch] [CodeName] [lldbx.y] [llvmx[.y]] [--skipunmount] --rootfsdir <directory>]"
echo "BuildArch can be: arm(default), arm64, armel, armv6, ppc64le, riscv64, s390x, x64, x86"
echo "CodeName - optional, Code name for Linux, can be: xenial(default), zesty, bionic, alpine"
echo " for alpine can be specified with version: alpineX.YY or alpineedge"
echo " for FreeBSD can be: freebsd12, freebsd13"
echo " for illumos can be: illumos"
echo " for Haiku can be: haiku."
echo "lldbx.y - optional, LLDB version, can be: lldb3.9(default), lldb4.0, lldb5.0, lldb6.0 no-lldb. Ignored for alpine and FreeBSD"
echo "llvmx[.y] - optional, LLVM version for LLVM related packages."
echo "--skipunmount - optional, will skip the unmount of rootfs folder."
echo "--use-mirror - optional, use mirror URL to fetch resources, when available."
echo "--jobs N - optional, restrict to N jobs."
exit 1
}
__CodeName=xenial
__CrossDir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
__BuildArch=arm
__AlpineArch=armv7
__FreeBSDArch=arm
__FreeBSDMachineArch=armv7
__IllumosArch=arm7
__QEMUArch=arm
__UbuntuArch=armhf
__UbuntuRepo="http://ports.ubuntu.com/"
__LLDB_Package="liblldb-3.9-dev"
__SkipUnmount=0
# base development support
__UbuntuPackages="build-essential"
__AlpinePackages="alpine-base"
__AlpinePackages+=" build-base"
# symlinks fixer
__UbuntuPackages+=" symlinks"
# runtime dependencies
__UbuntuPackages+=" libicu-dev"
__UbuntuPackages+=" liblttng-ust-dev"
__UbuntuPackages+=" libunwind8-dev"
__UbuntuPackages+=" libnuma-dev"
# runtime libraries' dependencies
__UbuntuPackages+=" libcurl4-openssl-dev"
__UbuntuPackages+=" libkrb5-dev"
__UbuntuPackages+=" libssl-dev"
__UbuntuPackages+=" zlib1g-dev"
__FreeBSDBase="12.3-RELEASE"
__FreeBSDPkg="1.17.0"
__FreeBSDABI="12"
__FreeBSDPackages="libunwind"
__FreeBSDPackages+=" icu"
__FreeBSDPackages+=" libinotify"
__FreeBSDPackages+=" openssl"
__FreeBSDPackages+=" krb5"
__FreeBSDPackages+=" terminfo-db"
__IllumosPackages="icu"
__IllumosPackages+=" mit-krb5"
__IllumosPackages+=" openssl"
__IllumosPackages+=" zlib"
__HaikuPackages="gmp"
__HaikuPackages+=" gmp_devel"
__HaikuPackages+=" krb5"
__HaikuPackages+=" krb5_devel"
__HaikuPackages+=" libiconv"
__HaikuPackages+=" libiconv_devel"
__HaikuPackages+=" llvm12_libunwind"
__HaikuPackages+=" llvm12_libunwind_devel"
__HaikuPackages+=" mpfr"
__HaikuPackages+=" mpfr_devel"
# ML.NET dependencies
__UbuntuPackages+=" libomp5"
__UbuntuPackages+=" libomp-dev"
__Keyring=
__UseMirror=0
__UnprocessedBuildArgs=
while :; do
if [[ "$#" -le 0 ]]; then
break
fi
lowerI="$(echo "$1" | tr "[:upper:]" "[:lower:]")"
case $lowerI in
-\?|-h|--help)
usage
exit 1
;;
arm)
__BuildArch=arm
__UbuntuArch=armhf
__AlpineArch=armv7
__QEMUArch=arm
;;
arm64)
__BuildArch=arm64
__UbuntuArch=arm64
__AlpineArch=aarch64
__QEMUArch=aarch64
__FreeBSDArch=arm64
__FreeBSDMachineArch=aarch64
;;
armel)
__BuildArch=armel
__UbuntuArch=armel
__UbuntuRepo="http://ftp.debian.org/debian/"
__CodeName=jessie
;;
armv6)
__BuildArch=armv6
__UbuntuArch=armhf
__QEMUArch=arm
__UbuntuRepo="http://raspbian.raspberrypi.org/raspbian/"
__CodeName=buster
__LLDB_Package="liblldb-6.0-dev"
if [[ -e "/usr/share/keyrings/raspbian-archive-keyring.gpg" ]]; then
__Keyring="--keyring /usr/share/keyrings/raspbian-archive-keyring.gpg"
fi
;;
riscv64)
__BuildArch=riscv64
__AlpineArch=riscv64
__QEMUArch=riscv64
__UbuntuArch=riscv64
__UbuntuRepo="http://deb.debian.org/debian-ports"
__UbuntuPackages="${__UbuntuPackages// libunwind8-dev/}"
unset __LLDB_Package
if [[ -e "/usr/share/keyrings/debian-ports-archive-keyring.gpg" ]]; then
__Keyring="--keyring /usr/share/keyrings/debian-ports-archive-keyring.gpg --include=debian-ports-archive-keyring"
fi
;;
ppc64le)
__BuildArch=ppc64le
__AlpineArch=ppc64le
__QEMUArch=ppc64le
__UbuntuArch=ppc64el
__UbuntuRepo="http://ports.ubuntu.com/ubuntu-ports/"
__UbuntuPackages="${__UbuntuPackages// libunwind8-dev/}"
__UbuntuPackages="${__UbuntuPackages// libomp-dev/}"
__UbuntuPackages="${__UbuntuPackages// libomp5/}"
unset __LLDB_Package
;;
s390x)
__BuildArch=s390x
__AlpineArch=s390x
__QEMUArch=s390x
__UbuntuArch=s390x
__UbuntuRepo="http://ports.ubuntu.com/ubuntu-ports/"
__UbuntuPackages="${__UbuntuPackages// libunwind8-dev/}"
__UbuntuPackages="${__UbuntuPackages// libomp-dev/}"
__UbuntuPackages="${__UbuntuPackages// libomp5/}"
unset __LLDB_Package
;;
x64)
__BuildArch=x64
__AlpineArch=x86_64
__QEMUArch=x86_64
__UbuntuArch=amd64
__FreeBSDArch=amd64
__FreeBSDMachineArch=amd64
__illumosArch=x86_64
__UbuntuRepo=
;;
x86)
__BuildArch=x86
__AlpineArch=i386
__QEMUArch=i386
__UbuntuArch=i386
__AlpineArch=x86
__UbuntuRepo="http://archive.ubuntu.com/ubuntu/"
;;
lldb*)
version="${lowerI/lldb/}"
parts=(${version//./ })
# for versions > 6.0, lldb has dropped the minor version
if [[ "${parts[0]}" -gt 6 ]]; then
version="${parts[0]}"
fi
__LLDB_Package="liblldb-${version}-dev"
;;
no-lldb)
unset __LLDB_Package
;;
llvm*)
version="${lowerI/llvm/}"
parts=(${version//./ })
__LLVM_MajorVersion="${parts[0]}"
__LLVM_MinorVersion="${parts[1]}"
# for versions > 6.0, llvm has dropped the minor version
if [[ -z "$__LLVM_MinorVersion" && "$__LLVM_MajorVersion" -le 6 ]]; then
__LLVM_MinorVersion=0;
fi
;;
xenial) # Ubuntu 16.04
if [[ "$__CodeName" != "jessie" ]]; then
__CodeName=xenial
fi
;;
zesty) # Ubuntu 17.04
if [[ "$__CodeName" != "jessie" ]]; then
__CodeName=zesty
fi
;;
bionic) # Ubuntu 18.04
if [[ "$__CodeName" != "jessie" ]]; then
__CodeName=bionic
fi
;;
focal) # Ubuntu 20.04
if [[ "$__CodeName" != "jessie" ]]; then
__CodeName=focal
fi
;;
jammy) # Ubuntu 22.04
if [[ "$__CodeName" != "jessie" ]]; then
__CodeName=jammy
fi
;;
jessie) # Debian 8
__CodeName=jessie
if [[ -z "$__UbuntuRepo" ]]; then
__UbuntuRepo="http://ftp.debian.org/debian/"
fi
;;
stretch) # Debian 9
__CodeName=stretch
__LLDB_Package="liblldb-6.0-dev"
if [[ -z "$__UbuntuRepo" ]]; then
__UbuntuRepo="http://ftp.debian.org/debian/"
fi
;;
buster) # Debian 10
__CodeName=buster
__LLDB_Package="liblldb-6.0-dev"
if [[ -z "$__UbuntuRepo" ]]; then
__UbuntuRepo="http://ftp.debian.org/debian/"
fi
;;
bullseye) # Debian 11
__CodeName=bullseye
if [[ -z "$__UbuntuRepo" ]]; then
__UbuntuRepo="http://ftp.debian.org/debian/"
fi
;;
sid) # Debian sid
__CodeName=sid
if [[ -z "$__UbuntuRepo" ]]; then
__UbuntuRepo="http://ftp.debian.org/debian/"
fi
;;
tizen)
__CodeName=
__UbuntuRepo=
__Tizen=tizen
;;
alpine*)
__CodeName=alpine
__UbuntuRepo=
version="${lowerI/alpine/}"
if [[ "$version" == "edge" ]]; then
__AlpineVersion=edge
else
parts=(${version//./ })
__AlpineMajorVersion="${parts[0]}"
__AlpineMinoVersion="${parts[1]}"
__AlpineVersion="$__AlpineMajorVersion.$__AlpineMinoVersion"
fi
;;
freebsd12)
__CodeName=freebsd
__SkipUnmount=1
;;
freebsd13)
__CodeName=freebsd
__FreeBSDBase="13.0-RELEASE"
__FreeBSDABI="13"
__SkipUnmount=1
;;
illumos)
__CodeName=illumos
__SkipUnmount=1
;;
haiku)
__CodeName=haiku
__BuildArch=x64
__SkipUnmount=1
;;
--skipunmount)
__SkipUnmount=1
;;
--rootfsdir|-rootfsdir)
shift
__RootfsDir="$1"
;;
--use-mirror)
__UseMirror=1
;;
--use-jobs)
shift
MAXJOBS=$1
;;
*)
__UnprocessedBuildArgs="$__UnprocessedBuildArgs $1"
;;
esac
shift
done
if [[ "$__BuildArch" == "armel" ]]; then
__LLDB_Package="lldb-3.5-dev"
fi
__UbuntuPackages+=" ${__LLDB_Package:-}"
if [[ -n "$__LLVM_MajorVersion" ]]; then
__UbuntuPackages+=" libclang-common-${__LLVM_MajorVersion}${__LLVM_MinorVersion:+.$__LLVM_MinorVersion}-dev"
fi
if [[ -z "$__RootfsDir" && -n "$ROOTFS_DIR" ]]; then
__RootfsDir="$ROOTFS_DIR"
fi
if [[ -z "$__RootfsDir" ]]; then
__RootfsDir="$__CrossDir/../../../.tools/rootfs/$__BuildArch"
fi
if [[ -d "$__RootfsDir" ]]; then
if [[ "$__SkipUnmount" == "0" ]]; then
umount "$__RootfsDir"/* || true
fi
rm -rf "$__RootfsDir"
fi
mkdir -p "$__RootfsDir"
__RootfsDir="$( cd "$__RootfsDir" && pwd )"
if [[ "$__CodeName" == "alpine" ]]; then
__ApkToolsVersion=2.12.11
__ApkToolsDir="$(mktemp -d)"
wget "https://gitlab.alpinelinux.org/api/v4/projects/5/packages/generic//v$__ApkToolsVersion/x86_64/apk.static" -P "$__ApkToolsDir"
chmod +x "$__ApkToolsDir/apk.static"
mkdir -p "$__RootfsDir"/usr/bin
cp -v "/usr/bin/qemu-$__QEMUArch" "$__RootfsDir/usr/bin"
if [[ "$__AlpineVersion" == "edge" ]]; then
version=edge
else
version="v$__AlpineVersion"
fi
# initialize DB
"$__ApkToolsDir/apk.static" \
-X "http://dl-cdn.alpinelinux.org/alpine/$version/main" \
-X "http://dl-cdn.alpinelinux.org/alpine/$version/community" \
-U --allow-untrusted --root "$__RootfsDir" --arch "$__AlpineArch" --initdb add
if [[ "$__AlpineLlvmLibsLookup" == 1 ]]; then
__AlpinePackages+=" $("$__ApkToolsDir/apk.static" \
-X "http://dl-cdn.alpinelinux.org/alpine/$version/main" \
-X "http://dl-cdn.alpinelinux.org/alpine/$version/community" \
-U --allow-untrusted --root "$__RootfsDir" --arch "$__AlpineArch" \
search 'llvm*-libs' | sort | tail -1 | sed 's/-[^-]*//2g')"
fi
# install all packages in one go
"$__ApkToolsDir/apk.static" \
-X "http://dl-cdn.alpinelinux.org/alpine/$version/main" \
-X "http://dl-cdn.alpinelinux.org/alpine/$version/community" \
-U --allow-untrusted --no-scripts --root "$__RootfsDir" --arch "$__AlpineArch" \
add $__AlpinePackages
rm -r "$__ApkToolsDir"
elif [[ "$__CodeName" == "freebsd" ]]; then
mkdir -p "$__RootfsDir"/usr/local/etc
JOBS=${MAXJOBS:="$(getconf _NPROCESSORS_ONLN)"}
wget -O - "https://download.freebsd.org/ftp/releases/${__FreeBSDArch}/${__FreeBSDMachineArch}/${__FreeBSDBase}/base.txz" | tar -C "$__RootfsDir" -Jxf - ./lib ./usr/lib ./usr/libdata ./usr/include ./usr/share/keys ./etc ./bin/freebsd-version
echo "ABI = \"FreeBSD:${__FreeBSDABI}:${__FreeBSDMachineArch}\"; FINGERPRINTS = \"${__RootfsDir}/usr/share/keys\"; REPOS_DIR = [\"${__RootfsDir}/etc/pkg\"]; REPO_AUTOUPDATE = NO; RUN_SCRIPTS = NO;" > "${__RootfsDir}"/usr/local/etc/pkg.conf
echo "FreeBSD: { url: \"pkg+http://pkg.FreeBSD.org/\${ABI}/quarterly\", mirror_type: \"srv\", signature_type: \"fingerprints\", fingerprints: \"${__RootfsDir}/usr/share/keys/pkg\", enabled: yes }" > "${__RootfsDir}"/etc/pkg/FreeBSD.conf
mkdir -p "$__RootfsDir"/tmp
# get and build package manager
wget -O - "https://github.com/freebsd/pkg/archive/${__FreeBSDPkg}.tar.gz" | tar -C "$__RootfsDir"/tmp -zxf -
cd "$__RootfsDir/tmp/pkg-${__FreeBSDPkg}"
# needed for install to succeed
mkdir -p "$__RootfsDir"/host/etc
./autogen.sh && ./configure --prefix="$__RootfsDir"/host && make -j "$JOBS" && make install
rm -rf "$__RootfsDir/tmp/pkg-${__FreeBSDPkg}"
# install packages we need.
INSTALL_AS_USER=$(whoami) "$__RootfsDir"/host/sbin/pkg -r "$__RootfsDir" -C "$__RootfsDir"/usr/local/etc/pkg.conf update
INSTALL_AS_USER=$(whoami) "$__RootfsDir"/host/sbin/pkg -r "$__RootfsDir" -C "$__RootfsDir"/usr/local/etc/pkg.conf install --yes $__FreeBSDPackages
elif [[ "$__CodeName" == "illumos" ]]; then
mkdir "$__RootfsDir/tmp"
pushd "$__RootfsDir/tmp"
JOBS=${MAXJOBS:="$(getconf _NPROCESSORS_ONLN)"}
echo "Downloading sysroot."
wget -O - https://github.com/illumos/sysroot/releases/download/20181213-de6af22ae73b-v1/illumos-sysroot-i386-20181213-de6af22ae73b-v1.tar.gz | tar -C "$__RootfsDir" -xzf -
echo "Building binutils. Please wait.."
wget -O - https://ftp.gnu.org/gnu/binutils/binutils-2.33.1.tar.bz2 | tar -xjf -
mkdir build-binutils && cd build-binutils
../binutils-2.33.1/configure --prefix="$__RootfsDir" --target="${__illumosArch}-sun-solaris2.10" --program-prefix="${__illumosArch}-illumos-" --with-sysroot="$__RootfsDir"
make -j "$JOBS" && make install && cd ..
echo "Building gcc. Please wait.."
wget -O - https://ftp.gnu.org/gnu/gcc/gcc-8.4.0/gcc-8.4.0.tar.xz | tar -xJf -
CFLAGS="-fPIC"
CXXFLAGS="-fPIC"
CXXFLAGS_FOR_TARGET="-fPIC"
CFLAGS_FOR_TARGET="-fPIC"
export CFLAGS CXXFLAGS CXXFLAGS_FOR_TARGET CFLAGS_FOR_TARGET
mkdir build-gcc && cd build-gcc
../gcc-8.4.0/configure --prefix="$__RootfsDir" --target="${__illumosArch}-sun-solaris2.10" --program-prefix="${__illumosArch}-illumos-" --with-sysroot="$__RootfsDir" --with-gnu-as \
--with-gnu-ld --disable-nls --disable-libgomp --disable-libquadmath --disable-libssp --disable-libvtv --disable-libcilkrts --disable-libada --disable-libsanitizer \
--disable-libquadmath-support --disable-shared --enable-tls
make -j "$JOBS" && make install && cd ..
BaseUrl=https://pkgsrc.smartos.org
if [[ "$__UseMirror" == 1 ]]; then
BaseUrl=https://pkgsrc.smartos.skylime.net
fi
BaseUrl="$BaseUrl/packages/SmartOS/trunk/${__illumosArch}/All"
echo "Downloading manifest"
wget "$BaseUrl"
echo "Downloading dependencies."
read -ra array <<<"$__IllumosPackages"
for package in "${array[@]}"; do
echo "Installing '$package'"
# find last occurrence of package in listing and extract its name
package="$(sed -En '/.*href="('"$package"'-[0-9].*).tgz".*/h;$!d;g;s//\1/p' All)"
echo "Resolved name '$package'"
wget "$BaseUrl"/"$package".tgz
ar -x "$package".tgz
tar --skip-old-files -xzf "$package".tmp.tg* -C "$__RootfsDir" 2>/dev/null
done
echo "Cleaning up temporary files."
popd
rm -rf "$__RootfsDir"/{tmp,+*}
mkdir -p "$__RootfsDir"/usr/include/net
mkdir -p "$__RootfsDir"/usr/include/netpacket
wget -P "$__RootfsDir"/usr/include/net https://raw.githubusercontent.com/illumos/illumos-gate/master/usr/src/uts/common/io/bpf/net/bpf.h
wget -P "$__RootfsDir"/usr/include/net https://raw.githubusercontent.com/illumos/illumos-gate/master/usr/src/uts/common/io/bpf/net/dlt.h
wget -P "$__RootfsDir"/usr/include/netpacket https://raw.githubusercontent.com/illumos/illumos-gate/master/usr/src/uts/common/inet/sockmods/netpacket/packet.h
wget -P "$__RootfsDir"/usr/include/sys https://raw.githubusercontent.com/illumos/illumos-gate/master/usr/src/uts/common/sys/sdt.h
elif [[ "$__CodeName" == "haiku" ]]; then
JOBS=${MAXJOBS:="$(getconf _NPROCESSORS_ONLN)"}
echo "Building Haiku sysroot for x86_64"
mkdir -p "$__RootfsDir/tmp"
cd "$__RootfsDir/tmp"
git clone -b hrev56235 https://review.haiku-os.org/haiku
git clone -b btrev43195 https://review.haiku-os.org/buildtools
cd "$__RootfsDir/tmp/buildtools" && git checkout 7487388f5110021d400b9f3b88e1a7f310dc066d
# Fetch some unmerged patches
cd "$__RootfsDir/tmp/haiku"
## Add development build profile (slimmer than nightly)
git fetch origin refs/changes/64/4164/1 && git -c commit.gpgsign=false cherry-pick FETCH_HEAD
# Build jam
cd "$__RootfsDir/tmp/buildtools/jam"
make
# Configure cross tools
echo "Building cross-compiler"
mkdir -p "$__RootfsDir/generated"
cd "$__RootfsDir/generated"
"$__RootfsDir/tmp/haiku/configure" -j"$JOBS" --sysroot "$__RootfsDir" --cross-tools-source "$__RootfsDir/tmp/buildtools" --build-cross-tools x86_64
# Build Haiku packages
echo "Building Haiku"
echo 'HAIKU_BUILD_PROFILE = "development-raw" ;' > UserProfileConfig
"$__RootfsDir/tmp/buildtools/jam/jam0" -j"$JOBS" -q '<build>package' '<repository>Haiku'
BaseUrl="https://depot.haiku-os.org/__api/v2/pkg/get-pkg"
# Download additional packages
echo "Downloading additional required packages"
read -ra array <<<"$__HaikuPackages"
for package in "${array[@]}"; do
echo "Downloading $package..."
# API documented here: https://github.com/haiku/haikudepotserver/blob/master/haikudepotserver-api2/src/main/resources/api2/pkg.yaml#L60
# The schema here: https://github.com/haiku/haikudepotserver/blob/master/haikudepotserver-api2/src/main/resources/api2/pkg.yaml#L598
hpkgDownloadUrl="$(wget -qO- --post-data='{"name":"'"$package"'","repositorySourceCode":"haikuports_x86_64","versionType":"LATEST","naturalLanguageCode":"en"}' \
--header='Content-Type:application/json' "$BaseUrl" | jq -r '.result.versions[].hpkgDownloadURL')"
wget -P "$__RootfsDir/generated/download" "$hpkgDownloadUrl"
done
# Setup the sysroot
echo "Setting up sysroot and extracting needed packages"
mkdir -p "$__RootfsDir/boot/system"
for file in "$__RootfsDir/generated/objects/haiku/x86_64/packaging/packages/"*.hpkg; do
"$__RootfsDir/generated/objects/linux/x86_64/release/tools/package/package" extract -C "$__RootfsDir/boot/system" "$file"
done
for file in "$__RootfsDir/generated/download/"*.hpkg; do
"$__RootfsDir/generated/objects/linux/x86_64/release/tools/package/package" extract -C "$__RootfsDir/boot/system" "$file"
done
# Cleaning up temporary files
echo "Cleaning up temporary files"
rm -rf "$__RootfsDir/tmp"
for name in "$__RootfsDir/generated/"*; do
if [[ "$name" =~ "cross-tools-" ]]; then
: # Keep the cross-compiler
else
rm -rf "$name"
fi
done
elif [[ -n "$__CodeName" ]]; then
qemu-debootstrap $__Keyring --arch "$__UbuntuArch" "$__CodeName" "$__RootfsDir" "$__UbuntuRepo"
cp "$__CrossDir/$__BuildArch/sources.list.$__CodeName" "$__RootfsDir/etc/apt/sources.list"
chroot "$__RootfsDir" apt-get update
chroot "$__RootfsDir" apt-get -f -y install
chroot "$__RootfsDir" apt-get -y install $__UbuntuPackages
chroot "$__RootfsDir" symlinks -cr /usr
chroot "$__RootfsDir" apt-get clean
if [[ "$__SkipUnmount" == "0" ]]; then
umount "$__RootfsDir"/* || true
fi
if [[ "$__BuildArch" == "armel" && "$__CodeName" == "jessie" ]]; then
pushd "$__RootfsDir"
patch -p1 < "$__CrossDir/$__BuildArch/armel.jessie.patch"
popd
fi
elif [[ "$__Tizen" == "tizen" ]]; then
ROOTFS_DIR="$__RootfsDir" "$__CrossDir/tizen-build-rootfs.sh" "$__BuildArch"
else
echo "Unsupported target platform."
usage;
exit 1
fi

View file

@ -1,283 +0,0 @@
#!/bin/sh
# shellcheck disable=SC3043
. $CI_PROJECT_DIR/.gitlab/bin/functions.sh
# shellcheck disable=SC3040
set -eu -o pipefail
readonly APORTSDIR=$CI_PROJECT_DIR
readonly REPOS="cross backports user testing community"
readonly ALPINE_REPOS="main community testing"
readonly ARCH=$(apk --print-arch)
# gitlab variables
readonly BASEBRANCH=$CI_MERGE_REQUEST_TARGET_BRANCH_NAME
: "${REPODEST:=$HOME/packages}"
: "${MIRROR:=https://lab.ilot.io/ayakael/repo-apk/-/raw}"
: "${ALPINE_MIRROR:=http://dl-cdn.alpinelinux.org/alpine}"
: "${MAX_ARTIFACT_SIZE:=300000000}" #300M
: "${CI_DEBUG_BUILD:=}"
: "${CI_ALPINE_BUILD_OFFSET:=0}"
: "${CI_ALPINE_BUILD_LIMIT:=9999}"
: "${CI_ALPINE_TARGET_ARCH:=$(uname -m)}"
msg() {
local color=${2:-green}
case "$color" in
red) color="31";;
green) color="32";;
yellow) color="33";;
blue) color="34";;
*) color="32";;
esac
printf "\033[1;%sm>>>\033[1;0m %s\n" "$color" "$1" | xargs >&2
}
verbose() {
echo "> " "$@"
# shellcheck disable=SC2068
$@
}
debugging() {
[ -n "$CI_DEBUG_BUILD" ]
}
debug() {
if debugging; then
verbose "$@"
fi
}
die() {
msg "$1" red
exit 1
}
capture_stderr() {
"$@" 2>&1
}
report() {
report=$1
reportsdir=$APORTSDIR/logs/
mkdir -p "$reportsdir"
tee -a "$reportsdir/$report.log"
}
get_release() {
case $BASEBRANCH in
v*) echo "${BASEBRANCH%-*}";;
edge) echo edge;;
*) die "Branch \"$BASEBRANCH\" not supported!"
esac
}
build_aport() {
local repo="$1" aport="$2"
cd "$APORTSDIR/$repo/$aport"
export CHOST=$CI_ALPINE_TARGET_ARCH
if abuild -r 2>&1 | report "build-$aport"; then
checkapk | report "checkapk-$aport" || true
aport_ok="$aport_ok $repo/$aport"
else
aport_ng="$aport_ng $repo/$aport"
fi
}
check_aport() {
local repo="$1" aport="$2"
cd "$APORTSDIR/$repo/$aport"
export CHOST=$CI_ALPINE_TARGET_ARCH
# TODO: this enables crossbuild only on user, this should be cleaner
if [ "$repo" != "user" ] && [ "$repo" != "backports" ] && [ "$CI_ALPINE_TARGET_ARCH" != "$ARCH" ]; then
aport_na="$aport_na $repo/$aport"
return 1
fi
if ! abuild check_arch 2>/dev/null; then
aport_na="$aport_na $repo/$aport"
return 1
fi
}
set_repositories_for() {
local target_repo="$1" repos='' repo=''
local release
release=$(get_release)
for repo in $REPOS; do
repos="$repos $MIRROR/$release/$repo $REPODEST/$repo"
[ "$repo" = "$target_repo" ] && break
done
sudo sh -c "printf '%s\n' $repos >> /etc/apk/repositories"
sudo apk update || true
if [ "$CI_ALPINE_TARGET_ARCH" != "$ARCH" ]; then
sudo sh -c "printf '%s\n' $repos >> $HOME/sysroot-$CI_ALPINE_TARGET_ARCH/etc/apk/repositories"
sudo cp -R /etc/apk/keys/* $HOME/sysroot-$CI_ALPINE_TARGET_ARCH/etc/apk/keys/.
sudo apk --root=$HOME/sysroot-$CI_ALPINE_TARGET_ARCH update || true
fi
}
apply_offset_limit() {
start=$1
limit=$2
end=$((start+limit))
sed -n "$((start+1)),${end}p"
}
setup_system() {
local repos='' repo=''
local release
release=$(get_release)
for repo in $ALPINE_REPOS; do
[ "$release" != "edge" ] && [ "$repo" == "testing" ] && continue
repos="$repos $ALPINE_MIRROR/$release/$repo"
done
repos="$repos $MIRROR/$release/cross"
sudo sh -c "printf '%s\n' $repos > /etc/apk/repositories"
sudo apk -U upgrade -a || sudo apk fix || die "Failed to up/downgrade system"
if [ "$CI_ALPINE_TARGET_ARCH" != "$ARCH" ]; then
sudo apk add gcc-$CI_ALPINE_TARGET_ARCH
fi
gitlab_key_to_rsa $ABUILD_KEY rsa-private $HOME/.abuild/$ABUILD_KEY_NAME.rsa
gitlab_key_to_rsa $ABUILD_KEY_PUB rsa-public $HOME/.abuild/$ABUILD_KEY_NAME.rsa.pub
chmod 700 $HOME/.abuild/$ABUILD_KEY_NAME.rsa
echo "PACKAGER_PRIVKEY=$HOME/.abuild/$ABUILD_KEY_NAME.rsa" >> $HOME/.abuild/abuild.conf
sudo cp $HOME/.abuild/$ABUILD_KEY_NAME.rsa.pub /etc/apk/keys/$ABUILD_KEY_NAME.rsa.pub
# patch abuild for crosscompiling
sudo patch -p1 -d / -i $CI_PROJECT_DIR/.gitlab/patches/abuild-cross.patch
sudo sed -i -E 's/export JOBS=[0-9]+$/export JOBS=$(nproc)/' /etc/abuild.conf
( . /etc/abuild.conf && echo "Building with $JOBS jobs" )
mkdir -p "$REPODEST"
git config --global init.defaultBranch master
}
sysinfo() {
printf ">>> Host system information (arch: %s, release: %s) <<<\n" "$ARCH" "$(get_release)"
printf "- Number of Cores: %s\n" "$(nproc)"
printf "- Memory: %s Gb\n" "$(awk '/^MemTotal/ {print ($2/1024/1024)}' /proc/meminfo)"
printf "- Free space: %s\n" "$(df -hP / | awk '/\/$/ {print $4}')"
}
copy_artifacts() {
cd "$APORTSDIR"
packages_size="$(du -sk "$REPODEST" | awk '{print $1 * 1024}')"
if [ -z "$packages_size" ]; then
return
fi
echo "Artifact size: $packages_size bytes"
mkdir -p keys/ packages/
if [ "$packages_size" -lt $MAX_ARTIFACT_SIZE ]; then
msg "Copying packages for artifact upload"
cp -ar "$REPODEST"/* packages/ 2>/dev/null
cp ~/.abuild/*.rsa.pub keys/
else
msg "Artifact size $packages_size larger than max ($MAX_ARTIFACT_SIZE), skipping uploading them" yellow
fi
}
section_start setup "Setting up the system" collapse
if debugging; then
set -x
fi
aport_ok=
aport_na=
aport_ng=
failed=
sysinfo || true
setup_system || die "Failed to setup system"
# git no longer allows to execute in repositories owned by different users
sudo chown -R $USER: .
fetch_flags="-qn"
debugging && fetch_flags="-v"
git fetch $fetch_flags "$CI_MERGE_REQUEST_PROJECT_URL" \
"+refs/heads/$BASEBRANCH:refs/heads/$BASEBRANCH"
if debugging; then
merge_base=$(git merge-base "$BASEBRANCH" HEAD) || echo "Could not determine merge-base"
echo "Merge base: $merge_base"
git --version
git config -l
[ -n "$merge_base" ] && git tag -f merge-base "$merge_base"
git --no-pager log -200 --oneline --graph --decorate --all
fi
section_end setup
build_start=$CI_ALPINE_BUILD_OFFSET
build_limit=$CI_ALPINE_BUILD_LIMIT
for repo in $(changed_repos); do
mkdir -p "$APORTSDIR"/logs "$APORTSDIR"/packages "$APORTSDIR"/keys
set_repositories_for "$repo"
built_aports=0
changed_aports_in_repo=$(changed_aports "$repo")
changed_aports_in_repo_count=$(echo "$changed_aports_in_repo" | wc -l)
changed_aports_to_build=$(echo "$changed_aports_in_repo" | apply_offset_limit "$build_start" "$build_limit")
msg "Changed aports in $repo:"
# shellcheck disable=SC2086 # Splitting is expected here
printf " - %s\n" $changed_aports_to_build
for pkgname in $changed_aports_to_build; do
section_start "build_$pkgname" "Building package $pkgname"
built_aports=$((built_aports+1))
if check_aport "$repo" "$pkgname"; then
build_aport "$repo" "$pkgname"
fi
section_end "build_$pkgname"
done
build_start=$((build_start-(changed_aports_in_repo_count-built_aports)))
build_limit=$((build_limit-built_aports))
if [ $build_limit -le 0 ]; then
msg "Limit reached, breaking"
break
fi
done
section_start artifacts "Handeling artifacts" collapse
copy_artifacts || true
section_end artifacts
section_start summary "Build summary"
echo "### Build summary ###"
for ok in $aport_ok; do
msg "$ok: build succesfully"
done
for na in $aport_na; do
msg "$na: disabled for $CI_ALPINE_TARGET_ARCH" yellow
done
for ng in $aport_ng; do
msg "$ng: build failed" red
failed=true
done
section_end summary
if [ "$failed" = true ]; then
exit 1
elif [ -z "$aport_ok" ]; then
msg "No packages found to be built." yellow
fi

View file

@ -1,20 +0,0 @@
#!/bin/sh
if [ $# -lt 1 ]; then
echo "Usage: $0 <basebranch>"
exit 1
fi
if ! git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
echo "Fatal: not inside a git repository"
exit 2
fi
basebranch=$1
if ! git rev-parse --verify --quiet $basebranch >/dev/null; then
# The base branch does not eixst, probably due to a shallow clone
git fetch -v $CI_MERGE_REQUEST_PROJECT_URL.git +refs/heads/$basebranch:refs/heads/$basebranch
fi
git --no-pager diff --diff-filter=ACMR --name-only $basebranch...HEAD -- "*/APKBUILD" | xargs -r -n1 dirname

View file

@ -1,74 +0,0 @@
# shellcheck disable=SC3043
:
# shellcheck disable=SC3040
set -eu -o pipefail
changed_repos() {
: "${APORTSDIR?APORTSDIR missing}"
: "${BASEBRANCH?BASEBRANCH missing}"
cd "$APORTSDIR"
for repo in $REPOS; do
git diff --diff-filter=ACMR --exit-code "$BASEBRANCH"...HEAD -- "$repo" >/dev/null \
|| echo "$repo"
done
}
changed_aports() {
: "${APORTSDIR?APORTSDIR missing}"
: "${BASEBRANCH?BASEBRANCH missing}"
cd "$APORTSDIR"
local repo="$1"
local aports
aports=$(git diff --name-only --diff-filter=ACMR --relative="$repo" \
"$BASEBRANCH"...HEAD -- "*/APKBUILD" | xargs -rn1 dirname)
# shellcheck disable=2086
ap builddirs -d "$APORTSDIR/$repo" $aports 2>/dev/null | xargs -rn1 basename
}
section_start() {
name=${1?arg 1 name missing}
header=${2?arg 2 header missing}
collapsed=$2
timestamp=$(date +%s)
options=""
case $collapsed in
yes|on|collapsed|true) options="[collapsed=true]";;
esac
printf "\e[0Ksection_start:%d:%s%s\r\e[0K%s\n" "$timestamp" "$name" "$options" "$header"
}
section_end() {
name=$1
timestamp=$(date +%s)
printf "\e[0Ksection_end:%d:%s\r\e[0K" "$timestamp" "$name"
}
gitlab_key_to_rsa() {
KEY=$1
TYPE=$2
TGT=$3
TGT_DIR=${TGT%/*}
if [ "$TGT" == "$TGT_DIR" ]; then
TGT_DIR="./"
fi
if [ ! -d "$TGT_DIR" ]; then
mkdir -p "$TGT_DIR"
fi
case $TYPE in
rsa-public) local type="PUBLIC";;
rsa-private) local type="RSA PRIVATE";;
esac
echo "-----BEGIN $type KEY-----" > "$TGT"
echo $1 | sed 's/.\{64\}/&\
/g' >> "$TGT"
echo "-----END $type KEY-----" >> "$TGT"
}

View file

@ -1,96 +0,0 @@
#!/bin/sh
BLUE="\e[34m"
MAGENTA="\e[35m"
RESET="\e[0m"
readonly BASEBRANCH=$CI_MERGE_REQUEST_TARGET_BRANCH_NAME
verbose() {
echo "> " "$@"
# shellcheck disable=SC2068
$@
}
debugging() {
[ -n "$CI_DEBUG_BUILD" ]
}
debug() {
if debugging; then
verbose "$@"
fi
}
# git no longer allows to execute in repositories owned by different users
sudo chown -R gitlab-runner: .
fetch_flags="-qn"
debugging && fetch_flags="-v"
git fetch $fetch_flags "$CI_MERGE_REQUEST_PROJECT_URL" \
"+refs/heads/$BASEBRANCH:refs/heads/$BASEBRANCH"
if debugging; then
merge_base=$(git merge-base "$BASEBRANCH" HEAD)
echo "$merge_base"
git --version
git config -l
git tag merge-base "$merge_base" || { echo "Could not determine merge-base"; exit 50; }
git log --oneline --graph --decorate --all
fi
has_problems=0
for PKG in $(changed-aports "$BASEBRANCH"); do
printf "$BLUE==>$RESET Linting $PKG\n"
(
cd "$PKG"
repo=$(basename $(dirname $PKG));
if [ "$repo" == "backports" ]; then
echo "Skipping $PKG as backports (we don't care)"
continue
fi
printf "\n\n"
printf "$BLUE"
printf '======================================================\n'
printf " parse APKBUILD:\n"
printf '======================================================'
printf "$RESET\n\n"
( . ./APKBUILD ) || has_problems=1
printf "\n\n"
printf "$BLUE"
printf '======================================================\n'
printf " abuild sanitycheck:\n"
printf '======================================================'
printf "$RESET\n\n"
abuild sanitycheck || has_problems=1
printf "\n\n"
printf "$BLUE"
printf '======================================================\n'
printf " apkbuild-shellcheck:\n"
printf '======================================================'
printf "$RESET\n"
apkbuild-shellcheck || has_problems=1
printf "\n\n"
printf "$BLUE"
printf '======================================================\n'
printf " apkbuild-lint:\n"
printf '======================================================'
printf "$RESET\n\n"
apkbuild-lint APKBUILD || has_problems=1
return $has_problems
) || has_problems=1
echo
done
exit $has_problems

View file

@ -1,56 +0,0 @@
#!/bin/sh
# shellcheck disable=SC3043
. $CI_PROJECT_DIR/.gitlab/bin/functions.sh
# shellcheck disable=SC3040
set -eu -o pipefail
readonly APORTSDIR=$CI_PROJECT_DIR
readonly REPOS="backports user"
readonly BASEBRANCH=$CI_MERGE_REQUEST_TARGET_BRANCH_NAME
export GIT_SSH_COMMAND="ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
gitlab_key_to_rsa $ABUILD_KEY rsa-private $HOME/.abuild/$ABUILD_KEY_NAME.rsa
gitlab_key_to_rsa $ABUILD_KEY_PUB rsa-public $HOME/.abuild/$ABUILD_KEY_NAME.rsa.pub
gitlab_key_to_rsa $SSH_KEY rsa-private $HOME/.ssh/id_rsa
chmod 700 "$HOME"/.ssh/id_rsa
chmod 700 "$HOME"/.abuild/$ABUILD_KEY_NAME.rsa
echo "PACKAGER_PRIVKEY=$HOME/.abuild/$ABUILD_KEY_NAME.rsa" > $HOME/.abuild/abuild.conf
echo "REPODEST=$HOME/repo-apk" >> $HOME/.abuild/abuild.conf
sudo cp $HOME/.abuild/$ABUILD_KEY_NAME.rsa.pub /etc/apk/keys/.
if [ -d $HOME/repo-apk ]; then
git -C $HOME/repo-apk fetch
git -C $HOME/repo-apk checkout $BASEBRANCH
git -C $HOME/repo-apk pull --rebase
else
git clone git@lab.ilot.io:ayakael/repo-apk -b $BASEBRANCH $HOME/repo-apk
fi
for i in $(find packages -type f -name "*.apk"); do
install -vDm644 $i ${i/packages/$HOME\/repo-apk}
done
fetch_flags="-qn"
git fetch $fetch_flags "$CI_MERGE_REQUEST_PROJECT_URL" \
"+refs/heads/$BASEBRANCH:refs/heads/$BASEBRANCH"
for repo in $(changed_repos); do
rm $HOME/repo-apk/$repo/*/APKINDEX.tar.gz | true
mkdir -p $repo/DUMMY
echo "pkgname=DUMMY" > $repo/DUMMY/APKBUILD
cd $repo/DUMMY
for i in $(find $HOME/repo-apk/$repo -maxdepth 1 -mindepth 1 -printf '%P '); do
CHOST=$i abuild index
done
cd "$CI_PROJECT_DIR"
rm -R $repo/DUMMY
done
git -C $HOME/repo-apk add .
git -C $HOME/repo-apk commit -m "Update from $CI_MERGE_REQUEST_IID - $CI_MERGE_REQUEST_TITLE"
git -C $HOME/repo-apk push

View file

@ -1,17 +0,0 @@
diff --git a/usr/bin/abuild.orig b/usr/bin/abuild
index 71e0681..d4ae3dd 100755
--- a/usr/bin/abuild.orig
+++ b/usr/bin/abuild
@@ -2231,7 +2231,11 @@ calcdeps() {
list_has $i $builddeps && continue
subpackages_has ${i%%[<>=]*} || builddeps="$builddeps $i"
done
- hostdeps="$EXTRADEPENDS_TARGET"
+ for i in $EXTRADEPENDS_HOST $EXTRADEPENDS_TARGET $depends $makedepends; do
+ [ "$pkgname" = "${i%%[<>=]*}" ] && continue
+ list_has $i $hostdeps && continue
+ subpackages_has ${i%%[<>=]*} || hostdeps="$hostdeps $i"
+ done
fi
}

View file

@ -1,55 +1,43 @@
# user-aports
Upstream: https://lab.ilot.io/ayakael/user-aports
# ayaports
Upstream: https://ayakael.net/forge/ayaports
## Description
This repository contains aports that are not yet merged in the official Alpine
Linux repository or dont adhere to Alpine polices. Packages are automatically
built using GitLab CI on my own GitLab instance. Once built, they are deployed
to a git-lfs repository, making them available to apk.
built using CI. Once built, they are deployed to a git-lfs repository, making
them available to apk.
Branches are matched to Alpine releases.
## Repositories
You can browse all the repositories at https://lab.ilot.io/ayakael/repo-apk.
You can browse all the repositories at https://codeberg.org/ayakael/ayaports
Affixed to each repository description is the appropriate link for use in
`/etc/apk/repositories`.
#### Backports
```
https://lab.ilot.io/ayakael/repo-apk/-/raw/v3.18/backports
https://lab.ilot.io/ayakael/apk/-/raw/v3.18/backports
```
Aports from the official Alpine repositories backported from edge to v3.18.
Aports from the official Alpine repositories backported from edge.
#### User
```
https://lab.ilot.io/ayakael/repo-apk/-/raw/v3.18/user
https://lab.ilot.io/ayakael/apk/-/raw/v3.18/user
```
Aports that have yet to be (or may never be) upstreamed to the official
aports.
#### Testing/Community
```
https://lab.ilot.io/ayakael/repo-apk/-/raw/v3.18/community
https://lab.ilot.io/ayakael/repo-apk/-/raw/v3.18/testing
```
Aports that have already been upstreamed are kept here for three reasons:
* Facilitate keeping track of packages that I support
* Upgrades are first deployed here for first batch of testing
* Make packages that are in 'testing' available for stable releases
## How to use
Add security key of the repo-apk repository to your /etc/apk/keys:
Add security key of the apk repository to your /etc/apk/keys:
```shell
cd /etc/apk/keys
wget https://lab.ilot.io/ayakael/repo-apk/-/raw/v3.18/antoine.martin@protonmail.com-5b3109ad.rsa.pub
wget https://lab.ilot.io/ayakael/apk/-/raw/v3.18/antoine.martin@protonmail.com-5b3109ad.rsa.pub
```
Add repositories that you want to use (see above) to `/etc/apk/repositories`.
@ -63,10 +51,10 @@ they will work for you.
## Contribution & bug reports
If you wish to contribute to this aports collection, or wish to report a bug,
you can do so on Alpine's GitLab instance here:
https://gitlab.alpinelinux.org/ayakael/user-aports
you can do so on Codeberg here:
https://codeberg.org/ayakael/ayaports/issues
For packages that are in testing/community, bug reports and merge requests
For packages that are in backports, bug reports and merge requests
should be done on Alpine's aports repo instance:
https://gitlab.alpinelinux.org/alpine/aports

73
backports/cura/APKBUILD Normal file
View file

@ -0,0 +1,73 @@
# Contributor: Anjandev Momi <anjan@momi.ca>
# Maintainer: Anjandev Momi <anjan@momi.ca>
pkgname=cura
# uranium and curaengine packages must be updated in sync with this verion number
# py3-pynest2d and fdm-materials should be checked as well, but their versions are not always in sync
pkgver=5.2.2
pkgrel=0
pkgdesc="3D printer / slicing GUI built on top of the Uranium framework"
url="https://ultimaker.com/software/ultimaker-cura"
arch="noarch !ppc64le !x86 !armhf !riscv64 !s390x !armv7" # ppc64le: no py3-keyring
# x86: no curaengine
# armhf: no uranium, qt5-qtquickcontrols, qt5-qtquickcontrols2, qt5-qtgraphicaleffects
# riscv64: no uranium
# s390x: no py3-trimesh, no py3-numpy-stl
# armv7: no py3-trimesh
license="LGPL-3.0-or-later"
# add cura-binary-data to depends when packaged
depends="
curaengine
fdm-materials
uranium
py3-arcus
py3-keyring
py3-numpy-stl
py3-pyclipper
py3-pynest2d
py3-pyserial
py3-qt6
py3-requests
py3-trimesh
py3-zeroconf
"
makedepends="samurai cmake gettext gettext-dev" # needs msginit from gettext
checkdepends="py3-pytest"
subpackages="$pkgname-lang"
source="$pkgname-$pkgver.tar.gz::https://github.com/Ultimaker/Cura/archive/refs/tags/$pkgver.tar.gz
AppDesktopData.patch
CuraVersion.patch
cmake-helpers.patch
cmake.patch"
builddir="$srcdir/Cura-$pkgver"
options="!check" # tests broken after v5.x
build() {
cmake -B build -G Ninja \
-DCURA_VERSION=$pkgver \
-DURANIUM_DIR=/usr/share/uranium \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DGETTEXT_MSGINIT_EXECUTABLE=msginit \
-DCURA_BINARY_DATA_DIRECTORY=/usr/share/cura \
-DCMAKE_BUILD_TYPE=minsizerel
cmake --build build
}
package() {
DESTDIR="$pkgdir" cmake --install build
mv $pkgdir/usr/bin/cura_app.py $pkgdir/usr/bin/cura
# don't ever send any user or print info through the internet to Ultimaker
rm -rf "$pkgdir/usr/lib/cura/plugins/SliceInfoPlugin"
install -d "$pkgdir"/usr/share/locale
mv "$pkgdir"/usr/share/cura/resources/i18n/* "$pkgdir"/usr/share/locale/
}
sha512sums="
5d4e0fdc740d0c048905e2b87cc8c73eedea59b54766b74760505902007b365582d22b46b1cfdcd6914828840865c10a3beb0ef6a1f04ea181c81d44f42434bc cura-5.2.2.tar.gz
214e373f6cab7e3ccac12c96d1b5ca636d8d1e9ecdadaae84fc28fb429969c7c2d6055ce2a01b6db3ad85ab6cbc8d135cf2c26c77d7cfe13a73eb81aa5e85f11 AppDesktopData.patch
e3bb302db70ca195b2ce9831e71302c8ee2a51955fecc7264a495d7d4fc9c107cfd48811aa5865f16671e7b1ae126f95d3d7bbb6a70f367f7f91a2b32bce377b CuraVersion.patch
0db4ff97e7f82ae1a9dbc9c330d08c3e46249feeb3fb630f7c4e2de73749327337ec041680c39a07e0b5034c1b3f3656d75614ab4dc2f39861c8e27bdb2a58ef cmake-helpers.patch
05a73f892700ff6279230385b04180873a62b7413fa7f7d55ae150f1bcee57ef05eda0bd7fe444fe660ab66a044c958f42badd33b743fca81033ae8f19dd3805 cmake.patch
"

View file

@ -0,0 +1,58 @@
--- /dev/null
+++ ./com.ultimaker.cura.appdata.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright 2016 Richard Hughes <richard@hughsie.com> -->
+<component type="desktop">
+ <id>com.ultimaker.cura.desktop</id>
+ <metadata_license>CC0-1.0</metadata_license>
+ <project_license>LGPL-3.0 and CC-BY-SA-4.0</project_license>
+ <name>Cura</name>
+ <summary>The world's most advanced 3d printer software</summary>
+ <description>
+ <p>
+ Cura creates a seamless integration between hardware, software and
+ materials for the best 3D printing experience around.
+ Cura supports the 3MF, OBJ and STL file formats and is available on
+ Windows, Mac and Linux.
+ </p>
+ <ul>
+ <li>Novices can start printing right away</li>
+ <li>Experts are able to customize 300 settings to achieve the best results</li>
+ <li>Optimized profiles for Ultimaker materials</li>
+ <li>Supported by a global network of Ultimaker certified service partners</li>
+ <li>Print multiple objects at once with different settings for each object</li>
+ <li>Cura supports STL, 3MF and OBJ file formats</li>
+ <li>Open source and completely free</li>
+ </ul>
+ </description>
+ <screenshots>
+ <screenshot type="default">
+ <image>https://raw.githubusercontent.com/Ultimaker/Cura/master/screenshot.png</image>
+ </screenshot>
+ </screenshots>
+ <url type="homepage">https://ultimaker.com/software/ultimaker-cura?utm_source=cura&amp;utm_medium=software&amp;utm_campaign=cura-update-linux</url>
+ <translation type="gettext">Cura</translation>
+</component>
--- /dev/null
+++ ./com.ultimaker.cura.desktop.in
@@ -0,0 +1,19 @@
+[Desktop Entry]
+Name=Ultimaker Cura
+Name[de]=Ultimaker Cura
+Name[nl]=Ultimaker Cura
+GenericName=3D Printing Software
+GenericName[de]=3D-Druck-Software
+GenericName[nl]=3D-printsoftware
+Comment=Cura converts 3D models into paths for a 3D printer. It prepares your print for maximum accuracy, minimum printing time and good reliability with many extra features that make your print come out great.
+Comment[de]=Cura wandelt 3D-Modelle in Pfade für einen 3D-Drucker um. Es bereitet Ihren Druck für maximale Genauigkeit, minimale Druckzeit und guter Zuverlässigkeit mit vielen zusätzlichen Funktionen vor, damit Ihr Druck großartig wird.
+Comment[nl]=Cura converteert 3D-modellen naar paden voor een 3D printer. Het bereidt je print voor om zeer precies, snel en betrouwbaar te kunnen printen, met veel extra functionaliteit om je print er goed uit te laten komen.
+Exec=@CMAKE_INSTALL_FULL_BINDIR@/cura %F
+TryExec=@CMAKE_INSTALL_FULL_BINDIR@/cura
+Icon=cura-icon
+Terminal=false
+Type=Application
+MimeType=model/stl;application/vnd.ms-3mfdocument;application/prs.wavefront-obj;image/bmp;image/gif;image/jpeg;image/png;text/x-gcode;application/x-amf;application/x-ply;application/x-ctm;model/vnd.collada+xml;model/gltf-binary;model/gltf+json;model/vnd.collada+xml+zip;
+Categories=Graphics;
+Keywords=3D;Printing;Slicer;
+StartupWMClass=cura.real

View file

@ -0,0 +1,16 @@
--- /dev/null
+++ ./cura/CuraVersion.py.in
@@ -0,0 +1,13 @@
+# Copyright (c) 2020 Ultimaker B.V.
+# Cura is released under the terms of the LGPLv3 or higher.
+
+CuraAppName = "@CURA_APP_NAME@"
+CuraAppDisplayName = "@CURA_APP_DISPLAY_NAME@"
+CuraVersion = "@CURA_VERSION@"
+CuraBuildType = "@CURA_BUILDTYPE@"
+CuraDebugMode = True if "@_cura_debugmode@" == "ON" else False
+CuraCloudAPIRoot = "@CURA_CLOUD_API_ROOT@"
+CuraCloudAPIVersion = "@CURA_CLOUD_API_VERSION@"
+CuraCloudAccountAPIRoot = "@CURA_CLOUD_ACCOUNT_API_ROOT@"
+CuraMarketplaceRoot = "@CURA_MARKETPLACE_ROOT@"
+CuraDigitalFactoryURL = "@CURA_DIGITAL_FACTORY_URL@"

View file

@ -0,0 +1,95 @@
--- /dev/null
+++ ./cmake/CuraPluginInstall.cmake
@@ -0,0 +1,92 @@
+# Copyright (c) 2022 Ultimaker B.V.
+# CuraPluginInstall.cmake is released under the terms of the LGPLv3 or higher.
+
+#
+# This module detects all plugins that need to be installed and adds them using the CMake install() command.
+# It detects all plugin folder in the path "plugins/*" where there's a "plugin.json" in it.
+#
+# Plugins can be configured to NOT BE INSTALLED via the variable "CURA_NO_INSTALL_PLUGINS" as a list of string in the
+# form of "a;b;c" or "a,b,c". By default all plugins will be installed.
+#
+
+option(PRINT_PLUGIN_LIST "Should the list of plugins that are installed be printed?" ON)
+
+# Options or configuration variables
+set(CURA_NO_INSTALL_PLUGINS "" CACHE STRING "A list of plugins that should not be installed, separated with ';' or ','.")
+
+file(GLOB_RECURSE _plugin_json_list ${CMAKE_SOURCE_DIR}/plugins/*/plugin.json)
+list(LENGTH _plugin_json_list _plugin_json_list_len)
+
+# Sort the lists alphabetically so we can handle cases like this:
+# - plugins/my_plugin/plugin.json
+# - plugins/my_plugin/my_module/plugin.json
+# In this case, only "plugins/my_plugin" should be added via install().
+set(_no_install_plugin_list ${CURA_NO_INSTALL_PLUGINS})
+# Sanitize the string so the comparison will be case-insensitive.
+string(STRIP "${_no_install_plugin_list}" _no_install_plugin_list)
+string(TOLOWER "${_no_install_plugin_list}" _no_install_plugin_list)
+
+# WORKAROUND counterpart of what's in cura-build.
+string(REPLACE "," ";" _no_install_plugin_list "${_no_install_plugin_list}")
+
+list(LENGTH _no_install_plugin_list _no_install_plugin_list_len)
+
+if(_no_install_plugin_list_len GREATER 0)
+ list(SORT _no_install_plugin_list)
+endif()
+if(_plugin_json_list_len GREATER 0)
+ list(SORT _plugin_json_list)
+endif()
+
+# Check all plugin directories and add them via install() if needed.
+set(_install_plugin_list "")
+foreach(_plugin_json_path ${_plugin_json_list})
+ get_filename_component(_plugin_dir ${_plugin_json_path} DIRECTORY)
+ file(RELATIVE_PATH _rel_plugin_dir ${CMAKE_CURRENT_SOURCE_DIR} ${_plugin_dir})
+ get_filename_component(_plugin_dir_name ${_plugin_dir} NAME)
+
+ # Make plugin name comparison case-insensitive
+ string(TOLOWER "${_plugin_dir_name}" _plugin_dir_name_lowercase)
+
+ # Check if this plugin needs to be skipped for installation
+ set(_add_plugin ON) # Indicates if this plugin should be added to the build or not.
+ set(_is_no_install_plugin OFF) # If this plugin will not be added, this indicates if it's because the plugin is
+ # specified in the NO_INSTALL_PLUGINS list.
+ if(_no_install_plugin_list)
+ if("${_plugin_dir_name_lowercase}" IN_LIST _no_install_plugin_list)
+ set(_add_plugin OFF)
+ set(_is_no_install_plugin ON)
+ endif()
+ endif()
+
+ # Make sure this is not a subdirectory in a plugin that's already in the install list
+ if(_add_plugin)
+ foreach(_known_install_plugin_dir ${_install_plugin_list})
+ if(_plugin_dir MATCHES "${_known_install_plugin_dir}.+")
+ set(_add_plugin OFF)
+ break()
+ endif()
+ endforeach()
+ endif()
+
+ if(_add_plugin)
+ if(${PRINT_PLUGIN_LIST})
+ message(STATUS "[+] PLUGIN TO INSTALL: ${_rel_plugin_dir}")
+ endif()
+ get_filename_component(_rel_plugin_parent_dir ${_rel_plugin_dir} DIRECTORY)
+ install(DIRECTORY ${_rel_plugin_dir}
+ DESTINATION lib${LIB_SUFFIX}/cura/${_rel_plugin_parent_dir}
+ PATTERN "__pycache__" EXCLUDE
+ PATTERN "*.qmlc" EXCLUDE
+ )
+ list(APPEND _install_plugin_list ${_plugin_dir})
+ elseif(_is_no_install_plugin)
+ if(${PRINT_PLUGIN_LIST})
+ message(STATUS "[-] PLUGIN TO REMOVE : ${_rel_plugin_dir}")
+ endif()
+ execute_process(COMMAND ${Python_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/mod_bundled_packages_json.py
+ -d ${CMAKE_CURRENT_SOURCE_DIR}/resources/bundled_packages
+ ${_plugin_dir_name}
+ RESULT_VARIABLE _mod_json_result)
+ endif()
+endforeach()

View file

@ -0,0 +1,85 @@
--- ./CMakeLists.txt.orig
+++ ./CMakeLists.txt
@@ -1,10 +1,6 @@
# Copyright (c) 2022 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
-# NOTE: This is only being used for translation scripts.
-
-# For MSVC flags, will be ignored on non-Windows OS's and this project in general. Only needed for cura-build-environment.
-cmake_policy(SET CMP0091 NEW)
project(cura)
cmake_minimum_required(VERSION 3.18)
@@ -15,8 +11,44 @@
set(URANIUM_DIR "${CMAKE_SOURCE_DIR}/../Uranium" CACHE PATH "The location of the Uranium repository")
set(URANIUM_SCRIPTS_DIR "${URANIUM_DIR}/scripts" CACHE PATH "The location of the scripts directory of the Uranium repository")
+option(CURA_DEBUGMODE "Enable debug dialog and other debug features" OFF)
+if(CURA_DEBUGMODE)
+ set(_cura_debugmode "ON")
+endif()
+
option(GENERATE_TRANSLATIONS "Should the translations be generated?" ON)
+set(CURA_APP_NAME "cura" CACHE STRING "Short name of Cura, used for configuration folder")
+set(CURA_APP_DISPLAY_NAME "Ultimaker Cura" CACHE STRING "Display name of Cura")
+set(CURA_VERSION "master" CACHE STRING "Version name of Cura")
+set(CURA_BUILDTYPE "" CACHE STRING "Build type of Cura, eg. 'PPA'")
+set(CURA_CLOUD_API_ROOT "" CACHE STRING "Alternative Cura cloud API root")
+set(CURA_CLOUD_API_VERSION "" CACHE STRING "Alternative Cura cloud API version")
+set(CURA_CLOUD_ACCOUNT_API_ROOT "" CACHE STRING "Alternative Cura cloud account API version")
+set(CURA_MARKETPLACE_ROOT "" CACHE STRING "Alternative Marketplace location")
+set(CURA_DIGITAL_FACTORY_URL "" CACHE STRING "Alternative Digital Factory location")
+
+configure_file(${CMAKE_SOURCE_DIR}/com.ultimaker.cura.desktop.in ${CMAKE_BINARY_DIR}/com.ultimaker.cura.desktop @ONLY)
+
+configure_file(cura/CuraVersion.py.in CuraVersion.py @ONLY)
+
+if(NOT DEFINED Python_VERSION)
+ set(Python_VERSION
+ 3.11
+ CACHE STRING "Python Version" FORCE)
+ message(STATUS "Setting Python version to ${Python_VERSION}. Set Python_VERSION if you want to compile against an other version.")
+endif()
+if(APPLE)
+ set(Python_FIND_FRAMEWORK NEVER)
+endif()
+find_package(Python ${Python_VERSION} EXACT REQUIRED COMPONENTS Interpreter)
+message(STATUS "Linking and building ${project_name} against Python ${Python_VERSION}")
+if(NOT DEFINED Python_SITELIB_LOCAL)
+ set(Python_SITELIB_LOCAL
+ "${Python_SITELIB}"
+ CACHE PATH "Local alternative site-package location to install Cura" FORCE)
+endif()
+
if(NOT ${URANIUM_DIR} STREQUAL "")
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${URANIUM_DIR}/cmake")
endif()
@@ -29,4 +61,24 @@
if(${GENERATE_TRANSLATIONS})
CREATE_TRANSLATION_TARGETS()
endif()
-endif()
\ No newline at end of file
+endif()
+
+install(DIRECTORY resources DESTINATION ${CMAKE_INSTALL_DATADIR}/cura)
+
+include(CuraPluginInstall)
+
+install(FILES cura_app.py DESTINATION ${CMAKE_INSTALL_BINDIR}
+ PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
+install(DIRECTORY cura DESTINATION "${Python_SITELIB_LOCAL}")
+install(FILES ${CMAKE_BINARY_DIR}/CuraVersion.py DESTINATION "${Python_SITELIB_LOCAL}/cura/")
+if(NOT APPLE AND NOT WIN32)
+ install(FILES ${CMAKE_BINARY_DIR}/com.ultimaker.cura.desktop
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/applications)
+ install(FILES ${CMAKE_SOURCE_DIR}/resources/images/cura-icon.png
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/128x128/apps/)
+ install(FILES com.ultimaker.cura.appdata.xml
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/metainfo)
+ install(FILES cura.sharedmimeinfo
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/mime/packages/
+ RENAME cura.xml )
+endif()

View file

@ -32,5 +32,5 @@ package() {
}
sha512sums="
90649d6c7ac10edc6b50e9bfba54d5df472c0621768886fcdb039874152dbd2a72c1a23f38a5e25e4983f16f49546039eca2b79b9386f261b3c5d31a93c439f5 electron_tasje-0.5.7.tar.gz
0fc47c25294a284ffcc9fc2440ac383c1b0796c75db9ee12902fc2614271bbb9a4abb9e42d2fa8d1ac5ff804acd251378b35d1b9aa4a00e2e9b927fa5c12c50c electron_tasje-0.5.7.tar.gz
"

View file

@ -0,0 +1,27 @@
# Contributor: Aiden Grossman <agrossman154@yahoo.com>
# Maintainer: Aiden Grossman <agrossman154@yahoo.com>
pkgname=fdm-materials
pkgver=5.2.2
pkgrel=0
pkgdesc="FDM Material Database"
url="https://github.com/Ultimaker/fdm_materials"
arch="noarch"
license="CC0-1.0"
makedepends="cmake samurai"
options="!check" # no checks provided
source="$pkgname-$pkgver.tar.gz::https://github.com/Ultimaker/fdm_materials/archive/refs/tags/$pkgver.tar.gz"
builddir="$srcdir/fdm_materials-$pkgver"
build() {
cmake -B build -G Ninja \
-DCMAKE_INSTALL_PREFIX=/usr
cmake --build build
}
package() {
DESTDIR="$pkgdir" cmake --install build
}
sha512sums="
73eefec8b7b88af73afc578ffba583480bda30309945b1720d7a1a075bd7ab3279599d53fe83f4c96695f294a5a3e11297abc334ca6cc9db163d4eb0fbdaf0f9 fdm-materials-5.2.2.tar.gz
"

View file

@ -11,7 +11,7 @@ makedepends="cmake hdf5-dev swig python3-dev samurai"
options="!check" #test suite is nonfunctional with python bindings
subpackages="$pkgname-dev $pkgname-doc $pkgname-python-pyc $pkgname-python:_py"
source="
https://files.salome-platform.org/Salome/other/med-$pkgver.tar.gz
https://ftp.kaist.ac.kr/macports/distfiles/libmed/med-$pkgver.tar.gz
hdf5.patch
cmake-config-dir.patch
"

View file

@ -0,0 +1,40 @@
# Contributor: Anjandev Momi <anjan@momi.ca>
# Maintainer: Anjandev Momi <anjan@momi.ca>
pkgname=libnest2d
pkgver=0.4
pkgrel=5
pkgdesc="2D irregular bin packaging and nesting library written in modern C++"
url="https://github.com/tamasmeszaros/libnest2d"
arch="noarch"
license="LGPL-3.0-only"
makedepends="samurai cmake clipper-dev boost-dev nlopt-dev"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/tamasmeszaros/libnest2d/archive/refs/tags/$pkgver.tar.gz
allow-disallowed-area.patch"
build() {
if [ "$CBUILD" != "$CHOST" ]; then
CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
fi
cmake -B build -G Ninja \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DBUILD_SHARED_LIBS=True \
-DCMAKE_BUILD_TYPE=minsizerel \
$CMAKE_CROSSOPTS .
cmake --build build
}
check() {
cd build
CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}
package() {
DESTDIR="$pkgdir" cmake --install build
}
sha512sums="
fadce18986b844eed13a581f84055df909a17407a0980deb6c7c24248a969a537a8840650bcfc673e61973810ce9a008acb599e3b8e00c9bff6b566ca41cd62c libnest2d-0.4.tar.gz
2e8cd3343c72c576ecb54960d7ad9f4f2322f822b19ac41850b3b28da95e97c2cefe7c67de6c97627df08cd5cdc1660ce4dfa95fe51f88e0ff5c066c8d785458 allow-disallowed-area.patch
"

View file

@ -0,0 +1,124 @@
From 2e91be2679b5efa0773292d9d0a2ae72255bb271 Mon Sep 17 00:00:00 2001
From: Ghostkeeper <rubend@tutanota.com>
Date: Tue, 6 Oct 2020 16:13:15 +0200
Subject: [PATCH 1/3] Allow for an item to be a disallowed area
url: https://github.com/tamasmeszaros/libnest2d/pull/18
Disallowed areas have slightly different behaviour from fixed items: Other items won't get packed closely around them. Implementation of that pending.
Contributes to issue CURA-7754.
---
include/libnest2d/nester.hpp | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/include/libnest2d/nester.hpp b/include/libnest2d/nester.hpp
index 2f207d5..932a060 100644
--- a/include/libnest2d/nester.hpp
+++ b/include/libnest2d/nester.hpp
@@ -71,6 +71,15 @@ class _Item {
int binid_{BIN_ID_UNSET}, priority_{0};
bool fixed_{false};
+ /**
+ * \brief If this is a fixed area, indicates whether it is a disallowed area
+ * or a previously placed item.
+ *
+ * If this is a disallowed area, other objects will not get packed close
+ * together with this item. It only blocks other items in its area.
+ */
+ bool disallowed_{false};
+
public:
/// The type of the shape which was handed over as the template argument.
@@ -129,11 +138,18 @@ class _Item {
sh_(sl::create<RawShape>(std::move(contour), std::move(holes))) {}
inline bool isFixed() const noexcept { return fixed_; }
+ inline bool isDisallowedArea() const noexcept { return disallowed_; }
inline void markAsFixedInBin(int binid)
{
fixed_ = binid >= 0;
binid_ = binid;
}
+ inline void markAsDisallowedAreaInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+ disallowed_ = true;
+ }
inline void binId(int idx) { binid_ = idx; }
inline int binId() const noexcept { return binid_; }
From ff61049e59d3151462bca7ff2e2268c2b32731e7 Mon Sep 17 00:00:00 2001
From: Ghostkeeper <rubend@tutanota.com>
Date: Tue, 6 Oct 2020 16:14:36 +0200
Subject: [PATCH 2/3] Allow unsetting of being a disallowed area
If you set the bin to -1 or set the item to be a simple fixed item afterwards, it'll no longer be a disallowed area.
Contributes to issue CURA-7754.
---
include/libnest2d/nester.hpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/libnest2d/nester.hpp b/include/libnest2d/nester.hpp
index 932a060..54761a6 100644
--- a/include/libnest2d/nester.hpp
+++ b/include/libnest2d/nester.hpp
@@ -143,12 +143,13 @@ class _Item {
{
fixed_ = binid >= 0;
binid_ = binid;
+ disallowed_ = false;
}
inline void markAsDisallowedAreaInBin(int binid)
{
fixed_ = binid >= 0;
binid_ = binid;
- disallowed_ = true;
+ disallowed_ = fixed_;
}
inline void binId(int idx) { binid_ = idx; }
From 31391fd173249ad9b906390058e13b09238fadc8 Mon Sep 17 00:00:00 2001
From: Ghostkeeper <rubend@tutanota.com>
Date: Thu, 8 Oct 2020 11:06:58 +0200
Subject: [PATCH 3/3] Align items to their starting position if all placed
items are disallowed
We shouldn't align items to disallowed areas. So place them in the starting position according to the alignment property.
Lot of work to investigate. But very little code changes!
Contributes to issue CURA-7754.
---
include/libnest2d/placers/nfpplacer.hpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/include/libnest2d/placers/nfpplacer.hpp b/include/libnest2d/placers/nfpplacer.hpp
index 96a8cff..b0ebb15 100644
--- a/include/libnest2d/placers/nfpplacer.hpp
+++ b/include/libnest2d/placers/nfpplacer.hpp
@@ -101,7 +101,7 @@ struct NfpPConfig {
* alignment with the candidate item or do anything else.
*
* \param remaining A container with the remaining items waiting to be
- * placed. You can use some features about the remaining items to alter to
+ * placed. You can use some features about the remaining items to alter the
* score of the current placement. If you know that you have to leave place
* for other items as well, that might influence your decision about where
* the current candidate should be placed. E.g. imagine three big circles
@@ -735,7 +735,8 @@ class _NofitPolyPlacer: public PlacerBoilerplate<_NofitPolyPlacer<RawShape, TBin
remlist.insert(remlist.end(), remaining.from, remaining.to);
}
- if(items_.empty()) {
+ if(std::all_of(items_.begin(), items_.end(),
+ [](const Item& item) { return item.isDisallowedArea(); })) {
setInitialPosition(item);
best_overfit = overfit(item.transformedShape(), bin_);
can_pack = best_overfit <= 0;

View file

@ -0,0 +1,33 @@
# Contributor: Alex Yam <alex@alexyam.com>
# Maintainer: Alex Yam <alex@alexyam.com>
pkgname=libspatialindex
pkgver=0_git20210205
_commit=8ee223632f95c81f49f5eb2d547ad973475c4601
pkgrel=0
pkgdesc="extensible framework for robust spatial indexing methods"
url="https://libspatialindex.org/"
arch="all"
license="MIT"
makedepends="cmake"
subpackages="$pkgname-dev"
source="$pkgname-$_commit.tar.gz::https://github.com/libspatialindex/libspatialindex/archive/$_commit.tar.gz"
builddir="$srcdir/$pkgname-$_commit"
build() {
cmake -B build \
-DCMAKE_BUILD_TYPE=None \
-DCMAKE_PREFIX_PATH=/usr \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_TESTING=ON
cmake --build build
}
check() {
cd build && ctest
}
package() {
DESTDIR="$pkgdir" cmake --build build --target install
}
sha512sums="caf91aac77b75445e4fc4d0baedcd10c619b2097dfd841b00339d9ddd4b73db05b99de1d84be88f1083f4713a936cf110d5851523491f5a74c6f96e1d5795dbb libspatialindex-8ee223632f95c81f49f5eb2d547ad973475c4601.tar.gz"

38
backports/nlopt/APKBUILD Normal file
View file

@ -0,0 +1,38 @@
# Contributor: Anjandev Momi <anjan@momi.ca>
# Maintainer: Anjandev Momi <anjan@momi.ca>
pkgname=nlopt
pkgver=2.7.1
pkgrel=0
pkgdesc="library for nonlinear optimization, wrapping many algorithms for global and local, constrained or unconstrained, optimization"
url="https://github.com/stevengj/nlopt/"
arch="all"
license="LGPL-2.1-or-later"
makedepends="samurai cmake"
subpackages="$pkgname-dev $pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/stevengj/nlopt/archive/refs/tags/v$pkgver.tar.gz"
build() {
if [ "$CBUILD" != "$CHOST" ]; then
CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
fi
cmake -B build -G Ninja \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DBUILD_SHARED_LIBS=True \
-DCMAKE_BUILD_TYPE=minsizerel \
$CMAKE_CROSSOPTS .
cmake --build build
}
check() {
cd build
CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}
package() {
DESTDIR="$pkgdir" cmake --install build
}
sha512sums="
e23cb522fc696010574c14b72be85acc0f8ccf0bf208bf2b8789c57d6c5a6e6d419ee10330581518b1c1567018ae909b626ce7761d4fbd5bf112916871e420e2 nlopt-2.7.1.tar.gz
"

View file

@ -0,0 +1,42 @@
# Contributor: Aiden Grossman <agrossman154@yahoo.com>
# Maintainer: Aiden Grossman <agrossman154@yahoo.com>
pkgname=py3-arcus
# Needs to be upgraded in sync with libarcus
pkgver=5.2.2
pkgrel=0
pkgdesc="Python bindings for libarcus"
url="https://github.com/Ultimaker/pyArcus"
arch="all"
license="LGPL-3.0-only"
makedepends="
cmake
libarcus-dev
protobuf-dev
py3-sip
python3-dev
samurai
"
options="!check" # package doesn't provide any tests
source="$pkgname-$pkgver.tar.gz::https://github.com/Ultimaker/pyArcus/archive/refs/tags/$pkgver.tar.gz
cmake.patch
cmake-helpers.patch
pyproject.patch"
builddir="$srcdir/pyArcus-$pkgver"
build() {
cmake -G Ninja -B build \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_BUILD_TYPE=Release
cmake --build build
}
package() {
DESTDIR="$pkgdir" cmake --install build
}
sha512sums="
b24cbb9a5d7aa917b1b21e46f935b1293645e731d4e475a5abe364237f35708e8e96a1c6f06fe78e2e0e381737f4a27a6db87e42a5f4de9d48091d9de096f9b0 py3-arcus-5.2.2.tar.gz
f14e55cd31c13051981f26364e34da8c94e8eb5227b1cfd6fe44b9f97b5a4dcf6142a1751fa62eb0514a47583e6ec2d51dc253f23cf72c3fe6a1cb5dca136f21 cmake.patch
de75b985607feae0a9c511742915814e9c3d4bc467183f010ccc334ce4d0d952b6ff86020360b78558c4738cc03cf62c386b44ed76bcec12075c4a93dd03eeb7 cmake-helpers.patch
ef593230d5c78da8ba0fc6ea83225c4543857de1837d3151c45e59ffd7c98063b8f97f25d01c15b6a8f90c26c919206f9f7fa26c9650117f4ce7be49ebca876f pyproject.patch
"

View file

@ -0,0 +1,254 @@
--- /dev/null
+++ ./cmake/CMakeBuilder.py
@@ -0,0 +1,13 @@
+from sipbuild import SetuptoolsBuilder
+
+
+class CMakeBuilder(SetuptoolsBuilder):
+ def __init__(self, project, **kwargs):
+ print("Using the CMake builder")
+ super().__init__(project, **kwargs)
+
+ def build(self):
+ """ Only Generate the source files """
+ print("Generating the source files")
+ self._generate_bindings()
+ self._generate_scripts()
--- /dev/null
+++ ./cmake/FindSIP.cmake
@@ -0,0 +1,65 @@
+# Find SIP
+# ~~~~~~~~
+#
+# SIP website: http://www.riverbankcomputing.co.uk/sip/index.php
+#
+# Find the installed version of SIP. FindSIP should be called after Python
+# has been found.
+#
+# This file defines the following variables:
+#
+# SIP_VERSION - The version of SIP found expressed as a 6 digit hex number
+# suitable for comparison as a string.
+#
+# SIP_VERSION_STR - The version of SIP found as a human readable string.
+#
+# SIP_BINARY_PATH - Path and filename of the SIP command line executable.
+#
+# SIP_INCLUDE_DIR - Directory holding the SIP C++ header file.
+#
+# SIP_DEFAULT_SIP_DIR - Default directory where .sip files should be installed
+# into.
+
+# Copyright (c) 2007, Simon Edwards <simon@simonzone.com>
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+
+
+IF(SIP_VERSION OR SIP_BUILD_EXECUTABLE)
+ # Already in cache, be silent
+ SET(SIP_FOUND TRUE)
+ELSE()
+
+ FIND_FILE(_find_sip_py FindSIP.py PATHS ${CMAKE_MODULE_PATH} NO_CMAKE_FIND_ROOT_PATH)
+
+ EXECUTE_PROCESS(COMMAND ${Python_EXECUTABLE} ${_find_sip_py} OUTPUT_VARIABLE sip_config)
+ IF(sip_config)
+ STRING(REGEX REPLACE "^sip_version:([^\n]+).*$" "\\1" SIP_VERSION ${sip_config})
+ STRING(REGEX REPLACE ".*\nsip_version_num:([^\n]+).*$" "\\1" SIP_VERSION_NUM ${sip_config})
+ STRING(REGEX REPLACE ".*\nsip_version_str:([^\n]+).*$" "\\1" SIP_VERSION_STR ${sip_config})
+ STRING(REGEX REPLACE ".*\ndefault_sip_dir:([^\n]+).*$" "\\1" SIP_DEFAULT_SIP_DIR ${sip_config})
+ IF(${SIP_VERSION_STR} VERSION_LESS 5)
+ STRING(REGEX REPLACE ".*\nsip_bin:([^\n]+).*$" "\\1" SIP_BINARY_PATH ${sip_config})
+ STRING(REGEX REPLACE ".*\nsip_inc_dir:([^\n]+).*$" "\\1" SIP_INCLUDE_DIR ${sip_config})
+ STRING(REGEX REPLACE ".*\nsip_module_dir:([^\n]+).*$" "\\1" SIP_MODULE_DIR ${sip_config})
+ ELSE(${SIP_VERSION_STR} VERSION_LESS 5)
+ FIND_PROGRAM(SIP_BUILD_EXECUTABLE sip-build)
+ ENDIF(${SIP_VERSION_STR} VERSION_LESS 5)
+ SET(SIP_FOUND TRUE)
+ ENDIF(sip_config)
+
+ IF(SIP_FOUND)
+ IF(NOT SIP_FIND_QUIETLY)
+ MESSAGE(STATUS "Found SIP version: ${SIP_VERSION_STR}")
+ ENDIF(NOT SIP_FIND_QUIETLY)
+ ELSE(SIP_FOUND)
+ IF(SIP_FIND_REQUIRED)
+ MESSAGE(FATAL_ERROR "Could not find SIP")
+ ENDIF(SIP_FIND_REQUIRED)
+ ENDIF(SIP_FOUND)
+
+ENDIF()
+
+include(${CMAKE_SOURCE_DIR}/cmake/SIPMacros.cmake)
+ADD_DEFINITIONS(-DSIP_VERSION=0x${SIP_VERSION})
--- /dev/null
+++ ./cmake/FindSIP.py
@@ -0,0 +1,57 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2007, Simon Edwards <simon@simonzone.com>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# * Neither the name of the Simon Edwards <simon@simonzone.com> nor the
+# names of its contributors may be used to endorse or promote products
+# derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY Simon Edwards <simon@simonzone.com> ''AS IS'' AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL Simon Edwards <simon@simonzone.com> BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# FindSIP.py
+# Copyright (c) 2007, Simon Edwards <simon@simonzone.com>
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+try:
+ import sipbuild
+
+ print("sip_version:%06.0x" % sipbuild.version.SIP_VERSION)
+ print("sip_version_num:%d" % sipbuild.version.SIP_VERSION)
+ print("sip_version_str:%s" % sipbuild.version.SIP_VERSION_STR)
+
+ from distutils.sysconfig import get_python_lib
+ python_modules_dir = get_python_lib(plat_specific=1)
+ print("default_sip_dir:%s" % python_modules_dir)
+except ImportError: # Code for SIP v4
+ import sipconfig
+
+ sipcfg = sipconfig.Configuration()
+ print("sip_version:%06.0x" % sipcfg.sip_version)
+ print("sip_version_num:%d" % sipcfg.sip_version)
+ print("sip_version_str:%s" % sipcfg.sip_version_str)
+ print("sip_bin:%s" % sipcfg.sip_bin)
+ print("default_sip_dir:%s" % sipcfg.default_sip_dir)
+ print("sip_inc_dir:%s" % sipcfg.sip_inc_dir)
+ # SIP 4.19.10+ has new sipcfg.sip_module_dir
+ if hasattr(sipcfg, "sip_module_dir"):
+ print("sip_module_dir:%s" % sipcfg.sip_module_dir)
+ else:
+ print("sip_module_dir:%s" % sipcfg.sip_mod_dir)
--- /dev/null
+++ ./cmake/SIPMacros.cmake
@@ -0,0 +1,107 @@
+
+
+# Macros for SIP
+# ~~~~~~~~~~~~~~
+
+set(SIP_ARGS --pep484-pyi --no-protected-is-public)
+
+function(add_sip_module MODULE_TARGET)
+ if(NOT SIP_BUILD_EXECUTABLE)
+ set(SIP_BUILD_EXECUTABLE ${CMAKE_PREFIX_PATH}/Scripts/sip-build)
+ endif()
+
+ message(STATUS "SIP: Generating pyproject.toml")
+ configure_file(${CMAKE_SOURCE_DIR}/pyproject.toml.in ${CMAKE_CURRENT_BINARY_DIR}/pyproject.toml)
+ configure_file(${CMAKE_SOURCE_DIR}/cmake/CMakeBuilder.py ${CMAKE_CURRENT_BINARY_DIR}/CMakeBuilder.py)
+ if(WIN32)
+ set(ext .pyd)
+ set(env_path_sep ";")
+ else()
+ set(ext .so)
+ set(env_path_sep ":")
+ endif()
+
+ message(STATUS "SIP: Generating source files")
+ execute_process(
+ COMMAND ${CMAKE_COMMAND} -E env "PYTHONPATH=${PYTHONPATH}${env_path_sep}$ENV{PYTHONPATH}${env_path_sep}${CMAKE_CURRENT_BINARY_DIR}" ${SIP_BUILD_EXECUTABLE} ${SIP_ARGS}
+ COMMAND_ECHO STDOUT
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/
+ )
+ # This will generate the source-files during the configuration step in CMake. Needed to obtain the sources
+
+ # Touch the generated files (8 in total) to make them dirty and force them to rebuild
+ message(STATUS "SIP: Touching the source files")
+ set(_sip_output_files)
+ list(LENGTH SIP_FILES _no_outputfiles)
+ foreach(_concat_file_nr RANGE 0 ${_no_outputfiles})
+ if(${_concat_file_nr} LESS 8)
+ list(APPEND _sip_output_files "${CMAKE_CURRENT_BINARY_DIR}/${MODULE_TARGET}/${MODULE_TARGET}/sip${MODULE_TARGET}part${_concat_file_nr}.cpp")
+ endif()
+ endforeach()
+
+ # Find the generated source files
+ message(STATUS "SIP: Collecting the generated source files")
+ file(GLOB sip_c "${CMAKE_CURRENT_BINARY_DIR}/${MODULE_TARGET}/${MODULE_TARGET}/*.c")
+ file(GLOB sip_cpp "${CMAKE_CURRENT_BINARY_DIR}/${MODULE_TARGET}/${MODULE_TARGET}/*.cpp")
+ file(GLOB sip_hdr "${CMAKE_CURRENT_BINARY_DIR}/${MODULE_TARGET}/${MODULE_TARGET}/*.h")
+
+ # Add the user specified source files
+ message(STATUS "SIP: Collecting the user specified source files")
+ get_target_property(usr_src ${MODULE_TARGET} SOURCES)
+
+ # create the target library and link all the files (generated and user specified
+ message(STATUS "SIP: Linking the interface target against the shared library")
+ set(sip_sources "${sip_c}" "${sip_cpp}" "${usr_src}")
+
+ if (BUILD_SHARED_LIBS)
+ add_library("sip_${MODULE_TARGET}" SHARED ${sip_sources})
+ else()
+ add_library("sip_${MODULE_TARGET}" STATIC ${sip_sources})
+ endif()
+
+ # Make sure that the library name of the target is the same as the MODULE_TARGET with the appropriate extension
+ target_link_libraries("sip_${MODULE_TARGET}" PRIVATE "${MODULE_TARGET}")
+ set_target_properties("sip_${MODULE_TARGET}" PROPERTIES PREFIX "")
+ set_target_properties("sip_${MODULE_TARGET}" PROPERTIES SUFFIX ${ext})
+ set_target_properties("sip_${MODULE_TARGET}" PROPERTIES OUTPUT_NAME "${MODULE_TARGET}")
+
+ # Add the custom command to (re-)generate the files and mark them as dirty. This allows the user to actually work
+ # on the sip definition files without having to reconfigure the complete project.
+ if (NOT DEFINED PYTHONPATH)
+ set(PYTHONPATH "")
+ endif ()
+ add_custom_command(
+ TARGET "sip_${MODULE_TARGET}"
+ COMMAND ${CMAKE_COMMAND} -E env "PYTHONPATH=${PYTHONPATH}${env_path_sep}$ENV{PYTHONPATH}${env_path_sep}${CMAKE_CURRENT_BINARY_DIR}" ${SIP_BUILD_EXECUTABLE} ${SIP_ARGS}
+ COMMAND ${CMAKE_COMMAND} -E touch ${_sip_output_files}
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/
+ MAIN_DEPENDENCY ${MODULE_SIP}
+ DEPENDS ${sip_sources}
+ VERBATIM
+ )
+
+ set_target_properties("sip_${MODULE_TARGET}"
+ PROPERTIES
+ RESOURCE "${CMAKE_CURRENT_BINARY_DIR}/${MODULE_TARGET}/${MODULE_TARGET}/${MODULE_TARGET}.pyi")
+endfunction()
+
+function(install_sip_module MODULE_TARGET)
+ if(DEFINED ARGV1)
+ set(_install_path ${ARGV1})
+ else()
+ if(DEFINED Python_SITEARCH)
+ set(_install_path ${Python_SITEARCH})
+ elseif(DEFINED Python_SITELIB)
+ set(_install_path ${Python_SITELIB})
+ else()
+ message(FATAL_ERROR "SIP: Specify the site-packages location")
+ endif()
+ endif()
+ message(STATUS "SIP: Installing Python module and PEP 484 file in ${_install_path}")
+ install(TARGETS "sip_${MODULE_TARGET}"
+ ARCHIVE DESTINATION ${_install_path}
+ LIBRARY DESTINATION ${_install_path}
+ RUNTIME DESTINATION ${_install_path}
+ RESOURCE DESTINATION ${_install_path}
+ )
+endfunction()

View file

@ -0,0 +1,32 @@
--- ./CMakeLists.txt.orig
+++ ./CMakeLists.txt
@@ -2,22 +2,22 @@
project(pyarcus)
cmake_minimum_required(VERSION 3.20)
-find_package(protobuf REQUIRED)
-find_package(cpython REQUIRED)
-find_package(arcus REQUIRED)
+list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
-find_package(standardprojectsettings REQUIRED)
-find_package(sipbuildtool REQUIRED)
+find_package(Protobuf REQUIRED)
+find_package(Python REQUIRED COMPONENTS Interpreter Development)
+find_package(Arcus REQUIRED)
+find_package(SIP 6.5.0 REQUIRED)
+
add_library(pyArcus INTERFACE src/PythonMessage.cpp)
-use_threads(pyArcus)
target_include_directories(pyArcus
INTERFACE
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/>
)
-target_link_libraries(pyArcus INTERFACE arcus::arcus protobuf::libprotobuf cpython::cpython)
+target_link_libraries(pyArcus INTERFACE Arcus protobuf::libprotobuf Python::Python)
add_sip_module(pyArcus)
install_sip_module(pyArcus)

View file

@ -0,0 +1,20 @@
--- /dev/null
+++ ./pyproject.toml.in
@@ -0,0 +1,17 @@
+[build-system]
+requires = ["sip >=6, <7"]
+build-backend = "sipbuild.api"
+
+[tool.sip.metadata]
+name = "pyArcus"
+
+[tool.sip.project]
+builder-factory = "CMakeBuilder"
+sip-files-dir = "${CMAKE_CURRENT_SOURCE_DIR}/python/"
+sip-include-dirs = ["CMAKE_CURRENT_SOURCE_DIR/python/"]
+build-dir = "${CMAKE_CURRENT_BINARY_DIR}/pyArcus/"
+
+[tool.sip.bindings.pyArcus]
+exceptions = true
+release-gil = true
+concatenate = 8

View file

@ -0,0 +1,32 @@
# Contributor: Aiden Grossman <agrossman154@yahoo.com>
# Maintainer: Aiden Grossman <agrossman154@yahoo.com>
pkgname=py3-mapbox-earcut
pkgver=1.0.1
pkgrel=0
pkgdesc="Python bindings for the mapbox earcut c++ library"
url="https://github.com/skogler/mapbox_earcut_python"
arch="all"
license="ISC"
depends="py3-numpy"
makedepends="py3-setuptools py3-pybind11-dev python3-dev"
checkdepends="pytest"
source="$pkgname-$pkgver.tar.gz::https://github.com/skogler/mapbox_earcut_python/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/mapbox_earcut_python-$pkgver"
build() {
python3 setup.py build
}
check() {
python3 -m venv --clear --without-pip --system-site-packages test-env
test-env/bin/python3 setup.py install
test-env/bin/python3 -m pytest
}
package() {
python3 setup.py install --skip-build --root="$pkgdir"
}
sha512sums="
cdb32585cbaf74c15e59af0ae70d983dd2f9bc9cfe1b59b3eadc4d442f7d962241854b589a035deae67cacd9334833b911d0981f0d417fe587348fc7d24f0c0a py3-mapbox-earcut-1.0.1.tar.gz
"

View file

@ -0,0 +1,33 @@
# Contributor: Aiden Grossman <agrossman154@yahoo.com>
# Maintainer: Aiden Grossman <agrossman154@yahoo.com>
pkgname=py3-numpy-stl
pkgver=3.0.1
pkgrel=0
pkgdesc="Library for working with STLs"
url="https://github.com/WoLpH/numpy-stl"
# s390x: no py3-utils
arch="noarch !s390x"
license="BSD-3-Clause"
depends="python3 py3-utils py3-numpy"
makedepends="py3-setuptools"
checkdepends="py3-pytest"
source="$pkgname-$pkgver.tar.gz::https://github.com/wolph/numpy-stl/releases/download/v$pkgver/numpy-stl-$pkgver.tar.gz"
builddir="$srcdir/numpy-stl-$pkgver"
build() {
python3 setup.py build
}
check() {
# deselected test needs xvfb-run and fails
pytest \
--deselect tests/test_ascii.py::test_use_with_qt_with_custom_locale_decimal_delimeter
}
package() {
python3 setup.py install --skip-build --root="$pkgdir"
}
sha512sums="
d01abb8f54738600ce36c8c44e1392957061030e7accbbfa0352aea4a904323a96712099146b311ce9518f243317c25c47cfb30930469602c0ad439de9f43c5f py3-numpy-stl-3.0.1.tar.gz
"

View file

@ -0,0 +1,33 @@
# Contributor: Aiden Grossman <agrossman154@yahoo.com>
# Maintainer: Aiden Grossman <agrossman154@yahoo.com>
pkgname=py3-pyinstrument
pkgver=4.4.0
pkgrel=2
pkgdesc="Call stack profiler for Python"
url="https://github.com/joerick/pyinstrument"
arch="all"
license="BSD-3-Clause"
makedepends="py3-setuptools python3-dev"
checkdepends="py3-pytest py3-flaky py3-trio py3-greenlet"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/joerick/pyinstrument/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/pyinstrument-$pkgver"
options="!check" # currently not working
build() {
python3 setup.py build
}
check() {
python3 -m venv --clear --without-pip --system-site-packages test-env
test-env/bin/python3 setup.py install
test-env/bin/python3 -m pytest
}
package() {
python3 setup.py install --skip-build --root="$pkgdir"
}
sha512sums="
bf20ebdf52d0a51515a3c621ba08b59032dea26d5d023dac3eeb477d4d408305c69db4ee60743c9eeb4e05111feb6da877d05da36b42a433a9d9f0af944cafd7 py3-pyinstrument-4.4.0.tar.gz
"

View file

@ -0,0 +1,49 @@
# Contributor: Anjandev Momi <anjan@momi.ca>
# Maintainer: Anjandev Momi <anjan@momi.ca>
pkgname=py3-pynest2d
pkgver=5.2.2
pkgrel=2
pkgdesc="Python bindings for libnest2d"
url="https://github.com/Ultimaker/pynest2d"
arch="all"
license="LGPL-3.0-or-later"
makedepends="samurai cmake libnest2d-dev clipper-dev py3-sip nlopt-dev boost-dev python3-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/Ultimaker/pynest2d/archive/refs/tags/$pkgver.tar.gz
cmake.patch
cmake-helpers.patch
pyproject.patch"
builddir="$srcdir/pynest2d-$pkgver"
options="!check" # doesn't seem like tests are packaged anymore
prepare() {
mv ./python ./src
default_prepare
}
build() {
if [ "$CBUILD" != "$CHOST" ]; then
CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
fi
cmake -B build -G Ninja \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_SHARED_LIBS=True \
-DCMAKE_BUILD_TYPE=Release \
$CMAKE_CROSSOPTS
cmake --build build
}
check() {
cd build
CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}
package() {
DESTDIR="$pkgdir" cmake --install build
}
sha512sums="
f5d701e431c81f8d2da7b14ca5677d3303064cf7910e80d289d7ff8fe99117fb9c470242f25f21fa8e1f064c63accf5349f4956981e316b09b14342223f79b61 py3-pynest2d-5.2.2.tar.gz
c8133d221a2fd8ed5fb32933a69f992dab2e83cdb9db30dcb715ebdfe6d403be3e94df393a921f506b63ef9d8b30a107f26b57cd39810faa9bee461afe5e1afd cmake.patch
dbf6609a21e39ae87fa89f2faf9c98a011f287cb383c5b74f92f41e3a350b487e69643c94110f7fcc25e9e25921a698cc20d9ee021d36ff908d03c0d5ca88a46 cmake-helpers.patch
f1b710509d97b5a2a4d021747e73884d27ae00fd93a04c90be01f123cdcc59be4757b4a73dff9c9921b7794551e531cf6729e4211144c60294d107b92a928b51 pyproject.patch
"

View file

@ -0,0 +1,253 @@
--- /dev/null
+++ ./cmake/CMakeBuilder.py
@@ -0,0 +1,13 @@
+from sipbuild import SetuptoolsBuilder
+
+
+class CMakeBuilder(SetuptoolsBuilder):
+ def __init__(self, project, **kwargs):
+ print("Using the CMake builder")
+ super().__init__(project, **kwargs)
+
+ def build(self):
+ """ Only Generate the source files """
+ print("Generating the source files")
+ self._generate_bindings()
+ self._generate_scripts()
\ No newline at end of file
--- /dev/null
+++ ./cmake/FindSIP.py
@@ -0,0 +1,57 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2007, Simon Edwards <simon@simonzone.com>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# * Neither the name of the Simon Edwards <simon@simonzone.com> nor the
+# names of its contributors may be used to endorse or promote products
+# derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY Simon Edwards <simon@simonzone.com> ''AS IS'' AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL Simon Edwards <simon@simonzone.com> BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# FindSIP.py
+# Copyright (c) 2007, Simon Edwards <simon@simonzone.com>
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+try:
+ import sipbuild
+
+ print("sip_version:%06.0x" % sipbuild.version.SIP_VERSION)
+ print("sip_version_num:%d" % sipbuild.version.SIP_VERSION)
+ print("sip_version_str:%s" % sipbuild.version.SIP_VERSION_STR)
+
+ from distutils.sysconfig import get_python_lib
+ python_modules_dir = get_python_lib(plat_specific=1)
+ print("default_sip_dir:%s" % python_modules_dir)
+except ImportError: # Code for SIP v4
+ import sipconfig
+
+ sipcfg = sipconfig.Configuration()
+ print("sip_version:%06.0x" % sipcfg.sip_version)
+ print("sip_version_num:%d" % sipcfg.sip_version)
+ print("sip_version_str:%s" % sipcfg.sip_version_str)
+ print("sip_bin:%s" % sipcfg.sip_bin)
+ print("default_sip_dir:%s" % sipcfg.default_sip_dir)
+ print("sip_inc_dir:%s" % sipcfg.sip_inc_dir)
+ # SIP 4.19.10+ has new sipcfg.sip_module_dir
+ if hasattr(sipcfg, "sip_module_dir"):
+ print("sip_module_dir:%s" % sipcfg.sip_module_dir)
+ else:
+ print("sip_module_dir:%s" % sipcfg.sip_mod_dir)
--- /dev/null
+++ ./cmake/FindSIP.cmake
@@ -0,0 +1,65 @@
+# Find SIP
+# ~~~~~~~~
+#
+# SIP website: http://www.riverbankcomputing.co.uk/sip/index.php
+#
+# Find the installed version of SIP. FindSIP should be called after Python
+# has been found.
+#
+# This file defines the following variables:
+#
+# SIP_VERSION - The version of SIP found expressed as a 6 digit hex number
+# suitable for comparison as a string.
+#
+# SIP_VERSION_STR - The version of SIP found as a human readable string.
+#
+# SIP_BINARY_PATH - Path and filename of the SIP command line executable.
+#
+# SIP_INCLUDE_DIR - Directory holding the SIP C++ header file.
+#
+# SIP_DEFAULT_SIP_DIR - Default directory where .sip files should be installed
+# into.
+
+# Copyright (c) 2007, Simon Edwards <simon@simonzone.com>
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+
+
+IF(SIP_VERSION OR SIP_BUILD_EXECUTABLE)
+ # Already in cache, be silent
+ SET(SIP_FOUND TRUE)
+ELSE()
+
+ FIND_FILE(_find_sip_py FindSIP.py PATHS ${CMAKE_MODULE_PATH} NO_CMAKE_FIND_ROOT_PATH)
+
+ EXECUTE_PROCESS(COMMAND ${Python_EXECUTABLE} ${_find_sip_py} OUTPUT_VARIABLE sip_config)
+ IF(sip_config)
+ STRING(REGEX REPLACE "^sip_version:([^\n]+).*$" "\\1" SIP_VERSION ${sip_config})
+ STRING(REGEX REPLACE ".*\nsip_version_num:([^\n]+).*$" "\\1" SIP_VERSION_NUM ${sip_config})
+ STRING(REGEX REPLACE ".*\nsip_version_str:([^\n]+).*$" "\\1" SIP_VERSION_STR ${sip_config})
+ STRING(REGEX REPLACE ".*\ndefault_sip_dir:([^\n]+).*$" "\\1" SIP_DEFAULT_SIP_DIR ${sip_config})
+ IF(${SIP_VERSION_STR} VERSION_LESS 5)
+ STRING(REGEX REPLACE ".*\nsip_bin:([^\n]+).*$" "\\1" SIP_BINARY_PATH ${sip_config})
+ STRING(REGEX REPLACE ".*\nsip_inc_dir:([^\n]+).*$" "\\1" SIP_INCLUDE_DIR ${sip_config})
+ STRING(REGEX REPLACE ".*\nsip_module_dir:([^\n]+).*$" "\\1" SIP_MODULE_DIR ${sip_config})
+ ELSE(${SIP_VERSION_STR} VERSION_LESS 5)
+ FIND_PROGRAM(SIP_BUILD_EXECUTABLE sip-build)
+ ENDIF(${SIP_VERSION_STR} VERSION_LESS 5)
+ SET(SIP_FOUND TRUE)
+ ENDIF(sip_config)
+
+ IF(SIP_FOUND)
+ IF(NOT SIP_FIND_QUIETLY)
+ MESSAGE(STATUS "Found SIP version: ${SIP_VERSION_STR}")
+ ENDIF(NOT SIP_FIND_QUIETLY)
+ ELSE(SIP_FOUND)
+ IF(SIP_FIND_REQUIRED)
+ MESSAGE(FATAL_ERROR "Could not find SIP")
+ ENDIF(SIP_FIND_REQUIRED)
+ ENDIF(SIP_FOUND)
+
+ENDIF()
+
+include(${CMAKE_SOURCE_DIR}/cmake/SIPMacros.cmake)
+ADD_DEFINITIONS(-DSIP_VERSION=0x${SIP_VERSION})
--- /dev/null
+++ ./cmake/SIPMacros.cmake
@@ -0,0 +1,105 @@
+# Macros for SIP
+# ~~~~~~~~~~~~~~
+
+set(SIP_ARGS --pep484-pyi --no-protected-is-public)
+
+function(add_sip_module MODULE_TARGET)
+ if(NOT SIP_BUILD_EXECUTABLE)
+ set(SIP_BUILD_EXECUTABLE ${CMAKE_PREFIX_PATH}/Scripts/sip-build)
+ endif()
+
+ message(STATUS "SIP: Generating pyproject.toml")
+ configure_file(${CMAKE_SOURCE_DIR}/pyproject.toml.in ${CMAKE_CURRENT_BINARY_DIR}/pyproject.toml)
+ configure_file(${CMAKE_SOURCE_DIR}/cmake/CMakeBuilder.py ${CMAKE_CURRENT_BINARY_DIR}/CMakeBuilder.py)
+ if(WIN32)
+ set(ext .pyd)
+ set(env_path_sep ";")
+ else()
+ set(ext .so)
+ set(env_path_sep ":")
+ endif()
+
+ message(STATUS "SIP: Generating source files")
+ execute_process(
+ COMMAND ${CMAKE_COMMAND} -E env "PYTHONPATH=${PYTHONPATH}${env_path_sep}$ENV{PYTHONPATH}${env_path_sep}${CMAKE_CURRENT_BINARY_DIR}" ${SIP_BUILD_EXECUTABLE} ${SIP_ARGS}
+ COMMAND_ECHO STDOUT
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/
+ )
+ # This will generate the source-files during the configuration step in CMake. Needed to obtain the sources
+
+ # Touch the generated files (8 in total) to make them dirty and force them to rebuild
+ message(STATUS "SIP: Touching the source files")
+ set(_sip_output_files)
+ list(LENGTH SIP_FILES _no_outputfiles)
+ foreach(_concat_file_nr RANGE 0 ${_no_outputfiles})
+ if(${_concat_file_nr} LESS 8)
+ list(APPEND _sip_output_files "${CMAKE_CURRENT_BINARY_DIR}/${MODULE_TARGET}/${MODULE_TARGET}/sip${MODULE_TARGET}part${_concat_file_nr}.cpp")
+ endif()
+ endforeach()
+
+ # Find the generated source files
+ message(STATUS "SIP: Collecting the generated source files")
+ file(GLOB sip_c "${CMAKE_CURRENT_BINARY_DIR}/${MODULE_TARGET}/${MODULE_TARGET}/*.c")
+ file(GLOB sip_cpp "${CMAKE_CURRENT_BINARY_DIR}/${MODULE_TARGET}/${MODULE_TARGET}/*.cpp")
+ file(GLOB sip_hdr "${CMAKE_CURRENT_BINARY_DIR}/${MODULE_TARGET}/${MODULE_TARGET}/*.h")
+
+ # Add the user specified source files
+ message(STATUS "SIP: Collecting the user specified source files")
+ get_target_property(usr_src ${MODULE_TARGET} SOURCES)
+
+ # create the target library and link all the files (generated and user specified
+ message(STATUS "SIP: Linking the interface target against the shared library")
+ set(sip_sources "${sip_c}" "${sip_cpp}")
+ if(${usr_src})
+ list(APPEND sip_sources "${usr_src}")
+ endif()
+
+ if (BUILD_SHARED_LIBS)
+ add_library("sip_${MODULE_TARGET}" SHARED ${sip_sources})
+ else()
+ add_library("sip_${MODULE_TARGET}" STATIC ${sip_sources})
+ endif()
+
+ # Make sure that the library name of the target is the same as the MODULE_TARGET with the appropriate extension
+ target_link_libraries("sip_${MODULE_TARGET}" PRIVATE "${MODULE_TARGET}")
+ set_target_properties("sip_${MODULE_TARGET}" PROPERTIES PREFIX "")
+ set_target_properties("sip_${MODULE_TARGET}" PROPERTIES SUFFIX ${ext})
+ set_target_properties("sip_${MODULE_TARGET}" PROPERTIES OUTPUT_NAME "${MODULE_TARGET}")
+
+ # Add the custom command to (re-)generate the files and mark them as dirty. This allows the user to actually work
+ # on the sip definition files without having to reconfigure the complete project.
+ add_custom_command(
+ TARGET "sip_${MODULE_TARGET}"
+ COMMAND ${CMAKE_COMMAND} -E env "PYTHONPATH=${PYTHONPATH}${env_path_sep}$ENV{PYTHONPATH}${env_path_sep}${CMAKE_CURRENT_BINARY_DIR}" ${SIP_BUILD_EXECUTABLE} ${SIP_ARGS}
+ COMMAND ${CMAKE_COMMAND} -E touch ${_sip_output_files}
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/
+ MAIN_DEPENDENCY ${MODULE_SIP}
+ DEPENDS ${sip_sources}
+ VERBATIM
+ )
+
+ set_target_properties("sip_${MODULE_TARGET}"
+ PROPERTIES
+ RESOURCE "${CMAKE_CURRENT_BINARY_DIR}/${MODULE_TARGET}/${MODULE_TARGET}/${MODULE_TARGET}.pyi")
+endfunction()
+
+function(install_sip_module MODULE_TARGET)
+ if(DEFINED ARGV1)
+ set(_install_path ${ARGV1})
+ else()
+ if(DEFINED Python_SITEARCH)
+ set(_install_path ${Python_SITEARCH})
+ elseif(DEFINED Python_SITELIB)
+ set(_install_path ${Python_SITELIB})
+ else()
+ message(FATAL_ERROR "SIP: Specify the site-packages location")
+ endif()
+ endif()
+ message(STATUS "SIP: Installing Python module and PEP 484 file in ${_install_path}")
+ install(TARGETS "sip_${MODULE_TARGET}"
+ ARCHIVE DESTINATION ${_install_path}
+ LIBRARY DESTINATION ${_install_path}
+ RUNTIME DESTINATION ${_install_path}
+ RESOURCE DESTINATION ${_install_path}
+ )
+endfunction()

View file

@ -0,0 +1,34 @@
--- ./CMakeLists.txt.orig
+++ ./CMakeLists.txt
@@ -2,16 +2,25 @@
project(pynest2d)
cmake_minimum_required(VERSION 3.20)
-find_package(nest2d REQUIRED)
-find_package(cpython REQUIRED)
+list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
-find_package(standardprojectsettings REQUIRED)
-find_package(sipbuildtool REQUIRED)
+find_package(Libnest2D REQUIRED)
+find_package(Python REQUIRED COMPONENTS Interpreter Development)
+find_package(SIP REQUIRED 6.5.0)
+
add_library(pynest2d INTERFACE)
-use_threads(pynest2d)
-target_link_libraries(pynest2d INTERFACE nest2d::nest2d cpython::cpython)
+target_include_directories(pynest2d
+ INTERFACE
+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
+ $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/python/>
+ )
+
+find_package(Threads REQUIRED)
+find_package(Boost REQUIRED)
+target_link_libraries(pynest2d INTERFACE Libnest2D::libnest2d Python::Python Threads::Threads Boost::boost)
+
add_sip_module(pynest2d)
install_sip_module(pynest2d)

View file

@ -0,0 +1,21 @@
--- /dev/null
+++ ./pyproject.toml.in
@@ -0,0 +1,17 @@
+[build-system]
+requires = ["sip >=6, <7"]
+build-backend = "sipbuild.api"
+
+[tool.sip.metadata]
+name = "pynest2d"
+
+[tool.sip.project]
+builder-factory = "CMakeBuilder"
+sip-files-dir = "${CMAKE_CURRENT_SOURCE_DIR}/src/"
+sip-include-dirs = ["CMAKE_CURRENT_SOURCE_DIR/src/"]
+build-dir = "${CMAKE_CURRENT_BINARY_DIR}/pynest2d/"
+
+[tool.sip.bindings.pynest2d]
+exceptions = true
+release-gil = true
+concatenate = 8
\ No newline at end of file

View file

@ -0,0 +1,36 @@
# Contributor: Rosie K Languet <rkl@rosiesworkshop.net>
# Maintainer: Rosie K Languet <rkl@rosiesworkshop.net>
pkgname=py3-pyqt6-sip
pkgver=13.5.1
pkgrel=0
pkgdesc="The sip module support for PyQt6"
url="https://riverbankcomputing.com/software/sip"
arch="all"
license="custom:sip"
depends="python3"
makedepends="
py3-gpep517
py3-setuptools
py3-wheel
python3-dev
"
source="https://pypi.python.org/packages/source/P/PyQt6-sip/PyQt6_sip-$pkgver.tar.gz"
options="!check" # No tests
builddir="$srcdir/PyQt6_sip-$pkgver"
build() {
export CFLAGS="$CFLAGS -O2 -flto=auto"
export CXXFLAGS="$CXXFLAGS -O2 -flto=auto"
gpep517 build-wheel \
--wheel-dir dist \
--output-fd 3 3>&1 >&2
}
package() {
python3 -m installer -d "$pkgdir" \
dist/*.whl
}
sha512sums="
1e4170d167a326afe6df86e4a35e209299548054981cb2e5d56da234ef9db4d8594bcb05b6be363c3bc6252776ae9de63d589a3d9f33fba8250d39cdb5e9061a PyQt6_sip-13.5.1.tar.gz
"

View file

@ -0,0 +1,59 @@
# Contributor: Rosie K Languet <rkl@rosiesworkshop.net>
# Maintainer: Rosie K Languet <rkl@rosiesworkshop.net>
pkgname=py3-qt6
pkgver=6.5.0
pkgrel=1
pkgdesc="A set of Python 3 bindings for the Qt toolkit"
url="https://www.riverbankcomputing.com/software/pyqt/"
arch="all !riscv64" # no bindings to be built
license="GPL-3.0-only"
depends="
py3-pyqt6-sip
python3
"
makedepends="
libx11-dev
py3-dbus-dev
py3-opengl
py3-pyqt-builder
py3-sip
python3-dev
qt6-qtbase-dev
qt6-qtconnectivity-dev
qt6-qtdeclarative-dev
qt6-qtmultimedia-dev
qt6-qtserialport-dev
qt6-qtsvg-dev
qt6-qttools-dev
qt6-qtwebchannel-dev
qt6-qtwebsockets-dev
"
subpackages="$pkgname-pyc"
source="https://pypi.python.org/packages/source/P/PyQt6/PyQt6-$pkgver.tar.gz"
builddir="$srcdir/PyQt6-$pkgver"
build() {
export CFLAGS="$CFLAGS -O2 -flto=auto"
export CXXFLAGS="$CXXFLAGS -O2 -flto=auto"
sip-build \
--confirm-license \
--qmake /usr/lib/qt6/bin/qmake \
--api-dir /usr/share/qt6/qsci/api/python \
--pep484-pyi \
--no-make
make -C build
}
check() {
make -C build check
}
package() {
make DESTDIR="$pkgdir" INSTALL_ROOT="$pkgdir" -C build install -j1
python3 -m compileall -j 0 "$pkgdir"/usr/lib/python3*
}
sha512sums="
c73d4c253245d2ccc776544bc651d47ea67067f57b49c3f820100701af4d79385ef4cabe9f65098f35daeba5f2921a566606be4f237e567f6f56360cc760f548 PyQt6-6.5.0.tar.gz
"

View file

@ -0,0 +1,34 @@
# Contributor: Alex Yam <alex@alexyam.com>
# Maintainer: Alex Yam <alex@alexyam.com>
pkgname=py3-rtree
_pkgname=rtree
pkgver=1.0.1
pkgrel=1
pkgdesc="Python3 library for r-tree spatial index (wrapper for libspatialindex)"
url="https://pypi.org/project/Rtree/"
# s390x: Test failed: IndexSerialization::test_interleaving - AssertionError
# s390x: Test failed: IndexStream::test_stream_input - AssertionError
arch="noarch !s390x"
license="MIT"
depends="python3 libspatialindex-dev"
makedepends="py3-setuptools py3-wheel"
checkdepends="py3-pytest py3-numpy"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/Toblerity/rtree/archive/$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver
build() {
python3 setup.py build
}
check() {
python3 -m pytest -v --doctest-modules rtree tests
}
package() {
python3 setup.py install --skip-build --root="$pkgdir"
}
sha512sums="
473ed3bb6457a9831e464b102e52c9ff8667192d2c26880d4cb0bd3bbec51549a532d99ea44650be900298a1ea9302a6aab9c97e0b67c025a0362738062836c7 py3-rtree-1.0.1.tar.gz
"

View file

@ -0,0 +1,33 @@
# Contributor: Aiden Grossman <agrossman154@yahoo.com>
# Maintainer: Aiden Grossman <agrossman154@yahoo.com>
pkgname=py3-svgpath
pkgver=6.2
pkgrel=2
pkgdesc="SVG path and object parser"
url="https://github.com/regebro/svg.path"
arch="noarch"
license="MIT"
depends="python3"
makedepends="py3-setuptools"
checkdepends="py3-pytest py3-pillow"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/regebro/svg.path/archive/refs/tags/$pkgver.tar.gz
no-install-tests.patch"
builddir="$srcdir/svg.path-$pkgver"
build() {
python3 setup.py build
}
check() {
pytest
}
package() {
python3 setup.py install --skip-build --root="$pkgdir"
}
sha512sums="
7c9a67467e888f4961d54daf2706125c4ae21bb0cd1010f335eb072df78f12b1da99ddcf64a33a85a0e82a8b347f19e876161e3da8ebf43e5e7b45bbaf7d3325 py3-svgpath-6.2.tar.gz
62ab1e0980c7fb797f74b81c937a68b6af1112fff293e6ddec6389a8e490a08e181c37217408b58ce3a2ae2afda7813bb3bbe57d5414cfc18e4e53e6d2f2ea5a no-install-tests.patch
"

View file

@ -0,0 +1,15 @@
--- ./setup.py.orig
+++ ./setup.py
@@ -1,3 +1,3 @@
-from setuptools import setup
+from setuptools import setup, find_packages
-setup()
+setup(packages=find_packages("src", exclude=["*tests"]))
--- ./MANIFEST.in.orig
+++ ./MANIFEST.in
@@ -3,3 +3,4 @@
recursive-include src *.png
+global-exclude tests/*

View file

@ -0,0 +1,63 @@
# Contributor: Aiden Grossman <agrossman154@yahoo.com>
# Maintainer: Aiden Grossman <agrossman154@yahoo.com>
pkgname=py3-trimesh
pkgver=3.21.5
pkgrel=0
pkgdesc="Python library for working with triangular meshes"
url="https://github.com/mikedh/trimesh"
# x86, armhf, armv7 Tests fail on int64 to int32 casts on these arches
# s390x, no py3-rtree
# riscv64, no py3-shapely
arch="noarch !x86 !armhf !armv7 !s390x !riscv64"
license="MIT"
depends="
py3-colorlog
py3-jsonschema
py3-lxml
py3-mapbox-earcut
py3-msgpack
py3-networkx
py3-numpy
py3-pillow
py3-requests
py3-rtree
py3-scipy
py3-shapely
py3-svgpath
python3
"
makedepends="
py3-gpep517
py3-setuptools
py3-wheel
"
checkdepends="py3-pytest py3-pytest-xdist py3-pyinstrument"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/mikedh/trimesh/archive/refs/tags/$pkgver.tar.gz"
builddir="$srcdir/trimesh-$pkgver"
build() {
gpep517 build-wheel \
--wheel-dir dist \
--output-fd 3 3>&1 >&2
}
check() {
# test_obj.py: no format zae, probably needs more investigation
python3 -m venv --clear --without-pip --system-site-packages testenv
testenv/bin/python3 -m installer dist/*.whl
testenv/bin/python3 -m pytest -n auto \
--deselect tests/test_dae.py::DAETest::test_material_round \
--deselect tests/test_dae.py::DAETest::test_obj_roundtrip \
--deselect tests/test_light.py::LightTests::test_scene \
--deselect tests/test_obj.py::OBJTest::test_multi_nodupe
}
package() {
python3 -m installer -d "$pkgdir" \
dist/*.whl
}
sha512sums="
4bf6879294042aea9bce65a79c1717de1bec92a0a9f6f420ed98dbc4cb5260dba4656ee0074f77d46d37c910838c7a4b7c7dff0249aa38109bb677993f886291 py3-trimesh-3.21.5.tar.gz
"

View file

@ -0,0 +1,38 @@
# Contributor: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
# Maintainer: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
pkgname=py3-utils
_pkgname=python-utils
pkgver=3.5.2
pkgrel=1
pkgdesc="Convenient utilities not included with the standard Python install"
url="https://github.com/WoLpH/python-utils"
arch="noarch !s390x" # fails tests
license="BSD-3-Clause"
depends="python3"
makedepends="py3-setuptools"
checkdepends="py3-pytest py3-pytest-asyncio py3-loguru"
subpackages="$pkgname-pyc"
source="
https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz
pytest.patch
"
builddir="$srcdir/$_pkgname-$pkgver"
build() {
python3 setup.py build
}
check() {
pytest
}
package() {
python3 setup.py install --skip-build --root="$pkgdir"
}
sha512sums="
2e36bbb2e43591744c63ea972b7f361138694eb32510643ea88e8d757882379e3aec247c2fc4d5c67876939b71d564570a975700728c79f9db0cc4fcbc1605e7 python-utils-3.5.2.tar.gz
8eb5c8a924e4251744e61f7a662496fb5c65d965b1e11596314ac2b72d6643a5496cf264a24ef93732bef1e7cc88ba0794eaf344477704486af75d2930ecb0f9 pytest.patch
"

View file

@ -0,0 +1,14 @@
diff --git a/pytest.ini b/pytest.ini
index 5d49701..e28ed7d 100644
--- a/pytest.ini
+++ b/pytest.ini
@@ -5,9 +5,6 @@ python_files =
addopts =
--doctest-modules
- --cov python_utils
- --cov-report term-missing
- --mypy
doctest_optionflags =
ALLOW_UNICODE

View file

@ -0,0 +1,33 @@
From 88fd460a63263d66173f1e0127b0f208577d7f4e Mon Sep 17 00:00:00 2001
From: fieldOfView <aldo@fieldofview.com>
Date: Sat, 20 May 2023 21:14:36 +0200
Subject: [PATCH] Fix SimpleButton use of UM.ColorImage
Fixes https://github.com/Ultimaker/Cura/issues/15524
---
UM/Qt/qml/UM/SimpleButton.qml | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/UM/Qt/qml/UM/SimpleButton.qml b/UM/Qt/qml/UM/SimpleButton.qml
index d3d398753c..d3bd0e8e14 100644
--- a/UM/Qt/qml/UM/SimpleButton.qml
+++ b/UM/Qt/qml/UM/SimpleButton.qml
@@ -1,7 +1,8 @@
-// Copyright (c) 2018 Ultimaker B.V.
+// Copyright (c) 2023 Ultimaker B.V.
// Uranium is released under the terms of the LGPLv3 or higher.
import QtQuick 2.1
+import UM 1.5 as UM
MouseArea
{
@@ -27,7 +28,7 @@ MouseArea
radius: 0
}
- ColorImage
+ UM.ColorImage
{
id: image

View file

@ -0,0 +1,62 @@
# Contributor: Anjandev Momi <anjan@momi.ca>
# Maintainer: Anjandev Momi <anjan@momi.ca>
pkgname=uranium
pkgver=5.2.2
pkgrel=3
pkgdesc="A Python framework for building Desktop applications"
url="https://github.com/Ultimaker/Uranium"
arch="noarch !armhf !riscv64" # armhf: no py3-qt5, rv64: no py3-shapely
license="LGPL-3.0-or-later"
depends="
py3-cryptography
py3-numpy
py3-qt6
py3-scipy
python3
"
# add cura-binary-data to makedepends when packaged
makedepends="samurai cmake doxygen gettext-dev graphviz"
checkdepends="py3-pytest py3-pytest-benchmark py3-twisted"
options="!check" # checks broken from 5.x onward
source="$pkgname-$pkgver.tar.gz::https://github.com/Ultimaker/Uranium/archive/refs/tags/$pkgver.tar.gz
cmake.patch
cmake-helpers.patch
874_fix-simplebutton-use-of-um-colorimage.patch
fix-logger-used-but-not-imported.patch
qt-try-ints-then-bytes.patch
"
builddir="$srcdir/Uranium-$pkgver"
build() {
if [ "$CBUILD" != "$CHOST" ]; then
CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
fi
cmake -B build -G Ninja \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_BUILD_TYPE=MinSizeRel \
-DGETTEXT_MSGINIT_EXECUTABLE=msginit \
-DCURA_BINARY_DATA_DIRECTORY=/usr/share/cura \
$CMAKE_CROSSOPTS
cmake --build build
}
check() {
# useless code style test with another dependency
ctest -j $JOBS --output-on-failure -T Test
}
package() {
DESTDIR="$pkgdir" cmake --install build
mkdir "$pkgdir"/usr/share/uranium/cmake
mv "$pkgdir"/usr/share/cmake-*/Modules/* "$pkgdir"/usr/share/uranium/cmake/
}
sha512sums="
a9c222400022e05b5c42c72843b024204a58f5d233805bdffa610a2d9cbd1873773868b049aabbe52c6e859f235ca5428fcdfdbb86651f428483999060611e10 uranium-5.2.2.tar.gz
196a04164de288f5bffeebb73ace9390059dcffebaf40395368f413d1af2e2c668d85dd4c761ad226732540d41598235c2c368152cc157d2e89445ce27738c9b cmake.patch
aa185ce3592036f045e3386266015cc08443c2e4f9b9a4c03c77c13525af98d68eaa3360e8858e0561417a826c73bf8a2b209bcad91d2cc16cce32fb0231fcf8 cmake-helpers.patch
d0957ec427070f1b8ebe9257447402e09e3af7a89fe9b3c5967a4c40bfc753fab0ea8f0b0c49e17f5895abcd69888b59e4735d130cb47280207af1b8dbec1e71 874_fix-simplebutton-use-of-um-colorimage.patch
b23701d49d6bc7b8e87e7720ca52b96b9b7dc0e20562c12832eb710aed38dad77f93c20413bd93bc1e2f8026a57af44a1aa06a90cf6488b6f887e3ba0b7ca51c fix-logger-used-but-not-imported.patch
2a277b2e6e4acd701bc72924ec718127d8525192ef8e37a4d99d73b03b6c13462c2cb269704b5ee4c58203991cc3d3bd3ed32dadd5f153d5813eb2a946f02942 qt-try-ints-then-bytes.patch
"

View file

@ -0,0 +1,89 @@
--- /dev/null
+++ ./cmake/UraniumPluginInstall.cmake
@@ -0,0 +1,86 @@
+# Copyright (c) 2022 Ultimaker B.V.
+# UraniumPluginInstall.cmake is released under the terms of the LGPLv3 or higher.
+
+#
+# This module detects all plugins that need to be installed and adds them using the CMake install() command.
+# It detects all plugin folder in the path "plugins/*" where there's a "plugin.json" in it.
+#
+# Plugins can be configured to NOT BE INSTALLED via the variable "UM_NO_INSTALL_PLUGINS" as a list of string in the
+# form of "a;b;c" or "a,b,c". By default all plugins will be installed.
+#
+
+# Options or configuration variables
+set(UM_NO_INSTALL_PLUGINS "" CACHE STRING "A list of plugins that should not be installed, separated with ';' or ','.")
+
+file(GLOB_RECURSE _plugin_json_list ${CMAKE_SOURCE_DIR}/plugins/*/plugin.json)
+list(LENGTH _plugin_json_list _plugin_json_list_len)
+
+# Sort the lists alphabetically so we can handle cases like this:
+# - plugins/my_plugin/plugin.json
+# - plugins/my_plugin/my_module/plugin.json
+# In this case, only "plugins/my_plugin" should be added via install().
+set(_no_install_plugin_list ${UM_NO_INSTALL_PLUGINS})
+# Sanitize the string so the comparison will be case-insensitive.
+string(STRIP "${_no_install_plugin_list}" _no_install_plugin_list)
+string(TOLOWER "${_no_install_plugin_list}" _no_install_plugin_list)
+
+# WORKAROUND counterpart of what's in cura-build.
+string(REPLACE "," ";" _no_install_plugin_list "${_no_install_plugin_list}")
+
+list(LENGTH _no_install_plugin_list _no_install_plugin_list_len)
+
+if(_no_install_plugin_list_len GREATER 0)
+ list(SORT _no_install_plugin_list)
+endif()
+if(_plugin_json_list_len GREATER 0)
+ list(SORT _plugin_json_list)
+endif()
+
+# Check all plugin directories and add them via install() if needed.
+set(_install_plugin_list "")
+foreach(_plugin_json_path ${_plugin_json_list})
+ get_filename_component(_plugin_dir ${_plugin_json_path} DIRECTORY)
+ file(RELATIVE_PATH _rel_plugin_dir ${CMAKE_CURRENT_SOURCE_DIR} ${_plugin_dir})
+ get_filename_component(_plugin_dir_name ${_plugin_dir} NAME)
+
+ # Make plugin name comparison case-insensitive
+ string(TOLOWER "${_plugin_dir_name}" _plugin_dir_name_lowercase)
+
+ # Check if this plugin needs to be skipped for installation
+ set(_add_plugin ON) # Indicates if this plugin should be added to the build or not.
+ set(_is_no_install_plugin OFF) # If this plugin will not be added, this indicates if it's because the plugin is
+ # specified in the NO_INSTALL_PLUGINS list.
+ if(_no_install_plugin_list)
+ if("${_plugin_dir_name_lowercase}" IN_LIST _no_install_plugin_list)
+ set(_add_plugin OFF)
+ set(_is_no_install_plugin ON)
+ endif()
+ endif()
+
+ # Make sure this is not a subdirectory in a plugin that's already in the install list
+ if(_add_plugin)
+ foreach(_known_install_plugin_dir ${_install_plugin_list})
+ if(_plugin_dir MATCHES "${_known_install_plugin_dir}.+")
+ set(_add_plugin OFF)
+ break()
+ endif()
+ endforeach()
+ endif()
+
+ if(_add_plugin)
+ message(STATUS "[+] PLUGIN TO INSTALL: ${_rel_plugin_dir}")
+ get_filename_component(_rel_plugin_parent_dir ${_rel_plugin_dir} DIRECTORY)
+ install(DIRECTORY ${_rel_plugin_dir}
+ DESTINATION lib${LIB_SUFFIX}/uranium/${_rel_plugin_parent_dir}
+ PATTERN "__pycache__" EXCLUDE
+ PATTERN "*.qmlc" EXCLUDE
+ )
+ list(APPEND _install_plugin_list ${_plugin_dir})
+ elseif(_is_no_install_plugin)
+ message(STATUS "[-] PLUGIN TO REMOVE : ${_rel_plugin_dir}")
+ execute_process(COMMAND ${Python_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/mod_bundled_packages_json.py
+ -d ${CMAKE_CURRENT_SOURCE_DIR}/resources/bundled_packages
+ ${_plugin_dir_name}
+ RESULT_VARIABLE _mod_json_result)
+ endif()
+endforeach()

View file

@ -0,0 +1,16 @@
--- ./CMakeLists.txt.orig
+++ ./CMakeLists.txt
@@ -19,9 +19,12 @@
# Build Translations
CREATE_TRANSLATION_TARGETS()
+find_package(Python REQUIRED COMPONENTS Interpreter)
-install(DIRECTORY UM DESTINATION "${Python_SITELIB_LOCAL}")
+install(DIRECTORY UM DESTINATION "${Python_SITELIB}")
install(FILES ${CMAKE_SOURCE_DIR}/cmake/UraniumTranslationTools.cmake
DESTINATION ${CMAKE_INSTALL_DATADIR}/cmake-${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}/Modules/ )
install(DIRECTORY resources DESTINATION ${CMAKE_INSTALL_DATADIR}/uranium)
+
+include(UraniumPluginInstall)

View file

@ -0,0 +1,12 @@
diff --git a/UM/View/SelectionPass.py.orig b/UM/View/SelectionPass.py
index 945b789..ef042a5 100644
--- a/UM/View/SelectionPass.py.orig
+++ b/UM/View/SelectionPass.py
@@ -5,6 +5,7 @@ import enum
import random
from typing import TYPE_CHECKING
+from UM.Logger import Logger
from UM.Resources import Resources
from UM.Application import Application

View file

@ -0,0 +1,94 @@
diff --git a/UM/View/RenderBatch.py.orig b/UM/View/RenderBatch.py
index 6deeeb1..5f1eda5 100644
--- a/UM/View/RenderBatch.py.orig
+++ b/UM/View/RenderBatch.py
@@ -186,10 +186,24 @@ class RenderBatch:
if self._render_type == self.RenderType.Solid:
self._gl.glEnable(self._gl.GL_DEPTH_TEST)
- self._gl.glDepthMask(self._gl.GL_TRUE)
+ try:
+ self._gl.glDepthMask(self._gl.GL_TRUE)
+ except:
+ Logger.log("w", "glDepthMask does not like ints, trying bytes...")
+ try:
+ self._gl.glDepthMask(b'1')
+ except:
+ Logger.log("e", "glDepthMask does not like ints or bytes, no idea what it wants")
elif self._render_type == self.RenderType.Transparent:
self._gl.glEnable(self._gl.GL_DEPTH_TEST)
- self._gl.glDepthMask(self._gl.GL_FALSE)
+ try:
+ self._gl.glDepthMask(self._gl.GL_FALSE)
+ except:
+ Logger.log("w", "glDepthMask does not like ints, trying bytes...")
+ try:
+ self._gl.glDepthMask(b'1')
+ except:
+ Logger.log("e", "glDepthMask does not like ints or bytes, no idea what it wants")
elif self._render_type == self.RenderType.Overlay:
self._gl.glDisable(self._gl.GL_DEPTH_TEST)
diff --git a/UM/View/RenderPass.py.orig b/UM/View/RenderPass.py
index 8068ddf..8cb4f67 100644
--- a/UM/View/RenderPass.py.orig
+++ b/UM/View/RenderPass.py
@@ -93,8 +93,22 @@ class RenderPass:
self._fbo.bind()
# Ensure we can actually write to the relevant FBO components.
- self._gl.glColorMask(self._gl.GL_TRUE, self._gl.GL_TRUE,self._gl.GL_TRUE, self._gl.GL_TRUE)
- self._gl.glDepthMask(self._gl.GL_TRUE)
+ try:
+ self._gl.glColorMask(self._gl.GL_TRUE, self._gl.GL_TRUE,self._gl.GL_TRUE, self._gl.GL_TRUE)
+ except:
+ Logger.log("w", "glColorMask does not like ints, trying bytes...")
+ try:
+ self._gl.glColorMask(b'1', b'1',b'1', b'1')
+ except:
+ Logger.log("e", "glColorMask does not like ints or bytes, no idea what it wants")
+ try:
+ self._gl.glDepthMask(self._gl.GL_TRUE)
+ except:
+ Logger.log("w", "glDepthMask does not like ints, trying bytes...")
+ try:
+ self._gl.glDepthMask(b'1')
+ except:
+ Logger.log("e", "glDepthMask does not like ints or bytes, no idea what it wants")
self._gl.glClear(self._gl.GL_COLOR_BUFFER_BIT | self._gl.GL_DEPTH_BUFFER_BIT)
diff --git a/UM/View/SelectionPass.py.orig b/UM/View/SelectionPass.py
index ef042a5..c28fe4f 100644
--- a/UM/View/SelectionPass.py.orig
+++ b/UM/View/SelectionPass.py
@@ -110,13 +110,27 @@ class SelectionPass(RenderPass):
if selectable_objects:
batch.render(self._scene.getActiveCamera())
- self._gl.glColorMask(self._gl.GL_TRUE, self._gl.GL_TRUE, self._gl.GL_TRUE, self._gl.GL_FALSE)
+ try:
+ self._gl.glColorMask(self._gl.GL_TRUE, self._gl.GL_TRUE, self._gl.GL_TRUE, self._gl.GL_FALSE)
+ except:
+ Logger.log("w", "glColorMask does not like ints, trying bytes...")
+ try:
+ self._gl.glColorMask(b'1', b'1', b'1', b'0')
+ except:
+ Logger.log("e", "glColorMask does not like ints or bytes, no idea what it wants")
self._gl.glDisable(self._gl.GL_DEPTH_TEST)
tool_handle.render(self._scene.getActiveCamera())
self._gl.glEnable(self._gl.GL_DEPTH_TEST)
- self._gl.glColorMask(self._gl.GL_TRUE, self._gl.GL_TRUE, self._gl.GL_TRUE, self._gl.GL_TRUE)
+ try:
+ self._gl.glColorMask(self._gl.GL_TRUE, self._gl.GL_TRUE, self._gl.GL_TRUE, self._gl.GL_TRUE)
+ except:
+ Logger.log("w", "glColorMask does not like ints, trying bytes...")
+ try:
+ self._gl.glColorMask(b'1', b'1', b'1', b'1')
+ except:
+ Logger.log("e", "glColorMask does not like ints or bytes, no idea what it wants")
self.release()

View file

@ -33,6 +33,8 @@ source="https://github.com/encode/uvicorn/archive/$pkgver/uvicorn-$pkgver.tar.gz
case "$CARCH" in
# test suite blocked by py3-httpx
armhf|ppc64le) options="!check" ;;
# test failures
aarch64) options="!check" ;;
esac
build() {

View file

@ -65,7 +65,8 @@ _pkgver_macro=${pkgver%.*}
_pkgver_prior=${pkgver%.*.*}
_pkgver_name=${_pkgver_macro//[.0]}
pkgdesc="The .NET $_pkgver_macro bootstrap"
arch="x86_64 aarch64 armv7 s390x"
# aarch64: build failure
arch="x86_64 armv7 s390x"
url=https://dotnet.microsoft.com
license="MIT"
# hack for dotnetx-build to be able to pull itself for bootstrapping

View file

@ -44,7 +44,8 @@ _pkgver_macro=${pkgver%.*}
_pkgver_name=${_pkgver_macro//[.0]}
_bldver_ver=${_bldver%%-*}
pkgdesc="The .NET $_pkgver_macro Core runtime"
arch="x86_64 aarch64 armv7 s390x"
# aarch64 failure
arch="x86_64 armv7 s390x"
url="https://dotnet.microsoft.com/"
license="MIT"
depends="

View file

@ -52,7 +52,8 @@ pkgdesc="The .NET $_pkgver_macro bootstrap"
# x86: blocked by https://github.com/dotnet/runtime/issues/77667
# armhf: blocked by https://github.com/dotnet/runtime/issues/77663
# riscv64: port WIP https://github.com/dotnet/runtime/issues/36748
arch="all !x86 !armhf !riscv64"
# aarch64: build failure
arch="all !x86 !armhf !riscv64 !aarch64"
url=https://dotnet.microsoft.com
license="MIT"
# hack for dotnetx-build to be able to pull itself for bootstrapping

View file

@ -39,7 +39,8 @@ pkgdesc="The .NET $_pkgver_macro Core runtime"
# x86: blocked by https://github.com/dotnet/runtime/issues/77667
# armhf: blocked by https://github.com/dotnet/runtime/issues/77663
# riscv64: port WIP https://github.com/dotnet/runtime/issues/36748
arch="all !x86 !armhf !riscv64"
# aarch64 build failure
arch="all !x86 !armhf !riscv64 !aarch64"
url=https://dotnet.microsoft.com
license="MIT"
depends="

View file

@ -9,13 +9,13 @@ arch="noarch"
url="https://www.bartbusschots.ie/s/publications/software/xkpasswd/"
license="BSD-2-Clause"
# perl-email-valid
# perl-math-random-secure
depends="
perl
perl-clone
perl-datetime
perl-data-entropy
perl-lwp-useragent-determined
perl-math-random-secure
perl-mozilla-ca
perl-uri
perl-file-homedir

View file

@ -2,8 +2,8 @@
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
pkgname=authentik
pkgver=2023.8.1
pkgrel=1
pkgver=2023.5.6
pkgrel=0
pkgdesc="An open-source Identity Provider focused on flexibility and versatility"
url="https://github.com/goauthentik/authentik"
# py3-xmlsec needs some work
@ -233,7 +233,7 @@ package() {
}
sha512sums="
2efea00a849d22c381ba7267ce51a21cef396d7952915b8340b4bbe4ecbf507a67306890eb91117d9b02cb696d8b5011f1e867628dec60b56785dc9830e2dc93 authentik-2023.8.1.tar.gz
25b1adeb9847630e92819caabbd3f056b7f1a219562123acfcddf325d56f24ffe01e6a7c7874ab03a3b128cf5f610e4de098dec68099395058c56cb1ea99c0cb authentik-2023.5.6.tar.gz
4defb4fe3a4230f4aa517fbecd5e5b8bcef2a64e1b40615660ae9eec33597310a09df5e126f4d39ce7764bd1716c0a7040637699135c103cbc1879593c6c06f1 authentik.openrc
5d7f28bf5a9f358a0fc3634b2bac6d070c276c3f8181d26fa7e94a17503a4d54556bf7c3207ccd6cb924b81754ed965795d5e2a8aa1af409fd9e32d390ec4cf5 authentik-worker.openrc
351e6920d987861f8bf0d7ab2f942db716a8dbdad1f690ac662a6ef29ac0fd46cf817cf557de08f1c024703503d36bc8b46f0d9eb1ecaeb399dce4c3bb527d17 authentik-ldap.openrc

View file

@ -2,8 +2,8 @@
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
pkgname=caprine
pkgver=2.57.0
pkgrel=1
pkgver=2.59.1
pkgrel=0
pkgdesc="Elegant Facebook Messenger desktop app"
arch="noarch"
url="https://github.com/sindresorhus/caprine"
@ -60,7 +60,7 @@ package() {
-or -name "test" -prune -exec rm -r '{}' \;
}
sha512sums="
9d019e4aa61f94ffb627f1b647266d28d47c005515d9193ae8a6e67dbac4b4d931ca907dcb2627e4c8eb00e59ab825fc9dd3d9791064cf1cfbd28d8eff4d2589 caprine-2.57.0.tar.gz
a525bafb6a53dd2dbdfc4b9b3e96d3939d93be950a3287f2a5ef6465d5a6b64ecda79b6d393023d067f939e1a6e85debc35f83bbb1f758011db9d94dd9ff8a72 caprine-2.59.1.tar.gz
a469e3bea24926119e51642b777ef794c5fa65421107903f967c36d81bbb1adb3d52469ce3a3301b2c890f1aa53ab989ded22a7c6e811fb8cf0a582dbd835e19 caprine.desktop
44280c62ce43bdafa8528729371fccb16b8a0e3db7aca28d5c157ae0144dca5fbb023b8883b561955aa28ab62e967f2674d8c6bcaff186e2cdd0e7ba8beab9ac caprine.js
"

View file

@ -1,670 +0,0 @@
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=firefox-esr
pkgver=102.10.0
# Date of release, YY-MM-DD for metainfo file (see package())
_releasedate=2023-04-11
pkgrel=5
pkgdesc="Firefox web browser - Extended Support Release"
url="https://www.mozilla.org/en-US/firefox/organizations/"
# s390x and riscv64: blocked by rust and cargo
# armhf: build failure on armhf due to wasm
arch="x86_64 armv7 aarch64 x86 ppc64le"
license="GPL-3.0-only AND LGPL-2.1-only AND LGPL-3.0-only AND MPL-2.0"
install="$pkgname.post-upgrade"
depends="
ffmpeg-libavcodec
"
makedepends="
alsa-lib-dev
automake
bsd-compat-headers
cargo
cbindgen
clang
dbus-glib-dev
gettext
gtk+3.0-dev
hunspell-dev
icu-dev>=69.1
libevent-dev
libffi-dev
libjpeg-turbo-dev
libnotify-dev
libogg-dev
libtheora-dev
libtool
libvorbis-dev
libvpx-dev
libwebp-dev
libxcomposite-dev
libxt-dev
lld
llvm-dev
m4
mesa-dev
nasm
nodejs
nspr-dev
nss-dev
pipewire-dev
pulseaudio-dev
py3-psutil
py3-zstandard
python3
sed
wasi-sdk
wireless-tools-dev
zip
"
source="https://ftp.mozilla.org/pub/firefox/releases/${pkgver}esr/source/firefox-${pkgver}esr.source.tar.xz
allow-custom-rust-vendor.patch
avoid-redefinition.patch
bindgen.patch
disable-moz-stackwalk.patch
esr-metainfo.patch
firefox-esr-ffmpeg6.patch::https://dev.alpinelinux.org/archive/firefoxies/firefox-esr-ffmpeg6.patch
ffmpeg6-fixup.patch
fix-neon-aom.patch
fix-fortify-system-wrappers.patch
fix-rust-target.patch
fix-webrtc-glibcisms.patch
gcc13.patch
mallinfo.patch
python-deps.patch
sandbox-fork.patch
sandbox-largefile.patch
sandbox-sched_setscheduler.patch
zstandard.patch
stab.h
firefox.desktop
mozilla-location.keys
vendor-prefs.js
"
builddir="$srcdir/firefox-$pkgver"
_mozappdir=/usr/lib/firefox-esr
# help our shared-object scanner to find the libs
ldpath="$_mozappdir"
# secfixes:
# 102.1.0-r0:
# - CVE-2022-2505
# - CVE-2022-36314
# - CVE-2022-36318
# - CVE-2022-36319
# 91.11.0-r0:
# - CVE-2022-2200
# - CVE-2022-31744
# - CVE-2022-34468
# - CVE-2022-34470
# - CVE-2022-34472
# - CVE-2022-34478
# - CVE-2022-34479
# - CVE-2022-34481
# - CVE-2022-34484
# 91.10.0-r0:
# - CVE-2022-31736
# - CVE-2022-31737
# - CVE-2022-31738
# - CVE-2022-31739
# - CVE-2022-31740
# - CVE-2022-31741
# - CVE-2022-31742
# - CVE-2022-31747
# 91.9.1-r0:
# - CVE-2022-1529
# - CVE-2022-1802
# 91.9.0-r0:
# - CVE-2022-29909
# - CVE-2022-29911
# - CVE-2022-29912
# - CVE-2022-29914
# - CVE-2022-29916
# - CVE-2022-29917
# 91.8.0-r0:
# - CVE-2022-1097
# - CVE-2022-1196
# - CVE-2022-24713
# - CVE-2022-28281
# - CVE-2022-28282
# - CVE-2022-28285
# - CVE-2022-28286
# - CVE-2022-28289
# 91.7.0-r0:
# - CVE-2022-26381
# - CVE-2022-26383
# - CVE-2022-26384
# - CVE-2022-26386
# - CVE-2022-26387
# 91.6.1-r0:
# - CVE-2022-26485
# - CVE-2022-26486
# 91.6.0-r0:
# - CVE-2022-22754
# - CVE-2022-22756
# - CVE-2022-22759
# - CVE-2022-22760
# - CVE-2022-22761
# - CVE-2022-22763
# - CVE-2022-22764
# 91.5.0-r0:
# - CVE-2021-4140
# - CVE-2022-22737
# - CVE-2022-22738
# - CVE-2022-22739
# - CVE-2022-22740
# - CVE-2022-22741
# - CVE-2022-22742
# - CVE-2022-22743
# - CVE-2022-22744
# - CVE-2022-22745
# - CVE-2022-22746
# - CVE-2022-22747
# - CVE-2022-22748
# - CVE-2022-22751
# 91.4.0-r0:
# - CVE-2021-43536
# - CVE-2021-43537
# - CVE-2021-43538
# - CVE-2021-43539
# - CVE-2021-43541
# - CVE-2021-43542
# - CVE-2021-43543
# - CVE-2021-43545
# - CVE-2021-43546
# 91.3.0-r0:
# - CVE-2021-38503
# - CVE-2021-38504
# - CVE-2021-38505
# - CVE-2021-38506
# - CVE-2021-38507
# - CVE-2021-38508
# - CVE-2021-38509
# - CVE-2021-38510
# 91.2.0-r0:
# - CVE-2021-32810
# - CVE-2021-38492
# - CVE-2021-38493
# - CVE-2021-38495
# - CVE-2021-38496
# - CVE-2021-38497
# - CVE-2021-38498
# - CVE-2021-38500
# - CVE-2021-38501
# 78.13.0-r0:
# - CVE-2021-29980
# - CVE-2021-29984
# - CVE-2021-29985
# - CVE-2021-29986
# - CVE-2021-29988
# - CVE-2021-29989
# 78.12.0-r0:
# - CVE-2021-29970
# - CVE-2021-29976
# - CVE-2021-30547
# 78.11.0-r0:
# - CVE-2021-29967
# 78.10.0-r0:
# - CVE-2021-23961
# - CVE-2021-23994
# - CVE-2021-23995
# - CVE-2021-23998
# - CVE-2021-23999
# - CVE-2021-24002
# - CVE-2021-29945
# - CVE-2021-29946
# 78.9.0-r0:
# - CVE-2021-23981
# - CVE-2021-23982
# - CVE-2021-23984
# - CVE-2021-23987
# 78.8.0-r0:
# - CVE-2021-23968
# - CVE-2021-23969
# - CVE-2021-23973
# - CVE-2021-23978
# 78.7.0-r0:
# - CVE-2020-26976
# - CVE-2021-23953
# - CVE-2021-23954
# - CVE-2021-23960
# - CVE-2021-23964
# 78.6.1-r0:
# - CVE-2020-16044
# 78.6.0-r0:
# - CVE-2020-16042
# - CVE-2020-26971
# - CVE-2020-26973
# - CVE-2020-26974
# - CVE-2020-26978
# - CVE-2020-35111
# - CVE-2020-35112
# - CVE-2020-35113
# 78.5.0-r0:
# - CVE-2020-15683
# - CVE-2020-15969
# - CVE-2020-15999
# - CVE-2020-16012
# - CVE-2020-26950
# - CVE-2020-26951
# - CVE-2020-26953
# - CVE-2020-26956
# - CVE-2020-26958
# - CVE-2020-26959
# - CVE-2020-26960
# - CVE-2020-26961
# - CVE-2020-26965
# - CVE-2020-26966
# - CVE-2020-26968
# 78.3.0-r0:
# - CVE-2020-15673
# - CVE-2020-15676
# - CVE-2020-15677
# - CVE-2020-15678
# 78.2.0-r0:
# - CVE-2020-15663
# - CVE-2020-15664
# - CVE-2020-15670
# 78.1.0-r0:
# - CVE-2020-15652
# - CVE-2020-15653
# - CVE-2020-15654
# - CVE-2020-15655
# - CVE-2020-15656
# - CVE-2020-15657
# - CVE-2020-15658
# - CVE-2020-15659
# - CVE-2020-6463
# - CVE-2020-6514
# 68.10.0-r0:
# - CVE-2020-12417
# - CVE-2020-12418
# - CVE-2020-12419
# - CVE-2020-12420
# - CVE-2020-12421
# 68.9.0-r0:
# - CVE-2020-12399
# - CVE-2020-12405
# - CVE-2020-12406
# - CVE-2020-12410
# 68.8.0-r0:
# - CVE-2020-12387
# - CVE-2020-12388
# - CVE-2020-12389
# - CVE-2020-12392
# - CVE-2020-12393
# - CVE-2020-12395
# - CVE-2020-6831
# 68.7.0-r0:
# - CVE-2020-6821
# - CVE-2020-6822
# - CVE-2020-6825
# 68.6.1-r0:
# - CVE-2020-6819
# - CVE-2020-6820
# 68.6.0-r0:
# - CVE-2019-20503
# - CVE-2020-6805
# - CVE-2020-6806
# - CVE-2020-6807
# - CVE-2020-6811
# - CVE-2020-6812
# - CVE-2020-6814
# 68.5.0-r0:
# - CVE-2020-6796
# - CVE-2020-6797
# - CVE-2020-6798
# - CVE-2020-6799
# - CVE-2020-6800
# 68.4.1-r0:
# - CVE-2019-17016
# - CVE-2019-17022
# - CVE-2019-17024
# - CVE-2019-17026
# 68.3.0-r0:
# - CVE-2019-17005
# - CVE-2019-17008
# - CVE-2019-17009
# - CVE-2019-17010
# - CVE-2019-17011
# - CVE-2019-17012
# 68.2.0-r0:
# - CVE-2019-11757
# - CVE-2019-11758
# - CVE-2019-11759
# - CVE-2019-11760
# - CVE-2019-11761
# - CVE-2019-11762
# - CVE-2019-11763
# - CVE-2019-11764
# - CVE-2019-15903
# 68.1.0-r0:
# - CVE-2019-9812
# - CVE-2019-11740
# - CVE-2019-11742
# - CVE-2019-11743
# - CVE-2019-11744
# - CVE-2019-11746
# - CVE-2019-11752
# 68.0.2-r0:
# - CVE-2019-11733
# 68.0-r0:
# - CVE-2019-11709
# - CVE-2019-11711
# - CVE-2019-11712
# - CVE-2019-11713
# - CVE-2019-11715
# - CVE-2019-11717
# - CVE-2019-11719
# - CVE-2019-11729
# - CVE-2019-11730
# - CVE-2019-9811
# 60.7.2-r0:
# - CVE-2019-11708
# 60.7.1-r0:
# - CVE-2019-11707
# 60.7.0-r0:
# - CVE-2019-9815
# - CVE-2019-9816
# - CVE-2019-9817
# - CVE-2019-9818
# - CVE-2019-9819
# - CVE-2019-9820
# - CVE-2019-11691
# - CVE-2019-11692
# - CVE-2019-11693
# - CVE-2019-7317
# - CVE-2019-9797
# - CVE-2018-18511
# - CVE-2019-11694
# - CVE-2019-11698
# - CVE-2019-5798
# - CVE-2019-9800
# 60.6.1-r0:
# - CVE-2019-9810
# - CVE-2019-9813
# - CVE-2019-9790
# - CVE-2019-9791
# - CVE-2019-9792
# - CVE-2019-9793
# - CVE-2019-9794
# - CVE-2019-9795
# - CVE-2019-9796
# - CVE-2019-9801
# - CVE-2018-18506
# - CVE-2019-9788
# 60.5.2-r0:
# - CVE-2019-5785
# - CVE-2018-18335
# - CVE-2018-18356
# 60.5.0-r0:
# - CVE-2018-18500
# - CVE-2018-18505
# - CVE-2018-18501
# 52.6.0-r0:
# - CVE-2018-5089
# - CVE-2018-5091
# - CVE-2018-5095
# - CVE-2018-5096
# - CVE-2018-5097
# - CVE-2018-5098
# - CVE-2018-5099
# - CVE-2018-5102
# - CVE-2018-5103
# - CVE-2018-5104
# - CVE-2018-5117
# 52.5.2-r0:
# - CVE-2017-7843
# we need this because cargo verifies checksums of all files in vendor
# crates when it builds and gives us no way to override or update the
# file sanely... so just clear out the file list
_clear_vendor_checksums() {
sed -i 's/\("files":{\)[^}]*/\1/' third_party/rust/$1/.cargo-checksum.json
}
export SHELL=/bin/sh
export BUILD_OFFICIAL=1
export MOZILLA_OFFICIAL=1
export USE_SHORT_LIBNAME=1
export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=system
export MOZ_APP_PROFILE="mozilla/firefox"
export MOZ_APP_REMOTINGNAME=firefox-esr
export MOZBUILD_STATE_PATH="$srcdir"/mozbuild
# disable desktop notifications
export MOZ_NOSPAM=1
# Find our triplet JSON
export RUST_TARGET="$CTARGET"
# Build with Clang, takes less RAM
export CC="clang"
export CXX="clang++"
# set rpath so linker finds the libs
export LDFLAGS="$LDFLAGS -Wl,-rpath,$_mozappdir"
# let firefox do this itself.
unset CARGO_PROFILE_RELEASE_OPT_LEVEL
unset CARGO_PROFILE_RELEASE_LTO
export CFLAGS="$CFLAGS -O2"
export CXXFLAGS="$CXXFLAGS -O2 -Wno-deprecated-builtins"
prepare() {
default_prepare
cp "$srcdir"/stab.h toolkit/crashreporter/google-breakpad/src/
base64 -d "$srcdir"/mozilla-location.keys > "$builddir"/mozilla-api-key
_clear_vendor_checksums audio_thread_priority
_clear_vendor_checksums target-lexicon-0.9.0
_clear_vendor_checksums packed_simd_2
_clear_vendor_checksums bindgen
# webrtc does not build on these
case "$CARCH" in
ppc64le)
local webrtc_config="ac_add_options --disable-webrtc"
;;
esac
case "$CARCH" in
armv7)
# broken here
local rust_simd="ac_add_options --disable-rust-simd"
;;
*)
local rust_simd="ac_add_options --enable-rust-simd"
;;
esac
case "$CARCH" in
aarch64|arm*|x86*)
# disable-elf-hack: exists only on aarch64, arm*, x86, x86_64
local arch_config="ac_add_options --disable-elf-hack"
;;
esac
# sandbox only supported here
case "$CARCH" in
x86*|armv7|aarch64)
local sandbox="ac_add_options --enable-sandbox"
;;
*)
local sandbox="ac_add_options --disable-sandbox"
;;
esac
cat > base-mozconfig <<-EOF
# disable unwanted things
ac_add_options --disable-bootstrap
ac_add_options --disable-cargo-incremental
ac_add_options --disable-crashreporter
ac_add_options --disable-debug
ac_add_options --disable-debug-symbols
ac_add_options --disable-install-strip
ac_add_options --disable-jemalloc
ac_add_options --disable-strip
ac_add_options --disable-tests
ac_add_options --disable-updater
# features
ac_add_options --enable-alsa
ac_add_options --enable-dbus
ac_add_options --enable-default-toolkit=cairo-gtk3-wayland
ac_add_options --enable-ffmpeg
ac_add_options --enable-hardening
ac_add_options --enable-linker=lld
ac_add_options --enable-necko-wifi
ac_add_options --enable-official-branding
ac_add_options --enable-optimize="$CFLAGS"
ac_add_options --enable-pulseaudio
ac_add_options --enable-release
ac_add_options --enable-update-channel=release
# system libs
ac_add_options --enable-system-pixman
ac_add_options --with-system-ffi
ac_add_options --with-system-icu
ac_add_options --with-system-jpeg
ac_add_options --with-system-libevent
ac_add_options --with-system-libvpx
ac_add_options --with-system-nspr
ac_add_options --with-system-nss
ac_add_options --with-system-png
ac_add_options --with-system-webp
ac_add_options --with-system-zlib
# misc
ac_add_options --allow-addon-sideload
ac_add_options --prefix=/usr
ac_add_options --with-app-name=firefox-esr
ac_add_options --with-distribution-id=org.alpinelinux
ac_add_options --with-libclang-path=/usr/lib
ac_add_options --with-unsigned-addon-scopes=app,system
ac_add_options --with-wasi-sysroot=/usr/share/wasi-sysroot
ac_add_options --host=$CHOST
ac_add_options --target=$CTARGET
# objdir
mk_add_options MOZ_OBJDIR="$builddir/obj"
mk_add_options RUSTFLAGS="$RUSTFLAGS"
# keys
# these are for alpine linux use only
ac_add_options --with-mozilla-api-keyfile="$builddir/mozilla-api-key"
$arch_config
$rust_simd
$sandbox
$webrtc_config
EOF
}
build() {
cat > .mozconfig base-mozconfig
export MOZ_BUILD_DATE=$(date ${SOURCE_DATE_EPOCH:+ -d@${SOURCE_DATE_EPOCH}} "+%Y%m%d%H%M%S")
# for lto
ulimit -n 4096
# can't be set here and fail
unset RUSTFLAGS
local thinlto_jobs=${JOBS:-1}
case "$CARCH" in
# on this platforms, lld seems to not utilise >1 threads for thinlto for some reason.
# at the same time, having more than 8 also crashes lld for firefox buildsystems (why?).
aarch64)
if [ $thinlto_jobs -gt 8 ]; then
thinlto_jobs=8
fi
;;
esac
export LDFLAGS="$LDFLAGS -Wl,--thinlto-jobs=$thinlto_jobs"
case "$CARCH" in
# lto for 64-bit systems only
aarch64|x86_64|ppc64le)
cat > .mozconfig base-mozconfig <<-EOF
ac_add_options --enable-lto=cross
EOF
esac
./mach build
}
package() {
DESTDIR="$pkgdir" ./mach install
local _png
for _png in ./browser/branding/official/default*.png; do
local i=${_png%.png}
i=${i##*/default}
install -Dm644 "$_png" \
"$pkgdir"/usr/share/icons/hicolor/"$i"x"$i"/apps/firefox-esr.png
done
install -Dm644 browser/branding/official/content/about-logo.png \
"$pkgdir"/usr/share/icons/hicolor/192x192/apps/firefox-esr.png
install -Dm644 browser/branding/official/content/about-logo@2x.png \
"$pkgdir"/usr/share/icons/hicolor/384x384/apps/firefox-esr.png
install -Dm644 browser/branding/official/content/about-logo.svg \
"$pkgdir"/usr/share/icons/hicolor/scalable/apps/firefox-esr.svg
install -Dm644 "$srcdir"/firefox.desktop \
"$pkgdir"/usr/share/applications/firefox-esr.desktop
# install our vendor prefs
install -Dm644 "$srcdir"/vendor-prefs.js \
"$pkgdir"/$_mozappdir/browser/defaults/preferences/vendor.js
# Generate appdata file
mkdir -p "$pkgdir"/usr/share/metainfo/
export VERSION="$pkgver"
export DATE="$_releasedate"
envsubst < "$builddir"/taskcluster/docker/firefox-flatpak/org.mozilla.firefox.appdata.xml.in > "$pkgdir"/usr/share/metainfo/org.mozilla.firefox-esr.appdata.xml
# Replace duplicate binary with wrapper
# https://bugzilla.mozilla.org/show_bug.cgi?id=658850
install -Dm755 /dev/stdin "$pkgdir"/usr/bin/firefox-esr <<- EOF
#!/bin/sh
exec $_mozappdir/firefox-esr "\$@"
EOF
rm "$pkgdir"/$_mozappdir/firefox-esr-bin
ln -sfv /usr/bin/firefox-esr "$pkgdir"/$_mozappdir/firefox-esr-bin
}
sha512sums="
f2b53c35bdd22a3de6f32699b832babcbf499667197c02dd50cf0b6cd956e0f4471f420938c2ab72f0a0686ed99fe74e3184afe9b5f7169130879b8f8fd99f0b firefox-102.10.0esr.source.tar.xz
4e584621145cf8add069c6dac18e805b3274a1ee402d84e924df2341f7d3c5be261a93ef51283bacbd606f47fbdc628c4323ecc31efc5b403b8d224b18dc278f allow-custom-rust-vendor.patch
b1cb2db3122634f66d2bae7066e76f2dcd455c464e021db4de3b0a08314df95cb667846081682db549dd2af8a00831cabe44a2420c66cdfb5e3b5fa7e6bd21d3 avoid-redefinition.patch
0f793fc991e35ac17585c7ab5f86fe5925401bb9512167909706b85b51155e28b037e3a7ab775b243804195477ade36ec4ab32c3118885c52364079526ae26a9 bindgen.patch
454ea3263cabce099accbdc47aaf83be26a19f8b5a4568c01a7ef0384601cf8315efd86cd917f9c8bf419c2c845db89a905f3ff9a8eb0c8e41042e93aa96a85c disable-moz-stackwalk.patch
f7b3b45ba04d05d17439d009bf0c9f27881e126f424e2257552338a0c1e3771ee1289c044babcb0920f62af62873a268c0cf524e1d35711e6dc8b808ca5e9f26 esr-metainfo.patch
a13dee87adf659423f5b3fa0358cfbde135fa614c85dd170d1a48d32ee080e27aef062d3a8e3c45059c41463fda579f8900988166ccb51568793ee7ef9080d04 firefox-esr-ffmpeg6.patch
c2e17f269070d782154f843b95bf68be25d8c4356825dd436b1877aab63ac023051899371da5c21f6151970b2562376c2dadd2d6a038446e5fa621e2495668e1 ffmpeg6-fixup.patch
d3a54897089eda9fdfe4b25ade1cb2c01c4b31fa9bf0e0ddbb0bbe674072ec5d36a6e52f791a8cbc8d3908e912ac2d7edec69b34d87ecca0acca876d45974c8d fix-neon-aom.patch
2f4f15974d52de4bb273b62a332d13620945d284bbc6fe6bd0a1f58ff7388443bc1d3bf9c82cc31a8527aad92b0cd3a1bc41d0af5e1800e0dcbd7033e58ffd71 fix-fortify-system-wrappers.patch
cd68b89e29e5f6379fbd5679db27b9a5ef70ea65e51c0d0a8137e1f1fd210e35a8cfb047798e9549bc7275606d7ec5c8d8af1335d29da4699db7acd8bc7ff556 fix-rust-target.patch
305c874fdea3096e9c4c6aa6520ac64bb1c347c4b59db8360096646593fe684c3b5377874d91cecd33d56d1410b4714fbdea2b514923723ecbeff79d51265d9b fix-webrtc-glibcisms.patch
49aa1dfbe11ed5370e839afb190da7f55ae4887b35645865efe25d398d890563722caedd5696d648ad71448621fbc8bab8def1a3d079e301d6414f0f20e96758 gcc13.patch
a4a3e062661bda64d502d426c480ac9645345860118de9df9ffe6e0597738c70c11e5cdef2d4fd12c5e2ee30a09310159230524655a419a4f7e4eeeb0f3c06b0 mallinfo.patch
f3d419880cc7f043b6eb547894d486457d407640be2bd8b402eb3a534ccea39568f6d506fc44a3b29c94eb0dc6fc2bec6600d161786fd233d26b1dc8970f5ab4 python-deps.patch
2518f2fc75b5db30058e0735f47d60fdf1e7adfaeee4b33fb2afb1bd9a616ce943fd88f4404d0802d4083703f4acf1d5ad42377218d025bc768807fbaf7e1609 sandbox-fork.patch
b7d0a6126bdf6c0569f80aabf5b37ed2c7a35712eb8a0404a2d85381552f5555d4f97d213ea26cec6a45dc2785f22439376ed5f8e78b4fd664ef0223307b333e sandbox-largefile.patch
94433c5ffdbe579c456d95c5f053f61fcbab2f652fa90bc69dcc27d9a1507a8e5c677adeadae9a7a75cc9a55184c1040737f4dfd10b279c088ef016561e6f135 sandbox-sched_setscheduler.patch
12fbe50d94624931a581314b8e6e228a1f8a4550704a6ee4f8904184ac4727efd90982e87a8fdd318e15515f9430dfc6cf7455b301e903003027b3f0afa79795 zstandard.patch
0b3f1e4b9fdc868e4738b5c81fd6c6128ce8885b260affcb9a65ff9d164d7232626ce1291aaea70132b3e3124f5e13fef4d39326b8e7173e362a823722a85127 stab.h
d354f48a29bfc16719f3b230b1395063239d4420f9e47522de4662392d9697b15f931ca3bf6055d100fa33d61a9a1a13477687d5eac99e50ae7dbef9882a5808 firefox.desktop
382510375b1a2fa79be0ab79e3391a021ae2c022429ffbaa7e7a69166f99bb56d01e59a1b10688592a29238f21c9d6977672bd77f9fae439b66bdfe0c55ddb15 mozilla-location.keys
fc45bc3ffb9404e5338ea26a9f04807b40f6f516324972cddd48bedb91b8bd7c6b8d4e03a0209020f5e67b703bc4ff89389985791b9bd544a0fc3951e2dc338e vendor-prefs.js
"

View file

@ -1,172 +0,0 @@
Submitted By: Douglas R. Reno <renodr at linuxfromscratch dot org>
Date: 2022-03-19
Initial Package Version: 102.9.0esr
Upstream Status: Applied
Origin: rust-bindgen upstream (#2338 and #2319), Self
Description: Updates the bundled rust-bindgen crate to be compatible
with Clang/LLVM 16.
Without this patch, you will encounter "not a valid
Ident" errors when building Firefox, and it will come
out of fallback.rs in proc-macro2. This references
mfbt/Vector.h (symlinked to
firefox-build-dir/dist/include/mozilla/Vector.h) in
it's error output, but it is because LLVM changed how
it reports anonymous items.
diff -Naurp firefox-102.9.0.orig/third_party/rust/bindgen/.cargo-checksum.json firefox-102.9.0/third_party/rust/bindgen/.cargo-checksum.json
--- firefox-102.9.0.orig/third_party/rust/bindgen/.cargo-checksum.json 2023-03-09 17:59:38.000000000 -0600
+++ firefox-102.9.0/third_party/rust/bindgen/.cargo-checksum.json 2023-03-19 21:04:15.981453212 -0500
@@ -1 +1 @@
-{"files":{"Cargo.lock":"836e8f8431bd4ebdac9b1251676f6afa755757e401455259fe659e7280be8230","Cargo.toml":"3a585a6e27a177f08dedcb21f7d555e9db58fa158203273b228db91ebee4e6b3","LICENSE":"c23953d9deb0a3312dbeaf6c128a657f3591acee45067612fa68405eaa4525db","README.md":"29fe30d7a2729922b13a578bc8f5eedc808fd0f2ef67a3f12017548baf8f293a","build.rs":"3fe1e534c99df4ee207606794f133fb187c0948e055389f74c904994ecaed38a","csmith-fuzzing/README.md":"7107b70fedb0c0a0cadb3c439a49c1bd0119a6d38dc63b1aecc74d1942256ef2","src/callbacks.rs":"1e5a118b94977938751758ac0495b1d41ce5e280c066614a4a7cbd930f326350","src/clang.rs":"aa0644278a8319506be08904c0f6706fbcdcd72eb1e85564b8c7488bd810e126","src/codegen/bitfield_unit.rs":"a8fb1a2d97a99685106fcaac87d2013f79d2690d6a46ff05ad1e3629b6075664","src/codegen/bitfield_unit_tests.rs":"dd252134118450800b516e375c872e17b4c1aee63a7b8adbe5b2cd53434bbc7e","src/codegen/dyngen.rs":"15149bc927e5b2706f93e52a6b26ef55384b3baf40bfc9bc4343e9820479f26b","src/codegen/error.rs":"5e308b8c54b68511fc8ea2ad15ddac510172c4ff460a80a265336440b0c9653d","src/codegen/helpers.rs":"ea83104addb8af31736aaeb850e10c694cd434befe7ffaaa206208f722d72c58","src/codegen/impl_debug.rs":"1ff9ec754b610c98c757b114c6509473ead0e1a9375e9089a7fa40a41a753709","src/codegen/impl_partialeq.rs":"5e526fd88dd15dd1f04addd3c6ecea1d3da92293fadf04346d6c716791f436f9","src/codegen/mod.rs":"19fd11feefab0ff9ecaf8a01583583008269adce805508fb61b9a8acc49da586","src/codegen/struct_layout.rs":"b62c3569dcfb011daa4d09f1aa9eb732da69546c3deb9f247fa8ce7114dbc7b9","src/extra_assertions.rs":"494534bd4f18b80d89b180c8a93733e6617edcf7deac413e9a73fd6e7bc9ced7","src/features.rs":"fafb85510b1dfc9a41ed71f7d765fca49b236deb4ee567e00204e751362aaf23","src/ir/analysis/derive.rs":"ff4821d810961696008a57ae496f95ebcdc14b4c439fe87d78a84817442fa759","src/ir/analysis/has_destructor.rs":"d9a3a24bd4cabc87cddb0c76d27da1691f8f37ffb8eadf5b5975a1c44dea99c2","src/ir/analysis/has_float.rs":"5242cc07ec4d4bdf5a792e1f8ee5758a87838314917d42dbb9dcfc19620520ce","src/ir/analysis/has_type_param_in_array.rs":"ec3fb67f782abb4c866da91bce3f7ee6f8e2310c47a54065282431b909233f7d","src/ir/analysis/has_vtable.rs":"63e2d0f62171811893615c11453bc7b39438d0d83c3eb444dec2346140d86efe","src/ir/analysis/mod.rs":"2c54f0cd6f3d86cf3fcb07d9d0be06cde839cab4170671c80d806a3f27820faf","src/ir/analysis/sizedness.rs":"17f1f2b6affd025f73853b9b5a76b3f157b5f9e563e9eaa374735fcb84c13308","src/ir/analysis/template_params.rs":"da949976a7fd04d6fc564ea6a77dfdbf4f5bf05db64687ed7a0616cba598a42d","src/ir/annotations.rs":"1c931d7bbba1e1613e9cccaab58d14f75e79b831b5c881e41f5b5257a9cbced7","src/ir/comment.rs":"31d64a49ae3d9c3c348fa2539e03306ca3a23fae429cab452e42b31ecf632145","src/ir/comp.rs":"abaa90e27dc6416f1b8db003f87888e7651d5b46c4d4526153980e5621612e54","src/ir/context.rs":"3a76458a5aa74075a60a5cd752ed59ad3943054f55b017700389f78072935215","src/ir/derive.rs":"e5581852eec87918901a129284b4965aefc8a19394187a8095779a084f28fabe","src/ir/dot.rs":"e25ff72ac174a798894c9673d81bdfb86fa9f4228b34a14ce0dc741a186a52bd","src/ir/enum_ty.rs":"e49e3c6ffc0289584e2f836fe56a4b7ebf6ca3f8b602248141d67b9f533770cc","src/ir/function.rs":"aa454ace56bda8074b2865933282aa124624310c8bc0c994d454f5799f4e88be","src/ir/int.rs":"68a86182743ec338d58e42203364dc7c8970cb7ec3550433ca92f0c9489b4442","src/ir/item.rs":"a71bdacc7419ec86d52ac534158cf4bfa4600e9cbc214c0075766700f5b053b0","src/ir/item_kind.rs":"7666a1ff1b8260978b790a08b4139ab56b5c65714a5652bbcec7faa7443adc36","src/ir/layout.rs":"755e3787c262de434a53a8c326f0e825f95415ed6b0f925c1cddf208ca8e3bc4","src/ir/mod.rs":"713cd537434567003197a123cbae679602c715e976d22f7b23dafd0826ea4c70","src/ir/module.rs":"70cf6ddfeabe6cdc13fdc767c783216c073404848d827e85fc6c2de3a19b5c3f","src/ir/objc.rs":"195fb2a3e4371b90244f3a8f295fd80cc77e0f2daf8fd27e3d8e5b78bd6b55d6","src/ir/template.rs":"44bd7214cf1e7f70e60694115082aac5b8a6c1687fff584cd08cdcfadabc5734","src/ir/traversal.rs":"5ac088277f4dfe2918d81b9294aaee41fd83db8e46def66a05f89de078bf4c49","src/ir/ty.rs":"8f2b970da76850685c4d334289af6dede7742862d7a81f2236115afaa1a92fa9","src/ir/var.rs":"86e9f19403fb9231ba60dec0a04e5b56fe28a37c7a5e6f676c978789c9d93c5a","src/lib.rs":"ed2d0aeb48b28b4a96b8e76a10e00b10cb6cc32c0a686d536f9021463b7ee0e8","src/log_stubs.rs":"6dfdd908b7c6453da416cf232893768f9480e551ca4add0858ef88bf71ee6ceb","src/main.rs":"74e582c37b146090332b1496f5b4bca02c7629d03a4ae40302cb4a723f08e445","src/options.rs":"119358b741601dafc13560856f6e4b4f78b6cd2b19067893c2672ba8f5dc6de1","src/parse.rs":"4ffc54415eadb622ee488603862788c78361ef2c889de25259441a340c2a010f","src/regex_set.rs":"6c46357fb1ee68250e5e017cbf691f340041489ae78599eee7a5665a6ddce27f","src/time.rs":"8efe317e7c6b5ba8e0865ce7b49ca775ee8a02590f4241ef62f647fa3c22b68e"},"package":"2da379dbebc0b76ef63ca68d8fc6e71c0f13e59432e0987e508c1820e6ab5239"}
\ No newline at end of file
+{"files":{"Cargo.lock":"836e8f8431bd4ebdac9b1251676f6afa755757e401455259fe659e7280be8230","Cargo.toml":"3a585a6e27a177f08dedcb21f7d555e9db58fa158203273b228db91ebee4e6b3","LICENSE":"c23953d9deb0a3312dbeaf6c128a657f3591acee45067612fa68405eaa4525db","README.md":"29fe30d7a2729922b13a578bc8f5eedc808fd0f2ef67a3f12017548baf8f293a","build.rs":"3fe1e534c99df4ee207606794f133fb187c0948e055389f74c904994ecaed38a","csmith-fuzzing/README.md":"7107b70fedb0c0a0cadb3c439a49c1bd0119a6d38dc63b1aecc74d1942256ef2","src/callbacks.rs":"1e5a118b94977938751758ac0495b1d41ce5e280c066614a4a7cbd930f326350","src/clang.rs":"30fdc473ff70dcbc394927d6fb674d70a62c1a3847e855becd988dc476997815","src/codegen/bitfield_unit.rs":"a8fb1a2d97a99685106fcaac87d2013f79d2690d6a46ff05ad1e3629b6075664","src/codegen/bitfield_unit_tests.rs":"dd252134118450800b516e375c872e17b4c1aee63a7b8adbe5b2cd53434bbc7e","src/codegen/dyngen.rs":"15149bc927e5b2706f93e52a6b26ef55384b3baf40bfc9bc4343e9820479f26b","src/codegen/error.rs":"5e308b8c54b68511fc8ea2ad15ddac510172c4ff460a80a265336440b0c9653d","src/codegen/helpers.rs":"ea83104addb8af31736aaeb850e10c694cd434befe7ffaaa206208f722d72c58","src/codegen/impl_debug.rs":"1ff9ec754b610c98c757b114c6509473ead0e1a9375e9089a7fa40a41a753709","src/codegen/impl_partialeq.rs":"5e526fd88dd15dd1f04addd3c6ecea1d3da92293fadf04346d6c716791f436f9","src/codegen/mod.rs":"19fd11feefab0ff9ecaf8a01583583008269adce805508fb61b9a8acc49da586","src/codegen/struct_layout.rs":"b62c3569dcfb011daa4d09f1aa9eb732da69546c3deb9f247fa8ce7114dbc7b9","src/extra_assertions.rs":"494534bd4f18b80d89b180c8a93733e6617edcf7deac413e9a73fd6e7bc9ced7","src/features.rs":"fafb85510b1dfc9a41ed71f7d765fca49b236deb4ee567e00204e751362aaf23","src/ir/analysis/derive.rs":"ff4821d810961696008a57ae496f95ebcdc14b4c439fe87d78a84817442fa759","src/ir/analysis/has_destructor.rs":"d9a3a24bd4cabc87cddb0c76d27da1691f8f37ffb8eadf5b5975a1c44dea99c2","src/ir/analysis/has_float.rs":"5242cc07ec4d4bdf5a792e1f8ee5758a87838314917d42dbb9dcfc19620520ce","src/ir/analysis/has_type_param_in_array.rs":"ec3fb67f782abb4c866da91bce3f7ee6f8e2310c47a54065282431b909233f7d","src/ir/analysis/has_vtable.rs":"63e2d0f62171811893615c11453bc7b39438d0d83c3eb444dec2346140d86efe","src/ir/analysis/mod.rs":"2c54f0cd6f3d86cf3fcb07d9d0be06cde839cab4170671c80d806a3f27820faf","src/ir/analysis/sizedness.rs":"17f1f2b6affd025f73853b9b5a76b3f157b5f9e563e9eaa374735fcb84c13308","src/ir/analysis/template_params.rs":"da949976a7fd04d6fc564ea6a77dfdbf4f5bf05db64687ed7a0616cba598a42d","src/ir/annotations.rs":"1c931d7bbba1e1613e9cccaab58d14f75e79b831b5c881e41f5b5257a9cbced7","src/ir/comment.rs":"31d64a49ae3d9c3c348fa2539e03306ca3a23fae429cab452e42b31ecf632145","src/ir/comp.rs":"232300be66abbbc3d7ef948c24f000dd8a50d78e72aa0e4b2cc43ffd4f800226","src/ir/context.rs":"3a76458a5aa74075a60a5cd752ed59ad3943054f55b017700389f78072935215","src/ir/derive.rs":"e5581852eec87918901a129284b4965aefc8a19394187a8095779a084f28fabe","src/ir/dot.rs":"e25ff72ac174a798894c9673d81bdfb86fa9f4228b34a14ce0dc741a186a52bd","src/ir/enum_ty.rs":"e49e3c6ffc0289584e2f836fe56a4b7ebf6ca3f8b602248141d67b9f533770cc","src/ir/function.rs":"aa454ace56bda8074b2865933282aa124624310c8bc0c994d454f5799f4e88be","src/ir/int.rs":"68a86182743ec338d58e42203364dc7c8970cb7ec3550433ca92f0c9489b4442","src/ir/item.rs":"a71bdacc7419ec86d52ac534158cf4bfa4600e9cbc214c0075766700f5b053b0","src/ir/item_kind.rs":"7666a1ff1b8260978b790a08b4139ab56b5c65714a5652bbcec7faa7443adc36","src/ir/layout.rs":"755e3787c262de434a53a8c326f0e825f95415ed6b0f925c1cddf208ca8e3bc4","src/ir/mod.rs":"713cd537434567003197a123cbae679602c715e976d22f7b23dafd0826ea4c70","src/ir/module.rs":"70cf6ddfeabe6cdc13fdc767c783216c073404848d827e85fc6c2de3a19b5c3f","src/ir/objc.rs":"195fb2a3e4371b90244f3a8f295fd80cc77e0f2daf8fd27e3d8e5b78bd6b55d6","src/ir/template.rs":"44bd7214cf1e7f70e60694115082aac5b8a6c1687fff584cd08cdcfadabc5734","src/ir/traversal.rs":"5ac088277f4dfe2918d81b9294aaee41fd83db8e46def66a05f89de078bf4c49","src/ir/ty.rs":"8d7e7883316245c54e5dfa2fd150df1be2dc559c7df0828da736dd6b18d2165b","src/ir/var.rs":"1e7be8eedba72effa995b48c581504e61e407867d8794a8528975688742b0420","src/lib.rs":"ed2d0aeb48b28b4a96b8e76a10e00b10cb6cc32c0a686d536f9021463b7ee0e8","src/log_stubs.rs":"6dfdd908b7c6453da416cf232893768f9480e551ca4add0858ef88bf71ee6ceb","src/main.rs":"74e582c37b146090332b1496f5b4bca02c7629d03a4ae40302cb4a723f08e445","src/options.rs":"119358b741601dafc13560856f6e4b4f78b6cd2b19067893c2672ba8f5dc6de1","src/parse.rs":"4ffc54415eadb622ee488603862788c78361ef2c889de25259441a340c2a010f","src/regex_set.rs":"6c46357fb1ee68250e5e017cbf691f340041489ae78599eee7a5665a6ddce27f","src/time.rs":"8efe317e7c6b5ba8e0865ce7b49ca775ee8a02590f4241ef62f647fa3c22b68e"},"package":"2da379dbebc0b76ef63ca68d8fc6e71c0f13e59432e0987e508c1820e6ab5239"}
diff -Naurp firefox-102.9.0.orig/third_party/rust/bindgen/src/clang.rs firefox-102.9.0/third_party/rust/bindgen/src/clang.rs
--- firefox-102.9.0.orig/third_party/rust/bindgen/src/clang.rs 2023-03-09 17:59:38.000000000 -0600
+++ firefox-102.9.0/third_party/rust/bindgen/src/clang.rs 2023-03-19 20:26:47.405305678 -0500
@@ -54,6 +54,11 @@ impl Cursor {
unsafe { clang_isDeclaration(self.kind()) != 0 }
}
+ /// Is this cursor's referent an anonymous record or so?
+ pub fn is_anonymous(&self) -> bool {
+ unsafe { clang_Cursor_isAnonymous(self.x) != 0 }
+ }
+
/// Get this cursor's referent's spelling.
pub fn spelling(&self) -> String {
unsafe { cxstring_into_string(clang_getCursorSpelling(self.x)) }
diff -Naurp firefox-102.9.0.orig/third_party/rust/bindgen/src/ir/comp.rs firefox-102.9.0/third_party/rust/bindgen/src/ir/comp.rs
--- firefox-102.9.0.orig/third_party/rust/bindgen/src/ir/comp.rs 2023-03-09 17:59:38.000000000 -0600
+++ firefox-102.9.0/third_party/rust/bindgen/src/ir/comp.rs 2023-03-19 20:27:20.660487032 -0500
@@ -1372,8 +1372,7 @@ impl CompInfo {
// A declaration of an union or a struct without name could
// also be an unnamed field, unfortunately.
- if cur.spelling().is_empty() &&
- cur.kind() != CXCursor_EnumDecl
+ if cur.is_anonymous() && cur.kind() != CXCursor_EnumDecl
{
let ty = cur.cur_type();
let offset = cur.offset_of_field().ok();
diff -Naurp firefox-102.9.0.orig/third_party/rust/bindgen/src/ir/ty.rs firefox-102.9.0/third_party/rust/bindgen/src/ir/ty.rs
--- firefox-102.9.0.orig/third_party/rust/bindgen/src/ir/ty.rs 2023-03-09 17:59:38.000000000 -0600
+++ firefox-102.9.0/third_party/rust/bindgen/src/ir/ty.rs 2023-03-19 21:02:47.947103359 -0500
@@ -737,7 +737,12 @@ impl Type {
let layout = ty.fallible_layout(ctx).ok();
let cursor = ty.declaration();
- let mut name = cursor.spelling();
+ let is_anonymous = cursor.is_anonymous();
+ let mut name = if is_anonymous {
+ None
+ } else {
+ Some(cursor.spelling()).filter(|n| !n.is_empty())
+ };
debug!(
"from_clang_ty: {:?}, ty: {:?}, loc: {:?}",
@@ -771,7 +776,7 @@ impl Type {
if is_canonical_objcpointer && is_template_type_param {
// Objective-C generics are just ids with fancy name.
// To keep it simple, just name them ids
- name = "id".to_owned();
+ name = Some("id".to_owned());
}
}
@@ -900,7 +905,7 @@ impl Type {
return Err(ParseError::Recurse);
}
} else {
- name = location.spelling();
+ name = Some(location.spelling());
}
let complex = CompInfo::from_ty(
@@ -942,7 +947,7 @@ impl Type {
CXType_Typedef
);
- name = current.spelling();
+ name = Some(location.spelling());
let inner_ty = cur
.typedef_type()
@@ -1126,10 +1131,10 @@ impl Type {
CXType_Enum => {
let enum_ = Enum::from_ty(ty, ctx).expect("Not an enum?");
- if name.is_empty() {
+ if !is_anonymous {
let pretty_name = ty.spelling();
if clang::is_valid_identifier(&pretty_name) {
- name = pretty_name;
+ name = Some(pretty_name);
}
}
@@ -1144,12 +1149,12 @@ impl Type {
)
.expect("Not a complex type?");
- if name.is_empty() {
+ if !is_anonymous {
// The pretty-printed name may contain typedefed name,
// but may also be "struct (anonymous at .h:1)"
let pretty_name = ty.spelling();
if clang::is_valid_identifier(&pretty_name) {
- name = pretty_name;
+ name = Some(pretty_name);
}
}
@@ -1161,8 +1166,7 @@ impl Type {
location,
None,
ctx,
- )
- .expect("Not able to resolve vector element?");
+ )?;
TypeKind::Vector(inner, ty.num_elements().unwrap())
}
CXType_ConstantArray => {
@@ -1189,7 +1193,9 @@ impl Type {
CXType_ObjCClass | CXType_ObjCInterface => {
let interface = ObjCInterface::from_ty(&location, ctx)
.expect("Not a valid objc interface?");
- name = interface.rust_name();
+ if !is_anonymous {
+ name = Some(interface.rust_name());
+ }
TypeKind::ObjCInterface(interface)
}
CXType_Dependent => {
@@ -1207,7 +1213,7 @@ impl Type {
}
};
- let name = if name.is_empty() { None } else { Some(name) };
+ name = name.filter(|n| !n.is_empty());
let is_const = ty.is_const() ||
(ty.kind() == CXType_ConstantArray &&
diff -Naurp firefox-102.9.0.orig/third_party/rust/bindgen/src/ir/var.rs firefox-102.9.0/third_party/rust/bindgen/src/ir/var.rs
--- firefox-102.9.0.orig/third_party/rust/bindgen/src/ir/var.rs 2023-03-09 17:59:38.000000000 -0600
+++ firefox-102.9.0/third_party/rust/bindgen/src/ir/var.rs 2023-03-19 21:03:37.413299390 -0500
@@ -301,11 +301,11 @@ impl ClangSubItemParser for Var {
let ty = match Item::from_ty(&ty, cursor, None, ctx) {
Ok(ty) => ty,
Err(e) => {
- assert_eq!(
- ty.kind(),
- CXType_Auto,
+ assert!(
+ matches!(ty.kind(), CXType_Auto | CXType_Unexposed),
"Couldn't resolve constant type, and it \
- wasn't an nondeductible auto type!"
+ wasn't an nondeductible auto type or unexposed \
+ type!"
);
return Err(e);
}

View file

@ -1,18 +0,0 @@
#!/bin/sh
ver_old=$2
if [ "$(apk version -t "$ver_old" '102.2.0-r4')" = '<' ]; then
# renamed appid, needs profile migration
cat 1>&2 <<-EOF
*
* firefox-esr now has a different appid, so you will see a default new
* profile upon starting it. to use your old profile again, you have to
* first migrate it using 'firefox-esr --ProfileManager'. select the
* previous one (if you didn't rename it, it's probably named
* default-something) to migrate it.
*
EOF
fi
exit 0

View file

@ -2,8 +2,8 @@
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
pkgname=gitaly
pkgver=16.2.0
pkgrel=1
pkgver=16.3.6
pkgrel=0
pkgdesc="A Git RPC service for handling all the git calls made by GitLab"
url="https://gitlab.com/gitlab-org/gitaly/"
arch="all"
@ -80,7 +80,7 @@ praefect() {
}
sha512sums="
7576dd5ef690c42582703ba571bb9e6856e85d209025f32b0797c3cecca88e10b538dc75a27d8cd2a99e30e2e99d03d0a61c681a8af692e3e34420775792598a gitaly-v16.2.0.tar.gz
cf1ef51106a2b33b414822c447220272d6696e8e03c475105c157f2cee6b4d2ff52edd9d1637104e24e2ee24f0ea0d8bf2c1ce62fe529c2ffc6801456782ad79 gitaly-v16.3.6.tar.gz
7760ee96abd45103a99e3c3fff31538aeac0e10254c88ab600bfc6fed04c0c34b43a4d54295463663a9707204622cfc06d1de672fe2826d22c017850ddac24e4 config.patch
c32105d921be16eaf559cf21d6840bc346cd92b5e37974cedecdb5a2d2ca1eb5e8fbb144f5fc8a1289bf9415102b313cf2d61ee510c80f08ab33a799f5ac7122 gitaly.initd
"

View file

@ -3,12 +3,12 @@
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
pkgname=gitlab-foss
_pkgname=${pkgname%-foss}
pkgver=16.2.4
pkgver=16.3.6
_gittag=v$pkgver
pkgrel=0
pkgdesc="A version control for your server"
url="https://gitlab.com/gitlab-org/gitlab-foss"
arch="x86_64"
arch="x86_64 aarch64"
license="MIT"
# ruby-irb is needed only for Rails console (gitlab-rails console)
depends="
@ -127,6 +127,7 @@ build() {
bundle config --local without "$bundle_without"
bundle config --local build.ffi --enable-system-libffi
bundle config --local build.gpgme --use-system-libraries
bundle config --local build.re2 --enable-system-libraries
bundle config --local build.nokogiri --use-system-libraries \
--with-xml2-include=/usr/include/libxml2 \
--with-xslt-include=/usr/include/libxslt
@ -374,7 +375,7 @@ assets() {
}
sha512sums="
96d2146f81bcecae9e8a4a72ef1dd136a2203649af38dbcb560c8071ca9a409b54b7e220b7c233b66ce1ee9423700e8150e445902971f951282764bded2bc717 gitlab-foss-v16.2.4.tar.gz
593a7e878052c1b2de0cb15faed4e675ca7ef3f37d5650d59b1a3bd0f3b2bc1dac77138006c1b8ed721c62d22bd25276885f44b3eea44e8657b76a00acb9399a gitlab-foss-v16.3.6.tar.gz
cdba615287c0a024c6589b5142543856393c8e5df3d21d2158908b34857d3d56581fe0bd66fa31cd3ff756c60f9f65f235c8ec7615a0970f7a87bbeb41be93ed database-config.patch
55b0667d3969113ffd6860652ee8bdb9a534c25f413f33b2739e922c886988e7cea72c1c00c7eecf29fcff3682b1324156365605ffc6aae45d1e0ccddf96288b gitlab.initd
1f451b67a5d5e58650b0fe862a2b65cfb8bff5502b37d94ae90619c1ff9affbecf24428303a2849bebce5f94bef37078f0e5710e344bbab616134e910938384a gitlab.mailroom.initd

View file

@ -2,7 +2,7 @@
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
pkgname=gitlab-shell
pkgver=14.24.0
pkgver=14.26.0
pkgrel=0
pkgdesc="GitLab Shell handles git SSH sessions for GitLab"
url="https://gitlab.com/gitlab-org/gitlab-shell"
@ -59,7 +59,7 @@ package() {
}
sha512sums="
5a05217b1055c4658c3b7209c348253d590d4f99a877af012687cf9b60196d7f7051b615612bfc7d6992c9dc7d176b74da447ce22ca681f3703ce92379d15350 gitlab-shell-v14.24.0.tar.gz
fb5d89807032be1ac9a9d7468c0b5343a8980390bd95124b1e4dd01184f693960df8455e4f90d96eb17d1ddef81b41c2a39c60a0286a285ca1c98dbd0fbd3df1 gitlab-shell-v14.26.0.tar.gz
8cf13bf472e22b1c429bba5df98afb931c80b043ec83c8366d59f15a1e9b21daf09078f134e7aa622c87b32c774d1d5cf129878d5035102c06d0b12ead33f804 config.patch
499b3a46ea94a33a23b01f6a7509d74f5a6781b930619b3b8ae42bdeae8a052cc636578744d7992b4ae4f9b9f72b11ee3d3c0f5e50986fa3f7e35b979b08aada change-config-path.patch
c53da7f145593693392d9fa880ad5a1909bfc7504fd1c93d94a468c3e0f5cc80f712f41ee1dc8bf38105b410c1165658f208bd88a70c4674104c78af33d8d09c gitconfig

View file

@ -3,7 +3,7 @@
pkgname=mastodon
_pkgname=$pkgname
pkgver=4.1.6
pkgver=4.1.8
_gittag=v$pkgver
pkgrel=0
pkgdesc="Self-hosted social media and network server based on ActivityPub and OStatus"
@ -193,7 +193,7 @@ assets() {
}
sha512sums="
abf1673675586d701f1a7e8e732dd3265ca8f68245ea57d06d02b681c1a033b2b3c0b66e8c2f3c64a24f5cda0b1225c05603a5bb30827da1d8fbfa4d600f7b6d mastodon-v4.1.6.tar.gz
3995f12f624fb4254f3e3785aa5e25f569c3551ab378aacaa2dd8e576dcbfda328b326f1589e6b5e6a021b3903875c5958ad771e63d4d680ff88d000645d9c18 mastodon-v4.1.8.tar.gz
730d3bef92b0da2ef400b5205fd8ab7159a458d654fa4d9a16cc0b579331ac67bec8b302096dff3470a3363b88a770ec857f1db7a0112effd07275da661c654a 24073_prefer-stored-location-as-after-sign-in-path.patch
36604cd630f0f5b4d88b630b1512cd26e922f859e5d19cbb85106ff29fc9048d2349f926d5c4b6947c655f67e60ec33e2f524a8154405a4369f283e00be7cdce mastodon.initd
9e77061fbdebe90492398f8089a7d2612ff4b6e70b5462dd67330b66d9788cb0133eab38c372b1f27a7214aacdd9f7f70381d4ecc6e92c8c38d794404ae0f840 mastodon.web.initd

View file

@ -6,7 +6,8 @@ pkgver=3.2.1
pkgrel=0
pkgdesc="A modern editor for Doom-engine based games and source ports"
url="http://slade.mancubus.net/"
arch="all"
# build failure on aarch64
arch="all !aarch64"
license="GPL-2.0-or-later"
makedepends="
cmake

View file

@ -1,93 +1,359 @@
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
pkgname=zotero
pkgver=7.0.0_git20230415
pkgver=7.0.0_beta57
pkgrel=0
_fxver=102.15.1
# Date of release, YY-MM-DD for metainfo file (see package())
_releasedate=2024-02-03
pkgdesc="A free, easy-to-use tool to help you collect, organize, cite, and share your research sources."
arch="x86_64"
url="https://github.com/zotero/zotero"
_giturl="https://lab.ilot.io/mirrors/zotero"
_gittag_client=7.0.0_20230415
_gittag_standalone=7.0.0_20230415
_gittag_build=20230314
license="AGPL3"
_gittag=7.0.0-beta.57
license="GPL-3.0-only AND LGPL-2.1-only AND LGPL-3.0-only AND MPL-2.0"
options="!check" # No test suite
depends="
dbus-glib
gtk+3.0
nss
libxt
ffmpeg-libavcodec
"
makedepends="
npm
grep
zip
unzip
perl
python3
alsa-lib-dev
automake
bsd-compat-headers
cargo
cbindgen
clang
curl
dbus-glib-dev
gettext
grep
gtk+3.0-dev
hunspell-dev
icu-dev>=69.1
libevent-dev
libffi-dev
libjpeg-turbo-dev
libnotify-dev
libogg-dev
libtheora-dev
libtool
libvorbis-dev
libvpx-dev
libwebp-dev
libxcomposite-dev
libxt-dev
lld
llvm-dev
m4
mesa-dev
nasm
nodejs
firefox-esr~=102
npm
nspr-dev
nss-dev
perl
pipewire-dev
pulseaudio-dev
py3-psutil
py3-zstandard
python3
sed
unzip
wasi-sdk
wireless-tools-dev
zip
"
source="
https://ftp.mozilla.org/pub/firefox/releases/${_fxver}esr/source/firefox-${_fxver}esr.source.tar.xz
allow-custom-rust-vendor.patch
avoid-redefinition.patch
disable-moz-stackwalk.patch
esr-metainfo.patch
firefox-esr-ffmpeg6.patch::https://dev.alpinelinux.org/archive/firefoxies/firefox-esr-ffmpeg6.patch
ffmpeg6-fixup.patch
fix-neon-aom.patch
fix-fortify-system-wrappers.patch
fix-rust-target.patch
fix-webrtc-glibcisms.patch
gcc13.patch
mallinfo.patch
python-deps.patch
sandbox-fork.patch
sandbox-largefile.patch
sandbox-sched_setscheduler.patch
zstandard.patch
stab.h
firefox.desktop
mozilla-location.keys
vendor-prefs.js
zotero.desktop
xulrunner-get-alpine-firefox.diff
$_giturl-client/-/releases/$_gittag_client/downloads/tarball/zotero-client-$_gittag_client.tar.gz
$_giturl-standalone-build/-/releases/$_gittag_standalone/downloads/tarball/zotero-standalone-build-$_gittag_standalone.tar.gz
$_giturl-build/-/releases/$_gittag_build/downloads/tarball/zotero-build-$_gittag_build.tar.gz
https://lab.ilot.io/mirrors/zotero-client/-/releases/$_gittag/downloads/tarball/zotero-client-$_gittag.tar.gz
zotero_build-modifications.diff
"
builddir="$srcdir"/zotero-client-$_gittag_client
options="!check"
builddir="$srcdir"/firefox-$_fxver
_zoterodir="$srcdir"/zotero-client-$_gittag
_mozappdir=/usr/lib/zotero
# help our shared-object scanner to find the libs
ldpath="$_mozappdir"
sonameprefix="$pkgname:"
# we need this because cargo verifies checksums of all files in vendor
# crates when it builds and gives us no way to override or update the
# file sanely... so just clear out the file list
_clear_vendor_checksums() {
sed -i 's/\("files":{\)[^}]*/\1/' third_party/rust/$1/.cargo-checksum.json
}
export SHELL=/bin/sh
export BUILD_OFFICIAL=1
export MOZILLA_OFFICIAL=1
export USE_SHORT_LIBNAME=1
export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=system
export MOZ_APP_PROFILE="mozilla/firefox"
export MOZ_APP_REMOTINGNAME=firefox-esr
export MOZBUILD_STATE_PATH="$srcdir"/mozbuild
# disable desktop notifications
export MOZ_NOSPAM=1
# Find our triplet JSON
export RUST_TARGET="$CTARGET"
# Build with Clang, takes less RAM
export CC="clang"
export CXX="clang++"
# let firefox do this itself.
unset CARGO_PROFILE_RELEASE_OPT_LEVEL
unset CARGO_PROFILE_RELEASE_LTO
export CFLAGS="$CFLAGS -O2"
export CXXFLAGS="$CXXFLAGS -O2 -Wno-deprecated-builtins"
prepare() {
default_prepare
cp "$srcdir"/stab.h toolkit/crashreporter/google-breakpad/src/
ln -s "$srcdir"/zotero-client-$_gittag_client "$srcdir"/zotero-client
ln -s "$srcdir"/zotero-build-$_gittag_build "$srcdir"/zotero-build
base64 -d "$srcdir"/mozilla-location.keys > "$builddir"/mozilla-api-key
_clear_vendor_checksums audio_thread_priority
_clear_vendor_checksums target-lexicon-0.9.0
_clear_vendor_checksums packed_simd_2
_clear_vendor_checksums bindgen
# webrtc does not build on these
case "$CARCH" in
ppc64le)
local webrtc_config="ac_add_options --disable-webrtc"
;;
esac
case "$CARCH" in
armv7)
# broken here
local rust_simd="ac_add_options --disable-rust-simd"
;;
*)
local rust_simd="ac_add_options --enable-rust-simd"
;;
esac
case "$CARCH" in
aarch64|arm*|x86*)
# disable-elf-hack: exists only on aarch64, arm*, x86, x86_64
local arch_config="ac_add_options --disable-elf-hack"
;;
esac
# sandbox only supported here
case "$CARCH" in
x86*|armv7|aarch64)
local sandbox="ac_add_options --enable-sandbox"
;;
*)
local sandbox="ac_add_options --disable-sandbox"
;;
esac
cat > base-mozconfig <<-EOF
# disable unwanted things
ac_add_options --disable-bootstrap
ac_add_options --disable-cargo-incremental
ac_add_options --disable-crashreporter
ac_add_options --disable-debug
ac_add_options --disable-debug-symbols
ac_add_options --disable-install-strip
ac_add_options --disable-jemalloc
ac_add_options --disable-strip
ac_add_options --disable-tests
ac_add_options --disable-updater
# features
ac_add_options --enable-alsa
ac_add_options --enable-dbus
ac_add_options --enable-default-toolkit=cairo-gtk3-wayland
ac_add_options --enable-ffmpeg
ac_add_options --enable-hardening
ac_add_options --enable-linker=lld
ac_add_options --enable-necko-wifi
ac_add_options --enable-official-branding
ac_add_options --enable-optimize="$CFLAGS"
ac_add_options --enable-pulseaudio
ac_add_options --enable-release
ac_add_options --enable-update-channel=release
# system libs
ac_add_options --enable-system-pixman
ac_add_options --with-system-ffi
ac_add_options --with-system-icu
ac_add_options --with-system-jpeg
ac_add_options --with-system-libevent
ac_add_options --with-system-libvpx
ac_add_options --with-system-nspr
ac_add_options --with-system-nss
ac_add_options --with-system-png
ac_add_options --with-system-webp
ac_add_options --with-system-zlib
# misc
ac_add_options --allow-addon-sideload
ac_add_options --prefix=/usr
ac_add_options --with-app-name=firefox-esr
ac_add_options --with-distribution-id=org.alpinelinux
ac_add_options --with-libclang-path=/usr/lib
ac_add_options --with-unsigned-addon-scopes=app,system
ac_add_options --with-wasi-sysroot=/usr/share/wasi-sysroot
ac_add_options --host=$CHOST
ac_add_options --target=$CTARGET
# objdir
mk_add_options MOZ_OBJDIR="$builddir/obj"
mk_add_options RUSTFLAGS="$RUSTFLAGS"
# keys
# these are for alpine linux use only
ac_add_options --with-mozilla-api-keyfile="$builddir/mozilla-api-key"
$arch_config
$rust_simd
$sandbox
$webrtc_config
EOF
# zotero prepare
(
cd "$_zoterodir"
# zotero build expects to be in a git repo
git init
git commit --allow-empty -m 'Initial'
npm i --legacy-peer-deps
cd "$srcdir"/zotero-standalone-build*
patch -p1 -i "$srcdir"/xulrunner-get-alpine-firefox.diff
# We need to had '.git/HEAD' and '.git/config' to the archive as the build expects those
mkdir .git
echo '[remote "origin"]\nurl="http://github.com/zotero/zotero-standalone-build"' > .git/config
echo "$_gittag_standalone" > .git/HEAD
./fetch_xulrunner.sh -p l
./fetch_pdftools
# zorero patches
for i in $source; do
case ${i%::*} in
*.diff)
msg ${i%::*}
patch ${patch_args:--p1} -i "$srcdir/$(filename_from_uri $i)"
;;
esac
done
)
}
build() {
cat > .mozconfig base-mozconfig
export MOZ_BUILD_DATE=$(date ${SOURCE_DATE_EPOCH:+ -d@${SOURCE_DATE_EPOCH}} "+%Y%m%d%H%M%S")
# for lto
ulimit -n 4096
# can't be set here and fail
unset RUSTFLAGS
local thinlto_jobs=${JOBS:-1}
case "$CARCH" in
# on this platforms, lld seems to not utilise >1 threads for thinlto for some reason.
# at the same time, having more than 8 also crashes lld for firefox buildsystems (why?).
aarch64)
if [ $thinlto_jobs -gt 8 ]; then
thinlto_jobs=8
fi
;;
esac
export LDFLAGS="$LDFLAGS -Wl,--thinlto-jobs=$thinlto_jobs"
case "$CARCH" in
# lto for 64-bit systems only
aarch64|x86_64|ppc64le)
cat > .mozconfig base-mozconfig <<-EOF
ac_add_options --enable-lto=cross
EOF
esac
# set rpath so linker finds the libs
export LDFLAGS="$LDFLAGS -Wl,-rpath,$_mozappdir"
./mach build
# install to where zotero expects it
DESTDIR="$_zoterodir"/app/xulrunner/firefox-$CARCH ./mach install
mv "$_zoterodir"/app/xulrunner/firefox-$CARCH/usr/lib/firefox-esr/* "$_zoterodir"/app/xulrunner/firefox-$CARCH/.
rm -R "$_zoterodir"/app/xulrunner/firefox-$CARCH/usr
# zotero build
(
cd "$_zoterodir"
npm i --legacy-peer-deps
NODE_OPTIONS=--openssl-legacy-provider npm run build
cd "$srcdir"/zotero-standalone-build*
scripts/dir_build -p l
SKIP_32=1 app/scripts/dir_build -p l
)
}
package() {
install -dDm755 "$pkgdir"/usr/bin
install -dDm755 "$pkgdir"/usr/lib/zotero
cp -r "$srcdir"/zotero-standalone-build*/staging/Zotero_linux-$CARCH/* "$pkgdir/usr/lib/zotero"
rm "$pkgdir/usr/lib/zotero/updater"
cp -r "$_zoterodir"/app/staging/Zotero_linux-$CARCH/* "$pkgdir/usr/lib/zotero"
ln -s /usr/lib/zotero/zotero "$pkgdir/usr/bin/zotero"
install -Dm644 "$srcdir/zotero.desktop" "$pkgdir/usr/share/applications/zotero.desktop"
# Copy zotero icons to a standard location
install -Dm644 "$pkgdir/usr/lib/zotero/chrome/icons/default/default16.png" "$pkgdir/usr/share/icons/hicolor/16x16/apps/zotero.png"
install -Dm644 "$pkgdir/usr/lib/zotero/chrome/icons/default/default32.png" "$pkgdir/usr/share/icons/hicolor/32x32/apps/zotero.png"
install -Dm644 "$pkgdir/usr/lib/zotero/chrome/icons/default/default48.png" "$pkgdir/usr/share/icons/hicolor/48x48/apps/zotero.png"
install -Dm644 "$pkgdir/usr/lib/zotero/chrome/icons/default/default256.png" "$pkgdir/usr/share/icons/hicolor/256x256/apps/zotero.png"
install -Dm644 "$pkgdir/usr/lib/zotero/icons/icon32.png" "$pkgdir/usr/share/icons/hicolor/32x32/apps/zotero.png"
install -Dm644 "$pkgdir/usr/lib/zotero/icons/icon64.png" "$pkgdir/usr/share/icons/hicolor/64x64/apps/zotero.png"
install -Dm644 "$pkgdir/usr/lib/zotero/icons/icon128.png" "$pkgdir/usr/share/icons/hicolor/128x128/apps/zotero.png"
# Close shell when launching
sed -i -r 's:^("\$CALLDIR/zotero-bin" -app "\$CALLDIR/application.ini" "\$@"):exec \1:' "$pkgdir/usr/lib/zotero/zotero"
}
sha512sums="
bdb66b4fb5622af3e60580a3bcd464d98ef13cb38d6ac6c9e5fc046e567a003cf080125d7748950c91c442fde5e8024c50c4180d2f551aa3528160a3c05ae187 firefox-102.15.1esr.source.tar.xz
4e584621145cf8add069c6dac18e805b3274a1ee402d84e924df2341f7d3c5be261a93ef51283bacbd606f47fbdc628c4323ecc31efc5b403b8d224b18dc278f allow-custom-rust-vendor.patch
b1cb2db3122634f66d2bae7066e76f2dcd455c464e021db4de3b0a08314df95cb667846081682db549dd2af8a00831cabe44a2420c66cdfb5e3b5fa7e6bd21d3 avoid-redefinition.patch
454ea3263cabce099accbdc47aaf83be26a19f8b5a4568c01a7ef0384601cf8315efd86cd917f9c8bf419c2c845db89a905f3ff9a8eb0c8e41042e93aa96a85c disable-moz-stackwalk.patch
f7b3b45ba04d05d17439d009bf0c9f27881e126f424e2257552338a0c1e3771ee1289c044babcb0920f62af62873a268c0cf524e1d35711e6dc8b808ca5e9f26 esr-metainfo.patch
a13dee87adf659423f5b3fa0358cfbde135fa614c85dd170d1a48d32ee080e27aef062d3a8e3c45059c41463fda579f8900988166ccb51568793ee7ef9080d04 firefox-esr-ffmpeg6.patch
c2e17f269070d782154f843b95bf68be25d8c4356825dd436b1877aab63ac023051899371da5c21f6151970b2562376c2dadd2d6a038446e5fa621e2495668e1 ffmpeg6-fixup.patch
d3a54897089eda9fdfe4b25ade1cb2c01c4b31fa9bf0e0ddbb0bbe674072ec5d36a6e52f791a8cbc8d3908e912ac2d7edec69b34d87ecca0acca876d45974c8d fix-neon-aom.patch
2f4f15974d52de4bb273b62a332d13620945d284bbc6fe6bd0a1f58ff7388443bc1d3bf9c82cc31a8527aad92b0cd3a1bc41d0af5e1800e0dcbd7033e58ffd71 fix-fortify-system-wrappers.patch
cd68b89e29e5f6379fbd5679db27b9a5ef70ea65e51c0d0a8137e1f1fd210e35a8cfb047798e9549bc7275606d7ec5c8d8af1335d29da4699db7acd8bc7ff556 fix-rust-target.patch
305c874fdea3096e9c4c6aa6520ac64bb1c347c4b59db8360096646593fe684c3b5377874d91cecd33d56d1410b4714fbdea2b514923723ecbeff79d51265d9b fix-webrtc-glibcisms.patch
49aa1dfbe11ed5370e839afb190da7f55ae4887b35645865efe25d398d890563722caedd5696d648ad71448621fbc8bab8def1a3d079e301d6414f0f20e96758 gcc13.patch
a4a3e062661bda64d502d426c480ac9645345860118de9df9ffe6e0597738c70c11e5cdef2d4fd12c5e2ee30a09310159230524655a419a4f7e4eeeb0f3c06b0 mallinfo.patch
f3d419880cc7f043b6eb547894d486457d407640be2bd8b402eb3a534ccea39568f6d506fc44a3b29c94eb0dc6fc2bec6600d161786fd233d26b1dc8970f5ab4 python-deps.patch
2518f2fc75b5db30058e0735f47d60fdf1e7adfaeee4b33fb2afb1bd9a616ce943fd88f4404d0802d4083703f4acf1d5ad42377218d025bc768807fbaf7e1609 sandbox-fork.patch
b7d0a6126bdf6c0569f80aabf5b37ed2c7a35712eb8a0404a2d85381552f5555d4f97d213ea26cec6a45dc2785f22439376ed5f8e78b4fd664ef0223307b333e sandbox-largefile.patch
94433c5ffdbe579c456d95c5f053f61fcbab2f652fa90bc69dcc27d9a1507a8e5c677adeadae9a7a75cc9a55184c1040737f4dfd10b279c088ef016561e6f135 sandbox-sched_setscheduler.patch
12fbe50d94624931a581314b8e6e228a1f8a4550704a6ee4f8904184ac4727efd90982e87a8fdd318e15515f9430dfc6cf7455b301e903003027b3f0afa79795 zstandard.patch
0b3f1e4b9fdc868e4738b5c81fd6c6128ce8885b260affcb9a65ff9d164d7232626ce1291aaea70132b3e3124f5e13fef4d39326b8e7173e362a823722a85127 stab.h
d354f48a29bfc16719f3b230b1395063239d4420f9e47522de4662392d9697b15f931ca3bf6055d100fa33d61a9a1a13477687d5eac99e50ae7dbef9882a5808 firefox.desktop
382510375b1a2fa79be0ab79e3391a021ae2c022429ffbaa7e7a69166f99bb56d01e59a1b10688592a29238f21c9d6977672bd77f9fae439b66bdfe0c55ddb15 mozilla-location.keys
fc45bc3ffb9404e5338ea26a9f04807b40f6f516324972cddd48bedb91b8bd7c6b8d4e03a0209020f5e67b703bc4ff89389985791b9bd544a0fc3951e2dc338e vendor-prefs.js
e1a0a4ff5cc1b53f13776ca11927d671426b0691e78e74a4adf2166d57bb2ae8ac409cc11a37ce5e2f680fdf05d5bc3849c33a9717aca1bb62d03ae5231a67fb zotero.desktop
1002732c348e3caceb077b8595a3a8b5c15dc17bc9c443e8dc96f8efe82ee37d9b5d7241530d82188846007504a277fd261763a4c64c3c259d9130db3139043d xulrunner-get-alpine-firefox.diff
88ae8204fde34bd6b1595ddddc153ded3a3bfcaeb5d65ffd8398d58f41787ddd2ff35051c4f74e0c83483b6ec234f1bf987acbebccfe73ad31be5cb4b55cc403 zotero-client-7.0.0_20230415.tar.gz
2dad54ac1a75e9ed62eec9fe08081e6807ce0167992059d3b7cd7aee3fb4803c694dc852ffe27f82cbe162c7536f2d77c302a8f947b507c6548f729a8c9d3057 zotero-standalone-build-7.0.0_20230415.tar.gz
8379985c0da84d82bdba72a03daaf3afe80a30ef696a2da837cff12b23fdec75b62dd43061ede4687c6acc756181ecefd0a025a7fedce500137faba4ae3326ae zotero-build-20230314.tar.gz
55d3a4e4d3d647e21343689e1c9b105efc05eb3f2edf5017eebe50ecac6c5bd7d8ad5b5fa701abfbe7beec0b064eec88584b6b17cab0a8fc689500ed72a5eb23 zotero-client-7.0.0-beta.57.tar.gz
089370d86388b34003179ebf95894fb68069fe7ee1624f88e6c411bbbb4f7bc846287cf593034487967cf2bdf807c761212bdb6356bd604d1d04de35aeb3e646 zotero_build-modifications.diff
"

View file

@ -0,0 +1,61 @@
--- a/third_party/rust/audio_thread_priority/src/rt_linux.rs
+++ b/third_party/rust/audio_thread_priority/src/rt_linux.rs
@@ -112,7 +112,7 @@
/// Returns the maximum priority, maximum real-time time slice, and the current real-time time
/// slice for this process.
-fn get_limits() -> Result<(i64, u64, libc::rlimit64), AudioThreadPriorityError> {
+fn get_limits() -> Result<(i64, u64, libc::rlimit), AudioThreadPriorityError> {
let c = Connection::get_private(BusType::System)?;
let p = Props::new(
@@ -122,7 +122,7 @@
"org.freedesktop.RealtimeKit1",
DBUS_SOCKET_TIMEOUT,
);
- let mut current_limit = libc::rlimit64 {
+ let mut current_limit = libc::rlimit {
rlim_cur: 0,
rlim_max: 0,
};
@@ -141,9 +141,9 @@
));
}
- if unsafe { libc::getrlimit64(libc::RLIMIT_RTTIME, &mut current_limit) } < 0 {
+ if unsafe { libc::getrlimit(libc::RLIMIT_RTTIME, &mut current_limit) } < 0 {
return Err(AudioThreadPriorityError::new_with_inner(
- "getrlimit64",
+ "getrlimit",
Box::new(OSError::last_os_error()),
));
}
@@ -154,13 +154,13 @@
fn set_limits(request: u64, max: u64) -> Result<(), AudioThreadPriorityError> {
// Set a soft limit to the limit requested, to be able to handle going over the limit using
// SIGXCPU. Set the hard limit to the maxium slice to prevent getting SIGKILL.
- let new_limit = libc::rlimit64 {
+ let new_limit = libc::rlimit {
rlim_cur: request,
rlim_max: max,
};
- if unsafe { libc::setrlimit64(libc::RLIMIT_RTTIME, &new_limit) } < 0 {
+ if unsafe { libc::setrlimit(libc::RLIMIT_RTTIME, &new_limit) } < 0 {
return Err(AudioThreadPriorityError::new_with_inner(
- "setrlimit64",
+ "setrlimit",
Box::new(OSError::last_os_error()),
));
}
@@ -296,9 +296,9 @@
match r {
Ok(_) => Ok(handle),
Err(e) => {
- if unsafe { libc::setrlimit64(libc::RLIMIT_RTTIME, &limits) } < 0 {
+ if unsafe { libc::setrlimit(libc::RLIMIT_RTTIME, &limits) } < 0 {
return Err(AudioThreadPriorityError::new_with_inner(
- "setrlimit64",
+ "setrlimit",
Box::new(OSError::last_os_error()),
));
}

35
user/zotero/lfs64.patch Normal file
View file

@ -0,0 +1,35 @@
force stat() instead of stat64() on 32-bit
--
--- a/xpcom/io/nsLocalFileUnix.h
+++ b/xpcom/io/nsLocalFileUnix.h
@@ -21,7 +21,7 @@
// stat64 and lstat64 are deprecated on OS X. Normal stat and lstat are
// 64-bit by default on OS X 10.6+.
-#if defined(HAVE_STAT64) && defined(HAVE_LSTAT64) && !defined(XP_DARWIN)
+#if 0 && defined(HAVE_STAT64) && defined(HAVE_LSTAT64) && !defined(XP_DARWIN)
# if defined(AIX)
# if defined STAT
# undef STAT
--- a/mozglue/baseprofiler/core/shared-libraries-linux.cc
+++ b/mozglue/baseprofiler/core/shared-libraries-linux.cc
@@ -178,7 +178,7 @@
return false;
}
-#if defined(__x86_64__) || defined(__aarch64__) || \
+#if 1 || defined(__x86_64__) || defined(__aarch64__) || \
(defined(__mips__) && _MIPS_SIM == _ABI64) || \
!(defined(GP_OS_linux) || defined(GP_OS_android))
--- a/security/sandbox/linux/broker/SandboxBrokerUtils.h
+++ b/security/sandbox/linux/broker/SandboxBrokerUtils.h
@@ -15,7 +15,7 @@
// calls. We'll intercept those and handle them in the stat functions
// but must be sure to use the right structure layout.
-#if defined(__NR_stat64) || defined(__NR_fstatat64)
+#if 0 && (defined(__NR_stat64) || defined(__NR_fstatat64) )
typedef struct stat64 statstruct;
# define statsyscall stat64
# define lstatsyscall lstat64

View file

@ -0,0 +1,13 @@
prevents a call to ccache
diff --git a/python/mozbuild/mozbuild/controller/building.py b/python/mozbuild/mozbuild/controller/building.py
index bf7009a..011c012 100644
--- a/python/mozbuild/mozbuild/controller/building.py
+++ b/python/mozbuild/mozbuild/controller/building.py
@@ -570,6 +570,7 @@ class BuildMonitor(MozbuildObject):
)
def ccache_stats(self, ccache=None):
+ return None
ccache_stats = None
if ccache is None:

View file

@ -0,0 +1,30 @@
Patch-Source: https://github.com/chimera-linux/cports/blob/506127954653ccebf9b82df1452cce4ed0dae3b1/contrib/thunderbird/patches/ppc-musttail.patch
--
commit 5e66655e1456c9d26637ceaed3f4533b537322c4
Author: Daniel Kolesa <daniel@octaforge.org>
Date: Sat May 13 23:00:04 2023 +0200
disable musttail on ppc
41:38.04 LLVM ERROR: failed to perform tail call elimination on a call site marked musttail
41:38.04 PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
41:38.04 Stack dump:
41:38.04 0. Running pass 'Function Pass Manager' on module '/builddir/thunderbird-114.0_beta1/obj-powerpc64le-unknown-linux-musl/toolkit/library/build/../../../gfx/skia/SkOpts.o'.
41:38.04 1. Running pass 'PowerPC DAG->DAG Pattern Instruction Selection' on function '@_ZN8portableL15init_lane_masksEPNS_6ParamsEP21SkRasterPipelineStageffff'
41:38.95 clang-16: error: unable to execute command: Aborted
To be investigated later.
diff --git a/gfx/skia/skia/src/core/SkRasterPipeline.h b/gfx/skia/skia/src/core/SkRasterPipeline.h
index 766bb0c..88c6cb2 100644
--- a/gfx/skia/skia/src/core/SkRasterPipeline.h
+++ b/gfx/skia/skia/src/core/SkRasterPipeline.h
@@ -24,7 +24,7 @@ enum SkColorType : int;
struct SkImageInfo;
struct skcms_TransferFunction;
-#if __has_cpp_attribute(clang::musttail) && !defined(__EMSCRIPTEN__) && !defined(SK_CPU_ARM32)
+#if __has_cpp_attribute(clang::musttail) && !defined(__EMSCRIPTEN__) && !defined(SK_CPU_ARM32) && !defined(__powerpc__)
#define SK_HAS_MUSTTAIL 1
#else
#define SK_HAS_MUSTTAIL 0

View file

@ -0,0 +1,23 @@
Patch-Source: https://github.com/chimera-linux/cports/blob/506127954653ccebf9b82df1452cce4ed0dae3b1/contrib/thunderbird/patches/ppc64-webrtc.patch
--
commit 010bfb0441168d51e0fffe98d1f50e0602e7947f
Author: Daniel Kolesa <daniel@octaforge.org>
Date: Sat May 13 23:40:41 2023 +0200
fix webrtc on ppc64
diff --git a/third_party/libwebrtc/moz.build b/third_party/libwebrtc/moz.build
index 976cf37..d35d447 100644
--- a/third_party/libwebrtc/moz.build
+++ b/third_party/libwebrtc/moz.build
@@ -643,3 +643,10 @@ if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "WINNT":
"/third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/vector_math_avx2_gn",
"/third_party/libwebrtc/modules/desktop_capture/desktop_capture_differ_sse2_gn"
]
+
+if CONFIG["CPU_ARCH"] == "ppc64" and CONFIG["OS_TARGET"] == "Linux":
+
+ DIRS += [
+ "/third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn",
+ "/third_party/libwebrtc/modules/desktop_capture/primitives_gn"
+ ]

View file

@ -0,0 +1,12 @@
set rust crate lto to thin to not use fatlto for gkrust which fails sometimes
--- a/config/makefiles/rust.mk
+++ b/config/makefiles/rust.mk
@@ -92,7 +92,7 @@
# Never enable when coverage is enabled to work around https://github.com/rust-lang/rust/issues/90045.
ifndef MOZ_CODE_COVERAGE
ifeq (,$(findstring gkrust_gtest,$(RUST_LIBRARY_FILE)))
-cargo_rustc_flags += -Clto$(if $(filter full,$(MOZ_LTO_RUST_CROSS)),=fat)
+cargo_rustc_flags += -Clto=thin
endif
# We need -Cembed-bitcode=yes for all crates when using -Clto.
RUSTFLAGS += -Cembed-bitcode=yes

View file

@ -1,79 +0,0 @@
diff --git a/fetch_xulrunner.sh.orig b/fetch_xulrunner.sh
index b1e812f..ca3caa5 100755
--- a/fetch_xulrunner.sh.orig
+++ b/fetch_xulrunner.sh
@@ -114,15 +114,6 @@ function modify_omni {
replace_line 'MOZ_CRASHREPORTER:' 'MOZ_CRASHREPORTER: false \&\&' modules/AppConstants.jsm
replace_line 'MOZ_UPDATE_CHANNEL:.+' 'MOZ_UPDATE_CHANNEL: "none",' modules/AppConstants.jsm
replace_line '"https:\/\/[^\/]+mozilla.com.+"' '""' modules/AppConstants.jsm
-
- replace_line 'if \(!updateAuto\) \{' 'if (update.type == "major") {
- LOG("UpdateService:_selectAndInstallUpdate - prompting because it is a major update");
- AUSTLMY.pingCheckCode(this._pingSuffix, AUSTLMY.CHK_SHOWPROMPT_PREF);
- Services.obs.notifyObservers(update, "update-available", "show-prompt");
- return;
- }
- if (!updateAuto) {' modules/UpdateService.jsm
-
replace_line 'pref\("network.captive-portal-service.enabled".+' 'pref("network.captive-portal-service.enabled", false);' greprefs.js
replace_line 'pref\("network.connectivity-service.enabled".+' 'pref("network.connectivity-service.enabled", false);' greprefs.js
replace_line 'pref\("toolkit.telemetry.server".+' 'pref("toolkit.telemetry.server", "");' greprefs.js
@@ -368,31 +359,13 @@ fi
if [ $BUILD_LINUX == 1 ]; then
GECKO_VERSION="$GECKO_VERSION_LINUX"
- DOWNLOAD_URL="https://ftp.mozilla.org/pub/firefox/releases/$GECKO_VERSION"
- rm -rf firefox
-
- curl -O "$DOWNLOAD_URL/linux-i686/en-US/firefox-$GECKO_VERSION.tar.bz2"
- rm -rf firefox-i686
- tar xvf firefox-$GECKO_VERSION.tar.bz2
- mv firefox firefox-i686
-
- pushd firefox-i686
- modify_omni linux32
- popd
-
- rm "firefox-$GECKO_VERSION.tar.bz2"
-
- curl -O "$DOWNLOAD_URL/linux-x86_64/en-US/firefox-$GECKO_VERSION.tar.bz2"
rm -rf firefox-x86_64
- tar xvf firefox-$GECKO_VERSION.tar.bz2
- mv firefox firefox-x86_64
-
- pushd firefox-x86_64
- modify_omni linux64
- popd
-
- rm "firefox-$GECKO_VERSION.tar.bz2"
+ cp -r /usr/lib/firefox-esr firefox-x86_64
+
+ pushd firefox-x86_64
+ modify_omni linux64
+ popd
fi
echo Done
diff --git a/build.sh.orig b/build.sh
index 893f9fb..51ae170 100755
--- a/build.sh.orig
+++ b/build.sh
@@ -794,7 +794,7 @@ fi
# Linux
if [ $BUILD_LINUX == 1 ]; then
- for arch in "i686" "x86_64"; do
+ for arch in "x86_64"; do
runtime_path="${LINUX_RUNTIME_PATH_PREFIX}${arch}"
# Set up directory
@@ -807,7 +807,7 @@ if [ $BUILD_LINUX == 1 ]; then
cp -r "$runtime_path/"!(application.ini|browser|defaults|devtools-files|crashreporter|crashreporter.ini|firefox|pingsender|precomplete|removed-files|run-mozilla.sh|update-settings.ini|updater|updater.ini) "$APPDIR"
# Use our own launcher that calls the original Firefox executable with -app
- mv "$APPDIR"/firefox-bin "$APPDIR"/zotero-bin
+ mv "$APPDIR"/firefox-esr "$APPDIR"/zotero-bin
cp "$CALLDIR/linux/zotero" "$APPDIR"/zotero
# Copy Ubuntu launcher files

View file

@ -0,0 +1,105 @@
diff --git a/app/build.sh b/app/build.sh
index 649d629..7d078b8 100755
--- a/app/build.sh
+++ b/app/build.sh
@@ -59,10 +59,7 @@ function abspath {
}
function check_lfs_file {
- if [ "$(head --bytes 5 "$1")" = "versi" ]; then
- echo "$1 not checked out -- install Git LFS and run 'git lfs pull'" >&2
- exit 1
- fi
+ return 0
}
SOURCE_DIR=""
@@ -840,18 +837,13 @@ if [ $BUILD_LINUX == 1 ]; then
cp -r "$runtime_path/"!(application.ini|browser|defaults|devtools-files|crashreporter|crashreporter.ini|firefox|pingsender|precomplete|removed-files|run-mozilla.sh|update-settings.ini|updater|updater.ini) "$APPDIR"
# Use our own launcher that calls the original Firefox executable with -app
- mv "$APPDIR"/firefox-bin "$APPDIR"/zotero-bin
+ mv "$APPDIR"/firefox-esr "$APPDIR"/zotero-bin
cp "$CALLDIR/linux/zotero" "$APPDIR"/zotero
# Copy Ubuntu launcher files
cp "$CALLDIR/linux/zotero.desktop" "$APPDIR"
cp "$CALLDIR/linux/set_launcher_icon" "$APPDIR"
- # Use our own updater, because Mozilla's requires updates signed by Mozilla
- check_lfs_file "$CALLDIR/linux/updater.tar.xz"
- tar xf "$CALLDIR/linux/updater.tar.xz" --to-stdout updater-$arch > "$APPDIR/updater"
- chmod 755 "$APPDIR/updater"
-
# Copy app files
rsync -a "$base_dir/" "$APPDIR/"
@@ -860,6 +852,7 @@ if [ $BUILD_LINUX == 1 ]; then
cp -RH "$CALLDIR/modules/zotero-libreoffice-integration/install" "$APPDIR/integration/libreoffice"
# Copy icons
+ mkdir -p "$APPDIR"/icons
cp "$CALLDIR/linux/icons/icon32.png" "$APPDIR/icons/"
cp "$CALLDIR/linux/icons/icon64.png" "$APPDIR/icons/"
cp "$CALLDIR/linux/icons/icon128.png" "$APPDIR/icons/"
diff --git a/app/scripts/fetch_xulrunner b/app/scripts/fetch_xulrunner
index 8b3d918..120b085 100755
--- a/app/scripts/fetch_xulrunner
+++ b/app/scripts/fetch_xulrunner
@@ -132,15 +132,6 @@ function modify_omni {
# Continue using app.update.auto in prefs.js on Windows
replace_line 'PER_INSTALLATION_PREFS_PLATFORMS = \["win"\]' 'PER_INSTALLATION_PREFS_PLATFORMS = []' modules/UpdateUtils.jsm
- # Prompt if major update is available instead of installing automatically on restart
- replace_line 'if \(!updateAuto\) \{' 'if (update.type == "major") {
- LOG("UpdateService:_selectAndInstallUpdate - prompting because it is a major update");
- AUSTLMY.pingCheckCode(this._pingSuffix, AUSTLMY.CHK_SHOWPROMPT_PREF);
- Services.obs.notifyObservers(update, "update-available", "show-prompt");
- return;
- }
- if (!updateAuto) {' modules/UpdateService.jsm
-
# Avoid console warning about resource://gre/modules/FxAccountsCommon.js
replace_line 'const logins = this._data.logins;' 'const logins = this._data.logins; if (this._data.logins.length != -1) return;' modules/LoginStore.jsm
@@ -470,36 +461,11 @@ fi
if [ $BUILD_LINUX == 1 ]; then
GECKO_VERSION="$GECKO_VERSION_LINUX"
- DOWNLOAD_URL="https://ftp.mozilla.org/pub/firefox/releases/$GECKO_VERSION"
+ pushd firefox-x86_64
+ modify_omni linux64
+ popd
- # Include 32-bit build if not in CI
- if [[ "${CI:-}" = "1" ]] || [[ "${SKIP_32:-}" = "1" ]]; then
- arches="x86_64"
- else
- arches="i686 x86_64"
- fi
- for arch in $arches; do
- xdir="firefox-$arch"
- rm -rf $xdir
-
- archived_file="firefox-$GECKO_VERSION-$arch.tar.bz2"
- if [ -e "$archived_file" ]; then
- echo "Using $archived_file"
- cp "$archived_file" "firefox-$GECKO_VERSION.tar.bz2"
- else
- curl -O "$DOWNLOAD_URL/linux-$arch/en-US/firefox-$GECKO_VERSION.tar.bz2"
- fi
-
- tar xvf firefox-$GECKO_VERSION.tar.bz2
- mv firefox firefox-$arch
-
- pushd firefox-$arch
- modify_omni
- popd
- echo $($SCRIPT_DIR/xulrunner_hash -p l) > hash-linux
- rm "firefox-$GECKO_VERSION.tar.bz2"
- done
fi
echo Done