mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Ladislav Michl <ladis@linux-mips.org>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH 1/2] add scons conf tool
Date: Fri, 25 Oct 2019 09:34:26 +0200	[thread overview]
Message-ID: <20191025073426.GC26830@lenoch> (raw)
In-Reply-To: <20191025073326.GB26830@lenoch>

SCons is a tool of constant reconfiguration. Almost each call
means performing the configure tests, therefore it does not fit
into PTXDist stages too well. Thus configuration and building
is done in compile stage, while install stage is using
--config=cache in hope it will not rebuild everything.
Also note that SCons does not enforce any standard targets nor
variable names, athough most projects seems to support DESTDIR
environment variable and install target.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
---
 scripts/lib/ptxd_make_world_common.sh  |  4 ++--
 scripts/lib/ptxd_make_world_compile.sh |  8 ++++++++
 scripts/lib/ptxd_make_world_install.sh | 10 ++++++++++
 scripts/lib/ptxd_make_world_prepare.sh |  7 ++++++-
 4 files changed, 26 insertions(+), 3 deletions(-)

diff --git a/scripts/lib/ptxd_make_world_common.sh b/scripts/lib/ptxd_make_world_common.sh
index dc601cc05..a759739b8 100644
--- a/scripts/lib/ptxd_make_world_common.sh
+++ b/scripts/lib/ptxd_make_world_common.sh
@@ -298,7 +298,7 @@ ptxd_make_world_init() {
     fi
 
     case "${pkg_conf_tool}" in
-	autoconf|cmake|qmake|kconfig|perl)
+	autoconf|cmake|qmake|kconfig|perl|scons)
 	    local conf_opt_ptr="ptx_conf_opt_${pkg_conf_tool}_${pkg_type}${conf_opt_ext}"
 	    local conf_env_ptr="ptx_conf_env_${pkg_type}"
 
@@ -428,7 +428,7 @@ ptxd_make_world_init() {
 	python*)
 	    pkg_install_opt="${pkg_install_opt} --root=${pkg_pkg_dir}"
 	    ;;
-	ninja)
+	ninja|scons)
 	    pkg_env="DESTDIR=\"${pkg_pkg_dir}\" ${pkg_env}"
 	    ;;
 	*)
diff --git a/scripts/lib/ptxd_make_world_compile.sh b/scripts/lib/ptxd_make_world_compile.sh
index c7093250d..5da79cace 100644
--- a/scripts/lib/ptxd_make_world_compile.sh
+++ b/scripts/lib/ptxd_make_world_compile.sh
@@ -37,6 +37,14 @@ ptxd_make_world_compile() {
 	    "${pkg_make_opt}" \
 	    "${pkg_make_par}"
 	;;
+	scons)
+	ptxd_eval \
+	    "${pkg_path}" \
+	    "${pkg_env}" \
+	    "${pkg_conf_env}" \
+	    scons -C "${pkg_build_dir}" \
+	    "${pkg_conf_opt}"
+	;;
 	*)
 	ptxd_eval \
 	    "${pkg_path}" \
diff --git a/scripts/lib/ptxd_make_world_install.sh b/scripts/lib/ptxd_make_world_install.sh
index ba8e2058e..9e5572bc2 100644
--- a/scripts/lib/ptxd_make_world_install.sh
+++ b/scripts/lib/ptxd_make_world_install.sh
@@ -98,6 +98,16 @@ ptxd_make_world_install() {
 	    -j1 \
 	)
 	;;
+	scons)
+	cmd=( \
+	    "${pkg_path}" \
+	    "${pkg_env}" \
+	    "${pkg_install_env}" \
+	    scons --config=cache \
+	    -C "${pkg_build_dir}"
+	    "${pkg_install_opt}"
+	)
+	;;
 	*)
 	cmd=( \
 	    "${pkg_path}" \
diff --git a/scripts/lib/ptxd_make_world_prepare.sh b/scripts/lib/ptxd_make_world_prepare.sh
index e21a85b0e..38e7f1051 100644
--- a/scripts/lib/ptxd_make_world_prepare.sh
+++ b/scripts/lib/ptxd_make_world_prepare.sh
@@ -204,13 +204,18 @@ ptxd_make_world_prepare() {
 		ptxd_bailout "'${pkg_label}' uses '${pkg_conf_tool}' but does not select any python"
 	    fi
 	    ;;
+	scons)
+	    if ! [[ "${pkg_build_deps}" =~ "host-python-${pkg_conf_tool}" ]]; then
+		ptxd_bailout "'${pkg_label}' uses '${pkg_conf_tool}' but does not select 'host-python-${pkg_conf_tool}'"
+	    fi
+	    ;;
     esac
 
     case "${pkg_conf_tool}" in
 	autoconf|cmake|qmake|kconfig|perl|meson)
 	    cd -- "${pkg_build_dir}" &&
 	    ptxd_make_world_prepare_"${pkg_conf_tool}" ;;
-	python|python3)
+	python|python3|scons)
 	    : ;; # nothing to do
 	"NO") echo "prepare stage disabled." ;;
 	"")   echo "No prepare tool found. Do nothing." ;;
-- 
2.24.0.rc0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

  reply	other threads:[~2019-10-25  7:34 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-25  7:33 [ptxdist] [PATCH 0/2] add scons conf tool and let gpsd to use it Ladislav Michl
2019-10-25  7:34 ` Ladislav Michl [this message]
2019-10-25  7:55   ` [ptxdist] [PATCH 1/2] add scons conf tool Michael Olbrich
2019-10-25 23:09     ` Ladislav Michl
2019-10-27  6:30       ` Michael Olbrich
2019-11-15 19:19         ` Ladislav Michl
2019-11-16 10:08           ` Michael Olbrich
2019-11-18 21:15             ` Ladislav Michl
2019-10-25  7:35 ` [ptxdist] [PATCH 2/2] gpsd: version bump 2.39 -> 3.19 Ladislav Michl
2019-10-25  8:16   ` Michael Olbrich
2019-10-25 13:17     ` [ptxdist] [PATCH v2] " Ladislav Michl
2019-10-25 13:38       ` Michael Olbrich
2019-10-25 13:58         ` Ladislav Michl
2019-10-25 23:13         ` [ptxdist] [PATCH v3] " Ladislav Michl
2019-10-27  6:22           ` Michael Olbrich
2019-10-27 16:25           ` Michael Olbrich
2019-10-27 22:29             ` Ladislav Michl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191025073426.GC26830@lenoch \
    --to=ladis@linux-mips.org \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox