diff --git a/scripts/ax_init_standard_project.m4 b/scripts/ax_init_standard_project.m4 index 8d51d64..bbbd850 100644 --- a/scripts/ax_init_standard_project.m4 +++ b/scripts/ax_init_standard_project.m4 @@ -456,6 +456,12 @@ AC_DEFUN([AX_USE_NODEJS], [ [${PATH}${PATH_SEPARATOR}${ANDROID_HOME}/tools]) AC_CONFIG_FILES([nodejs/package.json]) AC_CONFIG_FILES([nodejs/makefile]) + if test -z "${DEB_SECTION}"; then + AX_DEB_SECTION([web]) + fi + if test -z "${RPM_GROUP}"; then + AX_RPM_GROUP([Applications/Internet]) + fi AX_ADD_MAKEFILE_TARGET_DEP([maintainer-clean-am], [maintainer-clean-nodejs-targets], [nodejs/makefile.in]) test -f nodejs/makefile.in && cat >> nodejs/makefile.in <> html/makefile.in <&2 > /dev/n ull) || \ - (test -x /usr/bin/dnf && dnf list -q "${f}-devel" 1>&2 > /dev/null) || \ + if (test -x /usr/bin/zypper && zypper search -x "${f}-devel" 1>&2 > /dev/null) || \ + (test -x /usr/bin/dnf && dnf list -q "${f}-devel" 1>&2 > /dev/null) || \ (test -x /usr/bin/yum && yum list -q "${f}-devel" 1>&2 > /dev/null) || \ (test -x /usr/sbin/urpmq && urpmq "${f}-devel" 1>&2 > /dev/null); then rpm_pkg=${f}-devel @@ -911,8 +937,8 @@ AC_DEFUN([AX_PKG_CHECK], [ if test -n "$(apt-cache policy -q ${deb_pkg} 2> /dev/null)"; then AX_DEB_BUILD_DEPEND([$deb_pkg]) fi - if (test -x /usr/bin/zypper && zypper search -x "$rpm_pkg" 1>&2 > /dev/n ull) || \ - (test -x /usr/bin/dnf && dnf list -q "$rpm_pkg" 1>&2 > /dev/null) || \ + if (test -x /usr/bin/zypper && zypper search -x "$rpm_pkg" 1>&2 > /dev/null) || \ + (test -x /usr/bin/dnf && dnf list -q "$rpm_pkg" 1>&2 > /dev/null) || \ (test -x /usr/bin/yum && yum list -q "$rpm_pkg" 1>&2 > /dev/null) || \ (test -x /usr/sbin/urpmq && urpmq "$rpm_pkg" 1>&2 > /dev/null); then AX_RPM_BUILD_DEPEND([$rpm_pkg]) diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index c902949..5b1e851 100755 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -1629,15 +1629,19 @@ BuildRequires: which, pkgconfig, gnupg, expect, ${VCSDEPENDS_RPM}make, automake, if testtag AX_USE_PERLDOC; then echo -n ", libpod-tree-perl"; fi - if testtag AX_REQUIRE_QT || testtag AX_CHECK_QT AX_REQUIRE_QT; then - echo -n ", qt-devel, libqt5-qtbase-devel, libqt5-qttools, libQt5WebKit5-devel"; - fi ) @RPM_BUILD_DEPEND@ @RPM_DEPEND_IFEXISTS@ #### os dependent definitions #### %if 0%{?suse_version} || 0%{?sles_version} -BuildRequires: lsb-release +BuildRequires: lsb-release$( + if testtag AX_REQUIRE_QT || testtag AX_CHECK_QT; then + echo -n ", libqt5-qtbase-devel, libqt5-qttools, libQt5WebKit5-devel libqt5-qtwebengine-devel libQt5WebKitWidgets-devel"; + fi) %else +$( + if testtag AX_REQUIRE_QT || testtag AX_CHECK_QT; then + echo -n "BuildRequires: qt5-qtbase-devel, qt5-qttools-devel, qt5-qtwebkit-devel"; + fi) %if 0%{?mageia} BuildRequires: rpm-sign, lsb-release %else @@ -1820,6 +1824,9 @@ repos+=("ubuntu:::universe") # Use Marc Wäckerlin's Repository, see https://dev.marc.waeckerlin.org repos+=("debian|ubuntu:::https://dev.marc.waeckerlin.org/repository:::https://dev.marc.waeckerlin.org/repository/@DISTRIBUTOR@/marc-waeckerlin.repo") keys+=("https://dev.marc.waeckerlin.org/repository/PublicKey") + +# centos requires epel-release for some packages, such as Qt WebKit +packages+=("centos:::epel-release") EOF #### Cleanup If Makefile Exists #### diff --git a/scripts/build-in-docker.sh b/scripts/build-in-docker.sh index 4de62d7..161351a 100755 --- a/scripts/build-in-docker.sh +++ b/scripts/build-in-docker.sh @@ -90,7 +90,7 @@ while test $# -gt 0; do img="mwaeckerlin/ubuntu:latest"; host="${host:---host=i686-w64-mingw32}" targets="all install" flags+=("--prefix=/workdir/usr") - packages1=("mingw-w64") + packages+=("mingw-w64") ;; (*) echo "**** ERROR: unknown mode '$1', try --help" 1>&2 @@ -300,6 +300,12 @@ EOF ifthenelse "${repo}" "${INSTALL_REPO} 'ARG'" ((++i)) done + for package in "${packages[@]}"; do + ifthenelse "${package}" "${INSTALL_TOOL} ARG" + done + for command in "${commands[@]}"; do + ifthenelse "${command}" "ARG" + done docker exec ${DOCKER_ID} ./resolve-rpmbuilddeps.sh ;; esac diff --git a/scripts/resolve-debbuilddeps.sh b/scripts/resolve-debbuilddeps.sh index a6b7c4f..36a94e6 100755 --- a/scripts/resolve-debbuilddeps.sh +++ b/scripts/resolve-debbuilddeps.sh @@ -36,10 +36,7 @@ DEPS= if test -e debian/control.in -a ! -e debian/control; then function pkg_exists() { - test -n "$(${DO} apt-cache policy -q ${1})" \ - && ((! $(${DO} apt-cache policy ${1} 2>&1 \ - | grep -q 'N: Unable to locate package')) \ - && (! ${DO} dpkg -l "${1}" 1>&2 > /dev/null)) + test -n "$(${DO} apt-cache policy -q ${1})" } function AX_PKG_CHECK() { local DEV_DEB_DIST_PKG= @@ -127,4 +124,10 @@ if test -n "${TO_INSTALL}" && ! install ${TO_INSTALL}; then exit 1 fi +FILES="$(LANG= ${DO} dpkg-checkbuilddeps 2>&1 | sed -n '/Unmet build dependencies/ { s,.*Unmet build dependencies: ,,g; s, ([^)]*),,g; s, *| *,|,g; p}')" +if test -n "${FILES}"; then + echo "**** ERROR: Cannot install: " $FILES + exit 1 +fi + echo "**** Success: All Dependencies Resolved" diff --git a/scripts/resolve-rpmbuilddeps.sh b/scripts/resolve-rpmbuilddeps.sh index 5498e99..7c1843b 100755 --- a/scripts/resolve-rpmbuilddeps.sh +++ b/scripts/resolve-rpmbuilddeps.sh @@ -107,5 +107,14 @@ else fi fi +if test -n "${SCHROOTNAME}"; then + FILES=$(LANG= schroot -c ${SCHROOTNAME} -- rpmbuild -bb --clean --nobuild --define "_topdir ." --define "_sourcedir ." ${PACKAGE_NAME}.spec 2>&1 | sed -n 's, is needed by.*,,p') +else + FILES=$(LANG= rpmbuild -bb --clean --nobuild --define "_topdir ." --define "_sourcedir ." ${PACKAGE_NAME}.spec 2>&1 | sed -n 's, is needed by.*,,p') +fi +if test -n "${FILES}"; then + echo "**** ERROR: Cannot install: " $FILES + exit 1 +fi echo "**** Success: All Dependencies Resolved"