Fri Aug 14 07:24:16 2020 UTC ()
Retire --binary-macpkg option, which would generate a binary pkgsrc
bootstrap kit for macOS in the form of a double-clickable .pkg.


(schmonz)
diff -r1.38 -r1.39 pkgsrc/bootstrap/README.MacOSX
diff -r1.289 -r1.290 pkgsrc/bootstrap/bootstrap
diff -r1.2 -r0 pkgsrc/bootstrap/macpkg.pmproj.in

cvs diff -r1.38 -r1.39 pkgsrc/bootstrap/Attic/README.MacOSX (expand / switch to unified diff)

--- pkgsrc/bootstrap/Attic/README.MacOSX 2019/07/26 15:41:43 1.38
+++ pkgsrc/bootstrap/Attic/README.MacOSX 2020/08/14 07:24:16 1.39
@@ -1,39 +1,32 @@ @@ -1,39 +1,32 @@
1$NetBSD: README.MacOSX,v 1.38 2019/07/26 15:41:43 prlw1 Exp $ 1$NetBSD: README.MacOSX,v 1.39 2020/08/14 07:24:16 schmonz Exp $
2 2
3This file describes the use of current versions of pkgsrc with 3This file describes the use of current versions of pkgsrc with
4multiple versions of Darwin and macOS, omitting information about 4multiple versions of Darwin and macOS, omitting information about
5previous pkgsrc versions. 5previous pkgsrc versions.
6 6
7* Darwin vs macOS 7* Darwin vs macOS
8 8
9macOS consists of Darwin (kernel/userland) plus Mac stuff on top. 9macOS consists of Darwin (kernel/userland) plus Mac stuff on top.
10pkgsrc used to target Darwin, but given the tools issued discussed 10pkgsrc used to target Darwin, but given the tools issued discussed
11below it is not clear that it works on Darwin without macOS. Darwin 11below it is not clear that it works on Darwin without macOS. Darwin
12from Apple is no longer open source. 12from Apple is no longer open source.
13 13
14Users of non-macOS Darwin are invited to submit patches to this file. 14Users of non-macOS Darwin are invited to submit patches to this file.
15The only known project is: 15The only known project is:
16 http://www.puredarwin.org/ 16 http://www.puredarwin.org/
17 17
18Until then, this file remains macOS-centric. 18Until then, this file remains macOS-centric.
19 19
20* macOS specific bootstrap arguments 
21 
22Providing the --binary-macpkg flag to the bootstrap script causes it 
23to prepare a bootstrap kit as a native macOS package instead of using 
24the conventional .tar.bz2 format. This requires the package-maker 
25application to be installed. 
26 
27* system tools issues 20* system tools issues
28 21
29** native headers vs SDK 22** native headers vs SDK
30 23
31macOS used to include system headers in /usr/include, so that one 24macOS used to include system headers in /usr/include, so that one
32could treat it like a relatively normal POSIX system. Starting at 25could treat it like a relatively normal POSIX system. Starting at
33approximately 10.9, headers were no longer available at the standard 26approximately 10.9, headers were no longer available at the standard
34location, and one has to use an SDK that puts headers someplace else. 27location, and one has to use an SDK that puts headers someplace else.
35pkgsrc supports this, but there has been some confusion where a 10.9 28pkgsrc supports this, but there has been some confusion where a 10.9
36system produced binaries for 10.10, which only mostly works. The 29system produced binaries for 10.10, which only mostly works. The
37confusion is believed to be resolved. 30confusion is believed to be resolved.
38 31
39*** SDK version issues 32*** SDK version issues

cvs diff -r1.289 -r1.290 pkgsrc/bootstrap/bootstrap (expand / switch to unified diff)

--- pkgsrc/bootstrap/bootstrap 2020/07/21 15:53:10 1.289
+++ pkgsrc/bootstrap/bootstrap 2020/08/14 07:24:16 1.290
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1#! /bin/sh 1#! /bin/sh
2 2
3# $NetBSD: bootstrap,v 1.289 2020/07/21 15:53:10 sjmulder Exp $ 3# $NetBSD: bootstrap,v 1.290 2020/08/14 07:24:16 schmonz Exp $
4# 4#
5# Copyright (c) 2001-2011 Alistair Crooks <agc@NetBSD.org> 5# Copyright (c) 2001-2011 Alistair Crooks <agc@NetBSD.org>
6# All rights reserved. 6# All rights reserved.
7# 7#
8# Redistribution and use in source and binary forms, with or without 8# Redistribution and use in source and binary forms, with or without
9# modification, are permitted provided that the following conditions 9# modification, are permitted provided that the following conditions
10# are met: 10# are met:
11# 1. Redistributions of source code must retain the above copyright 11# 1. Redistributions of source code must retain the above copyright
12# notice, this list of conditions and the following disclaimer. 12# notice, this list of conditions and the following disclaimer.
13# 2. Redistributions in binary form must reproduce the above copyright 13# 2. Redistributions in binary form must reproduce the above copyright
14# notice, this list of conditions and the following disclaimer in the 14# notice, this list of conditions and the following disclaimer in the
15# documentation and/or other materials provided with the distribution. 15# documentation and/or other materials provided with the distribution.
16# 16#
@@ -49,72 +49,49 @@ export NO_PKGTOOLS_REQD_CHECK @@ -49,72 +49,49 @@ export NO_PKGTOOLS_REQD_CHECK
49unprivileged=no 49unprivileged=no
50 50
51preserve_path=no 51preserve_path=no
52 52
53# where the building takes place 53# where the building takes place
54bootstrapdir=`dirname "$0"` 54bootstrapdir=`dirname "$0"`
55bootstrapdir=`cd "${bootstrapdir}" && pwd` 55bootstrapdir=`cd "${bootstrapdir}" && pwd`
56pkgsrcdir=`dirname "${bootstrapdir}"` 56pkgsrcdir=`dirname "${bootstrapdir}"`
57wrkdir="`pwd`/work" 57wrkdir="`pwd`/work"
58 58
59usage="Usage: $0 "' 59usage="Usage: $0 "'
60 [ --abi [32|64] ] 60 [ --abi [32|64] ]
61 [ --binary-kit <tarball> ] 61 [ --binary-kit <tarball> ]
62 [ --binary-macpkg <pkg> ] 
63 [ --compiler <compiler> ] 62 [ --compiler <compiler> ]
64 [ --cwrappers <auto|yes|no> ] 63 [ --cwrappers <auto|yes|no> ]
65 [ --full ] 64 [ --full ]
66 [ --gzip-binary-kit <tarball> ] 65 [ --gzip-binary-kit <tarball> ]
67 [ --help ] 66 [ --help ]
68 [ --make-jobs <num> ] 67 [ --make-jobs <num> ]
69 [ --mk-fragment <mk.conf> ] 68 [ --mk-fragment <mk.conf> ]
70 [ --pkgdbdir <pkgdbdir> ] 69 [ --pkgdbdir <pkgdbdir> ]
71 [ --pkginfodir <pkginfodir> ] 70 [ --pkginfodir <pkginfodir> ]
72 [ --pkgmandir <pkgmandir> ] 71 [ --pkgmandir <pkgmandir> ]
73 [ --prefer-pkgsrc <list|yes|no> ] 72 [ --prefer-pkgsrc <list|yes|no> ]
74 [ --prefix <prefix> ] 73 [ --prefix <prefix> ]
75 [ --preserve-path ] 74 [ --preserve-path ]
76 [ --quiet ] 75 [ --quiet ]
77 [ --sysconfdir <sysconfdir> ] 76 [ --sysconfdir <sysconfdir> ]
78 [ --unprivileged | --ignore-user-check ] 77 [ --unprivileged | --ignore-user-check ]
79 [ --varbase <varbase> ] 78 [ --varbase <varbase> ]
80 [ --workdir <workdir> ] 79 [ --workdir <workdir> ]
81' 80'
82 81
83# strip / for BSD/OS, strip - for HP-UX 82# strip / for BSD/OS, strip - for HP-UX
84opsys=`uname -s | tr -d /-` 83opsys=`uname -s | tr -d /-`
85 84
86mkbinarykit_macpkg() 
87{ 
88 local macdestdir 
89 macdestdir=${wrkdir}/macpkg-destdir 
90 rm -rf ${macdestdir} || die "cleanup destdir" 
91 
92 mkdir -p ${macdestdir}${prefix} || die "mkdir destprefix" 
93 rmdir ${macdestdir}${prefix} || die "rmdir destprefix" 
94 cp -Rp ${prefix} ${macdestdir}${prefix} || die "copy prefix" 
95 
96 if [ ! -d ${macdestdir}${pkgdbdir} ]; then 
97 mkdir -p ${macdestdir}${pkgdbdir} || die "mkdir destdbdir" 
98 rmdir ${macdestdir}${pkgdbdir} || die "rmdir destdbdir" 
99 cp -Rp ${pkgdbdir} ${macdestdir}${pkgdbdir} || die "copy dbdir" 
100 fi 
101 
102 ${sedprog} -e "s|%WRKDIR%|${wrkdir}|g" \ 
103 -e "s|%TARGETDIR%|${targetdir}|g" -e "s|%DATE%|${date}|g" \ 
104 < macpkg.pmproj.in > ${wrkdir}/macpkg.pmproj 
105 ${packagemaker} -build -proj ${wrkdir}/macpkg.pmproj -p "${binary_macpkg}" 
106} 
107 
108mkbinarykit_tar() 85mkbinarykit_tar()
109{ 86{
110 # in case tar was built by bootstrap 87 # in case tar was built by bootstrap
111 PATH="$prefix/bin:$PATH"; export PATH 88 PATH="$prefix/bin:$PATH"; export PATH
112 cd / && tar -hcf "${binary_kit}" .$prefix .$pkgdbdir .$etc_mk_conf 89 cd / && tar -hcf "${binary_kit}" .$prefix .$pkgdbdir .$etc_mk_conf
113} 90}
114 91
115mkbinarykit_tgz() 92mkbinarykit_tgz()
116{ 93{
117 # in case tar was built by bootstrap 94 # in case tar was built by bootstrap
118 PATH="$prefix/bin:$PATH"; export PATH 95 PATH="$prefix/bin:$PATH"; export PATH
119 cd / && tar -hcf - .$prefix .$pkgdbdir .$etc_mk_conf | gzip > "${binary_gzip_kit}" 96 cd / && tar -hcf - .$prefix .$pkgdbdir .$etc_mk_conf | gzip > "${binary_gzip_kit}"
120} 97}
@@ -474,30 +451,26 @@ while [ $# -gt 0 ]; do @@ -474,30 +451,26 @@ while [ $# -gt 0 ]; do
474 --preserve-path) preserve_path=yes ;; 451 --preserve-path) preserve_path=yes ;;
475 --mk-fragment=*) 452 --mk-fragment=*)
476 mk_fragment=`get_optarg "$1"` ;; 453 mk_fragment=`get_optarg "$1"` ;;
477 --mk-fragment) 454 --mk-fragment)
478 mk_fragment="$2"; shift ;; 455 mk_fragment="$2"; shift ;;
479 --binary-kit=*) 456 --binary-kit=*)
480 binary_kit=`get_optarg "$1"` ;; 457 binary_kit=`get_optarg "$1"` ;;
481 --binary-kit) 458 --binary-kit)
482 binary_kit="$2"; shift ;; 459 binary_kit="$2"; shift ;;
483 --gzip-binary-kit=*) 460 --gzip-binary-kit=*)
484 binary_gzip_kit=`get_optarg "$1"` ;; 461 binary_gzip_kit=`get_optarg "$1"` ;;
485 --gzip-binary-kit) 462 --gzip-binary-kit)
486 binary_gzip_kit="$2"; shift ;; 463 binary_gzip_kit="$2"; shift ;;
487 --binary-macpkg=*) 
488 binary_macpkg=`get_optarg "$1"` ;; 
489 --binary-macpkg) 
490 binary_macpkg="$2"; shift ;; 
491 --make-jobs=*) make_jobs=`get_optarg "$1"` ;; 464 --make-jobs=*) make_jobs=`get_optarg "$1"` ;;
492 --make-jobs) make_jobs="$2"; shift ;; 465 --make-jobs) make_jobs="$2"; shift ;;
493 --full) full=yes ;; 466 --full) full=yes ;;
494 --quiet) quiet=yes ;; 467 --quiet) quiet=yes ;;
495 --help) echo "$usage"; exit ;; 468 --help) echo "$usage"; exit ;;
496 -h) echo "$usage"; exit ;; 469 -h) echo "$usage"; exit ;;
497 -*) echo "${0##*/}: unknown option \"$1\"" 1>&2 470 -*) echo "${0##*/}: unknown option \"$1\"" 1>&2
498 echo "$usage" 1>&2; exit 1 ;; 471 echo "$usage" 1>&2; exit 1 ;;
499 esac 472 esac
500 shift 473 shift
501done 474done
502 475
503checkarg_sane_absolute_path "$pkgdbdir" "--pkgdbdir" 476checkarg_sane_absolute_path "$pkgdbdir" "--pkgdbdir"
@@ -1405,27 +1378,26 @@ build_package "pkgtools/pkg_install" @@ -1405,27 +1378,26 @@ build_package "pkgtools/pkg_install"
1405 1378
1406etc_mk_conf="$sysconfdir/mk.conf" 1379etc_mk_conf="$sysconfdir/mk.conf"
1407 1380
1408# Install the example mk.conf so that it is used, but only if it doesn't 1381# Install the example mk.conf so that it is used, but only if it doesn't
1409# exist yet. This can happen with non-default sysconfdir settings. 1382# exist yet. This can happen with non-default sysconfdir settings.
1410mkdir_p "$sysconfdir" 1383mkdir_p "$sysconfdir"
1411if [ ! -f "$etc_mk_conf" ]; then 1384if [ ! -f "$etc_mk_conf" ]; then
1412 cp "$TARGET_MKCONF" "$etc_mk_conf" 1385 cp "$TARGET_MKCONF" "$etc_mk_conf"
1413 TARGET_MKCONF="$etc_mk_conf" 1386 TARGET_MKCONF="$etc_mk_conf"
1414fi 1387fi
1415 1388
1416[ -n "${binary_kit}" ] && mkbinarykit_tar 1389[ -n "${binary_kit}" ] && mkbinarykit_tar
1417[ -n "${binary_gzip_kit}" ] && mkbinarykit_tgz 1390[ -n "${binary_gzip_kit}" ] && mkbinarykit_tgz
1418[ -n "${binary_macpkg}" ] && mkbinarykit_macpkg 
1419 1391
1420hline="===========================================================================" 1392hline="==========================================================================="
1421echo "" 1393echo ""
1422echo "$hline" 1394echo "$hline"
1423echo "" 1395echo ""
1424echo "Please remember to add $prefix/bin to your PATH environment variable" 1396echo "Please remember to add $prefix/bin to your PATH environment variable"
1425echo "and $mandir to your MANPATH environment variable, if necessary." 1397echo "and $mandir to your MANPATH environment variable, if necessary."
1426echo "" 1398echo ""
1427echo "An example mk.conf file with the settings you provided to \"bootstrap\"" 1399echo "An example mk.conf file with the settings you provided to \"bootstrap\""
1428echo "has been created for you. It can be found in:" 1400echo "has been created for you. It can be found in:"
1429echo "" 1401echo ""
1430echo " ${TARGET_MKCONF}" 1402echo " ${TARGET_MKCONF}"
1431echo "" 1403echo ""

File Deleted: pkgsrc/bootstrap/Attic/macpkg.pmproj.in