Diff glibc-2.31-r7 with a glibc-2.32-r8

/usr/portage/sys-libs/glibc/glibc-2.32-r8.ebuild 2024-12-25 14:59:52.815270184 +0300
17 17
EMULTILIB_PKG="true"
18 18

  
19 19
# Gentoo patchset (ignored for live ebuilds)
20
PATCH_VER=9
20
PATCH_VER=8
21 21
PATCH_DEV=dilfridge
22 22

  
23 23
if [[ ${PV} == 9999* ]]; then
24 24
	inherit git-r3
25 25
else
26
	KEYWORDS="~alpha amd64 arm arm64 ~hppa ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
26
	KEYWORDS="~alpha amd64 arm arm64 hppa ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
27 27
	SRC_URI="mirror://gnu/glibc/${P}.tar.xz"
28 28
	SRC_URI+=" https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz"
29
	SRC_URI+=" riscv? ( https://dev.gentoo.org/~dilfridge/distfiles/backport-rv32.txz )"
29 30
fi
30 31

  
31 32
RELEASE_VER=${PV}
32 33

  
33
GCC_BOOTSTRAP_VER=20180511
34
GCC_BOOTSTRAP_VER=20201208
34 35

  
35
LOCALE_GEN_VER=2.00
36
LOCALE_GEN_VER=2.10
36 37

  
37 38
SRC_URI+=" https://gitweb.gentoo.org/proj/locale-gen.git/snapshot/locale-gen-${LOCALE_GEN_VER}.tar.gz"
38 39
SRC_URI+=" multilib? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )"
......
89 90
# and that gcc already contains the hardened patches.
90 91
# Lastly, let's avoid some openssh nastiness, bug 708224, as
91 92
# convenience to our users.
93

  
94
# gzip, grep, awk are needed by locale-gen, bug 740750
95

  
92 96
BDEPEND="
93 97
	${PYTHON_DEPS}
94 98
	>=app-misc/pax-utils-0.1.10
95 99
	sys-devel/bison
96 100
	doc? ( sys-apps/texinfo )
101
	!compile-locales? (
102
		app-arch/gzip
103
		sys-apps/grep
104
		app-alternatives/awk
105
	)
97 106
"
98 107
COMMON_DEPEND="
99 108
	gd? ( media-libs/gd:2= )
......
107 116
	!<net-misc/openssh-8.1_p1-r2
108 117
"
109 118
DEPEND="${COMMON_DEPEND}
119
	compile-locales? (
120
		app-arch/gzip
121
		sys-apps/grep
122
		app-alternatives/awk
123
	)
110 124
	test? ( >=net-dns/libidn2-2.3.0 )
111 125
"
112 126
RDEPEND="${COMMON_DEPEND}
127
	app-arch/gzip
128
	sys-apps/grep
129
	app-alternatives/awk
113 130
	sys-apps/gentoo-functions
114 131
"
115 132

  
......
759 776

  
760 777
	cd "${WORKDIR}" || die
761 778
	unpack locale-gen-${LOCALE_GEN_VER}.tar.gz
779
	use riscv && unpack backport-rv32.txz
762 780
}
763 781

  
764 782
src_prepare() {
......
772 790
		elog "Applying Gentoo Glibc Patchset ${patchsetname}"
773 791
		eapply "${WORKDIR}"/patches
774 792
		einfo "Done."
793

  
794
		if use riscv ; then
795
			elog "Adding rv32 backport patchset for glibc-2.32 (experimental)"
796
			eapply "${WORKDIR}"/backport-rv32
797
			einfo "Done."
798
		fi
775 799
	fi
776 800

  
777 801
	default
......
947 971
		$(use_enable static-pie)
948 972
		$(use_enable systemtap)
949 973
		$(use_enable nscd)
974

  
975
		# locale data is arch-independent
976
		# https://bugs.gentoo.org/753740
977
		libc_cv_complocaledir='${exec_prefix}/lib/locale'
978

  
950 979
		${EXTRA_ECONF}
951 980
	)
952 981

  
......
1255 1284
		# powerpc
1256 1285
		ppc     /lib/ld.so.1
1257 1286
		# riscv
1287
		ilp32d  /lib/ld-linux-riscv32-ilp32d.so.1
1288
		ilp32   /lib/ld-linux-riscv32-ilp32.so.1
1258 1289
		lp64d   /lib/ld-linux-riscv64-lp64d.so.1
1259 1290
		lp64    /lib/ld-linux-riscv64-lp64.so.1
1260 1291
		# s390
......
1333 1364
	insinto /etc
1334 1365
	doins locale.gen
1335 1366

  
1336
	# Make sure all the ABI's can find the locales and so we only
1337
	# have to generate one set
1338
	local a
1339
	keepdir /usr/$(get_libdir)/locale
1340
	for a in $(get_install_abis) ; do
1341
		if [[ ! -e ${ED}/usr/$(get_abi_LIBDIR ${a})/locale ]] ; then
1342
			dosym ../$(get_libdir)/locale /usr/$(get_abi_LIBDIR ${a})/locale
1343
		fi
1344
	done
1345

  
1346
	# HACK: If we're building for riscv, we need to additionally make sure that
1347
	# we can find the locale archive afterwards
1348
	case ${CTARGET} in
1349
		riscv*)
1350
			if [[ ! -e ${ED}/usr/lib/locale ]] ; then
1351
				dosym ../$(get_libdir)/locale /usr/lib/locale
1352
			fi
1353
			;;
1354
		*) ;;
1355
	esac
1367
	keepdir /usr/lib/locale
1356 1368

  
1357 1369
	cd "${S}"
1358 1370

  
......
1479 1491
	[[ -n ${ROOT} ]] && return 0
1480 1492
	[[ -d ${ED}/$(get_libdir) ]] || return 0
1481 1493
	[[ -z ${BOOTSTRAP_RAP} ]] && glibc_sanity_check
1494

  
1495
	if [[ -L ${EROOT}/usr/lib/locale ]]; then
1496
		# Help portage migrate this to a directory
1497
		# https://bugs.gentoo.org/753740
1498
		rm "${EROOT}"/usr/lib/locale || die
1499
	fi
1482 1500
}
1483 1501

  
1484 1502
pkg_postinst() {
Thank you!