[118562] trunk/base
cal at macports.org
cal at macports.org
Fri Apr 4 15:58:04 PDT 2014
Revision: 118562
https://trac.macports.org/changeset/118562
Author: cal at macports.org
Date: 2014-04-04 15:58:04 -0700 (Fri, 04 Apr 2014)
Log Message:
-----------
base: remove all references to macports_tcl_dir, install Tcl packages in TCL_PACKAGE_PATH directly, fixes #43208
This completely removes the need for macports_fastload.tcl and all the other
hacks that MacPorts has been using to locate its own packages (such as appending
to $auto_path during mportinit and preloading some packages).
Note: ${TCL_PACKAGE_PATH}/macports1.0 previously was a symlink and now is
a directory. When the symlink isn't removed before trying to create the
directory, this causes a failure. The Makefile now ensures this doesn't happen,
but I don't know what installer(8) will do in this case. This means we might
have to add delete the symlink in installer preflight.
Modified Paths:
--------------
trunk/base/Makefile.in
trunk/base/Mk/macports.autoconf.mk.in
trunk/base/configure
trunk/base/configure.ac
trunk/base/portmgr/jobs/Makefile
trunk/base/portmgr/jobs/PortIndex2MySQL.tcl
trunk/base/src/cflib1.0/Makefile.in
trunk/base/src/darwintracelib1.0/Makefile.in
trunk/base/src/machista1.0/Makefile.in
trunk/base/src/macports1.0/Makefile.in
trunk/base/src/macports1.0/macports.tcl
trunk/base/src/macports1.0/macports_test_autoconf.tcl.in
trunk/base/src/package1.0/Makefile.in
trunk/base/src/package1.0/package_test_autoconf.tcl.in
trunk/base/src/pextlib1.0/Makefile.in
trunk/base/src/port/Makefile.in
trunk/base/src/port1.0/Makefile.in
trunk/base/src/port1.0/port_test_autoconf.tcl.in
trunk/base/src/registry2.0/Makefile.in
trunk/base/src/tclobjc1.0/Makefile.in
Modified: trunk/base/Makefile.in
===================================================================
--- trunk/base/Makefile.in 2014-04-04 22:38:29 UTC (rev 118561)
+++ trunk/base/Makefile.in 2014-04-04 22:58:04 UTC (rev 118562)
@@ -96,8 +96,8 @@
# Add [default] tag to the central MacPorts repository, if it isn't already
$(TCLSH) $(srcdir)/src/upgrade_sources_conf_default.tcl "${prefix}"
# Convert image directories (and direct mode installs) to image archives
- $(TCLSH) $(srcdir)/src/images_to_archives.tcl "${macports_tcl_dir}"
- $(TCLSH) $(srcdir)/src/dedup_portfiles.tcl "${macports_tcl_dir}"
+ $(TCLSH) $(srcdir)/src/images_to_archives.tcl
+ $(TCLSH) $(srcdir)/src/dedup_portfiles.tcl
endif
ifndef SELFUPDATING
@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 ""
Modified: trunk/base/Mk/macports.autoconf.mk.in
===================================================================
--- trunk/base/Mk/macports.autoconf.mk.in 2014-04-04 22:38:29 UTC (rev 118561)
+++ trunk/base/Mk/macports.autoconf.mk.in 2014-04-04 22:58:04 UTC (rev 118562)
@@ -49,7 +49,6 @@
INTREE_TCLSH = @INTREE_TCLSH@
TCLSH = @TCLSH@
TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@
-macports_tcl_dir = @macports_tcl_dir@
DSCL = @DSCL@
DSEDITGROUP = @DSEDITGROUP@
Modified: trunk/base/configure
===================================================================
--- trunk/base/configure 2014-04-04 22:38:29 UTC (rev 118561)
+++ trunk/base/configure 2014-04-04 22:58:04 UTC (rev 118562)
@@ -652,7 +652,6 @@
VENDOR_DESTROOT
VENDOR_TCL_INSTALL
VENDOR_TCL_SUBDIR
-macports_tcl_dir
localstatedir_expanded
MPCONFIGDIR_EXPANDED
prefix_expanded
@@ -9496,9 +9495,6 @@
eval "localstatedir_expanded=$localstatedir"
-eval "macports_tcl_dir=${datadir}/macports/Tcl"
-eval "macports_tcl_dir=$macports_tcl_dir"
-
# Compute the libexec dir for the vendor packages
eval "macports_libexec_dir=${libexecdir}/macports"
eval "macports_libexec_dir=$macports_libexec_dir"
Modified: trunk/base/configure.ac
===================================================================
--- trunk/base/configure.ac 2014-04-04 22:38:29 UTC (rev 118561)
+++ trunk/base/configure.ac 2014-04-04 22:58:04 UTC (rev 118562)
@@ -311,9 +311,6 @@
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)
# Compute the libexec dir for the vendor packages
eval "macports_libexec_dir=${libexecdir}/macports"
eval "macports_libexec_dir=$macports_libexec_dir"
Modified: trunk/base/portmgr/jobs/Makefile
===================================================================
--- trunk/base/portmgr/jobs/Makefile 2014-04-04 22:38:29 UTC (rev 118561)
+++ trunk/base/portmgr/jobs/Makefile 2014-04-04 22:58:04 UTC (rev 118562)
@@ -3,7 +3,7 @@
SCRIPTS= PortIndex2MySQL
edit = sed \
- -e 's, at macports_tcl_dir@,$(macports_tcl_dir),g'
+ -e 's, at TCLSH@,$(TCLSH),g'
include ../../Mk/macports.autoconf.mk
Modified: trunk/base/portmgr/jobs/PortIndex2MySQL.tcl
===================================================================
--- trunk/base/portmgr/jobs/PortIndex2MySQL.tcl 2014-04-04 22:38:29 UTC (rev 118561)
+++ trunk/base/portmgr/jobs/PortIndex2MySQL.tcl 2014-04-04 22:58:04 UTC (rev 118562)
@@ -1,4 +1,4 @@
-#!/opt/local/bin/tclsh
+#!@TCLSH@
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
#
# PortIndex2MySQL.tcl
@@ -178,12 +178,6 @@
}
# Load macports1.0 so that we can use some of its procs and the portinfo array.
-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
- terminate 1
-}
if {[catch { package require macports } errstr]} {
puts $runlog_fd "${::errorInfo}"
puts $runlog_fd "Failed to load the macports1.0 Tcl package: $errstr"
Modified: trunk/base/src/cflib1.0/Makefile.in
===================================================================
--- trunk/base/src/cflib1.0/Makefile.in 2014-04-04 22:38:29 UTC (rev 118561)
+++ trunk/base/src/cflib1.0/Makefile.in 2014-04-04 22:58:04 UTC (rev 118562)
@@ -1,10 +1,11 @@
srcdir = @srcdir@
VPATH = @srcdir@
+include ../../Mk/macports.autoconf.mk
+
OBJS= CFLib.o
SHLIB_NAME= CFLib${SHLIB_SUFFIX}
LIBS+= -framework CoreFoundation
-INSTALLDIR= ${DESTDIR}${datadir}/macports/Tcl/cflib1.0
+INSTALLDIR= ${DESTDIR}${TCL_PACKAGE_PATH}/cflib1.0
-include ../../Mk/macports.autoconf.mk
include $(srcdir)/../../Mk/macports.tea.mk
Modified: trunk/base/src/darwintracelib1.0/Makefile.in
===================================================================
--- trunk/base/src/darwintracelib1.0/Makefile.in 2014-04-04 22:38:29 UTC (rev 118561)
+++ trunk/base/src/darwintracelib1.0/Makefile.in 2014-04-04 22:58:04 UTC (rev 118562)
@@ -1,15 +1,15 @@
srcdir = @srcdir@
VPATH = @srcdir@
+include ../../Mk/macports.autoconf.mk
+
# This Makefile will only be run on Darwin systems; we can safely use
# Apple-specifics here
SRCS= $(wildcard *.c)
OBJS= $(SRCS:%.c=%.o)
SHLIB_NAME= darwintrace${SHLIB_SUFFIX}
-INSTALLDIR= ${DESTDIR}${datadir}/macports/Tcl/darwintrace1.0
+INSTALLDIR= ${DESTDIR}${TCL_PACKAGE_PATH}/darwintrace1.0
-include ../../Mk/macports.autoconf.mk
-
# Yes, we know having $ signs in identifiers is not a very good idea; in the
# case of darwintrace we still need them, though.
CFLAGS_PEDANTIC=
Modified: trunk/base/src/machista1.0/Makefile.in
===================================================================
--- trunk/base/src/machista1.0/Makefile.in 2014-04-04 22:38:29 UTC (rev 118561)
+++ trunk/base/src/machista1.0/Makefile.in 2014-04-04 22:58:04 UTC (rev 118562)
@@ -1,9 +1,11 @@
srcdir = @srcdir@
VPATH = @srcdir@
+include ../../Mk/macports.autoconf.mk
+
OBJS= libmachista.o hashmap.o machista_wrap.o
SHLIB_NAME= machista${SHLIB_SUFFIX}
-INSTALLDIR= ${DESTDIR}${datadir}/macports/Tcl/machista1.0
+INSTALLDIR= ${DESTDIR}${TCL_PACKAGE_PATH}/machista1.0
SWIG = @SWIG@
SWIG_FLAGS = -tcl8 -pkgversion 1.0 -namespace
@@ -15,7 +17,6 @@
TESTS = ./tests/libmachista-test
-include ../../Mk/macports.autoconf.mk
include $(srcdir)/../../Mk/macports.tea.mk
CFLAGS+= -fPIC
Modified: trunk/base/src/macports1.0/Makefile.in
===================================================================
--- trunk/base/src/macports1.0/Makefile.in 2014-04-04 22:38:29 UTC (rev 118561)
+++ trunk/base/src/macports1.0/Makefile.in 2014-04-04 22:58:04 UTC (rev 118562)
@@ -1,17 +1,16 @@
srcdir = @srcdir@
VPATH = @srcdir@
+include ../../Mk/macports.autoconf.mk
+
SRCS= macports.tcl macports_dlist.tcl macports_util.tcl \
macports_autoconf.tcl
OBJS= macports.o get_systemconfiguration_proxies.o sysctl.o
SHLIB_NAME= MacPorts${SHLIB_SUFFIX}
-INSTALLDIR= ${DESTDIR}${datadir}/macports/Tcl/macports1.0
-INSTALLPKGLINK= ${TCL_PACKAGE_PATH}/macports1.0
+INSTALLDIR= ${DESTDIR}${TCL_PACKAGE_PATH}/macports1.0
+OLDINSTALLDIR= ${datadir}/macports
-include ../../Mk/macports.autoconf.mk
-include $(srcdir)/../../Mk/macports.tea.mk
-
ifeq ($(OBJC_RUNTIME), APPLE_RUNTIME)
LIBS+= -framework CoreFoundation -framework SystemConfiguration
endif
@@ -26,6 +25,13 @@
rm -f Makefile
install:: all
+ @# Clean up old instances of the MacPorts Tcl packages
+ if test -z "${DESTDIR}"; then rm -rf "${OLDINSTALLDIR}"; fi
+
+ @# Remove the previously installed link if it still exists. Without this,
+ @# creating the directory will fail.
+ if test -L "${INSTALLDIR}"; then rm -rf "${INSTALLDIR}"; fi
+
$(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} ${INSTALLDIR}
$(SILENT) set -x; for file in ${SRCS}; do \
@@ -34,17 +40,5 @@
$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 pkgIndex.tcl ${INSTALLDIR}
- echo "${TCL_PACKAGE_PATH}" > ${DESTDIR}${prefix}/var/macports/.tclpackage
- if test -z "${DESTDIR}" -a "${INSTALLPKGLINK}" != "${INSTALLDIR}"; then \
- if test ! -L "${INSTALLPKGLINK}"; then \
- if test ! -e "${TCL_PACKAGE_PATH}"; then \
- $(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} "${TCL_PACKAGE_PATH}" || true; \
- fi; \
- if test -d "${INSTALLPKGLINK}"; then \
- rm -vrf "${INSTALLPKGLINK}" || true; \
- fi; \
- if test ! -e "${INSTALLPKGLINK}"; then \
- ln -vs "${INSTALLDIR}" "${INSTALLPKGLINK}" || true; \
- fi; \
- fi; \
- fi
+
+include $(srcdir)/../../Mk/macports.tea.mk
Modified: trunk/base/src/macports1.0/macports.tcl
===================================================================
--- trunk/base/src/macports1.0/macports.tcl 2014-04-04 22:38:29 UTC (rev 118561)
+++ trunk/base/src/macports1.0/macports.tcl 2014-04-04 22:58:04 UTC (rev 118562)
@@ -1023,21 +1023,6 @@
set keepenvkeys [concat $keepenvkeys $extra_env]
}
- if {[file isdirectory $libpath]} {
- lappend auto_path $libpath
- set macports::auto_path $auto_path
-
- # XXX: not sure if this the best place, but it needs to happen
- # early, and after auto_path has been set. Or maybe Pextlib
- # should ship with macports1.0 API?
- package require Pextlib 1.0
- package require registry 1.0
- package require registry2 2.0
- package require machista 1.0
- } else {
- return -code error "Library directory '$libpath' must exist"
- }
-
# set the hidden flag on $portdbpath to avoid spotlight indexing, which
# might slow builds down considerably. You can avoid this by touching
# $portdbpath/.nohide.
Modified: trunk/base/src/macports1.0/macports_test_autoconf.tcl.in
===================================================================
--- trunk/base/src/macports1.0/macports_test_autoconf.tcl.in 2014-04-04 22:38:29 UTC (rev 118561)
+++ trunk/base/src/macports1.0/macports_test_autoconf.tcl.in 2014-04-04 22:58:04 UTC (rev 118562)
@@ -32,6 +32,5 @@
#
namespace eval macports::autoconf {
- variable macports_tcl_dir "@macports_tcl_dir@"
variable prefix "@prefix@"
}
Modified: trunk/base/src/package1.0/Makefile.in
===================================================================
--- trunk/base/src/package1.0/Makefile.in 2014-04-04 22:38:29 UTC (rev 118561)
+++ trunk/base/src/package1.0/Makefile.in 2014-04-04 22:58:04 UTC (rev 118562)
@@ -1,14 +1,14 @@
srcdir = @srcdir@
VPATH = @srcdir@
-INSTALLDIR= ${DESTDIR}${datadir}/macports/Tcl/package1.0
+include ../../Mk/macports.autoconf.mk
+INSTALLDIR= ${DESTDIR}${TCL_PACKAGE_PATH}/package1.0
+
SRCS= package.tcl portdmg.tcl portmdmg.tcl portmpkg.tcl portpkg.tcl \
portrpm.tcl portsrpm.tcl portdpkg.tcl portunarchive.tcl \
portarchivefetch.tcl
-include ../../Mk/macports.autoconf.mk
-
all:: pkgIndex.tcl
pkgIndex.tcl: $(SRCS)
Modified: trunk/base/src/package1.0/package_test_autoconf.tcl.in
===================================================================
--- trunk/base/src/package1.0/package_test_autoconf.tcl.in 2014-04-04 22:38:29 UTC (rev 118561)
+++ trunk/base/src/package1.0/package_test_autoconf.tcl.in 2014-04-04 22:58:04 UTC (rev 118562)
@@ -32,7 +32,6 @@
#
namespace eval macports::autoconf {
- variable macports_tcl_dir "@macports_tcl_dir@"
variable prefix "@prefix@"
}
Modified: trunk/base/src/pextlib1.0/Makefile.in
===================================================================
--- trunk/base/src/pextlib1.0/Makefile.in 2014-04-04 22:38:29 UTC (rev 118561)
+++ trunk/base/src/pextlib1.0/Makefile.in 2014-04-04 22:58:04 UTC (rev 118562)
@@ -1,6 +1,8 @@
srcdir = @srcdir@
VPATH = @srcdir@
+include ../../Mk/macports.autoconf.mk
+
OBJS= \
Pextlib.o strsed.o fgetln.o md5cmd.o setmode.o xinstall.o \
fs-traverse.o strcasecmp.o vercomp.o filemap.o base32cmd.o \
@@ -12,9 +14,8 @@
endif
SHLIB_NAME= Pextlib${SHLIB_SUFFIX}
-INSTALLDIR= ${DESTDIR}${datadir}/macports/Tcl/pextlib1.0
+INSTALLDIR= ${DESTDIR}${TCL_PACKAGE_PATH}/pextlib1.0
-include ../../Mk/macports.autoconf.mk
include $(srcdir)/../../Mk/macports.tea.mk
CFLAGS+= ${CURL_CFLAGS} ${MD5_CFLAGS} ${READLINE_CFLAGS}
Modified: trunk/base/src/port/Makefile.in
===================================================================
--- trunk/base/src/port/Makefile.in 2014-04-04 22:38:29 UTC (rev 118561)
+++ trunk/base/src/port/Makefile.in 2014-04-04 22:58:04 UTC (rev 118562)
@@ -1,16 +1,14 @@
srcdir = @srcdir@
VPATH = @srcdir@
+include ../../Mk/macports.autoconf.mk
+
INSTALLDIR= ${DESTDIR}${prefix}
TOPSRCDIR= ../..
SCRIPTS= portmirror portindex port port-tclsh
-edit = sed \
- -e 's, at TCLSH\@,$(TCLSH),g' \
- -e 's, at macports_tcl_dir\@,$(macports_tcl_dir),g'
+edit = sed -e 's, at TCLSH\@,$(TCLSH),g'
-include ../../Mk/macports.autoconf.mk
-
.PHONY: mkdirs
all: ${SCRIPTS}
Modified: trunk/base/src/port1.0/Makefile.in
===================================================================
--- trunk/base/src/port1.0/Makefile.in 2014-04-04 22:38:29 UTC (rev 118561)
+++ trunk/base/src/port1.0/Makefile.in 2014-04-04 22:58:04 UTC (rev 118562)
@@ -1,8 +1,10 @@
srcdir = @srcdir@
VPATH = @srcdir@
-INSTALLDIR= ${DESTDIR}${datadir}/macports/Tcl/port1.0
+include ../../Mk/macports.autoconf.mk
+INSTALLDIR= ${DESTDIR}${TCL_PACKAGE_PATH}/port1.0
+
SRCS_AUTOCONF= port_autoconf.tcl
SRCS= port.tcl portchecksum.tcl portconfigure.tcl portextract.tcl \
portfetch.tcl portmain.tcl portbuild.tcl portpatch.tcl portutil.tcl \
@@ -13,7 +15,6 @@
portdistfiles.tcl fetch_common.tcl portsandbox.tcl
include $(srcdir)/../../Mk/macports.subdir.mk
-include ../../Mk/macports.autoconf.mk
.PHONY: test
Modified: trunk/base/src/port1.0/port_test_autoconf.tcl.in
===================================================================
--- trunk/base/src/port1.0/port_test_autoconf.tcl.in 2014-04-04 22:38:29 UTC (rev 118561)
+++ trunk/base/src/port1.0/port_test_autoconf.tcl.in 2014-04-04 22:58:04 UTC (rev 118562)
@@ -32,6 +32,5 @@
#
namespace eval macports::autoconf {
- variable macports_tcl_dir "@macports_tcl_dir@"
variable prefix "@prefix@"
}
Modified: trunk/base/src/registry2.0/Makefile.in
===================================================================
--- trunk/base/src/registry2.0/Makefile.in 2014-04-04 22:38:29 UTC (rev 118561)
+++ trunk/base/src/registry2.0/Makefile.in 2014-04-04 22:58:04 UTC (rev 118562)
@@ -3,6 +3,8 @@
srcdir = @srcdir@
VPATH = @srcdir@
+include ../../Mk/macports.autoconf.mk
+
SRCS_AUTOCONF = registry_autoconf.tcl
SRCS = registry.tcl registry_util.tcl receipt_flat.tcl receipt_sqlite.tcl portimage.tcl portuninstall.tcl
OBJS = registry.o util.o \
@@ -12,9 +14,8 @@
#graph.o graphobj.o
SHLIB_NAME= registry${SHLIB_SUFFIX}
-INSTALLDIR= ${DESTDIR}${datadir}/macports/Tcl/registry2.0
+INSTALLDIR= ${DESTDIR}${TCL_PACKAGE_PATH}/registry2.0
-include ../../Mk/macports.autoconf.mk
include $(srcdir)/../../Mk/macports.tea.mk
pkgIndex.tcl: $(SRCS) $(SRCS_AUTOCONF)
Modified: trunk/base/src/tclobjc1.0/Makefile.in
===================================================================
--- trunk/base/src/tclobjc1.0/Makefile.in 2014-04-04 22:38:29 UTC (rev 118561)
+++ trunk/base/src/tclobjc1.0/Makefile.in 2014-04-04 22:58:04 UTC (rev 118562)
@@ -1,11 +1,12 @@
srcdir = @srcdir@
VPATH = @srcdir@
+include ../../Mk/macports.autoconf.mk
+
OBJS= tclobjc.o tclobjc_types.o MPMethodSignatureExtensions.o objc_encoding.o
SHLIB_NAME= tclobjc${SHLIB_SUFFIX}
-INSTALLDIR= ${DESTDIR}${datadir}/macports/Tcl/tclobjc1.0
+INSTALLDIR= ${DESTDIR}${TCL_PACKAGE_PATH}/tclobjc1.0
-include ../../Mk/macports.autoconf.mk
include $(srcdir)/../../Mk/macports.tea.mk
LDFLAGS+= ${OBJC_FOUNDATION_LDFLAGS}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140404/c6e79cd6/attachment-0001.html>
More information about the macports-changes
mailing list