Skip to content

Commit

Permalink
app-emulation/wine: Fix use of env vars for 9999
Browse files Browse the repository at this point in the history
Package-Manager: portage-2.3.0
  • Loading branch information
NP-Hardass committed Aug 24, 2016
1 parent 5d229f2 commit ba956c8
Show file tree
Hide file tree
Showing 19 changed files with 542 additions and 124 deletions.
34 changes: 28 additions & 6 deletions app-emulation/wine/wine-1.8-r3.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,27 @@ wine_build_environment_check() {
fi
}

wine_env_vcs_vars() {
local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT"
local pn_live_val="${pn_live_var}"
eval pn_live_val='$'${pn_live_val}
if [[ ! -z ${pn_live_val} ]]; then
if use staging || use d3d9; then
eerror "Because of the multi-repo nature of ${PN}, ${pn_live_var}"
eerror "cannot be used to set the commit. Instead, you may use the"
eerror "environmental variables WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT."
eerror
return 1
fi
fi
if [[ ! -z ${EGIT_COMMIT} ]]; then
eerror "Commits must now be specified using the environmental variables"
eerror "WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT"
eerror
return 1
fi
}

pkg_pretend() {
wine_compiler_check || die
wine_build_environment_check || die
Expand All @@ -263,6 +284,7 @@ pkg_pretend() {

pkg_setup() {
wine_build_environment_check || die
wine_env_vcs_vars || die
if ! use staging; then
GV=${VANILLA_GV}
MV=${VANILLA_MV}
Expand All @@ -274,19 +296,19 @@ pkg_setup() {

src_unpack() {
if [[ ${PV} == "9999" ]] ; then
git-r3_src_unpack
EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack
if use staging; then
local WINE_COMMIT=${EGIT_VERSION}
local CURRENT_WINE_COMMIT=${EGIT_VERSION}

git-r3_fetch "${STAGING_EGIT_REPO_URI}"
git-r3_fetch "${STAGING_EGIT_REPO_URI}" "${STAGING_COMMIT}"
git-r3_checkout "${STAGING_EGIT_REPO_URI}" "${STAGING_DIR}"

local STAGING_COMMIT=$("${STAGING_DIR}/patches/patchinstall.sh" --upstream-commit) || die
local COMPAT_WINE_COMMIT=$("${STAGING_DIR}/patches/patchinstall.sh" --upstream-commit) || die

if [[ "${WINE_COMMIT}" != "${STAGING_COMMIT}" ]]; then
if [[ "${CURRENT_WINE_COMMIT}" != "${COMPAT_WINE_COMMIT}" ]]; then
einfo "The current Staging patchset is not guaranteed to apply on this WINE commit."
einfo "If src_prepare fails, try emerging with the env var EGIT_COMMIT."
einfo "Example: EGIT_COMMIT=${STAGING_COMMIT} emerge -1 wine"
einfo "Example: WINE_COMMIT=${COMPAT_WINE_COMMIT} emerge -1 wine"
fi
fi
fi
Expand Down
34 changes: 28 additions & 6 deletions app-emulation/wine/wine-1.8.1-r3.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,27 @@ wine_build_environment_check() {
fi
}

wine_env_vcs_vars() {
local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT"
local pn_live_val="${pn_live_var}"
eval pn_live_val='$'${pn_live_val}
if [[ ! -z ${pn_live_val} ]]; then
if use staging || use d3d9; then
eerror "Because of the multi-repo nature of ${PN}, ${pn_live_var}"
eerror "cannot be used to set the commit. Instead, you may use the"
eerror "environmental variables WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT."
eerror
return 1
fi
fi
if [[ ! -z ${EGIT_COMMIT} ]]; then
eerror "Commits must now be specified using the environmental variables"
eerror "WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT"
eerror
return 1
fi
}

pkg_pretend() {
wine_compiler_check || die
wine_build_environment_check || die
Expand All @@ -264,6 +285,7 @@ pkg_pretend() {

pkg_setup() {
wine_build_environment_check || die
wine_env_vcs_vars || die
if ! use staging; then
GV=${VANILLA_GV}
MV=${VANILLA_MV}
Expand All @@ -275,19 +297,19 @@ pkg_setup() {

src_unpack() {
if [[ ${PV} == "9999" ]] ; then
git-r3_src_unpack
EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack
if use staging; then
local WINE_COMMIT=${EGIT_VERSION}
local CURRENT_WINE_COMMIT=${EGIT_VERSION}

git-r3_fetch "${STAGING_EGIT_REPO_URI}"
git-r3_fetch "${STAGING_EGIT_REPO_URI}" "${STAGING_COMMIT}"
git-r3_checkout "${STAGING_EGIT_REPO_URI}" "${STAGING_DIR}"

local STAGING_COMMIT=$("${STAGING_DIR}/patches/patchinstall.sh" --upstream-commit) || die
local COMPAT_WINE_COMMIT=$("${STAGING_DIR}/patches/patchinstall.sh" --upstream-commit) || die

if [[ "${WINE_COMMIT}" != "${STAGING_COMMIT}" ]]; then
if [[ "${CURRENT_WINE_COMMIT}" != "${COMPAT_WINE_COMMIT}" ]]; then
einfo "The current Staging patchset is not guaranteed to apply on this WINE commit."
einfo "If src_prepare fails, try emerging with the env var EGIT_COMMIT."
einfo "Example: EGIT_COMMIT=${STAGING_COMMIT} emerge -1 wine"
einfo "Example: WINE_COMMIT=${COMPAT_WINE_COMMIT} emerge -1 wine"
fi
fi
fi
Expand Down
34 changes: 28 additions & 6 deletions app-emulation/wine/wine-1.8.2-r2.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,27 @@ wine_build_environment_check() {
fi
}

wine_env_vcs_vars() {
local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT"
local pn_live_val="${pn_live_var}"
eval pn_live_val='$'${pn_live_val}
if [[ ! -z ${pn_live_val} ]]; then
if use staging || use d3d9; then
eerror "Because of the multi-repo nature of ${PN}, ${pn_live_var}"
eerror "cannot be used to set the commit. Instead, you may use the"
eerror "environmental variables WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT."
eerror
return 1
fi
fi
if [[ ! -z ${EGIT_COMMIT} ]]; then
eerror "Commits must now be specified using the environmental variables"
eerror "WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT"
eerror
return 1
fi
}

pkg_pretend() {
wine_compiler_check || die
wine_build_environment_check || die
Expand All @@ -264,6 +285,7 @@ pkg_pretend() {

pkg_setup() {
wine_build_environment_check || die
wine_env_vcs_vars || die
if ! use staging; then
GV=${VANILLA_GV}
MV=${VANILLA_MV}
Expand All @@ -275,19 +297,19 @@ pkg_setup() {

src_unpack() {
if [[ ${PV} == "9999" ]] ; then
git-r3_src_unpack
EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack
if use staging; then
local WINE_COMMIT=${EGIT_VERSION}
local CURRENT_WINE_COMMIT=${EGIT_VERSION}

git-r3_fetch "${STAGING_EGIT_REPO_URI}"
git-r3_fetch "${STAGING_EGIT_REPO_URI}" "${STAGING_COMMIT}"
git-r3_checkout "${STAGING_EGIT_REPO_URI}" "${STAGING_DIR}"

local STAGING_COMMIT=$("${STAGING_DIR}/patches/patchinstall.sh" --upstream-commit) || die
local COMPAT_WINE_COMMIT=$("${STAGING_DIR}/patches/patchinstall.sh" --upstream-commit) || die

if [[ "${WINE_COMMIT}" != "${STAGING_COMMIT}" ]]; then
if [[ "${CURRENT_WINE_COMMIT}" != "${COMPAT_WINE_COMMIT}" ]]; then
einfo "The current Staging patchset is not guaranteed to apply on this WINE commit."
einfo "If src_prepare fails, try emerging with the env var EGIT_COMMIT."
einfo "Example: EGIT_COMMIT=${STAGING_COMMIT} emerge -1 wine"
einfo "Example: WINE_COMMIT=${COMPAT_WINE_COMMIT} emerge -1 wine"
fi
fi
fi
Expand Down
34 changes: 28 additions & 6 deletions app-emulation/wine/wine-1.8.3-r1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,27 @@ wine_build_environment_check() {
fi
}

wine_env_vcs_vars() {
local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT"
local pn_live_val="${pn_live_var}"
eval pn_live_val='$'${pn_live_val}
if [[ ! -z ${pn_live_val} ]]; then
if use staging || use d3d9; then
eerror "Because of the multi-repo nature of ${PN}, ${pn_live_var}"
eerror "cannot be used to set the commit. Instead, you may use the"
eerror "environmental variables WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT."
eerror
return 1
fi
fi
if [[ ! -z ${EGIT_COMMIT} ]]; then
eerror "Commits must now be specified using the environmental variables"
eerror "WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT"
eerror
return 1
fi
}

pkg_pretend() {
wine_compiler_check || die
wine_build_environment_check || die
Expand All @@ -264,6 +285,7 @@ pkg_pretend() {

pkg_setup() {
wine_build_environment_check || die
wine_env_vcs_vars || die
if ! use staging; then
GV=${VANILLA_GV}
MV=${VANILLA_MV}
Expand All @@ -275,19 +297,19 @@ pkg_setup() {

src_unpack() {
if [[ ${PV} == "9999" ]] ; then
git-r3_src_unpack
EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack
if use staging; then
local WINE_COMMIT=${EGIT_VERSION}
local CURRENT_WINE_COMMIT=${EGIT_VERSION}

git-r3_fetch "${STAGING_EGIT_REPO_URI}"
git-r3_fetch "${STAGING_EGIT_REPO_URI}" "${STAGING_COMMIT}"
git-r3_checkout "${STAGING_EGIT_REPO_URI}" "${STAGING_DIR}"

local STAGING_COMMIT=$("${STAGING_DIR}/patches/patchinstall.sh" --upstream-commit) || die
local COMPAT_WINE_COMMIT=$("${STAGING_DIR}/patches/patchinstall.sh" --upstream-commit) || die

if [[ "${WINE_COMMIT}" != "${STAGING_COMMIT}" ]]; then
if [[ "${CURRENT_WINE_COMMIT}" != "${COMPAT_WINE_COMMIT}" ]]; then
einfo "The current Staging patchset is not guaranteed to apply on this WINE commit."
einfo "If src_prepare fails, try emerging with the env var EGIT_COMMIT."
einfo "Example: EGIT_COMMIT=${STAGING_COMMIT} emerge -1 wine"
einfo "Example: WINE_COMMIT=${COMPAT_WINE_COMMIT} emerge -1 wine"
fi
fi
fi
Expand Down
36 changes: 29 additions & 7 deletions app-emulation/wine/wine-1.9.10-r3.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,27 @@ wine_build_environment_check() {
fi
}

wine_env_vcs_vars() {
local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT"
local pn_live_val="${pn_live_var}"
eval pn_live_val='$'${pn_live_val}
if [[ ! -z ${pn_live_val} ]]; then
if use staging || use d3d9; then
eerror "Because of the multi-repo nature of ${PN}, ${pn_live_var}"
eerror "cannot be used to set the commit. Instead, you may use the"
eerror "environmental variables WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT."
eerror
return 1
fi
fi
if [[ ! -z ${EGIT_COMMIT} ]]; then
eerror "Commits must now be specified using the environmental variables"
eerror "WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT"
eerror
return 1
fi
}

pkg_pretend() {
wine_compiler_check || die
wine_build_environment_check || die
Expand All @@ -271,6 +292,7 @@ pkg_pretend() {

pkg_setup() {
wine_build_environment_check || die
wine_env_vcs_vars || die
if ! use staging; then
GV=${VANILLA_GV}
MV=${VANILLA_MV}
Expand All @@ -282,23 +304,23 @@ pkg_setup() {

src_unpack() {
if [[ ${PV} == "9999" ]] ; then
git-r3_src_unpack
EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack
if use staging; then
local WINE_COMMIT=${EGIT_VERSION}
local CURRENT_WINE_COMMIT=${EGIT_VERSION}

git-r3_fetch "${STAGING_EGIT_REPO_URI}"
git-r3_fetch "${STAGING_EGIT_REPO_URI}" "${STAGING_COMMIT}"
git-r3_checkout "${STAGING_EGIT_REPO_URI}" "${STAGING_DIR}"

local STAGING_COMMIT=$("${STAGING_DIR}/patches/patchinstall.sh" --upstream-commit) || die
local COMPAT_WINE_COMMIT=$("${STAGING_DIR}/patches/patchinstall.sh" --upstream-commit) || die

if [[ "${WINE_COMMIT}" != "${STAGING_COMMIT}" ]]; then
if [[ "${CURRENT_WINE_COMMIT}" != "${COMPAT_WINE_COMMIT}" ]]; then
einfo "The current Staging patchset is not guaranteed to apply on this WINE commit."
einfo "If src_prepare fails, try emerging with the env var EGIT_COMMIT."
einfo "Example: EGIT_COMMIT=${STAGING_COMMIT} emerge -1 wine"
einfo "Example: WINE_COMMIT=${COMPAT_WINE_COMMIT} emerge -1 wine"
fi
fi
if use d3d9; then
git-r3_fetch "${D3D9_EGIT_REPO_URI}"
git-r3_fetch "${D3D9_EGIT_REPO_URI}" "${D3D9_COMMIT}"
git-r3_checkout "${D3D9_EGIT_REPO_URI}" "${D3D9_DIR}"
fi
fi
Expand Down
36 changes: 29 additions & 7 deletions app-emulation/wine/wine-1.9.11-r3.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,27 @@ wine_build_environment_check() {
fi
}

wine_env_vcs_vars() {
local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT"
local pn_live_val="${pn_live_var}"
eval pn_live_val='$'${pn_live_val}
if [[ ! -z ${pn_live_val} ]]; then
if use staging || use d3d9; then
eerror "Because of the multi-repo nature of ${PN}, ${pn_live_var}"
eerror "cannot be used to set the commit. Instead, you may use the"
eerror "environmental variables WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT."
eerror
return 1
fi
fi
if [[ ! -z ${EGIT_COMMIT} ]]; then
eerror "Commits must now be specified using the environmental variables"
eerror "WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT"
eerror
return 1
fi
}

pkg_pretend() {
wine_compiler_check || die
wine_build_environment_check || die
Expand All @@ -271,6 +292,7 @@ pkg_pretend() {

pkg_setup() {
wine_build_environment_check || die
wine_env_vcs_vars || die
if ! use staging; then
GV=${VANILLA_GV}
MV=${VANILLA_MV}
Expand All @@ -282,23 +304,23 @@ pkg_setup() {

src_unpack() {
if [[ ${PV} == "9999" ]] ; then
git-r3_src_unpack
EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack
if use staging; then
local WINE_COMMIT=${EGIT_VERSION}
local CURRENT_WINE_COMMIT=${EGIT_VERSION}

git-r3_fetch "${STAGING_EGIT_REPO_URI}"
git-r3_fetch "${STAGING_EGIT_REPO_URI}" "${STAGING_COMMIT}"
git-r3_checkout "${STAGING_EGIT_REPO_URI}" "${STAGING_DIR}"

local STAGING_COMMIT=$("${STAGING_DIR}/patches/patchinstall.sh" --upstream-commit) || die
local COMPAT_WINE_COMMIT=$("${STAGING_DIR}/patches/patchinstall.sh" --upstream-commit) || die

if [[ "${WINE_COMMIT}" != "${STAGING_COMMIT}" ]]; then
if [[ "${CURRENT_WINE_COMMIT}" != "${COMPAT_WINE_COMMIT}" ]]; then
einfo "The current Staging patchset is not guaranteed to apply on this WINE commit."
einfo "If src_prepare fails, try emerging with the env var EGIT_COMMIT."
einfo "Example: EGIT_COMMIT=${STAGING_COMMIT} emerge -1 wine"
einfo "Example: WINE_COMMIT=${COMPAT_WINE_COMMIT} emerge -1 wine"
fi
fi
if use d3d9; then
git-r3_fetch "${D3D9_EGIT_REPO_URI}"
git-r3_fetch "${D3D9_EGIT_REPO_URI}" "${D3D9_COMMIT}"
git-r3_checkout "${D3D9_EGIT_REPO_URI}" "${D3D9_DIR}"
fi
fi
Expand Down
Loading

0 comments on commit ba956c8

Please sign in to comment.