[tcltk-perl] Patch to build tcl-perl against Tcl.framework on Mac OS X
Brought to you by:
hobbs
From: Daniel A. S. <st...@ic...> - 2004-08-11 15:11:35
|
All, attached a patch to get the Tcl perl module to build against Tcl.framework on Mac OS X (with --tclconfig /Library/Frameworks/Tcl.framework/tclConfig.sh), both with and without stubs. Tcl::Tk will have to wait until [package require Tk] works with TkAqua... Cheers, Daniel -- ** Daniel A. Steffen ** "And now for something completely ** Dept. of Mathematics ** different" Monty Python ** Macquarie University ** <mailto:st...@ma...> ** NSW 2109 Australia ** <http://www.maths.mq.edu.au/~steffen/> Index: Makefile.PL =================================================================== RCS file: /cvsroot/tcltkce/Tcl/Makefile.PL,v retrieving revision 1.9 diff -u -p -r1.9 Makefile.PL --- Makefile.PL 8 May 2004 02:11:12 -0000 1.9 +++ Makefile.PL 11 Aug 2004 14:43:24 -0000 @@ -16,6 +16,7 @@ my $usestubs; my $libpath; my $incpath; my $wince; +my @extraargs; GetOptions("tclsh=s", \$tclsh, "tclconfig=s", \$tclconfig, @@ -80,10 +81,17 @@ if ($tclconfig) { if ($^O eq 'MSWin32') { $defs .= " -DLIB_RUNTIME_DIR=\\\"$tclcfg{'TCL_EXEC_PREFIX'}/bin\\\""; $defs .= " -DTCL_LIB_FILE=\\\"$tclcfg{'TCL_DLL_FILE'}\\\""; + } elsif ($^O eq 'darwin' && $tclcfg{'TCL_STUB_LIB_PATH'} =~ /\.framework/ ) { + (my $fmk = $tclcfg{'TCL_STUB_LIB_PATH'}) =~ s/(?<=\.framework).*//; + $defs .= " -DLIB_RUNTIME_DIR=\\\"$fmk\\\""; + $defs .= " -DTCL_LIB_FILE=\\\"$tclcfg{'TCL_LIB_FILE'}\\\""; } else { $defs .= " -DLIB_RUNTIME_DIR=\\\"$tclcfg{'TCL_EXEC_PREFIX'}/lib\\\""; $defs .= " -DTCL_LIB_FILE=\\\"$tclcfg{'TCL_LIB_FILE'}\\\""; } + } elsif ($^O eq 'darwin' && $libpath =~ /-framework/ ) { + @extraargs = (dynamic_lib => {OTHERLDFLAGS => $libpath}); + $libpath = ""; } } else { open(TCLSH, "$tclsh tclcfg.tcl |") or die "error starting tclsh: $!\n"; @@ -138,6 +146,7 @@ WriteMakefile( LIBS => ["$libpath"], INC => "$incpath", DEFINE => $defs, + @extraargs, ); #EOS |