fix build on eoan

master
Marc Wäckerlin 5 years ago
parent 3bd608adc8
commit 50690bcb68
  1. 2
      ax_init_standard_project.m4
  2. 20
      bootstrap.sh
  3. 23
      build-in-docker.sh
  4. 17
      template.sh

@ -962,8 +962,8 @@ AC_DEFUN([AX_PKG_CHECK], [
# $2 = pathes to search for # $2 = pathes to search for
AC_DEFUN([AX_REQUIRE_HEADER], [ AC_DEFUN([AX_REQUIRE_HEADER], [
AC_CHECK_HEADER($1, [], [ AC_CHECK_HEADER($1, [], [
found=0
if test -n "$2"; then if test -n "$2"; then
found=0
for d in $2; do for d in $2; do
if test -f "${d}/$1"; then if test -f "${d}/$1"; then
AC_MSG_NOTICE([found file ${d}/$1]) AC_MSG_NOTICE([found file ${d}/$1])

@ -1,7 +1,7 @@
#! /bin/bash #! /bin/bash
## @file ## @file
## ##
## $Id$ ## $Id: bootstrap.sh 52 2015-11-03 15:38:21Z marc $
## ##
## $Date: 2004/08/31 15:57:19 $ ## $Date: 2004/08/31 15:57:19 $
## $Author: marc $ ## $Author: marc $
@ -41,7 +41,7 @@ while test $# -gt 0; do
(--no-vcs|-n) novcs=1;; (--no-vcs|-n) novcs=1;;
(--exclude-vcs|-x) shift; excludevcs+=("$1");; (--exclude-vcs|-x) shift; excludevcs+=("$1");;
(--version|-v) (--version|-v)
echo "$Id$"; echo "$Id: bootstrap.sh 52 2015-11-03 15:38:21Z marc $";
exit;; exit;;
(--help|-h) less <<EOF (--help|-h) less <<EOF
SYNOPSIS SYNOPSIS
@ -131,7 +131,6 @@ GENERATED FILES
* ax_init_standard_project.m4 - auxiliary macro definition file * ax_init_standard_project.m4 - auxiliary macro definition file
* ax_cxx_compile_stdcxx.m4 - auxiliary macro definition file * ax_cxx_compile_stdcxx.m4 - auxiliary macro definition file
* ax_check_qt.m4 - auxiliary macro definition file * ax_check_qt.m4 - auxiliary macro definition file
* makefile_test.inc.am - makefile to be included in tests
* resolve-debbuilddeps.sh - script to install debian package dependencies * resolve-debbuilddeps.sh - script to install debian package dependencies
* resolve-rpmbuilddeps.sh - script to install RPM package dependencies * resolve-rpmbuilddeps.sh - script to install RPM package dependencies
* build-in-docker.sh - script to build the project encapsulated in a docker container * build-in-docker.sh - script to build the project encapsulated in a docker container
@ -450,7 +449,7 @@ checkdir() {
if ! test -d "$1"; then # create path if ! test -d "$1"; then # create path
run mkdir -p "$1" run mkdir -p "$1"
if test -n "${VCS}" -a $novcs -eq 0 && ! contains "$1" "${excludevcs[@]}"; then if test -n "${VCS}" -a $novcs -eq 0 && ! contains "$1" "${excludevcs[@]}"; then
run ${VCS} add "$1" run --no-check ${VCS} add "$1"
fi fi
fi fi
} }
@ -498,7 +497,7 @@ to() {
run chmod $mode $1 run chmod $mode $1
if test $exists -eq 0; then if test $exists -eq 0; then
if test -n "${VCS}" -a $novcs -eq 0 && ! contains "$1" "${excludevcs[@]}"; then if test -n "${VCS}" -a $novcs -eq 0 && ! contains "$1" "${excludevcs[@]}"; then
run ${VCS} add "$1" run --no-check ${VCS} add "$1"
if test "${VCS}" = "svn"; then if test "${VCS}" = "svn"; then
run svn propset svn:keywords "Id" "$1" run svn propset svn:keywords "Id" "$1"
fi fi
@ -523,10 +522,14 @@ copy() {
if test "${1%/*}" != "$1"; then if test "${1%/*}" != "$1"; then
test -d "${1%/*}" || svn mkdir "${1%/*}" test -d "${1%/*}" || svn mkdir "${1%/*}"
fi fi
if ! test -e "${source}"; then
ignored "$1" not found
return
fi
run cp "${source}" "$1" run cp "${source}" "$1"
if test $exists -eq 0; then if test $exists -eq 0; then
if test -n "${VCS}" -a $novcs -eq 0 && ! contains "$1" "${excludevcs[@]}"; then if test -n "${VCS}" -a $novcs -eq 0 && ! contains "$1" "${excludevcs[@]}"; then
run ${VCS} add "$1" run --no-check ${VCS} add "$1"
if test "${VCS}" = "svn"; then if test "${VCS}" = "svn"; then
run svn propset svn:keywords "Id" "$1" run svn propset svn:keywords "Id" "$1"
fi fi
@ -575,7 +578,7 @@ vcs2cl() {
fi fi
if test $exists -eq 0; then if test $exists -eq 0; then
if test -n "${VCS}" -a $novcs -eq 0 && ! contains "ChangeLog" "${excludevcs[@]}"; then if test -n "${VCS}" -a $novcs -eq 0 && ! contains "ChangeLog" "${excludevcs[@]}"; then
run ${VCS} add ChangeLog run --no-check ${VCS} add ChangeLog
fi fi
fi fi
} }
@ -593,7 +596,6 @@ copy ${MY_NAME}
copy ax_init_standard_project.m4 copy ax_init_standard_project.m4
copy ax_cxx_compile_stdcxx.m4 copy ax_cxx_compile_stdcxx.m4
copy ax_check_qt.m4 copy ax_check_qt.m4
copy makefile_test.inc.am
copy resolve-debbuilddeps.sh copy resolve-debbuilddeps.sh
copy resolve-rpmbuilddeps.sh copy resolve-rpmbuilddeps.sh
copy build-in-docker.sh copy build-in-docker.sh
@ -1508,7 +1510,7 @@ if testtag AX_USE_DOXYGEN; then
sed -i ':a;/\\$/{s///;N;s/ *\n */ /g;ba}' doc/doxyfile.in sed -i ':a;/\\$/{s///;N;s/ *\n */ /g;ba}' doc/doxyfile.in
if test $exists -eq 0; then if test $exists -eq 0; then
if test -n "${VCS}" -a $novcs -eq 0 && ! contains "doc/doxyfile" "${excludevcs[@]}"; then if test -n "${VCS}" -a $novcs -eq 0 && ! contains "doc/doxyfile" "${excludevcs[@]}"; then
run ${VCS} add doc/doxyfile.in run --no-check ${VCS} add doc/doxyfile.in
if test "${VCS}" = "svn"; then if test "${VCS}" = "svn"; then
run svn propset svn:keywords "Id" doc/doxyfile.in run svn propset svn:keywords "Id" doc/doxyfile.in
fi fi

@ -278,25 +278,18 @@ fi
case "$mode" in case "$mode" in
(deb|apt|win) (deb|apt|win)
OPTIONS='-o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confnew -y --force-yes --no-install-suggests --no-install-recommends' OPTIONS='-o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confnew -y --force-yes --no-install-suggests --no-install-recommends'
PREVENT='libpam-systemd policykit.* colord dconf-service'
docker exec ${DOCKER_ID} apt-get update ${OPTIONS} docker exec ${DOCKER_ID} apt-get update ${OPTIONS}
docker exec ${DOCKER_ID} apt-mark hold ${PREVENT}
#docker exec ${DOCKER_ID} apt-get upgrade ${OPTIONS} #docker exec ${DOCKER_ID} apt-get upgrade ${OPTIONS}
docker exec ${DOCKER_ID} apt-get install ${OPTIONS} ${PREVENT// /- }- python-software-properties software-properties-common apt-transport-https dpkg-dev lsb-release wget || \ docker exec ${DOCKER_ID} apt-get install ${OPTIONS} python-software-properties software-properties-common apt-transport-https dpkg-dev lsb-release wget || \
docker exec ${DOCKER_ID} apt-get install ${OPTIONS} ${PREVENT// /- }- software-properties-common apt-transport-https dpkg-dev lsb-release wget || \ docker exec ${DOCKER_ID} apt-get install ${OPTIONS} software-properties-common apt-transport-https dpkg-dev lsb-release wget || \
docker exec ${DOCKER_ID} apt-get install ${OPTIONS} ${PREVENT// /- }- python-software-properties apt-transport-https dpkg-dev lsb-release wget; docker exec ${DOCKER_ID} apt-get install ${OPTIONS} python-software-properties apt-transport-https dpkg-dev lsb-release wget;
if [[ "${img}" =~ "ubuntu" ]]; then if [[ "${img}" =~ "ubuntu" ]]; then
docker exec ${DOCKER_ID} apt-get install ${OPTIONS} ${PREVENT// /- }- locales docker exec ${DOCKER_ID} apt-get install ${OPTIONS} locales
docker exec ${DOCKER_ID} locale-gen ${LANG} docker exec ${DOCKER_ID} locale-gen ${LANG}
docker exec ${DOCKER_ID} update-locale LANG=${LANG} docker exec ${DOCKER_ID} update-locale LANG=${LANG}
fi fi
for f in ${PREVENT}; do if test -n "${keys[*]}"; then # fix dependency bug in cosmic and stretch
docker exec ${DOCKER_ID} bash -c "echo 'Package: ${f}' >> /etc/apt/preferences" docker exec ${DOCKER_ID} apt-get install ${OPTIONS} gnupg
docker exec ${DOCKER_ID} bash -c "echo 'Pin-Priority: -100' >> /etc/apt/preferences"
docker exec ${DOCKER_ID} bash -c "echo >> /etc/apt/preferences"
done
if test -n "${keys[@]}"; then # fix dependency bug in cosmic and stretch
docker exec ${DOCKER_ID} apt-get install ${OPTIONS} ${PREVENT// /- }- gnupg
for key in "${keys[@]}"; do for key in "${keys[@]}"; do
wget -O- "$key" \ wget -O- "$key" \
| docker exec -i ${DOCKER_ID} apt-key add - | docker exec -i ${DOCKER_ID} apt-key add -
@ -308,7 +301,7 @@ case "$mode" in
docker exec ${DOCKER_ID} apt-get update ${OPTIONS} docker exec ${DOCKER_ID} apt-get update ${OPTIONS}
for package in "${packages[@]}"; do for package in "${packages[@]}"; do
ifthenelse "${package}" "apt-get install ${OPTIONS} ${PREVENT// /- }- ARG" ifthenelse "${package}" "apt-get install ${OPTIONS} ARG"
done done
for command in "${commands[@]}"; do for command in "${commands[@]}"; do
ifthenelse "${command}" "ARG" ifthenelse "${command}" "ARG"
@ -369,7 +362,7 @@ docker exec -u $(id -u):$(id -g) ${DOCKER_ID} ./bootstrap.sh -t "${targets}" ${h
# not supported in trusty and jessie # not supported in trusty and jessie
if test "$mode" = deb -a "${img//trusty/}" = "${img}" -a "${img//jessie/}" = "${img}"; then if test "$mode" = deb -a "${img//trusty/}" = "${img}" -a "${img//jessie/}" = "${img}"; then
if test "${targets//deb/}" != "${targets}" && ls *.deb > /dev/null 2> /dev/null; then if test "${targets//deb/}" != "${targets}" && ls *.deb > /dev/null 2> /dev/null; then
docker exec ${DOCKER_ID} bash -c "apt-get install ${OPTIONS} ${PREVENT// /- }- /workdir/*.deb" docker exec ${DOCKER_ID} bash -c "apt-get install ${OPTIONS} /workdir/*.deb"
fi fi
fi fi
if test "$mode" = rpm -a "${targets//rpm/}" != "${targets}"; then if test "$mode" = rpm -a "${targets//rpm/}" != "${targets}"; then

@ -1,5 +1,7 @@
#!/bin/bash -e #!/bin/bash -e
# documentation: run with option --help
########################################################################################## ##########################################################################################
#### template for bash scripts #### START BELOW ########################################## #### template for bash scripts #### START BELOW ##########################################
########################################################################################## ##########################################################################################
@ -45,25 +47,25 @@ message() {
# write a success message # write a success message
success() { success() {
echo -n "${bold}${green}success" 1>&2 echo -n "${bold}${green}success" 1>&2
append_msg $* 1>&2 append_msg "$*" 1>&2
} }
# write a notice # write a notice
notice() { notice() {
echo -n "${bold}${yellow}notice" 1>&2 echo -n "${bold}${yellow}notice" 1>&2
append_msg $* 1>&2 append_msg "$*" 1>&2
} }
# write a warning message # write a warning message
warning() { warning() {
echo -en "${bold}${red}warning" 1>&2 echo -en "${bold}${red}warning" 1>&2
append_msg $* 1>&2 append_msg "$*" 1>&2
} }
# write error message # write error message
error() { error() {
echo -en "${bold}${red}error" 1>&2 echo -en "${bold}${red}error" 1>&2
append_msg $* 1>&2 append_msg "$*" 1>&2
} }
# run a command, print the result and abort in case of error # run a command, print the result and abort in case of error
@ -91,9 +93,10 @@ run() {
exit 1 exit 1
else else
warning "ignored return code: $res" warning "ignored return code: $res"
return 0
fi fi
else else
success return 1
fi fi
} }
@ -119,7 +122,6 @@ function traperror() {
exit $e exit $e
fi fi
done done
success
exit 0 exit 0
} }
@ -135,7 +137,7 @@ trap 'traperror "$? ${PIPESTATUS[@]}" $LINENO $BASH_LINENO "$BASH_COMMAND" "${FU
######################################################### commandline parameter evaluation ######################################################### commandline parameter evaluation
while test $# -gt 0; do while test $# -gt 0; do
case "$1" in case "$1" in
(--help|-h) less <<EOF (--help|-h) cat <<EOF
SYNOPSIS SYNOPSIS
$0 [OPTIONS] $0 [OPTIONS]
@ -157,4 +159,3 @@ EOF
done done
##################################################################################### Main ##################################################################################### Main

Loading…
Cancel
Save