Skip to content

Instantly share code, notes, and snippets.

@mickael9 mickael9/PKGBUILD
Created Aug 11, 2016

Embed
What would you like to do?
post_install() {
usr/bin/ldconfig -r .
}
post_upgrade() {
usr/bin/ldconfig -r .
}
pre_remove() {
usr/bin/ldconfig -r .
}
# $Id: PKGBUILD 122308 2014-11-10 17:00:19Z fyan $
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Allan McRae <allan@archlinux.org>
# Contributor: Jochem Kossen <j.kossen@home.nl>
_pkgbasename=fakeroot
pkgname=lib32-${_pkgbasename}
pkgver=1.21
pkgrel=1
pkgdesc='Tool for simulating superuser privileges (32-bit)'
arch=('x86_64')
license=('GPL')
url="http://packages.debian.org/fakeroot"
groups=('multilib-devel')
install=fakeroot.install
depends=(lib32-glibc $_pkgbasename)
makedepends=('po4a')
source=("http://ftp.debian.org/debian/pool/main/f/${_pkgbasename}/${_pkgbasename}_${pkgver}.orig.tar.gz"
silence-dlerror.patch)
md5sums=('be5c9a0e516869fca4a6758105968e5a'
'5fba0b541b5af39d804265223fda525c')
prepare() {
cd $_pkgbasename-$pkgver
patch -p1 -i "$srcdir"/silence-dlerror.patch
}
build() {
export CC="gcc -m32"
export CXX="g++ -m32"
export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
cd "${srcdir}/${_pkgbasename}-${pkgver}"
./bootstrap
./configure --prefix=/usr --libdir=/usr/lib32/libfakeroot \
--disable-static --with-ipc=sysv
make
cd doc
po4a -k 0 --rm-backups --variable "srcdir=../doc/" po4a/po4a.cfg
}
package() {
cd "${srcdir}/${_pkgbasename}-${pkgver}"
make DESTDIR=${pkgdir} install
rm -rf "$pkgdir"/usr/{bin,share}
install -dm755 ${pkgdir}/etc/ld.so.conf.d/
echo '/usr/lib32/libfakeroot' > "$pkgdir/etc/ld.so.conf.d/$pkgname.conf"
}
diff --git a/libfakeroot.c b/libfakeroot.c
index f867758..7ef6e47 100644
--- a/libfakeroot.c
+++ b/libfakeroot.c
@@ -256,10 +256,12 @@ void load_library_symbols(void){
/* clear dlerror() just in case dlsym() legitimately returns NULL */
msg = dlerror();
*(next_wrap[i].doit)=dlsym(get_libc(), next_wrap[i].name);
+#ifdef LIBFAKEROOT_DEBUGGING
if ( (msg = dlerror()) != NULL){
fprintf (stderr, "dlsym(%s): %s\n", next_wrap[i].name, msg);
/* abort ();*/
}
+#endif /* LIBFAKEROOT_DEBUGGING */
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.