lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 24c5d74 14/15: Add wxpdfdoc submodule and use


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 24c5d74 14/15: Add wxpdfdoc submodule and use wxPdfDocument version from it
Date: Fri, 9 Oct 2020 12:05:28 -0400 (EDT)

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

    Add wxpdfdoc submodule and use wxPdfDocument version from it
    
    This is similar to the previous commit, but is done for wxPdfDoc.
    
    No real changes.
---
 .gitmodules          |  4 ++++
 install_wxpdfdoc.sh  | 45 +++++----------------------------------------
 third_party/wxpdfdoc |  1 +
 3 files changed, 10 insertions(+), 40 deletions(-)

diff --git a/.gitmodules b/.gitmodules
index bdde583..788b9b6 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -14,3 +14,7 @@
        path = third_party/wx
        url = https://github.com/let-me-illustrate/wx.git
        branch = lmi
+[submodule "third_party/wxpdfdoc"]
+       path = third_party/wxpdfdoc
+       url = https://github.com/let-me-illustrate/wxpdfdoc.git
+       branch = lmi
diff --git a/install_wxpdfdoc.sh b/install_wxpdfdoc.sh
index 9025484..464ec25 100755
--- a/install_wxpdfdoc.sh
+++ b/install_wxpdfdoc.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/vadz/wxpdfdoc.git"}
-
-wxpdfdoc_commit_sha=${wxpdfdoc_commit_sha:-"acbd019d18e991cca46a80e1be58e637774d5d3b"}
-
 wxpdfdoc_skip_clean=${wxpdfdoc_skip_clean:-"0"}
 
 coefficiency=${coefficiency:-"--jobs=$(nproc)"}
@@ -51,37 +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="wxpdfdoc"
+srcdir=$(dirname "$(readlink --canonicalize "$0")")
+wxpdfdoc_dir="$srcdir/third_party/wxpdfdoc"
 
 # Script commands 
##############################################################
 
-proxy_parent_dir="/srv/cache_for_lmi/vcs"
-mkdir --parents "$proxy_parent_dir"
-
-proxy_wxpdfdoc_dir="$proxy_parent_dir"/$repo_name
-
-# Create a local mirror if it doesn't already exist.
-if [ ! -d "$proxy_wxpdfdoc_dir" ]
-then
-    cd "$proxy_parent_dir"
-    git clone "$coefficiency" "$remote_host_url" $repo_name
-fi
-
-cd "$proxy_wxpdfdoc_dir"
-
-# Fetch desired commit from remote host if missing.
-if ! git rev-parse --quiet --verify "$wxpdfdoc_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 checkout "$wxpdfdoc_commit_sha"
-
-build_type=$("$proxy_wxpdfdoc_dir"/admin/build-aux/config.guess)
+build_type=$("$wxpdfdoc_dir"/admin/build-aux/config.guess)
 
 case "$build_type" in
     (*-*-cygwin*)
@@ -104,7 +69,7 @@ config_options="
 
 [ -n "$mingw_bin_dir" ] && export PATH="$mingw_bin_dir:${PATH}"
 
-cd "$proxy_wxpdfdoc_dir"
+cd "$wxpdfdoc_dir"
 autoreconf --verbose
 
 build_dir="$exec_prefix/wxpdfdoc-ad_hoc/wxpdfdoc-$wxpdfdoc_commit_sha"
@@ -121,7 +86,7 @@ mkdir --parents "$build_dir"
 cd "$build_dir"
 # 'configure' options must not be double-quoted
 # shellcheck disable=SC2086
-"$proxy_wxpdfdoc_dir"/configure $config_options CFLAGS="$wxpdfdoc_cc_flags" 
CXXFLAGS="$wxpdfdoc_cxx_flags"
+"$wxpdfdoc_dir"/configure $config_options CFLAGS="$wxpdfdoc_cc_flags" 
CXXFLAGS="$wxpdfdoc_cxx_flags"
 $MAKE
 $MAKE install
 # autotools: 'make install' doesn't respect group permissions--see:
diff --git a/third_party/wxpdfdoc b/third_party/wxpdfdoc
new file mode 160000
index 0000000..acbd019
--- /dev/null
+++ b/third_party/wxpdfdoc
@@ -0,0 +1 @@
+Subproject commit acbd019d18e991cca46a80e1be58e637774d5d3b



reply via email to

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