| @@ -1,16 +1,16 @@ | | | @@ -1,16 +1,16 @@ |
1 | #! /bin/sh | | 1 | #! /bin/sh |
2 | | | 2 | |
3 | # $NetBSD: bootstrap,v 1.295 2020/10/28 16:52:43 maya Exp $ | | 3 | # $NetBSD: bootstrap,v 1.296 2020/12/05 16:50:52 js 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 | # |
| @@ -1071,27 +1071,30 @@ if [ "${sysconfdir}" != "${prefix}/etc" | | | @@ -1071,27 +1071,30 @@ if [ "${sysconfdir}" != "${prefix}/etc" |
1071 | fi | | 1071 | fi |
1072 | echo "PKG_TOOLS_BIN= $prefix/sbin" >> ${TARGET_MKCONF} | | 1072 | echo "PKG_TOOLS_BIN= $prefix/sbin" >> ${TARGET_MKCONF} |
1073 | echo "PKGINFODIR= $pkginfodir" >> ${TARGET_MKCONF} | | 1073 | echo "PKGINFODIR= $pkginfodir" >> ${TARGET_MKCONF} |
1074 | echo "PKGMANDIR= $pkgmandir" >> ${TARGET_MKCONF} | | 1074 | echo "PKGMANDIR= $pkgmandir" >> ${TARGET_MKCONF} |
1075 | echo "" >> ${TARGET_MKCONF} | | 1075 | echo "" >> ${TARGET_MKCONF} |
1076 | | | 1076 | |
1077 | case $opsys in | | 1077 | case $opsys in |
1078 | Linux) | | 1078 | Linux) |
1079 | # Default to PREFER_PKGSRC=yes unless user specifies --prefer-native=yes | | 1079 | # Default to PREFER_PKGSRC=yes unless user specifies --prefer-native=yes |
1080 | # Linux systems likely have software from other packages managers | | 1080 | # Linux systems likely have software from other packages managers |
1081 | # like yum or apt that can leak into pkgsrc and cause issues as they | | 1081 | # like yum or apt that can leak into pkgsrc and cause issues as they |
1082 | # age, undergo ABI changes, or get added/removed behind our backs. | | 1082 | # age, undergo ABI changes, or get added/removed behind our backs. |
1083 | # Let pkgsrc maintain all dependencies to avoid these problems. | | 1083 | # Let pkgsrc maintain all dependencies to avoid these problems. |
1084 | if [ -z "$prefer_pkgsrc" ] && [ "$prefer_native" != "yes" ]; then | | 1084 | # The exception here is Elbrus 2000, for which a lot of patches have |
| | | 1085 | # not been upstreamed, so that it is better to use native. |
| | | 1086 | if [ -z "$prefer_pkgsrc" ] && [ "$prefer_native" != "yes" ] && \ |
| | | 1087 | [ "$machine_arch" != "e2k" ]; then |
1085 | prefer_pkgsrc="yes" | | 1088 | prefer_pkgsrc="yes" |
1086 | fi | | 1089 | fi |
1087 | ;; | | 1090 | ;; |
1088 | esac | | 1091 | esac |
1089 | | | 1092 | |
1090 | if [ -n "$prefer_pkgsrc" ]; then | | 1093 | if [ -n "$prefer_pkgsrc" ]; then |
1091 | echo "# WARNING: Changing PREFER_* after bootstrap will require rebuilding all" >> ${TARGET_MKCONF} | | 1094 | echo "# WARNING: Changing PREFER_* after bootstrap will require rebuilding all" >> ${TARGET_MKCONF} |
1092 | echo "# packages with a dependency that switched between native/pkgsrc." >> ${TARGET_MKCONF} | | 1095 | echo "# packages with a dependency that switched between native/pkgsrc." >> ${TARGET_MKCONF} |
1093 | echo "PREFER_PKGSRC= $prefer_pkgsrc" >> ${TARGET_MKCONF} | | 1096 | echo "PREFER_PKGSRC= $prefer_pkgsrc" >> ${TARGET_MKCONF} |
1094 | echo "" >> ${TARGET_MKCONF} | | 1097 | echo "" >> ${TARGET_MKCONF} |
1095 | fi | | 1098 | fi |
1096 | if [ -n "$prefer_native" ]; then | | 1099 | if [ -n "$prefer_native" ]; then |
1097 | echo "PREFER_NATIVE= $prefer_native" >> ${TARGET_MKCONF} | | 1100 | echo "PREFER_NATIVE= $prefer_native" >> ${TARGET_MKCONF} |