[mapguide-commits] r9957 - in sandbox/jng/vanilla_swig: . Bindings

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Tue Aug 16 04:14:19 PDT 2022


Author: jng
Date: 2022-08-16 04:14:18 -0700 (Tue, 16 Aug 2022)
New Revision: 9957

Modified:
   sandbox/jng/vanilla_swig/Bindings/TODO.txt
   sandbox/jng/vanilla_swig/cmake_bootstrap.sh
Log:
Acquire/build SWIG in cmake_bootstrap.sh if required

Modified: sandbox/jng/vanilla_swig/Bindings/TODO.txt
===================================================================
--- sandbox/jng/vanilla_swig/Bindings/TODO.txt	2022-08-10 15:59:36 UTC (rev 9956)
+++ sandbox/jng/vanilla_swig/Bindings/TODO.txt	2022-08-16 11:14:18 UTC (rev 9957)
@@ -22,6 +22,7 @@
         - Generate and build the .net/Java SWIG glue libraries
         - Copy the compiled libs out of the docker container and into the same native library staging area for Java/.net
       - (x) OR: Update our common libs dockerfile in (https://github.com/jumpinjackie/mapguide-fdo-docker-build) to perform the above tasks
+   - [ ] Remove --common-subset-only flag from cmake_bootstrap.sh. Instead do the full build, but package up a common libs tarball of the needed .so files
    - [x] Refactor current .net test suite to reference these nuget packages
       - [x] Verify test suite still passes (Windows)
       - [x] Verify test suite still passes (Windows, legacy .net Framework)

Modified: sandbox/jng/vanilla_swig/cmake_bootstrap.sh
===================================================================
--- sandbox/jng/vanilla_swig/cmake_bootstrap.sh	2022-08-10 15:59:36 UTC (rev 9956)
+++ sandbox/jng/vanilla_swig/cmake_bootstrap.sh	2022-08-16 11:14:18 UTC (rev 9957)
@@ -141,6 +141,22 @@
 echo "INTERNAL_GEOS      = $INTERNAL_GEOS"
 echo "COMMON_SUBSET_ONLY = $COMMON_SUBSET_ONLY"
 
+# Acquire SWIG
+which swig
+# which exits with 0 if swig is found, 1 otherwise
+have_swig=$?
+if [ "$have_swig" != "0" ]; then
+    echo "SWIG not found. Acquiring and building SWIG from source"
+    cd /tmp/ || exit
+    # TODO: Until SWIG 4.1 is actually released, should fix the source archive to a particular commit (if it's possible)
+    wget https://github.com/swig/swig/archive/refs/heads/master.zip
+    unzip master.zip
+    cd /tmp/swig-master/ || exit
+    ./autogen.sh && ./configure && make && make install
+else
+    echo "SWIG already installed"
+fi
+
 if [ "$USE_CCACHE" = "1" ]; then
     export CC="ccache gcc"
     export CXX="ccache g++"



More information about the mapguide-commits mailing list