From bab14caf37c5a83ab04c5edd472cfd41dc0773fd Mon Sep 17 00:00:00 2001 From: Pekka Helenius Date: Tue, 18 Jan 2022 12:22:57 +0200 Subject: [PATCH] [Arch] Fix git repository header configuration --- arch/0-dxvk-git/PKGBUILD | 11 ++++++----- arch/0-wine-staging-git/PKGBUILD | 17 +++++++---------- arch/updatewine_arch.sh | 19 +------------------ 3 files changed, 14 insertions(+), 33 deletions(-) diff --git a/arch/0-dxvk-git/PKGBUILD b/arch/0-dxvk-git/PKGBUILD index 4d9bec4..a8949cf 100755 --- a/arch/0-dxvk-git/PKGBUILD +++ b/arch/0-dxvk-git/PKGBUILD @@ -35,14 +35,15 @@ makedepends=( 'git' 'wine' ) -provides=('dxvk') -options=(!strip !buildflags staticlibs) -source=(${pkgname}::"git+https://github.com/doitsujin/dxvk.git#commit=HEAD") -sha256sums=('SKIP') _git_branch_dxvk=master _dxvk_commit=HEAD +provides=('dxvk') +options=(!strip !buildflags staticlibs) +source=(${pkgname}::"git+https://github.com/doitsujin/dxvk.git#commit=${_dxvk_commit}") +sha256sums=('SKIP') + ############################## # Copy custom patches to correct location @@ -71,7 +72,7 @@ prepare() { # Apply all custom patches msg2 "Applying custom patches..." - for i in "${srcdir}"/*.{patch,diff}; do + for i in "${srcdir}"/*.{patch,diff}; do if [[ -f ${i} ]]; then patch -Np1 < ${i} fi diff --git a/arch/0-wine-staging-git/PKGBUILD b/arch/0-wine-staging-git/PKGBUILD index 9561523..19cda48 100755 --- a/arch/0-wine-staging-git/PKGBUILD +++ b/arch/0-wine-staging-git/PKGBUILD @@ -30,7 +30,7 @@ else conflicts=('wine' 'wine-staging' 'wine-staging-git') fi -pkgver=stg.5.4.r8.g53b02cd0+wine.wine.5.4.r128.gc43998cb51 +pkgver=stg.5.15.2.r6.g663c3ba4+wine.wine.5.15.r83.g13ea90d80f pkgrel=1 arch=('i686' 'x86_64') @@ -122,14 +122,11 @@ optdepends=( options=('staticlibs') source=( - wine-git::'git://source.winehq.org/git/wine.git#commit=HEAD' + wine-git::"git://source.winehq.org/git/wine.git#commit=${_wine_commit}" '30-win32-aliases.conf' ) md5sums=('SKIP' '1ff4e467f59409272088d92173a0f801' - 'SKIP' - '1ff4e467f59409272088d92173a0f801' - '4ffb1f4b3b34d386595e603b35e92b0b' 'SKIP') if [[ -d ${PWD}/wine-patches ]]; then @@ -163,7 +160,7 @@ if [[ -d ${PWD}/wine-patches ]]; then fi if [[ enable_staging -eq 1 ]]; then - stagingsrc=wine-staging-git::'git://github.com/wine-staging/wine-staging.git#commit=HEAD' + stagingsrc=wine-staging-git::"git://github.com/wine-staging/wine-staging.git#commit=${_staging_commit}" source+=($stagingsrc) fi @@ -238,7 +235,7 @@ build() { # Apply all custom patches msg2 "Applying custom patches..." - for i in "${srcdir}"/*.{patch,diff}; do + for i in "${srcdir}"/*.{patch,diff}; do if [[ -f ${i} ]]; then patch -Np1 < ${i} fi @@ -311,7 +308,7 @@ package() { if [[ $enable_32 -eq 1 ]]; then msg2 "Packaging Wine-32..." - + cd "$srcdir"/"$pkgname"-32-build if [ "$CARCH" = "i686" ]; then make prefix="$pkgdir/usr" install @@ -325,7 +322,7 @@ package() { # Package wine 64-bit if [[ "$CARCH" == "x86_64" ]] && [[ enable_64 -eq 1 ]]; then - + msg2 "Packaging Wine-64..." cd "$srcdir"/"$pkgname"-64-build @@ -346,5 +343,5 @@ package() { install -d "$pkgdir"/etc/fonts/conf.{avail,d} install -m644 "${srcdir}/30-win32-aliases.conf" "${pkgdir}/etc/fonts/conf.avail" ln -s ../conf.avail/30-win32-aliases.conf "${pkgdir}/etc/fonts/conf.d/30-win32-aliases.conf" - + } diff --git a/arch/updatewine_arch.sh b/arch/updatewine_arch.sh index 60fd657..90f6879 100755 --- a/arch/updatewine_arch.sh +++ b/arch/updatewine_arch.sh @@ -366,20 +366,6 @@ function check_gitOverride_wine() { ########################################################### -function set_gitOverride() { - local git_name=${1} - local git_commithash=${2} - local pkgbuild_file=${3} - - # Match string ${git_name}#commit= - # where replace , but exclude ' " and ) after that - # - # TODO consider when there is nothing/no string after = symbol - sed -i "s!\(${git_name}#commit=\)\(.*[^'|^\"|^\)]\)!\1${git_commithash}!" "${pkgbuild_file}" -} - -########################################################### - # Remove any existing pkg,src or tar.xz packages left by previous pacman commands function cleanUp() { @@ -404,24 +390,21 @@ function build_pkg() { bash -c "updpkgsums && makepkg -o" local pkgbuild_file="${ARCH_BUILDROOT}/${pkgdir}/PKGBUILD" - + # Check git commit hashes if [[ $? -eq 0 ]] && \ [[ ${5} == gitcheck ]]; then if [[ ${pkgname} == wine ]]; then check_gitOverride_wine - set_gitOverride "wine.git" "${git_commithash_wine}" ${pkgbuild_file} sed -i "s/\(^_wine_commit=\).*/\1${git_commithash_wine}/" ${pkgbuild_file} sed -i "s/\(^_git_branch_wine=\).*/\1${git_branch_wine}/" ${pkgbuild_file} if [[ ! -v NO_STAGING ]]; then - set_gitOverride "wine-staging.git" "${git_commithash_winestaging}" ${pkgbuild_file} sed -i "s/\(^_staging_commit=\).*/\1${git_commithash_winestaging}/" ${pkgbuild_file} fi elif [[ ${pkgname} == dxvk ]]; then - set_gitOverride "dxvk.git" "${git_commithash_dxvk}" ${pkgbuild_file} sed -i "s/\(^_git_branch_dxvk=\).*/\1${git_branch_dxvk}/" ${pkgbuild_file} sed -i "s/\(^_dxvk_commit=\).*/\1${git_commithash_dxvk}/" ${pkgbuild_file} fi