Compare commits
33 commits
codeberg-p
...
edge
Author | SHA1 | Date | |
---|---|---|---|
396c98208d | |||
b345573aa1 | |||
257e019992 | |||
97ed4992d7 | |||
7814f05e1c | |||
9bf9771b8c | |||
6e698a0974 | |||
367a606da2 | |||
26657f4d57 | |||
9e2e00cd44 | |||
5771d09151 | |||
0414f86242 | |||
fb7a3fe81b | |||
3ffe64d0d4 | |||
15d01121ba | |||
d24323205e | |||
eef1e89d88 | |||
623d98575e | |||
b306518289 | |||
63f6a6099f | |||
7e21600868 | |||
714437157c | |||
f82ac83d0b | |||
b9b609bedf | |||
8ffac41cb8 | |||
7ffb4b3105 | |||
743ceb8dbe | |||
021b81131e | |||
d00a14e695 | |||
a6e60edfd9 | |||
68130cdf8a | |||
888654be5c | |||
d6e00b6395 |
61 changed files with 701 additions and 5972 deletions
260
.forgejo/bin/build.sh
Executable file
260
.forgejo/bin/build.sh
Executable file
|
@ -0,0 +1,260 @@
|
|||
#!/bin/sh
|
||||
# shellcheck disable=SC3043
|
||||
|
||||
. /usr/local/lib/functions.sh
|
||||
|
||||
# shellcheck disable=SC3040
|
||||
set -eu -o pipefail
|
||||
|
||||
readonly APORTSDIR=$CI_PROJECT_DIR
|
||||
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://ayakael.net/api/packages/forge/alpine}"
|
||||
: "${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}"
|
||||
|
||||
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"
|
||||
if abuild -r 2>&1 | report "build-$aport"; then
|
||||
checkapk 2>&1 | 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"
|
||||
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
|
||||
[ "$repo" = "non-free" ] && 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 apk update
|
||||
}
|
||||
|
||||
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
|
||||
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
|
||||
( . /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
|
||||
doas chown -R buildozer: .
|
||||
|
||||
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
|
||||
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 $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
|
||||
|
31
.forgejo/bin/check_ver.sh
Executable file
31
.forgejo/bin/check_ver.sh
Executable file
|
@ -0,0 +1,31 @@
|
|||
#!/bin/bash
|
||||
|
||||
# expects the following env variables:
|
||||
# downstream: downstream repo
|
||||
|
||||
repo=${downstream/*\/}
|
||||
|
||||
curl --silent $downstream/x86_64/APKINDEX.tar.gz | tar -O -zx APKINDEX > APKINDEX
|
||||
|
||||
owned_by_you=$(awk -v RS= -v ORS="\n\n" '/m:Antoine Martin \(ayakael\) <dev@ayakael.net>/' APKINDEX | awk -F ':' '{if($1=="o"){print $2}}' | sort | uniq)
|
||||
|
||||
echo "Found $(printf '%s\n' $owned_by_you | wc -l ) packages owned by you"
|
||||
|
||||
rm -f out_of_date not_in_anitya
|
||||
|
||||
for pkg in $owned_by_you; do
|
||||
upstream_version=$(curl --fail -X GET -sS -H 'Content-Type: application/json' "https://release-monitoring.org/api/v2/packages/?name=$pkg&distribution=Alpine" | jq -r '.items.[].stable_version')
|
||||
downstream_version=$(sed -n "/^P:$pkg$/,/^$/p" APKINDEX | awk -F ':' '{if($1=="V"){print $2}}' | sort -V | tail -n 1)
|
||||
downstream_version=${downstream_version/-*}
|
||||
|
||||
if [ -z "$upstream_version" ]; then
|
||||
echo "$pkg not in anitya"
|
||||
echo "$pkg" >> not_in_anitya
|
||||
elif [ "$downstream_version" != "$(printf '%s\n' $upstream_version $downstream_version | sort -V | head -n 1)" ]; then
|
||||
echo "$pkg higher downstream"
|
||||
continue
|
||||
elif [ "$upstream_version" != "$downstream_version" ]; then
|
||||
echo "$pkg upstream version $upstream_version does not match downstream version $downstream_version"
|
||||
echo "$pkg $downstream_version $upstream_version $repo" >> out_of_date
|
||||
fi
|
||||
done
|
165
.forgejo/bin/create_issue.sh
Executable file
165
.forgejo/bin/create_issue.sh
Executable file
|
@ -0,0 +1,165 @@
|
|||
#!/bin/bash
|
||||
|
||||
# expects:
|
||||
# env variable FORGEJO_TOKEN
|
||||
# file out_of_date
|
||||
|
||||
IFS='
|
||||
'
|
||||
repo=${downstream/*\/}
|
||||
|
||||
does_it_exist() {
|
||||
name=$1
|
||||
downstream_version=$2
|
||||
upstream_version=$3
|
||||
repo=$4
|
||||
|
||||
query="$repo/$name: upgrade to $upstream_version"
|
||||
query="$(echo $query | sed 's| |%20|g' | sed 's|:|%3A|g' | sed 's|/|%2F|g' )"
|
||||
|
||||
result="$(curl --silent -X 'GET' \
|
||||
"$GITHUB_SERVER_URL/api/v1/repos/$GITHUB_REPOSITORY/issues?state=open&q=$query&type=issues" \
|
||||
-H 'accept: application/json' \
|
||||
-H "authorization: Basic $FORGEJO_TOKEN"
|
||||
)"
|
||||
|
||||
if [ "$result" == "[]" ]; then
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
is_it_old() {
|
||||
name=$1
|
||||
downstream_version=$2
|
||||
upstream_version=$3
|
||||
repo=$4
|
||||
|
||||
query="$repo/$name: upgrade to"
|
||||
query="$(echo $query | sed 's| |%20|g' | sed 's|:|%3A|g' | sed 's|/|%2F|g' )"
|
||||
|
||||
result="$(curl --silent -X 'GET' \
|
||||
"$GITHUB_SERVER_URL/api/v1/repos/$GITHUB_REPOSITORY/issues?state=open&q=$query&type=issues" \
|
||||
-H 'accept: application/json' \
|
||||
-H "authorization: Basic $FORGEJO_TOKEN"
|
||||
)"
|
||||
|
||||
result_title="$(echo $result | jq -r '.[].title' )"
|
||||
result_id="$(echo $result | jq -r '.[].number' )"
|
||||
result_upstream_version="$(echo $result_title | awk '{print $4}')"
|
||||
|
||||
if [ "$upstream_version" != "$result_upstream_version" ]; then
|
||||
echo $result_id
|
||||
else
|
||||
echo 0
|
||||
fi
|
||||
}
|
||||
|
||||
update_title() {
|
||||
name=$1
|
||||
downstream_version=$2
|
||||
upstream_version=$3
|
||||
repo=$4
|
||||
id=$5
|
||||
|
||||
result=$(curl --silent -X 'PATCH' \
|
||||
"$GITHUB_SERVER_URL/api/v1/repos/$GITHUB_REPOSITORY/issues/$id" \
|
||||
-H 'accept: application/json' \
|
||||
-H "authorization: Basic $FORGEJO_TOKEN" \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d "{
|
||||
\"title\": \"$repo/$name: upgrade to $upstream_version\"
|
||||
}"
|
||||
)
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
create_issue() {
|
||||
name=$1
|
||||
downstream_version=$2
|
||||
upstream_version=$3
|
||||
repo=$4
|
||||
|
||||
result=$(curl --silent -X 'POST' \
|
||||
"$GITHUB_SERVER_URL/api/v1/repos/$GITHUB_REPOSITORY/issues" \
|
||||
-H 'accept: application/json' \
|
||||
-H "authorization: Basic $FORGEJO_TOKEN" \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d "{
|
||||
\"title\": \"$repo/$name: upgrade to $upstream_version\",
|
||||
\"labels\": [
|
||||
$LABEL_NUMBER
|
||||
]
|
||||
}")
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
if [ -f out_of_date ]; then
|
||||
out_of_date="$(cat out_of_date)"
|
||||
|
||||
echo "Detected $(wc -l out_of_date) out-of-date packages, creating issues"
|
||||
|
||||
for pkg in $out_of_date; do
|
||||
name="$(echo $pkg | awk '{print $1}')"
|
||||
downstream_version="$(echo $pkg | awk '{print $2}')"
|
||||
upstream_version="$(echo $pkg | awk '{print $3}')"
|
||||
repo="$(echo $pkg | awk '{print $4}')"
|
||||
|
||||
if does_it_exist $name $downstream_version $upstream_version $repo; then
|
||||
echo "Issue for $repo/$name already exists"
|
||||
continue
|
||||
fi
|
||||
|
||||
id=$(is_it_old $name $downstream_version $upstream_version $repo)
|
||||
|
||||
if [ "$id" != "0" ] && [ -n "$id" ]; then
|
||||
echo "Issue for $repo/$name needs updating"
|
||||
update_title $name $downstream_version $upstream_version $repo $id
|
||||
continue
|
||||
fi
|
||||
|
||||
echo "Creating issue for $repo/$name"
|
||||
create_issue $name $downstream_version $upstream_version $repo
|
||||
done
|
||||
fi
|
||||
|
||||
if [ -f not_in_anitya ]; then
|
||||
query="Add missing $repo packages to anitya"
|
||||
query="$(echo $query | sed 's| |%20|g')"
|
||||
|
||||
result="$(curl --silent -X 'GET' \
|
||||
"$GITHUB_SERVER_URL/api/v1/repos/$GITHUB_REPOSITORY/issues?state=open&q=$query&type=issues" \
|
||||
-H 'accept: application/json' \
|
||||
-H "authorization: Basic $FORGEJO_TOKEN"
|
||||
)"
|
||||
|
||||
if [ "$result" == "[]" ]; then
|
||||
echo "Creating anitya issue"
|
||||
result=$(curl --silent -X 'POST' \
|
||||
"$GITHUB_SERVER_URL/api/v1/repos/$GITHUB_REPOSITORY/issues" \
|
||||
-H 'accept: application/json' \
|
||||
-H "authorization: Basic $FORGEJO_TOKEN" \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d "{
|
||||
\"title\": \"Add missing $repo packages to anitya\",
|
||||
\"body\": \"- [ ] $(sed '{:q;N;s/\n/\\n- [ ] /g;t q}' not_in_anitya)\",
|
||||
\"labels\": [
|
||||
$LABEL_NUMBER
|
||||
]
|
||||
}")
|
||||
|
||||
else
|
||||
echo "Updating anitya issue"
|
||||
result_id="$(echo $result | jq -r '.[].number' )"
|
||||
result=$(curl --silent -X 'PATCH' \
|
||||
"$GITHUB_SERVER_URL/api/v1/repos/$GITHUB_REPOSITORY/issues/$result_id" \
|
||||
-H 'accept: application/json' \
|
||||
-H "authorization: Basic $FORGEJO_TOKEN" \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d "{
|
||||
\"body\": \"- [ ] $(sed '{:q;N;s/\n/\\n- [ ] /g;t q}' not_in_anitya)\"
|
||||
}"
|
||||
)
|
||||
fi
|
||||
fi
|
|
@ -1,66 +0,0 @@
|
|||
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 "$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
|
|
@ -24,8 +24,8 @@ jobs:
|
|||
fetch-depth: 500
|
||||
- name: Package build
|
||||
run: |
|
||||
doas patch -d / -p1 -i ${{ github.workspace }}/.forgejo/patches/build.patch
|
||||
build.sh
|
||||
${{ github.workspace }}/.forgejo/bin/build.sh
|
||||
touch packages/dummy
|
||||
- name: Package upload
|
||||
uses: forgejo/upload-artifact@v3
|
||||
with:
|
||||
|
|
|
@ -24,8 +24,8 @@ jobs:
|
|||
fetch-depth: 500
|
||||
- name: Package build
|
||||
run: |
|
||||
doas patch -d / -p1 -i ${{ github.workspace }}/.forgejo/patches/build.patch
|
||||
build.sh
|
||||
${{ github.workspace }}/.forgejo/bin/build.sh
|
||||
touch packages/dummy
|
||||
- name: Package upload
|
||||
uses: forgejo/upload-artifact@v3
|
||||
with:
|
||||
|
|
27
.forgejo/workflows/check-community.yml
Normal file
27
.forgejo/workflows/check-community.yml
Normal file
|
@ -0,0 +1,27 @@
|
|||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
schedule:
|
||||
- cron: '0 5 * * *'
|
||||
|
||||
jobs:
|
||||
check-community:
|
||||
name: Check community repo
|
||||
runs-on: x86_64
|
||||
container:
|
||||
image: alpine:latest
|
||||
env:
|
||||
downstream: https://dl-cdn.alpinelinux.org/alpine/edge/community
|
||||
FORGEJO_TOKEN: ${{ secrets.forgejo_token }}
|
||||
LABEL_NUMBER: 4
|
||||
steps:
|
||||
- name: Environment setup
|
||||
run: apk add grep coreutils gawk curl wget bash nodejs git jq sed
|
||||
- name: Get scripts
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
- name: Check out-of-date packages
|
||||
run: ${{ github.workspace }}/.forgejo/bin/check_ver.sh
|
||||
- name: Create issues
|
||||
run: ${{ github.workspace }}/.forgejo/bin/create_issue.sh
|
27
.forgejo/workflows/check-testing.yml
Normal file
27
.forgejo/workflows/check-testing.yml
Normal file
|
@ -0,0 +1,27 @@
|
|||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
schedule:
|
||||
- cron: '0 5 * * *'
|
||||
|
||||
jobs:
|
||||
check-community:
|
||||
name: Check testing repo
|
||||
runs-on: x86_64
|
||||
container:
|
||||
image: alpine:latest
|
||||
env:
|
||||
downstream: https://dl-cdn.alpinelinux.org/alpine/edge/testing
|
||||
FORGEJO_TOKEN: ${{ secrets.forgejo_token }}
|
||||
LABEL_NUMBER: 4
|
||||
steps:
|
||||
- name: Environment setup
|
||||
run: apk add grep coreutils gawk curl wget bash nodejs git jq sed
|
||||
- name: Get scripts
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
- name: Check out-of-date packages
|
||||
run: ${{ github.workspace }}/.forgejo/bin/check_ver.sh
|
||||
- name: Create issues
|
||||
run: ${{ github.workspace }}/.forgejo/bin/create_issue.sh
|
27
.forgejo/workflows/check-user.yml
Normal file
27
.forgejo/workflows/check-user.yml
Normal file
|
@ -0,0 +1,27 @@
|
|||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
schedule:
|
||||
- cron: '0 5 * * *'
|
||||
|
||||
jobs:
|
||||
check-user:
|
||||
name: Check user repo
|
||||
runs-on: x86_64
|
||||
container:
|
||||
image: alpine:latest
|
||||
env:
|
||||
downstream: https://ayakael.net/api/packages/forge/alpine/edge/user
|
||||
FORGEJO_TOKEN: ${{ secrets.forgejo_token }}
|
||||
LABEL_NUMBER: 4
|
||||
steps:
|
||||
- name: Environment setup
|
||||
run: apk add grep coreutils gawk curl wget bash nodejs git jq sed
|
||||
- name: Get scripts
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
- name: Check out-of-date packages
|
||||
run: ${{ github.workspace }}/.forgejo/bin/check_ver.sh
|
||||
- name: Create issues
|
||||
run: ${{ github.workspace }}/.forgejo/bin/create_issue.sh
|
|
@ -1,20 +1,19 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
pkgname=caprine
|
||||
pkgver=2.59.1
|
||||
pkgrel=0
|
||||
pkgver=2.60.1
|
||||
pkgrel=1
|
||||
pkgdesc="Elegant Facebook Messenger desktop app"
|
||||
arch="x86_64 aarch64" # bloced by electron
|
||||
arch="x86_64 aarch64" # blocked by electron
|
||||
url="https://github.com/sindresorhus/caprine"
|
||||
license="MIT"
|
||||
depends="electron"
|
||||
makedepends="npm findutils coreutils"
|
||||
options="!check"
|
||||
options="!check" # No test suite
|
||||
source="
|
||||
$pkgname-$pkgver.tar.gz::https://github.com/sindresorhus/caprine/archive/refs/tags/v$pkgver.tar.gz
|
||||
caprine.desktop
|
||||
caprine.js
|
||||
caprine.sh
|
||||
"
|
||||
|
||||
build() {
|
||||
|
@ -27,7 +26,7 @@ build() {
|
|||
}
|
||||
|
||||
package() {
|
||||
local appdir=/usr/lib/$pkgname
|
||||
local appdir=/usr/lib/caprine
|
||||
|
||||
install -d "$pkgdir"$appdir
|
||||
cp -r ./* "$pkgdir"$appdir
|
||||
|
@ -35,13 +34,13 @@ package() {
|
|||
install -dm755 "$pkgdir/usr/share/pixmaps"
|
||||
install -m644 build/icon.png "$pkgdir/usr/share/pixmaps/$pkgname.png"
|
||||
|
||||
install -Dm755 "$srcdir"/$pkgname.js "$pkgdir"/usr/bin/$pkgname
|
||||
install -Dm644 "$srcdir"/$pkgname.desktop \
|
||||
"$pkgdir"/usr/share/applications/$pkgname.desktop
|
||||
install -Dm755 "$srcdir"/caprine.sh "$pkgdir"/usr/bin/caprine
|
||||
install -Dm644 "$srcdir"/caprine.desktop \
|
||||
"$pkgdir"/usr/share/applications/caprine.desktop
|
||||
|
||||
install -dm755 "$pkgdir"/usr/share/licenses/$pkgname
|
||||
ln -s "$(realpath -m --relative-to=/usr/share/licenses/$pkgname $appdir/license)" \
|
||||
"$pkgdir"/usr/share/licenses/$pkgname
|
||||
install -dm755 "$pkgdir"/usr/share/licenses/caprine
|
||||
ln -s "$(realpath -m --relative-to=/usr/share/licenses/caprine $appdir/license)" \
|
||||
"$pkgdir"/usr/share/licenses/caprine
|
||||
|
||||
# Clean up
|
||||
rm -r "$pkgdir"$appdir/build
|
||||
|
@ -49,7 +48,7 @@ package() {
|
|||
rm -r "$pkgdir"$appdir/tsconfig.json
|
||||
find "$pkgdir"$appdir \
|
||||
-name "package.json" \
|
||||
-exec sed -e "s|$srcdir/$pkgname|$appdir|" \
|
||||
-exec sed -e "s|$srcdir/caprine|$appdir|" \
|
||||
-i {} \; \
|
||||
-or -name ".*" -prune -exec rm -r '{}' \; \
|
||||
-or -name "bin" -prune -exec rm -r '{}' \; \
|
||||
|
@ -60,7 +59,7 @@ package() {
|
|||
-or -name "test" -prune -exec rm -r '{}' \;
|
||||
}
|
||||
sha512sums="
|
||||
a525bafb6a53dd2dbdfc4b9b3e96d3939d93be950a3287f2a5ef6465d5a6b64ecda79b6d393023d067f939e1a6e85debc35f83bbb1f758011db9d94dd9ff8a72 caprine-2.59.1.tar.gz
|
||||
0df7f233c91f5a044dcffde94b976c6ad71e6d355518615c48cd825a249c01d63f455de31ece69193a66ca0fd8157506f9b88088da1bd47fc75e9d3800784ed0 caprine-2.60.1.tar.gz
|
||||
a469e3bea24926119e51642b777ef794c5fa65421107903f967c36d81bbb1adb3d52469ce3a3301b2c890f1aa53ab989ded22a7c6e811fb8cf0a582dbd835e19 caprine.desktop
|
||||
44280c62ce43bdafa8528729371fccb16b8a0e3db7aca28d5c157ae0144dca5fbb023b8883b561955aa28ab62e967f2674d8c6bcaff186e2cdd0e7ba8beab9ac caprine.js
|
||||
3ad8994c1a0417e73d622587769e527b4236a32c1a89442ff76413b75b4392d667c9e2908979b453e5926e54db6d94b31625340c5a94e84e91ea77f56feae778 caprine.sh
|
||||
"
|
2
backports/caprine/caprine.sh
Normal file
2
backports/caprine/caprine.sh
Normal file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/sh
|
||||
/usr/bin/electron "/usr/lib/caprine"
|
|
@ -1,38 +0,0 @@
|
|||
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
|
||||
# Maintainer: Will Sinatra <wpsinatra@gmail.com>
|
||||
pkgname=py3-django-debug-toolbar
|
||||
_pkgname=django-debug-toolbar
|
||||
pkgver=4.3
|
||||
pkgrel=1
|
||||
pkgdesc="Configurable set of panels that display various debug information about the current request/response"
|
||||
options="!check" # Requires unpackaged Selenium python3 module
|
||||
url="https://github.com/jazzband/django-debug-toolbar"
|
||||
arch="noarch"
|
||||
license="BSD-3-Clause"
|
||||
depends="py3-django py3-sqlparse"
|
||||
makedepends="
|
||||
py3-gpep517
|
||||
py3-hatchling
|
||||
"
|
||||
# options="!check" #no testsuite
|
||||
subpackages="$pkgname-pyc"
|
||||
source="$pkgname-$pkgver.tar.gz::https://github.com/jazzband/$_pkgname/archive/$pkgver.tar.gz"
|
||||
builddir="$srcdir"/$_pkgname-$pkgver
|
||||
|
||||
replaces="py-django-debug-toolbar" # Backwards compatibility
|
||||
provides="py-django-debug-toolbar=$pkgver-r$pkgrel" # Backwards compatibility
|
||||
|
||||
build() {
|
||||
gpep517 build-wheel \
|
||||
--wheel-dir .dist \
|
||||
--output-fd 3 3>&1 >&2
|
||||
}
|
||||
|
||||
package() {
|
||||
python3 -m installer -d "$pkgdir" \
|
||||
.dist/*.whl
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
caa8563d38e8c96305828b7a07006ce2ee0afae099d70d75d332f2196fc3ffcf7f3848440ea22c00f2b918029477672a172e30714f6f73a630404175aef3b925 py3-django-debug-toolbar-4.3.tar.gz
|
||||
"
|
|
@ -1,36 +0,0 @@
|
|||
# Contributor: Rosie K Languet <rkl@rosiesworkshop.net>
|
||||
# Maintainer: Rosie K Languet <rkl@rosiesworkshop.net>
|
||||
pkgname=py3-pyqt6-sip
|
||||
pkgver=13.8.0
|
||||
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="
|
||||
6947690e61fe65a21f61d034ae9de7b7adb001c59a4a362933c5441648fe27140b43666efa73f981b138cfc73fac72777bb7318b98accc3c7f808687e3fc5d81 PyQt6_sip-13.8.0.tar.gz
|
||||
"
|
|
@ -1,59 +0,0 @@
|
|||
# Contributor: Rosie K Languet <rkl@rosiesworkshop.net>
|
||||
# Maintainer: Rosie K Languet <rkl@rosiesworkshop.net>
|
||||
pkgname=py3-qt6
|
||||
pkgver=6.7.1
|
||||
pkgrel=0
|
||||
pkgdesc="Python 3 bindings for the Qt toolkit"
|
||||
url="https://www.riverbankcomputing.com/software/pyqt/"
|
||||
arch="all"
|
||||
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="
|
||||
1e0fec009e1823b06460fd96eddc00ed31388c20f6d832aa0ebaa130baf06d83514df43af7961c3cb2872570d27e539d6db7bf6143ccdfd61a19da7521be2c7e PyQt6-6.7.1.tar.gz
|
||||
"
|
|
@ -1,38 +0,0 @@
|
|||
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
|
||||
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
|
||||
pkgname=py3-sip
|
||||
pkgver=6.8.6
|
||||
pkgrel=0
|
||||
pkgdesc="A tool that makes it easy to create Python bindings for C and C++ libraries"
|
||||
options="!check" # No testsuite
|
||||
url="https://www.riverbankcomputing.com/software/sip/"
|
||||
arch="all"
|
||||
license="custom:sip"
|
||||
depends="
|
||||
py3-packaging
|
||||
py3-ply
|
||||
py3-setuptools
|
||||
py3-toml
|
||||
"
|
||||
makedepends="python3-dev py3-gpep517 py3-wheel"
|
||||
subpackages="$pkgname-pyc"
|
||||
source="https://pypi.python.org/packages/source/s/sip/sip-$pkgver.tar.gz"
|
||||
builddir="$srcdir/sip-$pkgver"
|
||||
|
||||
replaces="py-sip" # Backwards comptibility
|
||||
provides="py-sip=$pkgver-r$pkgrel" # Backwards comptibility
|
||||
|
||||
build() {
|
||||
gpep517 build-wheel \
|
||||
--wheel-dir .dist \
|
||||
--output-fd 3 3>&1 >&2
|
||||
}
|
||||
|
||||
package() {
|
||||
python3 -m installer -d "$pkgdir" \
|
||||
.dist/sip-*.whl
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
c884c58fc51708e2dd247453f2214e6b01d7e1a9a0166b4228feb5d996310ace2665238dde26af34907e596a0a1c710fc130ae79297f430f73f639a3eb781a50 sip-6.8.6.tar.gz
|
||||
"
|
|
@ -1,13 +1,15 @@
|
|||
# Contributor: lauren n. liberda <lauren@selfisekai.rocks>
|
||||
# Maintainer: lauren n. liberda <lauren@selfisekai.rocks>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
pkgname=signal-desktop
|
||||
pkgver=7.11.0
|
||||
pkgver=7.29.0
|
||||
pkgrel=0
|
||||
pkgdesc="A messaging app for simple private communication with friends"
|
||||
url="https://github.com/signalapp/Signal-Desktop/"
|
||||
# same as electron
|
||||
arch="aarch64 x86_64"
|
||||
license="AGPL-3.0-only"
|
||||
_llvmver=18
|
||||
depends="
|
||||
electron
|
||||
font-barlow
|
||||
|
@ -23,7 +25,7 @@ makedepends="
|
|||
cargo
|
||||
cargo-auditable
|
||||
cbindgen
|
||||
clang-dev
|
||||
clang$_llvmver-dev
|
||||
cmake
|
||||
crc32c-dev
|
||||
dav1d-dev
|
||||
|
@ -42,8 +44,9 @@ makedepends="
|
|||
libsecret-dev
|
||||
libvpx-dev
|
||||
libwebp-dev
|
||||
lld
|
||||
llvm-dev
|
||||
libxml2-dev
|
||||
lld$_llvmver
|
||||
llvm$_llvmver-dev
|
||||
mesa-dev
|
||||
nodejs
|
||||
npm
|
||||
|
@ -62,25 +65,17 @@ makedepends="
|
|||
"
|
||||
options="net !check"
|
||||
|
||||
# follow signal-desktop package.json -> @signalapp/libsignal-client
|
||||
_libsignalver=0.46.2
|
||||
|
||||
# follow signal-desktop package.json -> @signalapp/ringrtc
|
||||
_ringrtcver=2.42.0
|
||||
|
||||
# follow ringrtc (on version above) -> config/version.properties -> webrtc.version
|
||||
# downloading tarball generated with abuild snapshot (with gclient dependencies fetched)
|
||||
_webrtcver=6261i
|
||||
|
||||
# follow @signalapp/better-sqlite3 (on version in package.json) -> deps/download.js -> TOKENIZER_VERSION
|
||||
# last bsqlite version: 8.7.1
|
||||
# use _check_depends to validate this
|
||||
_libsignalver=0.58.0
|
||||
_ringrtcver=2.48.3
|
||||
_webrtcver=6613c
|
||||
_stokenizerver=0.2.1
|
||||
|
||||
source="
|
||||
https://github.com/signalapp/Signal-Desktop/archive/refs/tags/v$pkgver/Signal-Desktop-$pkgver.tar.gz
|
||||
https://github.com/signalapp/libsignal/archive/refs/tags/v$_libsignalver/libsignal-$_libsignalver.tar.gz
|
||||
https://github.com/signalapp/ringrtc/archive/refs/tags/v$_ringrtcver/ringrtc-$_ringrtcver.tar.gz
|
||||
https://ab-sn.lnl.gay/webrtc-$_webrtcver.tar.zst
|
||||
https://ayakael.net/api/packages/mirrors/generic/webrtc/$_webrtcver/webrtc-$_webrtcver.tar.zst
|
||||
https://github.com/signalapp/Signal-FTS5-Extension/archive/refs/tags/v$_stokenizerver/stokenizer-$_stokenizerver.tar.gz
|
||||
|
||||
bettersqlite-use-system-sqlcipher.patch
|
||||
|
@ -88,9 +83,8 @@ source="
|
|||
signal-disable-updates.patch
|
||||
signal-update-links.patch
|
||||
signal-show-window-please.patch
|
||||
signal-fix-dns-fallback.patch
|
||||
ringrtc-webrtc-renamed.patch
|
||||
webrtc-shared-like-my-wife.patch
|
||||
webrtc-shared-libs.patch
|
||||
webrtc-compiler.patch
|
||||
webrtc-gcc13.patch
|
||||
|
||||
|
@ -118,6 +112,25 @@ export CARGO_PROFILE_RELEASE_STRIP="symbols"
|
|||
|
||||
export YARN_CACHE_FOLDER="$srcdir/.yarn"
|
||||
|
||||
_check_depends() {
|
||||
# _libsignalver: follow signal-desktop package.json -> @signalapp/libsignal-client
|
||||
# _ringrtcver: follow signal-desktop package.json -> @signalapp/ringrtc
|
||||
# _webrtcver: follow ringrtc (on version above) -> config/version.properties -> webrtc.version
|
||||
# downloading tarball generated with abuild snapshot (with gclient dependencies fetched)
|
||||
# _stokenizerver: follow @signalapp/better-sqlite3 (on version in package.json) -> deps/download.js -> TOKENIZER_VERSION
|
||||
|
||||
local _libsignalver=$(curl --silent https://raw.githubusercontent.com/signalapp/Signal-Desktop/v$pkgver/package-lock.json | grep "@signalapp/libsignal-client\": \"" | awk '{print $2}' | tr -d ',' | tr -d '"' | head -n 1)
|
||||
local _ringrtcver=$(curl --silent https://raw.githubusercontent.com/signalapp/Signal-Desktop/v$pkgver/package-lock.json | grep "@signalapp/ringrtc\": \"" | awk '{print $2}' | tr -d ',' | tr -d '"' | head -n 1)
|
||||
local _bsqlitever=$(curl --silent https://raw.githubusercontent.com/signalapp/Signal-Desktop/v$pkgver/package-lock.json | grep "@signalapp/better-sqlite3\": \"" | awk '{print $2}' | tr -d ',' | tr -d '"' | head -n 1)
|
||||
local _webrtcver=$(curl --silent https://raw.githubusercontent.com/signalapp/ringrtc/v$_ringrtcver/config/version.properties | awk -F '=' '{if($1 == "webrtc.version"){print $2}}' | head -n 1)
|
||||
local _stokenizerver=$(curl --silent https://raw.githubusercontent.com/signalapp/better-sqlite3/v$_bsqlitever/deps/download.js | grep "const TOKENIZER_VERSION" | awk '{print $4}' | tr -d "'" | tr -d ';' | head -n 1)
|
||||
|
||||
echo _libsignalver=$_libsignalver
|
||||
echo _ringrtcver=$_ringrtcver
|
||||
echo _webrtcver=$_webrtcver
|
||||
echo _stokenizerver=$_stokenizerver
|
||||
}
|
||||
|
||||
# webrtc only, the other dependencies are fine with tarballs
|
||||
_distbucket="sakamoto/lnl-aports-snapshots/"
|
||||
snapshot() {
|
||||
|
@ -195,8 +208,7 @@ prepare() {
|
|||
done
|
||||
|
||||
msg "Installing signal-desktop JS dependencies"
|
||||
echo 'ignore-engines true' > .yarnrc
|
||||
yarn --ignore-scripts --frozen-lockfile
|
||||
npm ci --ignore-scripts
|
||||
|
||||
(
|
||||
cd "$srcdir"/webrtc-$_webrtcver
|
||||
|
@ -239,6 +251,7 @@ prepare() {
|
|||
\! -path "*third_party/$_lib/google/*" \
|
||||
\! -path './base/third_party/icu/*' \
|
||||
\! -path './third_party/libxml/*' \
|
||||
\! -path './third_party/re2/*' \
|
||||
\! -path './third_party/pdfium/third_party/freetype/include/pstables.h' \
|
||||
\! -path './third_party/harfbuzz-ng/utils/hb_scoped.h' \
|
||||
\! -path './third_party/crashpad/crashpad/third_party/zlib/zlib_crashpad.h' \
|
||||
|
@ -283,7 +296,7 @@ prepare() {
|
|||
cd "$srcdir"/ringrtc-$_ringrtcver/src/node
|
||||
|
||||
msg "Installing ringrtc js dependencies"
|
||||
yarn --frozen-lockfile --ignore-scripts
|
||||
npm ci --ignore-scripts
|
||||
)
|
||||
|
||||
(
|
||||
|
@ -359,10 +372,10 @@ build() {
|
|||
(
|
||||
cd "$srcdir"/ringrtc-$_ringrtcver/src/node
|
||||
msg "Building ringrtc JS glue code"
|
||||
yarn build
|
||||
npm run build
|
||||
|
||||
msg "Cleaning dev dependencies for ringrtc"
|
||||
yarn --ignore-scripts --frozen-lockfile --production
|
||||
npm prune --ignore-scripts --omit=dev
|
||||
)
|
||||
|
||||
# module on npm intentionally unbuildable: https://github.com/signalapp/libsignal/issues/464#issuecomment-1160665052
|
||||
|
@ -370,17 +383,17 @@ build() {
|
|||
cd "$srcdir"/libsignal-$_libsignalver/node
|
||||
|
||||
msg "Building libsignal"
|
||||
yarn node-gyp configure --nodedir=/usr/include/electron/node_headers --build-from-source
|
||||
yarn node-gyp build --nodedir=/usr/include/electron/node_headers --build-from-source
|
||||
node-gyp configure --nodedir=/usr/include/electron/node_headers --build-from-source
|
||||
node-gyp build --nodedir=/usr/include/electron/node_headers --build-from-source
|
||||
|
||||
mkdir -p prebuilds/linux-$chromium_arch
|
||||
mv build/Release/libsignal_client_linux_$chromium_arch.node prebuilds/linux-$chromium_arch/node.napi.node
|
||||
|
||||
msg "Building libsignal glue code"
|
||||
yarn tsc
|
||||
npm run tsc
|
||||
|
||||
msg "Cleaning dev dependencies for libsignal"
|
||||
yarn --ignore-scripts --frozen-lockfile --production
|
||||
npm prune -ignore-scripts --omit=dev
|
||||
)
|
||||
|
||||
(
|
||||
|
@ -392,8 +405,8 @@ build() {
|
|||
)
|
||||
|
||||
# from package.json postinstall
|
||||
yarn build:acknowledgments
|
||||
yarn patch-package
|
||||
npm run build:acknowledgments
|
||||
npm exec patch-package
|
||||
rm -rf node_modules/dtrace-provider
|
||||
|
||||
# get esbuild installed (needed for next step)
|
||||
|
@ -403,20 +416,10 @@ build() {
|
|||
NODE_ENV=production \
|
||||
SIGNAL_ENV=production \
|
||||
NODE_OPTIONS=--openssl-legacy-provider \
|
||||
yarn build:dev
|
||||
npm run build:dev
|
||||
|
||||
# purge non-production deps
|
||||
yarn install --ignore-scripts --frozen-lockfile --production
|
||||
|
||||
# XXX: the previous step undoes the patches. and removes the patch applier.
|
||||
# please force me to just implement packaging without dev modules in tasje. -lnl
|
||||
for x in patches/*.patch; do
|
||||
# some of these patches are made for devDependencies
|
||||
if [ -d "$(grep -Eo 'node_modules/(@[a-z\d_-]+/)?[a-z\d_-]+/' "$x" | head -n1)" ]; then
|
||||
msg "$x"
|
||||
patch -Np1 -i ./"$x"
|
||||
fi
|
||||
done
|
||||
npm prune --ignore-scripts --omit=dev
|
||||
|
||||
# use our libsignal
|
||||
rm -rf node_modules/@signalapp/libsignal-client/
|
||||
|
@ -451,7 +454,7 @@ build() {
|
|||
|
||||
check() {
|
||||
# tests run against downloaded build of electron for glibc, probably can be patched
|
||||
yarn test
|
||||
npm run test
|
||||
}
|
||||
|
||||
package() {
|
||||
|
@ -472,19 +475,18 @@ package() {
|
|||
}
|
||||
|
||||
sha512sums="
|
||||
cebb1c8412089fe6f5faa9d4bfcb8bb4e8c9d2f3e4a13eef15e8f36d97b4bc65eae3c0865af0a7c82a0af2fd0597482b3d7c1f25e7d51465ea2589c817183b19 Signal-Desktop-7.11.0.tar.gz
|
||||
6be40fcfbcb9bd20c51dd9ef1c65e7f586fbbee04af66af89a5b8c0ce3fa2ce5efd586e10de1d6d5c579126ed4bb2f31e50a8448ed5390d12e226cd075537007 libsignal-0.46.2.tar.gz
|
||||
5cb7e88e8c04244a8f4727237dd0662357eb84dfb384de57c6579f01f0c53944d019a2af29efe37c4d30993fdba4be6f9bd9f7975ac24e43207fe814e0b95f95 ringrtc-2.42.0.tar.gz
|
||||
89796d611bd7cda7c0e98318826753b1acc373396d77f2a0a826bf95e9e28d2c0f33181705b50b1afc52fdf12dbf3d35e30ad86b0ce3052ed9131ea20c842d04 webrtc-6261i.tar.zst
|
||||
b97155dc2ca70436d6fdf15fff059f905f065738a288679aeee2199d43824206f4c7e4bae0c228b55b4cc76b7e00875b738ee4f7dea3c2a5414acec3e208aa1e Signal-Desktop-7.29.0.tar.gz
|
||||
6fb62213d8177ac5abe83ea71a18ea4b1c7b323983c41087166658fe9c47c1fd39e5323ca6acefe3db2a9a9376b6f385b5f2c006154da3ab705741d848b28943 libsignal-0.58.0.tar.gz
|
||||
6777354b60650c6c3d359714f3aff92a315996f3725ba05c74ed054d3c4ba5506406b30c940853b5ba426ac0271cdb4dd930a759c570f486a70e1f5adc5a2aae ringrtc-2.48.3.tar.gz
|
||||
fe04fcf13f55b124f03ce9d516b1c53fc4f20c6a016819c62eeaa0500eda92c5a0c0d7dc5d1e360a27691dfd404c254e91bed9fb25d0fc40a27795c1b674a82e webrtc-6613c.tar.zst
|
||||
84a1f2fc29262a12842e94698d124a85b823128e72a493b0be8ea92fbb72c5c268499f4a6827cdedaae06ec73cce4039a39fe5c5d536cbef330e59ba0183da28 stokenizer-0.2.1.tar.gz
|
||||
be5b4e823543b79175a12314f10c6326d9f0d59f470136962daed4665887006acc05b48b40dc1b67747396d8f6f7d23be298c1e110ccdd35ff9b09d5e6b80bab bettersqlite-use-system-sqlcipher.patch
|
||||
92de6fc7cc5f2b6d65bedbd74cc733dd86dafc9cbfb9b727c3267aef63a71a07247cde9b163c68fddfeb9096dcd7f554d36d0b2de078d8905e3825645ddbd6eb libsignal-auditable.patch
|
||||
2e5fadff725f1d62e7134c8929c672ec88cae602b065480f1b799d34160daa0cb1ad0f5511e60676f81464ae8752c3bec7b3d7bc5a432533be004b4d20ac32c2 libsignal-auditable.patch
|
||||
152435231cdcf52a17a9e24aadf95d77511258e818172941ba074a73a90a541f0136feb58868674f2bcb19191a6d12933fe6cd5baf3ee99e508915c72523163b signal-disable-updates.patch
|
||||
d50eb5724502df9ea4d795db8cfc27af767c25168d7db2af512e615be7cc2ca290210a9ae78e1abb153c0198677e858ad3d74926c958099d0319295e7d9e7f1d signal-update-links.patch
|
||||
646d303fe58cae3f0896ae0275a66695b902fae6ddde7c568cc9798157dee9f45ceff907bc951fadc4c511d512a73d114b4e4f7c8914e2311c63929d29e1621a signal-show-window-please.patch
|
||||
3df878d259cdc12fe116651e9978deb6c15b5bce477d692b2301f17bc660327b29ac4412cfd6966bd0cef15c90675c56ce7c3abd8e2119899cc5d281ab1d9474 signal-fix-dns-fallback.patch
|
||||
bfc8acdd13aa48d29c7657311733cc9d33c4899782efbd1ef6d25ad1698be4de7cc67e829324bc0309715d69ae37ea9f782cf54887317e817213e110d73d68e7 signal-show-window-please.patch
|
||||
b11fdd930943ca327650e4738ed85cd6b5eea779455a5895bccebba98e449bafc6b0f09bcf4545f2b2e16644355664e9768dd6d4d62f87619207c430367f72c5 ringrtc-webrtc-renamed.patch
|
||||
9d92389637cdda83a0a7039fa6c52516d7bc491d0b1e42d5374b9d1f4fa7b9c930642f2dca896da17a2dc3344fa1bb97434c8dddd0539a4fedfd0dec809fc875 webrtc-shared-like-my-wife.patch
|
||||
0888673ba687747beda61cd50efbc25095f4a3d26f1dd58bf003e3a0bf1d302c3f2ebd1deecf630fbf04aedb7b8cd409e9efda4d1e6fda63234c9a9b9755bff4 webrtc-shared-libs.patch
|
||||
e07ae8544988d402aaf0fbd95ea36a64c94c59566c561132578aa6dcf8ff11a34058530e64dc204e5cadc2482f1401e74b32384a144e5e08017c663d0cf7c2fc webrtc-compiler.patch
|
||||
88515d8b8cc82355c9f9b0f44fac83b7ff149b13e9fb102fd46036ec5234cfb2385fa5ad58a0520ee604b93dc4ddd6ae18a7005978ef207841645724ef7a9749 webrtc-gcc13.patch
|
||||
87534e7b5ad7365509eab75629e6bd1a9ed61ee92f7e358405a0abaf0df57de14623fb3894eb082f8785422e5c087e1c50f9e2e5cafbb2529591fd7bf447f7f5 signal-desktop
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
--- ./node/build_node_bridge.py.orig
|
||||
+++ ./node/build_node_bridge.py
|
||||
@@ -63,7 +63,7 @@
|
||||
diff --git a/node/build_node_bridge.py.orig b/node/build_node_bridge.py
|
||||
index e75c2d0..3bdb328 100755
|
||||
--- a/node/build_node_bridge.py.orig
|
||||
+++ b/node/build_node_bridge.py
|
||||
@@ -97,7 +97,7 @@ def main(args: Optional[List[str]] = None) -> int:
|
||||
if 'npm_config_libsignal_debug_level_logs' not in os.environ:
|
||||
features.append('log/release_max_level_info')
|
||||
|
||||
out_dir = options.out_dir.strip('"') or os.path.join('build', configuration_name)
|
||||
|
||||
- cmdline = ['cargo', 'build', '--target', cargo_target, '-p', 'libsignal-node', '--features', 'testing-fns']
|
||||
+ cmdline = ['cargo', 'auditable', 'build', '--target', cargo_target, '-p', 'libsignal-node', '--features', 'testing-fns']
|
||||
- cmdline = ['cargo', 'build', '--target', cargo_target, '-p', 'libsignal-node', '--features', ','.join(features)]
|
||||
+ cmdline = ['cargo', 'auditable', 'build', '--target', cargo_target, '-p', 'libsignal-node', '--features', ','.join(features)]
|
||||
if configuration_name == 'Release':
|
||||
cmdline.append('--release')
|
||||
print("Running '%s'" % (' '.join(cmdline)))
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
diff --git a/ts/scripts/generate-dns-fallback.ts.orig b/ts/scripts/generate-dns-fallback.ts
|
||||
index dec7023..39f442f 100644
|
||||
--- a/ts/scripts/generate-dns-fallback.ts.orig
|
||||
+++ b/ts/scripts/generate-dns-fallback.ts
|
||||
@@ -20,7 +20,6 @@ const FALLBACK_DOMAINS = [
|
||||
'cdn3.signal.org',
|
||||
'updates2.signal.org',
|
||||
'sfu.voip.signal.org',
|
||||
- 'create.signal.art',
|
||||
];
|
||||
|
||||
async function main() {
|
|
@ -1,11 +1,13 @@
|
|||
--- ./app/main.ts.orig
|
||||
+++ ./app/main.ts
|
||||
@@ -721,7 +721,7 @@
|
||||
const titleBarOverlay = await getTitleBarOverlay();
|
||||
diff --git a/app/main.ts.orig b/app/main.ts
|
||||
index aa1bec8..bd7c1d5 100644
|
||||
--- a/app/main.ts.orig
|
||||
+++ b/app/main.ts
|
||||
@@ -690,7 +690,7 @@ async function createWindow() {
|
||||
: DEFAULT_HEIGHT;
|
||||
|
||||
const windowOptions: Electron.BrowserWindowConstructorOptions = {
|
||||
- show: false,
|
||||
+ show: true,
|
||||
width: DEFAULT_WIDTH,
|
||||
height: DEFAULT_HEIGHT,
|
||||
width,
|
||||
height,
|
||||
minWidth: MIN_WIDTH,
|
||||
|
|
64
backports/signal-desktop/webrtc-shared-libs.patch
Normal file
64
backports/signal-desktop/webrtc-shared-libs.patch
Normal file
|
@ -0,0 +1,64 @@
|
|||
--- ./BUILD.gn.orig
|
||||
+++ ./BUILD.gn
|
||||
@@ -38,7 +38,7 @@
|
||||
# 'ninja default' and then 'ninja all', the second build should do no work.
|
||||
group("default") {
|
||||
testonly = true
|
||||
- deps = [ ":webrtc" ]
|
||||
+ deps = [ ":signaldeswebrtc" ]
|
||||
if (rtc_build_examples) {
|
||||
deps += [ "examples" ]
|
||||
}
|
||||
@@ -464,7 +464,7 @@
|
||||
|
||||
if (!build_with_chromium) {
|
||||
# Target to build all the WebRTC production code.
|
||||
- rtc_static_library("webrtc") {
|
||||
+ rtc_shared_library("signaldeswebrtc") {
|
||||
# Only the root target and the test should depend on this.
|
||||
visibility = [
|
||||
"//:default",
|
||||
@@ -472,7 +472,6 @@
|
||||
]
|
||||
|
||||
sources = []
|
||||
- complete_static_lib = true
|
||||
suppressed_configs += [ "//build/config/compiler:thin_archive" ]
|
||||
defines = []
|
||||
|
||||
diff --git a/third_party/googletest/BUILD.gn.orig b/third_party/googletest/BUILD.gn
|
||||
index 14089f0..b7dc621 100644
|
||||
--- a/third_party/googletest/BUILD.gn.orig
|
||||
+++ b/third_party/googletest/BUILD.gn
|
||||
@@ -48,7 +48,6 @@ config("gtest_config") {
|
||||
|
||||
configs = [
|
||||
"//third_party/abseil-cpp:absl_include_config",
|
||||
- "//third_party/re2:re2_config",
|
||||
]
|
||||
}
|
||||
|
||||
diff --git a/third_party/googletest/BUILD.gn.orig b/third_party/googletest/BUILD.gn
|
||||
index b7dc621..367f929 100644
|
||||
--- a/third_party/googletest/BUILD.gn.orig
|
||||
+++ b/third_party/googletest/BUILD.gn
|
||||
@@ -133,7 +133,6 @@ source_set("gtest") {
|
||||
|
||||
# googletest only needs `absl`, but this makes gn check happier.
|
||||
deps = [ "//third_party/abseil-cpp:absl_full" ]
|
||||
- public_deps = [ "//third_party/re2" ]
|
||||
if (is_nacl || !build_with_chromium) {
|
||||
defines += [ "GTEST_DISABLE_PRINT_STACK_TRACE" ]
|
||||
sources -= [
|
||||
diff --git a/third_party/fuzztest/BUILD.gn.orig b/third_party/fuzztest/BUILD.gn
|
||||
index 57ee790..ba1d297 100644
|
||||
--- a/third_party/fuzztest/BUILD.gn.orig
|
||||
+++ b/third_party/fuzztest/BUILD.gn
|
||||
@@ -309,7 +309,6 @@ source_set("fuzztest_internal") {
|
||||
# For RE2 mutators. It's questionable whether we want to pull this library
|
||||
# into every fuzztest target, but this is the approach used in other
|
||||
# fuzztest contexts so we'll do the same
|
||||
- "//third_party/re2",
|
||||
|
||||
# For protobuf mutators
|
||||
"$protobuf_target_prefix:protobuf_lite",
|
|
@ -1,28 +0,0 @@
|
|||
--- ./BUILD.gn.orig
|
||||
+++ ./BUILD.gn
|
||||
@@ -38,7 +38,7 @@
|
||||
# 'ninja default' and then 'ninja all', the second build should do no work.
|
||||
group("default") {
|
||||
testonly = true
|
||||
- deps = [ ":webrtc" ]
|
||||
+ deps = [ ":signaldeswebrtc" ]
|
||||
if (rtc_build_examples) {
|
||||
deps += [ "examples" ]
|
||||
}
|
||||
@@ -464,7 +464,7 @@
|
||||
|
||||
if (!build_with_chromium) {
|
||||
# Target to build all the WebRTC production code.
|
||||
- rtc_static_library("webrtc") {
|
||||
+ rtc_shared_library("signaldeswebrtc") {
|
||||
# Only the root target and the test should depend on this.
|
||||
visibility = [
|
||||
"//:default",
|
||||
@@ -472,7 +472,6 @@
|
||||
]
|
||||
|
||||
sources = []
|
||||
- complete_static_lib = true
|
||||
suppressed_configs += [ "//build/config/compiler:thin_archive" ]
|
||||
defines = []
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
#!/usr/bin/electron
|
||||
|
||||
const name = 'caprine';
|
||||
|
||||
const {app} = require('electron');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
// Change command name.
|
||||
const fd = fs.openSync('/proc/self/comm', fs.constants.O_WRONLY);
|
||||
fs.writeSync(fd, name);
|
||||
fs.closeSync(fd);
|
||||
|
||||
// Remove first command line argument (/usr/bin/electron).
|
||||
process.argv.splice(0, 1);
|
||||
|
||||
// Set application paths.
|
||||
const appPath = path.join(path.dirname(__dirname), 'lib', name);
|
||||
const packageJson = require(path.join(appPath, 'package.json'));
|
||||
const productName = packageJson.productName;
|
||||
app.setAppPath(appPath);
|
||||
app.setDesktopName(name + '.desktop');
|
||||
app.setName(productName);
|
||||
app.setPath('userCache', path.join(app.getPath('cache'), productName));
|
||||
app.setPath('userData', path.join(app.getPath('appData'), productName));
|
||||
app.setVersion(packageJson.version);
|
||||
|
||||
// Run the application.
|
||||
require('module')._load(appPath, module, true);
|
|
@ -1,112 +0,0 @@
|
|||
# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
|
||||
# Contributor: 6543 <6543@obermui.de>
|
||||
# Contributor: techknowlogick <techknowlogick@gitea.io>
|
||||
# Contributor: Patrycja Rosa <alpine@ptrcnull.me>
|
||||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
pkgname=forgejo-aneksajo
|
||||
pkgver=8.0.1
|
||||
_gittag=v$pkgver-git-annex0
|
||||
pkgrel=0
|
||||
pkgdesc="Self-hosted Git service written in Go with git-annex support"
|
||||
url="https://forgejo.org"
|
||||
# riscv64: builds fail https://codeberg.org/forgejo/forgejo/issues/3025
|
||||
arch="all !riscv64"
|
||||
license="MIT"
|
||||
depends="git git-lfs gnupg"
|
||||
makedepends="go nodejs npm"
|
||||
checkdepends="bash openssh openssh-keygen sqlite tzdata"
|
||||
install="$pkgname.pre-install"
|
||||
pkgusers="forgejo"
|
||||
pkggroups="www-data"
|
||||
subpackages="$pkgname-openrc"
|
||||
source="$pkgname-$_gittag.tar.gz::https://codeberg.org/matrss/forgejo-aneksajo/archive/$_gittag.tar.gz
|
||||
$pkgname.initd
|
||||
$pkgname.ini
|
||||
"
|
||||
builddir="$srcdir/forgejo-aneksajo"
|
||||
options="!check net chmod-clean" # broken with GIT_CEILING
|
||||
|
||||
# secfixes:
|
||||
# 7.0.4-r0:
|
||||
# - CVE-2024-24789
|
||||
# 7.0.3-r0:
|
||||
# - CVE-2024-24788
|
||||
# 1.21.10.0-r0:
|
||||
# - CVE-2023-45288
|
||||
# 1.21.3.0-r0:
|
||||
# - CVE-2023-48795
|
||||
|
||||
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
|
||||
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
|
||||
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"
|
||||
|
||||
# Skip tests for archs that fail unrelated in CI
|
||||
case "$CARCH" in
|
||||
s390x|x86|armhf|armv7) options="$options !check" ;;
|
||||
esac
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
|
||||
npm ci
|
||||
}
|
||||
|
||||
build() {
|
||||
# XXX: LARGEFILE64
|
||||
export CGO_CFLAGS="$CFLAGS -O2 -D_LARGEFILE64_SOURCE"
|
||||
export TAGS="bindata sqlite sqlite_unlock_notify"
|
||||
export GITEA_VERSION="$pkgver"
|
||||
export EXTRA_GOFLAGS="$GOFLAGS"
|
||||
export CGO_LDFLAGS="$LDFLAGS"
|
||||
unset LDFLAGS
|
||||
## make FHS compliant
|
||||
local setting="code.gitea.io/gitea/modules/setting"
|
||||
export LDFLAGS="$LDFLAGS -X $setting.CustomConf=/etc/forgejo/app.ini"
|
||||
export LDFLAGS="$LDFLAGS -X $setting.AppWorkPath=/var/lib/forgejo/"
|
||||
|
||||
make -j1 build
|
||||
}
|
||||
|
||||
check() {
|
||||
local home="$srcdir"/home
|
||||
mkdir -p "$home"
|
||||
install -d -m700 "$home"/.ssh
|
||||
touch "$home"/.gitconfig
|
||||
|
||||
env GITEA_ROOT="$home" HOME="$home" GITEA_WORK_DIR="$(pwd)" timeout -s ABRT 20m make -j1 test-sqlite
|
||||
## "make test" - modified (exclude broken tests)
|
||||
## 'code.gitea.io/gitea/modules/migrations': github hase rate limits! 403 API
|
||||
local tests=$(go list ./... | grep -v /vendor/ |
|
||||
grep -v 'code.gitea.io/gitea/modules/migrations' |
|
||||
grep -v 'code.gitea.io/gitea/modules/charset' |
|
||||
grep -v 'code.gitea.io/gitea/models/migrations' |
|
||||
grep -v 'code.gitea.io/gitea/services/migrations' |
|
||||
grep -v 'code.gitea.io/gitea/integrations')
|
||||
env GITEA_CONF="$PWD/tests/sqlite.ini" GITEA_ROOT="$home" HOME="$home" GO111MODULE=on go test -mod=vendor -tags='sqlite sqlite_unlock_notify' $tests
|
||||
|
||||
}
|
||||
|
||||
package() {
|
||||
for dir in $pkgname $pkgname/git $pkgname/data $pkgname/db $pkgname/custom; do
|
||||
install -dm750 -o forgejo -g www-data \
|
||||
"$pkgdir"/var/lib/$dir
|
||||
done
|
||||
|
||||
install -dm755 -o forgejo -g www-data "$pkgdir"/var/log/forgejo
|
||||
|
||||
# TODO: rename when upstream does
|
||||
install -Dm755 -g www-data gitea "$pkgdir"/usr/bin/forgejo
|
||||
|
||||
install -Dm644 -o forgejo -g www-data "$srcdir"/forgejo-aneksajo.ini \
|
||||
"$pkgdir"/etc/forgejo/app.ini
|
||||
chown forgejo:www-data "$pkgdir"/etc/forgejo
|
||||
|
||||
install -Dm755 "$srcdir"/forgejo-aneksajo.initd \
|
||||
"$pkgdir"/etc/init.d/forgejo
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
d8e273d369c934eec7ff84795cd0d896cda53bc1a2d17f610dd8476ff92dc50c4a24c4598366ef8aac3be52ddef6630489043183085334376c30bc5d4d5f15c2 forgejo-aneksajo-v8.0.1-git-annex0.tar.gz
|
||||
eb93a9f6c8f204de5c813f58727015f53f9feaab546589e016c60743131559f04fc1518f487b6d2a0e7fa8fab6d4a67cd0cd9713a7ccd9dec767a8c1ddebe129 forgejo-aneksajo.initd
|
||||
b537b41b6b3a945274a6028800f39787b48c318425a37cf5d40ace0d1b305444fd07f17b4acafcd31a629bedd7d008b0bb3e30f82ffeb3d7e7e947bdbe0ff4f3 forgejo-aneksajo.ini
|
||||
"
|
|
@ -1,26 +0,0 @@
|
|||
# Configuration cheat sheet: https://forgejo.org/docs/latest/admin/config-cheat-sheet/
|
||||
|
||||
RUN_USER = forgejo
|
||||
RUN_MODE = prod
|
||||
|
||||
[repository]
|
||||
ROOT = /var/lib/forgejo/git
|
||||
SCRIPT_TYPE = sh
|
||||
|
||||
[server]
|
||||
STATIC_ROOT_PATH = /usr/share/webapps/forgejo
|
||||
APP_DATA_PATH = /var/lib/forgejo/data
|
||||
LFS_START_SERVER = true
|
||||
|
||||
[database]
|
||||
DB_TYPE = sqlite3
|
||||
PATH = /var/lib/forgejo/db/forgejo.db
|
||||
SSL_MODE = disable
|
||||
|
||||
[session]
|
||||
PROVIDER = file
|
||||
|
||||
[log]
|
||||
ROOT_PATH = /var/log/forgejo
|
||||
MODE = file
|
||||
LEVEL = Info
|
|
@ -1,15 +0,0 @@
|
|||
#!/sbin/openrc-run
|
||||
|
||||
supervisor=supervise-daemon
|
||||
name=forgejo
|
||||
command="/usr/bin/forgejo"
|
||||
command_user="${FORGEJO_USER:-forgejo}:www-data"
|
||||
command_args="web --config '${FORGEJO_CONF:-/etc/forgejo/app.ini}'"
|
||||
supervise_daemon_args="--env FORGEJO_WORK_DIR='${FORGEJO_WORK_DIR:-/var/lib/forgejo}' --chdir '${FORGEJO_WORK_DIR:-/var/lib/forgejo}' --stdout '${FORGEJO_LOG_FILE:-/var/log/forgejo/http.log}' --stderr '${FORGEJO_LOG_FILE:-/var/log/forgejo/http.log}'"
|
||||
pidfile="/run/forgejo.pid"
|
||||
|
||||
depend() {
|
||||
use logger dns
|
||||
need net
|
||||
after firewall mysql postgresql
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
addgroup -S -g 82 www-data 2>/dev/null
|
||||
adduser -S -D -h /var/lib/forgejo -s /bin/sh -G www-data -g forgejo forgejo 2>/dev/null \
|
||||
&& passwd -u forgejo 2>/dev/null
|
||||
|
||||
exit 0
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
pkgname=mathjax2
|
||||
pkgver=2.7.9
|
||||
pkgrel=0
|
||||
pkgrel=1
|
||||
pkgdesc="An open source JavaScript display engine for mathematics that works in all modern browsers"
|
||||
url="https://www.mathjax.org/"
|
||||
arch=noarch
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
pkgname=rmfakecloud
|
||||
pkgver=0.0.17
|
||||
pkgver=0.0.19
|
||||
_gittag=v$pkgver
|
||||
pkgrel=0
|
||||
pkgdesc="A selfhosted cloud for the Remarkable Tablet"
|
||||
|
@ -10,7 +10,7 @@ url="https://github.com/ddvk/rmfakecloud"
|
|||
arch="all"
|
||||
license="AGPL-3.0-only"
|
||||
makedepends="go yarn"
|
||||
options="chmod-clean"
|
||||
options="chmod-clean net"
|
||||
source="
|
||||
$pkgname-$pkgver.tar.gz::https://github.com/ddvk/rmfakecloud/archive/v$pkgver.tar.gz
|
||||
rmfakecloud.conf
|
||||
|
@ -18,20 +18,6 @@ source="
|
|||
"
|
||||
subpackages="$pkgname-openrc"
|
||||
|
||||
case "$CTARGET_ARCH" in
|
||||
aarch64)export GOARCH="arm64" ;;
|
||||
armel) export GOARCH="arm" GOARM=5 ;;
|
||||
armhf) export GOARCH="arm" GOARM=6 ;;
|
||||
armv7) export GOARCH="arm" GOARM=7 ;;
|
||||
s390x) export GOARCH="s390x" ;;
|
||||
x86) export GOARCH="386" ;;
|
||||
x86_64) export GOARCH="amd64" ;;
|
||||
ppc64) export GOARCH="ppc64" ;;
|
||||
ppc64le) export GOARCH="ppc64le" ;;
|
||||
riscv64) export GOARCH="riscv64" ;;
|
||||
*) export GOARCH="unsupported";;
|
||||
esac
|
||||
|
||||
build() {
|
||||
export GOPATH="$srcdir/go"
|
||||
export LDFLAGS="$LDFLAGS -X main.version=$pkgver"
|
||||
|
@ -51,7 +37,7 @@ package() {
|
|||
install -Dm755 "$srcdir"/rmfakecloud.openrc "$pkgdir"/etc/init.d/rmfakecloud
|
||||
}
|
||||
sha512sums="
|
||||
2836364ba7a0c70b33f5914e357a87fb681275268a1cd5e1b6eba91037017c57f6a24b1bcecf9daa423c2588128ce591c2066d8af1d89eedccca231d24671748 rmfakecloud-0.0.17.tar.gz
|
||||
55948ede5f8a4cc9e74c9c68f83d14dec4950f23da5ef053f3ae708edf2643f64e5736abfe63cbf6700e5277adff7167ce0f228a8241169261f4ce59e2815a35 rmfakecloud-0.0.19.tar.gz
|
||||
d5677cef282085cd6642a034dd258ffa294862aeb0ce81d6485a524a15564849bc4eb90a9d1fa4dbcf4eab69dcd893302aa06493fc8fad74d69200c2bdf246c0 rmfakecloud.conf
|
||||
891d0945886796132f951293e081046334857563b4ebae28a3aa5b6bc37768767c49ce102de645ed8340af2518de606be8bf6ecafeb6d189dd937970aa3e6498 rmfakecloud.openrc
|
||||
"
|
||||
|
|
|
@ -7,14 +7,14 @@ _gittag=v2023.03.0+386
|
|||
_panmirrortag=aea3027882718af657d60221818c3ff35f413219
|
||||
pkgrel=0
|
||||
pkgdesc="A powerful and productive integrated development environment (IDE) for R programming language"
|
||||
#arch="x86_64"
|
||||
arch="x86_64"
|
||||
url="https://www.rstudio.com/products/rstudio/"
|
||||
license='AGPL3'
|
||||
options="!check" # No testsuite
|
||||
# missing quarto-cli
|
||||
depends="
|
||||
R>=3.0.1
|
||||
clang14
|
||||
clang15
|
||||
hunspell-en
|
||||
libldap
|
||||
lxqt-config
|
||||
|
@ -23,6 +23,7 @@ depends="
|
|||
sqlite
|
||||
"
|
||||
makedepends="
|
||||
bash
|
||||
apache-ant
|
||||
boost-dev
|
||||
cmake>=3.1.0
|
||||
|
|
|
@ -1,400 +0,0 @@
|
|||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
pkgname=zotero
|
||||
pkgver=7.0.0
|
||||
pkgrel=0
|
||||
_fxver=115.9.1
|
||||
_gittag=$pkgver
|
||||
# Date of release, YY-MM-DD for metainfo file (see package())
|
||||
# https://www.mozilla.org/firefox/organizations/notes/
|
||||
_releasedate=2024-08-09
|
||||
pkgdesc="A free, easy-to-use tool to help you collect, organize, cite, and share your research sources."
|
||||
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
|
||||
# ppc64le: test suite stalls
|
||||
arch="x86_64 armv7 aarch64 x86"
|
||||
license="GPL-3.0-only AND LGPL-2.1-only AND LGPL-3.0-only AND MPL-2.0"
|
||||
depends="
|
||||
ffmpeg-libavcodec
|
||||
"
|
||||
makedepends="
|
||||
alsa-lib-dev
|
||||
automake
|
||||
bash
|
||||
bsd-compat-headers
|
||||
cargo
|
||||
cbindgen
|
||||
clang
|
||||
clang-libclang
|
||||
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
|
||||
npm
|
||||
nspr-dev
|
||||
nss-dev
|
||||
perl
|
||||
pipewire-dev
|
||||
pulseaudio-dev
|
||||
python3
|
||||
rsync
|
||||
sed
|
||||
unzip
|
||||
wasi-sdk
|
||||
wireless-tools-dev
|
||||
xvfb-run
|
||||
zip
|
||||
"
|
||||
source="https://ftp.mozilla.org/pub/firefox/releases/${_fxver}esr/source/firefox-${_fxver}esr.source.tar.xz
|
||||
audio-lfs64.patch
|
||||
disable-moz-stackwalk.patch
|
||||
fix-fortify-system-wrappers.patch
|
||||
fix-rust-target.patch
|
||||
fix-webrtc-glibcisms.patch
|
||||
icu74.patch
|
||||
lfs64.patch
|
||||
llvm18-bindgen.patch
|
||||
llvm18.patch
|
||||
moz-system-jpeg.patch
|
||||
no-ccache-stats.patch
|
||||
nrappkit-qsort.patch
|
||||
ppc-musttail.patch
|
||||
ppc-webrtc.patch
|
||||
python-deps.patch
|
||||
rust-lto-thin.patch
|
||||
rust1.78-packed-to-portable_simd.patch
|
||||
rust1.78-qcms-stdsimd.patch
|
||||
sandbox-fork.patch
|
||||
sandbox-largefile.patch
|
||||
sandbox-sched_setscheduler.patch
|
||||
|
||||
stab.h
|
||||
|
||||
mozilla-location.keys
|
||||
vendor-prefs.js
|
||||
|
||||
zotero.desktop
|
||||
https://lab.ilot.io/mirrors/zotero-client/-/releases/$_gittag/downloads/tarball/zotero-client-$_gittag.tar.gz
|
||||
zotero_build-modifications.patch
|
||||
zotero_test-drop-build.patch
|
||||
zotero_test-fix-chars.patch
|
||||
zotero_test-push-timeout-to-30sec.patch
|
||||
zotero_drop-jazzer.patch
|
||||
"
|
||||
|
||||
builddir="$srcdir"/firefox-$_fxver
|
||||
_zoterodir="$srcdir"/zotero-client-$_gittag
|
||||
_mozappdir=/usr/lib/zotero
|
||||
|
||||
# help our shared-object scanner to find the libs
|
||||
ldpath="$_mozappdir"
|
||||
|
||||
# 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/-fstack-clash-protection/} -g0 -O2"
|
||||
export CXXFLAGS="${CXXFLAGS/-fstack-clash-protection/} -g0 -O2 -Wno-deprecated-builtins -Wno-deprecated-declarations"
|
||||
|
||||
prepare() {
|
||||
# zotero prepare
|
||||
mv "$_zoterodir" "$builddir"/zotero
|
||||
(
|
||||
cd "$builddir"/zotero
|
||||
|
||||
# checks that we're using expected fx version
|
||||
local _exp_fxver=$(grep GECKO_VERSION_LINUX "$builddir"/zotero/app/config.sh | sed 's|.*=||' | tr -d '"' | sed 's|esr||')
|
||||
if [ "$_fxver" != "$_exp_fxver" ]; then
|
||||
msg "Expected firefox version $_exp_fxver, got $_fxver"
|
||||
return 1
|
||||
fi
|
||||
|
||||
# zotero build expects to be in a git repo
|
||||
git init
|
||||
git config user.name info
|
||||
git config user.email info@example.org
|
||||
git commit --allow-empty -m 'Initial'
|
||||
|
||||
npm i --legacy-peer-deps
|
||||
)
|
||||
default_prepare
|
||||
|
||||
rm -rf third_party/rust/packed_simd/
|
||||
cp "$srcdir"/stab.h toolkit/crashreporter/google-breakpad/src/
|
||||
|
||||
_clear_vendor_checksums audio_thread_priority
|
||||
_clear_vendor_checksums bindgen
|
||||
|
||||
base64 -d "$srcdir"/mozilla-location.keys > "$builddir"/mozilla-api-key
|
||||
|
||||
# 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
|
||||
|
||||
# install to where zotero expects it
|
||||
DESTDIR="$builddir"/zotero/app/xulrunner/firefox ./mach install
|
||||
mv "$builddir"/zotero/app/xulrunner/firefox/usr/lib/firefox-esr/* "$builddir"/zotero/app/xulrunner/firefox/.
|
||||
rm -R "$builddir"/zotero/app/xulrunner/firefox/usr
|
||||
|
||||
# zotero build
|
||||
(
|
||||
cd "$builddir"/zotero
|
||||
NODE_OPTIONS=--openssl-legacy-provider npm run build
|
||||
|
||||
SKIP_32=1 app/scripts/dir_build -p l
|
||||
# move to seperate folder as check will rebuild with test files added
|
||||
mv "$builddir"/zotero/app/staging "$builddir"/zotero/app/package
|
||||
)
|
||||
|
||||
rm -R "$builddir"/zotero/app/xulrunner/firefox # clean-up unused firefox install
|
||||
}
|
||||
|
||||
check() {
|
||||
# install to where zotero expects it
|
||||
DESTDIR="$builddir"/zotero/app/xulrunner/firefox ./mach install
|
||||
mv "$builddir"/zotero/app/xulrunner/firefox/usr/lib/firefox-esr/* "$builddir"/zotero/app/xulrunner/firefox/.
|
||||
rm -R "$builddir"/zotero/app/xulrunner/firefox/usr
|
||||
|
||||
# zotero test build
|
||||
(
|
||||
cd "$builddir"/zotero
|
||||
ZOTERO_TEST=1 SKIP_32=1 app/scripts/dir_build -p l
|
||||
|
||||
)
|
||||
|
||||
# test-suite is not very stable, false failure occur from time to time, thus never fails
|
||||
CI=true LD_LIBRARY_PATH="$builddir"/zotero/app/staging/Zotero_linux xvfb-run "$builddir"/zotero/test/runtests.sh -x "$builddir"/zotero/app/staging/Zotero_linux/zotero || true
|
||||
|
||||
rm -R "$builddir"/zotero/app/xulrunner/firefox # clean-up unused firefox install
|
||||
}
|
||||
|
||||
package() {
|
||||
install -dDm755 "$pkgdir"/usr/bin
|
||||
install -dDm755 "$pkgdir"/usr/lib/zotero
|
||||
cp -r "$builddir"/zotero/app/package/Zotero_linux/* "$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/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="
|
||||
9ccaede2fcda13a07f98a2110bb8f99c7324601d66bff311f3070a669576a1598fe1d7de2d005d725d1f44dbe3934a9c0fd0b7950f60686047d4ce8d9d812310 firefox-115.9.1esr.source.tar.xz
|
||||
3e0501ae7a650346c667dfdc0ae0ca286084f22e89ab2ac671cc0d7315673dc5b6dcb9f9882f6f39d26e9a31e57f7a0fd53d6b805e520224e22b8976850e2eb8 audio-lfs64.patch
|
||||
454ea3263cabce099accbdc47aaf83be26a19f8b5a4568c01a7ef0384601cf8315efd86cd917f9c8bf419c2c845db89a905f3ff9a8eb0c8e41042e93aa96a85c disable-moz-stackwalk.patch
|
||||
2f4f15974d52de4bb273b62a332d13620945d284bbc6fe6bd0a1f58ff7388443bc1d3bf9c82cc31a8527aad92b0cd3a1bc41d0af5e1800e0dcbd7033e58ffd71 fix-fortify-system-wrappers.patch
|
||||
cd68b89e29e5f6379fbd5679db27b9a5ef70ea65e51c0d0a8137e1f1fd210e35a8cfb047798e9549bc7275606d7ec5c8d8af1335d29da4699db7acd8bc7ff556 fix-rust-target.patch
|
||||
305c874fdea3096e9c4c6aa6520ac64bb1c347c4b59db8360096646593fe684c3b5377874d91cecd33d56d1410b4714fbdea2b514923723ecbeff79d51265d9b fix-webrtc-glibcisms.patch
|
||||
afabea91b328c5a68eaa20f9099ac7b2d0e7f2423e816b05ed168bdd326a5684fa02de08bf05c6033e9b888f02775d1b0443a00329b7a632ee399122a391c13a icu74.patch
|
||||
5fa9382c692e4bd6a2634308f24a6526fd12a60a2563d2090056d43a60505df3ec9881bbf54562e69394467529b3b0dc45955afca46ed329af03cea074fff070 lfs64.patch
|
||||
d7a9443cd81d3ef4a6baa1b5d05f2497bc07c1de815a4d85b613b734989e7c589019dd860ea2eb9e32067973efbfd1c913790c6c238778da23d76fbd904128d1 llvm18-bindgen.patch
|
||||
8c4de34188f634833d99d17bc389c43ab9576b3f0581387407ae77f636a890779cd02786b632fbdfd8b0305575517d51b04f76b9aa3f1a94c3d822578286fc6f llvm18.patch
|
||||
e28b1fe2967d46c888b41a0a03ee1b6de763124a0281b68aebac04ec3b76cb6fdb56a376d419a003fd87f79e9d086aafd4aaa24efa3345f9857352d3d489356f moz-system-jpeg.patch
|
||||
c0437a6753f3f350968fa12d250efdfe1bea77baf0e4c06b072b5cc9e78c774dbf4506bc536337030d349fb3ba4460097b75b0c7c5b8fb2d39d8b0a392948936 no-ccache-stats.patch
|
||||
b586ddb21b50fa8fba798c3a269518049c38cc52fd91ad00e96a3f1144e6b2879d9df1a182a2fb181898042043ae98381a70d0e4acbf8aa705d2b4f62c17a5a1 nrappkit-qsort.patch
|
||||
2d8dff86212d6d2a904cbb5a5a1d6c17b89adc929fc6a3f4c6cb669f5e83ecddff5a799225319ba445a187b04d111251af75dd3ce8a039164bc14d2a432a2a04 ppc-musttail.patch
|
||||
6f60e83599041db1b707c21784197ea9816b2c936b89a274bfc24554a600981e6f28448fe41fab0942bd31acd49b1c00beb2eb0961149f2ffa6a4154be123ea7 ppc-webrtc.patch
|
||||
4e40b34c5f77a1a21fe971a6fcd8a21b1a63423a3a7932a5a6e1c7a2779f9f06a561c806614a01931679a4b1c6afdfd8ae1f3cc6b673f259ccd368e8e54f6e90 python-deps.patch
|
||||
1c6918dd6655d3a1251bfd4af2e1c561cbb00d540a883b4c1ebf7f5de530d754d9ac07b4b5f56cdab6c511d25c8910ec94043f5733e97501a67abffe1bafaeb1 rust-lto-thin.patch
|
||||
e4795b88e572bb3b6f009dbacc7872b59db2f8facbe2b07f14dd4f45a77c22049783581869f18c6bb3f04d6edb3da59347278321cce2bfa629a4d35e136cda5c rust1.78-packed-to-portable_simd.patch
|
||||
eae1afad93cc5fa7699b156619600ca4b41e67943b8b6e05ab972d449aece93bbf1e68a5ea1a7b1c9278633dbf7cf31503255558e3e06ddf168b3937a0e014e8 rust1.78-qcms-stdsimd.patch
|
||||
2518f2fc75b5db30058e0735f47d60fdf1e7adfaeee4b33fb2afb1bd9a616ce943fd88f4404d0802d4083703f4acf1d5ad42377218d025bc768807fbaf7e1609 sandbox-fork.patch
|
||||
b7d0a6126bdf6c0569f80aabf5b37ed2c7a35712eb8a0404a2d85381552f5555d4f97d213ea26cec6a45dc2785f22439376ed5f8e78b4fd664ef0223307b333e sandbox-largefile.patch
|
||||
f8c3555ef6207933cbffbf4fc101a9b4c0d2990c0063162f0f0bde70ef0b46f86bfac42e7110695183424a87948de593f3927b2d8509ede3e4fc7bd8a1fad1ce sandbox-sched_setscheduler.patch
|
||||
0b3f1e4b9fdc868e4738b5c81fd6c6128ce8885b260affcb9a65ff9d164d7232626ce1291aaea70132b3e3124f5e13fef4d39326b8e7173e362a823722a85127 stab.h
|
||||
382510375b1a2fa79be0ab79e3391a021ae2c022429ffbaa7e7a69166f99bb56d01e59a1b10688592a29238f21c9d6977672bd77f9fae439b66bdfe0c55ddb15 mozilla-location.keys
|
||||
fc45bc3ffb9404e5338ea26a9f04807b40f6f516324972cddd48bedb91b8bd7c6b8d4e03a0209020f5e67b703bc4ff89389985791b9bd544a0fc3951e2dc338e vendor-prefs.js
|
||||
e1a0a4ff5cc1b53f13776ca11927d671426b0691e78e74a4adf2166d57bb2ae8ac409cc11a37ce5e2f680fdf05d5bc3849c33a9717aca1bb62d03ae5231a67fb zotero.desktop
|
||||
4d6146d127153bfe7069e32cc3e4ec4c491d8cc4371034d569427bdf486d1cd39ade8e668cfe7dd0453844f935a4eba60832dd5492a247236fac75ce6928e36a zotero-client-7.0.0.tar.gz
|
||||
746dbabbb3ea9199d17891e2079b9256d04843f548132178862117d2334694d98e2cc981945d72f31d0e5b2c42904d371633f6905996bb580aa0b5ae95c64ddc zotero_build-modifications.patch
|
||||
337070ee4c44ccb35c6b6290c18327740bb9fccfd1a6ad1045782e83daa290b6ced7d53955d3a889f661d588738a64f2e7f383639f4c46be9fdf891168abc9ff zotero_test-drop-build.patch
|
||||
f0e4f09496531222e8400959f9ef12852bca269eb3bf4c3b87ccaf92f28a12b9374461a1c79ad294a4393dbe30800aa1c85497033d0bc304fa8c198dfab3efd2 zotero_test-fix-chars.patch
|
||||
9dc390d8bae42e645cae45fe5551751d8f38d5c1b8b2cc0eec1c2191f4bde293ffb2c67cfc4de765f2d48b1da4d5fcd4f1c03711e5da3180cd1b63710ccf5599 zotero_test-push-timeout-to-30sec.patch
|
||||
7fb791a386d30594a11ae3856295d5081000de7525036eb0b5836505bd4f0b13a4fe706400ad7efe00b75c2112cf3d59ea3542b6179ccd80f7ee1889349f441d zotero_drop-jazzer.patch
|
||||
"
|
|
@ -1,61 +0,0 @@
|
|||
--- 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()),
|
||||
));
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
diff --git a/mozglue/misc/StackWalk.cpp b/mozglue/misc/StackWalk.cpp
|
||||
index 7d62921..adcfa44 100644
|
||||
--- a/mozglue/misc/StackWalk.cpp
|
||||
+++ b/mozglue/misc/StackWalk.cpp
|
||||
@@ -33,13 +33,7 @@ using namespace mozilla;
|
||||
# define MOZ_STACKWALK_SUPPORTS_MACOSX 0
|
||||
#endif
|
||||
|
||||
-#if (defined(linux) && \
|
||||
- ((defined(__GNUC__) && (defined(__i386) || defined(PPC))) || \
|
||||
- defined(HAVE__UNWIND_BACKTRACE)))
|
||||
-# define MOZ_STACKWALK_SUPPORTS_LINUX 1
|
||||
-#else
|
||||
# define MOZ_STACKWALK_SUPPORTS_LINUX 0
|
||||
-#endif
|
||||
|
||||
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1)
|
||||
# define HAVE___LIBC_STACK_END 1
|
|
@ -1,13 +0,0 @@
|
|||
The wrapper features.h gets pulled in by system headers causing thigns to
|
||||
break. We work around it by simply not wrap features.h
|
||||
|
||||
--- ./config/system-headers.mozbuild.orig
|
||||
+++ ./config/system-headers.mozbuild
|
||||
@@ -229,7 +229,6 @@
|
||||
'execinfo.h',
|
||||
'extras.h',
|
||||
'fcntl.h',
|
||||
- 'features.h',
|
||||
'fenv.h',
|
||||
'ffi.h',
|
||||
'fibdef.h',
|
|
@ -1,31 +0,0 @@
|
|||
Allow us to just set RUST_TARGEt ourselves instead of hacking around in mozilla's
|
||||
weird custom build system...
|
||||
|
||||
--- a/build/moz.configure/rust.configure
|
||||
+++ b/build/moz.configure/rust.configure
|
||||
@@ -225,7 +225,9 @@
|
||||
data.setdefault(key, []).append(namespace(rust_target=t, target=info))
|
||||
return data
|
||||
|
||||
-
|
||||
+@imports('os')
|
||||
+@imports(_from='mozbuild.util', _import='ensure_unicode')
|
||||
+@imports(_from='mozbuild.util', _import='system_encoding')
|
||||
def detect_rustc_target(
|
||||
host_or_target, compiler_info, arm_target, rust_supported_targets
|
||||
):
|
||||
@@ -340,13 +342,13 @@
|
||||
|
||||
return None
|
||||
|
||||
- rustc_target = find_candidate(candidates)
|
||||
+ rustc_target = os.environ['RUST_TARGET']
|
||||
|
||||
if rustc_target is None:
|
||||
die("Don't know how to translate {} for rustc".format(host_or_target.alias))
|
||||
|
||||
- return rustc_target
|
||||
+ return ensure_unicode(rustc_target, system_encoding)
|
||||
|
||||
|
||||
@imports('os')
|
|
@ -1,20 +0,0 @@
|
|||
--- a/third_party/libwebrtc/system_wrappers/source/cpu_features_linux.cc
|
||||
+++ b/third_party/libwebrtc/system_wrappers/source/cpu_features_linux.cc
|
||||
@@ -18,7 +18,7 @@
|
||||
#define WEBRTC_GLIBC_PREREQ(a, b) 0
|
||||
#endif
|
||||
|
||||
-#if WEBRTC_GLIBC_PREREQ(2, 16)
|
||||
+#if !__GLIBC__ || WEBRTC_GLIBC_PREREQ(2, 16)
|
||||
#include <sys/auxv.h>
|
||||
#else
|
||||
#include <errno.h>
|
||||
@@ -40,7 +40,7 @@
|
||||
int architecture = 0;
|
||||
uint64_t hwcap = 0;
|
||||
const char* platform = NULL;
|
||||
-#if WEBRTC_GLIBC_PREREQ(2, 16)
|
||||
+#if !__GLIBC__ || WEBRTC_GLIBC_PREREQ(2, 16)
|
||||
hwcap = getauxval(AT_HWCAP);
|
||||
platform = (const char*)getauxval(AT_PLATFORM);
|
||||
#else
|
|
@ -1,38 +0,0 @@
|
|||
https://bugzilla.mozilla.org/show_bug.cgi?id=1862601
|
||||
|
||||
# HG changeset patch
|
||||
# User André Bargull <andre.bargull@gmail.com>
|
||||
# Date 1697435923 -7200
|
||||
# Node ID d5f3b0c4f08a426ce00a153c04e177eecb6820e2
|
||||
# Parent c63994f8259efdf6e745c960aa9e1409d5477049
|
||||
Bug xxx - Part 12: Add new line break classes. r?
|
||||
|
||||
diff --git a/intl/lwbrk/LineBreaker.cpp b/intl/lwbrk/LineBreaker.cpp
|
||||
--- a/intl/lwbrk/LineBreaker.cpp
|
||||
+++ b/intl/lwbrk/LineBreaker.cpp
|
||||
@@ -443,17 +443,23 @@ static int8_t GetClass(uint32_t u, LineB
|
||||
/* JT = 34, [JT] */ CLASS_CHARACTER,
|
||||
/* JV = 35, [JV] */ CLASS_CHARACTER,
|
||||
/* CLOSE_PARENTHESIS = 36, [CP] */ CLASS_CLOSE_LIKE_CHARACTER,
|
||||
/* CONDITIONAL_JAPANESE_STARTER = 37, [CJ] */ CLASS_CLOSE,
|
||||
/* HEBREW_LETTER = 38, [HL] */ CLASS_CHARACTER,
|
||||
/* REGIONAL_INDICATOR = 39, [RI] */ CLASS_CHARACTER,
|
||||
/* E_BASE = 40, [EB] */ CLASS_BREAKABLE,
|
||||
/* E_MODIFIER = 41, [EM] */ CLASS_CHARACTER,
|
||||
- /* ZWJ = 42, [ZWJ]*/ CLASS_CHARACTER};
|
||||
+ /* ZWJ = 42, [ZWJ]*/ CLASS_CHARACTER,
|
||||
+ /* AKSARA = 43, [AK] */ CLASS_CHARACTER,
|
||||
+ /* AKSARA_PREBASE = 44, [AP] */ CLASS_CHARACTER,
|
||||
+ /* AKSARA_START = 45, [AS] */ CLASS_CHARACTER,
|
||||
+ /* VIRAMA_FINAL = 46, [VF] */ CLASS_CHARACTER,
|
||||
+ /* VIRAMA = 47, [VI] */ CLASS_CHARACTER,
|
||||
+ };
|
||||
|
||||
static_assert(U_LB_COUNT == mozilla::ArrayLength(sUnicodeLineBreakToClass),
|
||||
"Gecko vs ICU LineBreak class mismatch");
|
||||
|
||||
auto cls = GetLineBreakClass(u);
|
||||
MOZ_ASSERT(cls < mozilla::ArrayLength(sUnicodeLineBreakToClass));
|
||||
|
||||
// Overrides based on rules for the different line-break values given in
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
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
|
|
@ -1,619 +0,0 @@
|
|||
Patch-Source: https://github.com/chimera-linux/cports/blob/899c997/contrib/thunderbird/patches/llvm18-bindgen.patch
|
||||
https://github.com/rust-lang/rust-bindgen/pull/2689
|
||||
--
|
||||
diff --git a/ir/item.rs b/ir/item.rs
|
||||
index 40f6f7d..87d09da 100644
|
||||
--- a/third_party/rust/bindgen/ir/item.rs
|
||||
+++ b/third_party/rust/bindgen/ir/item.rs
|
||||
@@ -6,8 +6,8 @@ use super::annotations::Annotations;
|
||||
use super::comp::{CompKind, MethodKind};
|
||||
use super::context::{BindgenContext, ItemId, PartialType, TypeId};
|
||||
use super::derive::{
|
||||
- CanDeriveCopy, CanDeriveDebug, CanDeriveDefault, CanDeriveEq,
|
||||
- CanDeriveHash, CanDeriveOrd, CanDerivePartialEq, CanDerivePartialOrd,
|
||||
+ CanDeriveCopy, CanDeriveDebug, CanDeriveDefault, CanDeriveEq, CanDeriveHash, CanDeriveOrd,
|
||||
+ CanDerivePartialEq, CanDerivePartialOrd,
|
||||
};
|
||||
use super::dot::DotAttributes;
|
||||
use super::function::{Function, FunctionKind};
|
||||
@@ -59,10 +59,7 @@ pub trait ItemCanonicalPath {
|
||||
/// Get the namespace-aware canonical path for this item. This means that if
|
||||
/// namespaces are disabled, you'll get a single item, and otherwise you get
|
||||
/// the whole path.
|
||||
- fn namespace_aware_canonical_path(
|
||||
- &self,
|
||||
- ctx: &BindgenContext,
|
||||
- ) -> Vec<String>;
|
||||
+ fn namespace_aware_canonical_path(&self, ctx: &BindgenContext) -> Vec<String>;
|
||||
|
||||
/// Get the canonical path for this item.
|
||||
fn canonical_path(&self, ctx: &BindgenContext) -> Vec<String>;
|
||||
@@ -159,11 +156,7 @@ where
|
||||
{
|
||||
type Extra = ();
|
||||
|
||||
- fn as_template_param(
|
||||
- &self,
|
||||
- ctx: &BindgenContext,
|
||||
- _: &(),
|
||||
- ) -> Option<TypeId> {
|
||||
+ fn as_template_param(&self, ctx: &BindgenContext, _: &()) -> Option<TypeId> {
|
||||
ctx.resolve_item((*self).into()).as_template_param(ctx, &())
|
||||
}
|
||||
}
|
||||
@@ -171,11 +164,7 @@ where
|
||||
impl AsTemplateParam for Item {
|
||||
type Extra = ();
|
||||
|
||||
- fn as_template_param(
|
||||
- &self,
|
||||
- ctx: &BindgenContext,
|
||||
- _: &(),
|
||||
- ) -> Option<TypeId> {
|
||||
+ fn as_template_param(&self, ctx: &BindgenContext, _: &()) -> Option<TypeId> {
|
||||
self.kind.as_template_param(ctx, self)
|
||||
}
|
||||
}
|
||||
@@ -183,16 +172,10 @@ impl AsTemplateParam for Item {
|
||||
impl AsTemplateParam for ItemKind {
|
||||
type Extra = Item;
|
||||
|
||||
- fn as_template_param(
|
||||
- &self,
|
||||
- ctx: &BindgenContext,
|
||||
- item: &Item,
|
||||
- ) -> Option<TypeId> {
|
||||
+ fn as_template_param(&self, ctx: &BindgenContext, item: &Item) -> Option<TypeId> {
|
||||
match *self {
|
||||
ItemKind::Type(ref ty) => ty.as_template_param(ctx, item),
|
||||
- ItemKind::Module(..) |
|
||||
- ItemKind::Function(..) |
|
||||
- ItemKind::Var(..) => None,
|
||||
+ ItemKind::Module(..) | ItemKind::Function(..) | ItemKind::Var(..) => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -214,10 +197,7 @@ impl<T> ItemCanonicalPath for T
|
||||
where
|
||||
T: Copy + Into<ItemId>,
|
||||
{
|
||||
- fn namespace_aware_canonical_path(
|
||||
- &self,
|
||||
- ctx: &BindgenContext,
|
||||
- ) -> Vec<String> {
|
||||
+ fn namespace_aware_canonical_path(&self, ctx: &BindgenContext) -> Vec<String> {
|
||||
debug_assert!(
|
||||
ctx.in_codegen_phase(),
|
||||
"You're not supposed to call this yet"
|
||||
@@ -282,9 +262,7 @@ impl Trace for Item {
|
||||
// There are some types, like resolved type references, where we
|
||||
// don't want to stop collecting types even though they may be
|
||||
// opaque.
|
||||
- if ty.should_be_traced_unconditionally() ||
|
||||
- !self.is_opaque(ctx, &())
|
||||
- {
|
||||
+ if ty.should_be_traced_unconditionally() || !self.is_opaque(ctx, &()) {
|
||||
ty.trace(ctx, tracer, self);
|
||||
}
|
||||
}
|
||||
@@ -450,11 +428,7 @@ impl Item {
|
||||
}
|
||||
|
||||
/// Construct a new opaque item type.
|
||||
- pub fn new_opaque_type(
|
||||
- with_id: ItemId,
|
||||
- ty: &clang::Type,
|
||||
- ctx: &mut BindgenContext,
|
||||
- ) -> TypeId {
|
||||
+ pub fn new_opaque_type(with_id: ItemId, ty: &clang::Type, ctx: &mut BindgenContext) -> TypeId {
|
||||
let location = ty.declaration().location();
|
||||
let ty = Opaque::from_clang_ty(ty, ctx);
|
||||
let kind = ItemKind::Type(ty);
|
||||
@@ -497,12 +471,11 @@ impl Item {
|
||||
self.ancestors(ctx)
|
||||
.filter(|id| {
|
||||
ctx.resolve_item(*id).as_module().map_or(false, |module| {
|
||||
- !module.is_inline() ||
|
||||
- ctx.options().conservative_inline_namespaces
|
||||
+ !module.is_inline() || ctx.options().conservative_inline_namespaces
|
||||
})
|
||||
})
|
||||
- .count() +
|
||||
- 1
|
||||
+ .count()
|
||||
+ + 1
|
||||
}
|
||||
|
||||
/// Get this `Item`'s comment, if it has any, already preprocessed and with
|
||||
@@ -577,9 +550,9 @@ impl Item {
|
||||
pub fn is_toplevel(&self, ctx: &BindgenContext) -> bool {
|
||||
// FIXME: Workaround for some types falling behind when parsing weird
|
||||
// stl classes, for example.
|
||||
- if ctx.options().enable_cxx_namespaces &&
|
||||
- self.kind().is_module() &&
|
||||
- self.id() != ctx.root_module()
|
||||
+ if ctx.options().enable_cxx_namespaces
|
||||
+ && self.kind().is_module()
|
||||
+ && self.id() != ctx.root_module()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -593,9 +566,7 @@ impl Item {
|
||||
|
||||
if parent_item.id() == ctx.root_module() {
|
||||
return true;
|
||||
- } else if ctx.options().enable_cxx_namespaces ||
|
||||
- !parent_item.kind().is_module()
|
||||
- {
|
||||
+ } else if ctx.options().enable_cxx_namespaces || !parent_item.kind().is_module() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -656,15 +627,13 @@ impl Item {
|
||||
|
||||
let path = self.path_for_allowlisting(ctx);
|
||||
let name = path[1..].join("::");
|
||||
- ctx.options().blocklisted_items.matches(&name) ||
|
||||
- match self.kind {
|
||||
+ ctx.options().blocklisted_items.matches(&name)
|
||||
+ || match self.kind {
|
||||
ItemKind::Type(..) => {
|
||||
- ctx.options().blocklisted_types.matches(&name) ||
|
||||
- ctx.is_replaced_type(path, self.id)
|
||||
- }
|
||||
- ItemKind::Function(..) => {
|
||||
- ctx.options().blocklisted_functions.matches(&name)
|
||||
+ ctx.options().blocklisted_types.matches(&name)
|
||||
+ || ctx.is_replaced_type(path, self.id)
|
||||
}
|
||||
+ ItemKind::Function(..) => ctx.options().blocklisted_functions.matches(&name),
|
||||
// TODO: Add constant / namespace blocklisting?
|
||||
ItemKind::Var(..) | ItemKind::Module(..) => false,
|
||||
}
|
||||
@@ -723,12 +692,7 @@ impl Item {
|
||||
}
|
||||
|
||||
/// Helper function for full_disambiguated_name
|
||||
- fn push_disambiguated_name(
|
||||
- &self,
|
||||
- ctx: &BindgenContext,
|
||||
- to: &mut String,
|
||||
- level: u8,
|
||||
- ) {
|
||||
+ fn push_disambiguated_name(&self, ctx: &BindgenContext, to: &mut String, level: u8) {
|
||||
to.push_str(&self.canonical_name(ctx));
|
||||
if let ItemKind::Type(ref ty) = *self.kind() {
|
||||
if let TypeKind::TemplateInstantiation(ref inst) = *ty.kind() {
|
||||
@@ -791,16 +755,14 @@ impl Item {
|
||||
|
||||
match *self.kind() {
|
||||
ItemKind::Var(ref var) => var.name().to_owned(),
|
||||
- ItemKind::Module(ref module) => {
|
||||
- module.name().map(ToOwned::to_owned).unwrap_or_else(|| {
|
||||
- format!("_bindgen_mod_{}", self.exposed_id(ctx))
|
||||
- })
|
||||
- }
|
||||
- ItemKind::Type(ref ty) => {
|
||||
- ty.sanitized_name(ctx).map(Into::into).unwrap_or_else(|| {
|
||||
- format!("_bindgen_ty_{}", self.exposed_id(ctx))
|
||||
- })
|
||||
- }
|
||||
+ ItemKind::Module(ref module) => module
|
||||
+ .name()
|
||||
+ .map(ToOwned::to_owned)
|
||||
+ .unwrap_or_else(|| format!("_bindgen_mod_{}", self.exposed_id(ctx))),
|
||||
+ ItemKind::Type(ref ty) => ty
|
||||
+ .sanitized_name(ctx)
|
||||
+ .map(Into::into)
|
||||
+ .unwrap_or_else(|| format!("_bindgen_ty_{}", self.exposed_id(ctx))),
|
||||
ItemKind::Function(ref fun) => {
|
||||
let mut name = fun.name().to_owned();
|
||||
|
||||
@@ -839,11 +801,7 @@ impl Item {
|
||||
/// If `BindgenOptions::disable_nested_struct_naming` is true then returned
|
||||
/// name is the inner most non-anonymous name plus all the anonymous base names
|
||||
/// that follows.
|
||||
- pub fn real_canonical_name(
|
||||
- &self,
|
||||
- ctx: &BindgenContext,
|
||||
- opt: &NameOptions,
|
||||
- ) -> String {
|
||||
+ pub fn real_canonical_name(&self, ctx: &BindgenContext, opt: &NameOptions) -> String {
|
||||
let target = ctx.resolve_item(self.name_target(ctx));
|
||||
|
||||
// Short-circuit if the target has an override, and just use that.
|
||||
@@ -874,9 +832,7 @@ impl Item {
|
||||
})
|
||||
.filter(|id| {
|
||||
if !ctx.options().conservative_inline_namespaces {
|
||||
- if let ItemKind::Module(ref module) =
|
||||
- *ctx.resolve_item(*id).kind()
|
||||
- {
|
||||
+ if let ItemKind::Module(ref module) = *ctx.resolve_item(*id).kind() {
|
||||
return !module.is_inline();
|
||||
}
|
||||
}
|
||||
@@ -947,9 +903,9 @@ impl Item {
|
||||
let ty_kind = self.kind().as_type().map(|t| t.kind());
|
||||
if let Some(ty_kind) = ty_kind {
|
||||
match *ty_kind {
|
||||
- TypeKind::Comp(..) |
|
||||
- TypeKind::TemplateInstantiation(..) |
|
||||
- TypeKind::Enum(..) => return self.local_id(ctx).to_string(),
|
||||
+ TypeKind::Comp(..) | TypeKind::TemplateInstantiation(..) | TypeKind::Enum(..) => {
|
||||
+ return self.local_id(ctx).to_string()
|
||||
+ }
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
@@ -990,8 +946,7 @@ impl Item {
|
||||
|
||||
match *type_.kind() {
|
||||
TypeKind::Enum(ref enum_) => {
|
||||
- enum_.computed_enum_variation(ctx, self) ==
|
||||
- EnumVariation::ModuleConsts
|
||||
+ enum_.computed_enum_variation(ctx, self) == EnumVariation::ModuleConsts
|
||||
}
|
||||
TypeKind::Alias(inner_id) => {
|
||||
// TODO(emilio): Make this "hop through type aliases that aren't
|
||||
@@ -1018,18 +973,12 @@ impl Item {
|
||||
ItemKind::Type(_) => cc.types(),
|
||||
ItemKind::Function(ref f) => match f.kind() {
|
||||
FunctionKind::Function => cc.functions(),
|
||||
- FunctionKind::Method(MethodKind::Constructor) => {
|
||||
- cc.constructors()
|
||||
- }
|
||||
- FunctionKind::Method(MethodKind::Destructor) |
|
||||
- FunctionKind::Method(MethodKind::VirtualDestructor {
|
||||
- ..
|
||||
- }) => cc.destructors(),
|
||||
- FunctionKind::Method(MethodKind::Static) |
|
||||
- FunctionKind::Method(MethodKind::Normal) |
|
||||
- FunctionKind::Method(MethodKind::Virtual { .. }) => {
|
||||
- cc.methods()
|
||||
- }
|
||||
+ FunctionKind::Method(MethodKind::Constructor) => cc.constructors(),
|
||||
+ FunctionKind::Method(MethodKind::Destructor)
|
||||
+ | FunctionKind::Method(MethodKind::VirtualDestructor { .. }) => cc.destructors(),
|
||||
+ FunctionKind::Method(MethodKind::Static)
|
||||
+ | FunctionKind::Method(MethodKind::Normal)
|
||||
+ | FunctionKind::Method(MethodKind::Virtual { .. }) => cc.methods(),
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -1041,14 +990,9 @@ impl Item {
|
||||
.borrow_with(|| self.compute_path(ctx, UserMangled::No))
|
||||
}
|
||||
|
||||
- fn compute_path(
|
||||
- &self,
|
||||
- ctx: &BindgenContext,
|
||||
- mangled: UserMangled,
|
||||
- ) -> Vec<String> {
|
||||
+ fn compute_path(&self, ctx: &BindgenContext, mangled: UserMangled) -> Vec<String> {
|
||||
if let Some(path) = self.annotations().use_instead_of() {
|
||||
- let mut ret =
|
||||
- vec![ctx.resolve_item(ctx.root_module()).name(ctx).get()];
|
||||
+ let mut ret = vec![ctx.resolve_item(ctx.root_module()).name(ctx).get()];
|
||||
ret.extend_from_slice(path);
|
||||
return ret;
|
||||
}
|
||||
@@ -1059,10 +1003,9 @@ impl Item {
|
||||
.chain(iter::once(ctx.root_module().into()))
|
||||
.map(|id| ctx.resolve_item(id))
|
||||
.filter(|item| {
|
||||
- item.id() == target.id() ||
|
||||
- item.as_module().map_or(false, |module| {
|
||||
- !module.is_inline() ||
|
||||
- ctx.options().conservative_inline_namespaces
|
||||
+ item.id() == target.id()
|
||||
+ || item.as_module().map_or(false, |module| {
|
||||
+ !module.is_inline() || ctx.options().conservative_inline_namespaces
|
||||
})
|
||||
})
|
||||
.map(|item| {
|
||||
@@ -1123,9 +1066,9 @@ impl IsOpaque for Item {
|
||||
ctx.in_codegen_phase(),
|
||||
"You're not supposed to call this yet"
|
||||
);
|
||||
- self.annotations.opaque() ||
|
||||
- self.as_type().map_or(false, |ty| ty.is_opaque(ctx, self)) ||
|
||||
- ctx.opaque_by_name(self.path_for_allowlisting(ctx))
|
||||
+ self.annotations.opaque()
|
||||
+ || self.as_type().map_or(false, |ty| ty.is_opaque(ctx, self))
|
||||
+ || ctx.opaque_by_name(self.path_for_allowlisting(ctx))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1225,11 +1168,7 @@ impl HasFloat for Item {
|
||||
pub type ItemSet = BTreeSet<ItemId>;
|
||||
|
||||
impl DotAttributes for Item {
|
||||
- fn dot_attributes<W>(
|
||||
- &self,
|
||||
- ctx: &BindgenContext,
|
||||
- out: &mut W,
|
||||
- ) -> io::Result<()>
|
||||
+ fn dot_attributes<W>(&self, ctx: &BindgenContext, out: &mut W) -> io::Result<()>
|
||||
where
|
||||
W: io::Write,
|
||||
{
|
||||
@@ -1306,17 +1245,10 @@ fn visit_child(
|
||||
}
|
||||
|
||||
impl Item {
|
||||
- pub(crate) fn builtin_type(
|
||||
- kind: TypeKind,
|
||||
- is_const: bool,
|
||||
- ctx: &mut BindgenContext,
|
||||
- ) -> TypeId {
|
||||
+ pub(crate) fn builtin_type(kind: TypeKind, is_const: bool, ctx: &mut BindgenContext) -> TypeId {
|
||||
// Feel free to add more here, I'm just lazy.
|
||||
match kind {
|
||||
- TypeKind::Void |
|
||||
- TypeKind::Int(..) |
|
||||
- TypeKind::Pointer(..) |
|
||||
- TypeKind::Float(..) => {}
|
||||
+ TypeKind::Void | TypeKind::Int(..) | TypeKind::Pointer(..) | TypeKind::Float(..) => {}
|
||||
_ => panic!("Unsupported builtin type"),
|
||||
}
|
||||
|
||||
@@ -1428,52 +1360,44 @@ impl Item {
|
||||
}
|
||||
|
||||
// Guess how does clang treat extern "C" blocks?
|
||||
- if cursor.kind() == CXCursor_UnexposedDecl {
|
||||
- Err(ParseError::Recurse)
|
||||
- } else {
|
||||
+ match cursor.kind() {
|
||||
+ // On Clang 18+, extern "C" is reported accurately as a LinkageSpec.
|
||||
+ // Older LLVM treat it as UnexposedDecl.
|
||||
+ CXCursor_LinkageSpec | CXCursor_UnexposedDecl => Err(ParseError::Recurse),
|
||||
// We allowlist cursors here known to be unhandled, to prevent being
|
||||
// too noisy about this.
|
||||
- match cursor.kind() {
|
||||
- CXCursor_MacroDefinition |
|
||||
- CXCursor_MacroExpansion |
|
||||
- CXCursor_UsingDeclaration |
|
||||
- CXCursor_UsingDirective |
|
||||
- CXCursor_StaticAssert |
|
||||
- CXCursor_FunctionTemplate => {
|
||||
- debug!(
|
||||
- "Unhandled cursor kind {:?}: {:?}",
|
||||
- cursor.kind(),
|
||||
- cursor
|
||||
- );
|
||||
- }
|
||||
- CXCursor_InclusionDirective => {
|
||||
- let file = cursor.get_included_file_name();
|
||||
- match file {
|
||||
- None => {
|
||||
- warn!(
|
||||
- "Inclusion of a nameless file in {:?}",
|
||||
- cursor
|
||||
- );
|
||||
- }
|
||||
- Some(filename) => {
|
||||
- ctx.include_file(filename);
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- _ => {
|
||||
- // ignore toplevel operator overloads
|
||||
- let spelling = cursor.spelling();
|
||||
- if !spelling.starts_with("operator") {
|
||||
- warn!(
|
||||
- "Unhandled cursor kind {:?}: {:?}",
|
||||
- cursor.kind(),
|
||||
- cursor
|
||||
- );
|
||||
- }
|
||||
- }
|
||||
+ CXCursor_MacroDefinition
|
||||
+ | CXCursor_MacroExpansion
|
||||
+ | CXCursor_UsingDeclaration
|
||||
+ | CXCursor_UsingDirective
|
||||
+ | CXCursor_StaticAssert
|
||||
+ | CXCursor_FunctionTemplate => {
|
||||
+ debug!("Unhandled cursor kind {:?}: {:?}", cursor.kind(), cursor);
|
||||
+ Err(ParseError::Continue)
|
||||
}
|
||||
|
||||
- Err(ParseError::Continue)
|
||||
+ CXCursor_InclusionDirective => {
|
||||
+ let file = cursor.get_included_file_name();
|
||||
+ match file {
|
||||
+ None => {
|
||||
+ warn!("Inclusion of a nameless file in {:?}", cursor);
|
||||
+ }
|
||||
+ Some(included_file) => {
|
||||
+ for cb in &ctx.options().parse_callbacks {
|
||||
+ cb.include_file(&included_file);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ Err(ParseError::Continue)
|
||||
+ }
|
||||
+ _ => {
|
||||
+ // ignore toplevel operator overloads
|
||||
+ let spelling = cursor.spelling();
|
||||
+ if !spelling.starts_with("operator") {
|
||||
+ warn!("Unhandled cursor kind {:?}: {:?}", cursor.kind(), cursor);
|
||||
+ }
|
||||
+ Err(ParseError::Continue)
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1511,22 +1435,11 @@ impl Item {
|
||||
|
||||
if ctx.collected_typerefs() {
|
||||
debug!("refs already collected, resolving directly");
|
||||
- return Item::from_ty_with_id(
|
||||
- potential_id,
|
||||
- &ty,
|
||||
- location,
|
||||
- parent_id,
|
||||
- ctx,
|
||||
- )
|
||||
- .unwrap_or_else(|_| Item::new_opaque_type(potential_id, &ty, ctx));
|
||||
+ return Item::from_ty_with_id(potential_id, &ty, location, parent_id, ctx)
|
||||
+ .unwrap_or_else(|_| Item::new_opaque_type(potential_id, &ty, ctx));
|
||||
}
|
||||
|
||||
- if let Some(ty) = ctx.builtin_or_resolved_ty(
|
||||
- potential_id,
|
||||
- parent_id,
|
||||
- &ty,
|
||||
- Some(location),
|
||||
- ) {
|
||||
+ if let Some(ty) = ctx.builtin_or_resolved_ty(potential_id, parent_id, &ty, Some(location)) {
|
||||
debug!("{:?} already resolved: {:?}", ty, location);
|
||||
return ty;
|
||||
}
|
||||
@@ -1586,12 +1499,10 @@ impl Item {
|
||||
id, ty, location
|
||||
);
|
||||
|
||||
- if ty.kind() == clang_sys::CXType_Unexposed ||
|
||||
- location.cur_type().kind() == clang_sys::CXType_Unexposed
|
||||
+ if ty.kind() == clang_sys::CXType_Unexposed
|
||||
+ || location.cur_type().kind() == clang_sys::CXType_Unexposed
|
||||
{
|
||||
- if ty.is_associated_type() ||
|
||||
- location.cur_type().is_associated_type()
|
||||
- {
|
||||
+ if ty.is_associated_type() || location.cur_type().is_associated_type() {
|
||||
return Ok(Item::new_opaque_type(id, ty, ctx));
|
||||
}
|
||||
|
||||
@@ -1618,8 +1529,7 @@ impl Item {
|
||||
};
|
||||
|
||||
let comment = decl.raw_comment().or_else(|| location.raw_comment());
|
||||
- let annotations =
|
||||
- Annotations::new(&decl).or_else(|| Annotations::new(&location));
|
||||
+ let annotations = Annotations::new(&decl).or_else(|| Annotations::new(&location));
|
||||
|
||||
if let Some(ref annotations) = annotations {
|
||||
if let Some(replaced) = annotations.use_instead_of() {
|
||||
@@ -1627,9 +1537,7 @@ impl Item {
|
||||
}
|
||||
}
|
||||
|
||||
- if let Some(ty) =
|
||||
- ctx.builtin_or_resolved_ty(id, parent_id, ty, Some(location))
|
||||
- {
|
||||
+ if let Some(ty) = ctx.builtin_or_resolved_ty(id, parent_id, ty, Some(location)) {
|
||||
return Ok(ty);
|
||||
}
|
||||
|
||||
@@ -1665,9 +1573,7 @@ impl Item {
|
||||
let result = Type::from_clang_ty(id, ty, location, parent_id, ctx);
|
||||
let relevant_parent_id = parent_id.unwrap_or(current_module);
|
||||
let ret = match result {
|
||||
- Ok(ParseResult::AlreadyResolved(ty)) => {
|
||||
- Ok(ty.as_type_id_unchecked())
|
||||
- }
|
||||
+ Ok(ParseResult::AlreadyResolved(ty)) => Ok(ty.as_type_id_unchecked()),
|
||||
Ok(ParseResult::New(item, declaration)) => {
|
||||
ctx.add_item(
|
||||
Item::new(
|
||||
@@ -1698,13 +1604,10 @@ impl Item {
|
||||
assert_eq!(*finished.decl(), declaration_to_look_for);
|
||||
}
|
||||
|
||||
- location.visit(|cur| {
|
||||
- visit_child(cur, id, ty, parent_id, ctx, &mut result)
|
||||
- });
|
||||
+ location.visit(|cur| visit_child(cur, id, ty, parent_id, ctx, &mut result));
|
||||
|
||||
if valid_decl {
|
||||
- let partial_ty =
|
||||
- PartialType::new(declaration_to_look_for, id);
|
||||
+ let partial_ty = PartialType::new(declaration_to_look_for, id);
|
||||
ctx.begin_parsing(partial_ty);
|
||||
}
|
||||
|
||||
@@ -1813,10 +1716,7 @@ impl Item {
|
||||
// but maintaining these scopes properly would require more changes to
|
||||
// the whole libclang -> IR parsing code.
|
||||
|
||||
- fn is_template_with_spelling(
|
||||
- refd: &clang::Cursor,
|
||||
- spelling: &str,
|
||||
- ) -> bool {
|
||||
+ fn is_template_with_spelling(refd: &clang::Cursor, spelling: &str) -> bool {
|
||||
lazy_static! {
|
||||
static ref ANON_TYPE_PARAM_RE: regex::Regex =
|
||||
regex::Regex::new(r"^type\-parameter\-\d+\-\d+$").unwrap();
|
||||
@@ -1838,11 +1738,7 @@ impl Item {
|
||||
} else if location.kind() == clang_sys::CXCursor_TypeRef {
|
||||
// Situation (2)
|
||||
match location.referenced() {
|
||||
- Some(refd)
|
||||
- if is_template_with_spelling(&refd, &ty_spelling) =>
|
||||
- {
|
||||
- refd
|
||||
- }
|
||||
+ Some(refd) if is_template_with_spelling(&refd, &ty_spelling) => refd,
|
||||
_ => return None,
|
||||
}
|
||||
} else {
|
||||
@@ -1851,16 +1747,11 @@ impl Item {
|
||||
|
||||
location.visit(|child| {
|
||||
let child_ty = child.cur_type();
|
||||
- if child_ty.kind() == clang_sys::CXCursor_TypeRef &&
|
||||
- child_ty.spelling() == ty_spelling
|
||||
+ if child_ty.kind() == clang_sys::CXCursor_TypeRef
|
||||
+ && child_ty.spelling() == ty_spelling
|
||||
{
|
||||
match child.referenced() {
|
||||
- Some(refd)
|
||||
- if is_template_with_spelling(
|
||||
- &refd,
|
||||
- &ty_spelling,
|
||||
- ) =>
|
||||
- {
|
||||
+ Some(refd) if is_template_with_spelling(&refd, &ty_spelling) => {
|
||||
definition = Some(refd);
|
||||
return clang_sys::CXChildVisit_Break;
|
||||
}
|
||||
@@ -1883,12 +1774,7 @@ impl Item {
|
||||
|
||||
if let Some(id) = ctx.get_type_param(&definition) {
|
||||
if let Some(with_id) = with_id {
|
||||
- return Some(ctx.build_ty_wrapper(
|
||||
- with_id,
|
||||
- id,
|
||||
- Some(parent),
|
||||
- &ty,
|
||||
- ));
|
||||
+ return Some(ctx.build_ty_wrapper(with_id, id, Some(parent), &ty));
|
||||
} else {
|
||||
return Some(id);
|
||||
}
|
||||
@@ -1920,8 +1806,8 @@ impl ItemCanonicalName for Item {
|
||||
);
|
||||
self.canonical_name
|
||||
.borrow_with(|| {
|
||||
- let in_namespace = ctx.options().enable_cxx_namespaces ||
|
||||
- ctx.options().disable_name_namespacing;
|
||||
+ let in_namespace =
|
||||
+ ctx.options().enable_cxx_namespaces || ctx.options().disable_name_namespacing;
|
||||
|
||||
if in_namespace {
|
||||
self.name(ctx).within_namespaces().get()
|
||||
@@ -1934,10 +1820,7 @@ impl ItemCanonicalName for Item {
|
||||
}
|
||||
|
||||
impl ItemCanonicalPath for Item {
|
||||
- fn namespace_aware_canonical_path(
|
||||
- &self,
|
||||
- ctx: &BindgenContext,
|
||||
- ) -> Vec<String> {
|
||||
+ fn namespace_aware_canonical_path(&self, ctx: &BindgenContext) -> Vec<String> {
|
||||
let mut path = self.canonical_path(ctx);
|
||||
|
||||
// ASSUMPTION: (disable_name_namespacing && cxx_namespaces)
|
|
@ -1,23 +0,0 @@
|
|||
Patch-Source: https://github.com/chimera-linux/cports/blob/899c997/contrib/thunderbird/patches/llvm18.patch
|
||||
--- a/dom/media/webrtc/libwebrtcglue/WebrtcGmpVideoCodec.cpp
|
||||
+++ b/dom/media/webrtc/libwebrtcglue/WebrtcGmpVideoCodec.cpp
|
||||
@@ -540,7 +540,7 @@
|
||||
|
||||
webrtc::VideoFrameType ft;
|
||||
GmpFrameTypeToWebrtcFrameType(aEncodedFrame->FrameType(), &ft);
|
||||
- uint32_t timestamp = (aEncodedFrame->TimeStamp() * 90ll + 999) / 1000;
|
||||
+ uint64_t timestamp = (aEncodedFrame->TimeStamp() * 90ll + 999) / 1000;
|
||||
|
||||
GMP_LOG_DEBUG("GMP Encoded: %" PRIu64 ", type %d, len %d",
|
||||
aEncodedFrame->TimeStamp(), aEncodedFrame->BufferType(),
|
||||
--- a/dom/media/webrtc/libwebrtcglue/WebrtcGmpVideoCodec.h
|
||||
+++ b/dom/media/webrtc/libwebrtcglue/WebrtcGmpVideoCodec.h
|
||||
@@ -302,7 +302,7 @@
|
||||
int64_t timestamp_us;
|
||||
};
|
||||
// Map rtp time -> input image data
|
||||
- DataMutex<std::map<uint32_t, InputImageData>> mInputImageMap;
|
||||
+ DataMutex<std::map<uint64_t, InputImageData>> mInputImageMap;
|
||||
|
||||
MediaEventProducer<uint64_t> mInitPluginEvent;
|
||||
MediaEventProducer<uint64_t> mReleasePluginEvent;
|
|
@ -1,15 +0,0 @@
|
|||
Patch-Source: https://phabricator.services.mozilla.com/D212612
|
||||
|
||||
diff --git a/toolkit/moz.configure b/toolkit/moz.configure
|
||||
index 6d5485325c..c5dcc65dd5 100644
|
||||
--- a/toolkit/moz.configure
|
||||
+++ b/toolkit/moz.configure
|
||||
@@ -2426,6 +2426,8 @@ with only_when(compile_environment):
|
||||
& jpeg_arm_neon_vld1q_u8_x4,
|
||||
)
|
||||
|
||||
+ set_config("MOZ_SYSTEM_JPEG", True, when="--with-system-jpeg")
|
||||
+
|
||||
|
||||
# PNG
|
||||
# ===
|
|
@ -1 +0,0 @@
|
|||
NjhhZGJjMDEtMDM3OC00Zjc0LTk0N2UtMzBiYzA5NjlhMDc3Cg==
|
|
@ -1,13 +0,0 @@
|
|||
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:
|
|
@ -1,34 +0,0 @@
|
|||
missing include to use qsort()
|
||||
|
||||
https://bugzil.la/1906955
|
||||
|
||||
--- a/dom/media/webrtc/transport/third_party/nrappkit/src/registry/registry_local.c 2024-07-09 18:11:39.207125821 +0200
|
||||
+++ b/dom/media/webrtc/transport/third_party/nrappkit/src/registry/registry_local.c 2024-07-09 18:12:07.657013364 +0200
|
||||
@@ -53,6 +53,7 @@
|
||||
#include <openssl/ssl.h>
|
||||
#endif
|
||||
#include <ctype.h>
|
||||
+#include <stdlib.h>
|
||||
#include "registry.h"
|
||||
#include "registry_int.h"
|
||||
#include "registry_vtbl.h"
|
||||
@@ -62,6 +63,10 @@
|
||||
#include "r_errors.h"
|
||||
#include "r_macros.h"
|
||||
|
||||
+static int nr_compare_string(const void *arg1, const void *arg2) {
|
||||
+ return strcasecmp(*(const char **)arg1, *(const char **)arg2);
|
||||
+}
|
||||
+
|
||||
/* if C were an object-oriented language, nr_scalar_registry_node and
|
||||
* nr_array_registry_node would subclass nr_registry_node, but it isn't
|
||||
* object-oriented language, so this is used in cases where the pointer
|
||||
@@ -1067,7 +1072,7 @@
|
||||
}
|
||||
|
||||
assert(sizeof(*arg.children) == sizeof(NR_registry));
|
||||
- qsort(arg.children, arg.length, sizeof(*arg.children), (void*)strcasecmp);
|
||||
+ qsort(arg.children, arg.length, sizeof(*arg.children), nr_compare_string);
|
||||
|
||||
*length = arg.length;
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
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
|
|
@ -1,23 +0,0 @@
|
|||
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"
|
||||
+ ]
|
|
@ -1,12 +0,0 @@
|
|||
diff --git a/python/sites/mach.txt b/python/sites/mach.txt
|
||||
index 55cc6fb..51bf67d 100644
|
||||
--- a/python/sites/mach.txt
|
||||
+++ b/python/sites/mach.txt
|
||||
@@ -141,5 +141,5 @@ pypi-optional:glean-sdk==52.7.0:telemetry will not be collected
|
||||
# Mach gracefully handles the case where `psutil` is unavailable.
|
||||
# We aren't (yet) able to pin packages in automation, so we have to
|
||||
# support down to the oldest locally-installed version (5.4.2).
|
||||
-pypi-optional:psutil>=5.4.2,<=5.9.4:telemetry will be missing some data
|
||||
-pypi-optional:zstandard>=0.11.1,<=0.22.0:zstd archives will not be possible to extract
|
||||
+pypi-optional:psutil>=5.4.2,<=5.10.0:telemetry will be missing some data
|
||||
+pypi-optional:zstandard>=0.11.1,<=0.24.0:zstd archives will not be possible to extract
|
|
@ -1,12 +0,0 @@
|
|||
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
|
File diff suppressed because one or more lines are too long
|
@ -1,64 +0,0 @@
|
|||
Relevant bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=1882291
|
||||
|
||||
|
||||
diff --git a/Cargo.lock b/Cargo.lock
|
||||
--- a/Cargo.lock
|
||||
+++ b/Cargo.lock
|
||||
@@ -4274,10 +4274,11 @@
|
||||
[[package]]
|
||||
name = "qcms"
|
||||
version = "0.2.0"
|
||||
dependencies = [
|
||||
"libc",
|
||||
+ "version_check",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "qlog"
|
||||
version = "0.4.0"
|
||||
diff --git a/gfx/qcms/Cargo.toml b/gfx/qcms/Cargo.toml
|
||||
--- a/gfx/qcms/Cargo.toml
|
||||
+++ b/gfx/qcms/Cargo.toml
|
||||
@@ -18,5 +18,8 @@
|
||||
iccv4-enabled = []
|
||||
cmyk = []
|
||||
|
||||
[dependencies]
|
||||
libc = {version = "0.2", optional = true }
|
||||
+
|
||||
+[build-dependencies]
|
||||
+version_check = "0.9"
|
||||
diff --git a/gfx/qcms/build.rs b/gfx/qcms/build.rs
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gfx/qcms/build.rs
|
||||
@@ -0,0 +1,7 @@
|
||||
+extern crate version_check as rustc;
|
||||
+
|
||||
+fn main() {
|
||||
+ if rustc::is_min_version("1.78.0").unwrap_or(false) {
|
||||
+ println!("cargo:rustc-cfg=stdsimd_split");
|
||||
+ }
|
||||
+}
|
||||
diff --git a/gfx/qcms/src/lib.rs b/gfx/qcms/src/lib.rs
|
||||
--- a/gfx/qcms/src/lib.rs
|
||||
+++ b/gfx/qcms/src/lib.rs
|
||||
@@ -5,13 +5,15 @@
|
||||
#![allow(non_camel_case_types)]
|
||||
#![allow(non_snake_case)]
|
||||
#![allow(non_upper_case_globals)]
|
||||
// These are needed for the neon SIMD code and can be removed once the MSRV supports the
|
||||
// instrinsics we use
|
||||
-#![cfg_attr(feature = "neon", feature(stdsimd))]
|
||||
+#![cfg_attr(all(stdsimd_split, target_arch = "arm", feature = "neon"), feature(stdarch_arm_neon_intrinsics))]
|
||||
+#![cfg_attr(all(stdsimd_split, target_arch = "arm", feature = "neon"), feature(stdarch_arm_feature_detection))]
|
||||
+#![cfg_attr(all(not(stdsimd_split), target_arch = "arm", feature = "neon"), feature(stdsimd))]
|
||||
#![cfg_attr(
|
||||
- feature = "neon",
|
||||
+ all(target_arch = "arm", feature = "neon"),
|
||||
feature(arm_target_feature, raw_ref_op)
|
||||
|
||||
)]
|
||||
|
||||
/// These values match the Rendering Intent values from the ICC spec
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
make SYS_fork non-fatal, musl uses it for fork(2)
|
||||
|
||||
--- a/security/sandbox/linux/SandboxFilter.cpp
|
||||
+++ b/security/sandbox/linux/SandboxFilter.cpp
|
||||
@@ -1253,6 +1253,10 @@
|
||||
// usually do something reasonable on error.
|
||||
case __NR_clone:
|
||||
return ClonePolicy(Error(EPERM));
|
||||
+#ifdef __NR_fork
|
||||
+ case __NR_fork:
|
||||
+ return Error(ENOSYS);
|
||||
+#endif
|
||||
|
||||
# ifdef __NR_fadvise64
|
||||
case __NR_fadvise64:
|
|
@ -1,17 +0,0 @@
|
|||
--- a/security/sandbox/linux/SandboxFilter.cpp 2020-11-23 22:41:14.556378950 +0100
|
||||
+++ b/security/sandbox/linux/SandboxFilter.cpp 2020-11-23 22:40:23.595806444 +0100
|
||||
@@ -68,7 +68,13 @@
|
||||
|
||||
// The headers define O_LARGEFILE as 0 on x86_64, but we need the
|
||||
// actual value because it shows up in file flags.
|
||||
-#define O_LARGEFILE_REAL 00100000
|
||||
+#if defined(__x86_64__) || defined(__i386__) || defined(__mips__)
|
||||
+#define O_LARGEFILE_REAL 0100000
|
||||
+#elif defined(__powerpc__)
|
||||
+#define O_LARGEFILE_REAL 0200000
|
||||
+#else
|
||||
+#define O_LARGEFILE_REAL O_LARGEFILE
|
||||
+#endif
|
||||
|
||||
// Not part of UAPI, but userspace sees it in F_GETFL; see bug 1650751.
|
||||
#define FMODE_NONOTIFY 0x4000000
|
|
@ -1,24 +0,0 @@
|
|||
upstream bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1657849
|
||||
diff --git a/security/sandbox/linux/SandboxFilter.cpp b/security/sandbox/linux/SandboxFilter.cpp
|
||||
index ed958bc..9824433 100644
|
||||
--- a/security/sandbox/linux/SandboxFilter.cpp
|
||||
+++ b/security/sandbox/linux/SandboxFilter.cpp
|
||||
@@ -1751,6 +1751,6 @@ class GMPSandboxPolicy : public SandboxPolicyCommon {
|
||||
case __NR_sched_get_priority_max:
|
||||
+ case __NR_sched_setscheduler:
|
||||
return Allow();
|
||||
case __NR_sched_getparam:
|
||||
- case __NR_sched_getscheduler:
|
||||
- case __NR_sched_setscheduler: {
|
||||
+ case __NR_sched_getscheduler: {
|
||||
Arg<pid_t> pid(0);
|
||||
@@ -1926,3 +1926,2 @@ class RDDSandboxPolicy final : public SandboxPolicyCommon {
|
||||
case __NR_sched_getscheduler:
|
||||
- case __NR_sched_setscheduler:
|
||||
case __NR_sched_getattr:
|
||||
@@ -1932,2 +1931,5 @@ class RDDSandboxPolicy final : public SandboxPolicyCommon {
|
||||
}
|
||||
+ // sched_setscheduler gets special treatment here (bug 1657849):
|
||||
+ case __NR_sched_setscheduler:
|
||||
+ return Allow();
|
||||
|
|
@ -1,71 +0,0 @@
|
|||
/* $OpenBSD: stab.h,v 1.3 2003/06/02 19:34:12 millert Exp $ */
|
||||
/* $NetBSD: stab.h,v 1.4 1994/10/26 00:56:25 cgd Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1991 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. 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.
|
||||
* 3. Neither the name of the University 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 THE REGENTS AND CONTRIBUTORS ``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 THE REGENTS OR CONTRIBUTORS 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.
|
||||
*
|
||||
* @(#)stab.h 5.2 (Berkeley) 4/4/91
|
||||
*/
|
||||
|
||||
#ifndef _STAB_H_
|
||||
#define _STAB_H_
|
||||
|
||||
/*
|
||||
* The following are symbols used by various debuggers and by the Pascal
|
||||
* compiler. Each of them must have one (or more) of the bits defined by
|
||||
* the N_STAB mask set.
|
||||
*/
|
||||
|
||||
#define N_GSYM 0x20 /* global symbol */
|
||||
#define N_FNAME 0x22 /* F77 function name */
|
||||
#define N_FUN 0x24 /* procedure name */
|
||||
#define N_STSYM 0x26 /* data segment variable */
|
||||
#define N_LCSYM 0x28 /* bss segment variable */
|
||||
#define N_MAIN 0x2a /* main function name */
|
||||
#define N_PC 0x30 /* global Pascal symbol */
|
||||
#define N_RSYM 0x40 /* register variable */
|
||||
#define N_SLINE 0x44 /* text segment line number */
|
||||
#define N_DSLINE 0x46 /* data segment line number */
|
||||
#define N_BSLINE 0x48 /* bss segment line number */
|
||||
#define N_SSYM 0x60 /* structure/union element */
|
||||
#define N_SO 0x64 /* main source file name */
|
||||
#define N_LSYM 0x80 /* stack variable */
|
||||
#define N_BINCL 0x82 /* include file beginning */
|
||||
#define N_SOL 0x84 /* included source file name */
|
||||
#define N_PSYM 0xa0 /* parameter variable */
|
||||
#define N_EINCL 0xa2 /* include file end */
|
||||
#define N_ENTRY 0xa4 /* alternate entry point */
|
||||
#define N_LBRAC 0xc0 /* left bracket */
|
||||
#define N_EXCL 0xc2 /* deleted include file */
|
||||
#define N_RBRAC 0xe0 /* right bracket */
|
||||
#define N_BCOMM 0xe2 /* begin common */
|
||||
#define N_ECOMM 0xe4 /* end common */
|
||||
#define N_ECOML 0xe8 /* end common (local name) */
|
||||
#define N_LENG 0xfe /* length of preceding entry */
|
||||
|
||||
#endif /* !_STAB_H_ */
|
|
@ -1,12 +0,0 @@
|
|||
// Use LANG environment variable to choose locale
|
||||
pref("intl.locale.requested", "");
|
||||
|
||||
// Use system-provided dictionaries
|
||||
pref("spellchecker.dictionary_path", "/usr/share/hunspell");
|
||||
|
||||
// Disable default browser checking.
|
||||
pref("browser.shell.checkDefaultBrowser", false);
|
||||
|
||||
// Don't disable our bundled extensions in the application directory
|
||||
pref("extensions.autoDisableScopes", 11);
|
||||
pref("extensions.shownSelectionUI", true);
|
|
@ -1,9 +0,0 @@
|
|||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=Zotero
|
||||
GenericName=Zotero Standalone. Is a free, easy-to-use tool to help you collect, organize, cite, and share your research sources.
|
||||
Icon=zotero
|
||||
Exec=/usr/bin/zotero -url %U
|
||||
Categories=Office
|
||||
Terminal=false
|
||||
MimeType=x-scheme-handler/zotero
|
|
@ -1,144 +0,0 @@
|
|||
diff --git a/zotero/app/build.sh b/zotero/app/build.sh
|
||||
index 649d629..7d078b8 100755
|
||||
--- a/zotero/app/build.sh
|
||||
+++ b/zotero/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/zotero/app/build.sh.orig b/zotero/app/build.sh
|
||||
index 702f499..3ee7e34 100755
|
||||
--- a/zotero/app/build.sh.orig
|
||||
+++ b/zotero/app/build.sh
|
||||
@@ -189,7 +189,7 @@ BUILD_ID=`date +%Y%m%d%H%M%S`
|
||||
# Paths to Gecko runtimes
|
||||
MAC_RUNTIME_PATH="$CALLDIR/xulrunner/Firefox.app"
|
||||
WIN_RUNTIME_PATH_PREFIX="$CALLDIR/xulrunner/firefox-"
|
||||
-LINUX_RUNTIME_PATH_PREFIX="$CALLDIR/xulrunner/firefox-"
|
||||
+LINUX_RUNTIME_PATH_PREFIX="$CALLDIR/xulrunner/firefox"
|
||||
|
||||
base_dir="$BUILD_DIR/base"
|
||||
app_dir="$BUILD_DIR/base/app"
|
||||
@@ -223,8 +223,8 @@ elif [ $BUILD_WIN == 1 ]; then
|
||||
unzip -qj "${WIN_RUNTIME_PATH_PREFIX}win-x64"/omni.ja "hyphenation/*" -d "$app_dir"/hyphenation/
|
||||
elif [ $BUILD_LINUX == 1 ]; then
|
||||
# Non-arch-specific files, so just use 64-bit version
|
||||
- cp -Rp "${LINUX_RUNTIME_PATH_PREFIX}x86_64"/browser/omni "$app_dir"
|
||||
- unzip -qj "${LINUX_RUNTIME_PATH_PREFIX}x86_64"/omni.ja "hyphenation/*" -d "$app_dir"/hyphenation/
|
||||
+ cp -Rp "${LINUX_RUNTIME_PATH_PREFIX}"/browser/omni "$app_dir"
|
||||
+ unzip -qj "${LINUX_RUNTIME_PATH_PREFIX}"/omni.ja "hyphenation/*" -d "$app_dir"/hyphenation/
|
||||
fi
|
||||
set -e
|
||||
cd $omni_dir
|
||||
@@ -825,11 +825,11 @@ if [ $BUILD_LINUX == 1 ]; then
|
||||
fi
|
||||
|
||||
for arch in $archs; do
|
||||
- runtime_path="${LINUX_RUNTIME_PATH_PREFIX}${arch}"
|
||||
+ runtime_path="${LINUX_RUNTIME_PATH_PREFIX}"
|
||||
|
||||
# Set up directory
|
||||
- echo 'Building Zotero_linux-'$arch
|
||||
- APPDIR="$STAGE_DIR/Zotero_linux-$arch"
|
||||
+ echo 'Building Zotero_linux'
|
||||
+ APPDIR="$STAGE_DIR/Zotero_linux"
|
||||
rm -rf "$APPDIR"
|
||||
mkdir "$APPDIR"
|
||||
|
||||
diff --git a/zotero/app/scripts/fetch_xulrunner.orig b/zotero/app/scripts/fetch_xulrunner
|
||||
index 2b57bfb..2bbc110 100755
|
||||
--- a/zotero/app/scripts/fetch_xulrunner.orig
|
||||
+++ b/zotero/app/scripts/fetch_xulrunner
|
||||
@@ -134,15 +134,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.sys.mjs
|
||||
|
||||
- # 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.sys.mjs
|
||||
-
|
||||
# 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.sys.mjs
|
||||
|
||||
@@ -516,36 +507,10 @@ fi
|
||||
|
||||
if [ $BUILD_LINUX == 1 ]; then
|
||||
GECKO_VERSION="$GECKO_VERSION_LINUX"
|
||||
- DOWNLOAD_URL="https://ftp.mozilla.org/pub/firefox/releases/$GECKO_VERSION"
|
||||
|
||||
-
|
||||
- # 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 $arch
|
||||
- popd
|
||||
- echo $($SCRIPT_DIR/xulrunner_hash -p l) > hash-linux
|
||||
- rm "firefox-$GECKO_VERSION.tar.bz2"
|
||||
- done
|
||||
+ pushd firefox
|
||||
+ modify_omni linux64
|
||||
+ popd
|
||||
fi
|
||||
|
||||
echo Done
|
|
@ -1,12 +0,0 @@
|
|||
diff --git a/zotero/pdf-worker/pdf.js/package.json.orig b/zotero/pdf-worker/pdf.js/package.json
|
||||
index 3025926..13f8b7a 100644
|
||||
--- a/zotero/pdf-worker/pdf.js/package.json.orig
|
||||
+++ b/zotero/pdf-worker/pdf.js/package.json
|
||||
@@ -7,7 +7,6 @@
|
||||
"@babel/runtime": "^7.24.8",
|
||||
"@fluent/bundle": "^0.18.0",
|
||||
"@fluent/dom": "^0.10.0",
|
||||
- "@jazzer.js/core": "^2.1.0",
|
||||
"@metalsmith/layouts": "^2.7.0",
|
||||
"@metalsmith/markdown": "^1.10.0",
|
||||
"autoprefixer": "^10.4.19",
|
|
@ -1,23 +0,0 @@
|
|||
diff --git a/zotero/test/runtests.sh.orig b/zotero/test/runtests.sh
|
||||
index d83914a..ec91848 100755
|
||||
--- a/zotero/test/runtests.sh.orig
|
||||
+++ b/zotero/test/runtests.sh
|
||||
@@ -154,18 +154,6 @@ fi
|
||||
# Clean up on exit
|
||||
trap "{ rm -rf \"$TEMPDIR\"; }" EXIT
|
||||
|
||||
-# Check if build watch process is running
|
||||
-# If not, run now
|
||||
-if [[ -z "$CI" ]] && ! ps | grep js-build/build.js | grep -v grep > /dev/null; then
|
||||
- echo
|
||||
- echo "Running JS build process"
|
||||
- cd "$ROOT_DIR"
|
||||
- NODE_OPTIONS=--openssl-legacy-provider npm run build || exit $?
|
||||
- echo
|
||||
-fi
|
||||
-
|
||||
-ZOTERO_TEST=1 "$ROOT_DIR/app/scripts/dir_build" -q
|
||||
-
|
||||
makePath FX_PROFILE "$PROFILE"
|
||||
MOZ_NO_REMOTE=1 NO_EM_RESTART=1 "$Z_EXECUTABLE" -profile "$FX_PROFILE" \
|
||||
-test "$TESTS" -grep "$GREP" -ZoteroTest $Z_ARGS
|
|
@ -1,16 +0,0 @@
|
|||
diff --git a/zotero/node_modules/mocha/mocha.js.orig b/zotero/node_modules/mocha/mocha.js
|
||||
index c3e0c12..95fff4d 100644
|
||||
--- a/zotero/node_modules/mocha/mocha.js.orig
|
||||
+++ b/zotero/node_modules/mocha/mocha.js
|
||||
@@ -11473,9 +11473,9 @@
|
||||
|
||||
var browser$1 = {
|
||||
info: 'ℹ️',
|
||||
- success: '✅',
|
||||
+ success: '✔',
|
||||
warning: '⚠️',
|
||||
- error: '❌️'
|
||||
+ error: 'x'
|
||||
};
|
||||
|
||||
var require$$0 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_events)
|
|
@ -1,13 +0,0 @@
|
|||
diff --git a/zotero/test/runtests.sh.orig b/zotero/test/runtests.sh
|
||||
index d83914a3baa..e00efdb6506 100755
|
||||
--- a/zotero/test/runtests.sh.orig
|
||||
+++ b/zotero/test/runtests.sh
|
||||
@@ -146,7 +146,7 @@ user_pref("extensions.zoteroOpenOfficeIntegration.skipInstallation", true);
|
||||
EOF
|
||||
|
||||
if [ -n "$CI" ]; then
|
||||
- Z_ARGS="$Z_ARGS -ZoteroAutomatedTest -ZoteroTestTimeout 15000"
|
||||
+ Z_ARGS="$Z_ARGS -ZoteroAutomatedTest -ZoteroTestTimeout 30000"
|
||||
else
|
||||
Z_ARGS="$Z_ARGS -jsconsole"
|
||||
fi
|
Loading…
Reference in a new issue