summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorjperkin <jperkin@pkgsrc.org>2013-12-21 11:05:23 +0000
committerjperkin <jperkin@pkgsrc.org>2013-12-21 11:05:23 +0000
commit400cd664da03981adfc059c22a5b1ae2e6fd678d (patch)
tree336be31eb59efe31e95ba5c01949976be79e2d4a /sysutils
parentaa7d2b8fda2be70268aa364c712c5a9873bbff4c (diff)
downloadpkgsrc-400cd664da03981adfc059c22a5b1ae2e6fd678d.tar.gz
Add support for Darwin. Patch from nixpkgs.
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/libpciaccess/Makefile4
-rw-r--r--sysutils/libpciaccess/distinfo3
-rw-r--r--sysutils/libpciaccess/patches/patch-src_common__interface.c29
3 files changed, 33 insertions, 3 deletions
diff --git a/sysutils/libpciaccess/Makefile b/sysutils/libpciaccess/Makefile
index 127030b9a80..3a6484b6231 100644
--- a/sysutils/libpciaccess/Makefile
+++ b/sysutils/libpciaccess/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.17 2013/07/21 09:42:40 wiz Exp $
+# $NetBSD: Makefile,v 1.18 2013/12/21 11:05:23 jperkin Exp $
DISTNAME= libpciaccess-0.13.2
CATEGORIES= sysutils x11
@@ -16,7 +16,7 @@ LICENSE= mit AND x11
ONLY_FOR_PLATFORM= FreeBSD-*-i386 NetBSD-*-i386 OpenBSD-*-i386
ONLY_FOR_PLATFORM+= FreeBSD-*-x86_64 NetBSD-*-x86_64 OpenBSD-*-x86_64
ONLY_FOR_PLATFORM+= DragonFly-*-i386 DragonFly-*-x86_64
-ONLY_FOR_PLATFORM+= Linux-*-* SunOS-*-*
+ONLY_FOR_PLATFORM+= Linux-*-* SunOS-*-* Darwin-*-*
ONLY_FOR_PLATFORM+= NetBSD-*-sparc64 NetBSD-*-hppa
GNU_CONFIGURE= yes
diff --git a/sysutils/libpciaccess/distinfo b/sysutils/libpciaccess/distinfo
index ba24746ec1d..cc0bfcb7032 100644
--- a/sysutils/libpciaccess/distinfo
+++ b/sysutils/libpciaccess/distinfo
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.24 2013/08/07 10:12:43 markd Exp $
+$NetBSD: distinfo,v 1.25 2013/12/21 11:05:23 jperkin Exp $
SHA1 (libpciaccess-0.13.2.tar.bz2) = 63df515a4c5d5a339a7c1f9e4baa6543efa3c7da
RMD160 (libpciaccess-0.13.2.tar.bz2) = d02d6be193cbea6a56c08b041c5ef3d3902f330c
Size (libpciaccess-0.13.2.tar.bz2) = 359231 bytes
SHA1 (patch-configure) = 2b1bbc1ccd26372d7f45b0cbcf970823cafc6a7c
+SHA1 (patch-src_common__interface.c) = cac11689864531fa4721e09374ead730bd1691a6
diff --git a/sysutils/libpciaccess/patches/patch-src_common__interface.c b/sysutils/libpciaccess/patches/patch-src_common__interface.c
new file mode 100644
index 00000000000..fed06322383
--- /dev/null
+++ b/sysutils/libpciaccess/patches/patch-src_common__interface.c
@@ -0,0 +1,29 @@
+$NetBSD: patch-src_common__interface.c,v 1.1 2013/12/21 11:05:23 jperkin Exp $
+
+Add Darwin support.
+
+--- src/common_interface.c.orig 2013-07-20 22:54:34.000000000 +0000
++++ src/common_interface.c
+@@ -67,6 +67,22 @@
+ # define HTOLE_32(x) (x)
+ #endif /* Solaris */
+
++#elif defined(__APPLE__)
++
++#include <architecture/byte_order.h>
++
++#if __BYTE_ORDER == __BIG_ENDIAN
++# define LETOH_16(x) OSSwapInt16(x)
++# define HTOLE_16(x) OSSwapInt16(x)
++# define LETOH_32(x) OSSwapInt32(x)
++# define HTOLE_32(x) OSSwapInt32(x)
++#else
++# define LETOH_16(x) (x)
++# define HTOLE_16(x) (x)
++# define LETOH_32(x) (x)
++# define HTOLE_32(x) (x)
++#endif /* darwin */
++
+ #else
+
+ #include <sys/endian.h>