OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

106 lines
3.4 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../qt4/qt4.conf
  5. # Copyright (C) 2006 - 2008 The OpenSDE Project
  6. # Copyright (C) 2004 - 2006 The T2 SDE Project
  7. # Copyright (C) 1998 - 2004 Clifford Wolf
  8. #
  9. # More information can be found in the files COPYING and README.
  10. #
  11. # This program is free software; you can redistribute it and/or modify
  12. # it under the terms of the GNU General Public License as published by
  13. # the Free Software Foundation; version 2 of the License. A copy of the
  14. # GNU General Public License can be found in the file COPYING.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. var_append CXX_WRAPPER_APPEND ' ' "-I$root/$(pkgprefix includedir fontconfig)"
  17. prefix="${SDECFG_PKG_QT4_PREFIX:-usr}"
  18. set_confopt
  19. if [ "$prefix" = "usr" ]; then
  20. datadir=$datadir/$pkg
  21. fi
  22. pkg_qt4_preconf() {
  23. # Somehow config options get removed if using the standard config
  24. # handling. So we use a custom one here.
  25. ./configure $confopt
  26. }
  27. # exporting the proper environment variables in profile.d
  28. pkg_qt4_profiled() {
  29. cat > $root/etc/profile.d/qt4 <<-EOT
  30. QT4DIR=/$prefix
  31. QT41DIR=/$prefix
  32. export QT4DIR QT41DIR
  33. EOT
  34. }
  35. confopt="-prefix $root/$prefix -bindir $root/$bindir -libdir $root/$libdir -docdir $root/$docdir -headerdir $root/$includedir -plugindir $root/$libdir/$pkg/plugins -datadir $root/$datadir -translationdir $root/$datadir/translations -sysconfdir $root/$sysconfdir -v"
  36. # What may come from system?
  37. for x in zlib libtiff libpng libmng libjpeg openssl nas; do
  38. if pkginstalled $x; then
  39. case "$x" in
  40. openssl) y='-openssl' ;;
  41. nas) y='-system-nas-sound' ;;
  42. *) y="-system-$x" ;;
  43. esac
  44. var_append confopt ' ' "$y"
  45. fi
  46. done
  47. # Disable debug information, this interferes with qt4 suffix. With debug
  48. # enabled we end up with 2 sets of executables. One with qt4 suffix and
  49. # one without. As a result we end up with shared files with qt3.
  50. var_append confopt ' ' "-release -no-separate-debug-info"
  51. # Confirm the license automatically
  52. var_append confopt ' ' "-confirm-license"
  53. # QT3 support is only needed when no installed.
  54. if pkginstalled qt3; then
  55. var_append confopt ' ' "-no-qt3support"
  56. else
  57. var_append confopt ' ' "-qt3support"
  58. fi
  59. # Demos and examples are not needed and only waste precious buildtime.
  60. var_append confopt ' ' "-nomake demos"
  61. var_append confopt ' ' "-nomake examples"
  62. [[ $libdir = *lib64* ]] &&
  63. var_append confopt ' ' '-platform linux-g++-64'
  64. [ "$SDECFG_PKG_QT4_EXCEPTION_STL" = "0" ] &&
  65. var_append confopt " " "-no-exceptions -no-stl"
  66. # Add database support for all installed databases.
  67. tuples="mysql:mysql postgresql:psql sqlite:sqlite sqlite2:sqlite2"
  68. for tuple in $tuples; do
  69. tuplepkg=${tuple#:*}
  70. tupledriver=${tuple#*:}
  71. if pkginstalled $tuplepkg; then
  72. kgprefix -t $tuplepkg
  73. var_append confopt " " "-plugin-sql-$tupledriver"
  74. for x in CXX GCC; do
  75. var_append ${x}_WRAPPER_APPEND ' ' "-L$( pkgprefix libdir $tuplepkg )/mysql"
  76. done
  77. for x in CXX GCC CPP; do
  78. var_append ${x}_WRAPPER_APPEND ' ' "-I$( pkgprefix includedir $tuplepkg )/mysql"
  79. var_append ${x}_WRAPPER_APPEND ' ' "-I$( pkgprefix includedir $tuplepkg )/mysql"
  80. done
  81. fi
  82. done
  83. hook_add preconf 5 "pkg_qt4_preconf"
  84. hook_add postmake 5 "pkg_qt4_profiled"
  85. var_append INSTALL_WRAPPER_FILTER '|' "sed -e 's,\(assistant\|designer\|linguist\|lrelease\|lupdate\|moc\|qmake\|uic\)\$,\1-$pkg,'"
  86. createdocs=0
  87. runconf=0