mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-01-17 23:34:07 +00:00
core/glibc to 2.38-6
This commit is contained in:
parent
29cab37824
commit
a079e196ce
2 changed files with 63 additions and 39 deletions
|
@ -1,6 +1,6 @@
|
||||||
pkgbase = glibc
|
pkgbase = glibc
|
||||||
pkgver = 2.38
|
pkgver = 2.38
|
||||||
pkgrel = 5
|
pkgrel = 6
|
||||||
url = https://www.gnu.org/software/libc
|
url = https://www.gnu.org/software/libc
|
||||||
arch = x86_64
|
arch = x86_64
|
||||||
license = GPL
|
license = GPL
|
||||||
|
@ -11,7 +11,7 @@ pkgbase = glibc
|
||||||
makedepends = python
|
makedepends = python
|
||||||
options = staticlibs
|
options = staticlibs
|
||||||
options = !lto
|
options = !lto
|
||||||
source = git+https://sourceware.org/git/glibc.git#commit=f6445dc94da185b3d1ee283f0ca0a34c4e1986cc
|
source = git+https://sourceware.org/git/glibc.git#commit=750a45a783906a19591fb8ff6b7841470f1f5701
|
||||||
source = locale.gen.txt
|
source = locale.gen.txt
|
||||||
source = locale-gen
|
source = locale-gen
|
||||||
source = lib32-glibc.conf
|
source = lib32-glibc.conf
|
||||||
|
@ -45,3 +45,7 @@ pkgname = lib32-glibc
|
||||||
options = staticlibs
|
options = staticlibs
|
||||||
options = !lto
|
options = !lto
|
||||||
options = !emptydirs
|
options = !emptydirs
|
||||||
|
|
||||||
|
pkgname = glibc-locales
|
||||||
|
pkgdesc = Pregenerated locales for GNU C Library
|
||||||
|
depends = glibc=2.38
|
||||||
|
|
|
@ -14,10 +14,11 @@
|
||||||
|
|
||||||
noautobuild=1
|
noautobuild=1
|
||||||
|
|
||||||
pkgname=glibc
|
pkgbase=glibc
|
||||||
|
pkgname=(glibc glibc-locales)
|
||||||
pkgver=2.38
|
pkgver=2.38
|
||||||
_commit=f6445dc94da185b3d1ee283f0ca0a34c4e1986cc
|
_commit=750a45a783906a19591fb8ff6b7841470f1f5701
|
||||||
pkgrel=5
|
pkgrel=6
|
||||||
arch=(x86_64)
|
arch=(x86_64)
|
||||||
url='https://www.gnu.org/software/libc'
|
url='https://www.gnu.org/software/libc'
|
||||||
license=(GPL LGPL)
|
license=(GPL LGPL)
|
||||||
|
@ -71,40 +72,45 @@ build() {
|
||||||
[[ $CARCH == "armv7h" ]] && _configure_flags+=(--host=armv7l-unknown-linux-gnueabihf --build=armv7l-unknown-linux-gnueabihf)
|
[[ $CARCH == "armv7h" ]] && _configure_flags+=(--host=armv7l-unknown-linux-gnueabihf --build=armv7l-unknown-linux-gnueabihf)
|
||||||
[[ $CARCH == "aarch64" ]] && _configure_flags+=(--host=aarch64-unknown-linux-gnu --build=aarch64-unknown-linux-gnu --enable-memory-tagging)
|
[[ $CARCH == "aarch64" ]] && _configure_flags+=(--host=aarch64-unknown-linux-gnu --build=aarch64-unknown-linux-gnu --enable-memory-tagging)
|
||||||
|
|
||||||
echo "slibdir=/usr/lib" >> configparms
|
(
|
||||||
echo "rtlddir=/usr/lib" >> configparms
|
cd glibc-build
|
||||||
echo "sbindir=/usr/bin" >> configparms
|
|
||||||
echo "rootsbindir=/usr/bin" >> configparms
|
|
||||||
|
|
||||||
# Credits @allanmcrae
|
echo "slibdir=/usr/lib" >> configparms
|
||||||
# https://github.com/allanmcrae/toolchain/blob/f18604d70c5933c31b51a320978711e4e6791cf1/glibc/PKGBUILD
|
echo "rtlddir=/usr/lib" >> configparms
|
||||||
# remove fortify for building libraries
|
echo "sbindir=/usr/bin" >> configparms
|
||||||
# CFLAGS=${CFLAGS/-Wp,-D_FORTIFY_SOURCE=2/}
|
echo "rootsbindir=/usr/bin" >> configparms
|
||||||
|
|
||||||
"${srcdir}"/glibc/configure \
|
# Credits @allanmcrae
|
||||||
--libdir=/usr/lib \
|
# https://github.com/allanmcrae/toolchain/blob/f18604d70c5933c31b51a320978711e4e6791cf1/glibc/PKGBUILD
|
||||||
--libexecdir=/usr/lib \
|
# remove fortify for building libraries
|
||||||
"${_configure_flags[@]}"
|
# CFLAGS=${CFLAGS/-Wp,-D_FORTIFY_SOURCE=2/}
|
||||||
|
|
||||||
make -O
|
"${srcdir}"/glibc/configure \
|
||||||
|
--libdir=/usr/lib \
|
||||||
|
--libexecdir=/usr/lib \
|
||||||
|
"${_configure_flags[@]}"
|
||||||
|
|
||||||
# build info pages manually for reproducibility
|
make -O
|
||||||
make info
|
|
||||||
|
|
||||||
# pregenerate C.UTF-8 locale until it is built into glibc
|
# build info pages manually for reproducibility
|
||||||
# (https://sourceware.org/glibc/wiki/Proposals/C.UTF-8, FS#74864)-
|
make info
|
||||||
elf/ld.so --library-path "$PWD" locale/localedef -c -f ../glibc/localedata/charmaps/UTF-8 -i ../glibc/localedata/locales/C ../C.UTF-8/
|
)
|
||||||
|
|
||||||
|
# pregenerate locales here instead of in package
|
||||||
|
# functions because localedef does not like fakeroot
|
||||||
|
make -C "${srcdir}"/glibc/localedata objdir="${srcdir}"/glibc-build \
|
||||||
|
DESTDIR="${srcdir}"/locales install-locale-files
|
||||||
}
|
}
|
||||||
|
|
||||||
# Credits for skip_test() and check() @allanmcrae
|
# Credits for _skip_test() and check() @allanmcrae
|
||||||
# https://github.com/allanmcrae/toolchain/blob/f18604d70c5933c31b51a320978711e4e6791cf1/glibc/PKGBUILD
|
# https://github.com/allanmcrae/toolchain/blob/f18604d70c5933c31b51a320978711e4e6791cf1/glibc/PKGBUILD
|
||||||
skip_test() {
|
_skip_test() {
|
||||||
test=${1}
|
test=${1}
|
||||||
file=${2}
|
file=${2}
|
||||||
sed -i "/\b${test} /d" "${srcdir}"/glibc/${file}
|
sed -i "/\b${test} /d" "${srcdir}"/glibc/${file}
|
||||||
}
|
}
|
||||||
|
|
||||||
check() {
|
check() (
|
||||||
cd glibc-build
|
cd glibc-build
|
||||||
|
|
||||||
# adjust/remove buildflags that cause false-positive testsuite failures
|
# adjust/remove buildflags that cause false-positive testsuite failures
|
||||||
|
@ -117,18 +123,18 @@ check() {
|
||||||
# The following tests fail due to restrictions in the Arch build system
|
# The following tests fail due to restrictions in the Arch build system
|
||||||
# The correct fix is to add the following to the systemd-nspawn call:
|
# The correct fix is to add the following to the systemd-nspawn call:
|
||||||
# --system-call-filter="@clock @memlock @pkey"
|
# --system-call-filter="@clock @memlock @pkey"
|
||||||
skip_test test-errno-linux sysdeps/unix/sysv/linux/Makefile
|
_skip_test test-errno-linux sysdeps/unix/sysv/linux/Makefile
|
||||||
skip_test tst-mlock2 sysdeps/unix/sysv/linux/Makefile
|
_skip_test tst-mlock2 sysdeps/unix/sysv/linux/Makefile
|
||||||
skip_test tst-ntp_gettime sysdeps/unix/sysv/linux/Makefile
|
_skip_test tst-ntp_gettime sysdeps/unix/sysv/linux/Makefile
|
||||||
skip_test tst-ntp_gettimex sysdeps/unix/sysv/linux/Makefile
|
_skip_test tst-ntp_gettimex sysdeps/unix/sysv/linux/Makefile
|
||||||
skip_test tst-pkey sysdeps/unix/sysv/linux/Makefile
|
_skip_test tst-pkey sysdeps/unix/sysv/linux/Makefile
|
||||||
skip_test tst-process_mrelease sysdeps/unix/sysv/linux/Makefile
|
_skip_test tst-process_mrelease sysdeps/unix/sysv/linux/Makefile
|
||||||
skip_test tst-adjtime time/Makefile
|
_skip_test tst-adjtime time/Makefile
|
||||||
|
|
||||||
make -O check
|
make -O check
|
||||||
}
|
)
|
||||||
|
|
||||||
package() {
|
package_glibc() {
|
||||||
pkgdesc='GNU C Library'
|
pkgdesc='GNU C Library'
|
||||||
depends=('linux-api-headers>=4.10' tzdata filesystem)
|
depends=('linux-api-headers>=4.10' tzdata filesystem)
|
||||||
optdepends=('gd: for memusagestat'
|
optdepends=('gd: for memusagestat'
|
||||||
|
@ -137,7 +143,7 @@ package() {
|
||||||
backup=(etc/gai.conf
|
backup=(etc/gai.conf
|
||||||
etc/locale.gen)
|
etc/locale.gen)
|
||||||
|
|
||||||
make -C glibc-build install_root="${pkgdir}" install
|
make -C glibc-build DESTDIR="${pkgdir}" install
|
||||||
rm -f "${pkgdir}"/etc/ld.so.cache
|
rm -f "${pkgdir}"/etc/ld.so.cache
|
||||||
|
|
||||||
# Shipped in tzdata
|
# Shipped in tzdata
|
||||||
|
@ -154,15 +160,18 @@ package() {
|
||||||
# Create /etc/locale.gen
|
# Create /etc/locale.gen
|
||||||
install -m644 "${srcdir}"/locale.gen.txt "${pkgdir}"/etc/locale.gen
|
install -m644 "${srcdir}"/locale.gen.txt "${pkgdir}"/etc/locale.gen
|
||||||
sed -e '1,3d' -e 's|/| |g' -e 's|\\| |g' -e 's|^|#|g' \
|
sed -e '1,3d' -e 's|/| |g' -e 's|\\| |g' -e 's|^|#|g' \
|
||||||
"${srcdir}"/glibc/localedata/SUPPORTED >> "${pkgdir}"/etc/locale.gen
|
localedata/SUPPORTED >> "${pkgdir}"/etc/locale.gen
|
||||||
|
|
||||||
# Add SUPPORTED file to pkg
|
# Add SUPPORTED file to pkg
|
||||||
sed -e '1,3d' -e 's|/| |g' -e 's| \\||g' \
|
sed -e '1,3d' -e 's|/| |g' -e 's| \\||g' \
|
||||||
"${srcdir}"/glibc/localedata/SUPPORTED > "${pkgdir}"/usr/share/i18n/SUPPORTED
|
localedata/SUPPORTED > "${pkgdir}"/usr/share/i18n/SUPPORTED
|
||||||
|
|
||||||
# install C.UTF-8 so that it is always available
|
# install C.UTF-8 so that it is always available
|
||||||
|
# should be built into glibc eventually
|
||||||
|
# https://sourceware.org/glibc/wiki/Proposals/C.UTF-8
|
||||||
|
# https://bugs.archlinux.org/task/74864
|
||||||
install -dm755 "${pkgdir}"/usr/lib/locale
|
install -dm755 "${pkgdir}"/usr/lib/locale
|
||||||
cp -r "${srcdir}"/C.UTF-8 -t "${pkgdir}"/usr/lib/locale
|
cp -r "${srcdir}"/locales/usr/lib/locale/C.utf8 -t "${pkgdir}"/usr/lib/locale
|
||||||
sed -i '/#C\.UTF-8 /d' "${pkgdir}"/etc/locale.gen
|
sed -i '/#C\.UTF-8 /d' "${pkgdir}"/etc/locale.gen
|
||||||
|
|
||||||
# Provide tracing probes to libstdc++ for exceptions, possibly for other
|
# Provide tracing probes to libstdc++ for exceptions, possibly for other
|
||||||
|
@ -170,3 +179,14 @@ package() {
|
||||||
install -Dm644 "${srcdir}"/sdt.h "${pkgdir}"/usr/include/sys/sdt.h
|
install -Dm644 "${srcdir}"/sdt.h "${pkgdir}"/usr/include/sys/sdt.h
|
||||||
install -Dm644 "${srcdir}"/sdt-config.h "${pkgdir}"/usr/include/sys/sdt-config.h
|
install -Dm644 "${srcdir}"/sdt-config.h "${pkgdir}"/usr/include/sys/sdt-config.h
|
||||||
}
|
}
|
||||||
|
|
||||||
|
package_glibc-locales() {
|
||||||
|
pkgdesc='Pregenerated locales for GNU C Library'
|
||||||
|
depends=("glibc=$pkgver")
|
||||||
|
|
||||||
|
cp -r locales/* -t "${pkgdir}"
|
||||||
|
rm -r "${pkgdir}"/usr/lib/locale/C.utf8
|
||||||
|
|
||||||
|
# deduplicate locale data
|
||||||
|
hardlink -c "${pkgdir}"/usr/lib/locale
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue