| @@ -1,16 +1,16 @@ | | | @@ -1,16 +1,16 @@ |
1 | #! /bin/sh | | 1 | #! /bin/sh |
2 | | | 2 | |
3 | # $NetBSD: bootstrap,v 1.310 2022/04/06 13:06:09 schmonz Exp $ | | 3 | # $NetBSD: bootstrap,v 1.311 2022/06/14 09:08:31 nia 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 | # |
| @@ -1122,26 +1122,31 @@ echo "LOCALBASE= $prefix" >> ${TARGET_M | | | @@ -1122,26 +1122,31 @@ echo "LOCALBASE= $prefix" >> ${TARGET_M |
1122 | if [ "${sysconfbase}" != "/etc" ]; then | | 1122 | if [ "${sysconfbase}" != "/etc" ]; then |
1123 | echo "SYSCONFBASE= $sysconfbase" >> ${TARGET_MKCONF} | | 1123 | echo "SYSCONFBASE= $sysconfbase" >> ${TARGET_MKCONF} |
1124 | fi | | 1124 | fi |
1125 | echo "VARBASE= $varbase" >> ${TARGET_MKCONF} | | 1125 | echo "VARBASE= $varbase" >> ${TARGET_MKCONF} |
1126 | if [ "${sysconfdir}" != "${prefix}/etc" ]; then | | 1126 | if [ "${sysconfdir}" != "${prefix}/etc" ]; then |
1127 | echo "PKG_SYSCONFBASE= $sysconfdir" >> ${TARGET_MKCONF} | | 1127 | echo "PKG_SYSCONFBASE= $sysconfdir" >> ${TARGET_MKCONF} |
1128 | fi | | 1128 | fi |
1129 | echo "PKG_TOOLS_BIN= $prefix/sbin" >> ${TARGET_MKCONF} | | 1129 | echo "PKG_TOOLS_BIN= $prefix/sbin" >> ${TARGET_MKCONF} |
1130 | echo "PKGINFODIR= $pkginfodir" >> ${TARGET_MKCONF} | | 1130 | echo "PKGINFODIR= $pkginfodir" >> ${TARGET_MKCONF} |
1131 | echo "PKGMANDIR= $pkgmandir" >> ${TARGET_MKCONF} | | 1131 | echo "PKGMANDIR= $pkgmandir" >> ${TARGET_MKCONF} |
1132 | echo "" >> ${TARGET_MKCONF} | | 1132 | echo "" >> ${TARGET_MKCONF} |
1133 | | | 1133 | |
1134 | case $opsys in | | 1134 | case $opsys in |
| | | 1135 | OpenBSD) |
| | | 1136 | if [ -z "$prefer_pkgsrc" ] && [ "$prefer_native" != "yes" ]; then |
| | | 1137 | prefer_pkgsrc="yes" |
| | | 1138 | fi |
| | | 1139 | ;; |
1135 | Linux) | | 1140 | Linux) |
1136 | # Default to PREFER_PKGSRC=yes unless user specifies --prefer-native=yes | | 1141 | # Default to PREFER_PKGSRC=yes unless user specifies --prefer-native=yes |
1137 | # Linux systems likely have software from other packages managers | | 1142 | # Linux systems likely have software from other packages managers |
1138 | # like yum or apt that can leak into pkgsrc and cause issues as they | | 1143 | # like yum or apt that can leak into pkgsrc and cause issues as they |
1139 | # age, undergo ABI changes, or get added/removed behind our backs. | | 1144 | # age, undergo ABI changes, or get added/removed behind our backs. |
1140 | # Let pkgsrc maintain all dependencies to avoid these problems. | | 1145 | # Let pkgsrc maintain all dependencies to avoid these problems. |
1141 | # The exception here is Elbrus 2000, for which a lot of patches have | | 1146 | # The exception here is Elbrus 2000, for which a lot of patches have |
1142 | # not been upstreamed, so that it is better to use native. | | 1147 | # not been upstreamed, so that it is better to use native. |
1143 | if [ -z "$prefer_pkgsrc" ] && [ "$prefer_native" != "yes" ] && \ | | 1148 | if [ -z "$prefer_pkgsrc" ] && [ "$prefer_native" != "yes" ] && \ |
1144 | [ "$machine_arch" != "e2k" ]; then | | 1149 | [ "$machine_arch" != "e2k" ]; then |
1145 | prefer_pkgsrc="yes" | | 1150 | prefer_pkgsrc="yes" |
1146 | fi | | 1151 | fi |
1147 | ;; | | 1152 | ;; |