Skip to content
Permalink
update-mpfr-402
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 124 lines (98 sloc) 3.63 KB
#!/bin/env beesh
# BEE_VERSION glibc-2.27-0
SRCURL[0]="https://ftp.gnu.org/gnu/glibc/glibc-${PKGVERSION}.tar.bz2"
PATCHURL=(
/src/mariux/patches/glibc-2.25-0001-ldconfig-don-t-generate-links-by-default-v2.patch
/src/mariux/patches/glibc-2.25-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
# those seds prevent installing glibc in /lib64 instead of /lib..
# echo "sed-ing sysdeps/unix/sysv/linux/configure"
# sed -i 's,x86_64 |,,' sysdeps/unix/sysv/linux/configure
# echo "sed-ing sysdeps/unix/sysv/linux/configure.in"
# sed -i 's,x86_64 |,,' sysdeps/unix/sysv/linux/configure.in
}
mee_configure() {
bee_configure \
--disable-profile \
--enable-add-ons \
--enable-obsolete-rpc \
--enable-obsolete-nsl \
--enable-kernel=4.4.34
}
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 2>&1 | tee glibc-check-log
grep Error glibc-check-log
echo grep Error glibc-check-log
bash
}
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}
#mkdir -vp ${D}/usr/include/rpc{,svc}
#cp -v ${S}/sunrpc/rpc/*.h ${D}/usr/include/rpc
#cp -v ${S}/sunrpc/rpcsvc/*.h ${D}/usr/include/rpcsvc
#cp -v ${S}/nis/rpcsvc/*.h ${D}/usr/include/rpcsvc
# this has been moved to tzdata package since glibc dow not provide
# timezones anymore with glibc >= 2.16
# install Europe/Berlin as default Timezone
#rm -v ${D}${SYSCONFDIR}/localtime
#ln -v ${D}/${PREFIX}/share/zoneinfo/Europe/Berlin ${D}${SYSCONFDIR}/localtime
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]}
}