-
Notifications
You must be signed in to change notification settings - Fork 480
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
46 changed files
with
911 additions
and
618 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
From 1fbb46db545fad72daab79d769f19a4ae4cea6e3 Mon Sep 17 00:00:00 2001 | ||
From: Christoph Reiter <reiter.christoph@gmail.com> | ||
Date: Tue, 28 Feb 2023 20:24:42 +0100 | ||
Subject: [PATCH 02/N] makepkg: bash v4 compat | ||
|
||
I think this is from a time when we only had bash v4 which didn't support "-f" | ||
and can be dropped | ||
--- | ||
scripts/makepkg.sh.in | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in | ||
index fca9b2c..5549f07 100644 | ||
--- a/scripts/makepkg.sh.in | ||
+++ b/scripts/makepkg.sh.in | ||
@@ -440,7 +440,7 @@ run_function() { | ||
|
||
$pkgfunc &>"$logpipe" | ||
|
||
- wait -f $teepid | ||
+ wait $teepid | ||
rm "$logpipe" | ||
else | ||
"$pkgfunc" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
From 261911e634510c2b5390cf67d5067fca8f18a2a3 Mon Sep 17 00:00:00 2001 | ||
From: Christoph Reiter <reiter.christoph@gmail.com> | ||
Date: Tue, 28 Feb 2023 20:29:47 +0100 | ||
Subject: [PATCH 03/N] makepkg: find_libdepends: port to Windows | ||
|
||
--- | ||
scripts/makepkg.sh.in | 31 ++++++++++++++++++------------- | ||
1 file changed, 18 insertions(+), 13 deletions(-) | ||
|
||
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in | ||
index 5549f07..048d90d 100644 | ||
--- a/scripts/makepkg.sh.in | ||
+++ b/scripts/makepkg.sh.in | ||
@@ -468,7 +468,7 @@ find_libdepends() { | ||
|
||
sodepends=0 | ||
for d in "${depends[@]}"; do | ||
- if [[ $d = *.so ]]; then | ||
+ if [[ $d = *.dll ]]; then | ||
sodepends=1 | ||
break | ||
fi | ||
@@ -479,28 +479,33 @@ find_libdepends() { | ||
return 0 | ||
fi | ||
|
||
- local libdeps filename soarch sofile soname soversion | ||
+ local libdeps filename soarch sofile soname | ||
declare -A libdeps | ||
|
||
while IFS= read -rd '' filename; do | ||
- # get architecture of the file; if soarch is empty it's not an ELF binary | ||
- soarch=$(LC_ALL=C readelf -h "$filename" 2>/dev/null | sed -n 's/.*Class.*ELF\(32\|64\)/\1/p') | ||
+ # get architecture of the file; if soarch is empty it's not an binary | ||
+ soarch=$(LANG=en_US.UTF-8 LC_ALL=C objdump -a "$filename" | sed -n 's/.*file format.*pei-\(i386\|x86-64\)/\1/p') | ||
[[ -n "$soarch" ]] || continue | ||
+ case "$soarch" in | ||
+ i386) | ||
+ soarch=i686 | ||
+ ;; | ||
+ x86-64) | ||
+ soarch=x86_64 | ||
+ ;; | ||
+ esac | ||
|
||
# process all libraries needed by the binary | ||
- for sofile in $(LC_ALL=C readelf -d "$filename" 2>/dev/null | sed -nr 's/.*Shared library: \[(.*)\].*/\1/p') | ||
+ for sofile in $(LC_ALL=C objdump -x "$filename" 2>/dev/null | sed -nr 's/.*DLL Name: (.*).*/\1/p') | ||
do | ||
- # extract the library name: libfoo.so | ||
- soname="${sofile%.so?(+(.+([0-9])))}".so | ||
- # extract the major version: 1 | ||
- soversion="${sofile##*\.so\.}" | ||
+ soname=${sofile} | ||
|
||
if [[ ${libdeps[$soname]} ]]; then | ||
- if [[ ${libdeps[$soname]} != *${soversion}-${soarch}* ]]; then | ||
- libdeps[$soname]+=" ${soversion}-${soarch}" | ||
+ if [[ ${libdeps[$soname]} != *${soarch}* ]]; then | ||
+ libdeps[$soname]+=" ${soarch}" | ||
fi | ||
else | ||
- libdeps[$soname]="${soversion}-${soarch}" | ||
+ libdeps[$soname]="${soarch}" | ||
fi | ||
done | ||
done < <(find "$pkgdir" -type f -perm -u+x -print0) | ||
@@ -508,7 +513,7 @@ find_libdepends() { | ||
local libdepends v | ||
for d in "${depends[@]}"; do | ||
case "$d" in | ||
- *.so) | ||
+ *.dll) | ||
if [[ ${libdeps[$d]} ]]; then | ||
for v in ${libdeps[$d]}; do | ||
libdepends+=("$d=$v") |
10 changes: 5 additions & 5 deletions
10
pacman/0002-makepkg-build-env-export.patch → pacman/0004-makepkg-build-env-export.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
pacman/0005-makepkg-find_libprovides-port-to-Windows.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
From e17f32548b02f143ec175dedd3130fdeee101787 Mon Sep 17 00:00:00 2001 | ||
From: Christoph Reiter <reiter.christoph@gmail.com> | ||
Date: Tue, 28 Feb 2023 20:30:23 +0100 | ||
Subject: [PATCH 05/N] makepkg: find_libprovides: port to Windows | ||
|
||
--- | ||
scripts/makepkg.sh.in | 35 ++++++++++++++--------------------- | ||
1 file changed, 14 insertions(+), 21 deletions(-) | ||
|
||
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in | ||
index 2a85702..6384c35 100644 | ||
--- a/scripts/makepkg.sh.in | ||
+++ b/scripts/makepkg.sh.in | ||
@@ -539,30 +539,23 @@ find_libprovides() { | ||
missing=0 | ||
versioned_provides=() | ||
case "$p" in | ||
- *.so) | ||
- mapfile -t filename < <(find "$pkgdir" -type f -name $p\* | LC_ALL=C sort) | ||
+ *.dll) | ||
+ mapfile -t filename < <(find "$pkgdir" -type f -name $p) | ||
if [[ $filename ]]; then | ||
# packages may provide multiple versions of the same library | ||
for fn in "${filename[@]}"; do | ||
- # check if we really have a shared object | ||
- if LC_ALL=C readelf -h "$fn" 2>/dev/null | grep -q '.*Type:.*DYN (Shared object file).*'; then | ||
- # get the string binaries link to (e.g. libfoo.so.1.2 -> libfoo.so.1) | ||
- local sofile=$(LC_ALL=C readelf -d "$fn" 2>/dev/null | sed -n 's/.*Library soname: \[\(.*\)\].*/\1/p') | ||
- if [[ -z "$sofile" ]]; then | ||
- warning "$(gettext "Library listed in %s is not versioned: %s")" "'provides'" "$p" | ||
- continue | ||
- fi | ||
- | ||
- # get the library architecture (32 or 64 bit) | ||
- local soarch=$(LC_ALL=C readelf -h "$fn" | sed -n 's/.*Class.*ELF\(32\|64\)/\1/p') | ||
- | ||
- # extract the library major version | ||
- local soversion="${sofile##*\.so\.}" | ||
- | ||
- versioned_provides+=("${p}=${soversion}-${soarch}") | ||
- else | ||
- warning "$(gettext "Library listed in %s is not a shared object: %s")" "'provides'" "$p" | ||
- fi | ||
+ # get the library architecture (32 or 64 bit) | ||
+ local soarch=$(LC_ALL=C objdump -a "$fn" | sed -n 's/.*file format.*pei-\(i386\|x86-64\)/\1/p') | ||
+ case "$soarch" in | ||
+ i386) | ||
+ soarch=i686 | ||
+ ;; | ||
+ x86-64) | ||
+ soarch=x86_64 | ||
+ ;; | ||
+ esac | ||
+ | ||
+ versioned_provides+=("${p}=${soarch}") | ||
done | ||
else | ||
missing=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.