WARNING: history from now is going to change (mesa+llvm)
Current WIP, only tested nouveau (3D works very well).
This commit is contained in:
parent
10b79927ba
commit
70882b980c
@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, perl, groff, cmake, python }:
|
||||
{ stdenv, fetchurl, perl, groff, cmake, python, libffi, libcxx }:
|
||||
|
||||
let version = "3.2"; in
|
||||
|
||||
@ -10,11 +10,32 @@ stdenv.mkDerivation {
|
||||
sha256 = "0hv30v5l4fkgyijs56sr1pbrlzgd674pg143x7az2h37sb290l0j";
|
||||
};
|
||||
|
||||
buildInputs = [ perl groff cmake python ];
|
||||
preConfigure = ''
|
||||
patchShebangs .
|
||||
export REQUIRES_RTTI=1
|
||||
'';
|
||||
|
||||
cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" ];
|
||||
# ToDo: polly, libc++; --enable-cxx11?
|
||||
|
||||
configureFlags = [
|
||||
"--enable-shared" # saves half the size, and even more for e.g. mesa
|
||||
"--disable-assertions" "--enable-optimized"
|
||||
"--disable-timestamps" # embedding timestamps seems a danger to purity
|
||||
"--enable-libffi"
|
||||
#"--enable-experimental-targets=r600"
|
||||
#"--enable-libcpp"
|
||||
] ;
|
||||
|
||||
patches = [ ./set_soname.patch ]; # http://llvm.org/bugs/show_bug.cgi?id=12334
|
||||
patchFlags = "-p0";
|
||||
|
||||
buildInputs = [ perl groff python ]
|
||||
#++ [ libcxx ]
|
||||
;
|
||||
propagatedBuildInputs = [ libffi ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
#ToDo: doCheck?
|
||||
|
||||
meta = {
|
||||
homepage = http://llvm.org/;
|
||||
|
@ -16,9 +16,7 @@ stdenv.mkDerivation rec {
|
||||
preConfigure = stdenv.lib.optionalString stdenv.isDarwin
|
||||
"echo : \\\${ac_cv_func_clock_gettime=\'yes\'} > config.cache";
|
||||
|
||||
configureFlags = [ "--enable-nouveau-experimental-api"
|
||||
"--enable-radeon-experimental-api"
|
||||
"--enable-udev" ]
|
||||
configureFlags = [ "--enable-udev" ]
|
||||
++ stdenv.lib.optional stdenv.isDarwin "-C";
|
||||
|
||||
crossAttrs.configureFlags = configureFlags ++ [ "--disable-intel" ];
|
||||
|
@ -1,46 +1,126 @@
|
||||
{ stdenv, fetchurl, flex, bison, pkgconfig, intltool, libdrm, file, expat, makedepend
|
||||
, libXxf86vm, libXfixes, libXdamage, glproto, dri2proto, libX11, libxcb, libXext
|
||||
, libXt, udev, enableTextureFloats ? false, enableR600LlvmCompiler ? false
|
||||
, python, libxml2Python, autoconf, automake, libtool, llvm, writeText
|
||||
, libffi, wayland }:
|
||||
{ stdenv, fetchurl, pkgconfig, intltool, flex, bison, autoconf, automake, libtool
|
||||
, python, libxml2Python, file, expat, makedepend
|
||||
, libdrm, xorg, wayland, udev, llvm, libffi
|
||||
, libvdpau
|
||||
, enableTextureFloats ? false # Texture floats are patented, see docs/patents.txt
|
||||
, enableR600LlvmCompiler ? false
|
||||
}:
|
||||
|
||||
if ! stdenv.lib.lists.elem stdenv.system stdenv.lib.platforms.mesaPlatforms then
|
||||
throw "unsupported platform for Mesa"
|
||||
else
|
||||
|
||||
/** Packaging design:
|
||||
- The basic mesa ($out) contains headers and libraries (GLU is in mesa_glu now).
|
||||
This or the mesa attribute (which also contains GLU) are small (< 3 MB, mostly headers)
|
||||
and are designed to be the buildInput of other packages.
|
||||
- DRI and EGL drivers are compiled into $drivers output,
|
||||
which is bigger (~27 MB) and depends on LLVM (~80 MB).
|
||||
These should be searched at runtime in /run/current-system/sw/lib/*
|
||||
and so are kind-of impure (given by NixOS).
|
||||
(I suppose on non-NixOS one would create the appropriate symlinks from there.)
|
||||
*/
|
||||
|
||||
let
|
||||
version = "9.1.2";
|
||||
extraFeatures = true; # probably doesn't work with false yet
|
||||
driverLink = "/run/opengl-driver" + stdenv.lib.optionalString stdenv.isi686 "-32";
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
name = "mesa-noglu-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "ftp://ftp.freedesktop.org/pub/mesa/${version}/MesaLib-${version}.tar.bz2";
|
||||
sha256="1ns366armqmp2bxj1l7fff95v22b5z9mnkyykbdj81lhg9gi3586";
|
||||
sha256="1ns366armqmp2bxj1l7fff95v22b5z9mnkyykbdj81lhg9gi3586"; # 9.1.2
|
||||
};
|
||||
|
||||
prePatch = "patchShebangs .";
|
||||
|
||||
patches = [
|
||||
./static-gallium.patch
|
||||
./dricore-gallium.patch
|
||||
];
|
||||
|
||||
# Change the search path for EGL drivers from $drivers/* to driverLink
|
||||
postPatch = ''
|
||||
sed '/D_EGL_DRIVER_SEARCH_DIR=/s,EGL_DRIVER_INSTALL_DIR,${driverLink}/lib/egl,' \
|
||||
-i src/egl/main/Makefile.am
|
||||
'';
|
||||
|
||||
outputs = ["out" "drivers"];
|
||||
|
||||
preConfigure = "./autogen.sh";
|
||||
|
||||
configureFlags =
|
||||
""
|
||||
+ " --enable-gles1 --enable-gles2 --enable-gallium-egl"
|
||||
+ " --with-gallium-drivers=i915,nouveau,r300,r600,svga,swrast"
|
||||
+ " --with-egl-platforms=x11,wayland,drm --enable-gbm --enable-shared-glapi"
|
||||
+ stdenv.lib.optionalString enableR600LlvmCompiler " --enable-r600-llvm-compiler"
|
||||
# Texture floats are patented, see docs/patents.txt
|
||||
+ stdenv.lib.optionalString enableTextureFloats " --enable-texture-float";
|
||||
configureFlags = with stdenv.lib; [
|
||||
"--with-dri-driverdir=$(drivers)/lib/dri"
|
||||
"--with-egl-driver-dir=$(drivers)/lib/egl"
|
||||
"--with-dri-searchpath=${driverLink}/lib/dri"
|
||||
|
||||
buildInputs = [
|
||||
autoconf automake libtool intltool expat libxml2Python udev llvm
|
||||
libdrm libXxf86vm libXfixes libXdamage glproto dri2proto libX11 libXext libxcb libXt
|
||||
libffi wayland
|
||||
"--enable-dri"
|
||||
"--enable-glx-tls"
|
||||
"--enable-shared-glapi" "--enable-shared-gallium"
|
||||
"--enable-driglx-direct" # seems enabled anyway
|
||||
"--enable-gallium-llvm" "--with-llvm-shared-libs"
|
||||
|
||||
"--with-dri-drivers=i965,r200,radeon"
|
||||
"--with-gallium-drivers=i915,nouveau,r300,r600,svga,swrast" # radeonsi complains about R600 missing in LLVM
|
||||
"--with-egl-platforms=x11,wayland,drm" "--enable-gbm" "--enable-shared-glapi"
|
||||
]
|
||||
++ optional enableR600LlvmCompiler "--enable-r600-llvm-compiler" # complains about R600 missing in LLVM
|
||||
++ optional enableTextureFloats "--enable-texture-float"
|
||||
++ optionals extraFeatures [
|
||||
"--enable-gles1" "--enable-gles2"
|
||||
"--enable-xa"
|
||||
"--enable-osmesa"
|
||||
"--enable-openvg" "--enable-gallium-egl" # not needed for EGL in Gallium, but OpenVG might be useful
|
||||
#"--enable-xvmc" # tests segfault with 9.1.{1,2}
|
||||
"--enable-vdpau"
|
||||
#"--enable-opencl" # ToDo: opencl seems to need libclc for clover
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ pkgconfig python makedepend file flex bison ];
|
||||
|
||||
buildInputs = with xorg; [
|
||||
autoconf automake libtool intltool expat libxml2Python udev llvm
|
||||
libdrm libXxf86vm libXfixes libXdamage glproto dri2proto libX11 libXext libxcb libXt
|
||||
libffi wayland
|
||||
] ++ stdenv.lib.optionals extraFeatures [ /*libXvMC*/ libvdpau ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
doCheck = true;
|
||||
|
||||
# move gallium-related stuff to $drivers, so $out doesn't depend on LLVM
|
||||
# ToDo: probably not all .la files are completely fixed, but it shouldn't matter
|
||||
postInstall = ''
|
||||
mv -t "$drivers/lib/" \
|
||||
$out/lib/libdricore* \
|
||||
$out/lib/libgallium.* \
|
||||
$out/lib/gallium-pipe \
|
||||
$out/lib/gbm \
|
||||
$out/lib/libxatracker* \
|
||||
`#$out/lib/libXvMC*` \
|
||||
$out/lib/vdpau \
|
||||
$out/lib/libOSMesa*
|
||||
'' + /* now fix references in .la files */ ''
|
||||
sed "/^libdir=/s,$out,$drivers," -i \
|
||||
$drivers/lib/gallium-pipe/*.la \
|
||||
$drivers/lib/libgallium.la \
|
||||
$drivers/lib/libdricore*.la \
|
||||
`#$drivers/lib/libXvMC*.la` \
|
||||
$drivers/lib/vdpau/*.la \
|
||||
$drivers/lib/libOSMesa*.la
|
||||
sed "s,$out\(/lib/\(libdricore[0-9\.]*\|libgallium\).la\),$drivers\1,g" \
|
||||
-i $drivers/lib/*.la $drivers/lib/*/*.la
|
||||
'' + /* work around bug #529, but maybe $drivers should also be patchelf-ed */ ''
|
||||
find $drivers/ -type f -executable -print0 | xargs -0 strip -S || true
|
||||
'' + /* add RPATH so the drivers can find the moved libgallium and libdricore9 */ ''
|
||||
for lib in $drivers/lib/*.so* $drivers/lib/*/*.so*; do
|
||||
if [[ ! -L "$lib" ]]; then
|
||||
patchelf --set-rpath "$(patchelf --print-rpath $lib):$drivers/lib" "$lib"
|
||||
fi
|
||||
done
|
||||
'';
|
||||
#ToDo: @vcunat isn't sure if drirc will be found when in $out/etc/, but it doesn't seem important ATM
|
||||
|
||||
passthru = { inherit libdrm; inherit version; };
|
||||
|
||||
|
216
pkgs/development/libraries/mesa/dricore-gallium.patch
Normal file
216
pkgs/development/libraries/mesa/dricore-gallium.patch
Normal file
@ -0,0 +1,216 @@
|
||||
commit 5208f187c7dade2c33385a56c1a5f1c3cedc8377 (HEAD, nix-patches)
|
||||
Author: Vladimír Čunát <vcunat@gmail.com>
|
||||
Date: Mon May 13 11:34:59 2013 +0200
|
||||
|
||||
118-dricore-gallium.patch
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index be89843..08f6761 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -928,6 +928,8 @@ AC_SUBST([GLESv2_LIB_DEPS])
|
||||
AC_SUBST([GLESv2_PC_LIB_PRIV])
|
||||
|
||||
DRI_LIB_DEPS="\$(top_builddir)/src/mesa/libdricore/libdricore${VERSION}.la"
|
||||
+MESAGALLIUM_LIBS="${DRI_LIB_DEPS}"
|
||||
+AC_SUBST([MESAGALLIUM_LIBS], ${MESAGALLIUM_LIBS})
|
||||
|
||||
AC_SUBST([HAVE_XF86VIDMODE])
|
||||
|
||||
diff --git a/src/gallium/auxiliary/Makefile.am b/src/gallium/auxiliary/Makefile.am
|
||||
index 3cdec83..53ff69b 100644
|
||||
--- a/src/gallium/auxiliary/Makefile.am
|
||||
+++ b/src/gallium/auxiliary/Makefile.am
|
||||
@@ -34,14 +34,14 @@ if LLVM_NEEDS_FNORTTI
|
||||
|
||||
AM_CXXFLAGS += -fno-rtti
|
||||
|
||||
-libgallium_la_LIBADD = $(LLVM_LIBS)
|
||||
-
|
||||
endif
|
||||
|
||||
libgallium_la_SOURCES += \
|
||||
$(GALLIVM_SOURCES) \
|
||||
$(GALLIVM_CPP_SOURCES)
|
||||
|
||||
+libgallium_la_LIBADD = ../../mesa/libdricore/libmesagallium.la $(LLVM_LIBS) $(GALLIUM_DRI_LIB_DEPS)
|
||||
+
|
||||
endif
|
||||
|
||||
indices/u_indices_gen.c: $(srcdir)/indices/u_indices_gen.py
|
||||
diff --git a/src/gallium/targets/dri-i915/Makefile.am b/src/gallium/targets/dri-i915/Makefile.am
|
||||
index f4f9030..e9b9462 100644
|
||||
--- a/src/gallium/targets/dri-i915/Makefile.am
|
||||
+++ b/src/gallium/targets/dri-i915/Makefile.am
|
||||
@@ -49,7 +49,7 @@ i915_dri_la_SOURCES = \
|
||||
i915_dri_la_LDFLAGS = -module -avoid-version -shared -no-undefined
|
||||
|
||||
i915_dri_la_LIBADD = \
|
||||
- $(top_builddir)/src/mesa/libmesagallium.la \
|
||||
+ @MESAGALLIUM_LIBS@ \
|
||||
$(top_builddir)/src/gallium/auxiliary/libgallium.la \
|
||||
$(top_builddir)/src/gallium/state_trackers/dri/drm/libdridrm.la \
|
||||
$(top_builddir)/src/gallium/winsys/i915/drm/libi915drm.la \
|
||||
diff --git a/src/gallium/targets/dri-nouveau/Makefile.am b/src/gallium/targets/dri-nouveau/Makefile.am
|
||||
index 69ccf32..fef4c63 100644
|
||||
--- a/src/gallium/targets/dri-nouveau/Makefile.am
|
||||
+++ b/src/gallium/targets/dri-nouveau/Makefile.am
|
||||
@@ -48,7 +48,7 @@ nouveau_dri_la_SOURCES = \
|
||||
nouveau_dri_la_LDFLAGS = -module -avoid-version -shared -no-undefined
|
||||
|
||||
nouveau_dri_la_LIBADD = \
|
||||
- $(top_builddir)/src/mesa/libmesagallium.la \
|
||||
+ @MESAGALLIUM_LIBS@ \
|
||||
$(top_builddir)/src/gallium/auxiliary/libgallium.la \
|
||||
$(top_builddir)/src/gallium/state_trackers/dri/drm/libdridrm.la \
|
||||
$(top_builddir)/src/gallium/winsys/nouveau/drm/libnouveaudrm.la \
|
||||
diff --git a/src/gallium/targets/dri-r300/Makefile.am b/src/gallium/targets/dri-r300/Makefile.am
|
||||
index 8c0215d..6beb536 100644
|
||||
--- a/src/gallium/targets/dri-r300/Makefile.am
|
||||
+++ b/src/gallium/targets/dri-r300/Makefile.am
|
||||
@@ -49,7 +49,7 @@ r300_dri_la_SOURCES = \
|
||||
r300_dri_la_LDFLAGS = -module -avoid-version -shared -no-undefined
|
||||
|
||||
r300_dri_la_LIBADD = \
|
||||
- $(top_builddir)/src/mesa/libmesagallium.la \
|
||||
+ @MESAGALLIUM_LIBS@ \
|
||||
$(top_builddir)/src/gallium/auxiliary/libgallium.la \
|
||||
$(top_builddir)/src/gallium/state_trackers/dri/drm/libdridrm.la \
|
||||
$(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la \
|
||||
diff --git a/src/gallium/targets/dri-r600/Makefile.am b/src/gallium/targets/dri-r600/Makefile.am
|
||||
index 2b3524b..d40fb89 100644
|
||||
--- a/src/gallium/targets/dri-r600/Makefile.am
|
||||
+++ b/src/gallium/targets/dri-r600/Makefile.am
|
||||
@@ -48,7 +48,7 @@ r600_dri_la_SOURCES = \
|
||||
r600_dri_la_LDFLAGS = -module -avoid-version -shared -no-undefined
|
||||
|
||||
r600_dri_la_LIBADD = \
|
||||
- $(top_builddir)/src/mesa/libmesagallium.la \
|
||||
+ @MESAGALLIUM_LIBS@ \
|
||||
$(top_builddir)/src/gallium/auxiliary/libgallium.la \
|
||||
$(top_builddir)/src/gallium/drivers/r600/libr600.la \
|
||||
$(top_builddir)/src/gallium/state_trackers/dri/drm/libdridrm.la \
|
||||
diff --git a/src/gallium/targets/dri-radeonsi/Makefile.am b/src/gallium/targets/dri-radeonsi/Makefile.am
|
||||
index f7d87a6..87ab2aa 100644
|
||||
--- a/src/gallium/targets/dri-radeonsi/Makefile.am
|
||||
+++ b/src/gallium/targets/dri-radeonsi/Makefile.am
|
||||
@@ -49,7 +49,7 @@ radeonsi_dri_la_SOURCES = \
|
||||
radeonsi_dri_la_LDFLAGS = -module -avoid-version -shared -no-undefined
|
||||
|
||||
radeonsi_dri_la_LIBADD = \
|
||||
- $(top_builddir)/src/mesa/libmesagallium.la \
|
||||
+ @MESAGALLIUM_LIBS@ \
|
||||
$(top_builddir)/src/gallium/auxiliary/libgallium.la \
|
||||
$(top_builddir)/src/gallium/drivers/radeonsi/libradeonsi.la \
|
||||
$(top_builddir)/src/gallium/state_trackers/dri/drm/libdridrm.la \
|
||||
diff --git a/src/gallium/targets/dri-swrast/Makefile.am b/src/gallium/targets/dri-swrast/Makefile.am
|
||||
index 1104379..72d2401 100644
|
||||
--- a/src/gallium/targets/dri-swrast/Makefile.am
|
||||
+++ b/src/gallium/targets/dri-swrast/Makefile.am
|
||||
@@ -49,7 +49,7 @@ swrast_dri_la_SOURCES = \
|
||||
swrast_dri_la_LDFLAGS = -module -avoid-version -shared -no-undefined
|
||||
|
||||
swrast_dri_la_LIBADD = \
|
||||
- $(top_builddir)/src/mesa/libmesagallium.la \
|
||||
+ @MESAGALLIUM_LIBS@ \
|
||||
$(top_builddir)/src/gallium/auxiliary/libgallium.la \
|
||||
$(top_builddir)/src/gallium/state_trackers/dri/sw/libdrisw.la \
|
||||
$(top_builddir)/src/gallium/winsys/sw/dri/libswdri.la \
|
||||
diff --git a/src/gallium/targets/dri-vmwgfx/Makefile.am b/src/gallium/targets/dri-vmwgfx/Makefile.am
|
||||
index ca7df65..4384976 100644
|
||||
--- a/src/gallium/targets/dri-vmwgfx/Makefile.am
|
||||
+++ b/src/gallium/targets/dri-vmwgfx/Makefile.am
|
||||
@@ -48,7 +48,7 @@ vmwgfx_dri_la_SOURCES = \
|
||||
vmwgfx_dri_la_LDFLAGS = -module -avoid-version -shared -no-undefined
|
||||
|
||||
vmwgfx_dri_la_LIBADD = \
|
||||
- $(top_builddir)/src/mesa/libmesagallium.la \
|
||||
+ @MESAGALLIUM_LIBS@ \
|
||||
$(top_builddir)/src/gallium/auxiliary/libgallium.la \
|
||||
$(top_builddir)/src/gallium/state_trackers/dri/drm/libdridrm.la \
|
||||
$(top_builddir)/src/gallium/winsys/svga/drm/libsvgadrm.la \
|
||||
diff --git a/src/gallium/targets/egl-static/Makefile.am b/src/gallium/targets/egl-static/Makefile.am
|
||||
index 5c40ae8..6922ab2 100644
|
||||
--- a/src/gallium/targets/egl-static/Makefile.am
|
||||
+++ b/src/gallium/targets/egl-static/Makefile.am
|
||||
@@ -104,7 +104,7 @@ AM_CPPFLAGS += \
|
||||
$(API_DEFINES)
|
||||
|
||||
egl_gallium_la_LIBADD += \
|
||||
- $(top_builddir)/src/mesa/libmesagallium.la
|
||||
+ @MESAGALLIUM_LIBS@
|
||||
# make st/mesa built-in when there is a single glapi provider
|
||||
if HAVE_SHARED_GLAPI
|
||||
egl_gallium_la_LIBADD += \
|
||||
diff --git a/src/mesa/Makefile.am b/src/mesa/Makefile.am
|
||||
index 41483dd..0045a673 100644
|
||||
--- a/src/mesa/Makefile.am
|
||||
+++ b/src/mesa/Makefile.am
|
||||
@@ -75,9 +75,6 @@ noinst_LTLIBRARIES += libmesa.la
|
||||
else
|
||||
check_LTLIBRARIES = libmesa.la
|
||||
endif
|
||||
-if HAVE_GALLIUM
|
||||
-noinst_LTLIBRARIES += libmesagallium.la
|
||||
-endif
|
||||
|
||||
SRCDIR = $(top_srcdir)/src/mesa/
|
||||
BUILDDIR = $(top_builddir)/src/mesa/
|
||||
@@ -119,15 +116,6 @@ libmesa_la_LIBADD = \
|
||||
$()
|
||||
libmesa_la_LDFLAGS =
|
||||
|
||||
-libmesagallium_la_SOURCES = \
|
||||
- $(MESA_GALLIUM_FILES) \
|
||||
- $(MESA_ASM_FILES_FOR_ARCH)
|
||||
-
|
||||
-libmesagallium_la_LIBADD = \
|
||||
- $(top_builddir)/src/glsl/libglsl.la \
|
||||
- $(top_builddir)/src/mesa/program/libprogram.la \
|
||||
- $()
|
||||
-
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = gl.pc
|
||||
|
||||
diff --git a/src/mesa/libdricore/Makefile.am b/src/mesa/libdricore/Makefile.am
|
||||
index 753548e..8761418 100644
|
||||
--- a/src/mesa/libdricore/Makefile.am
|
||||
+++ b/src/mesa/libdricore/Makefile.am
|
||||
@@ -42,6 +42,7 @@ libdricore@VERSION@_la_SOURCES = \
|
||||
libdricore@VERSION@_la_LDFLAGS = -version-number 1:0
|
||||
libdricore@VERSION@_la_LIBADD = \
|
||||
../program/libdricore_program.la \
|
||||
+ $(top_builddir)/src/mapi/shared-glapi/libglapi.la
|
||||
$()
|
||||
|
||||
if HAVE_X86_ASM
|
||||
@@ -65,8 +66,10 @@ AM_CPPFLAGS += \
|
||||
-I$(top_srcdir)/src/mesa/sparc
|
||||
endif
|
||||
|
||||
+lib_LTLIBRARIES =
|
||||
+
|
||||
if HAVE_DRI
|
||||
-lib_LTLIBRARIES = libdricore@VERSION@.la
|
||||
+lib_LTLIBRARIES += libdricore@VERSION@.la
|
||||
|
||||
# Provide compatibility with scripts for the old Mesa build system for
|
||||
# a while by putting a link to the driver into /lib of the build tree.
|
||||
@@ -76,6 +79,17 @@ all-local: libdricore@VERSION@.la
|
||||
ln -sf libdricore@VERSION@.so.1 $(top_builddir)/$(LIB_DIR)/libdricore@VERSION@.so
|
||||
endif
|
||||
|
||||
+libmesagallium_la_SOURCES = \
|
||||
+ $(STATETRACKER_FILES)
|
||||
+libmesagallium_la_CFLAGS = @LLVM_CFLAGS@
|
||||
+libmesagallium_la_CXXFLAGS = @LLVM_CXXFLAGS@
|
||||
+libmesagallium_la_LIBADD = libdricore@VERSION@.la $(LLVM_LIBS)
|
||||
+
|
||||
+if HAVE_GALLIUM
|
||||
+noinst_LTLIBRARIES = libmesagallium.la
|
||||
+endif
|
||||
+
|
||||
+
|
||||
CLEANFILES = \
|
||||
$(top_builddir)/$(LIB_DIR)/libdricore@VERSION@.so.1 \
|
||||
$(top_builddir)/$(LIB_DIR)/libdricore@VERSION@.so
|
71
pkgs/development/libraries/mesa/static-gallium.patch
Normal file
71
pkgs/development/libraries/mesa/static-gallium.patch
Normal file
@ -0,0 +1,71 @@
|
||||
commit 2c910b6f186616cac8134e2a2cbe239c8351ed99
|
||||
Author: Vladimír Čunát <vcunat@gmail.com>
|
||||
Date: Mon May 13 11:34:34 2013 +0200
|
||||
|
||||
117-static-gallium.patch
|
||||
|
||||
Conflicts (moving of VISIBILITY_ confused the merge):
|
||||
src/gallium/auxiliary/Makefile.am
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index b9fcb0b..be89843 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -747,6 +747,19 @@ if test "x$enable_shared_glapi" = xyes; then
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_SHARED_GLAPI, test "x$enable_shared_glapi" = xyes)
|
||||
|
||||
+AC_ARG_ENABLE([shared-gallium],
|
||||
+ [AS_HELP_STRING([--enable-shared-gallium],
|
||||
+ [Enable shared gallium core @<:@default=yes@:>@])],
|
||||
+ [enable_shared_gallium="$enableval"],
|
||||
+ [enable_shared_gallium=yes])
|
||||
+
|
||||
+SHARED_GALLIUM="0"
|
||||
+if test "x$enable_shared_gallium" = xyes; then
|
||||
+ SHARED_GALLIUM="1"
|
||||
+fi
|
||||
+AC_SUBST([SHARED_GALLIUM])
|
||||
+AM_CONDITIONAL(HAVE_SHARED_GALLIUM, test $SHARED_GALLIUM = 1)
|
||||
+
|
||||
dnl
|
||||
dnl Driver specific build directories
|
||||
dnl
|
||||
diff --git a/src/gallium/auxiliary/Makefile.am b/src/gallium/auxiliary/Makefile.am
|
||||
index f14279b..3cdec83 100644
|
||||
--- a/src/gallium/auxiliary/Makefile.am
|
||||
+++ b/src/gallium/auxiliary/Makefile.am
|
||||
@@ -3,14 +3,19 @@ AUTOMAKE_OPTIONS = subdir-objects
|
||||
include Makefile.sources
|
||||
include $(top_srcdir)/src/gallium/Automake.inc
|
||||
|
||||
-noinst_LTLIBRARIES = libgallium.la
|
||||
-
|
||||
AM_CFLAGS = \
|
||||
-I$(top_srcdir)/src/gallium/auxiliary/util \
|
||||
- $(GALLIUM_CFLAGS) \
|
||||
- $(VISIBILITY_CFLAGS)
|
||||
+ $(GALLIUM_CFLAGS)
|
||||
|
||||
-AM_CXXFLAGS = $(VISIBILITY_CXXFLAGS)
|
||||
+AM_CXXFLAGS =
|
||||
+
|
||||
+if HAVE_SHARED_GALLIUM
|
||||
+lib_LTLIBRARIES = libgallium.la
|
||||
+else
|
||||
+noinst_LTLIBRARIES = libgallium.la
|
||||
+AM_CFLAGS += $(VISIBILITY_CFLAGS)
|
||||
+AM_CXXFLAGS += $(VISIBILITY_CXXFLAGS)
|
||||
+endif
|
||||
|
||||
libgallium_la_SOURCES = \
|
||||
$(C_SOURCES) \
|
||||
@@ -29,6 +34,8 @@ if LLVM_NEEDS_FNORTTI
|
||||
|
||||
AM_CXXFLAGS += -fno-rtti
|
||||
|
||||
+libgallium_la_LIBADD = $(LLVM_LIBS)
|
||||
+
|
||||
endif
|
||||
|
||||
libgallium_la_SOURCES += \
|
@ -1,5 +1,5 @@
|
||||
{ stdenv
|
||||
, fetchgit
|
||||
, fetchurl
|
||||
, autoconf
|
||||
, automake
|
||||
, libtool
|
||||
@ -8,28 +8,22 @@
|
||||
, libdrm
|
||||
, pkgconfig }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "xf86-video-nouveau-2012-03-05";
|
||||
stdenv.mkDerivation rec {
|
||||
name = "xf86-video-nouveau-1.0.7";
|
||||
|
||||
src = fetchgit {
|
||||
url = git://anongit.freedesktop.org/nouveau/xf86-video-nouveau;
|
||||
rev = "f5d1cd2cb6808838ae1a188cef888eaa9582c76d";
|
||||
sha256 = "8c20e9ce7897fbd4c5097e4738e80ecca30e6326b758a13fc97f96ccc12fd7d9";
|
||||
src = fetchurl {
|
||||
url = "mirror://xorg/individual/driver/${name}.tar.bz2";
|
||||
sha256 = "0cg1q9dz9ksfp593x707gr10s8p7z00zdws1r4lshg42w5ccd1yi";
|
||||
};
|
||||
|
||||
|
||||
buildInputs = [
|
||||
autoconf
|
||||
automake
|
||||
libtool
|
||||
xorgserver xproto fontsproto xf86driproto renderproto videoproto pixman
|
||||
utilmacros
|
||||
libdrm
|
||||
pkgconfig
|
||||
];
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-I${pixman}/include/pixman-1";
|
||||
|
||||
preConfigure = "autoreconf -vfi";
|
||||
|
||||
meta = {
|
||||
homepage = http://nouveau.freedesktop.org/wiki/;
|
||||
|
@ -4646,6 +4646,7 @@ let
|
||||
mesaSupported = lib.elem system lib.platforms.mesaPlatforms;
|
||||
|
||||
mesa_noglu = callPackage ../development/libraries/mesa { };
|
||||
mesa_drivers = mesa_noglu.drivers;
|
||||
mesa_glu = callPackage ../development/libraries/mesa-glu { };
|
||||
mesa = if stdenv.isDarwin then darwinX11AndOpenGL
|
||||
else buildEnv {
|
||||
|
Loading…
Reference in New Issue
Block a user