Changeset 65055


Ignore:
Timestamp:
Mar 20, 2010, 2:28:09 PM (9 years ago)
Author:
jmr@…
Message:

install macports1.0 next to the other Tcl packages and just put a link in the Tcl package dir if possible (#12943)

Location:
trunk/base
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/Makefile.in

    r64644 r65055  
    4040        $(TCLSH) src/upgrade_sources_conf_default.tcl ${prefix}
    4141# Remove duplicate entries from the dependency map (could occur with 1.6 and earlier):
    42         $(TCLSH) src/dep_map_clean.tcl ${TCL_PACKAGE_DIR}
     42        $(TCLSH) src/dep_map_clean.tcl "${macports_tcl_dir}"
    4343endif
    4444        @echo ""; echo "Congratulations, you have successfully installed the MacPorts system. To get the Portfiles and update the system, add ${prefix}/bin to your PATH and run:"; echo ""
  • trunk/base/Mk/macports.autoconf.mk.in

    r64358 r65055  
    5151TCLSH                   = @TCLSH@
    5252TCL_PACKAGE_DIR         = @TCL_PACKAGE_DIR@
     53macports_tcl_dir        = @macports_tcl_dir@
    5354
    5455DSTUSR                  = @DSTUSR@
  • trunk/base/configure

    r64363 r65055  
    599599ac_subst_vars='LTLIBOBJS
    600600LIBOBJS
     601macports_tcl_dir
    601602localstatedir_expanded
    602603MPCONFIGDIR_EXPANDED
     
    93409341eval "localstatedir_expanded=$localstatedir"
    93419342
     9343eval "macports_tcl_dir=${datadir}/macports/Tcl"
     9344eval "macports_tcl_dir=$macports_tcl_dir"
     9345
    93429346
    93439347prefix=$oldprefix
  • trunk/base/configure.ac

    r64358 r65055  
    329329eval "localstatedir_expanded=$localstatedir"
    330330AC_SUBST(localstatedir_expanded)
     331eval "macports_tcl_dir=${datadir}/macports/Tcl"
     332eval "macports_tcl_dir=$macports_tcl_dir"
     333AC_SUBST(macports_tcl_dir)
    331334
    332335prefix=$oldprefix
  • trunk/base/portmgr/ReleaseProcess

    r57872 r65055  
    170170   this can be accomplished through the use of otool's -L flag. Currently the libraries and binaries in need
    171171   of linking validation are:
    172              ${destroot}/Library/Tcl/macports1.0/MacPorts.dylib
    173172             ${destroot}/opt/local/bin/daemondo
    174173             ${destroot}/opt/local/share/macports/Tcl/darwintrace1.0/darwintrace.dylib
     174             ${destroot}/opt/local/share/macports/Tcl/macports1.0/MacPorts.dylib
    175175             ${destroot}/opt/local/share/macports/Tcl/pextlib1.0/Pextlib.dylib
    176176             ${destroot}/opt/local/share/macports/Tcl/registry2.0/registry.dylib
     
    187187             exec /usr/bin/tclsh "$0" "$@"
    188188   thus ensuring that the default Mac OS X bundled Tcl is used in our scripts.
    189  * macports1.0 Tcl package: The macports1.0 Tcl package should be sourced off its default location in /Library/Tcl/macports1.0
     189 * macports1.0 Tcl package: The macports1.0 Tcl package should be sourced off its default location in /opt/local/share/macports/Tcl/macports1.0
    190190   in every single one of our scripts in ${destroot}/opt/local/bin.
    191191 * Miscellaneous: anything else that might seem out of the ordinary for a fully default-configured MacPorts
  • trunk/base/portmgr/dmg/postflight

    r64645 r65055  
    4444CONFIGPATH=${PREFIX}/etc/macports
    4545MANPAGES=${PREFIX}/share/man
    46 REG1DIR=${PREFIX}/share/macports/Tcl/registry1.0
     46MACPORTS_TCL_DIR=${PREFIX}/share/macports/Tcl
     47REG1DIR=${MACPORTS_TCL_DIR}/registry1.0
    4748TCLSH=/usr/bin/tclsh
    4849TCL_PACKAGE_DIR=/Library/Tcl
     
    7374    ${TCLSH} ${PACKAGE_PATH}/Contents/Resources/upgrade_sources_conf_default.tcl ${PREFIX}
    7475    # Remove any duplicates from the dep map (could occur with 1.6 and earlier)
    75     ${TCLSH} ${PACKAGE_PATH}/Contents/Resources/dep_map_clean.tcl ${TCL_PACKAGE_DIR}
     76    ${TCLSH} ${PACKAGE_PATH}/Contents/Resources/dep_map_clean.tcl ${MACPORTS_TCL_DIR}
    7677}
    7778
     
    115116}
    116117
     118# link macports1.0 into tcl package dir if possible
     119function link_tcl_package {
     120    if ! test -e "${TCL_PACKAGE_DIR}/macports1.0" && test -w "${TCL_PACKAGE_DIR}"; then
     121                ln -vs "${MACPORTS_TCL_DIR}/macports1.0" "${TCL_PACKAGE_DIR}/macports1.0" || true
     122        fi
     123}
     124
    117125echo "The MacPorts Project, postflight script version ${VERSION}: checking the shell environment for user \"${USER}\"."
    118126
    119127# Set up config files
    120128setup_configs
     129# link macports1.0 pkg
     130link_tcl_package
    121131
    122132# Remove old stuff
  • trunk/base/portmgr/jobs/Makefile

    r31519 r65055  
    44
    55edit = sed \
    6         -e 's,@TCL_PACKAGE_DIR@,$(TCL_PACKAGE_DIR),g'
     6        -e 's,@macports_tcl_dir@,$(macports_tcl_dir),g'
    77
    88
  • trunk/base/portmgr/jobs/PortIndex2MySQL.tcl

    r59836 r65055  
    179179
    180180# Load macports1.0 so that we can use some of its procs and the portinfo array.
    181 if {[catch { source [file join "/Library/Tcl" macports1.0 macports_fastload.tcl] } errstr]} {
     181if {[catch { source [file join "@macports_tcl_dir@" macports1.0 macports_fastload.tcl] } errstr]} {
    182182    puts $runlog_fd "${::errorInfo}"
    183183    puts $runlog_fd "Failed to locate the macports1.0 Tcl package file: $errstr"
  • trunk/base/src/macports1.0/Makefile

    r64998 r65055  
    44SHLIB_NAME=     MacPorts${SHLIB_SUFFIX}
    55
    6 INSTALLDIR=     ${DESTDIR}${TCL_PACKAGE_DIR}/macports1.0
     6INSTALLDIR=     ${DESTDIR}${datadir}/macports/Tcl/macports1.0
     7INSTALLPKGLINK= ${TCL_PACKAGE_DIR}/macports1.0
    78
    89include ../../Mk/macports.autoconf.mk
     
    2728        done
    2829
     30        $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 pkgIndex.tcl ${INSTALLDIR}
     31       
    2932        echo "${TCL_PACKAGE_DIR}" > ${DESTDIR}${prefix}/var/macports/.tclpackage
    30 
    31         $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 pkgIndex.tcl ${INSTALLDIR}
     33        if test -z "${DESTDIR}" && ! test -e "${INSTALLPKGLINK}" && test -w "${TCL_PACKAGE_DIR}"; then \
     34                ln -s "${INSTALLDIR}" "${INSTALLPKGLINK}" || true; \
     35        fi
  • trunk/base/src/macports1.0/macports.tcl

    r65025 r65055  
    24512451            ui_debug "Permissions OK"
    24522452
    2453             # where to install our macports1.0 tcl package
     2453            # where to install a link to our macports1.0 tcl package
    24542454            set mp_tclpackage_path [file join $portdbpath .tclpackage]
    24552455            if { [file exists $mp_tclpackage_path]} {
  • trunk/base/src/macports1.0/macports_fastload.tcl.in

    r64358 r65055  
    7171}
    7272
    73 set dir [file join "@TCL_PACKAGE_DIR@" macports1.0]
    74 catch {source [file join $dir pkgIndex.tcl]}
    75 
    76 set sharetcldir [file join "@prefix_expanded@" share macports Tcl]
     73set sharetcldir "@macports_tcl_dir@"
    7774if {[file exists $sharetcldir]} {
    7875        foreach dir [glob -directory $sharetcldir *] {
  • trunk/base/src/port/Makefile

    r51383 r65055  
    55edit = sed \
    66        -e 's,@TCLSH\@,$(TCLSH),g' \
    7         -e 's,@TCL_PACKAGE_DIR\@,$(TCL_PACKAGE_DIR),g'
     7        -e 's,@macports_tcl_dir\@,$(macports_tcl_dir),g'
    88
    99include ../../Mk/macports.autoconf.mk
  • trunk/base/src/port/port.tcl

    r65033 r65055  
    3636
    3737catch {source \
    38     [file join "@TCL_PACKAGE_DIR@" macports1.0 macports_fastload.tcl]}
     38    [file join "@macports_tcl_dir@" macports1.0 macports_fastload.tcl]}
    3939package require macports
    4040package require Pextlib 1.0
  • trunk/base/src/port/portindex.tcl

    r65033 r65055  
    99
    1010catch {source \
    11     [file join "@TCL_PACKAGE_DIR@" macports1.0 macports_fastload.tcl]}
     11    [file join "@macports_tcl_dir@" macports1.0 macports_fastload.tcl]}
    1212package require macports
    1313package require Pextlib
  • trunk/base/src/port/portmirror.tcl

    r34393 r65055  
    1313
    1414catch {source \
    15     [file join "@TCL_PACKAGE_DIR@" macports1.0 macports_fastload.tcl]}
     15    [file join "@macports_tcl_dir@" macports1.0 macports_fastload.tcl]}
    1616package require macports
    1717package require Pextlib
Note: See TracChangeset for help on using the changeset viewer.