forked from mirrors/nixpkgs
* Qt: enable OpenGL, Xrandr, Xinerama support.
* MythTV: add OpenGL stuff. svn path=/nixpkgs/trunk/; revision=6520
This commit is contained in:
parent
ea24b2f641
commit
8e5b302403
|
@ -1,4 +1,6 @@
|
|||
{stdenv, fetchurl, which, qt3, x11, libXinerama, libXv, libXxf86vm, libXrandr, lame, zlib}:
|
||||
{ stdenv, fetchurl, which, qt3, x11
|
||||
, libXinerama, libXv, libXxf86vm, libXrandr, libXmu
|
||||
, lame, zlib, mesa}:
|
||||
|
||||
assert qt3.mysqlSupport;
|
||||
|
||||
|
@ -14,6 +16,10 @@ stdenv.mkDerivation {
|
|||
patches = [./settings.patch];
|
||||
configureFlags = "--disable-joystick-menu";
|
||||
|
||||
buildInputs = [which qt3 x11 libXinerama libXv libXxf86vm libXrandr lame zlib];
|
||||
buildInputs = [
|
||||
which qt3 x11 libXinerama libXv libXxf86vm libXrandr libXmu
|
||||
lame zlib mesa
|
||||
];
|
||||
|
||||
inherit qt3;
|
||||
}
|
||||
|
|
|
@ -21,32 +21,9 @@ preConfigure() {
|
|||
|
||||
|
||||
# !!! TODO: -system-libmng
|
||||
configureFlags="-v -prefix $out -system-zlib -system-libpng -system-libjpeg"
|
||||
configureFlags="-prefix $out $configureFlags"
|
||||
dontAddPrefix=1
|
||||
|
||||
if test -n "$threadSupport"; then
|
||||
configureFlags="-thread $configureFlags";
|
||||
else
|
||||
configureFlags="-no-thread $configureFlags";
|
||||
fi
|
||||
|
||||
if test -n "$xftSupport"; then
|
||||
configureFlags="-xft -L$libXft/lib -I$libXft/include \
|
||||
-L$freetype/lib -I$freetype/include \
|
||||
-L$fontconfig/lib -I$fontconfig/include \
|
||||
$configureFlags"
|
||||
fi
|
||||
|
||||
if test -n "$mysqlSupport"; then
|
||||
configureFlags="-qt-sql-mysql -L$mysql/lib/mysql -I$mysql/include/mysql $configureFlags";
|
||||
else
|
||||
configureFlags="-no-thread $configureFlags";
|
||||
fi
|
||||
|
||||
if test -n "$xrenderSupport"; then
|
||||
configureFlags="-xrender -L$libXrender/lib -I$libXrender/include $configureFlags"
|
||||
fi
|
||||
|
||||
configureScript=configureScript
|
||||
configureScript() {
|
||||
echo yes | ./configure $configureFlags
|
||||
|
|
|
@ -1,33 +1,60 @@
|
|||
{ xftSupport ? true
|
||||
, xrenderSupport ? true
|
||||
{ stdenv, fetchurl
|
||||
, xftSupport ? true, libXft ? null
|
||||
, xrenderSupport ? true, libXrender ? null
|
||||
, xrandrSupport ? true, libXrandr ? null, randrproto ? null
|
||||
, xineramaSupport ? true, libXinerama ? null, xineramaproto ? null
|
||||
, threadSupport ? true
|
||||
, mysqlSupport ? true
|
||||
, stdenv, fetchurl, x11, libXft ? null, libXrender ? null, mysql ? null
|
||||
, zlib, libjpeg, libpng, which
|
||||
, mysqlSupport ? true, mysql ? null
|
||||
, openglSupport ? false, mesa ? null, libXmu ? null
|
||||
, x11, zlib, libjpeg, libpng, which
|
||||
}:
|
||||
|
||||
assert xftSupport -> libXft != null;
|
||||
assert xrenderSupport -> xftSupport && libXft != null;
|
||||
assert xrenderSupport -> xftSupport && libXrender != null;
|
||||
assert xrandrSupport -> libXrandr != null && randrproto != null;
|
||||
assert mysqlSupport -> mysql != null;
|
||||
assert openglSupport -> mesa != null && libXmu != null;
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "qt-3.3.5";
|
||||
name = "qt-3.3.6";
|
||||
|
||||
builder = ./builder.sh;
|
||||
substitute = ../../../build-support/substitute/substitute.sh;
|
||||
hook = ./setup-hook.sh;
|
||||
src = fetchurl {
|
||||
url = http://nix.cs.uu.nl/dist/tarballs/qt-x11-free-3.3.5.tar.bz2;
|
||||
md5 = "05d04688c0c0230ed54e89102d689ca4";
|
||||
url = ftp://ftp.trolltech.com/qt/source/qt-x11-free-3.3.6.tar.bz2;
|
||||
md5 = "dc1384c03ac08af21f6fefab32d982cf";
|
||||
};
|
||||
|
||||
buildInputs = [x11 libXft libXrender zlib libjpeg libpng which];
|
||||
|
||||
# Don't strip everything so we can get useful backtraces.
|
||||
patches = [./strip.patch ./qt-pwd.patch];
|
||||
|
||||
inherit threadSupport xftSupport libXft xrenderSupport libXrender;
|
||||
inherit mysqlSupport;
|
||||
mysql = if mysqlSupport then mysql else null;
|
||||
inherit (libXft) freetype fontconfig;
|
||||
configureFlags = "
|
||||
-v
|
||||
-system-zlib -system-libpng -system-libjpeg
|
||||
${if openglSupport then "-dlopen-opengl
|
||||
-L${mesa}/lib -I${mesa}/include
|
||||
-L${libXmu}/lib -I${libXmu}/include" else ""}
|
||||
${if threadSupport then "-thread" else "-no-thread"}
|
||||
${if xrenderSupport then "-xrender -L${libXrender}/lib -I${libXrender}/include" else "-no-xrender"}
|
||||
${if xrandrSupport then "-xrandr
|
||||
-L${libXrandr}/lib -I${libXrandr}/include
|
||||
-I${randrproto}/include" else "-no-xrandr"}
|
||||
${if xineramaSupport then "-xinerama -L${libXinerama}/lib -I${xineramaproto}/include" else "-no-xinerama"}
|
||||
${if mysqlSupport then "-qt-sql-mysql -L${mysql}/lib/mysql -I${mysql}/include/mysql" else ""}
|
||||
${if xftSupport then "-xft
|
||||
-L${libXft}/lib -I${libXft}/include
|
||||
-L${libXft.freetype}/lib -I${libXft.freetype}/include
|
||||
-L${libXft.fontconfig}/lib -I${libXft.fontconfig}/include" else "-no-xft"}
|
||||
";
|
||||
|
||||
patches = [
|
||||
# Don't strip everything so we can get useful backtraces.
|
||||
./strip.patch
|
||||
|
||||
# Build on NixOS.
|
||||
./qt-pwd.patch
|
||||
|
||||
# randr.h and Xrandr.h need not be in the same prefix.
|
||||
./xrandr.patch
|
||||
];
|
||||
}
|
||||
|
|
42
pkgs/development/libraries/qt-3/xrandr.patch
Normal file
42
pkgs/development/libraries/qt-3/xrandr.patch
Normal file
|
@ -0,0 +1,42 @@
|
|||
diff -rc qt-x11-free-3.3.6-orig/config.tests/x11/xrandr.test qt-x11-free-3.3.6/config.tests/x11/xrandr.test
|
||||
*** qt-x11-free-3.3.6-orig/config.tests/x11/xrandr.test 2006-09-14 14:00:08.000000000 +0200
|
||||
--- qt-x11-free-3.3.6/config.tests/x11/xrandr.test 2006-09-14 14:10:39.000000000 +0200
|
||||
***************
|
||||
*** 52,69 ****
|
||||
INCDIRS="$IN_INCDIRS $XDIRS /FOO/include /include"
|
||||
F=
|
||||
for INCDIR in $INCDIRS; do
|
||||
! if [ -f $INCDIR/$INC -a -f $INCDIR/$INC2 ]; then
|
||||
F=yes
|
||||
! XRANDR_H=$INCDIR/$INC
|
||||
RANDR_H=$INCDIR/$INC2
|
||||
! [ "$VERBOSE" = "yes" ] && echo " Found $INC in $INCDIR"
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [ -z "$F" ]
|
||||
then
|
||||
XRANDR=no
|
||||
! [ "$VERBOSE" = "yes" ] && echo " Could not find $INC anywhere in $INCDIRS"
|
||||
fi
|
||||
fi
|
||||
|
||||
--- 52,69 ----
|
||||
INCDIRS="$IN_INCDIRS $XDIRS /FOO/include /include"
|
||||
F=
|
||||
for INCDIR in $INCDIRS; do
|
||||
! if [ -f $INCDIR/$INC2 ]; then
|
||||
F=yes
|
||||
! # XRANDR_H=$INCDIR/$INC
|
||||
RANDR_H=$INCDIR/$INC2
|
||||
! [ "$VERBOSE" = "yes" ] && echo " Found $INC2 in $INCDIR"
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [ -z "$F" ]
|
||||
then
|
||||
XRANDR=no
|
||||
! [ "$VERBOSE" = "yes" ] && echo " Could not find $INC2 anywhere in $INCDIRS"
|
||||
fi
|
||||
fi
|
||||
|
|
@ -1328,8 +1328,10 @@ rec {
|
|||
};
|
||||
|
||||
qt3 = import ../development/libraries/qt-3 {
|
||||
inherit fetchurl stdenv x11 zlib libjpeg libpng which mysql;
|
||||
inherit (xlibs) libXft libXrender;
|
||||
inherit fetchurl stdenv x11 zlib libjpeg libpng which mysql mesa;
|
||||
inherit (xlibs) libXft libXrender libXrandr randrproto
|
||||
libXmu libXinerama xineramaproto;
|
||||
openglSupport = true;
|
||||
};
|
||||
|
||||
kdelibs = import ../development/libraries/kde/kdelibs {
|
||||
|
@ -2428,8 +2430,8 @@ rec {
|
|||
};
|
||||
|
||||
mythtv = (import ../applications/video/mythtv) {
|
||||
inherit fetchurl stdenv which qt3 x11 lame zlib;
|
||||
inherit (xlibs) libXinerama libXv libXxf86vm libXrandr;
|
||||
inherit fetchurl stdenv which qt3 x11 lame zlib mesa;
|
||||
inherit (xlibs) libXinerama libXv libXxf86vm libXrandr libXmu;
|
||||
};
|
||||
|
||||
gqview = (import ../applications/graphics/gqview) {
|
||||
|
|
Loading…
Reference in a new issue