From fe87793b8e5bb4a05bc432a3c3b17b3fb870b0c7 Mon Sep 17 00:00:00 2001 From: Joshua Root Date: Sat, 1 Feb 2025 16:43:15 +1100 Subject: [PATCH] Drop support for Mac OS X 10.4 Tiger See thread: https://lists.macports.org/pipermail/macports-dev/2025-January/046014.html --- Makefile.in | 8 --- configure | 13 +--- configure.ac | 9 ++- doc/Makefile.in | 18 +---- portmgr/dmg/InstallationCheck.strings | 2 +- portmgr/dmg/postflight.in | 15 ---- src/config.h.in | 3 - src/cregistry/registry.c | 9 +-- src/cregistry/sql.c | 100 -------------------------- src/machista1.0/libmachista.c | 31 +------- src/macports1.0/macports.tcl | 5 -- src/package1.0/portdmg.tcl | 2 +- src/package1.0/portmdmg.tcl | 2 +- src/package1.0/portpkg.tcl | 84 ++++++++++------------ src/pextlib1.0/curl.c | 39 ---------- src/pextlib1.0/sha256cmd.c | 9 --- src/port/Makefile.in | 2 - src/port1.0/portconfigure.tcl | 18 ++--- src/port1.0/portstartupitem.tcl | 12 +--- src/port1.0/portutil.tcl | 14 +--- 20 files changed, 60 insertions(+), 335 deletions(-) diff --git a/Makefile.in b/Makefile.in index 91210b96a..eefe4e087 100644 --- a/Makefile.in +++ b/Makefile.in @@ -85,14 +85,6 @@ ifeq ($(DESTDIR),) echo "Not updating home directory location for user \"${RUNUSR}\" (not root)" ; \ fi ; \ fi ; \ - if test "@OS_MAJOR@" -eq 8 -a `id -u` -eq 0; then \ - GID=`${DSCL} -q . -read "/Groups/${RUNUSR}" PrimaryGroupID | /usr/bin/awk '{print $$2}'` ; \ - if test "`${DSCL} -q . -read "/Users/${RUNUSR}" PrimaryGroupID 2>/dev/null | /usr/bin/awk '{print $$2}'`" != "$$GID"; then \ - echo "Fixing PrimaryGroupID for user \"${RUNUSR}\"" ; \ - ${DSCL} -q . -create "/Users/${RUNUSR}" PrimaryGroupID $$GID ; \ - ${DSCL} -q . -create "/Users/${RUNUSR}" RealName MacPorts ; \ - fi ; \ - fi ; \ fi ; \ else \ echo "Can't find ${DSCL} / ${DSEDITGROUP}, not creating user \"${RUNUSR}\"" ; \ diff --git a/configure b/configure index 74095f44b..588cc73b6 100755 --- a/configure +++ b/configure @@ -3112,11 +3112,10 @@ printf "%s\n" "$MACOSX_VERSION" >&6; } fi case "$MACOSX_VERSION" in - 10.0|10.0.*|10.1|10.1.*|10.2|10.2.*|10.3|10.3.*) - as_fn_error $? "This version of Mac OS X is not supported - Please upgrade at http://store.apple.com/" "$LINENO" 5 + 10.[0-4]|10.[0-4].*) + as_fn_error $? "MacPorts requires Mac OS X 10.5 or later." "$LINENO" 5 ;; - 10.4|10.4.[1-9]|10.4.10|10.5|10.5.[1-7]|10.6|10.6.[1-7]|10.7|10.7.[1-4]) + 10.5|10.5.[1-7]|10.6|10.6.[1-7]|10.7|10.7.[1-4]) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: This version of Mac OS X is out of date" >&5 printf "%s\n" "$as_me: WARNING: This version of Mac OS X is out of date" >&2;} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Please run Software Update to update it" >&5 @@ -7677,12 +7676,6 @@ if test "x$ac_cv_func_flock" = xyes then : printf "%s\n" "#define HAVE_FLOCK 1" >>confdefs.h -fi -ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls" -if test "x$ac_cv_func_fls" = xyes -then : - printf "%s\n" "#define HAVE_FLS 1" >>confdefs.h - fi ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy" if test "x$ac_cv_func_getentropy" = xyes diff --git a/configure.ac b/configure.ac index 74ff029e5..73d251267 100644 --- a/configure.ac +++ b/configure.ac @@ -28,11 +28,10 @@ if test "x$SW_VERS" != "x"; then fi case "$MACOSX_VERSION" in - 10.0|10.0.*|10.1|10.1.*|10.2|10.2.*|10.3|10.3.*) - AC_MSG_ERROR([This version of Mac OS X is not supported - Please upgrade at http://store.apple.com/]) + 10.[[0-4]]|10.[[0-4]].*) + AC_MSG_ERROR([MacPorts requires Mac OS X 10.5 or later.]) ;; - 10.4|10.4.[[1-9]]|10.4.10|10.5|10.5.[[1-7]]|10.6|10.6.[[1-7]]|10.7|10.7.[[1-4]]) + 10.5|10.5.[[1-7]]|10.6|10.6.[[1-7]]|10.7|10.7.[[1-4]]) AC_MSG_WARN([This version of Mac OS X is out of date]) AC_MSG_WARN([Please run Software Update to update it]) ;; @@ -259,7 +258,7 @@ AC_SUBST(HAVE_DECL_RPP_STDIN, $ac_cv_have_decl_RPP_STDIN) # Checks for library functions. AC_CHECK_FUNCS([OSAtomicCompareAndSwap32 OSAtomicCompareAndSwap64 \ OSAtomicCompareAndSwapPtr __getdirentries64 arc4random_buf clearenv \ - clonefile copyfile _dyld_shared_cache_contains_path flock fls \ + clonefile copyfile _dyld_shared_cache_contains_path flock \ getentropy kqueue posix_spawn setmode sysctlbyname timingsafe_bcmp]) # For vendor/signify diff --git a/doc/Makefile.in b/doc/Makefile.in index c6208abc5..653514fcc 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -162,20 +162,7 @@ distclean: clean %.html: %.soelim ln -sf $(shell basename $$(awk '{print $$2}' < $<)).html $@ -# Define these rules only if asciidoc, xsltproc, and docbook_zsl are -# all available. GNU Make 3.80 (MacOSX 10.4) 'and' does not work, so -# do the check manually. 'and' works in GNU Make 3.81 (MacOSX 10.5+). -ifeq ("$(MAKE_VERSION)","3.80") - ifneq ($(ASCIIDOC),) - ifneq ($(XSLTPROC),) - ifneq ($(DOCBOOK_XSL),) - HAVE_DOCS_REQS= 1 - endif - endif - endif -else - HAVE_DOCS_REQS= $(and $(ASCIIDOC),$(XSLTPROC),$(DOCBOOK_XSL)) -endif +HAVE_DOCS_REQS= $(and $(ASCIIDOC),$(XSLTPROC),$(DOCBOOK_XSL)) ifneq ($(HAVE_DOCS_REQS),) %: %.xml manpage.xsl $(XSLTPROC) $(XSLTFLAGS) manpage.xsl $< @@ -206,11 +193,8 @@ install: all < prefix.mtree $(MTREE) -U -e -p "${DESTDIR}${INSTALLDIR}" > /dev/null < base.mtree $(MTREE) -U -e -p "${DESTDIR}${INSTALLDIR}" > /dev/null ifeq (darwin,@OS_PLATFORM@) -ifneq (8,@OS_MAJOR@) -# Tiger's chmod doesn't accept -h # mtree with umask 0077 doesn't get the permissions of the symlink right chmod -h 755 "${DESTDIR}${INSTALLDIR}/man" -endif endif for f in ${CONF}; do \ diff --git a/portmgr/dmg/InstallationCheck.strings b/portmgr/dmg/InstallationCheck.strings index 314401125..6a66f339f 100644 --- a/portmgr/dmg/InstallationCheck.strings +++ b/portmgr/dmg/InstallationCheck.strings @@ -1,4 +1,4 @@ "16" = "Either uname or sed could not be found in PATH. Your system appears to be incomplete or misconfigured."; -"17" = "Xcode is not installed, or was installed with UNIX Development (10.5+) or Command Line Support (10.4) deselected."; +"17" = "Xcode is not installed, or was installed with UNIX Development deselected."; "18" = "This package is meant to be installed on Mac OS X __XVERS__."; "19" = "Your existing MacPorts or DarwinPorts installation is too old to be upgraded by this installer. Please install MacPorts 1.7.1 first."; diff --git a/portmgr/dmg/postflight.in b/portmgr/dmg/postflight.in index 1ad1c211f..f1e64295b 100755 --- a/portmgr/dmg/postflight.in +++ b/portmgr/dmg/postflight.in @@ -206,14 +206,6 @@ function create_run_user { ${DSCL} -q . -create "/Users/${RUNUSR}" NFSHomeDirectory "${PREFIX}/var/macports/home" ${DSCL} -q . -create "/Users/${RUNUSR}" UserShell /usr/bin/false fi - if [[ "${OS_MAJOR}" -eq 8 ]]; then - GID=$(${DSCL} -q . -read "/Groups/${RUNUSR}" PrimaryGroupID | /usr/bin/awk '{print $2}') - if [[ "$(${DSCL} -q . -read "/Users/${RUNUSR}" PrimaryGroupID 2>/dev/null | /usr/bin/awk '{print $2}')" != "$GID" ]]; then - echo "Fixing PrimaryGroupID for user \"${RUNUSR}\"" - ${DSCL} -q . -create "/Users/${RUNUSR}" PrimaryGroupID "$GID" - ${DSCL} -q . -create "/Users/${RUNUSR}" RealName MacPorts - fi - fi if [[ "$(${DSCL} -q . -read "/Users/${RUNUSR}" NFSHomeDirectory)" != "NFSHomeDirectory: ${PREFIX}/var/macports/home" ]]; then echo "Updating home directory location for user \"${RUNUSR}\"" ${DSCL} -q . -create "/Users/${RUNUSR}" NFSHomeDirectory "${PREFIX}/var/macports/home" @@ -307,13 +299,6 @@ if /usr/bin/su "${USER}" -l -c "/usr/bin/printenv MANPATH" > /dev/null; then fi fi -# Adding a DISPLAY variable only if we're running on Tiger or less and if it doesn't already exist: -if [[ "${OS_MAJOR}" -ge 9 ]] || /usr/bin/su "${USER}" -l -c "/usr/bin/printenv DISPLAY" > /dev/null; then - echo "Your shell already has the right DISPLAY environment variable for use with MacPorts!" -else - write_setting DISPLAY ":0" -fi - # Postflight script is done with its job, update MacPorts and exit gracefully! update_macports echo "You have successfully installed the MacPorts system. Launch a terminal and try it out!" diff --git a/src/config.h.in b/src/config.h.in index 4106efea6..e0ee49262 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -71,9 +71,6 @@ /* Define to 1 if you have the 'flock' function. */ #undef HAVE_FLOCK -/* Define to 1 if you have the 'fls' function. */ -#undef HAVE_FLS - /* Define if CoreFoundation framework is available */ #undef HAVE_FRAMEWORK_COREFOUNDATION diff --git a/src/cregistry/registry.c b/src/cregistry/registry.c index b280764d7..a778e2daa 100644 --- a/src/cregistry/registry.c +++ b/src/cregistry/registry.c @@ -128,13 +128,8 @@ int reg_open(reg_registry** regPtr, reg_error* errPtr) { return 0; } if (sqlite3_open(NULL, ®->db) == SQLITE_OK) { - /* Enable extended result codes, requires SQLite >= 3.3.8 - * Check added for compatibility with Tiger. */ -#if SQLITE_VERSION_NUMBER >= 3003008 - if (sqlite3_libversion_number() >= 3003008) { - sqlite3_extended_result_codes(reg->db, 1); - } -#endif + /* Enable extended result codes, requires SQLite >= 3.3.8 */ + sqlite3_extended_result_codes(reg->db, 1); sqlite3_busy_timeout(reg->db, 25); diff --git a/src/cregistry/sql.c b/src/cregistry/sql.c index b381434c1..1995463b2 100644 --- a/src/cregistry/sql.c +++ b/src/cregistry/sql.c @@ -346,41 +346,8 @@ int update_db(sqlite3* db, reg_error* errPtr) { /* we need to update to 1.1, add binary field and index to files * table */ static char* version_1_1_queries[] = { -#if SQLITE_VERSION_NUMBER >= 3002000 "ALTER TABLE registry.files ADD COLUMN binary BOOL", -#else - /* - * SQLite < 3.2.0 doesn't support ALTER TABLE ADD COLUMN - * Unfortunately, Tiger ships with SQLite < 3.2.0 (#34463) - * This is taken from http://www.sqlite.org/faq.html#q11 - */ - /* Create a temporary table */ - "CREATE TEMPORARY TABLE mp_files_backup (id INTEGER, path TEXT, " - "actual_path TEXT, active INT, mtime DATETIME, md5sum TEXT, editable INT, " - "FOREIGN KEY(id) REFERENCES ports(id))", - - /* Copy all data into the temporary table */ - "INSERT INTO mp_files_backup SELECT id, path, actual_path, active, mtime, " - "md5sum, editable FROM registry.files", - - /* Drop the original table and re-create it with the new structure */ - "DROP TABLE registry.files", - "CREATE TABLE registry.files (id INTEGER, path TEXT, actual_path TEXT, " - "active INT, mtime DATETIME, md5sum TEXT, editable INT, binary BOOL, " - "FOREIGN KEY(id) REFERENCES ports(id))", - "CREATE INDEX registry.file_port ON files(id)", - "CREATE INDEX registry.file_path ON files(path)", - "CREATE INDEX registry.file_actual ON files(actual_path)", - - /* Copy all data back from temporary table */ - "INSERT INTO registry.files (id, path, actual_path, active, mtime, md5sum, " - "editable) SELECT id, path, actual_path, active, mtime, md5sum, " - "editable FROM mp_files_backup", - - /* Remove temporary table */ - "DROP TABLE mp_files_backup", -#endif "CREATE INDEX registry.file_binary ON files(binary)", "UPDATE registry.metadata SET value = '1.100' WHERE key = 'version'", @@ -667,75 +634,8 @@ int update_db(sqlite3* db, reg_error* errPtr) { if (sql_version(NULL, -1, version, -1, "1.204") < 0) { /* add */ static char* version_1_204_queries[] = { -#if SQLITE_VERSION_NUMBER >= 3002000 "ALTER TABLE registry.ports ADD COLUMN cxx_stdlib TEXT", "ALTER TABLE registry.ports ADD COLUMN cxx_stdlib_overridden INTEGER", -#else - - /* Create a temporary table */ - "CREATE TEMPORARY TABLE mp_ports_backup (" - "id INTEGER PRIMARY KEY" - ", name TEXT COLLATE NOCASE" - ", portfile TEXT" - ", location TEXT" - ", epoch INTEGER" - ", version TEXT COLLATE VERSION" - ", revision INTEGER" - ", variants TEXT" - ", negated_variants TEXT" - ", state TEXT" - ", date DATETIME" - ", installtype TEXT" - ", archs TEXT" - ", requested INTEGER" - ", os_platform TEXT" - ", os_major INTEGER" - ", UNIQUE (name, epoch, version, revision, variants)" - ")", - - /* Copy all data into the temporary table */ - "INSERT INTO mp_ports_backup SELECT id, name, portfile, location, epoch, " - "version, revision, variants, negated_variants, state, date, installtype, " - "archs, requested, os_platform, os_major FROM registry.ports", - - /* Drop the original table and re-create it with the new structure */ - "DROP TABLE registry.ports", - "CREATE TABLE registry.ports (" - "id INTEGER PRIMARY KEY" - ", name TEXT COLLATE NOCASE" - ", portfile TEXT" - ", location TEXT" - ", epoch INTEGER" - ", version TEXT COLLATE VERSION" - ", revision INTEGER" - ", variants TEXT" - ", negated_variants TEXT" - ", state TEXT" - ", date DATETIME" - ", installtype TEXT" - ", archs TEXT" - ", requested INTEGER" - ", os_platform TEXT" - ", os_major INTEGER" - ", cxx_stdlib TEXT" - ", cxx_stdlib_overridden INTEGER" - ", UNIQUE (name, epoch, version, revision, variants)" - ")", - "CREATE INDEX registry.port_name ON ports" - "(name, epoch, version, revision, variants)", - "CREATE INDEX registry.port_state ON ports(state)", - - /* Copy all data back from temporary table */ - "INSERT INTO registry.ports (id, name, portfile, location, epoch, version, " - "revision, variants, negated_variants, state, date, installtype, archs, " - "requested, os_platform, os_major) SELECT id, name, portfile, location, " - "epoch, version, revision, variants, negated_variants, state, date, " - "installtype, archs, requested, os_platform, os_major " - "FROM mp_ports_backup", - - /* Remove temporary table */ - "DROP TABLE mp_ports_backup", -#endif "UPDATE registry.metadata SET value = '1.204' WHERE key = 'version'", "COMMIT", diff --git a/src/machista1.0/libmachista.c b/src/machista1.0/libmachista.c index 016f79401..cdbe28cf4 100644 --- a/src/machista1.0/libmachista.c +++ b/src/machista1.0/libmachista.c @@ -63,25 +63,6 @@ #include "hashmap.h" #include "strlcpy.h" -#ifdef __MACH__ -/* Tiger compatibility */ -#ifndef LC_RPATH -#define LC_RPATH (0x1c | LC_REQ_DYLD) /* runpath additions */ -/* - * The rpath_command contains a path which at runtime should be added to - * the current run path used to find @rpath prefixed dylibs. - */ -struct rpath_command { - uint32_t cmd; /* LC_RPATH */ - uint32_t cmdsize; /* includes string */ - union lc_str path; /* path to add to run path */ -}; -#endif -#ifndef LC_REEXPORT_DYLIB -#define LC_REEXPORT_DYLIB (0x1f | LC_REQ_DYLD) /* load and re-export dylib */ -#endif -#endif /* __MACH__ */ - typedef struct macho_input { const void *data; size_t length; @@ -551,17 +532,7 @@ void macho_destroy_handle(macho_handle_t *handle) { /* Returns string representation of the MACHO_* error code constants */ const char *macho_strerror(int err) { - int num; -#ifdef HAVE_FLS - num = fls(err); -#else - /* Tiger compatibility, see #42186 */ - num = 0; - while (err > 0) { - err >>= 1; - num++; - } -#endif + int num = fls(err); static char *errors[] = { /* 0x00 */ "Success", diff --git a/src/macports1.0/macports.tcl b/src/macports1.0/macports.tcl index 4f0513317..fef025d26 100644 --- a/src/macports1.0/macports.tcl +++ b/src/macports1.0/macports.tcl @@ -6605,11 +6605,6 @@ proc macports::get_parallel_jobs {{mem_restrict yes}} { proc macports::get_compatible_xcode_versions {} { variable macos_version_major switch $macos_version_major { - 10.4 { - set min 2.0 - set ok 2.4.1 - set rec 2.5 - } 10.5 { set min 3.0 set ok 3.1 diff --git a/src/package1.0/portdmg.tcl b/src/package1.0/portdmg.tcl index 39ae1470a..83e167337 100644 --- a/src/package1.0/portdmg.tcl +++ b/src/package1.0/portdmg.tcl @@ -71,7 +71,7 @@ proc portdmg::package_dmg {portname portversion portrevision} { } # partition for .dmg - if {${os.major} >= 9 && ${os.arch} eq "i386"} { + if {${os.arch} in {arm i386}} { # GUID_partition_scheme set subdev 1 } else { diff --git a/src/package1.0/portmdmg.tcl b/src/package1.0/portmdmg.tcl index 885f4e7ec..369635156 100644 --- a/src/package1.0/portmdmg.tcl +++ b/src/package1.0/portmdmg.tcl @@ -71,7 +71,7 @@ proc portmdmg::package_mdmg {portname portversion portrevision} { } # partition for .dmg - if {${os.major} >= 9 && ${os.arch} eq "i386"} { + if {${os.arch} in {arm i386}} { # GUID_partition_scheme set subdev 1 } else { diff --git a/src/package1.0/portpkg.tcl b/src/package1.0/portpkg.tcl index c591552d6..824cc8c7c 100644 --- a/src/package1.0/portpkg.tcl +++ b/src/package1.0/portpkg.tcl @@ -60,7 +60,7 @@ proc portpkg::pkg_start {args} { global packagemaker_path xcodeversion porturl \ package.resources package.scripts package.flat \ subport version revision description long_description \ - homepage workpath os.major + homepage workpath variable packagemaker variable pkgbuild variable language @@ -101,7 +101,7 @@ proc portpkg::pkg_start {args} { write_welcome_html ${package.resources}/${language}.lproj/Welcome.html $subport $version $revision $pkg_long_description $pkg_description $pkg_homepage file copy -force -- [getportresourcepath $porturl "port1.0/package/background.tiff"] ${package.resources}/${language}.lproj/background.tiff - if {${package.flat} && ${os.major} >= 9} { + if {${package.flat}} { write_distribution "${workpath}/Distribution" $subport $version $revision } } @@ -154,52 +154,46 @@ proc portpkg::package_pkg {portname portepoch portversion portrevision} { set using_pkgbuild [expr {$pkgbuild ne "" && ${package.flat}}] if {$using_pkgbuild || [file exists "$packagemaker"]} { - if {${os.major} >= 9} { - if {${package.flat}} { - set pkgtarget "10.5" - set pkgresources " --scripts [shellescape ${package.scripts}]" - set infofile "${workpath}/PackageInfo" - write_package_info $infofile + if {${package.flat}} { + set pkgtarget "10.5" + set pkgresources " --scripts [shellescape ${package.scripts}]" + set infofile "${workpath}/PackageInfo" + write_package_info $infofile + } else { + set pkgtarget "10.3" + set pkgresources " --resources [shellescape ${package.resources}] --title \"$portname-$portversion\"" + set infofile "${workpath}/Info.plist" + write_info_plist $infofile $portname $portversion $portrevision + } + if {$using_pkgbuild} { + set cmdline "$pkgbuild --root [shellescape ${destpath}] ${pkgresources} --info [shellescape $infofile] --install-location / --identifier org.macports.$portname" + } else { + set cmdline "PMResourceLocale=${language} [shellescape $packagemaker] --root [shellescape ${destpath}] --out [shellescape ${pkgpath}] ${pkgresources} --info [shellescape $infofile] --target $pkgtarget --domain system --id org.macports.$portname" + } + if {${os.major} >= 10} { + set v [mp_version_to_apple_version $portepoch $portversion $portrevision] + append cmdline " --version $v" + if {!$using_pkgbuild} { + append cmdline " --no-relocate" } else { - set pkgtarget "10.3" - set pkgresources " --resources [shellescape ${package.resources}] --title \"$portname-$portversion\"" - set infofile "${workpath}/Info.plist" - write_info_plist $infofile $portname $portversion $portrevision - } - if {$using_pkgbuild} { - set cmdline "$pkgbuild --root [shellescape ${destpath}] ${pkgresources} --info [shellescape $infofile] --install-location / --identifier org.macports.$portname" - } else { - set cmdline "PMResourceLocale=${language} [shellescape $packagemaker] --root [shellescape ${destpath}] --out [shellescape ${pkgpath}] ${pkgresources} --info [shellescape $infofile] --target $pkgtarget --domain system --id org.macports.$portname" - } - if {${os.major} >= 10} { - set v [mp_version_to_apple_version $portepoch $portversion $portrevision] - append cmdline " --version $v" - if {!$using_pkgbuild} { - append cmdline " --no-relocate" - } else { - append cmdline " ${pkgpath}" - } - } else { - # 10.5 Leopard does not use current language, manually specify - append cmdline " -AppleLanguages \"(${language})\"" - } - ui_debug "Running command line: $cmdline" - system $cmdline - - if {${package.flat} && ${os.major} >= 10} { - # the package we just built is just a component - set componentpath "[file rootname ${pkgpath}]-component.pkg" - file rename -force ${pkgpath} ${componentpath} - # Generate a distribution - set productbuild [findBinary productbuild] - set cmdline "$productbuild --resources [shellescape ${package.resources}] --identifier org.macports.${portname} --distribution [shellescape ${workpath}/Distribution] --package-path [shellescape ${package.destpath}] [shellescape ${pkgpath}]" - ui_debug "Running command line: $cmdline" - system $cmdline + append cmdline " ${pkgpath}" } } else { - write_info_plist ${workpath}/Info.plist $portname $portversion $portrevision - write_description_plist ${workpath}/Description.plist $portname $portversion $description - system "[shellescape $packagemaker] -build -f [shellescape ${destpath}] -p [shellescape ${pkgpath}] -r [shellescape ${package.resources}] -i [shellescape ${workpath}/Info.plist] -d [shellescape ${workpath}/Description.plist]" + # 10.5 Leopard does not use current language, manually specify + append cmdline " -AppleLanguages \"(${language})\"" + } + ui_debug "Running command line: $cmdline" + system $cmdline + + if {${package.flat} && ${os.major} >= 10} { + # the package we just built is just a component + set componentpath "[file rootname ${pkgpath}]-component.pkg" + file rename -force ${pkgpath} ${componentpath} + # Generate a distribution + set productbuild [findBinary productbuild] + set cmdline "$productbuild --resources [shellescape ${package.resources}] --identifier org.macports.${portname} --distribution [shellescape ${workpath}/Distribution] --package-path [shellescape ${package.destpath}] [shellescape ${pkgpath}]" + ui_debug "Running command line: $cmdline" + system $cmdline } file delete ${workpath}/Info.plist \ diff --git a/src/pextlib1.0/curl.c b/src/pextlib1.0/curl.c index 82c94b4e7..1ac46b88c 100644 --- a/src/pextlib1.0/curl.c +++ b/src/pextlib1.0/curl.c @@ -739,45 +739,6 @@ CurlFetchCmd(Tcl_Interp* interp, int objc, Tcl_Obj* const objv[]) (void) fclose(theFile); theFile = NULL; -#if LIBCURL_VERSION_NUM == 0x070d01 /* work around broken Tiger version of curl */ - if (remotetime) { - FILE *fp; - char *tmp, *p; - char buf[BUFSIZ]; - size_t size; - - tmp = tmpnam(NULL); - fp = fopen(tmp, "w"); - if (fp == NULL) { - Tcl_SetResult(interp, strerror(errno), TCL_VOLATILE); - theResult = TCL_ERROR; - break; - } - theFile = fopen(theFilePath, "r"); - if (theFile == NULL) { - Tcl_SetResult(interp, strerror(errno), TCL_VOLATILE); - theResult = TCL_ERROR; - break; - } - if ((p = fgets(buf, BUFSIZ, theFile)) != NULL) { - /* skip stray header escaping into output */ - if (strncmp(p, "Last-Modified:", 14) != 0) - rewind(theFile); - } - while ((size = fread(buf, 1, BUFSIZ, theFile)) > 0) { - fwrite(buf, 1, size, fp); - } - (void) fclose(theFile); - theFile = NULL; - fclose(fp); - if (rename(tmp, theFilePath) != 0) { - Tcl_SetResult(interp, strerror(errno), TCL_VOLATILE); - theResult = TCL_ERROR; - break; - } - } -#endif - if (remotetime) { theCurlCode = curl_easy_getinfo(theHandle, CURLINFO_FILETIME, &theFileTime); if (theCurlCode == CURLE_OK && theFileTime > 0) { diff --git a/src/pextlib1.0/sha256cmd.c b/src/pextlib1.0/sha256cmd.c index 4a8650b42..5a58a2e57 100644 --- a/src/pextlib1.0/sha256cmd.c +++ b/src/pextlib1.0/sha256cmd.c @@ -48,15 +48,6 @@ #define COMMON_DIGEST_FOR_OPENSSL #include -/* Tiger compatibility */ -#ifndef SHA256_DIGEST_LENGTH -#define SHA256_DIGEST_LENGTH CC_SHA256_DIGEST_LENGTH -#define SHA256_CTX CC_SHA256_CTX -#define SHA256_Init(c) CC_SHA256_Init(c) -#define SHA256_Update(c,d,l) CC_SHA256_Update(c,d,l) -#define SHA256_Final(m, c) CC_SHA256_Final(m,c) -#endif - #include "md_wrappers.h" CHECKSUMEnd(SHA256_, SHA256_CTX, SHA256_DIGEST_LENGTH) CHECKSUMFile(SHA256_, SHA256_CTX) diff --git a/src/port/Makefile.in b/src/port/Makefile.in index d20c2dcbe..dd02f06f4 100644 --- a/src/port/Makefile.in +++ b/src/port/Makefile.in @@ -41,7 +41,5 @@ install: all mkdirs $(LN_S) -f port "${DESTDIR}${bindir}/portf" $(LN_S) -f "${TCLSH}" "${DESTDIR}${bindir}/port-tclsh" ifeq (darwin,@OS_PLATFORM@) -ifneq (8,@OS_MAJOR@) chmod -h 555 "${DESTDIR}${bindir}/portf" "${DESTDIR}${bindir}/port-tclsh" endif -endif diff --git a/src/port1.0/portconfigure.tcl b/src/port1.0/portconfigure.tcl index fc8b50f08..99dd0b8bb 100644 --- a/src/port1.0/portconfigure.tcl +++ b/src/port1.0/portconfigure.tcl @@ -557,11 +557,6 @@ proc portconfigure::configure_get_sdkroot {sdk_version} { return {} } - # Special hack for Tiger/ppc, since the system libraries do not contain intel slices - if {${os.arch} eq "powerpc" && $macos_version_major eq "10.4" && [variant_exists universal] && [variant_isset universal]} { - return ${developer_dir}/SDKs/MacOSX10.4u.sdk - } - # Use the DevSDK (eg: /usr/include) if present and the requested SDK version matches the host version if {${os.major} < 19 && $sdk_version eq $macos_version_major && [file exists /usr/include/sys/cdefs.h]} { return {} @@ -1249,7 +1244,7 @@ proc portconfigure::get_clang_compilers {} { } } - if {${os.major} >= 9 && ${os.major} < 20} { + if {${os.major} < 20} { lappend compilers macports-clang-7.0 \ macports-clang-6.0 \ macports-clang-5.0 @@ -1257,13 +1252,8 @@ proc portconfigure::get_clang_compilers {} { if {${os.major} < 16} { # The Sierra SDK requires a toolchain that supports class properties - if {${os.major} >= 9} { - lappend compilers macports-clang-3.7 - } - lappend compilers macports-clang-3.4 - if {${os.major} < 9} { - lappend compilers macports-clang-3.3 - } + lappend compilers macports-clang-3.7 \ + compilers macports-clang-3.4 } } @@ -1857,7 +1847,7 @@ proc portconfigure::configure_main {args} { append_to_environment_value configure "__CFPREFERENCES_AVOID_DAEMON" 1 } - # add SDK flags if cross-compiling (or universal on ppc tiger) + # add SDK flags if needed if {${configure.sdkroot} ne "" && !${compiler.limit_flags}} { foreach env_var {CPPFLAGS CFLAGS CXXFLAGS OBJCFLAGS OBJCXXFLAGS} { append_to_environment_value configure $env_var -isysroot${configure.sdkroot} diff --git a/src/port1.0/portstartupitem.tcl b/src/port1.0/portstartupitem.tcl index eb361fe9c..8772c0953 100644 --- a/src/port1.0/portstartupitem.tcl +++ b/src/port1.0/portstartupitem.tcl @@ -480,11 +480,7 @@ proc portstartupitem::startupitem_create_darwin_launchd {attrs} { puts ${plist} "" puts ${plist} "Disabled" - if {$macosx_deployment_target ne "10.4"} { - puts ${plist} "KeepAlive" - } else { - puts ${plist} "OnDemand" - } + puts ${plist} "KeepAlive" if {$username ne ""} { puts ${plist} "UserName$username" @@ -563,12 +559,8 @@ proc portstartupitem::loaded {} { if {![catch {exec -ignorestderr $launchctl_path print ${domain}/${si_uniquename} >&/dev/null}]} { lappend ret $si_name } - } elseif {${os.major} >= 9} { - if {![catch {exec_as_uid $uid {system "$launchctl_path list ${si_uniquename} > /dev/null"}}]} { - lappend ret $si_name - } } else { - if {![catch {exec_as_uid $uid {system "$launchctl_path list | grep -F ${si_uniquename} > /dev/null"}}]} { + if {![catch {exec_as_uid $uid {system "$launchctl_path list ${si_uniquename} > /dev/null"}}]} { lappend ret $si_name } } diff --git a/src/port1.0/portutil.tcl b/src/port1.0/portutil.tcl index 1bd67d8ce..0ec87f1cf 100644 --- a/src/port1.0/portutil.tcl +++ b/src/port1.0/portutil.tcl @@ -2807,19 +2807,7 @@ proc extract_archive_metadata {archive_location archive_type metadata_types} { switch -- $archive_type { tbz - tbz2 { - global os.major os.platform - if {${os.major} == 8 && ${os.platform} eq "darwin"} { - # https://trac.macports.org/ticket/70622 - set tar_cmd [string cat [findBinary tar ${portutil::autoconf::tar_path}] \ - " -xOj${qflag}f [shellescape $archive_location] ./+CONTENTS" \ - " 2>/dev/null || true"] - set raw_contents [exec -ignorestderr /bin/sh -c $tar_cmd] - if {$raw_contents eq ""} { - error "extracting +CONTENTS from $archive_location failed" - } - } else { - set raw_contents [exec -ignorestderr [findBinary tar ${portutil::autoconf::tar_path}] -xOj${qflag}f $archive_location ./+CONTENTS] - } + set raw_contents [exec -ignorestderr [findBinary tar ${portutil::autoconf::tar_path}] -xOj${qflag}f $archive_location ./+CONTENTS] } tgz { set raw_contents [exec -ignorestderr [findBinary tar ${portutil::autoconf::tar_path}] -xOz${qflag}f $archive_location ./+CONTENTS]