OpenSDE Packages Database (without history before r20070)

102 lines
3.1 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../qt/qt.conf
  5. # Copyright (C) 2006 - 2007 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_QT3_PREFIX:-usr}"
  17. if [ "$prefix" = "usr" ]; then
  18. docdir=$docdir/$pkg
  19. fi
  20. set_confopt
  21. qt_preconf() {
  22. QTDIR=$PWD
  23. var_insert LD_LIBRARY_PATH ':' "$QTDIR/lib"
  24. var_insert PATH ':' "$QTDIR/bin"
  25. export QTDIR LD_LIBRARY_PATH PATH
  26. # an optimization crashes g++ during the Makefile generator build :-(
  27. echo "yes" | ( CXX_WRAPPER_BYPASS=1 ; ./configure $confopt )
  28. }
  29. hook_add preconf 5 qt_preconf
  30. # Qt only supports some selected options ...
  31. confopt="-prefix $root/$prefix -bindir $root/$bindir \
  32. -libdir $root/$libdir -docdir $root/$docdir \
  33. -headerdir $root/$includedir/$pkg \
  34. -plugindir $root/$libdir/$pkg/plugins \
  35. -datadir $root/$datadir/$pkg \
  36. -translationdir $root/$datadir/$pkg/translations \
  37. -sysconfdir $root/$sysconfdir -v \
  38. -thread -qt-gif -system-zlib \
  39. -system-libmng -system-libpng -system-libjpeg -xft -xrender"
  40. [[ $libdir = *lib64* ]] &&
  41. var_append confopt ' ' '-platform linux-g++-64'
  42. [ "$SDECFG_PKG_QT3_EXCEPTION_STL" = "0" ] &&
  43. var_append confopt " " "-no-g++-exceptions -no-stl"
  44. if pkginstalled mysql; then
  45. pkgprefix -t mysql
  46. var_append confopt " " "-plugin-sql-mysql"
  47. for x in CXX GCC; do
  48. var_append ${x}_WRAPPER_APPEND ' ' "-L$( pkgprefix libdir mysql)/mysql"
  49. done
  50. for x in CXX GCC CPP; do
  51. var_append ${x}_WRAPPER_APPEND ' ' "-I$( pkgprefix includedir mysql )/mysql"
  52. var_append ${x}_WRAPPER_APPEND ' ' "-I$( pkgprefix includedir mysql )/mysql"
  53. done
  54. fi
  55. if pkginstalled postgresql; then
  56. pkgprefix -t postgresql
  57. var_append confopt " " "-plugin-sql-psql"
  58. for x in CXX GCC; do
  59. var_append ${x}_WRAPPER_APPEND ' ' "-L$( pkgprefix libdir postgresql)"
  60. var_append ${x}_WRAPPER_APPEND ' ' "-L$( pkgprefix libdir postgresql)"
  61. done
  62. for x in CXX GCC CPP; do
  63. var_append ${x}_WRAPPER_APPEND ' ' "-I$( pkgprefix includedir postgresql )/server"
  64. var_append ${x}_WRAPPER_APPEND ' ' "-I$( pkgprefix includedir postgresql )"
  65. done
  66. fi
  67. qt_postmake()
  68. {
  69. # create compatibility links ...
  70. (cd ${root}$libdir/ ; for x in libqt-mt.so* ; do
  71. ln -svf $x ${x/-mt}
  72. done)
  73. echo "Copy some documentation ..."
  74. # to be done in another package: examples extensions tutorial tools ...
  75. cp -r ch* doc/html tutorial $docdir/
  76. find $docdir -name '*.o' | xargs rm -vf
  77. find $docdir -type f -perm +111 | xargs strip -v || true
  78. cat > $root/etc/profile.d/qt3 <<-EOT
  79. QT33DIR=/$prefix
  80. QTDIR=/$prefix
  81. QTLIB=$libdir
  82. export QT33DIR QTDIR QTLIB
  83. EOT
  84. }
  85. hook_add postmake 5 qt_postmake
  86. runconf=0
  87. createdocs=0