Browse Source

[Debian] Add compat files; Add 'optional' keyword for deb dependencies; glslang build depends on Python 3; Fix DXVK install dep check

master
Pekka Helenius 4 years ago
parent
commit
22551ecfa1
5 changed files with 45 additions and 11 deletions
  1. +6
    -0
      debian/dxvkroot/dxvk.debdata
  2. +11
    -7
      debian/dxvkroot/dxvkbuild.sh
  3. +7
    -1
      debian/dxvkroot/glslang.debdata
  4. +6
    -0
      debian/dxvkroot/meson.debdata
  5. +15
    -3
      debian/wineroot/winebuild.sh

+ 6
- 0
debian/dxvkroot/dxvk.debdata View File

@ -26,6 +26,12 @@ pkg_gitver="git describe --long | sed 's/\-[a-z].*//; s/\-/\./; s/[a-z]//g'"
pkg_installfile="./debian/install"
pkg_controlfile="./debian/control"
pkg_rulesfile="./debian/rules"
pkg_compatfile="./debian/compat"
########################################################
# Debian compatibility flag
pkg_debcompat="9"
########################################################
# Debian rules file section


+ 11
- 7
debian/dxvkroot/dxvkbuild.sh View File

@ -344,6 +344,8 @@ function compile_and_install_deb() {
local _pkg_deps_build="${13}"
local _pkg_deps_runtime="${14}"
local _pkg_debbuilder="${15}"
local _pkg_debcompat="${16}"
local _pkg_compatfile="${17}"
############################
# COMMON - ARRAY PARAMETER FIX
@ -379,8 +381,7 @@ function compile_and_install_deb() {
############################
function pkg_installcheck() {
RETURNVALUE=$(echo $(dpkg -s "${1}" &>/dev/null)$?)
return $RETURNVALUE
return $(echo $(dpkg -s "${1}" &>/dev/null)$?)
}
############################
@ -416,7 +417,7 @@ function compile_and_install_deb() {
# Generate a list of missing dependencies
local a=0
for p in ${_pkg_list[@]}; do
if [[ $(pkg_installcheck ${p}) -eq 0 ]]; then
if [[ $(pkg_installcheck ${p})$? -eq 0 ]]; then
local _validlist[$a]=${p}
let a++
@ -439,7 +440,7 @@ function compile_and_install_deb() {
function pkg_configure() {
if [[ $(sudo dpkg-reconfigure ${1} | grep "is broken or not fully installed") ]]; then
if [[ -v ${2} ]]; then
if [[ -v ${2} ]]; then
pkg_localinstall ${2} ${1}
else
pkg_remoteinstall ${1}
@ -457,7 +458,7 @@ function compile_and_install_deb() {
altRemotepkg=$(echo ${altRemote} | awk -F ',' '{print $1}')
altRemotever=$(echo ${altRemote} | awk -F ',' '{print $2}')
if [[ "${_pkg_dep}" == "${altRemotepkg}" ]]; then
if [[ $(pkg_installcheck ${altRemotepkg}) -ne 0 ]]; then
if [[ $(pkg_installcheck ${altRemotepkg})$? -ne 0 ]]; then
# TODO remove duplicate functionality
if [[ $(apt-cache show "${altRemotepkg}" | grep -m1 -oP "(?<=^Version: )[0-9|\.]*" | sed 's/\.//g') < ${altRemotever} ]]; then
@ -481,7 +482,7 @@ function compile_and_install_deb() {
done
fi
if [[ $(pkg_installcheck ${_pkg_dep}) -ne 0 ]]; then
if [[ $(pkg_installcheck ${_pkg_dep})$? -ne 0 ]]; then
pkg_remoteinstall "${_pkg_dep}"
pkg_configure "${_pkg_dep}"
fi
@ -571,6 +572,7 @@ function compile_and_install_deb() {
pkg_override_debianfile "${_pkg_debinstall}" "${_pkg_installfile}"
pkg_override_debianfile "${_pkg_debcontrol}" "${_pkg_controlfile}"
pkg_override_debianfile "${_pkg_debrules}" "${_pkg_rulesfile}"
pkg_override_debianfile "${_pkg_debcompat}" "${_pkg_compatfile}"
else
echo -e "\e[1mERROR:\e[0m Error while downloading source of ${_pkg_name} package. Aborting\n"
@ -722,7 +724,9 @@ function pkg_install_main() {
"${pkg_rulesfile}" \
"${pkg_deps_build}" \
"${pkg_deps_runtime}" \
"${pkg_debbuilder}"
"${pkg_debbuilder}" \
"${pkg_debcompat}" \
"${pkg_compatfile}"
}


+ 7
- 1
debian/dxvkroot/glslang.debdata View File

@ -23,6 +23,12 @@ pkg_gitver="git describe --long | sed 's/\-[a-z].*//; s/\-/\./; s/[a-z]//g'"
pkg_installfile="./debian/install"
pkg_controlfile="./debian/control"
pkg_rulesfile="./debian/rules"
pkg_compatfile="./debian/compat"
########################################################
# Debian compatibility flag
pkg_debcompat="9"
########################################################
# Debian rules file section
@ -92,7 +98,7 @@ empty
pkg_deps_build=(
#${_coredeps[*]}
'cmake'
'python2.7'
'python3'
)
# Runtime dependencies


+ 6
- 0
debian/dxvkroot/meson.debdata View File

@ -25,6 +25,12 @@ pkg_gitver="git describe --long | sed 's/\-[a-z].*//; s/\-/\./; s/[a-z]//g'"
pkg_installfile="./debian/install"
pkg_controlfile="./debian/control"
pkg_rulesfile="./debian/rules"
pkg_compatfile="./debian/compat"
########################################################
# Debian compatibility flag
pkg_debcompat="9"
########################################################
# Debian rules file section


+ 15
- 3
debian/wineroot/winebuild.sh View File

@ -71,6 +71,8 @@ wine_deps_build_amd64=(
'libxi-dev:amd64'
'libxt-dev:amd64'
'libxmu-dev:amd64'
'libgl-dev:amd64'
'libglx-dev:amd64|optional'
'libx11-dev:amd64'
'libxext-dev:amd64'
'libxfixes-dev:amd64'
@ -123,6 +125,8 @@ wine_deps_build_i386=(
'libxi-dev:i386'
'libxt-dev:i386'
'libxmu-dev:i386'
'libgl-dev:i386'
'libglx-dev:i386|optional'
'libx11-dev:i386'
'libxext-dev:i386'
'libxfixes-dev:i386'
@ -621,7 +625,8 @@ function WineDeps() {
# Generate a list of missing/removable dependencies, depending on the logic
local a=0
for p in ${deplist[@]}; do
if [[ $(echo $(dpkg -s ${p} &>/dev/null)$?) -ne ${checkstatus} ]]; then
pf=$(printf "%s" ${p} | sed -r 's/^(.*)\|.*/\1/')
if [[ $(echo $(dpkg -s ${pf} &>/dev/null)$?) -ne ${checkstatus} ]]; then
local validlist[$a]=${p}
let a++
@ -637,9 +642,16 @@ function WineDeps() {
# Install missing/Remove existing dependencies, be informative
local b=0
for pkgdep in ${validlist[@]}; do
optional=0
if [[ ${pkgdep} =~ \|optional ]]; then
pkgdep=$(printf "%s" ${pkgdep} | sed -r 's/^(.*)\|.*/\1/')
optional=1
fi
echo -e "$(( $b + 1 ))/$(( ${#validlist[*]} )) - ${str} ${depsname} dependency ${pkgdep}"
eval ${mgrcmd} ${pkgdep} &> /dev/null
if [[ $? -eq 0 ]]; then
if [[ $? -eq 0 ]] || [[ ${optional} == 1 ]]; then
let b++
else
echo -e "\n\e[1mERROR:\e[0m Error occured while processing ${pkgdep}. Aborting.\n"
@ -840,7 +852,7 @@ function buildDebianArchive() {
dh_make --createorig -s -y -c lgpl
rm debian/*.{ex,EX}
printf "usr/* /usr" > debian/install
printf "9" > debian/compat
feed_debiancontrol
# Start compilation process


Loading…
Cancel
Save