[65055] trunk/base
jmr at macports.org
jmr at macports.org
Sat Mar 20 07:28:11 PDT 2010
Revision: 65055
http://trac.macports.org/changeset/65055
Author: jmr at macports.org
Date: 2010-03-20 07:28:09 -0700 (Sat, 20 Mar 2010)
Log Message:
-----------
install macports1.0 next to the other Tcl packages and just put a link in the Tcl package dir if possible (#12943)
Modified Paths:
--------------
trunk/base/Makefile.in
trunk/base/Mk/macports.autoconf.mk.in
trunk/base/configure
trunk/base/configure.ac
trunk/base/portmgr/ReleaseProcess
trunk/base/portmgr/dmg/postflight
trunk/base/portmgr/jobs/Makefile
trunk/base/portmgr/jobs/PortIndex2MySQL.tcl
trunk/base/src/macports1.0/Makefile
trunk/base/src/macports1.0/macports.tcl
trunk/base/src/macports1.0/macports_fastload.tcl.in
trunk/base/src/port/Makefile
trunk/base/src/port/port.tcl
trunk/base/src/port/portindex.tcl
trunk/base/src/port/portmirror.tcl
Modified: trunk/base/Makefile.in
===================================================================
--- trunk/base/Makefile.in 2010-03-20 14:24:58 UTC (rev 65054)
+++ trunk/base/Makefile.in 2010-03-20 14:28:09 UTC (rev 65055)
@@ -39,7 +39,7 @@
# Add [default] tag to the central MacPorts repository, if it isn't already
$(TCLSH) src/upgrade_sources_conf_default.tcl ${prefix}
# Remove duplicate entries from the dependency map (could occur with 1.6 and earlier):
- $(TCLSH) src/dep_map_clean.tcl ${TCL_PACKAGE_DIR}
+ $(TCLSH) src/dep_map_clean.tcl "${macports_tcl_dir}"
endif
@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 ""
@echo "sudo port -v selfupdate"; echo ""
Modified: trunk/base/Mk/macports.autoconf.mk.in
===================================================================
--- trunk/base/Mk/macports.autoconf.mk.in 2010-03-20 14:24:58 UTC (rev 65054)
+++ trunk/base/Mk/macports.autoconf.mk.in 2010-03-20 14:28:09 UTC (rev 65055)
@@ -50,6 +50,7 @@
TCLSH = @TCLSH@
TCL_PACKAGE_DIR = @TCL_PACKAGE_DIR@
+macports_tcl_dir = @macports_tcl_dir@
DSTUSR = @DSTUSR@
DSTGRP = @DSTGRP@
Modified: trunk/base/configure
===================================================================
--- trunk/base/configure 2010-03-20 14:24:58 UTC (rev 65054)
+++ trunk/base/configure 2010-03-20 14:28:09 UTC (rev 65055)
@@ -598,6 +598,7 @@
enable_option_checking=no
ac_subst_vars='LTLIBOBJS
LIBOBJS
+macports_tcl_dir
localstatedir_expanded
MPCONFIGDIR_EXPANDED
prefix_expanded
@@ -9339,7 +9340,10 @@
eval "localstatedir_expanded=$localstatedir"
+eval "macports_tcl_dir=${datadir}/macports/Tcl"
+eval "macports_tcl_dir=$macports_tcl_dir"
+
prefix=$oldprefix
Modified: trunk/base/configure.ac
===================================================================
--- trunk/base/configure.ac 2010-03-20 14:24:58 UTC (rev 65054)
+++ trunk/base/configure.ac 2010-03-20 14:28:09 UTC (rev 65055)
@@ -328,6 +328,9 @@
AC_SUBST(MPCONFIGDIR_EXPANDED)
eval "localstatedir_expanded=$localstatedir"
AC_SUBST(localstatedir_expanded)
+eval "macports_tcl_dir=${datadir}/macports/Tcl"
+eval "macports_tcl_dir=$macports_tcl_dir"
+AC_SUBST(macports_tcl_dir)
prefix=$oldprefix
Modified: trunk/base/portmgr/ReleaseProcess
===================================================================
--- trunk/base/portmgr/ReleaseProcess 2010-03-20 14:24:58 UTC (rev 65054)
+++ trunk/base/portmgr/ReleaseProcess 2010-03-20 14:28:09 UTC (rev 65055)
@@ -169,9 +169,9 @@
on a vanilla Mac OS X installation + developer tools, excluding even the MacPorts installation prefix;
this can be accomplished through the use of otool's -L flag. Currently the libraries and binaries in need
of linking validation are:
- ${destroot}/Library/Tcl/macports1.0/MacPorts.dylib
${destroot}/opt/local/bin/daemondo
${destroot}/opt/local/share/macports/Tcl/darwintrace1.0/darwintrace.dylib
+ ${destroot}/opt/local/share/macports/Tcl/macports1.0/MacPorts.dylib
${destroot}/opt/local/share/macports/Tcl/pextlib1.0/Pextlib.dylib
${destroot}/opt/local/share/macports/Tcl/registry2.0/registry.dylib
* Universal building: When building for Tiger and above, all the files that need linking confirmation in the
@@ -186,7 +186,7 @@
#\
exec /usr/bin/tclsh "$0" "$@"
thus ensuring that the default Mac OS X bundled Tcl is used in our scripts.
- * macports1.0 Tcl package: The macports1.0 Tcl package should be sourced off its default location in /Library/Tcl/macports1.0
+ * macports1.0 Tcl package: The macports1.0 Tcl package should be sourced off its default location in /opt/local/share/macports/Tcl/macports1.0
in every single one of our scripts in ${destroot}/opt/local/bin.
* Miscellaneous: anything else that might seem out of the ordinary for a fully default-configured MacPorts
installation.
Modified: trunk/base/portmgr/dmg/postflight
===================================================================
--- trunk/base/portmgr/dmg/postflight 2010-03-20 14:24:58 UTC (rev 65054)
+++ trunk/base/portmgr/dmg/postflight 2010-03-20 14:28:09 UTC (rev 65055)
@@ -43,7 +43,8 @@
SBINPATH=${PREFIX}/sbin
CONFIGPATH=${PREFIX}/etc/macports
MANPAGES=${PREFIX}/share/man
-REG1DIR=${PREFIX}/share/macports/Tcl/registry1.0
+MACPORTS_TCL_DIR=${PREFIX}/share/macports/Tcl
+REG1DIR=${MACPORTS_TCL_DIR}/registry1.0
TCLSH=/usr/bin/tclsh
TCL_PACKAGE_DIR=/Library/Tcl
TIMESTAMP=$(date +"%Y-%m-%d_at_%H:%M:%S")
@@ -72,7 +73,7 @@
# Add [default] tag to the central MacPorts repository, if it isn't already
${TCLSH} ${PACKAGE_PATH}/Contents/Resources/upgrade_sources_conf_default.tcl ${PREFIX}
# Remove any duplicates from the dep map (could occur with 1.6 and earlier)
- ${TCLSH} ${PACKAGE_PATH}/Contents/Resources/dep_map_clean.tcl ${TCL_PACKAGE_DIR}
+ ${TCLSH} ${PACKAGE_PATH}/Contents/Resources/dep_map_clean.tcl ${MACPORTS_TCL_DIR}
}
# Through this command we write an environment variable to an appropriate shell configuration file,
@@ -114,10 +115,19 @@
fi
}
+# link macports1.0 into tcl package dir if possible
+function link_tcl_package {
+ if ! test -e "${TCL_PACKAGE_DIR}/macports1.0" && test -w "${TCL_PACKAGE_DIR}"; then
+ ln -vs "${MACPORTS_TCL_DIR}/macports1.0" "${TCL_PACKAGE_DIR}/macports1.0" || true
+ fi
+}
+
echo "The MacPorts Project, postflight script version ${VERSION}: checking the shell environment for user \"${USER}\"."
# Set up config files
setup_configs
+# link macports1.0 pkg
+link_tcl_package
# Remove old stuff
cleanup_man
Modified: trunk/base/portmgr/jobs/Makefile
===================================================================
--- trunk/base/portmgr/jobs/Makefile 2010-03-20 14:24:58 UTC (rev 65054)
+++ trunk/base/portmgr/jobs/Makefile 2010-03-20 14:28:09 UTC (rev 65055)
@@ -3,7 +3,7 @@
SCRIPTS= PortIndex2MySQL
edit = sed \
- -e 's, at TCL_PACKAGE_DIR@,$(TCL_PACKAGE_DIR),g'
+ -e 's, at macports_tcl_dir@,$(macports_tcl_dir),g'
include ../../Mk/macports.autoconf.mk
Modified: trunk/base/portmgr/jobs/PortIndex2MySQL.tcl
===================================================================
--- trunk/base/portmgr/jobs/PortIndex2MySQL.tcl 2010-03-20 14:24:58 UTC (rev 65054)
+++ trunk/base/portmgr/jobs/PortIndex2MySQL.tcl 2010-03-20 14:28:09 UTC (rev 65055)
@@ -178,7 +178,7 @@
}
# Load macports1.0 so that we can use some of its procs and the portinfo array.
-if {[catch { source [file join "/Library/Tcl" macports1.0 macports_fastload.tcl] } errstr]} {
+if {[catch { source [file join "@macports_tcl_dir@" macports1.0 macports_fastload.tcl] } errstr]} {
puts $runlog_fd "${::errorInfo}"
puts $runlog_fd "Failed to locate the macports1.0 Tcl package file: $errstr"
cleanup lockfile
Modified: trunk/base/src/macports1.0/Makefile
===================================================================
--- trunk/base/src/macports1.0/Makefile 2010-03-20 14:24:58 UTC (rev 65054)
+++ trunk/base/src/macports1.0/Makefile 2010-03-20 14:28:09 UTC (rev 65055)
@@ -3,7 +3,8 @@
OBJS= macports.o get_systemconfiguration_proxies.o sysctl.o
SHLIB_NAME= MacPorts${SHLIB_SUFFIX}
-INSTALLDIR= ${DESTDIR}${TCL_PACKAGE_DIR}/macports1.0
+INSTALLDIR= ${DESTDIR}${datadir}/macports/Tcl/macports1.0
+INSTALLPKGLINK= ${TCL_PACKAGE_DIR}/macports1.0
include ../../Mk/macports.autoconf.mk
include ../../Mk/macports.tea.mk
@@ -26,6 +27,9 @@
$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 $$file ${INSTALLDIR}/$$file; \
done
+ $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 pkgIndex.tcl ${INSTALLDIR}
+
echo "${TCL_PACKAGE_DIR}" > ${DESTDIR}${prefix}/var/macports/.tclpackage
-
- $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 pkgIndex.tcl ${INSTALLDIR}
+ if test -z "${DESTDIR}" && ! test -e "${INSTALLPKGLINK}" && test -w "${TCL_PACKAGE_DIR}"; then \
+ ln -s "${INSTALLDIR}" "${INSTALLPKGLINK}" || true; \
+ fi
Modified: trunk/base/src/macports1.0/macports.tcl
===================================================================
--- trunk/base/src/macports1.0/macports.tcl 2010-03-20 14:24:58 UTC (rev 65054)
+++ trunk/base/src/macports1.0/macports.tcl 2010-03-20 14:28:09 UTC (rev 65055)
@@ -2450,7 +2450,7 @@
}
ui_debug "Permissions OK"
- # where to install our macports1.0 tcl package
+ # where to install a link to our macports1.0 tcl package
set mp_tclpackage_path [file join $portdbpath .tclpackage]
if { [file exists $mp_tclpackage_path]} {
set fd [open $mp_tclpackage_path r]
Modified: trunk/base/src/macports1.0/macports_fastload.tcl.in
===================================================================
--- trunk/base/src/macports1.0/macports_fastload.tcl.in 2010-03-20 14:24:58 UTC (rev 65054)
+++ trunk/base/src/macports1.0/macports_fastload.tcl.in 2010-03-20 14:28:09 UTC (rev 65055)
@@ -70,10 +70,7 @@
}
}
-set dir [file join "@TCL_PACKAGE_DIR@" macports1.0]
-catch {source [file join $dir pkgIndex.tcl]}
-
-set sharetcldir [file join "@prefix_expanded@" share macports Tcl]
+set sharetcldir "@macports_tcl_dir@"
if {[file exists $sharetcldir]} {
foreach dir [glob -directory $sharetcldir *] {
catch {source [file join $dir pkgIndex.tcl]}
Modified: trunk/base/src/port/Makefile
===================================================================
--- trunk/base/src/port/Makefile 2010-03-20 14:24:58 UTC (rev 65054)
+++ trunk/base/src/port/Makefile 2010-03-20 14:28:09 UTC (rev 65055)
@@ -4,7 +4,7 @@
edit = sed \
-e 's, at TCLSH\@,$(TCLSH),g' \
- -e 's, at TCL_PACKAGE_DIR\@,$(TCL_PACKAGE_DIR),g'
+ -e 's, at macports_tcl_dir\@,$(macports_tcl_dir),g'
include ../../Mk/macports.autoconf.mk
Modified: trunk/base/src/port/port.tcl
===================================================================
--- trunk/base/src/port/port.tcl 2010-03-20 14:24:58 UTC (rev 65054)
+++ trunk/base/src/port/port.tcl 2010-03-20 14:28:09 UTC (rev 65055)
@@ -35,7 +35,7 @@
# POSSIBILITY OF SUCH DAMAGE.
catch {source \
- [file join "@TCL_PACKAGE_DIR@" macports1.0 macports_fastload.tcl]}
+ [file join "@macports_tcl_dir@" macports1.0 macports_fastload.tcl]}
package require macports
package require Pextlib 1.0
Modified: trunk/base/src/port/portindex.tcl
===================================================================
--- trunk/base/src/port/portindex.tcl 2010-03-20 14:24:58 UTC (rev 65054)
+++ trunk/base/src/port/portindex.tcl 2010-03-20 14:28:09 UTC (rev 65055)
@@ -8,7 +8,7 @@
# $Id$
catch {source \
- [file join "@TCL_PACKAGE_DIR@" macports1.0 macports_fastload.tcl]}
+ [file join "@macports_tcl_dir@" macports1.0 macports_fastload.tcl]}
package require macports
package require Pextlib
Modified: trunk/base/src/port/portmirror.tcl
===================================================================
--- trunk/base/src/port/portmirror.tcl 2010-03-20 14:24:58 UTC (rev 65054)
+++ trunk/base/src/port/portmirror.tcl 2010-03-20 14:28:09 UTC (rev 65055)
@@ -12,7 +12,7 @@
# Uses the database.
catch {source \
- [file join "@TCL_PACKAGE_DIR@" macports1.0 macports_fastload.tcl]}
+ [file join "@macports_tcl_dir@" macports1.0 macports_fastload.tcl]}
package require macports
package require Pextlib
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100320/41af1428/attachment-0001.html>
More information about the macports-changes
mailing list