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.

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