lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master ae54a1d 13/15: Add wx submodule and use wxWid


From: Greg Chicares
Subject: [lmi-commits] [lmi] master ae54a1d 13/15: Add wx submodule and use wxWidgets version from it
Date: Fri, 9 Oct 2020 12:05:28 -0400 (EDT)

branch: master
commit ae54a1d2a7143cab80401d9b12528a19bf91e430
Author: Vadim Zeitlin <vadim@tt-solutions.com>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Add wx submodule and use wxWidgets version from it
    
    Simply use submodule which is part of this repository instead of
    separately cloning wxWidgets repository in install_wx.sh. This
    simplifies the script and makes it easier to have lmi-specific changes
    to wxWidgets in the future if required.
    
    No real changes.
---
 .gitmodules    |  4 ++++
 install_wx.sh  | 47 ++++-------------------------------------------
 third_party/wx |  1 +
 3 files changed, 9 insertions(+), 43 deletions(-)

diff --git a/.gitmodules b/.gitmodules
index 33fca89..bdde583 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -10,3 +10,7 @@
        path = third_party/xmlwrapp
        url = https://github.com/let-me-illustrate/xmlwrapp.git
        branch = lmi
+[submodule "third_party/wx"]
+       path = third_party/wx
+       url = https://github.com/let-me-illustrate/wx.git
+       branch = lmi
diff --git a/install_wx.sh b/install_wx.sh
index 913d5c1..2ff0fcd 100755
--- a/install_wx.sh
+++ b/install_wx.sh
@@ -23,18 +23,8 @@
 
 set -vxe
 
-# A repository is cached in /srv/cache_for_lmi/vcs/, where it can be
-# kept up to date and reused cheaply--whereas cloning it from a remote
-# host takes considerable time and bandwidth, and fails if internet
-# connectivity is lost, or the host is temporarily unavailable, or
-# it is blocked by a corporate firewall.
-
 # Configurable settings 
########################################################
 
-remote_host_url=${remote_host_url:-"https://github.com/wxWidgets/wxWidgets.git"}
-
-wx_commit_sha=${wx_commit_sha:-"6cdaedd42ba59331b3dc4ead50e0bac76ae14c19"}
-
 wx_skip_clean=${wx_skip_clean:-"0"}
 
 coefficiency=${coefficiency:-"--jobs=$(nproc)"}
@@ -51,41 +41,12 @@ mingw_dir=/opt/lmi/${LMI_COMPILER}_${LMI_TRIPLET}/gcc_msw
 prefix=/opt/lmi/local
 exec_prefix="$prefix/${LMI_COMPILER}_${LMI_TRIPLET}"
 
-repo_name="wxWidgets"
+srcdir=$(dirname "$(readlink --canonicalize "$0")")
+wx_dir="$srcdir/third_party/wx"
 
 # Script commands 
##############################################################
 
-proxy_parent_dir="/srv/cache_for_lmi/vcs"
-mkdir --parents "$proxy_parent_dir"
-
-proxy_wx_dir="$proxy_parent_dir"/$repo_name
-
-# Create a local mirror if it doesn't already exist.
-if [ ! -d "$proxy_wx_dir" ]
-then
-    cd "$proxy_parent_dir"
-    git clone "$coefficiency" --recurse-submodules "$remote_host_url" 
$repo_name
-fi
-
-cd "$proxy_wx_dir"
-
-# Fetch desired commit from remote host if missing.
-if ! git rev-parse --quiet --verify "$wx_commit_sha^{commit}" >/dev/null
-then
-    git fetch origin
-fi
-
-# Reset in case git-checkout would fail. See:
-#   https://lists.nongnu.org/archive/html/lmi/2020-07/msg00053.html
-git reset --hard
-git submodule foreach 'git reset --hard'
-
-git checkout "$wx_commit_sha"
-
-# Get any new submodules that may have been added, even if nested.
-git submodule update "$coefficiency" --recursive --init
-
-build_type=$("$proxy_wx_dir"/config.guess)
+build_type=$("$wx_dir"/config.guess)
 
 case "$build_type" in
     (*-*-cygwin*)
@@ -154,7 +115,7 @@ mkdir --parents "$build_dir"
 cd "$build_dir"
 # 'configure' options must not be double-quoted
 # shellcheck disable=SC2086
-"$proxy_wx_dir"/configure $config_options CFLAGS="$wx_cc_flags" 
CXXFLAGS="$wx_cxx_flags"
+"$wx_dir"/configure $config_options CFLAGS="$wx_cc_flags" 
CXXFLAGS="$wx_cxx_flags"
 $MAKE
 $MAKE install
 # autotools: 'make install' doesn't respect group permissions--see:
diff --git a/third_party/wx b/third_party/wx
new file mode 160000
index 0000000..6cdaedd
--- /dev/null
+++ b/third_party/wx
@@ -0,0 +1 @@
+Subproject commit 6cdaedd42ba59331b3dc4ead50e0bac76ae14c19



reply via email to

[Prev in Thread] Current Thread [Next in Thread]