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.

104 lines
3.3 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. prefix="${SDECFG_PKG_QT4_PREFIX:-usr}"
  17. set_confopt
  18. if [ "$prefix" = "usr" ]; then
  19. datadir=$datadir/$pkg
  20. fi
  21. pkg_qt4_preconf() {
  22. # Somehow config options get removed if using the standard config
  23. # handling. So we use a custom one here.
  24. ./configure $confopt
  25. }
  26. # exporting the proper environment variables in profile.d
  27. pkg_qt4_profiled() {
  28. cat > $root/etc/profile.d/qt4 <<-EOT
  29. QT4DIR=/$prefix
  30. QT41DIR=/$prefix
  31. export QT4DIR QT41DIR
  32. EOT
  33. }
  34. 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"
  35. # What may come from system?
  36. for x in zlib libtiff libpng libmng libjpeg openssl nas; do
  37. if pkginstalled $x; then
  38. case "$x" in
  39. openssl) y='-openssl' ;;
  40. nas) y='-system-nas-sound' ;;
  41. *) y="-system-$x" ;;
  42. esac
  43. var_append confopt ' ' "$y"
  44. fi
  45. done
  46. # Disable debug information, this interferes with qt4 suffix. With debug
  47. # enabled we end up with 2 sets of executables. One with qt4 suffix and
  48. # one without. As a result we end up with shared files with qt3.
  49. var_append confopt ' ' "-release -no-separate-debug-info"
  50. # Confirm the license automatically
  51. var_append confopt ' ' "-confirm-license"
  52. # QT3 support is only needed when no installed.
  53. if pkginstalled qt3; then
  54. var_append confopt ' ' "-no-qt3support"
  55. else
  56. var_append confopt ' ' "-qt3support"
  57. fi
  58. # Demos and examples are not needed and only waste precious buildtime.
  59. var_append confopt ' ' "-nomake demos"
  60. var_append confopt ' ' "-nomake examples"
  61. [[ $libdir = *lib64* ]] &&
  62. var_append confopt ' ' '-platform linux-g++-64'
  63. [ "$SDECFG_PKG_QT4_EXCEPTION_STL" = "0" ] &&
  64. var_append confopt " " "-no-exceptions -no-stl"
  65. # Add database support for all installed databases.
  66. tuples="mysql:mysql postgresql:psql sqlite:sqlite sqlite2:sqlite2"
  67. for tuple in $tuples; do
  68. tuplepkg=${tuple#:*}
  69. tupledriver=${tuple#*:}
  70. if pkginstalled $tuplepkg; then
  71. kgprefix -t $tuplepkg
  72. var_append confopt " " "-plugin-sql-$tupledriver"
  73. for x in CXX GCC; do
  74. var_append ${x}_WRAPPER_APPEND ' ' "-L$( pkgprefix libdir $tuplepkg )/mysql"
  75. done
  76. for x in CXX GCC CPP; do
  77. var_append ${x}_WRAPPER_APPEND ' ' "-I$( pkgprefix includedir $tuplepkg )/mysql"
  78. var_append ${x}_WRAPPER_APPEND ' ' "-I$( pkgprefix includedir $tuplepkg )/mysql"
  79. done
  80. fi
  81. done
  82. hook_add preconf 5 "pkg_qt4_preconf"
  83. hook_add postmake 5 "pkg_qt4_profiled"
  84. var_append INSTALL_WRAPPER_FILTER '|' "sed -e 's,\(assistant\|designer\|linguist\|lrelease\|lupdate\|moc\|qmake\|uic\)\$,\1-$pkg,'"
  85. createdocs=0
  86. runconf=0