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.

105 lines
3.1 KiB

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