summaryrefslogtreecommitdiff
path: root/tk/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tk/build.sh')
-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}
}