[arch-commits] Commit in mesa/trunk (MesaLib-9.1.4-llvm_fixes-1.patch PKGBUILD)

Jan de Groot jgc at nymeria.archlinux.org
Mon Jul 8 10:16:22 UTC 2013


    Date: Monday, July 8, 2013 @ 12:16:22
  Author: jgc
Revision: 189800

upgpkg: mesa 9.1.4-4

Build with llvm 3.3, add patch from BLFS to fix compilation of Radeon driver

Added:
  mesa/trunk/MesaLib-9.1.4-llvm_fixes-1.patch
Modified:
  mesa/trunk/PKGBUILD

----------------------------------+
 MesaLib-9.1.4-llvm_fixes-1.patch |   72 +++++++++++++++++++++++++++++++++++++
 PKGBUILD                         |   16 +++++---
 2 files changed, 83 insertions(+), 5 deletions(-)

Added: MesaLib-9.1.4-llvm_fixes-1.patch
===================================================================
--- MesaLib-9.1.4-llvm_fixes-1.patch	                        (rev 0)
+++ MesaLib-9.1.4-llvm_fixes-1.patch	2013-07-08 10:16:22 UTC (rev 189800)
@@ -0,0 +1,72 @@
+Submitted By:            Armin K. <krejzi at email dot com>
+Date:                    2013-07-02
+Initial Package Version: 9.1.4
+Upstream Status:         Fixed upstream
+Origin:                  Upstream
+Description:             Fixes building with LLVM 3.3.
+
+--- a/src/gallium/drivers/r600/llvm_wrapper.cpp	2013-03-05 23:54:28.000000000 +0100
++++ b/src/gallium/drivers/r600/llvm_wrapper.cpp	2013-07-02 12:58:39.294793737 +0200
+@@ -1,8 +1,16 @@
+ #include <llvm/ADT/OwningPtr.h>
+ #include <llvm/ADT/StringRef.h>
++#if HAVE_LLVM < 0x0303
+ #include <llvm/LLVMContext.h>
+-#include <llvm/PassManager.h>
+ #include <llvm/Support/IRReader.h>
++#else
++#include <llvm/IR/LLVMContext.h>
++#include <llvm/IR/Module.h>
++#include <llvm/IR/Function.h>
++#include <llvm/IR/DataLayout.h>
++#include <llvm/IRReader/IRReader.h>
++#endif
++#include <llvm/PassManager.h>
+ #include <llvm/Support/MemoryBuffer.h>
+ #include <llvm/Support/SourceMgr.h>
+ #include <llvm/Transforms/IPO.h>
+--- a/src/gallium/drivers/r600/Makefile.am	2013-03-05 23:54:28.000000000 +0100
++++ b/src/gallium/drivers/r600/Makefile.am	2013-07-02 12:58:39.294793737 +0200
+@@ -26,7 +26,8 @@
+ 	-I$(top_srcdir)/src/gallium/drivers/radeon/
+ 
+ AM_CXXFLAGS= \
+-	$(LLVM_CXXFLAGS)
++	$(LLVM_CXXFLAGS) \
++	$(DEFINES)
+ endif
+ 
+ if USE_R600_LLVM_COMPILER
+--- a/src/gallium/drivers/radeon/radeon_llvm_emit.cpp	2013-06-25 23:24:55.000000000 +0200
++++ b/src/gallium/drivers/radeon/radeon_llvm_emit.cpp	2013-07-02 12:58:39.294793737 +0200
+@@ -25,13 +25,21 @@
+  */
+ #include "radeon_llvm_emit.h"
+ 
++#if HAVE_LLVM < 0x0303
+ #include <llvm/LLVMContext.h>
+ #include <llvm/Module.h>
++#include <llvm/DataLayout.h>
++#else
++#include <llvm/IR/LLVMContext.h>
++#include <llvm/IR/Module.h>
++#include <llvm/IR/DataLayout.h>
++#include <llvm/Support/CBindingWrapping.h>
++#endif
++
+ #include <llvm/PassManager.h>
+ #include <llvm/ADT/Triple.h>
+ #include <llvm/Support/FormattedStream.h>
+ #include <llvm/Support/Host.h>
+-#include <llvm/Support/IRReader.h>
+ #include <llvm/Support/SourceMgr.h>
+ #include <llvm/Support/TargetRegistry.h>
+ #include <llvm/Support/TargetSelect.h>
+@@ -39,7 +47,6 @@
+ #include <llvm/Target/TargetMachine.h>
+ #include <llvm/Transforms/Scalar.h>
+ #include <llvm-c/Target.h>
+-#include <llvm/DataLayout.h>
+ 
+ #include <iostream>
+ #include <stdlib.h>

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2013-07-08 09:44:49 UTC (rev 189799)
+++ PKGBUILD	2013-07-08 10:16:22 UTC (rev 189800)
@@ -5,18 +5,25 @@
 pkgbase=mesa
 pkgname=('ati-dri' 'intel-dri' 'nouveau-dri' 'svga-dri' 'mesa' 'mesa-libgl')
 pkgver=9.1.4
-pkgrel=3
+pkgrel=4
 arch=('i686' 'x86_64')
 makedepends=('python2' 'libxml2' 'libx11' 'glproto' 'libdrm' 'dri2proto' 'libxxf86vm' 'libxdamage'
-             'libvdpau' 'wayland' 'llvm-amdgpu-snapshot' 'systemd')
+             'libvdpau' 'wayland' 'llvm' 'systemd')
 url="http://mesa3d.sourceforge.net"
 license=('custom')
 options=('!libtool')
 source=(ftp://ftp.freedesktop.org/pub/mesa/${pkgver}/MesaLib-${pkgver}.tar.bz2
+        MesaLib-9.1.4-llvm_fixes-1.patch
         LICENSE)
 md5sums=('a2c4e25d0e27918bc67f61bae04d0cb8'
+         '57bd9bb4d2bd47f56ea8478bf2c04525'
          '5c65a0fe315dd347e09b1f2826a1df5a')
 
+prepare() {
+    cd ?esa-*
+    patch -Np1 -i ../MesaLib-9.1.4-llvm_fixes-1.patch
+}
+
 build() {
     cd ${srcdir}/?esa-*
 
@@ -44,7 +51,6 @@
     --enable-xa \
     --enable-vdpau \
     # --help
-    # --with-llvm-shared-libs \ # enabling this would force us to move llvm-amdgpu-snapshot from community to extra, delay it until llvm 3.3 / Mesa 9.2/10.0
 
     make
     # fake installation
@@ -102,7 +108,7 @@
 
 package_svga-dri() {
   pkgdesc="Gallium3D VMware guest GL driver"
-  depends=('libdrm' 'expat' 'llvm-amdgpu-lib-snapshot')
+  depends=('libdrm' 'expat' 'llvm-libs')
 
   install -m755 -d ${pkgdir}/usr/lib/xorg/modules/dri
   mv -v ${srcdir}/fakeinstall/usr/lib/xorg/modules/dri/vmwgfx_dri.so ${pkgdir}/usr/lib/xorg/modules/dri/
@@ -116,7 +122,7 @@
 
 package_mesa() {
   pkgdesc="an open-source implementation of the OpenGL specification"
-  depends=('libdrm' 'libvdpau' 'wayland' 'libxxf86vm' 'libxdamage' 'systemd' 'llvm-amdgpu-lib-snapshot')
+  depends=('libdrm' 'libvdpau' 'wayland' 'libxxf86vm' 'libxdamage' 'systemd' 'llvm-libs')
   optdepends=('opengl-man-pages: for the OpenGL API man pages')
   provides=('libglapi' 'osmesa' 'libgbm' 'libgles' 'libegl' 'khrplatform-devel')
   conflicts=('libglapi' 'osmesa' 'libgbm' 'libgles' 'libegl' 'khrplatform-devel')




More information about the arch-commits mailing list