summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.AURINFO16
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD48
-rw-r--r--lib32-libfiu-0.93.install7
-rw-r--r--lib32-libfiu-0.93.patch18
5 files changed, 107 insertions, 0 deletions
diff --git a/.AURINFO b/.AURINFO
new file mode 100644
index 00000000000..3f703c02c13
--- /dev/null
+++ b/.AURINFO
@@ -0,0 +1,16 @@
+pkgbase = lib32-libfiu
+ pkgdesc = userspace fault injection framework
+ pkgver = 0.93
+ pkgrel = 1
+ url = https://blitiri.com.ar/p/libfiu/
+ install = lib32-libfiu-0.93.install
+ arch = x86_64
+ license = custom
+ makedepends = make
+ makedepends = gcc
+ depends = libfiu
+ source = https://blitiri.com.ar/p/libfiu/files/0.93/libfiu-0.93.tar.gz
+ source = lib32-libfiu-0.93.patch
+
+pkgname = lib32-libfiu
+
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..30c3c311618
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = lib32-libfiu
+ pkgdesc = userspace fault injection framework
+ pkgver = 0.93
+ pkgrel = 1
+ url = https://blitiri.com.ar/p/libfiu/
+ install = lib32-libfiu-0.93.install
+ arch = x86_64
+ license = custom
+ makedepends = make
+ makedepends = gcc
+ depends = libfiu
+ source = https://blitiri.com.ar/p/libfiu/files/0.93/libfiu-0.93.tar.gz
+ source = lib32-libfiu-0.93.patch
+ md5sums = 8d8126a05a0fd7e833544c6a73deb256
+ md5sums = 91b295e1fbf4bd0a2bf73bb97a6ed91b
+
+pkgname = lib32-libfiu
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..b6e5aed7693
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,48 @@
+# Contributor: Moritz Lipp <mlq@pwmt.org>
+
+pkgname=lib32-libfiu
+_pkgname=libfiu
+pkgver=0.93
+pkgrel=1
+pkgdesc="userspace fault injection framework"
+arch=('x86_64')
+url="https://blitiri.com.ar/p/libfiu/"
+license=('custom')
+depends=('libfiu')
+makedepends=('make' 'gcc')
+source=("https://blitiri.com.ar/p/$_pkgname/files/$pkgver/$_pkgname-$pkgver.tar.gz"
+ "$pkgname-$pkgver.patch")
+md5sums=('8d8126a05a0fd7e833544c6a73deb256'
+ '91b295e1fbf4bd0a2bf73bb97a6ed91b')
+install=$pkgname-$pkgver.install
+
+prepare() {
+ cd $srcdir/$_pkgname-$pkgver
+
+ patch -p1 < $startdir/$pkgname-$pkgver.patch
+}
+
+build() {
+ cd $srcdir/$_pkgname-$pkgver
+
+ CFLAGS=-m32 LDFLAGS=-m32 \
+ make PREFIX=$pkgdir/usr
+}
+
+package() {
+ cd $srcdir/$_pkgname-$pkgver
+
+ CFLAGS=-m32 LDFLAGS=-m32 \
+ make PREFIX=$pkgdir/usr libfiu_install
+
+ # Fix paths
+ sed -e "s|${pkgdir}||g" -e "s|libdir\(.*\)lib|libdir\1lib32|g" -i $pkgdir/usr/lib/pkgconfig/libfiu.pc
+ mv $pkgdir/usr/lib $pkgdir/usr/lib32
+
+ # Cleanup
+ rm -r $pkgdir/usr/include
+ rm -r $pkgdir/usr/share/man
+
+ # Install LICENSE
+ install -D -m664 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
diff --git a/lib32-libfiu-0.93.install b/lib32-libfiu-0.93.install
new file mode 100644
index 00000000000..aff00518920
--- /dev/null
+++ b/lib32-libfiu-0.93.install
@@ -0,0 +1,7 @@
+post_install() {
+ ldconfig
+}
+
+post_upgrade() {
+ ldconfig
+}
diff --git a/lib32-libfiu-0.93.patch b/lib32-libfiu-0.93.patch
new file mode 100644
index 00000000000..4c0c7b1b79d
--- /dev/null
+++ b/lib32-libfiu-0.93.patch
@@ -0,0 +1,18 @@
+diff --git a/preload/posix/Makefile b/preload/posix/Makefile
+index b269781..8cadde1 100644
+--- a/preload/posix/Makefile
++++ b/preload/posix/Makefile
+@@ -28,11 +28,11 @@ OBJS = codegen.o $(GEN_OBJS) $(CUSTOM_OBJS)
+
+ ifneq ($(V), 1)
+ NICE_CC = @echo " CC $@"; $(CC)
+- NICE_GEN = @echo " GEN $@"; ./generate
++ NICE_GEN = @echo " GEN $@"; python2 ./generate
+ Q = @
+ else
+ NICE_CC = $(CC)
+- NICE_GEN = ./generate
++ NICE_GEN = python2 ./generate
+ Q =
+ endif
+