check for BIG_ENDIAN machines without a static list (that could become
wrong when new arches/ports are added to OpenBSD).  Of course it would
even be better if the software itself would detect the endianess, there
is a C header file machine/endian.h that can be used for that.

ok?  comments?

Index: archivers/unrar/Makefile
===================================================================
RCS file: /cvs/ports/archivers/unrar/Makefile,v
retrieving revision 1.30
diff -u -r1.30 Makefile
--- archivers/unrar/Makefile    18 Dec 2006 09:06:15 -0000      1.30
+++ archivers/unrar/Makefile    18 Dec 2006 10:54:15 -0000
@@ -3,7 +3,7 @@
 COMMENT=       "extract, list, and test RAR archives"
 
 DISTNAME=      unrarsrc-3.6.8
-PKGNAME=       unrar-3.68
+PKGNAME=       unrar-3.68p0
 CATEGORIES=    archivers
 
 HOMEPAGE=      http://www.rarlab.com/
@@ -24,9 +24,9 @@
 MAKE_FILE=     makefile.unix
 MAKE_FLAGS=    CXX="${CXX}" CXXFLAGS="${CXXFLAGS}"
 
-.if ${MACHINE_ARCH} != "alpha" && ${MACHINE_ARCH} != "amd64" && \
-    ${MACHINE_ARCH} != "arm" && ${MACHINE_ARCH} != "i386" && \
-    ${MACHINE_ARCH} != "vax"
+BYTEORDER!=sysctl -n hw.byteorder
+
+.if ${BYTEORDER} == "4321"
 CFLAGS+= -DBIG_ENDIAN
 .endif

Reply via email to