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.

95 lines
2.8 KiB

  1. #!/bin/sh
  2. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. #
  5. # Filename: package/.../qt/qt.conf
  6. # Copyright (C) 2006 The OpenSDE Project
  7. # Copyright (C) 2004 - 2006 The T2 SDE Project
  8. # Copyright (C) 1998 - 2004 Clifford Wolf
  9. #
  10. # More information can be found in the files COPYING and README.
  11. #
  12. # This program is free software; you can redistribute it and/or modify
  13. # it under the terms of the GNU General Public License as published by
  14. # the Free Software Foundation; version 2 of the License. A copy of the
  15. # GNU General Public License can be found in the file COPYING.
  16. # --- SDE-COPYRIGHT-NOTE-END ---
  17. prefix="${SDECFG_PKG_QT_PREFIX:-opt/qt3}"
  18. set_confopt
  19. qt_preconf() {
  20. QTDIR=$PWD
  21. var_insert LD_LIBRARY_PATH ':' "$QTDIR/lib"
  22. var_insert PATH ':' "$QTDIR/bin"
  23. export QTDIR LD_LIBRARY_PATH PATH
  24. # an optimization crashes g++ during the Makefile generator build :-(
  25. echo "yes" | ( CXX_WRAPPER_BYPASS=1 ; ./configure $confopt )
  26. }
  27. hook_add preconf 5 qt_preconf
  28. # Qt only supports some selected options ...
  29. confopt="-prefix $root/$prefix -bindir $root/$bindir -libdir $root/$libdir \
  30. -thread -qt-gif -system-zlib \
  31. -system-libmng -system-libpng -system-libjpeg -xft -xrender"
  32. [[ $libdir = *lib64* ]] &&
  33. var_append confopt ' ' '-platform linux-g++-64'
  34. [ "$SDECFG_PKG_QT_EXCEPTION_STL" = "0" ] &&
  35. var_append confopt " " "-no-g++-exceptions -no-stl"
  36. if pkginstalled mysql; then
  37. pkgprefix -t mysql
  38. var_append confopt " " "-plugin-sql-mysql"
  39. for x in CXX GCC; do
  40. var_append ${x}_WRAPPER_APPEND ' ' "-L$( pkgprefix libdir mysql)/mysql"
  41. done
  42. for x in CXX GCC CPP; do
  43. var_append ${x}_WRAPPER_APPEND ' ' "-I$( pkgprefix includedir mysql )/mysql"
  44. var_append ${x}_WRAPPER_APPEND ' ' "-I$( pkgprefix includedir mysql )/mysql"
  45. done
  46. fi
  47. if pkginstalled postgresql; then
  48. pkgprefix -t postgresql
  49. var_append confopt " " "-plugin-sql-psql"
  50. for x in CXX GCC; do
  51. var_append ${x}_WRAPPER_APPEND ' ' "-L$( pkgprefix libdir postgresql)"
  52. var_append ${x}_WRAPPER_APPEND ' ' "-L$( pkgprefix libdir postgresql)"
  53. done
  54. for x in CXX GCC CPP; do
  55. var_append ${x}_WRAPPER_APPEND ' ' "-I$( pkgprefix includedir postgresql )/server"
  56. var_append ${x}_WRAPPER_APPEND ' ' "-I$( pkgprefix includedir postgresql )"
  57. done
  58. fi
  59. qt_postmake()
  60. {
  61. # create compatibility links ...
  62. (cd ${root}$libdir/ ; for x in libqt-mt.so* ; do
  63. ln -svf $x ${x/-mt}
  64. done)
  65. echo "Copy some documentation ..."
  66. # to be done in another package: examples extensions tutorial tools ...
  67. cp -r ch* doc/html tutorial $docdir/
  68. find $docdir -name '*.o' | xargs rm -vf
  69. find $docdir -type f -perm +111 | xargs strip -v || true
  70. cat > $root/etc/profile.d/qt3 <<-EOT
  71. QT33DIR=/$prefix
  72. QTDIR=/$prefix
  73. QTLIB=$libdir
  74. export QT33DIR QTDIR QTLIB
  75. EOT
  76. }
  77. hook_add postmake 5 qt_postmake
  78. runconf=0
  79. createdocs=0