From e386a9f4b4bc2b23963cc4505507b3c622552490 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Tue, 14 Oct 2014 14:39:41 +0200 Subject: [PATCH] cpio 2.11: fix recipe. --- app-arch/cpio/cpio-2.11.recipe | 50 ++++++++++++----- app-arch/cpio/patches/cpio-2.11.patch | 32 ----------- app-arch/cpio/patches/cpio-2.11.patchset | 70 ++++++++++++++++++++++++ 3 files changed, 107 insertions(+), 45 deletions(-) delete mode 100644 app-arch/cpio/patches/cpio-2.11.patch create mode 100644 app-arch/cpio/patches/cpio-2.11.patchset diff --git a/app-arch/cpio/cpio-2.11.recipe b/app-arch/cpio/cpio-2.11.recipe index 999e30367..afc29c228 100644 --- a/app-arch/cpio/cpio-2.11.recipe +++ b/app-arch/cpio/cpio-2.11.recipe @@ -12,31 +12,55 @@ recognizes which kind of archive it is reading and can read archives created \ on machines with a different byte-order. " HOMEPAGE="http://www.gnu.org/software/cpio/cpio.html" -SRC_URI="http://ftp.gnu.org/gnu/cpio/cpio-2.11.tar.gz" -CHECKSUM_MD5="1112bb6c45863468b5496ba128792f6c" REVISION="1" -STATUS_HAIKU="broken" -DEPEND="" +ARCHITECTURES="x86_gcc2" + +SRC_URI="http://ftp.gnu.org/gnu/cpio/cpio-2.11.tar.gz" +CHECKSUM_SHA256="601b1d774cd6e4cd39416203c91ec59dbd65dd27d79d75e1a9b89497ea643978" +PATCHES="cpio-$portVersion.patchset" + +PROVIDES=" + cpio = $portVersion + cmd:cpio +" + +REQUIRES=" + haiku >= $haikuVersion +" + +BUILD_REQUIRES=" + devel:libiconv +" + +BUILD_PREREQUIRES=" + haiku_devel >= $haikuVersion + cmd:aclocal + cmd:autoconf + cmd:awk + cmd:bison + cmd:find + cmd:gcc + cmd:make + cmd:sh + cmd:yacc +" + BUILD() { - cd cpio-2.11 -# sed -i 's/restrict//g' gnu/string.in.h - ./configure --prefix=`finddir B_COMMON_DIRECTORY` \ - infodir=`finddir B_COMMON_DOCUMENTATION_DIRECTORY`/info \ - mandir=`finddir B_COMMON_DOCUMENTATION_DIRECTORY`/man \ - localedir=`finddir B_COMMON_DATA_DIRECTORY`/locale - make + aclocal + autoreconf + autoconf + runConfigure ./configure + make $jobArgs } INSTALL() { - cd cpio-2.11 make install } TEST() { - cd cpio-2.11 make check } diff --git a/app-arch/cpio/patches/cpio-2.11.patch b/app-arch/cpio/patches/cpio-2.11.patch deleted file mode 100644 index 09ec2d50d..000000000 --- a/app-arch/cpio/patches/cpio-2.11.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff -urN cpio-2.11/configure.ac cpio-2.11-haiku/configure.ac ---- cpio-2.11/configure.ac 2010-03-10 04:59:16.008126464 -0800 -+++ cpio-2.11-haiku/configure.ac 2013-03-12 15:18:23.338165760 -0700 -@@ -47,6 +47,8 @@ - AC_HEADER_STDC - AC_HEADER_DIRENT - -+AC_SEARCH_LIBS(gethostbyname, [socket, network]) -+ - AC_CHECK_FUNCS([fchmod fchown]) - # This is needed for mingw build - AC_CHECK_FUNCS([setmode getpwuid getpwnam getgrgid getgrnam pipe fork getuid geteuid]) -diff -urN cpio-2.11/src/makepath.c cpio-2.11-haiku/src/makepath.c ---- cpio-2.11/src/makepath.c 2010-02-12 02:19:23.043778048 -0800 -+++ cpio-2.11-haiku/src/makepath.c 2013-03-12 15:18:30.096993280 -0700 -@@ -56,6 +56,7 @@ - char *dirpath; /* A copy we can scribble NULs on. */ - struct stat stats; - int retval = 0; -+ char *slash; - mode_t tmpmode; - mode_t invert_permissions; - int we_are_root = getuid () == 0; -@@ -68,7 +69,7 @@ - tmpmode = MODE_RWX & ~ newdir_umask; - invert_permissions = we_are_root ? 0 : MODE_WXUSR & ~ tmpmode; - -- char *slash = dirpath; -+ slash = dirpath; - while (*slash == '/') - slash++; - while ((slash = strchr (slash, '/'))) diff --git a/app-arch/cpio/patches/cpio-2.11.patchset b/app-arch/cpio/patches/cpio-2.11.patchset new file mode 100644 index 000000000..8f6add5bf --- /dev/null +++ b/app-arch/cpio/patches/cpio-2.11.patchset @@ -0,0 +1,70 @@ +From 849e148bbad050d073c062b31f353fc66e277e23 Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Tue, 14 Oct 2014 14:38:24 +0200 +Subject: Search for gethostbyname in libnetwork. + + +diff --git a/configure.ac b/configure.ac +index b4507eb..448fa6d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -47,6 +47,8 @@ AC_CHECK_TYPE(gid_t, int) + AC_HEADER_STDC + AC_HEADER_DIRENT + ++AC_SEARCH_LIBS(gethostbyname, [socket, network]) ++ + AC_CHECK_FUNCS([fchmod fchown]) + # This is needed for mingw build + AC_CHECK_FUNCS([setmode getpwuid getpwnam getgrgid getgrnam pipe fork getuid geteuid]) +-- +1.8.3.4 + + +From d73864ea6ac27a18ef7897a036791746e2c3a883 Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Tue, 14 Oct 2014 14:38:58 +0200 +Subject: gcc2 fixes. + + +diff --git a/gnu/inttostr.c b/gnu/inttostr.c +index d4f99cc..c7636d5 100644 +--- a/gnu/inttostr.c ++++ b/gnu/inttostr.c +@@ -34,7 +34,6 @@ inttostr (inttype i, char *buf) + char *p = buf + INT_STRLEN_BOUND (inttype); + *p = 0; + +- verify (TYPE_SIGNED (inttype) == inttype_is_signed); + #if inttype_is_signed + if (i < 0) + { +diff --git a/src/filetypes.h b/src/filetypes.h +index f80faab..81f0c32 100644 +--- a/src/filetypes.h ++++ b/src/filetypes.h +@@ -81,5 +81,3 @@ + #ifndef S_ISLNK + #define lstat stat + #endif +-int lstat (); +-int stat (); +diff --git a/src/makepath.c b/src/makepath.c +index 7631772..83f9c25 100644 +--- a/src/makepath.c ++++ b/src/makepath.c +@@ -65,10 +65,10 @@ make_path (char *argpath, + + if (stat (dirpath, &stats)) + { ++ char *slash = dirpath; + tmpmode = MODE_RWX & ~ newdir_umask; + invert_permissions = we_are_root ? 0 : MODE_WXUSR & ~ tmpmode; + +- char *slash = dirpath; + while (*slash == '/') + slash++; + while ((slash = strchr (slash, '/'))) +-- +1.8.3.4 +