pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/libpciaccess Add support for Darwin. Patch f...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/91ef7c99b38d
branches:  trunk
changeset: 627928:91ef7c99b38d
user:      jperkin <jperkin%pkgsrc.org@localhost>
date:      Sat Dec 21 11:05:23 2013 +0000

description:
Add support for Darwin.  Patch from nixpkgs.

diffstat:

 sysutils/libpciaccess/Makefile                              |   4 +-
 sysutils/libpciaccess/distinfo                              |   3 +-
 sysutils/libpciaccess/patches/patch-src_common__interface.c |  29 +++++++++++++
 3 files changed, 33 insertions(+), 3 deletions(-)

diffs (63 lines):

diff -r 05cd9bfdda29 -r 91ef7c99b38d sysutils/libpciaccess/Makefile
--- a/sysutils/libpciaccess/Makefile    Sat Dec 21 10:51:52 2013 +0000
+++ b/sysutils/libpciaccess/Makefile    Sat Dec 21 11:05:23 2013 +0000
@@ -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 @@
 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 -r 05cd9bfdda29 -r 91ef7c99b38d sysutils/libpciaccess/distinfo
--- a/sysutils/libpciaccess/distinfo    Sat Dec 21 10:51:52 2013 +0000
+++ b/sysutils/libpciaccess/distinfo    Sat Dec 21 11:05:23 2013 +0000
@@ -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 -r 05cd9bfdda29 -r 91ef7c99b38d sysutils/libpciaccess/patches/patch-src_common__interface.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/libpciaccess/patches/patch-src_common__interface.c       Sat Dec 21 11:05:23 2013 +0000
@@ -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>



Home | Main Index | Thread Index | Old Index