Ticket #12943: tcl_package_dir.diff

File tcl_package_dir.diff, 3.6 KB (added by nox@…, 17 years ago)

Make use of ${auto_path} instead of polluting /Library/Tcl

  • aclocal.m4

     
    563563                echo "tclpackagedir"
    564564                ac_cv_c_tclpkgd=${with_tclpackagedir}
    565565            else
    566                 # On darwin we can do some intelligent guessing
    567                 case $host_os in
    568                     darwin*)
    569                         tcl_autopath=`echo 'puts -nonewline \$auto_path' | $TCLSH`
    570                         for path in $tcl_autopath; do
    571                             if test "$path" = "/Library/Tcl"; then
    572                                 ac_cv_c_tclpkgd="$path"
    573                                 break
    574                             fi
    575                             if test "$path" = "/System/Library/Tcl"; then
    576                                 if test -d "$path"; then
    577                                     ac_cv_c_tclpkgd="$path"
    578                                     break
    579                                 fi
    580                             fi
    581                         done
    582                     ;;
    583                 esac
    584                 if test x"${ac_cv_c_tclpkgd}" = x ; then
    585                     # Fudge a path from the first entry in the auto_path
    586                     tcl_pkgpath=`echo 'puts -nonewline [[lindex \$auto_path 0]]' | $TCLSH`
    587                     if test -d "$tcl_pkgpath"; then
    588                         ac_cv_c_tclpkgd="$tcl_pkgpath"
    589                     fi
    590                     # If the first entry does not exist, do nothing
     566        ac_cv_c_tclpkgd=${datarootdir}/tcl
    591567                fi
    592             fi
    593568        ])
    594569    fi
    595570
  • Makefile.in

     
    3030upgrade:
    3131        @echo ""; echo "Upgrading your existing MacPorts installation to the new namespace if necessary:"; echo ""
    3232
    33 # We can safely delete the ${TCL_PACKAGE_DIR}/darwinports1.0 dir as files in it are always overwritten and will now be installed onto
    34 # ${TCL_PACKAGE_DIR}/macports1.0 with new names:
    35         [ ! -d ${TCL_PACKAGE_DIR}/darwinports1.0 ] || rm -rf ${TCL_PACKAGE_DIR}/darwinports1.0
     33# We can safely delete /Library/Tcl/{darwin,mac}port1.0 dir as files in it are not used anymore:
     34        [ ! -d /Library/Tcl/darwinports1.0 ] || rm -rf /Library/Tcl/darwinports1.0
     35        [ ! -d /Library/Tcl/macports1.0 ] || rm -rf /Library/Tcl/macports1.0
    3636
    3737# MacPorts base files in ${datadir} are also safely removed as new ones are always installed, and onto a their new location in this case too:
    3838        [ ! -d ${datadir}/darwinports ] || rm -rf ${datadir}/darwinports
  • configure

     
    1150911509                echo "tclpackagedir"
    1151011510                ac_cv_c_tclpkgd=${with_tclpackagedir}
    1151111511            else
    11512                 # On darwin we can do some intelligent guessing
    11513                 case $host_os in
    11514                     darwin*)
    11515                         tcl_autopath=`echo 'puts -nonewline \$auto_path' | $TCLSH`
    11516                         for path in $tcl_autopath; do
    11517                             if test "$path" = "/Library/Tcl"; then
    11518                                 ac_cv_c_tclpkgd="$path"
    11519                                 break
    11520                             fi
    11521                             if test "$path" = "/System/Library/Tcl"; then
    11522                                 if test -d "$path"; then
    11523                                     ac_cv_c_tclpkgd="$path"
    11524                                     break
    11525                                 fi
    11526                             fi
    11527                         done
    11528                     ;;
    11529                 esac
    11530                 if test x"${ac_cv_c_tclpkgd}" = x ; then
    11531                     # Fudge a path from the first entry in the auto_path
    11532                     tcl_pkgpath=`echo 'puts -nonewline [lindex \$auto_path 0]' | $TCLSH`
    11533                     if test -d "$tcl_pkgpath"; then
    11534                         ac_cv_c_tclpkgd="$tcl_pkgpath"
    11535                     fi
    11536                     # If the first entry does not exist, do nothing
     11512        ac_cv_c_tclpkgd=${datarootdir}/tcl
    1153711513                fi
    11538             fi
    1153911514
    1154011515fi
    1154111516
  • src/port/port.tcl

     
    3333# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
    3434# POSSIBILITY OF SUCH DAMAGE.
    3535
     36# MacPorts TCL library files are in @TCL_PACKAGE_DIR@
     37set auto_path [eval list [linsert $auto_path 0 "@TCL_PACKAGE_DIR@"]]
     38
    3639#
    3740# TODO:
    3841#