fixed build for mageia

master
Marc Wäckerlin 7 years ago
parent 1d2221be3c
commit dbd4ca40cf
  1. 10
      ChangeLog
  2. 62
      ax_init_standard_project.m4
  3. 15
      build-in-docker.sh
  4. 62
      mac-create-app-bundle.sh
  5. 2
      resolve-debbuilddeps.sh

@ -1,3 +1,13 @@
2018-04-04 19:45
* [r114] ChangeLog, bootstrap.sh, build-in-docker.sh:
updated build system
2018-04-04 07:00
* [r113] build-in-docker.conf:
revert repository
2018-04-03 14:27
* [r112] ChangeLog, ax_init_standard_project.m4,

@ -1066,13 +1066,16 @@ AC_DEFUN([AX_CHECK_VALID_LD_FLAG], [
# Check if a package exists in the current distribution, if yes, require it
# in debian/control.in append @DEB_DEPEND_IFEXISTS@ to Build-Depends
# if you pass a list, it will require the first matching, if any matches
# - parameter:
# $1 = package name
# $1 = space separated list of package names
AC_DEFUN([AX_DEB_DEPEND_IFEXISTS], [
pkg="$1"
if test -n "$(apt-cache policy -q ${pkg} 2> /dev/null)"; then
DEB_DEPEND_IFEXISTS="${DEB_DEPEND_IFEXISTS}, ${pkg}"
fi
for pkg in $1; do
if test -n "$(apt-cache policy -q ${pkg} 2> /dev/null)"; then
DEB_DEPEND_IFEXISTS="${DEB_DEPEND_IFEXISTS}, ${pkg}"
break
fi
done
])
# require package in debian/control.in append @DEB_BUILD_DEPEND@ to Build-Depends
@ -1109,17 +1112,19 @@ AC_DEFUN([AX_DEB_RESOLVE], [
# Check if a package exists in the current distribution, if yes, require it
# in .spec.in append @RPM_DEPEND_IFEXISTS@ to Build-Depends
# if you pass a list, it will require the first matching, if any matches
# - parameter:
# $1 = package name
# $1 = space separated package names
AC_DEFUN([AX_RPM_DEPEND_IFEXISTS], [
pkg="$1"
if (test -x /usr/bin/zypper && zypper search -x "$pkg" 1>&2 > /dev/null) || \
(test -x /usr/bin/dnf && dnf list -q "$pkg" 1>&2 > /dev/null) || \
(test -x /usr/bin/yum && yum list -q "$pkg" 1>&2 > /dev/null) || \
(test -x /usr/sbin/urpmq && urpmq "$pkg" 1>&2 > /dev/null); then
RPM_DEPEND_IFEXISTS="${RPM_DEPEND_IFEXISTS}, ${pkg}"
fi
for pkg in $1; do
if (test -x /usr/bin/zypper && zypper search -x "$pkg" 1>&2 > /dev/null) || \
(test -x /usr/bin/dnf && dnf list -q "$pkg" 1>&2 > /dev/null) || \
(test -x /usr/bin/yum && yum list -q "$pkg" 1>&2 > /dev/null) || \
(test -x /usr/sbin/urpmq && urpmq "$pkg" 1>&2 > /dev/null); then
RPM_DEPEND_IFEXISTS="${RPM_DEPEND_IFEXISTS}, ${pkg}"
break
fi
done
])
# require package in .spec.in append @RPM_BUILD_DEPEND@ to Build-Depends
@ -1160,36 +1165,23 @@ AC_DEFUN([AX_RPM_RESOLVE], [
# Check if a package exists in the current distribution, if yes, require it
# in .spec.in append @ALL_DEPEND_IFEXISTS@ to Build-Depends
# if you pass a list, it will require the first matching, if any matches
# - parameter:
# $1 = package name
# $1 = space separated list of package names
AC_DEFUN([AX_ALL_DEPEND_IFEXISTS], [
pkg="$1"
if test -n "$(apt-cache policy -q ${pkg} 2> /dev/null)"; then
DEB_DEPEND_IFEXISTS="${DEB_DEPEND_IFEXISTS}, ${pkg}"
fi
if (test -x /usr/bin/zypper && zypper search -x "$pkg" 1>&2 > /dev/null) || \
(test -x /usr/bin/dnf && dnf list -q "$pkg" 1>&2 > /dev/null) || \
(test -x /usr/bin/yum && yum list -q "$pkg" 1>&2 > /dev/null) || \
(test -x /usr/sbin/urpmq && urpmq "$pkg" 1>&2 > /dev/null); then
RPM_DEPEND_IFEXISTS="${RPM_DEPEND_IFEXISTS}, ${pkg}"
fi
AX_DEB_DEPEND_IFEXISTS([$1])
AX_RPM_DEPEND_IFEXISTS([$1])
])
# Check if a package exists in the current distribution, if yes, require it
# in .spec.in append @ALL_DEPEND_IFEXISTS@ to Build-Depends
# if you pass a list, it will require the first matching, if any matches
# - parameter:
# $1 = package name
AC_DEFUN([AX_ALL_DEPEND_IFEXISTS_DEV], [
pkg="$1"
if test -n "$(apt-cache policy -q ${pkg}-dev 2> /dev/null)"; then
DEB_DEPEND_IFEXISTS="${DEB_DEPEND_IFEXISTS}, ${pkg}-dev"
fi
if (test -x /usr/bin/zypper && zypper search -x "$pkg"-devel 1>&2 > /dev/null) || \
(test -x /usr/bin/dnf && dnf list -q "$pkg"-devel 1>&2 > /dev/null) || \
(test -x /usr/bin/yum && yum list -q "$pkg"-devel 1>&2 > /dev/null) || \
(test -x /usr/sbin/urpmq && urpmq "$pkg"-devel 1>&2 > /dev/null); then
RPM_DEPEND_IFEXISTS="${RPM_DEPEND_IFEXISTS}, ${pkg}-devel"
fi
pkgs="$1"
AX_DEB_DEPEND_IFEXISTS([${pkgs// /-dev }-dev])
AX_RPM_DEPEND_IFEXISTS([${pkgs// /-devel }-devel])
])
# require package in .spec.in append @ALL_BUILD_DEPEND@ to Build-Depends

@ -248,16 +248,18 @@ case $mode in
docker exec ${DOCKER_ID} update-locale LANG=${LANG}
fi
OPTIONS='-o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confnew -y --force-yes --no-install-suggests --no-install-recommends'
for f in 'libpam-systemd:amd64' 'policykit*' 'colord'; do
PREVENT='libpam-systemd- policykit*- colord-'
for f in 'libpam-systemd' 'policykit*' 'colord'; do
docker exec ${DOCKER_ID} bash -c "echo 'Package: $f' >> /etc/apt/preferences"
docker exec ${DOCKER_ID} bash -c "echo 'Pin-Priority: -100' >> /etc/apt/preferences"
docker exec ${DOCKER_ID} bash -c "echo >> /etc/apt/preferences"
done
docker exec ${DOCKER_ID} apt-get update ${OPTIONS}
docker exec ${DOCKER_ID} apt-mark hold 'libpam-systemd' 'policykit*' 'colord'
docker exec ${DOCKER_ID} apt-get upgrade ${OPTIONS}
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} software-properties-common 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;
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} ${PREVENT} 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;
for key in "${keys[@]}"; do
wget -O- "$key" \
| docker exec -i ${DOCKER_ID} apt-key add -
@ -267,7 +269,7 @@ case $mode in
done
docker exec ${DOCKER_ID} apt-get update ${OPTIONS}
for package in "${packages[@]}"; do
ifthenelse "${package}" "apt-get install ${OPTIONS} ARG"
ifthenelse "${package}" "apt-get install ${OPTIONS} ${PREVENT} ARG"
done
for command in "${commands[@]}"; do
ifthenelse "${command}" "ARG"
@ -300,6 +302,9 @@ EOF
docker exec -i ${DOCKER_ID} rpm --import rpm-key
rm rpm-key
done
if docker exec ${DOCKER_ID} test -x /usr/bin/dnf; then
docker exec ${DOCKER_ID} dnf install -y 'dnf-command(config-manager)'
fi
for repo in "${repos[@]}"; do
INSTALL_REPO=$((docker exec ${DOCKER_ID} test -x /usr/bin/zypper && echo zypper ar) || (docker exec ${DOCKER_ID} test -x /usr/bin/dnf && echo dnf config-manager --add-repo) || (docker exec ${DOCKER_ID} test -x /usr/bin/yum && echo wget -O/etc/yum.repos.d/additional$i.repo) || (docker exec ${DOCKER_ID} test -x /usr/sbin/urpmi && echo false))
ifthenelse "${repo}" "${INSTALL_REPO} 'ARG'"

@ -7,7 +7,7 @@
## Parameters:
## $1: name of the app-target
## $2: name of the project
## $3: installation source
## $3: package installation target
##
## 1 2 3 4 5 6 7 8
## 45678901234567890123456789012345678901234567890123456789012345678901234567890
@ -16,31 +16,33 @@ if test "$(uname -s)" != "Darwin"; then
echo "**** ERROR: run on Mac OS-X: $0"
exit 1
fi
test -n "$1"
test -n "$2"
test -d "$3"
target="$(pwd)/${1}/Contents/MacOS"
cd ${0%/*}
project=${2:-$(sed -n 's/ *m4_define *( *x_package_name, *\(.*\) *).*/\1/p' $(pwd)/configure.ac)}
apptarget=${1:-${project}.app}
sources=${3:-$(pwd)/usr}
test -n "$project"
test -d "$sources"
! test -e "$apptarget" || rm -rf "$apptarget"
target="$(pwd)/${apptarget}/Contents/MacOS"
echo "Creating $apptarget for $project from $sources"
# Step 1: create and fill app directory structure
mkdir -p ${1}/Contents/{Resources,MacOS}
! test -d ${3}/bin || \
find ${3}/bin -mindepth 1 -maxdepth 1 -exec mv {} ${1}/Contents/MacOS/ \;
executablefile=$(ls -1 ${1}/Contents/MacOS/ | head -1)
! test -d ${3}/lib || \
find ${3}/lib -mindepth 1 -maxdepth 1 -exec mv {} ${1}/Contents/MacOS/ \;
! test -d ${3}/share/${2} || \
find ${3}/share/${2} -mindepth 1 -maxdepth 1 -exec mv {} ${1}/Contents/Resources/ \;
! test -d ${3}/share/${2} || rmdir ${3}/share/${2}
! test -d ${3}/share || \
find ${3}/share -mindepth 1 -maxdepth 1 -exec mv {} ${1}/Contents/Resources/ \;
! test -d ${3}/bin || rmdir ${3}/bin
! test -d ${3}/lib || rmdir ${3}/lib
! test -d ${3}/share || rmdir ${3}/share
! test -d ${3} || \
find ${3} -mindepth 1 -maxdepth 1 -exec mv {} ${1}/Contents/Resources/ \;
! test -d ${3}/include || rm -r ${3}/include
! test -d ${3} || rmdir ${3}
! test -d ${1}/tmp || rm -r ${1}/tmp
mkdir -p ${apptarget}/Contents/{Resources,MacOS}
! test -d ${sources}/bin || \
find ${sources}/bin -mindepth 1 -maxdepth 1 -exec cp -a {} ${apptarget}/Contents/MacOS/ \;
executablefile=${apptarget}/Contents/MacOS/${project}
test -x $executablefile || executablefile=$(ls -1 ${apptarget}/Contents/MacOS/ | head -1)
! test -d ${sources}/lib || \
find ${sources}/lib -mindepth 1 -maxdepth 1 -exec cp -a {} ${apptarget}/Contents/MacOS/ \;
! test -d ${sources}/share/${project} || \
find ${sources}/share/${project} -mindepth 1 -maxdepth 1 -exec cp -a {} ${apptarget}/Contents/Resources/ \;
! test -d ${sources}/share || \
find ${sources}/share -mindepth 1 -maxdepth 1 -exec cp -a {} ${apptarget}/Contents/Resources/ \;
! test -d ${sources} || \
find ${sources} -mindepth 1 -maxdepth 1 -exec cp -a {} ${apptarget}/Contents/Resources/ \;
# Step 2: copy qt plugins, if necessary
for f in ${QT_PLUGINS}; do
@ -79,23 +81,23 @@ if test -n "${QTDIR}"; then
MENU_NIB=$(find ${QTDIR} -name .svn -o -name .git -prune -o -name qt_menu.nib -print \
| head -1)
if test -e "${MENU_NIB}"; then
rsync -r "${MENU_NIB}" ${1}/Contents/Resources/
test -d ${1}/Contents/Resources/qt_menu.nib
rsync -r "${MENU_NIB}" ${apptarget}/Contents/Resources/
test -d ${apptarget}/Contents/Resources/qt_menu.nib
fi
fi
# Step 5: copy or create info.plist
infoplist=$(find ${1}/Contents/Resources -name Info.plist)
infoplist=$(find ${apptarget}/Contents/Resources -name Info.plist)
if test -f "${infoplist}"; then
mv "${infoplist}" ${1}/Contents/Info.plist
cp -a "${infoplist}" ${apptarget}/Contents/Info.plist
else
cat > ${1}/Contents/Info.plist <<EOF
cat > ${apptarget}/Contents/Info.plist <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleIdentifier</key>
<string>${2}</string>
<string>${project}</string>
<key>CFBundleExecutable</key>
<string>${executablefile##/}</string>
</dict>

@ -24,7 +24,7 @@ else
fi
function install() {
if ${SUDO} apt-get -y install $*; then
if ${SUDO} apt-get install -y --force-yes --no-install-suggests --no-install-recommends $*; then
return 0
else
return 1

Loading…
Cancel
Save