summaryrefslogtreecommitdiff
path: root/graphics/icoutils
diff options
context:
space:
mode:
authorMario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>2005-11-27 23:15:47 +0000
committerMario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>2005-11-27 23:15:47 +0000
commit90ce4cdec3ac2391f6ad0f6e2fa646bdecd83c54 (patch)
treec891d0d62f4c16d85f25fbfd39547ef0ea162df9 /graphics/icoutils
parentUpdate to 2.12.2. (diff)
o Add code to use FreeBSD optimized byteswap routines if they're
available; or,fallback to macros if they are not. [1] o Fix build on ${ARCH} == "sparc64" due to (1) o Fix build on ${OSVERSION} < 500000 by USE_GCC=3.4 o Bump PORTREVISION due to (1)
Notes
Notes: svn path=/head/; revision=149699
Diffstat (limited to 'graphics/icoutils')
-rw-r--r--graphics/icoutils/Makefile7
-rw-r--r--graphics/icoutils/files/patch-icotool__win32-endian.c41
2 files changed, 43 insertions, 5 deletions
diff --git a/graphics/icoutils/Makefile b/graphics/icoutils/Makefile
index e9f347e7cfd5..aca9d64594ff 100644
--- a/graphics/icoutils/Makefile
+++ b/graphics/icoutils/Makefile
@@ -7,6 +7,7 @@
PORTNAME= icoutils
PORTVERSION= 0.26.0
+PORTREVISION= 1
CATEGORIES= graphics
MASTER_SITES= ${MASTER_SITE_SAVANNAH}
MASTER_SITE_SUBDIR= ${PORTNAME}
@@ -32,12 +33,8 @@ PLIST_FILES= \
.include <bsd.port.pre.mk>
-.if ${ARCH} == "sparc64"
-BROKEN= "Does not compile on sparc64"
-.endif
-
.if ${OSVERSION} < 500000
-BROKEN= "Does not compile on FreeBSD 4.x"
+USE_GCC=3.4
.endif
.include <bsd.port.post.mk>
diff --git a/graphics/icoutils/files/patch-icotool__win32-endian.c b/graphics/icoutils/files/patch-icotool__win32-endian.c
new file mode 100644
index 000000000000..a33bc5b6fdb5
--- /dev/null
+++ b/graphics/icoutils/files/patch-icotool__win32-endian.c
@@ -0,0 +1,41 @@
+--- icotool/win32-endian.c.orig Sun Nov 27 18:43:33 2005
++++ icotool/win32-endian.c Sun Nov 27 21:05:48 2005
+@@ -17,6 +17,10 @@
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ */
+
++#if (defined(__unix__) || defined(unix)) && !defined(USG)
++#include <sys/param.h>
++#endif
++
+ #include <config.h>
+ #include "win32-endian.h"
+
+@@ -27,6 +31,27 @@
+ #define bswap_16(x) NXSwapShort(x)
+ #define bswap_32(x) NXSwapInt(x)
+ #define bswap_64(x) NXSwapLongLong(x)
++#elif defined(__FreeBSD__) && (__FreeBSD_version >= 470000)
++# include <sys/endian.h>
++# if (__FreeBSD_version >= 500000)
++# define bswap_16(x) bswap16(x)
++# define bswap_32(x) bswap32(x)
++# define bswap_64(x) bswap64(x)
++# else
++# define bswap_16(x) be16toh(x)
++# define bswap_32(x) be32toh(x)
++# define bswap_64(x) \
++ x = ((((x) & 0xff00000000000000) >> 56) | \
++ (((x) & 0x00ff000000000000) >> 40) | \
++ (((x) & 0x0000ff0000000000) >> 24) | \
++ (((x) & 0x000000ff00000000) >> 8) | \
++ (((x) & 0x00000000ff000000) << 8) | \
++ (((x) & 0x0000000000ff0000) << 24) | \
++ (((x) & 0x000000000000ff00) << 40) | \
++ (((x) & 0x00000000000000ff) << 56))
++# endif /* >= 4.7-R || >= 5.0-CURRENT */
++#else
++# include "common/byteswap.h"
+ #endif
+
+ #define BSWAP16(x) ((x) = bswap_16(x))