Skip to content
Permalink
fb5e6995a2
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
executable file 98 lines (78 sloc) 2.66 KB
#!/bin/env beesh
# BEE_VERSION glibc-2.33-0
SRCURL[0]="https://ftp.gnu.org/gnu/glibc/glibc-${PKGVERSION}.tar.bz2"
PATCHURL=(
/src/mariux/patches/glibc-2.33-0001-ldconfig-don-t-generate-links-by-default-v2.patch
/src/mariux/patches/glibc-2.33-0002-ldconfig-don-t-remove-stale-symlinks-by-default-v2.patch
)
SYSCONFDIR=/etc
SBINDIR=/usr/sbin
LIBEXECDIR=/usr/lib/glibc
ROOTSBINDIR=/sbin
SLIBDIR=/lib
mee_patch_post() {
# set DL - cut /tools from dynloader in temporary system
DL=$(readelf -l /bin/sh | sed -n 's@.*interpret.*/tools\(.*\)]$@\1@p')
# if not temporary system just set DL to current dynloader
: ${DL:=$(readelf -l /bin/sh | sed -n 's@.*interpret.*\(/lib.*\)]$@\1@p')}
# replace dynloader in test-script..
echo "sed-ing scripts/test-installation.pl - dynloader => ${DL}"
sed -i "s|libs -o|libs -L/usr/lib -Wl,-dynamic-linker=$DL -o|" scripts/test-installation.pl
unset DL
# use /bin/bash instead of /bin/sh ..
echo "sed-ing elf/ldd.bash.in"
sed -i 's|@BASH@|/bin/bash|' elf/ldd.bash.in
# fix some binary issues when gzipping manpages..
echo "sed-ing manual/Makefile"
sed -i 's|gzip -9|gzip -n -9|' manual/Makefile
}
mee_configure() {
bee_configure \
--enable-kernel=4.14.87 \
--enable-stack-protector=strong
}
mee_build_pre() {
echo "CFLAGS += -march=x86-64 -mtune=generic" > configparms
echo "slibdir=${SLIBDIR}" >> configparms
echo "rootsbindir=${ROOTSBINDIR}" >> configparms
}
mee_build_post() {
cp -v ${S}/iconvdata/gconv-modules iconvdata
}
mee_check() {
make -k check
}
mee_install_pre() {
# create temporary ld.co.conf to build glibc..
mkdir -p ${D}${SYSCONFDIR}
touch ${D}${SYSCONFDIR}/ld.so.conf
}
mee_install() {
# install.. DESTDIR is called install_root in glibc..
make install install_root=${D}
}
mee_install_post() {
# remove temporary ld.so.* because this is not part of the package
rm -v ${D}${SYSCONFDIR}/ld.so.{conf,cache}
if [ "${SLIBDIR}" != "${LIBDIR}" ] ; then
cd ${D}${SLIBDIR}
for i in * ; do
start_cmd ln -v $i ${D}${LIBDIR}/$i
done
cd -
fi
if [ "${ROOTSBINDIR}" != "${SBINDIR}" ] ; then
cd ${D}${ROOTSBINDIR}
for i in * ; do
start_cmd mv -v $i ${D}${SBINDIR}/$i
start_cmd ln -sv ${SBINDIR}/$i ${D}${ROOTSBINDIR}/$i
done
cd -
fi
# "make install" created (e.g.) /lib64/ld-linux-x86-64.so.2 -> ../lib/ld-2.26.so
# we have /lib64 -> /lib , so remove the lib64 directory and create a new link
#
rm $D/lib64/ld-linux-x86-64.so.${PKGVERSION[1]}
rmdir $D/lib64
ln -s ld-$PKGVERSION.so $D/lib/ld-linux-x86-64.so.${PKGVERSION[1]}
}