Changeset 118562 for trunk/base/src


Ignore:
Timestamp:
Apr 4, 2014, 10:58:04 PM (6 years ago)
Author:
cal@…
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.

Location:
trunk/base/src
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/cflib1.0/Makefile.in

    r117621 r118562  
    11srcdir = @srcdir@
    22VPATH  = @srcdir@
     3
     4include ../../Mk/macports.autoconf.mk
    35
    46OBJS=           CFLib.o
    57SHLIB_NAME=     CFLib${SHLIB_SUFFIX}
    68LIBS+=          -framework CoreFoundation
    7 INSTALLDIR= ${DESTDIR}${datadir}/macports/Tcl/cflib1.0
     9INSTALLDIR= ${DESTDIR}${TCL_PACKAGE_PATH}/cflib1.0
    810
    9 include ../../Mk/macports.autoconf.mk
    1011include $(srcdir)/../../Mk/macports.tea.mk
  • trunk/base/src/darwintracelib1.0/Makefile.in

    r118264 r118562  
    11srcdir = @srcdir@
    22VPATH  = @srcdir@
     3
     4include ../../Mk/macports.autoconf.mk
    35
    46# This Makefile will only be run on Darwin systems; we can safely use
     
    79OBJS=           $(SRCS:%.c=%.o)
    810SHLIB_NAME=     darwintrace${SHLIB_SUFFIX}
    9 INSTALLDIR=     ${DESTDIR}${datadir}/macports/Tcl/darwintrace1.0
    10 
    11 include ../../Mk/macports.autoconf.mk
     11INSTALLDIR=     ${DESTDIR}${TCL_PACKAGE_PATH}/darwintrace1.0
    1212
    1313# Yes, we know having $ signs in identifiers is not a very good idea; in the
  • trunk/base/src/machista1.0/Makefile.in

    r117615 r118562  
    22VPATH  = @srcdir@
    33
     4include ../../Mk/macports.autoconf.mk
     5
    46OBJS=           libmachista.o hashmap.o machista_wrap.o
    57SHLIB_NAME= machista${SHLIB_SUFFIX}
    6 INSTALLDIR=     ${DESTDIR}${datadir}/macports/Tcl/machista1.0
     8INSTALLDIR=     ${DESTDIR}${TCL_PACKAGE_PATH}/machista1.0
    79
    810SWIG         = @SWIG@
     
    1618TESTS = ./tests/libmachista-test
    1719
    18 include ../../Mk/macports.autoconf.mk
    1920include $(srcdir)/../../Mk/macports.tea.mk
    2021
  • trunk/base/src/macports1.0/Makefile.in

    r118559 r118562  
    11srcdir = @srcdir@
    22VPATH  = @srcdir@
     3
     4include ../../Mk/macports.autoconf.mk
    35
    46SRCS=           macports.tcl macports_dlist.tcl macports_util.tcl \
     
    79SHLIB_NAME=     MacPorts${SHLIB_SUFFIX}
    810
    9 INSTALLDIR=     ${DESTDIR}${datadir}/macports/Tcl/macports1.0
    10 INSTALLPKGLINK= ${TCL_PACKAGE_PATH}/macports1.0
    11 
    12 include ../../Mk/macports.autoconf.mk
    13 include $(srcdir)/../../Mk/macports.tea.mk
     11INSTALLDIR=     ${DESTDIR}${TCL_PACKAGE_PATH}/macports1.0
     12OLDINSTALLDIR= ${datadir}/macports
    1413
    1514ifeq ($(OBJC_RUNTIME), APPLE_RUNTIME)
     
    2726
    2827install:: all
     28        @# Clean up old instances of the MacPorts Tcl packages
     29        if test -z "${DESTDIR}"; then rm -rf "${OLDINSTALLDIR}"; fi
     30
     31        @# Remove the previously installed link if it still exists. Without this,
     32        @# creating the directory will fail.
     33        if test -L "${INSTALLDIR}"; then rm -rf "${INSTALLDIR}"; fi
     34
    2935        $(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} ${INSTALLDIR}
    3036
     
    3541        $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 pkgIndex.tcl ${INSTALLDIR}
    3642
    37         echo "${TCL_PACKAGE_PATH}" > ${DESTDIR}${prefix}/var/macports/.tclpackage
    38         if test -z "${DESTDIR}" -a "${INSTALLPKGLINK}" != "${INSTALLDIR}"; then \
    39                 if test ! -L "${INSTALLPKGLINK}"; then \
    40             if test ! -e "${TCL_PACKAGE_PATH}"; then \
    41                 $(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} "${TCL_PACKAGE_PATH}" || true; \
    42             fi; \
    43             if test -d "${INSTALLPKGLINK}"; then \
    44                 rm -vrf "${INSTALLPKGLINK}" || true; \
    45             fi; \
    46             if test ! -e "${INSTALLPKGLINK}"; then \
    47                 ln -vs "${INSTALLDIR}" "${INSTALLPKGLINK}" || true; \
    48             fi; \
    49         fi; \
    50         fi
     43
     44include $(srcdir)/../../Mk/macports.tea.mk
  • trunk/base/src/macports1.0/macports.tcl

    r118456 r118562  
    10241024    }
    10251025
    1026     if {[file isdirectory $libpath]} {
    1027         lappend auto_path $libpath
    1028         set macports::auto_path $auto_path
    1029 
    1030         # XXX: not sure if this the best place, but it needs to happen
    1031         # early, and after auto_path has been set.  Or maybe Pextlib
    1032         # should ship with macports1.0 API?
    1033         package require Pextlib 1.0
    1034         package require registry 1.0
    1035         package require registry2 2.0
    1036         package require machista 1.0
    1037     } else {
    1038         return -code error "Library directory '$libpath' must exist"
    1039     }
    1040 
    10411026    # set the hidden flag on $portdbpath to avoid spotlight indexing, which
    10421027    # might slow builds down considerably. You can avoid this by touching
  • trunk/base/src/macports1.0/macports_test_autoconf.tcl.in

    r111325 r118562  
    3333
    3434namespace eval macports::autoconf {
    35     variable macports_tcl_dir "@macports_tcl_dir@"
    3635    variable prefix "@prefix@"
    3736}
  • trunk/base/src/package1.0/Makefile.in

    r118264 r118562  
    22VPATH  = @srcdir@
    33
    4 INSTALLDIR=     ${DESTDIR}${datadir}/macports/Tcl/package1.0
     4include ../../Mk/macports.autoconf.mk
     5
     6INSTALLDIR=     ${DESTDIR}${TCL_PACKAGE_PATH}/package1.0
    57
    68SRCS=   package.tcl portdmg.tcl portmdmg.tcl portmpkg.tcl portpkg.tcl \
    79        portrpm.tcl portsrpm.tcl portdpkg.tcl portunarchive.tcl \
    810        portarchivefetch.tcl
    9 
    10 include ../../Mk/macports.autoconf.mk
    1111
    1212all:: pkgIndex.tcl
  • trunk/base/src/package1.0/package_test_autoconf.tcl.in

    r111455 r118562  
    3333
    3434namespace eval macports::autoconf {
    35     variable macports_tcl_dir "@macports_tcl_dir@"
    3635    variable prefix "@prefix@"
    3736}
  • trunk/base/src/pextlib1.0/Makefile.in

    r117616 r118562  
    11srcdir = @srcdir@
    22VPATH  = @srcdir@
     3
     4include ../../Mk/macports.autoconf.mk
    35
    46OBJS= \
     
    1315
    1416SHLIB_NAME= Pextlib${SHLIB_SUFFIX}
    15 INSTALLDIR= ${DESTDIR}${datadir}/macports/Tcl/pextlib1.0
     17INSTALLDIR= ${DESTDIR}${TCL_PACKAGE_PATH}/pextlib1.0
    1618
    17 include ../../Mk/macports.autoconf.mk
    1819include $(srcdir)/../../Mk/macports.tea.mk
    1920
  • trunk/base/src/port/Makefile.in

    r118559 r118562  
    11srcdir = @srcdir@
    22VPATH  = @srcdir@
     3
     4include ../../Mk/macports.autoconf.mk
    35
    46INSTALLDIR=     ${DESTDIR}${prefix}
     
    68SCRIPTS=        portmirror portindex port port-tclsh
    79
    8 edit = sed \
    9         -e 's,@TCLSH\@,$(TCLSH),g' \
    10         -e 's,@macports_tcl_dir\@,$(macports_tcl_dir),g'
    11 
    12 include ../../Mk/macports.autoconf.mk
     10edit = sed -e 's,@TCLSH\@,$(TCLSH),g'
    1311
    1412.PHONY: mkdirs
  • trunk/base/src/port1.0/Makefile.in

    r118264 r118562  
    22VPATH  = @srcdir@
    33
    4 INSTALLDIR=     ${DESTDIR}${datadir}/macports/Tcl/port1.0
     4include ../../Mk/macports.autoconf.mk
     5
     6INSTALLDIR=     ${DESTDIR}${TCL_PACKAGE_PATH}/port1.0
    57
    68SRCS_AUTOCONF= port_autoconf.tcl
     
    1416
    1517include $(srcdir)/../../Mk/macports.subdir.mk
    16 include ../../Mk/macports.autoconf.mk
    1718
    1819.PHONY: test
  • trunk/base/src/port1.0/port_test_autoconf.tcl.in

    r111325 r118562  
    3333
    3434namespace eval macports::autoconf {
    35     variable macports_tcl_dir "@macports_tcl_dir@"
    3635    variable prefix "@prefix@"
    3736}
  • trunk/base/src/registry2.0/Makefile.in

    r118264 r118562  
    33srcdir = @srcdir@
    44VPATH  = @srcdir@
     5
     6include ../../Mk/macports.autoconf.mk
    57
    68SRCS_AUTOCONF = registry_autoconf.tcl
     
    1315
    1416SHLIB_NAME= registry${SHLIB_SUFFIX}
    15 INSTALLDIR= ${DESTDIR}${datadir}/macports/Tcl/registry2.0
     17INSTALLDIR= ${DESTDIR}${TCL_PACKAGE_PATH}/registry2.0
    1618
    17 include ../../Mk/macports.autoconf.mk
    1819include $(srcdir)/../../Mk/macports.tea.mk
    1920
  • trunk/base/src/tclobjc1.0/Makefile.in

    r117620 r118562  
    22VPATH  = @srcdir@
    33
     4include ../../Mk/macports.autoconf.mk
     5
    46OBJS=           tclobjc.o tclobjc_types.o MPMethodSignatureExtensions.o objc_encoding.o
    57SHLIB_NAME=     tclobjc${SHLIB_SUFFIX}
    6 INSTALLDIR=     ${DESTDIR}${datadir}/macports/Tcl/tclobjc1.0
     8INSTALLDIR=     ${DESTDIR}${TCL_PACKAGE_PATH}/tclobjc1.0
    79
    8 include ../../Mk/macports.autoconf.mk
    910include $(srcdir)/../../Mk/macports.tea.mk
    1011
Note: See TracChangeset for help on using the changeset viewer.