Index: dri/Makefile =================================================================== RCS file: /usr/data/bsd/cvs/fbsd/ports/graphics/dri/Makefile,v retrieving revision 1.37 diff -u -r1.37 Makefile --- dri/Makefile 21 Apr 2012 17:03:16 -0000 1.37 +++ dri/Makefile 28 Jun 2012 20:01:08 -0000 @@ -7,6 +7,7 @@ PORTNAME= dri PORTVERSION= ${MESAVERSION} +PORTREVISION= 1 PORTEPOCH= 2 CATEGORIES= graphics @@ -28,4 +29,26 @@ BROKEN= Does not install on ia64 .endif +.if ${ARCH} != "amd64" || ${ARCH} != "i386" +CONFIGURE_ARGS+=--disable-gallium-intel +.endif + +.if ${ARCH} == "amd64" || ${ARCH} == "i386" +PLIST_SUB+= X86="" +.else +PLIST_SUB+= X86="@comment " +.endif + +.if ${ARCH} == "i386" +PLIST_SUB+= I386="" +.else +PLIST_SUB+= I386="@comment " +.endif + +.if ${ARCH} == sparc64 +PLIST_SUB+= SPARC64_NA="@comment " +.else +PLIST_SUB+= SPARC64_NA="" +.endif + .include Index: dri/pkg-plist =================================================================== RCS file: /usr/data/bsd/cvs/fbsd/ports/graphics/dri/pkg-plist,v retrieving revision 1.13 diff -u -r1.13 pkg-plist --- dri/pkg-plist 21 Apr 2012 17:03:16 -0000 1.13 +++ dri/pkg-plist 28 Jun 2012 20:00:37 -0000 @@ -1,20 +1,20 @@ include/GL/internal/dri_interface.h -lib/dri/i810_dri.so -lib/dri/i915_dri.so -lib/dri/i965_dri.so +%%I386%%lib/dri/i810_dri.so +%%X86%%lib/dri/i915_dri.so +%%X86%%lib/dri/i965_dri.so lib/dri/mach64_dri.so -lib/dri/mga_dri.so -%%NEW%%lib/dri/nouveau_vieux_dri.so +%%X86%%ib/dri/mga_dri.so +%%NEW%%%%X86%%lib/dri/nouveau_vieux_dri.so lib/dri/r128_dri.so lib/dri/r200_dri.so lib/dri/r300_dri.so lib/dri/r600_dri.so lib/dri/radeon_dri.so -lib/dri/savage_dri.so -lib/dri/sis_dri.so +%%X86%%lib/dri/savage_dri.so +%%X86%%lib/dri/sis_dri.so lib/dri/swrast_dri.so -lib/dri/tdfx_dri.so -lib/dri/unichrome_dri.so +%%SPARC64_NA%%lib/dri/tdfx_dri.so +%%X86%%lib/dri/unichrome_dri.so libdata/pkgconfig/dri.pc @dirrm lib/dri @dirrmtry include/GL/internal Index: libGL/Makefile =================================================================== RCS file: /usr/data/bsd/cvs/fbsd/ports/graphics/libGL/Makefile,v retrieving revision 1.18 diff -u -r1.18 Makefile --- libGL/Makefile 21 Apr 2012 17:03:16 -0000 1.18 +++ libGL/Makefile 27 Jun 2012 22:05:46 -0000 @@ -21,4 +21,11 @@ cd ${WRKSRC}/src/mesa; ${GMAKE} install-libgl .include "${.CURDIR}/bsd.mesalib.mk" -.include + +.include + +.if ${ARCH} != "amd64" || ${ARCH} != "i386" +CONFIGURE_ARGS+=--disable-gallium-intel +.endif + +.include Index: libGL/bsd.mesalib.mk =================================================================== RCS file: /usr/data/bsd/cvs/fbsd/ports/graphics/libGL/bsd.mesalib.mk,v retrieving revision 1.20 diff -u -r1.20 bsd.mesalib.mk --- libGL/bsd.mesalib.mk 10 Jun 2012 05:47:43 -0000 1.20 +++ libGL/bsd.mesalib.mk 30 Jun 2012 12:49:30 -0000 @@ -53,13 +53,18 @@ --disable-egl .if defined(WITH_NEW_XORG) -EXTRA_PATCHES+= ${PATCHDIR}/extra-mach64_context.h \ +EXTRA_PATCHES+= ${PATCHDIR}/extra-configure \ + ${PATCHDIR}/extra-mach64_context.h \ ${PATCHDIR}/extra-sis_context.h \ ${PATCHDIR}/extra-src-glsl_ir_constant_expression.cpp \ + ${PATCHDIR}/extra-src__gallium__include__pipe__p_config.h \ ${PATCHDIR}/extra-src__mesa__drivers__dri__nouveau__nouveau_array.c \ - ${PATCHDIR}/extra-src__mesa__drivers__dri__nouveau__nouveau_render_t.c + ${PATCHDIR}/extra-src__mesa__drivers__dri__nouveau__nouveau_render_t.c \ + ${PATCHDIR}/extra-src__mesa__drivers__dri__radeon__radeon_span.c .else -EXTRA_PATCHES+= ${PATCHDIR}/extra-src__mesa__x86-64__glapi_x86-64.S \ +EXTRA_PATCHES+= ${PATCHDIR}/extra-configure-old \ + ${PATCHDIR}/extra-mach64_context.h-old \ + ${PATCHDIR}/extra-src__mesa__x86-64__glapi_x86-64.S \ ${PATCHDIR}/extra-src__mesa__x86-64__xform4.S \ ${PATCHDIR}/extra-src__mesa__x86__glapi_x86.S \ ${PATCHDIR}/extra-src__mesa__x86__read_rgba_span_x86.S @@ -110,6 +115,13 @@ ${WRKSRC}/src/glw/Makefile \ ${WRKSRC}/src/mesa/Makefile \ ${WRKSRC}/src/mesa/drivers/dri/Makefile +.if defined(WITH_NEW_XORG) +# replace hardlinks with patched radeon_span.c +.for i in r200 r300 r600 + @${CP} -fp ${WRKSRC}/src/mesa/drivers/dri/radeon/radeon_span.c \ + ${WRKSRC}/src/mesa/drivers/dri/${i}/ +.endfor +.endif .if ${COMPONENT:Mglut} != "" @${REINPLACE_CMD} -e 's|[$$](INSTALL_LIB_DIR)/pkgconfig|${PREFIX}/libdata/pkgconfig|' \ ${WRKSRC}/src/glut/glx/Makefile Index: libGL/files/extra-configure =================================================================== RCS file: libGL/files/extra-configure diff -N libGL/files/extra-configure --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ libGL/files/extra-configure 28 Jun 2012 19:55:29 -0000 @@ -0,0 +1,42 @@ +--- configure.orig 2011-11-17 19:46:34.000000000 +0000 ++++ configure 2012-06-28 12:53:09.000000000 +0000 +@@ -7817,10 +7817,35 @@ + DEFINES="$DEFINES -DGLX_DIRECT_RENDERING" + fi + +- if test "x$DRI_DIRS" = "xyes"; then +- DRI_DIRS="i810 i915 i965 mach64 mga nouveau r128 r200 r300 r600 \ +- radeon tdfx unichrome savage sis swrast" +- fi ++ case "$host_cpu" in ++ x86_64) ++ # i810 is missing because there is no x86-64 system where it ++ # could *ever* be used. ++ if test "x$DRI_DIRS" = "xyes"; then ++ DRI_DIRS="i915 i965 mach64 mga nouveau r128 r200 r300 r600 \ ++ radeon savage tdfx unichrome sis swrast" ++ fi ++ ;; ++ i*86) ++ if test "x$DRI_DIRS" = "xyes"; then ++ DRI_DIRS="i810 i915 i965 mach64 mga nouveau r128 r200 r300 \ ++ r600 radeon savage tdfx unichrome sis swrast" ++ fi ++ ;; ++ powerpc*) ++ # Build only the drivers for cards that exist on PowerPC. ++ # At some point MGA will be added, but not yet. ++ if test "x$DRI_DIRS" = "xyes"; then ++ DRI_DIRS="mach64 r128 r200 r300 r600 radeon tdfx swrast" ++ fi ++ ;; ++ sparc*) ++ # Build only the drivers for cards that exist on SPARC. ++ if test "x$DRI_DIRS" = "xyes"; then ++ DRI_DIRS="mach64 r128 r200 r300 r600 radeon swrast" ++ fi ++ ;; ++ esac + ;; + gnu*) + DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER" Index: libGL/files/extra-configure-old =================================================================== RCS file: libGL/files/extra-configure-old diff -N libGL/files/extra-configure-old --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ libGL/files/extra-configure-old 28 Jun 2012 19:59:22 -0000 @@ -0,0 +1,43 @@ +--- configure.orig 2009-12-22 03:31:30.000000000 +0100 ++++ configure 2012-06-27 19:49:26.000000000 +0200 +@@ -6946,12 +6946,35 @@ + CXXFLAGS="$CXXFLAGS -ansi -pedantic" + fi + +- # ffb and gamma are missing because they have not been converted +- # to use the new interface. +- if test "x$DRI_DIRS" = "xyes"; then +- DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 r600 radeon tdfx \ ++ case "$host_cpu" in ++ x86_64) ++ # i810 is missing because there is no x86-64 system where it ++ # could *ever* be used. ++ if test "x$DRI_DIRS" = "xyes"; then ++ DRI_DIRS="i915 i965 mach64 mga r128 r200 r300 r600 radeon tdfx \ + unichrome savage sis swrast" +- fi ++ fi ++ ;; ++ i*86) ++ if test "x$DRI_DIRS" = "xyes"; then ++ DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 r600 radeon tdfx \ ++ unichrome savage sis swrast" ++ fi ++ ;; ++ powerpc*) ++ # Build only the drivers for cards that exist on PowerPC. ++ # At some point MGA will be added, but not yet. ++ if test "x$DRI_DIRS" = "xyes"; then ++ DRI_DIRS="mach64 r128 r200 r300 r600 radeon tdfx swrast" ++ fi ++ ;; ++ sparc*) ++ # Build only the drivers for cards that exist on SPARC. ++ if test "x$DRI_DIRS" = "xyes"; then ++ DRI_DIRS="mach64 r128 r200 r300 r600 radeon swrast" ++ fi ++ ;; ++ esac + ;; + gnu*) + DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER" Index: libGL/files/extra-mach64_context.h-old =================================================================== RCS file: libGL/files/extra-mach64_context.h-old diff -N libGL/files/extra-mach64_context.h-old --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ libGL/files/extra-mach64_context.h-old 27 Jun 2012 18:12:29 -0000 @@ -0,0 +1,20 @@ +--- src/mesa/drivers/dri/mach64/mach64_context.h.orig 2012-06-27 19:59:32.000000000 +0200 ++++ src/mesa/drivers/dri/mach64/mach64_context.h 2012-06-27 20:08:30.000000000 +0200 +@@ -294,11 +294,14 @@ + #define LE32_OUT( x, y ) do { *(GLuint *)(x) = (y); } while (0) + #define LE32_OUT_FLOAT( x, y ) do { *(GLfloat *)(x) = (y); } while (0) + #else +-#ifndef __OpenBSD__ +-#include +-#else ++#if defined(__OpenBSD__) + #include + #define bswap_32 bswap32 ++#elif defined(__FreeBSD__) ++#include ++#define bswap_32 bswap32 ++#else ++#include + #endif + + #define LE32_IN( x ) bswap_32( *(GLuint *)(x) ) Index: libGL/files/extra-src__gallium__include__pipe__p_config.h =================================================================== RCS file: libGL/files/extra-src__gallium__include__pipe__p_config.h diff -N libGL/files/extra-src__gallium__include__pipe__p_config.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ libGL/files/extra-src__gallium__include__pipe__p_config.h 28 Jun 2012 19:28:10 -0000 @@ -0,0 +1,25 @@ +--- src/gallium/include/pipe/p_config.h.orig 2011-10-15 02:43:58.000000000 +0200 ++++ src/gallium/include/pipe/p_config.h 2012-06-28 21:27:06.000000000 +0200 +@@ -106,6 +106,13 @@ + #endif + #endif + ++#if defined(__sparc__) || defined(__sparc64__) ++#define PIPE_ARCH_SPARC ++#if defined(__sparc64__) ++#define PIPE_ARCH_SPARC_64 ++#endif ++#endif ++ + + /* + * Endian detection. +@@ -133,7 +140,7 @@ + + #if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64) + #define PIPE_ARCH_LITTLE_ENDIAN +-#elif defined(PIPE_ARCH_PPC) || defined(PIPE_ARCH_PPC_64) ++#elif defined(PIPE_ARCH_PPC) || defined(PIPE_ARCH_PPC_64) || defined(PIPE_ARCH_SPARC) || defined(PIPE_ARCH_SPARC_64) + #define PIPE_ARCH_BIG_ENDIAN + #endif + Index: libGL/files/extra-src__mesa__drivers__dri__radeon__radeon_span.c =================================================================== RCS file: libGL/files/extra-src__mesa__drivers__dri__radeon__radeon_span.c diff -N libGL/files/extra-src__mesa__drivers__dri__radeon__radeon_span.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ libGL/files/extra-src__mesa__drivers__dri__radeon__radeon_span.c 28 Jun 2012 19:45:08 -0000 @@ -0,0 +1,15 @@ +--- src/mesa/drivers/dri/radeon/radeon_span.c.orig 2011-07-09 03:37:10.000000000 +0200 ++++ src/mesa/drivers/dri/radeon/radeon_span.c 2012-06-28 21:44:07.000000000 +0200 +@@ -55,7 +55,11 @@ + #include + #define CPU_TO_LE16( x ) bswap_16( x ) + #define LE16_TO_CPU( x ) bswap_16( x ) +-#endif /* __linux__ */ ++#elif defined(__FreeBSD__) ++#include ++#define CPU_TO_LE16( x ) bswap16( x ) ++#define LE16_TO_CPU( x ) bswap16( x ) ++#endif + #else + #define CPU_TO_LE16( x ) ( x ) + #define LE16_TO_CPU( x ) ( x ) Index: libdrm/pkg-plist =================================================================== RCS file: /usr/data/bsd/cvs/fbsd/ports/graphics/libdrm/pkg-plist,v retrieving revision 1.12 diff -u -r1.12 pkg-plist --- libdrm/pkg-plist 24 Jun 2012 17:30:00 -0000 1.12 +++ libdrm/pkg-plist 29 Jun 2012 09:59:40 -0000 @@ -18,21 +18,21 @@ %%NEW%%include/libdrm/drm_sarea.h %%NEW%%include/libdrm/i915_drm.h %%NEW%%%%X86%%include/libdrm/intel_bufmgr.h -%%NEW%%include/libdrm/intel_debug.h +%%NEW%%%%X86%%include/libdrm/intel_debug.h %%NEW%%include/libdrm/mach64_drm.h %%NEW%%include/libdrm/mga_drm.h %%NEW%%include/libdrm/nouveau_drm.h %%NEW%%include/libdrm/nouveau_drmif.h %%NEW%%include/libdrm/r128_drm.h -%%NEW%%include/libdrm/r600_pci_ids.h -%%NEW%%include/libdrm/radeon_bo.h -%%NEW%%include/libdrm/radeon_bo_gem.h -%%NEW%%include/libdrm/radeon_bo_int.h -%%NEW%%include/libdrm/radeon_cs.h -%%NEW%%include/libdrm/radeon_cs_gem.h -%%NEW%%include/libdrm/radeon_cs_int.h +%%NEW%%%%X86%%include/libdrm/r600_pci_ids.h +%%NEW%%%%X86%%include/libdrm/radeon_bo.h +%%NEW%%%%X86%%include/libdrm/radeon_bo_gem.h +%%NEW%%%%X86%%include/libdrm/radeon_bo_int.h +%%NEW%%%%X86%%include/libdrm/radeon_cs.h +%%NEW%%%%X86%%include/libdrm/radeon_cs_gem.h +%%NEW%%%%X86%%include/libdrm/radeon_cs_int.h %%NEW%%include/libdrm/radeon_drm.h -%%NEW%%include/libdrm/radeon_surface.h +%%NEW%%%%X86%%include/libdrm/radeon_surface.h %%NEW%%include/libdrm/savage_drm.h %%NEW%%include/libdrm/sis_drm.h %%NEW%%include/libdrm/via_drm.h @@ -59,16 +59,16 @@ lib/libdrm_nouveau.la lib/libdrm_nouveau.so lib/libdrm_nouveau.so.1 -%%NEW%%lib/libdrm_radeon.la -%%NEW%%lib/libdrm_radeon.so -%%NEW%%lib/libdrm_radeon.so.1 +%%NEW%%%%X86%%lib/libdrm_radeon.la +%%NEW%%%%X86%%lib/libdrm_radeon.so +%%NEW%%%%X86%%lib/libdrm_radeon.so.1 %%NEW%%%%KMS%%lib/libkms.la %%NEW%%%%KMS%%lib/libkms.so %%NEW%%%%KMS%%lib/libkms.so.1 libdata/pkgconfig/libdrm.pc %%X86%%libdata/pkgconfig/libdrm_intel.pc libdata/pkgconfig/libdrm_nouveau.pc -%%NEW%%libdata/pkgconfig/libdrm_radeon.pc +%%NEW%%%%X86%%libdata/pkgconfig/libdrm_radeon.pc %%NEW%%%%KMS%%libdata/pkgconfig/libkms.pc @dirrm include/nouveau %%NEW%%%%KMS%%@dirrm include/libkms