aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2005-01-30 21:30:53 +0800
committerpav <pav@FreeBSD.org>2005-01-30 21:30:53 +0800
commit7db4d853a9d91141666bc2f958dbeca53fd55892 (patch)
treeac72ba114c483d4e0417ddc66274887cc91d0b5c
parent049e3d3e2558a5ebbcced69e2a422a980ecf61db (diff)
downloadfreebsd-ports-gnome-7db4d853a9d91141666bc2f958dbeca53fd55892.tar.gz
freebsd-ports-gnome-7db4d853a9d91141666bc2f958dbeca53fd55892.tar.zst
freebsd-ports-gnome-7db4d853a9d91141666bc2f958dbeca53fd55892.zip
- Fix build on sparc64: rework endianness autodetection
PR: ports/76828 Submitted by: Johan van Selst <johans@stack.nl>
-rw-r--r--lang/moscow_ml/Makefile8
-rw-r--r--lang/moscow_ml/files/patch-config::auto_aux::endian.c22
2 files changed, 23 insertions, 7 deletions
diff --git a/lang/moscow_ml/Makefile b/lang/moscow_ml/Makefile
index 0db0aa23fe95..26cc9a07ec60 100644
--- a/lang/moscow_ml/Makefile
+++ b/lang/moscow_ml/Makefile
@@ -27,12 +27,6 @@ USE_PERL5= yes
USE_REINPLACE= yes
MAKE_ENV= LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib"
-.include <bsd.port.pre.mk>
-
-.if ${ARCH} == "sparc64"
-BROKEN= "Configure fails on sparc64"
-.endif
-
post-patch:
${FIND} ${WRKSRC} -name Makefile | ${XARGS} \
${REINPLACE_CMD} -e "s,-O2,${CFLAGS} -I${LOCALBASE}/include,"
@@ -51,4 +45,4 @@ post-install:
if [ -f $${file} ]; then \
$(LN) -sf $${file} $(PREFIX)/bin; fi; done
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/lang/moscow_ml/files/patch-config::auto_aux::endian.c b/lang/moscow_ml/files/patch-config::auto_aux::endian.c
new file mode 100644
index 000000000000..6242749ff309
--- /dev/null
+++ b/lang/moscow_ml/files/patch-config::auto_aux::endian.c
@@ -0,0 +1,22 @@
+--- config/auto-aux/endian.c.orig Fri Jan 21 11:07:13 2000
++++ config/auto-aux/endian.c Sat Jan 29 21:40:20 2005
+@@ -1,3 +1,5 @@
++#include <sys/endian.h>
++
+ main()
+ {
+ long n[2];
+@@ -6,9 +8,11 @@
+ n[0] = 0x41424344;
+ n[1] = 0;
+ p = (char *) n;
+- if (strcmp(p, "ABCD") == 0)
++#if BYTE_ORDER == BIG_ENDIAN
+ exit(0);
+- if (strcmp(p, "DCBA") == 0)
++#elif BYTE_ORDER == LITTLE_ENDIAN
+ exit(1);
++#else
+ exit(2);
++#endif
+ }