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.

120 lines
3.6 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../seamonkey/mozilla-conf.in
  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. # default prefix for mozilla derivatives
  17. mozilla_prefix=opt/mozilla.org
  18. [ -n "$mozver" ] || mozver="$ver"
  19. # set default homepage and distribution
  20. mozilla_branding() {
  21. local distro="OpenSDE $sdever"
  22. local startpage=http://www.opensde.org/
  23. # set distribution
  24. if [ -f xpfe/global/build.dtd.in ]; then
  25. sed -i "s,0000000000,$distro," xpfe/global/build.dtd.in
  26. fi
  27. # set startpage
  28. find -name region.properties | while read f; do
  29. sed -i \
  30. -e "s,startup.homepage_override_url=.*,startup.homepage_override_url=$startpage," \
  31. -e "s,homePageDefault=.*,homePageDefault=$startpage," \
  32. -e "s,browser.startup.homepage=.*,browser.startup.homepage=$startpage," \
  33. $f
  34. done
  35. }
  36. hook_add preconf 2 "mozilla_branding"
  37. # default configuration for mozilla's derivatives
  38. mozilla_configure() {
  39. cat > .mozconfig <<-EOF
  40. # sh
  41. # Build configuration script
  42. # Options for client.mk.
  43. # mk_add_options MOZ_MAKE_FLAGS=-j4
  44. # Options for 'configure' (same as command-line options).
  45. ac_add_options --prefix=$root/$prefix
  46. ac_add_options --libdir=$root$libdir
  47. ac_add_options --sysconfdir=$root/etc/$pkg
  48. ac_add_options --localstatedir=$root/var
  49. ac_add_options --enable-default-mozilla-five-home
  50. ac_add_options --with-default-mozilla-five-home=$root$libdir/$pkg-$mozver
  51. ac_add_options --host=$arch_target
  52. ac_add_options --disable-debug
  53. ac_add_options --enable-optimize
  54. ac_add_options --disable-dtd-debug
  55. ac_add_options --disable-tests
  56. ac_add_options --disable-logging
  57. ac_add_options --disable-pedantic
  58. ac_add_options --enable-xft
  59. ac_add_options --enable-default-toolkit=gtk2
  60. ac_add_options --with-system-zlib
  61. ac_add_options --with-system-jpeg
  62. ac_add_options --with-system-png
  63. ac_add_options --with-system-mng
  64. ac_add_options --enable-system-cairo
  65. ac_add_options --enable-crypto
  66. export BUILD_OFFICIAL=1
  67. export MOZILLA_OFFICIAL=1
  68. mk_add_options BUILD_OFFICIAL=1
  69. mk_add_options MOZILLA_OFFICIAL=1
  70. EOF
  71. # this is needed due to a bug gcc 4.x
  72. # (see http://benjamin.smedbergs.us/blog/2005-10-27/gcc-40-workaround/)
  73. case $arch in
  74. x86-64|powerpc|powerpc64) # maybe more
  75. echo ac_cv_visibility_pragma=no >> .mozconfig
  76. ;;
  77. esac
  78. [ $arch = powerpc64 ] && var_append GCC_WRAPPER_APPEND ' ' -mminimal-toc
  79. # exports
  80. export MOZILLA_FIVE_HOME=$libdir/$pkg-$mozver
  81. export MOZILLA_OFFICIAL=1 BUILD_OFFICIAL=1
  82. }
  83. mozilla_register() {
  84. echo "Run the component registration ..."
  85. pushd $MOZILLA_FIVE_HOME
  86. LD_LIBRARY_PATH=. ./regxpcom
  87. [ -e ./regchrome ] && LD_LIBRARY_PATH=. ./regchrome
  88. popd
  89. }
  90. makeopt="-f client.mk build"
  91. makeinstopt="install"
  92. # generic configuration
  93. hook_add preconf 1 'mozilla_configure'
  94. # register components
  95. hook_add postmake 5 'mozilla_register'
  96. # cleanups in this fat directory are a bit expensive
  97. nocvsinsrcdir=0
  98. chownsrcdir=0
  99. # distribute this file only with seamonkey
  100. if [ "$pkg" != "seamonkey" ]; then
  101. var_append flist''del '|' ".*/aclocal/nspr\.m4"
  102. fi