Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
SapidSetup.sh
#!/bin/bash
# Author: hsur
# License: BSD 2-clause
# install libs
apt-get -y update
apt-get -y upgrade
apt-get install -y g++ flex bison make ant tk-dev tcl-dev xutils-dev libxml2-dev libc6-dev-i386 openjdk-11-jdk
# download & extract files
cd
wget http://www.sapid.org/FTP-CURRENT/Sapid-6.104.4.tar.gz
tar zxvf Sapid-6.104.4.tar.gz
cd Sapid-6.104.4
# patching
patch -p1 <<'EOS'
--- Sapid-6.104.4.org/Sapid/SapidSite.def 2013-07-24 11:06:23.000000000 +0900
+++ Sapid-6.104.4/Sapid/SapidSite.def 2019-02-22 21:04:45.215613200 +0900
@@ -170,12 +170,12 @@
/* #define USE_DLD_FOR_TCL_TK */
/* Modify these symbols' value, if necessary. */
-/* #define SapidTclIncDir /usr/local/include */
-/* #define SapidTkIncDir /usr/local/include */
-/* #define SapidTclLibDir /usr/local/lib */
-/* #define SapidTkLibDir /usr/local/lib */
-/* #define SapidTclVersion 8.0jp */
-/* #define SapidTkVersion 8.0jp */
+#define SapidTclIncDir /usr/include/tcl8.6
+#define SapidTkIncDir /usr/include/tk8.6
+#define SapidTclLibDir /usr/lib/tcl8.6
+#define SapidTkLibDir /usr/lib/tk8.6
+#define SapidTclVersion 8.6
+#define SapidTkVersion 8.6
/******************************************************************************/
EOS
sed -i -e 's#"javacSource" value="1.5"#"javacSource" value="1.8"#' CXC/build.xml.src
sed -i -e 's#"javacTarget" value="1.5"#"javacTarget" value="1.8"#' CXC/build.xml.src
# build & install Sapid
export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::")
xmkmf -a 2>&1 | tee XMKMF_LOG
make 2>&1 | tee MAKE_LOG
make install 2>&1 | tee INSTALL_LOG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.