cpio: enable x86 and x86_64 archs

This commit is contained in:
Jerome Duval
2014-11-29 22:43:16 +00:00
parent 914fb86ab6
commit 2d34c52ac2
3 changed files with 1 additions and 122 deletions

View File

@@ -1,71 +0,0 @@
SUMMARY="GNU cpio copies files into or out of a cpio or tar archive"
DESCRIPTION="
GNU cpio copies files into or out of a cpio or tar archive. \
The archive can be another file on the disk, a magnetic tape, or a pipe.
GNU cpio supports the following archive formats: binary, old ASCII, \
new ASCII, crc, HPUX binary, HPUX old ASCII, old tar, and POSIX.1 tar. \
The tar format is provided for compatability with the tar program. \
By default, cpio creates binary format archives, for compatibility \
with older cpio programs. When extracting from archives, cpio automatically \
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"
COPYRIGHT="1988-2009 Free Software Foundation, Inc."
LICENSE="GNU GPL v3"
SRC_URI="http://ftp.gnu.org/gnu/cpio/cpio-2.10.tar.gz"
CHECKSUM_SHA256="2a2da2dbb741a75b9a374ceca46036ac3f3c3698e3756b9e3cd44edac8536ba5"
REVISION="1"
ARCHITECTURES="x86 ?x86_gcc2 x86_64"
PATCHES="cpio-2.10.patch"
PROVIDES="
cpio = $portVersion
cmd:cpio = $portVersion compat >= 2
"
REQUIRES="
haiku >= $haikuVersion
"
BUILD_REQUIRES="
haiku_devel >= $haikuVersion
"
BUILD_PREREQUIRES="
cmd:awk
cmd:make
cmd:gcc
cmd:ld
"
PATCH()
{
sed -i 's/restrict//g' gnu/string.in.h
}
BUILD()
{
# TODO: The patch already contains a fix for libnetwork not being auto-detected,
# but rebuilding the build system seems to be severely broken for gnulib (gnu/).
# Maybe the included gnulib needs to be replaced by a newer version.
# libtoolize --force --copy --install
# aclocal
# autoconf
LIBS=-lnetwork runConfigure ./configure
make $jobArgs
}
INSTALL()
{
make install
rm $libDir/charset.alias
}
TEST()
{
make check
}

View File

@@ -13,7 +13,7 @@ on machines with a different byte-order.
" "
HOMEPAGE="http://www.gnu.org/software/cpio/cpio.html" HOMEPAGE="http://www.gnu.org/software/cpio/cpio.html"
REVISION="1" REVISION="1"
ARCHITECTURES="x86_gcc2" ARCHITECTURES="x86_gcc2 x86 x86_64"
SRC_URI="http://ftp.gnu.org/gnu/cpio/cpio-2.11.tar.gz" SRC_URI="http://ftp.gnu.org/gnu/cpio/cpio-2.11.tar.gz"
CHECKSUM_SHA256="601b1d774cd6e4cd39416203c91ec59dbd65dd27d79d75e1a9b89497ea643978" CHECKSUM_SHA256="601b1d774cd6e4cd39416203c91ec59dbd65dd27d79d75e1a9b89497ea643978"

View File

@@ -1,50 +0,0 @@
diff -urN cpio-2.10/configure.ac cpio-2.10-haiku/configure.ac
--- cpio-2.10/configure.ac 2009-06-20 08:28:11.000000000 +0000
+++ cpio-2.10-haiku/configure.ac 2009-10-19 00:10:13.000000000 +0000
@@ -44,6 +44,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.10/gnu/hash.c cpio-2.10-haiku/gnu/hash.c
--- cpio-2.10/gnu/hash.c 2009-06-19 09:11:54.000000000 +0000
+++ cpio-2.10-haiku/gnu/hash.c 2009-10-19 00:32:02.000000000 +0000
@@ -491,6 +491,7 @@
check_tuning (Hash_table *table)
{
const Hash_tuning *tuning = table->tuning;
+ float epsilon = 0.1f;
if (tuning == &default_tuning)
return true;
@@ -499,7 +500,6 @@
fail to grow or shrink as they should. The smallest allocation
is 11 (due to next_prime's algorithm), so an epsilon of 0.1
should be good enough. */
- float epsilon = 0.1f;
if (epsilon < tuning->growth_threshold
&& tuning->growth_threshold < 1 - epsilon
--- cpio-2.10/src/makepath.c 2009-10-19 00:45:54.000000000 +0000
+++ cpio-2.10-haiku/src/makepath.c 2009-02-14 18:15:50.000000000 +0000
@@ -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, '/')))