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.

146 lines
4.5 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 - 2013 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. if pkginstalled -f libx11; then
  23. # fix X11 prefix to get correct pkg-config files
  24. echo 'Fixing X11 prefix ...'
  25. for x in $(egrep -rl X11R6 *) ; do sed -i -e "s,usr/X11R6,$(pkgprefix libx11)," $x ; done
  26. QMAKE_INCDIR_X11="$( pkgprefix includedir libx11 )"
  27. QMAKE_LIBDIR_X11="$( pkgprefix libdir libx11 )"
  28. else
  29. var_append confopt ' ' "-no-gui"
  30. fi
  31. # helping the linker to find libraries
  32. QTDIR=$PWD
  33. var_insert LD_LIBRARY_PATH ':' "$QTDIR/lib"
  34. var_insert PATH ':' "$QTDIR/bin"
  35. export QTDIR LD_LIBRARY_PATH PATH
  36. # cat > .qmake.vars <<-EOT
  37. #QMAKE_INCDIR_X11="$QMAKE_INCDIR_X11"
  38. #QMAKE_LIBDIR_X11="$QMAKE_LIBDIR_X11"
  39. #EOT
  40. # cp .qmake.vars{,.sde}
  41. # Somehow config options get removed if using the standard config
  42. # handling. So we use a custom one here.
  43. ./configure $confopt
  44. }
  45. # exporting the proper environment variables in profile.d
  46. pkg_qt4_profiled() {
  47. cat > $root/etc/profile.d/qt4 <<-EOT
  48. QTDIR=/$prefix
  49. QT4DIR=/$prefix
  50. QT41DIR=/$prefix
  51. export QTDIR QT4DIR QT41DIR
  52. EOT
  53. }
  54. 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"
  55. if pkginstalled -f fontconfig; then
  56. var_append CXX_WRAPPER_APPEND ' ' "-I$root/$(pkgprefix includedir fontconfig)"
  57. fi
  58. # What may come from system?
  59. for x in zlib libtiff libpng libmng libjpeg openssl nas sqlite; do
  60. if pkginstalled $x; then
  61. case "$x" in
  62. openssl) y='-openssl' ;;
  63. nas) y='-system-nas-sound' ;;
  64. *) y="-system-$x" ;;
  65. esac
  66. var_append confopt ' ' "$y"
  67. fi
  68. done
  69. # Disable debug information, this interferes with qt4 suffix. With debug
  70. # enabled we end up with 2 sets of executables. One with qt4 suffix and
  71. # one without. As a result we end up with shared files with qt3.
  72. var_append confopt ' ' "-release -no-separate-debug-info"
  73. # use the Open Source Edition
  74. var_append confopt ' ' "-opensource"
  75. # Confirm the license automatically
  76. var_append confopt ' ' "-confirm-license"
  77. # QT3 support is only needed when no installed.
  78. if pkginstalled qt3; then
  79. var_append confopt ' ' "-no-qt3support"
  80. else
  81. var_append confopt ' ' "-qt3support"
  82. fi
  83. # Demos and examples are not needed and only waste precious buildtime.
  84. var_append confopt ' ' "-nomake demos"
  85. var_append confopt ' ' "-nomake examples"
  86. [[ $libdir = *lib64* ]] &&
  87. var_append confopt ' ' '-platform linux-g++-64'
  88. [ "$SDECFG_PKG_QT4_NO_EXCEPTIONS" = "1" ] &&
  89. var_append confopt " " "-no-exceptions"
  90. [ "$SDECFG_PKG_QT4_NO_STL" = "1" ] &&
  91. var_append confopt " " "-no-stl"
  92. # enable QtXmlPatterns by default
  93. var_append confopt ' ' "-xmlpatterns"
  94. # Add database support for all installed databases.
  95. tuples="mysql:mysql postgresql:psql sqlite:sqlite sqlite2:sqlite2"
  96. for tuple in $tuples; do
  97. tuplepkg=${tuple%:*}
  98. tupledriver=${tuple#*:}
  99. if pkginstalled $tuplepkg; then
  100. pkgprefix -t $tuplepkg
  101. var_append confopt " " "-plugin-sql-$tupledriver"
  102. for x in CXX GCC; do
  103. var_append ${x}_WRAPPER_APPEND ' ' "-L$( pkgprefix libdir $tuplepkg )"
  104. done
  105. for x in CXX GCC CPP; do
  106. var_append ${x}_WRAPPER_APPEND ' ' "-I$( pkgprefix includedir $tuplepkg )"
  107. var_append ${x}_WRAPPER_APPEND ' ' "-I$( pkgprefix includedir $tuplepkg )"
  108. done
  109. fi
  110. done
  111. # explicitely use C++ compiler for linking because '-Wl' is not working
  112. # when directly using 'ld'
  113. var_append makeopt ' ' "LINK=$CXX"
  114. var_append makeinstopt ' ' "LINK=$CXX"
  115. hook_add preconf 5 "pkg_qt4_preconf"
  116. hook_add postmake 5 "pkg_qt4_profiled"
  117. #var_append INSTALL_WRAPPER_FILTER '|' "sed -e 's,\(assistant\|designer\|linguist\|lrelease\|lupdate\|moc\|qmake\|uic\)\$,\1-$pkg,'"
  118. createdocs=0
  119. runconf=0