Skip to content

Commit

Permalink
app-emulation/wine-any: QA, use failglob
Browse files Browse the repository at this point in the history
Addresses some of the issues in #615218

Package-Manager: Portage-2.3.3, Repoman-2.3.1
  • Loading branch information
NP-Hardass committed Apr 11, 2017
1 parent 892e88d commit 639e586
Show file tree
Hide file tree
Showing 7 changed files with 91 additions and 35 deletions.
18 changes: 13 additions & 5 deletions app-emulation/wine-any/wine-any-2.0.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,6 @@ multilib_src_test() {

multilib_src_install_all() {
local DOCS=( ANNOUNCE AUTHORS README )
local l
add_locale_docs() {
local locale_doc="documentation/README.$1"
[[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
Expand Down Expand Up @@ -545,22 +544,31 @@ multilib_src_install_all() {
dosym "${MY_PREFIX}"/bin/wine{64,}-preloader
fi

# Failglob for bin and man loops
local glob_state=$(shopt -p failglob)
shopt -s failglob

# Make wrappers for binaries for handling multiple variants
# Note: wrappers instead of symlinks because some are shell which use basename
local b
for b in "${D%/}${MY_PREFIX}"/bin/*; do
make_wrapper ${b##*/}-${WINE_VARIANT} "${MY_PREFIX}"/bin/${b##*/}
make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}"
done

# respect LINGUAS when installing man pages, #469418
local l
for l in de fr pl; do
use linguas_${l} || rm -r "${D%/}${MY_MANDIR}"/${l}*
done

local m
for m in "${D%/}${MY_MANDIR}"/*/*; do
new_man=${m##*/}
new_man=${new_man%%.1}
newman "${m}" ${new_man##*/}-${WINE_VARIANT}.1
new_man="${m##*/}"
new_man="${new_man%%.1}"
newman "${m}" "${new_man##*/}-${WINE_VARIANT}.1"
done

eval "${glob_state}"
}

pkg_postinst() {
Expand Down
18 changes: 13 additions & 5 deletions app-emulation/wine-any/wine-any-2.1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,6 @@ multilib_src_test() {

multilib_src_install_all() {
local DOCS=( ANNOUNCE AUTHORS README )
local l
add_locale_docs() {
local locale_doc="documentation/README.$1"
[[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
Expand Down Expand Up @@ -545,22 +544,31 @@ multilib_src_install_all() {
dosym "${MY_PREFIX}"/bin/wine{64,}-preloader
fi

# Failglob for bin and man loops
local glob_state=$(shopt -p failglob)
shopt -s failglob

# Make wrappers for binaries for handling multiple variants
# Note: wrappers instead of symlinks because some are shell which use basename
local b
for b in "${D%/}${MY_PREFIX}"/bin/*; do
make_wrapper ${b##*/}-${WINE_VARIANT} "${MY_PREFIX}"/bin/${b##*/}
make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}"
done

# respect LINGUAS when installing man pages, #469418
local l
for l in de fr pl; do
use linguas_${l} || rm -r "${D%/}${MY_MANDIR}"/${l}*
done

local m
for m in "${D%/}${MY_MANDIR}"/*/*; do
new_man=${m##*/}
new_man=${new_man%%.1}
newman "${m}" ${new_man##*/}-${WINE_VARIANT}.1
new_man="${m##*/}"
new_man="${new_man%%.1}"
newman "${m}" "${new_man##*/}-${WINE_VARIANT}.1"
done

eval "${glob_state}"
}

pkg_postinst() {
Expand Down
18 changes: 13 additions & 5 deletions app-emulation/wine-any/wine-any-2.2.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,6 @@ multilib_src_test() {

multilib_src_install_all() {
local DOCS=( ANNOUNCE AUTHORS README )
local l
add_locale_docs() {
local locale_doc="documentation/README.$1"
[[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
Expand Down Expand Up @@ -545,22 +544,31 @@ multilib_src_install_all() {
dosym "${MY_PREFIX}"/bin/wine{64,}-preloader
fi

# Failglob for bin and man loops
local glob_state=$(shopt -p failglob)
shopt -s failglob

# Make wrappers for binaries for handling multiple variants
# Note: wrappers instead of symlinks because some are shell which use basename
local b
for b in "${D%/}${MY_PREFIX}"/bin/*; do
make_wrapper ${b##*/}-${WINE_VARIANT} "${MY_PREFIX}"/bin/${b##*/}
make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}"
done

# respect LINGUAS when installing man pages, #469418
local l
for l in de fr pl; do
use linguas_${l} || rm -r "${D%/}${MY_MANDIR}"/${l}*
done

local m
for m in "${D%/}${MY_MANDIR}"/*/*; do
new_man=${m##*/}
new_man=${new_man%%.1}
newman "${m}" ${new_man##*/}-${WINE_VARIANT}.1
new_man="${m##*/}"
new_man="${new_man%%.1}"
newman "${m}" "${new_man##*/}-${WINE_VARIANT}.1"
done

eval "${glob_state}"
}

pkg_postinst() {
Expand Down
18 changes: 13 additions & 5 deletions app-emulation/wine-any/wine-any-2.3.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,6 @@ multilib_src_test() {

multilib_src_install_all() {
local DOCS=( ANNOUNCE AUTHORS README )
local l
add_locale_docs() {
local locale_doc="documentation/README.$1"
[[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
Expand Down Expand Up @@ -545,22 +544,31 @@ multilib_src_install_all() {
dosym "${MY_PREFIX}"/bin/wine{64,}-preloader
fi

# Failglob for bin and man loops
local glob_state=$(shopt -p failglob)
shopt -s failglob

# Make wrappers for binaries for handling multiple variants
# Note: wrappers instead of symlinks because some are shell which use basename
local b
for b in "${D%/}${MY_PREFIX}"/bin/*; do
make_wrapper ${b##*/}-${WINE_VARIANT} "${MY_PREFIX}"/bin/${b##*/}
make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}"
done

# respect LINGUAS when installing man pages, #469418
local l
for l in de fr pl; do
use linguas_${l} || rm -r "${D%/}${MY_MANDIR}"/${l}*
done

local m
for m in "${D%/}${MY_MANDIR}"/*/*; do
new_man=${m##*/}
new_man=${new_man%%.1}
newman "${m}" ${new_man##*/}-${WINE_VARIANT}.1
new_man="${m##*/}"
new_man="${new_man%%.1}"
newman "${m}" "${new_man##*/}-${WINE_VARIANT}.1"
done

eval "${glob_state}"
}

pkg_postinst() {
Expand Down
18 changes: 13 additions & 5 deletions app-emulation/wine-any/wine-any-2.4.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,6 @@ multilib_src_test() {

multilib_src_install_all() {
local DOCS=( ANNOUNCE AUTHORS README )
local l
add_locale_docs() {
local locale_doc="documentation/README.$1"
[[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
Expand Down Expand Up @@ -545,22 +544,31 @@ multilib_src_install_all() {
dosym "${MY_PREFIX}"/bin/wine{64,}-preloader
fi

# Failglob for bin and man loops
local glob_state=$(shopt -p failglob)
shopt -s failglob

# Make wrappers for binaries for handling multiple variants
# Note: wrappers instead of symlinks because some are shell which use basename
local b
for b in "${D%/}${MY_PREFIX}"/bin/*; do
make_wrapper ${b##*/}-${WINE_VARIANT} "${MY_PREFIX}"/bin/${b##*/}
make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}"
done

# respect LINGUAS when installing man pages, #469418
local l
for l in de fr pl; do
use linguas_${l} || rm -r "${D%/}${MY_MANDIR}"/${l}*
done

local m
for m in "${D%/}${MY_MANDIR}"/*/*; do
new_man=${m##*/}
new_man=${new_man%%.1}
newman "${m}" ${new_man##*/}-${WINE_VARIANT}.1
new_man="${m##*/}"
new_man="${new_man%%.1}"
newman "${m}" "${new_man##*/}-${WINE_VARIANT}.1"
done

eval "${glob_state}"
}

pkg_postinst() {
Expand Down
18 changes: 13 additions & 5 deletions app-emulation/wine-any/wine-any-2.5.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,6 @@ multilib_src_test() {

multilib_src_install_all() {
local DOCS=( ANNOUNCE AUTHORS README )
local l
add_locale_docs() {
local locale_doc="documentation/README.$1"
[[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
Expand Down Expand Up @@ -545,22 +544,31 @@ multilib_src_install_all() {
dosym "${MY_PREFIX}"/bin/wine{64,}-preloader
fi

# Failglob for bin and man loops
local glob_state=$(shopt -p failglob)
shopt -s failglob

# Make wrappers for binaries for handling multiple variants
# Note: wrappers instead of symlinks because some are shell which use basename
local b
for b in "${D%/}${MY_PREFIX}"/bin/*; do
make_wrapper ${b##*/}-${WINE_VARIANT} "${MY_PREFIX}"/bin/${b##*/}
make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}"
done

# respect LINGUAS when installing man pages, #469418
local l
for l in de fr pl; do
use linguas_${l} || rm -r "${D%/}${MY_MANDIR}"/${l}*
done

local m
for m in "${D%/}${MY_MANDIR}"/*/*; do
new_man=${m##*/}
new_man=${new_man%%.1}
newman "${m}" ${new_man##*/}-${WINE_VARIANT}.1
new_man="${m##*/}"
new_man="${new_man%%.1}"
newman "${m}" "${new_man##*/}-${WINE_VARIANT}.1"
done

eval "${glob_state}"
}

pkg_postinst() {
Expand Down
18 changes: 13 additions & 5 deletions app-emulation/wine-any/wine-any-9999.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,6 @@ multilib_src_test() {

multilib_src_install_all() {
local DOCS=( ANNOUNCE AUTHORS README )
local l
add_locale_docs() {
local locale_doc="documentation/README.$1"
[[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
Expand Down Expand Up @@ -545,22 +544,31 @@ multilib_src_install_all() {
dosym "${MY_PREFIX}"/bin/wine{64,}-preloader
fi

# Failglob for bin and man loops
local glob_state=$(shopt -p failglob)
shopt -s failglob

# Make wrappers for binaries for handling multiple variants
# Note: wrappers instead of symlinks because some are shell which use basename
local b
for b in "${D%/}${MY_PREFIX}"/bin/*; do
make_wrapper ${b##*/}-${WINE_VARIANT} "${MY_PREFIX}"/bin/${b##*/}
make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}"
done

# respect LINGUAS when installing man pages, #469418
local l
for l in de fr pl; do
use linguas_${l} || rm -r "${D%/}${MY_MANDIR}"/${l}*
done

local m
for m in "${D%/}${MY_MANDIR}"/*/*; do
new_man=${m##*/}
new_man=${new_man%%.1}
newman "${m}" ${new_man##*/}-${WINE_VARIANT}.1
new_man="${m##*/}"
new_man="${new_man%%.1}"
newman "${m}" "${new_man##*/}-${WINE_VARIANT}.1"
done

eval "${glob_state}"
}

pkg_postinst() {
Expand Down

0 comments on commit 639e586

Please sign in to comment.