added extra/dmapi

This commit is contained in:
Kevin Mihelich 2020-05-15 22:45:25 +00:00
parent 2f2b49e88c
commit 85c54d4f6e
3 changed files with 85 additions and 0 deletions

50
extra/dmapi/PKGBUILD Normal file
View File

@ -0,0 +1,50 @@
# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - patch from OpenSUSE to fix AArch64 FTBFS
pkgname=dmapi
pkgver=2.2.12
pkgrel=4
pkgdesc="Data migration API"
arch=('x86_64')
url="http://oss.sgi.com/projects/xfs/"
license=('GPL')
depends=('glibc')
makedepends=('xfsprogs')
provides=('xfsdmapi')
conflicts=('xfsdmapi')
replaces=('xfsdmapi')
#source=("ftp://oss.sgi.com/projects/xfs/previous/cmd_tars/$pkgname-$pkgver.tar.gz" dmapi-headers.patch)
source=(https://sources.archlinux.org/other/packages/dmapi/dmapi-$pkgver.tar.gz dmapi-headers.patch no-getdents-aarch64.diff)
prepare() {
cd $pkgname-$pkgver
patch -p1 -i ../dmapi-headers.patch # Fix build (Gentoo)
patch -p0 -i ../no-getdents-aarch64.diff
}
build() {
cd dmapi-$pkgver
[ "$CARCH" = "x86_64" ] && export CFLAGS="$CLFAGS -fPIC"
export INSTALL_USER=root
export INSTALL_GROUP=root
export DEBUG=-DNDEBUG
autoconf
./configure --prefix=/usr
make
}
package() {
cd dmapi-$pkgver
make DIST_ROOT="$pkgdir" install install-dev
# the static lib
install -D -m644 libdm/.libs/libdm.a "$pkgdir"/usr/lib/libdm.a
# and the header file, please
install -D -m644 include/dmapi.h "$pkgdir"/usr/include/xfs/dmapi.h
# kill libexec dir
rm -rf "$pkgdir"/usr/libexec
}
md5sums=('cd825d4e141c16011367e0a0dd98c9c5'
'6360c428bb89a1585669c3cf7a632208'
'310881a0ff5b86deb311801257de1dc0')

View File

@ -0,0 +1,16 @@
https://bugs.gentoo.org/560212
pull in headers for funcs that are used
--- a/libdm/dm_handle2path.c
+++ b/libdm/dm_handle2path.c
@@ -20,6 +20,9 @@
#include <dmapi_kern.h>
#include "dmapi_lib.h"
+#include <fcntl.h> /* open */
+#include <unistd.h> /* close */
+#include <string.h> /* strlen */
#include <mntent.h>
#include <dirent.h>
#ifdef linux

View File

@ -0,0 +1,19 @@
--- libdm/getdents.c
+++ libdm/getdents.c
@@ -211,6 +211,8 @@
# endif
}
#endif
+
+#ifdef __NR_getdents
{
size_t red_nbytes;
struct kernel_dirent *skdp, *kdp;
@@ -267,6 +269,7 @@
kdp = (struct kernel_dirent *) (((char *) kdp) + kdp->d_reclen);
}
}
+#endif
return (char *) dp - buf;
}