| @@ -1,16 +1,16 @@ | | | @@ -1,16 +1,16 @@ |
1 | #! /bin/sh | | 1 | #! /bin/sh |
2 | | | 2 | |
3 | # $NetBSD: bootstrap,v 1.294 2020/10/07 10:44:14 jperkin Exp $ | | 3 | # $NetBSD: bootstrap,v 1.295 2020/10/28 16:52:43 maya 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 | # |
| @@ -1225,44 +1225,49 @@ esac | | | @@ -1225,44 +1225,49 @@ esac |
1225 | | | 1225 | |
1226 | # bootstrap sed if necessary | | 1226 | # bootstrap sed if necessary |
1227 | case "$need_sed" in | | 1227 | case "$need_sed" in |
1228 | yes) echo_msg "Bootstrapping sed" | | 1228 | yes) echo_msg "Bootstrapping sed" |
1229 | copy_src $pkgsrcdir/textproc/nbsed/files sed | | 1229 | copy_src $pkgsrcdir/textproc/nbsed/files sed |
1230 | run_cmd "(cd $wrkdir/sed; env $BSTRAP_ENV CPPFLAGS='$CPPFLAGS -I../libnbcompat' LDFLAGS='$LDFLAGS -L../libnbcompat' LIBS='$LIBS -lnbcompat' $shprog ./configure $configure_quiet_flags -C --prefix=$prefix --infodir=$infodir --mandir=$mandir --sysconfdir=$sysconfdir --program-transform-name='s,sed,nbsed,' && $bmake $make_quiet_flags -j$make_jobs)" | | 1230 | run_cmd "(cd $wrkdir/sed; env $BSTRAP_ENV CPPFLAGS='$CPPFLAGS -I../libnbcompat' LDFLAGS='$LDFLAGS -L../libnbcompat' LIBS='$LIBS -lnbcompat' $shprog ./configure $configure_quiet_flags -C --prefix=$prefix --infodir=$infodir --mandir=$mandir --sysconfdir=$sysconfdir --program-transform-name='s,sed,nbsed,' && $bmake $make_quiet_flags -j$make_jobs)" |
1231 | run_cmd "$install_sh -c -o $user -g $group -m 755 $wrkdir/sed/sed $wrkdir/bin/sed" | | 1231 | run_cmd "$install_sh -c -o $user -g $group -m 755 $wrkdir/sed/sed $wrkdir/bin/sed" |
1232 | echo "TOOLS_PLATFORM.sed?= $prefix/bin/nbsed" >> ${TARGET_MKCONF} | | 1232 | echo "TOOLS_PLATFORM.sed?= $prefix/bin/nbsed" >> ${TARGET_MKCONF} |
1233 | echo "TOOLS_PLATFORM.sed?= $wrkdir/bin/sed" >> ${BOOTSTRAP_MKCONF} | | 1233 | echo "TOOLS_PLATFORM.sed?= $wrkdir/bin/sed" >> ${BOOTSTRAP_MKCONF} |
1234 | ;; | | 1234 | ;; |
1235 | esac | | 1235 | esac |
1236 | | | 1236 | |
1237 | # bootstrap pkg_install | | 1237 | # bootstrap pkg_install |
| | | 1238 | extra_libarchive_depends() { |
| | | 1239 | $sedprog -n -e 's/Libs.private: //p' $wrkdir/libarchive/build/pkgconfig/libarchive.pc |
| | | 1240 | } |
| | | 1241 | |
1238 | echo_msg "Bootstrapping pkgtools" | | 1242 | echo_msg "Bootstrapping pkgtools" |
1239 | copy_src $pkgsrcdir/archivers/libarchive/files libarchive | | 1243 | copy_src $pkgsrcdir/archivers/libarchive/files libarchive |
1240 | run_cmd "(cd $wrkdir/libarchive; env $BSTRAP_ENV \ | | 1244 | run_cmd "(cd $wrkdir/libarchive; env $BSTRAP_ENV \ |
1241 | $shprog ./configure $configure_quiet_flags --enable-static --disable-shared \ | | 1245 | $shprog ./configure $configure_quiet_flags --enable-static --disable-shared \ |
1242 | --disable-bsdtar --disable-bsdcpio --disable-posix-regex-lib --disable-xattr \ | | 1246 | --disable-bsdtar --disable-bsdcpio --disable-posix-regex-lib --disable-xattr \ |
1243 | --disable-maintainer-mode --disable-acl --without-zlib --without-bz2lib \ | | 1247 | --disable-maintainer-mode --disable-acl --without-zlib --without-bz2lib \ |
1244 | --without-iconv --without-lzma --without-lzo2 --without-lz4 \ | | 1248 | --without-iconv --without-lzma --without-lzo2 --without-lz4 \ |
1245 | --without-nettle --without-openssl --without-xml2 --without-expat --without-zstd \ | | 1249 | --without-nettle --without-openssl --without-xml2 --without-expat --without-zstd \ |
1246 | MAKE=$bmake && $bmake $make_quiet_flags -j$make_jobs)" | | 1250 | MAKE=$bmake && $bmake $make_quiet_flags -j$make_jobs)" |
1247 | copy_src $pkgsrcdir/pkgtools/pkg_install/files pkg_install | | 1251 | copy_src $pkgsrcdir/pkgtools/pkg_install/files pkg_install |
1248 | run_cmd "(cd $wrkdir/pkg_install; env $BSTRAP_ENV \ | | 1252 | run_cmd "(cd $wrkdir/pkg_install; env $BSTRAP_ENV \ |
1249 | CPPFLAGS='$CPPFLAGS -I${wrkdir}/libnbcompat -I${wrkdir}/libarchive/libarchive' \ | | 1253 | CPPFLAGS='$CPPFLAGS -I${wrkdir}/libnbcompat -I${wrkdir}/libarchive/libarchive' \ |
1250 | LDFLAGS='$LDFLAGS -L${wrkdir}/libnbcompat' \ | | 1254 | LDFLAGS='$LDFLAGS -L${wrkdir}/libnbcompat' \ |
1251 | LIBS='$LIBS -lnbcompat' $shprog ./configure $configure_quiet_flags -C \ | | 1255 | LIBS='$LIBS -lnbcompat' $shprog ./configure $configure_quiet_flags -C \ |
1252 | --enable-bootstrap --prefix=$prefix --sysconfdir=$sysconfdir \ | | 1256 | --enable-bootstrap --prefix=$prefix --sysconfdir=$sysconfdir \ |
1253 | --with-pkgdbdir=$pkgdbdir --infodir=$infodir \ | | 1257 | --with-pkgdbdir=$pkgdbdir --infodir=$infodir \ |
1254 | --mandir=$mandir $pkg_install_args && \ | | 1258 | --mandir=$mandir $pkg_install_args && \ |
1255 | STATIC_LIBARCHIVE=$wrkdir/libarchive/.libs/libarchive.a \ | | 1259 | STATIC_LIBARCHIVE=$wrkdir/libarchive/.libs/libarchive.a \ |
| | | 1260 | STATIC_LIBARCHIVE_LDADD=`extra_libarchive_depends` \ |
1256 | PKGSRC_MACHINE_ARCH="$machine_arch" $bmake $make_quiet_flags -j$make_jobs)" | | 1261 | PKGSRC_MACHINE_ARCH="$machine_arch" $bmake $make_quiet_flags -j$make_jobs)" |
1257 | run_cmd "$install_sh -c -o $user -g $group -m 755 $wrkdir/pkg_install/add/pkg_add $wrkdir/sbin/pkg_add" | | 1262 | run_cmd "$install_sh -c -o $user -g $group -m 755 $wrkdir/pkg_install/add/pkg_add $wrkdir/sbin/pkg_add" |
1258 | run_cmd "$install_sh -c -o $user -g $group -m 755 $wrkdir/pkg_install/admin/pkg_admin $wrkdir/sbin/pkg_admin" | | 1263 | run_cmd "$install_sh -c -o $user -g $group -m 755 $wrkdir/pkg_install/admin/pkg_admin $wrkdir/sbin/pkg_admin" |
1259 | run_cmd "$install_sh -c -o $user -g $group -m 755 $wrkdir/pkg_install/create/pkg_create $wrkdir/sbin/pkg_create" | | 1264 | run_cmd "$install_sh -c -o $user -g $group -m 755 $wrkdir/pkg_install/create/pkg_create $wrkdir/sbin/pkg_create" |
1260 | run_cmd "$install_sh -c -o $user -g $group -m 755 $wrkdir/pkg_install/info/pkg_info $wrkdir/sbin/pkg_info" | | 1265 | run_cmd "$install_sh -c -o $user -g $group -m 755 $wrkdir/pkg_install/info/pkg_info $wrkdir/sbin/pkg_info" |
1261 | echo "PKG_ADD_CMD?= $wrkdir/sbin/pkg_add" >> ${BOOTSTRAP_MKCONF} | | 1266 | echo "PKG_ADD_CMD?= $wrkdir/sbin/pkg_add" >> ${BOOTSTRAP_MKCONF} |
1262 | echo "PKG_ADMIN_CMD?= $wrkdir/sbin/pkg_admin" >> ${BOOTSTRAP_MKCONF} | | 1267 | echo "PKG_ADMIN_CMD?= $wrkdir/sbin/pkg_admin" >> ${BOOTSTRAP_MKCONF} |
1263 | echo "PKG_CREATE_CMD?= $wrkdir/sbin/pkg_create" >> ${BOOTSTRAP_MKCONF} | | 1268 | echo "PKG_CREATE_CMD?= $wrkdir/sbin/pkg_create" >> ${BOOTSTRAP_MKCONF} |
1264 | echo "PKG_INFO_CMD?= $wrkdir/sbin/pkg_info" >> ${BOOTSTRAP_MKCONF} | | 1269 | echo "PKG_INFO_CMD?= $wrkdir/sbin/pkg_info" >> ${BOOTSTRAP_MKCONF} |
1265 | | | 1270 | |
1266 | MAKECONF=$wrkdir/mk.conf | | 1271 | MAKECONF=$wrkdir/mk.conf |
1267 | export MAKECONF | | 1272 | export MAKECONF |
1268 | | | 1273 | |