[Nix-dev] Re: [Nix-commits] SVN commit: nix - r28881 - nixpkgs/trunk/pkgs/servers/x11/xorg
shea at shealevy.com
shea at shealevy.com
Mon Aug 29 21:07:36 CEST 2011
Whoops, forgot to give proper credit to
https://trac.macports.org/attachment/ticket/21912/byteswap-osx.patch for
the names of the functions.
> Author: shlevy
> Date: Mon Aug 29 18:58:59 2011
> New Revision: 28881
> URL: https://svn.nixos.org/websvn/nix/?rev=28881&sc=1
>
> Log:
> Get libpciaccess to compile on darwin
>
> The added patch uses the correct byte-conversion functions on Apple
> systems. The library compiles on darwin but is not yet tested.
>
> Added:
> nixpkgs/trunk/pkgs/servers/x11/xorg/libpciaccess-apple.patch
> Modified:
> nixpkgs/trunk/pkgs/servers/x11/xorg/overrides.nix
>
> Added: nixpkgs/trunk/pkgs/servers/x11/xorg/libpciaccess-apple.patch
> ==============================================================================
> --- /dev/null 00:00:00 1970 (empty, because file is newly added)
> +++ nixpkgs/trunk/pkgs/servers/x11/xorg/libpciaccess-apple.patch Mon Aug
> 29 18:58:59 2011 (r28881)
> @@ -0,0 +1,26 @@
> +diff -Naur libpciaccess-0.12.1-orig/src/common_interface.c
> libpciaccess-0.12.1/src/common_interface.c
> +--- libpciaccess-0.12.1-orig/src/common_interface.c 2010-07-12
> 00:32:05.000000000 -0400
> ++++ libpciaccess-0.12.1/src/common_interface.c 2011-08-29
> 00:48:17.000000000 -0400
> +@@ -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>
>
> Modified: nixpkgs/trunk/pkgs/servers/x11/xorg/overrides.nix
> ==============================================================================
> --- nixpkgs/trunk/pkgs/servers/x11/xorg/overrides.nix Mon Aug 29 18:57:35
> 2011 (r28880)
> +++ nixpkgs/trunk/pkgs/servers/x11/xorg/overrides.nix Mon Aug 29 18:58:59
> 2011 (r28881)
> @@ -47,6 +47,10 @@
> buildNativeInputs = [ args.perl ];
> };
>
> + libpciaccess = attrs : attrs // {
> + patches = [ ./libpciaccess-apple.patch ];
> + };
> +
> libX11 = attrs: attrs // {
> preConfigure = setMalloc0ReturnsNullCrossCompiling;
> postInstall =
> _______________________________________________
> nix-commits mailing list
> nix-commits at cs.uu.nl
> http://mail.cs.uu.nl/mailman/listinfo/nix-commits
>
More information about the nix-dev
mailing list