From 57a56f04f68f5f731baa14f4c1cd679ff25b1e92 Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Sun, 16 Oct 2016 13:26:25 +0200 Subject: build: added missing dependencies --- blogc.spec.in | 4 ++-- configure.ac | 37 ++++++++++++++++--------------------- 2 files changed, 18 insertions(+), 23 deletions(-) diff --git a/blogc.spec.in b/blogc.spec.in index 5a8d685..f3a7785 100644 --- a/blogc.spec.in +++ b/blogc.spec.in @@ -6,9 +6,9 @@ Group: Applications/Text Summary: A blog compiler URL: @PACKAGE_URL@ Source0: https://github.com/blogc/blogc/releases/download/v@PACKAGE_VERSION@/blogc-@PACKAGE_VERSION@.tar.xz -BuildRequires: libcmocka-devel +BuildRequires: libcmocka-devel, bash, coreutils, diffutils %if ! 0%{?el6} -BuildRequires: git +BuildRequires: git, tar, make %endif %description diff --git a/configure.ac b/configure.ac index 3442771..b7abf15 100644 --- a/configure.ac +++ b/configure.ac @@ -149,13 +149,27 @@ AS_IF([test "x$enable_tests" != "xno"], [ ]) AC_PATH_PROG([git], [git]) + AC_PATH_PROG([make], [make]) AC_PATH_PROG([tar], [tar]) - AS_IF([test "x$ac_cv_path_git" = "x" -o "x$ac_cv_path_tar" = "x"], [ + AS_IF([test "x$ac_cv_path_git" = "x" -o "x$ac_cv_path_make" = "x" -o "x$ac_cv_path_tar" = "x"], [ have_bgr_deps=no + AS_IF([test "x$have_git_receiver" = "xyes"], [ + have_tests=no + TESTS="disabled" + AS_IF([test "x$enable_tests" = "xyes"], [ + AC_MSG_ERROR([tests requested for blogc-git-receiver but git and/or tar not found]) + ], [ + AC_MSG_WARN([git and/or tar not found, install it to run blogc-git-receiver tests]) + ]) + ]) ], [ have_bgr_deps=yes ]) - AS_IF([test "x$have_blogc_deps" = "xyes"],, [ + + AC_PATH_PROG([bash], [bash]) + AC_PATH_PROG([diff], [diff]) + AC_PATH_PROG([tee], [tee]) + AS_IF([test "x$ac_cv_path_bash" = "x" -o "x$ac_cv_path_diff" = "x" -o "x$ac_cv_path_tee" = "x"], [ have_tests=no TESTS="disabled" AS_IF([test "x$enable_tests" = "xyes"], [ @@ -163,29 +177,10 @@ AS_IF([test "x$enable_tests" != "xno"], [ ], [ AC_MSG_WARN([bash, diff and/or tee not found, install it to run tests]) ]) - ]) - - AC_PATH_PROG([bash], [bash]) - AC_PATH_PROG([diff], [diff]) - AC_PATH_PROG([tee], [tee]) - AS_IF([test "x$ac_cv_path_bash" = "x" -o "x$ac_cv_path_diff" = "x" -o "x$ac_cv_path_tee" = "x"], [ - have_blogc_deps=no ], [ - have_blogc_deps=yes have_tests=yes TESTS="enabled" ]) - AS_IF([test "x$have_bgr_deps" = "xyes"],, [ - AS_IF([test "x$have_git_receiver" = "xyes"], [ - have_tests=no - TESTS="disabled" - AS_IF([test "x$enable_tests" = "xyes"], [ - AC_MSG_ERROR([tests requested for blogc-git-receiver but git and/or tar not found]) - ], [ - AC_MSG_WARN([git and/or tar not found, install it to run blogc-git-receiver tests]) - ]) - ]) - ]) ]) AM_CONDITIONAL([BUILD_TESTS], [test "x$have_tests" = "xyes"]) AM_CONDITIONAL([USE_CMOCKA], [test "x$have_cmocka" = "xyes"]) -- cgit v1.2.3-18-g5258