[auto-pkg-updater] Update sys-apps/file

Upgraded sys-apps/file to v5.46-r1

BUG=b/388436690
TEST=presubmit
RELEASE_NOTE=Upgraded sys-apps/file to v5.46-r1.

Change-Id: If18caefebc4baaacff6a6272c413b0ee84121d7b
Reviewed-on: https://cos-review.googlesource.com/c/third_party/overlays/portage-stable/+/89841
Reviewed-by: Nandhini Rengaraj <nrengaraj@google.com>
Tested-by: Cusky Presubmit Bot <presubmit@cos-infra-prod.iam.gserviceaccount.com>
Reviewed-by: He Gao <hegao@google.com>
diff --git a/sys-apps/file/file-5.46.ebuild b/sys-apps/file/file-5.46-r1.ebuild
similarity index 95%
rename from sys-apps/file/file-5.46.ebuild
rename to sys-apps/file/file-5.46-r1.ebuild
index 98ed351..6e85d77 100644
--- a/sys-apps/file/file-5.46.ebuild
+++ b/sys-apps/file/file-5.46-r1.ebuild
@@ -14,7 +14,7 @@
 	inherit autotools git-r3
 else
 	VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/file.asc
-	inherit autotools verify-sig
+	inherit libtool verify-sig
 	SRC_URI="ftp://ftp.astron.com/pub/file/${P}.tar.gz"
 	SRC_URI+=" verify-sig? ( ftp://ftp.astron.com/pub/file/${P}.tar.gz.asc )"
 
@@ -60,18 +60,17 @@
 PATCHES=(
 	"${FILESDIR}/file-5.43-seccomp-fstatat64-musl.patch" #789336, not upstream yet
 	"${FILESDIR}/file-5.45-seccomp-sandbox.patch"
+	"${FILESDIR}/file-5.46-zip.patch"
 )
 
 src_prepare() {
 	default
 
-	#if [[ ${PV} == 9999 ]] ; then
-	#	eautoreconf
-	#else
-	#	elibtoolize
-	#fi
-	# Just for file-5.45-32-bit-time_t-deux.patch, drop in 5.46
-	eautoreconf
+	if [[ ${PV} == 9999 ]] ; then
+		eautoreconf
+	else
+		elibtoolize
+	fi
 
 	# Don't let python README kill main README, bug #60043
 	mv python/README.md python/README.python.md || die
diff --git a/sys-apps/file/files/file-5.46-zip.patch b/sys-apps/file/files/file-5.46-zip.patch
new file mode 100644
index 0000000..d15d494
--- /dev/null
+++ b/sys-apps/file/files/file-5.46-zip.patch
@@ -0,0 +1,57 @@
+https://bugs.gentoo.org/946957
+https://bugs.astron.com/view.php?id=571
+https://github.com/file/file/commit/60b2032b96fc185b37fb0f2152e834efb2edad6e
+
+From 60b2032b96fc185b37fb0f2152e834efb2edad6e Mon Sep 17 00:00:00 2001
+From: Christos Zoulas <christos@zoulas.com>
+Date: Thu, 5 Dec 2024 19:41:12 +0000
+Subject: [PATCH] PR/571: jschleus: Some zip files are misclassified as data
+
+---
+ magic/Magdir/archive | 25 +++++++++++++++----------
+ 1 file changed, 15 insertions(+), 10 deletions(-)
+
+diff --git a/magic/Magdir/archive b/magic/Magdir/archive
+index e6ff4570a..e560523cb 100644
+--- a/magic/Magdir/archive
++++ b/magic/Magdir/archive
+@@ -1795,6 +1795,17 @@
+ !:ext zip/cbz
+ 
+ 
++# Generic zip archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu)
++#   Next line excludes specialized formats:
++0	name	zipgeneric
++>4	beshort		x			Zip archive data, at least
++!:mime	application/zip
++>4	use		zipversion
++>4	beshort		x			to extract
++>8	beshort		x			\b, compression method=
++>8	use		zipcompression
++>0x161	string		WINZIP		\b, WinZIP self-extracting
++
+ 0	string		PK\003\004
+ !:strength +1
+ # IOS/IPadOS IPA file (Zip archive)
+@@ -2132,17 +2143,11 @@
+ >>>>>>(-6.l)	search/9000	kmp.json	Keyman Compiled Package File
+ !:mime	application/vnd.keyman.kmp+zip
+ !:ext kmp
++>>>>>+4	default		x
++>>>>>>0	use		zipgeneric
+ 
+-# Generic zip archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu)
+-#   Next line excludes specialized formats:
+ >>>>+4	default		x
+->>>>>4	beshort		x			Zip archive data, at least
+-!:mime	application/zip
+->>>>>4	use		zipversion
+->>>>>4	beshort		x			to extract
+->>>>>8	beshort		x			\b, compression method=
+->>>>>8	use		zipcompression
+->>>>>0x161	string		WINZIP		\b, WinZIP self-extracting
++>>>>>0	use		zipgeneric
+ 
+ # Zip archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu)
+ 0	string		PK\005\006	Zip archive data (empty)
+