summaryrefslogtreecommitdiff
path: root/tk
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2020-05-27 11:35:02 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2020-05-27 11:35:02 -0400
commitbb038280d2b5e12916d14587fd5e82455b456698 (patch)
treed33aa2ec22b9cc4fd7cce68a152cc6078a37a0ff /tk
parentcd85778597a709c5d589c9f984d039e5b96bafca (diff)
downloadspm_packages-bb038280d2b5e12916d14587fd5e82455b456698.tar.gz
Darwin pass 2
Diffstat (limited to 'tk')
-rw-r--r--tk/build.sh20
1 files changed, 16 insertions, 4 deletions
diff --git a/tk/build.sh b/tk/build.sh
index 83be737..20f1075 100644
--- a/tk/build.sh
+++ b/tk/build.sh
@@ -12,9 +12,10 @@ build_depends=(
"tcl==${version}"
)
depends=(
- $([[ $(uname -s) == Linux ]] && echo "libX11")
"tcl==${version}"
)
+[[ $(uname -s) == Linux ]] && depends+=("libX11")
+
lib_type=so
function prepare() {
@@ -22,13 +23,24 @@ function prepare() {
cd ${name}${version}
if [[ $(uname -s) == Darwin ]]; then
+ LDFLAGS="-L${_runtime}/lib"
lib_type=dylib
fi
}
function build() {
cd unix
+
+ # Patch bad library path (originally was, "path1:path2:path3:...")
+ cp -a Makefile.in Makefile.in.old
+ sed -e "s|^LIB_RUNTIME_DIR.*$|LIB_RUNTIME_DIR=${_runtime}/lib|" Makefile.in.old > Makefile.in
+
+ if [[ $(uname -s) == Darwin ]]; then
+ opts="--disable-framework"
+ fi
+
./configure --prefix=${_prefix} \
+ ${opts} \
--with-tcl=${_runtime}/lib \
--with-x
make -j${_maxjobs}
@@ -36,8 +48,8 @@ function build() {
function package() {
make install DESTDIR="${_pkgdir}"
- pushd "${_pkgdir}/${_prefix}"/bin
- ln -s wish${version%.*} "${_pkgdir}/${_prefix}"/bin/wish
+ pushd "${_pkgdir}${_prefix}"/bin
+ ln -s wish${version%.*} "${_pkgdir}${_prefix}"/bin/wish
popd
- chmod 755 "${_pkgdir}/${_prefix}"/lib/*.${lib_type}
+ chmod 755 "${_pkgdir}${_prefix}"/lib/*.${lib_type}
}