Right now p7zip fails to build on several archs, because of the rather
lame approach to endianness taken by this port.  This patch should allow
to build p7zip on all archs supported by OpenBSD.

ok?

Index: Makefile
===================================================================
RCS file: /cvs/ports/archivers/p7zip/Makefile,v
retrieving revision 1.25
diff -u -p -r1.25 Makefile
--- Makefile    21 Oct 2015 10:45:08 -0000      1.25
+++ Makefile    11 Nov 2015 23:32:22 -0000
@@ -6,6 +6,7 @@ COMMENT-main=   file archiver with high co
 COMMENT-rar=   rar modules for p7zip
 
 V=             15.09
+REVISION=      0
 DISTNAME=      p7zip_${V}_src_all
 PKGNAME=       p7zip-${V}
 PKGNAME-main=  p7zip-${V}
Index: patches/patch-C_CpuArch_h
===================================================================
RCS file: patches/patch-C_CpuArch_h
diff -N patches/patch-C_CpuArch_h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-C_CpuArch_h   11 Nov 2015 23:32:22 -0000
@@ -0,0 +1,31 @@
+$OpenBSD$
+
+Add support for more OpenBSD architectures.
+
+--- C/CpuArch.h.orig   Sun Sep 27 21:31:20 2015
++++ C/CpuArch.h        Thu Nov 12 00:28:15 2015
+@@ -65,7 +65,10 @@ If MY_CPU_LE_UNALIGN is not defined, we don't know abo
+     || defined(__AARCH64EL__) \
+     || defined(__MIPSEL__) \
+     || defined(__MIPSEL) \
+-    || defined(_MIPSEL)
++    || defined(_MIPSEL) \
++    || defined(__alpha__) \
++    || defined(__sh__) \
++    || defined(__vax__)
+   #define MY_CPU_LE
+ #endif
+ 
+@@ -77,7 +80,11 @@ If MY_CPU_LE_UNALIGN is not defined, we don't know abo
+     || defined(__MIPSEB) \
+     || defined(_MIPSEB) \
+     || defined(__m68k__) \
+-    || defined(__s390x__)
++    || defined(__m88k__) \
++    || defined(__s390x__) \
++    || defined(__hppa__) \
++    || defined(__mips64__) \
++    || defined(__sparc__)
+   #define MY_CPU_BE
+ #endif
+ 


-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to