diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2006-09-14 13:24:06 +0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2006-09-14 13:24:06 +0000 |
commit | 8e5b3024035da08c35a394ba33a66a323957d293 (patch) | |
tree | 222d9a420b36abe08ca954f3c4b34092216d5fa7 /pkgs/development/libraries/qt-3 | |
parent | ea24b2f64176707778a4bf17db9e323cde589cf9 (diff) | |
download | nixlib-8e5b3024035da08c35a394ba33a66a323957d293.tar nixlib-8e5b3024035da08c35a394ba33a66a323957d293.tar.gz nixlib-8e5b3024035da08c35a394ba33a66a323957d293.tar.bz2 nixlib-8e5b3024035da08c35a394ba33a66a323957d293.tar.lz nixlib-8e5b3024035da08c35a394ba33a66a323957d293.tar.xz nixlib-8e5b3024035da08c35a394ba33a66a323957d293.tar.zst nixlib-8e5b3024035da08c35a394ba33a66a323957d293.zip |
* Qt: enable OpenGL, Xrandr, Xinerama support.
* MythTV: add OpenGL stuff. svn path=/nixpkgs/trunk/; revision=6520
Diffstat (limited to 'pkgs/development/libraries/qt-3')
-rw-r--r-- | pkgs/development/libraries/qt-3/builder.sh | 25 | ||||
-rw-r--r-- | pkgs/development/libraries/qt-3/default.nix | 59 | ||||
-rw-r--r-- | pkgs/development/libraries/qt-3/xrandr.patch | 42 |
3 files changed, 86 insertions, 40 deletions
diff --git a/pkgs/development/libraries/qt-3/builder.sh b/pkgs/development/libraries/qt-3/builder.sh index f18c0f351b5d..8081d2d547ec 100644 --- a/pkgs/development/libraries/qt-3/builder.sh +++ b/pkgs/development/libraries/qt-3/builder.sh @@ -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 diff --git a/pkgs/development/libraries/qt-3/default.nix b/pkgs/development/libraries/qt-3/default.nix index 1ad77006df59..dd115227c29f 100644 --- a/pkgs/development/libraries/qt-3/default.nix +++ b/pkgs/development/libraries/qt-3/default.nix @@ -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 + ]; } diff --git a/pkgs/development/libraries/qt-3/xrandr.patch b/pkgs/development/libraries/qt-3/xrandr.patch new file mode 100644 index 000000000000..0389c7fdd068 --- /dev/null +++ b/pkgs/development/libraries/qt-3/xrandr.patch @@ -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 + |