I don't use tkdnd, so I do not have a answer specific to that installation.
Adding to my script I have blocks in my build script such as this one which builds the 'tdom' extension.
cd $SRCDIR
cd tdom*
if [[ $? -eq 0 ]]; then
make distclean
./configure \
--exec-prefix=$INSTLOC \
--prefix=$INSTLOC \
--with-tcl=$INSTLOC/Library/Frameworks/Tcl.framework/tclConfig.sh
make CFLAGS="-O2 -mmacosx-version-min=${macosxminver}"
make install
fi
However, linking to the Tk libraries may complicate things. And every package is different and uses different variables. So I will need to download tkdnd and build it and see if there are any issues, so expect an upcoming edit to this answer.
(Edit: I fixed the script in the original question, so the following
paragraph no longer applies)
My changes to the init.tcl script are not quite perfect, as you can see, the wrong package is loaded when I run via 'wish' (wish is in a different location than tclsh, which causes some issues). I should have the local installation's path located earlier in the auto_path
. If you are using my script, you need to be aware of this.
bll-mac:$ ../darwin/64/tcl/bin/tclsh
% package require tdom
0.9.1
bll-mac$ ../darwin/64/tcl/bin/wish
% package require tdom
0.8.3
% package require tdom 0.9.1
0.9.1
There really isn't any difference between a framework (and b) and a normal installation, the framework just provides a structure for resource location.
Edit:
It appears that the following works to compile and install the tkdnd package.
The redefinition of PKG_CFLAGS is necessary because the tkdnd makefile
has an argument defined that is not supported by the compiler (on Mojave).
So PKG_CFLAGS is a copy of what's in the makefile without -fobjc-gc
.
I only tried doing a package require tkdnd
. I don't know how to use
the package, so I did not try anything else.
cd $SRCDIR
cd tkdnd*
if [[ $? -eq 0 ]]; then
make distclean
./configure \
--prefix=$INSTLOC \
--exec-prefix=$INSTLOC \
--with-tcl=$INSTLOC/Library/Frameworks/Tcl.framework \
--with-tk=$INSTLOC/Library/Frameworks/Tk.framework
make CLAGS_OPTIMIZE="-O2 -mmacosx-version-min=${macosxminver}" \
PKG_CFLAGS="-DMAC_TK_COCOA -std=gnu99 -x objective-c"
make install
fi