pjdfstests: fix old bep file (#1585)

This commit is contained in:
Schrijvers Luc
2017-08-20 06:46:59 +00:00
committed by Jérôme Duval
parent e48172874d
commit dbf1c24ef0
4 changed files with 127 additions and 65 deletions

View File

@@ -0,0 +1,75 @@
From dc360a46481111dfe0a83e2e9759e81d678a8d05 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Sat, 19 Aug 2017 12:20:29 +0200
Subject: Haiku doesn't have the functions major,minor and makedev
diff --git a/pjdfstest.c b/pjdfstest.c
index 7f76b1a..a5731d8 100644
--- a/pjdfstest.c
+++ b/pjdfstest.c
@@ -60,6 +60,13 @@ typedef struct stat64 stat_t;
typedef struct stat stat_t;
#endif
+#if !defined(HAVE_MAJOR) && !defined(major)
+/* Replacement for major/minor/makedev. */
+#define major(x) ((int)(0x00ff & ((x) >> 8)))
+#define minor(x) ((int)(0xffff00ff & (x)))
+#define makedev(maj,min) ((0xff00 & ((maj)<<8)) | (0xffff00ff & (min)))
+#endif
+
#ifndef ALLPERMS
#define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)
#endif
--
2.7.0
From fb7032605b24f9fd0200e6264aed58bd6b74ee92 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Sat, 19 Aug 2017 13:24:06 +0200
Subject: add Haiku to the supported OS's
diff --git a/tests/conf b/tests/conf
index cf8fb8b..1b2fb81 100644
--- a/tests/conf
+++ b/tests/conf
@@ -42,6 +42,10 @@ Solaris|SunOS)
fs=`mount -v | ${GREP} -E "^${pattern}" | awk '{print $5}' | \
tr -s '[:lower:]' '[:upper:]'`
;;
+Haiku)
+ GREP=grep
+ fs=`df -b | tail -1 | awk '{print toupper($2)}'`
+ ;;
Linux)
GREP=grep
fs=`df -PT . | tail -1 | awk '{print toupper($2)}'`
--
2.7.0
From 86617c8a78fa146f766ae152a984481bb731b4c5 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Sun, 20 Aug 2017 07:13:07 +0200
Subject: add -lnetwork detection
diff --git a/configure.ac b/configure.ac
index df0b945..8f79445 100644
--- a/configure.ac
+++ b/configure.ac
@@ -18,6 +18,8 @@ AC_CHECK_HEADERS([ \
sys/mkdev.h \
])
+AC_SEARCH_LIBS(socket, network)
+
#HAS_FREEBSD_ACL
AC_CHECK_FUNC([bindat],
--
2.7.0

View File

@@ -1,37 +0,0 @@
diff -urN pjdfstest-20100807/Makefile pjdfstest-20100807-haiku/Makefile
--- pjdfstest-20100807/Makefile 2010-08-06 17:38:26.008912896 +0000
+++ pjdfstest-20100807-haiku/Makefile 2010-11-05 16:31:34.000524288 +0000
@@ -17,6 +17,10 @@
CFLAGS+= -D__OS_Darwin__
CFLAGS+= -DHAS_LCHMOD -DHAS_CHFLAGS -DHAS_LCHFLAGS
+.elif ${OSTYPE} == "Haiku"
+CFLAGS+= -D__OS_Haiku__
+CFLAGS+= -DHAS_LCHMOD -DHAS_CHFLAGS -DHAS_LCHFLAGS
+
.elif ${OSTYPE} == "Linux"
CFLAGS+= -D__OS_Linux__
CFLAGS+= -D_GNU_SOURCE
diff -urN pjdfstest-20100807/tests/conf pjdfstest-20100807-haiku/tests/conf
--- pjdfstest-20100807/tests/conf 2010-08-06 21:53:43.009961472 +0000
+++ pjdfstest-20100807-haiku/tests/conf 2010-11-05 16:44:11.000000000 +0000
@@ -1,7 +1,7 @@
# $FreeBSD: head/tools/regression/fstest/tests/conf 210970 2010-08-06 21:53:50Z pjd $
# fstest configuration file
-# Known operating systems: FreeBSD, SunOS, Linux
+# Known operating systems: FreeBSD, SunOS, Linux, Haiku
os=`uname`
case "${os}" in
@@ -17,6 +17,10 @@
fs=`mount -v | egrep "^${pattern}" | awk '{print $5}' | \
tr -s '[:lower:]' '[:upper:]'`
;;
+Haiku)
+ GREP=grep
+ fs=`df -b | tail -1 | awk '{print toupper($2)}'`
+ ;;
Linux)
GREP=grep
fs=`df -PT . | tail -1 | awk '{print toupper($2)}'`

View File

@@ -0,0 +1,52 @@
SUMMARY="Exercise POSIX system calls"
DESCRIPTION="pjdfstest is a test suite that helps exercise POSIX system calls."
HOMEPAGE="http://people.freebsd.org/~pjd/pjdfstest"
COPYRIGHT="2006-2012 Pawel Jakub Dawidek
Alan Somers
Ngie Cooper"
LICENSE="BSD (2-clause)"
REVISION="1"
SOURCE_URI="https://github.com/pjd/pjdfstest/archive/$portVersion.tar.gz"
CHECKSUM_SHA256="4701236d82bc13e0f0296bf920bc9b8433d519b2a862a5d8565a697ec3885954"
PATCHES="pjdfstest-$portVersion.patchset"
ARCHITECTURES="x86_gcc2 x86_64"
PROVIDES="
pjdfstest = $portVersion
cmd:pjdfstest = $portVersion
"
REQUIRES="
haiku
"
BUILD_REQUIRES="
haiku_devel
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoconf
cmd:awk
cmd:gcc
cmd:make
"
BUILD()
{
autoreconf -ifs
runConfigure ./configure
make pjdfstest
}
INSTALL()
{
make install
}
TEST()
{
#tests still fails
cd tests
prove -rv .
}

View File

@@ -1,28 +0,0 @@
DESCRIPTION="FreeBSD's POSIX Test Suite"
HOMEPAGE="http://people.freebsd.org/~pjd/pjdfstest"
SOURCE_URI="http://people.freebsd.org/~pjd/pjdfstest/pjdfstest-20100807.tbz"
CHECKSUM_MD5="2ea67f0ea6f8f028345b604cfddaf1aa"
REVISION="1"
STATUS_HAIKU="broken"
MESSAGE="This test suite requires expect, which hasn't been ported to Haiku, yet."
DEPEND=""
BUILD()
{
cd pjdfstest-20100807
make
}
INSTALL()
{
cd pjdfstest-20100807
}
TEST()
{
cd pjdfstest-20100807
}
LICENSE="BSD (2-clause)"
COPYRIGHT="2006-2007 Pawel Jakub Dawidek"