diff --git a/sdk_container/src/third_party/portage-stable/app-arch/lbzip2/Manifest b/sdk_container/src/third_party/portage-stable/app-arch/lbzip2/Manifest
index 8a96825a5a..37602fe72c 100644
--- a/sdk_container/src/third_party/portage-stable/app-arch/lbzip2/Manifest
+++ b/sdk_container/src/third_party/portage-stable/app-arch/lbzip2/Manifest
@@ -1,3 +1 @@
-DIST lbzip2-2.3.tar.gz 630226 BLAKE2B c08a7257eff859c0b7fb66ae638a57f837f1a2380c500c42ea65dc36e5650b30865d3c4c9820d6fed62bdbc4e3bdf7bae9e8bfe519897d9aac7f0c77cceacfb2 SHA512 4f694445cc90377bf8dac5046b952ff174db571f390c2d7b0aa001f73c76f3d3f048ff8e7297c2055ed1f7b210174496dc31d6628e1cbeff63146a36a442ad4c
-DIST lbzip2-2.5.tar.gz 651399 BLAKE2B a53fc34084ed16c0e78a9f084f68fc0bd1217245e9470ee023f0a4f5a1e2ae4e5866086f9fbc3ff7ec5654c595b4388d9eff495bc0228edbe0322bf9d1fd1f23 SHA512 76e96cfa75b3ed515b2f891349dffc1403daab2dd0a2a614fa0c811cec6ca25faa395da08ad68a9b6ba4069332c4571f70fb7424f06ef3d800c3082c08d7d3d7
DIST lbzip2-2.5_p20181227.tar.gz 704920 BLAKE2B e5da0091c0e4fb73724c5ea472d757d76356cffbf1fc679bf4ee05e25690b7712dceaf17f355383bfd4eb525c4aea04c2e5312592df5bb99159e000769bcee2e SHA512 53b29721a106d280927f2c18f33247645bb7fb3e67d835885d73e037910bf02e473f1210d848df41a387be30f829213d98ac9387b2a9201b94d12117809fbcf5
diff --git a/sdk_container/src/third_party/portage-stable/app-arch/lbzip2/files/lbzip2-2.5-glibc-2.28.patch b/sdk_container/src/third_party/portage-stable/app-arch/lbzip2/files/lbzip2-2.5-glibc-2.28.patch
deleted file mode 100644
index bc3954934d..0000000000
--- a/sdk_container/src/third_party/portage-stable/app-arch/lbzip2/files/lbzip2-2.5-glibc-2.28.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-diff --git a/lib/fseterr.c b/lib/fseterr.c
-index 1e212e4..81f51ed 100644
---- a/lib/fseterr.c
-+++ b/lib/fseterr.c
-@@ -1,5 +1,5 @@
- /* Set the error indicator of a stream.
-- Copyright (C) 2007-2014 Free Software Foundation, Inc.
-+ Copyright (C) 2007-2018 Free Software Foundation, Inc.
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
-@@ -12,7 +12,7 @@
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
-- along with this program. If not, see . */
-+ along with this program. If not, see . */
-
- #include
-
-@@ -23,21 +23,26 @@
-
- #include "stdio-impl.h"
-
-+/* This file is not used on systems that have the __fseterr function,
-+ namely musl libc. */
-+
- void
- fseterr (FILE *fp)
- {
- /* Most systems provide FILE as a struct and the necessary bitmask in
- , because they need it for implementing getc() and putc() as
- fast macros. */
--#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
-+#if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1
-+ /* GNU libc, BeOS, Haiku, Linux libc5 */
- fp->_flags |= _IO_ERR_SEEN;
--#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
-+#elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
-+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
- fp_->_flags |= __SERR;
- #elif defined __EMX__ /* emx+gcc */
- fp->_flags |= _IOERR;
- #elif defined __minix /* Minix */
- fp->_flags |= _IOERR;
--#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, NonStop Kernel */
-+#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel, OpenVMS */
- fp_->_flag |= _IOERR;
- #elif defined __UCLIBC__ /* uClibc */
- fp->__modeflags |= __FLAG_ERROR;
diff --git a/sdk_container/src/third_party/portage-stable/app-arch/lbzip2/files/lbzip2-2.5_p20181227-fix-unaligned.patch b/sdk_container/src/third_party/portage-stable/app-arch/lbzip2/files/lbzip2-2.5_p20181227-fix-unaligned.patch
new file mode 100644
index 0000000000..c23d1afc4c
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/app-arch/lbzip2/files/lbzip2-2.5_p20181227-fix-unaligned.patch
@@ -0,0 +1,33 @@
+https://github.com/kjn/lbzip2/pull/25
+
+From d570020ade2add591b97e61927545a005a2d4a6f Mon Sep 17 00:00:00 2001
+From: Matt Turner
+Date: Wed, 7 Aug 2019 11:47:04 -0700
+Subject: [PATCH] Align zero-length array to avoid unaligned accesses
+
+When make_tree() creates the left-justified base table (uint64_t *B)
+it does so with 64-bit stores:
+
+ B[k] = sofar;
+
+But B points to memory in the zero-length array "uint32_t tt[0]" at the
+end of struct decoder_state. Since tt's type is uint32_t, it is only
+aligned to a four byte boundary, and so the 64-bit store in make_tree()
+causes an unaligned trap on strict platforms like sparc.
+---
+ src/decode.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/decode.h b/src/decode.h
+index c9a9086..7c0ca3f 100644
+--- a/src/decode.h
++++ b/src/decode.h
+@@ -62,7 +62,7 @@ struct decoder_state {
+ uint8_t rle_char; /* current character */
+ uint8_t rle_prev; /* prevoius character */
+
+- uint32_t tt[0];
++ uint32_t tt[0] __attribute__((aligned (8)));
+ };
+
+
diff --git a/sdk_container/src/third_party/portage-stable/app-arch/lbzip2/lbzip2-2.3-r1.ebuild b/sdk_container/src/third_party/portage-stable/app-arch/lbzip2/lbzip2-2.3-r1.ebuild
deleted file mode 100644
index 886633a39d..0000000000
--- a/sdk_container/src/third_party/portage-stable/app-arch/lbzip2/lbzip2-2.3-r1.ebuild
+++ /dev/null
@@ -1,37 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-inherit autotools-utils
-
-DESCRIPTION="Parallel bzip2 utility"
-HOMEPAGE="https://github.com/kjn/lbzip2/"
-SRC_URI="http://archive.lbzip2.org/${P}.tar.gz"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux"
-IUSE="debug symlink"
-
-RDEPEND="symlink? ( !app-arch/pbzip2[symlink] )"
-DEPEND=""
-
-PATCHES=( "${FILESDIR}"/${P}-s_isreg.patch )
-
-src_configure() {
- local myeconfargs=(
- --disable-silent-rules
- $(use_enable debug tracing)
- )
- autotools-utils_src_configure
-}
-
-src_install() {
- autotools-utils_src_install
-
- if use symlink; then
- dosym ${PN} /usr/bin/bzip2
- dosym lbunzip2 /usr/bin/bunzip2
- fi
-}
diff --git a/sdk_container/src/third_party/portage-stable/app-arch/lbzip2/lbzip2-2.5-r1.ebuild b/sdk_container/src/third_party/portage-stable/app-arch/lbzip2/lbzip2-2.5-r1.ebuild
deleted file mode 100644
index 1c2c2cdcd0..0000000000
--- a/sdk_container/src/third_party/portage-stable/app-arch/lbzip2/lbzip2-2.5-r1.ebuild
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-DESCRIPTION="Parallel bzip2 utility"
-HOMEPAGE="https://github.com/kjn/lbzip2/"
-SRC_URI="http://archive.lbzip2.org/${P}.tar.gz"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 ~riscv s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
-IUSE="debug symlink"
-
-RDEPEND="symlink? ( !app-arch/pbzip2[symlink] )"
-DEPEND=""
-
-PATCHES=(
- "${FILESDIR}"/${PN}-2.3-s_isreg.patch
- # bug 669594
- "${FILESDIR}"/${PN}-2.5-glibc-2.28.patch
-)
-
-src_configure() {
- local myeconfargs=(
- --disable-silent-rules
- $(use_enable debug tracing)
- )
- econf "${myeconfargs[@]}"
-}
-
-src_install() {
- default
-
- if use symlink; then
- dosym ${PN} /usr/bin/bzip2
- dosym lbunzip2 /usr/bin/bunzip2
- fi
-}
diff --git a/sdk_container/src/third_party/portage-stable/app-arch/lbzip2/lbzip2-2.5.ebuild b/sdk_container/src/third_party/portage-stable/app-arch/lbzip2/lbzip2-2.5.ebuild
deleted file mode 100644
index e91cd60672..0000000000
--- a/sdk_container/src/third_party/portage-stable/app-arch/lbzip2/lbzip2-2.5.ebuild
+++ /dev/null
@@ -1,37 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-inherit autotools-utils
-
-DESCRIPTION="Parallel bzip2 utility"
-HOMEPAGE="https://github.com/kjn/lbzip2/"
-SRC_URI="http://archive.lbzip2.org/${P}.tar.gz"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
-IUSE="debug symlink"
-
-RDEPEND="symlink? ( !app-arch/pbzip2[symlink] )"
-DEPEND=""
-
-PATCHES=( "${FILESDIR}"/${PN}-2.3-s_isreg.patch )
-
-src_configure() {
- local myeconfargs=(
- --disable-silent-rules
- $(use_enable debug tracing)
- )
- autotools-utils_src_configure
-}
-
-src_install() {
- autotools-utils_src_install
-
- if use symlink; then
- dosym ${PN} /usr/bin/bzip2
- dosym lbunzip2 /usr/bin/bunzip2
- fi
-}
diff --git a/sdk_container/src/third_party/portage-stable/app-arch/lbzip2/lbzip2-2.5_p20181227.ebuild b/sdk_container/src/third_party/portage-stable/app-arch/lbzip2/lbzip2-2.5_p20181227-r1.ebuild
similarity index 68%
rename from sdk_container/src/third_party/portage-stable/app-arch/lbzip2/lbzip2-2.5_p20181227.ebuild
rename to sdk_container/src/third_party/portage-stable/app-arch/lbzip2/lbzip2-2.5_p20181227-r1.ebuild
index 090cc188e8..e8d3af562b 100644
--- a/sdk_container/src/third_party/portage-stable/app-arch/lbzip2/lbzip2-2.5_p20181227.ebuild
+++ b/sdk_container/src/third_party/portage-stable/app-arch/lbzip2/lbzip2-2.5_p20181227-r1.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
-inherit autotools
+inherit autotools flag-o-matic
DESCRIPTION="Parallel bzip2 utility"
HOMEPAGE="https://github.com/kjn/lbzip2/"
@@ -11,25 +11,26 @@ SRC_URI="https://dev.gentoo.org/~whissi/dist/${PN}/${P}.tar.gz"
LICENSE="GPL-3"
SLOT="0"
-KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
-IUSE="debug symlink"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
+IUSE="debug static symlink"
RDEPEND="symlink? ( !app-arch/pbzip2[symlink] )"
DEPEND=""
PATCHES=(
"${FILESDIR}"/${PN}-2.3-s_isreg.patch
+ "${FILESDIR}"/${P}-fix-unaligned.patch
)
src_prepare() {
default
-
eautoreconf
}
src_configure() {
+ use static && append-ldflags -static
+
local myeconfargs=(
- --disable-silent-rules
$(use_enable debug tracing)
)
econf "${myeconfargs[@]}"
diff --git a/sdk_container/src/third_party/portage-stable/app-arch/lbzip2/metadata.xml b/sdk_container/src/third_party/portage-stable/app-arch/lbzip2/metadata.xml
index d0fababc8b..de430ef53e 100644
--- a/sdk_container/src/third_party/portage-stable/app-arch/lbzip2/metadata.xml
+++ b/sdk_container/src/third_party/portage-stable/app-arch/lbzip2/metadata.xml
@@ -1,5 +1,5 @@
-
+
mattst88@gentoo.org
@@ -10,6 +10,9 @@
input-bound splitter even when decompressing .bz2 files created by standard
bzip2
+
kjn/lbzip2