aboutsummaryrefslogtreecommitdiff
path: root/devel/distorm
diff options
context:
space:
mode:
authorBrendan Fabeny <bf@FreeBSD.org>2012-02-07 01:44:42 +0000
committerBrendan Fabeny <bf@FreeBSD.org>2012-02-07 01:44:42 +0000
commiteb0848769e4bbce8ff824655885ecf21185c5647 (patch)
treefba5515f6209711d0299f0b2ce7c636d0ea3c99f /devel/distorm
parent6897fe6d9cae5da933f24c0307ec1d8a8edbd9b0 (diff)
Notes
Diffstat (limited to 'devel/distorm')
-rw-r--r--devel/distorm/Makefile6
-rw-r--r--devel/distorm/files/patch-src__config.h54
2 files changed, 56 insertions, 4 deletions
diff --git a/devel/distorm/Makefile b/devel/distorm/Makefile
index 2dc0d1503fee..3b3c5da2b0c1 100644
--- a/devel/distorm/Makefile
+++ b/devel/distorm/Makefile
@@ -7,6 +7,7 @@
PORTNAME?= distorm
DISTVERSION= 20110707-r193
+PORTREVISION?= 1
CATEGORIES= devel
.if defined(PYTHON_SLAVEPORT)
CATEGORIES+= python
@@ -60,14 +61,11 @@ PLIST_FILES= bin/disasm \
.include <bsd.port.pre.mk>
-.if ${ARCH} == "powerpc" || ${ARCH} == "sparc64"
+.if ${ARCH} == "sparc64"
PICFLAG?= -fPIC
.else
PICFLAG?= -fpic
.endif
-.if ${ARCH} == "powerpc"
-BROKEN= Does not compile on powerpc
-.endif
.if defined(PYTHON_SLAVEPORT)
post-extract:
diff --git a/devel/distorm/files/patch-src__config.h b/devel/distorm/files/patch-src__config.h
new file mode 100644
index 000000000000..715f125ce75e
--- /dev/null
+++ b/devel/distorm/files/patch-src__config.h
@@ -0,0 +1,54 @@
+--- src/config.h.orig 2011-06-14 14:58:29.000000000 -0400
++++ src/config.h 2011-12-28 00:17:59.000000000 -0500
+@@ -133,27 +133,51 @@
+ * These functions can read from the stream safely!
+ * Swap endianity of input to little endian.
+ */
++#ifdef __GNUC__
++_INLINE_ int16_t RSHORT(const uint8_t *s)
++#else
+ static _INLINE_ int16_t RSHORT(const uint8_t *s)
++#endif
+ {
+ return s[0] | (s[1] << 8);
+ }
++#ifdef __GNUC__
++_INLINE_ uint16_t RUSHORT(const uint8_t *s)
++#else
+ static _INLINE_ uint16_t RUSHORT(const uint8_t *s)
++#endif
+ {
+ return s[0] | (s[1] << 8);
+ }
++#ifdef __GNUC__
++_INLINE_ int32_t RLONG(const uint8_t *s)
++#else
+ static _INLINE_ int32_t RLONG(const uint8_t *s)
++#endif
+ {
+ return s[0] | (s[1] << 8) | (s[2] << 16) | (s[3] << 24);
+ }
++#ifdef __GNUC__
++_INLINE_ uint32_t RULONG(const uint8_t *s)
++#else
+ static _INLINE_ uint32_t RULONG(const uint8_t *s)
++#endif
+ {
+ return s[0] | (s[1] << 8) | (s[2] << 16) | (s[3] << 24);
+ }
++#ifdef __GNUC__
++_INLINE_ int64_t RLLONG(const uint8_t *s)
++#else
+ static _INLINE_ int64_t RLLONG(const uint8_t *s)
++#endif
+ {
+ return s[0] | (s[1] << 8) | (s[2] << 16) | (s[3] << 24) | ((uint64_t)s[4] << 32) | ((uint64_t)s[5] << 40) | ((uint64_t)s[6] << 48) | ((uint64_t)s[7] << 56);
+ }
++#ifdef __GNUC__
++_INLINE_ uint64_t RULLONG(const uint8_t *s)
++#else
+ static _INLINE_ uint64_t RULLONG(const uint8_t *s)
++#endif
+ {
+ return s[0] | (s[1] << 8) | (s[2] << 16) | (s[3] << 24) | ((uint64_t)s[4] << 32) | ((uint64_t)s[5] << 40) | ((uint64_t)s[6] << 48) | ((uint64_t)s[7] << 56);
+ }