From dbf1c24ef05276665f27d3ce4275d2ef99e2d362 Mon Sep 17 00:00:00 2001 From: Schrijvers Luc Date: Sun, 20 Aug 2017 06:46:59 +0000 Subject: [PATCH] pjdfstests: fix old bep file (#1585) --- .../pjdfstest/patches/pjdfstest-0.1.patchset | 75 +++++++++++++++++++ .../patches/pjdfstest-20100807.patch | 37 --------- dev-util/pjdfstest/pjdfstest-0.1.recipe | 52 +++++++++++++ dev-util/pjdfstest/pjdfstest-20100807.recipe | 28 ------- 4 files changed, 127 insertions(+), 65 deletions(-) create mode 100644 dev-util/pjdfstest/patches/pjdfstest-0.1.patchset delete mode 100644 dev-util/pjdfstest/patches/pjdfstest-20100807.patch create mode 100644 dev-util/pjdfstest/pjdfstest-0.1.recipe delete mode 100644 dev-util/pjdfstest/pjdfstest-20100807.recipe diff --git a/dev-util/pjdfstest/patches/pjdfstest-0.1.patchset b/dev-util/pjdfstest/patches/pjdfstest-0.1.patchset new file mode 100644 index 000000000..0b9b4a114 --- /dev/null +++ b/dev-util/pjdfstest/patches/pjdfstest-0.1.patchset @@ -0,0 +1,75 @@ +From dc360a46481111dfe0a83e2e9759e81d678a8d05 Mon Sep 17 00:00:00 2001 +From: begasus +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 +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 +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 + diff --git a/dev-util/pjdfstest/patches/pjdfstest-20100807.patch b/dev-util/pjdfstest/patches/pjdfstest-20100807.patch deleted file mode 100644 index 8546097d1..000000000 --- a/dev-util/pjdfstest/patches/pjdfstest-20100807.patch +++ /dev/null @@ -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)}'` diff --git a/dev-util/pjdfstest/pjdfstest-0.1.recipe b/dev-util/pjdfstest/pjdfstest-0.1.recipe new file mode 100644 index 000000000..5dfa91a6e --- /dev/null +++ b/dev-util/pjdfstest/pjdfstest-0.1.recipe @@ -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 . +} diff --git a/dev-util/pjdfstest/pjdfstest-20100807.recipe b/dev-util/pjdfstest/pjdfstest-20100807.recipe deleted file mode 100644 index 6339496d3..000000000 --- a/dev-util/pjdfstest/pjdfstest-20100807.recipe +++ /dev/null @@ -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"