Skip to content

Instantly share code, notes, and snippets.

@wojdyr
Last active December 15, 2015 14:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wojdyr/5276703 to your computer and use it in GitHub Desktop.
Save wojdyr/5276703 to your computer and use it in GitHub Desktop.
This patch adds OSX support (based on a patch from fink)
and avoids discarding LDFLAGS on Linux.
--- blt2.4z/configure.bak 2013-03-29 00:38:08.062508923 +0000
+++ blt2.4z/configure 2013-03-29 19:46:30.911489694 +0000
@@ -3396,6 +3396,9 @@
*-hpux*)
SHLIB_SUFFIX="sl"
;;
+ *-darwin*)
+ SHLIB_SUFFIX="dylib"
+ ;;
*)
SHLIB_SUFFIX="so"
;;
@@ -3851,13 +3854,12 @@
SHLIB_LD_FLAGS="$TCL_LD_FLAGS"
SHLIB_RUNPATH="$TCL_LD_SEARCH_FLAGS"
-SHLIB_SUFFIX=".so"
+SHLIB_SUFFIX=".${SHLIB_SUFFIX}"
SHLIB_TARGET=""
SHLIB_CFLAGS=""
SHLIB_LIB_SPECS="${JPEG_LIB_SPEC}"
SHLIB_TCL_ONLY_LIB_SPECS="${TCL_ONLY_LIB_SPECS}"
SHLIB_TCL_ONLY_LIB_SPECS=""
-LDFLAGS=""
LD_RUN_PATH=""
EXTRA_LIB_SPECS=""
@@ -4036,10 +4038,8 @@
*-linux*)
SHLIB_CFLAGS="-fPIC"
SHLIB_LD="${CC}"
- SHLIB_LD_FLAGS='-rdynamic -shared -Wl,-E -Wl,-soname,$@'
+ SHLIB_LD_FLAGS='-rdynamic -shared -Wl,-E -Wl,-soname,$@'" $LDFLAGS"
LD_RUN_PATH="-Wl,-rpath,${loader_run_path}"
-
- LDFLAGS=""
EXTRA_LIB_SPECS="-ldl"
;;
@@ -4208,6 +4208,11 @@
SHLIB_LD_FLAGS=" -Wl,-Bexport"
;;
+ *-darwin*)
+ SHLIB_LIB_SPECS="${SHLIB_LIB_SPECS} ${LIB_SPECS}"
+ SHLIB_TCL_ONLY_LIB_SPECS="${TCL_ONLY_LIB_SPECS}"
+ ;;
+
*)
build_shared="no"
;;
--- blt2.4z/library/Makefile.in.bak 2013-03-29 00:38:08.062508923 +0000
+++ blt2.4z/library/Makefile.in 2013-03-29 19:46:30.911489694 +0000
@@ -58,7 +59,7 @@
for i in $(miscFiles) ; do \
$(INSTALL_DATA) $(srcdir)/$$i $(INSTALL_ROOT)$(scriptdir) ; \
done
- $(INSTALL_DATA) pkgIndex.tcl $(scriptdir)
+ $(INSTALL_DATA) pkgIndex.tcl $(INSTALL_ROOT)$(scriptdir)
mkdirs:
@for i in $(instdirs) ; do \
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment