mirror of the now-defunct rocklinux.org
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.

180 lines
5.3 KiB

  1. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  2. #
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. # Please add additional copyright information _after_ the line containing
  5. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  6. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  7. #
  8. # ROCK Linux: rock-src/package/x11/xorg/xf_config.sh
  9. # ROCK Linux is Copyright (C) 1998 - 2005 Clifford Wolf
  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; either version 2 of the License, or
  14. # (at your option) any later version. A copy of the GNU General Public
  15. # License can be found at Documentation/COPYING.
  16. #
  17. # Many people helped and are helping developing ROCK Linux. Please
  18. # have a look at http://www.rocklinux.org/ and the Documentation/TEAM
  19. # file for details.
  20. #
  21. # --- ROCK-COPYRIGHT-NOTE-END ---
  22. # extract and patch base
  23. xf_extract() {
  24. echo "Extracting source (for package version $ver) ..."
  25. for x in $xf_files ; do
  26. tar $taropt $archdir/$x
  27. done
  28. cd xc
  29. for x in $xf_patches ; do
  30. echo "Patching source ($x) ..."
  31. bunzip2 < $archdir/$x | patch -p1 -E
  32. done
  33. }
  34. # extract additional gl* stuff
  35. xf_extract_gl() {
  36. mkdir release ; ln -s ../.. release/xc
  37. tar $taropt $archdir/mangl.tar.bz2
  38. tar $taropt $archdir/manglu.tar.bz2
  39. tar $taropt $archdir/manglx.tar.bz2
  40. rm -rf release
  41. }
  42. # extract the Matrox HALlib (additional TV/DVI out support on x86)
  43. xf_extract_hallib() {
  44. echo "Extracting mgaHALlib (For Matrox (>G400) cards) ..."
  45. tar $taropt $archdir/mgadriver-$mga_version-src.tar.bz2
  46. cp mgadriver-$mga_version-src/4.3.0/mga/HALlib/mgaHALlib.a \
  47. programs/Xserver/hw/xfree86/drivers/mga/HALlib/mgaHALlib.a
  48. rm -rf mgadriver-$mga_version-src
  49. if [[ $arch == "x86" && $arch_machine != "x86_64" ]] ; then
  50. echo "Enabling Matrox HALlib (since this is x86) ..."
  51. cat >> config/cf/host.def << EOT
  52. /* Additinal TC/DVI support since this is x86 */
  53. #define HaveMatroxHal YES
  54. EOT
  55. fi
  56. }
  57. # apply the patches
  58. xf_patch() {
  59. cp -v programs/twm/system.twmrc programs/twm/system.twmrc.orig
  60. for x in $patchfiles ; do
  61. if [ -f $x ] ; then
  62. echo "Apply patch $x ..."
  63. patch -Nf -p1 < $x
  64. fi ; done
  65. find \( -name 'config.guess' -o -name 'config.sub' \) \
  66. -exec chmod +x '{}' ';'
  67. }
  68. # build the World
  69. xf_build() {
  70. eval $MAKE World
  71. cd nls ; eval $MAKE ; cd ..
  72. }
  73. # install the World
  74. xf_install() {
  75. echo "Create /etc/X11 (if it's not already there) ..."
  76. mkdir -p $root/etc/X11
  77. if [ "$arch_sizeof_char_p" = 8 ] ; then
  78. mkdir -p $root/usr/X11R6/lib
  79. ln -s lib $root/usr/X11R6/lib64
  80. fi
  81. eval $MAKE install
  82. eval $MAKE install.man
  83. cd nls ; eval $MAKE install ; cd ..
  84. rm -fv $root/etc/fonts/*.bak
  85. rm -fv $root/usr/X11
  86. rm -fv $root/usr/bin/X11
  87. rm -fv $root/usr/lib/X11
  88. rm -fv $root/usr/include/X11
  89. ln -sv X11R6 $root/usr/X11
  90. ln -sv ../X11/bin $root/usr/bin/X11
  91. ln -sv ../X11/lib/X11 $root/usr/lib/X11
  92. ln -sv ../X11/include/X11 $root/usr/include/X11
  93. mkdir -p $root/usr/X11R6/lib/X11/fonts/TrueType
  94. echo "Copy TWM config files ..."
  95. cp -v programs/twm/system.twmrc.orig \
  96. programs/twm/sample-twmrc/original.twmrc
  97. cp -v programs/twm/sample-twmrc/*.twmrc $root/usr/X11R6/lib/X11/twm/
  98. register_wm twm TWM /usr/X11/bin/twm
  99. echo "Copying default example configs ..."
  100. cp -fv $base/package/x11/${pkg}/xorg.conf.data \
  101. $root/etc/X11/xorg.conf.example
  102. cp -fv $root/etc/X11/xorg.conf{.example,}
  103. cp -fv $base/package/x11/${pkg}/local.conf.data \
  104. $root/etc/fonts/local.conf
  105. echo "Fixing compiled keymaps directory ..."
  106. mkdir -p $root/var/lib/xkb $root/etc/X11/xkb
  107. cp -fu programs/xkbcomp/compiled/README $root/var/lib/xkb
  108. rm -rf $root/etc/X11/xkb/compiled
  109. ln -sf ../../../var/lib/xkb $root/etc/X11/xkb/compiled
  110. echo "Installing xfs init script ..."
  111. install_init xfs $base/package/x11/${pkg}/xfs.init
  112. register_xdm xdm 'X11 dislay manager' /usr/X11R6/bin/xdm
  113. echo "Installing the xdm start script (multiplexer) ..."
  114. cp $confdir/startxdm.sh $root/usr/X11R6/bin/startxdm
  115. chmod +x $root/usr/X11R6/bin/startxdm
  116. echo "Installing X-Windows Setup Script ..."
  117. cp -fv $base/package/x11/${pkg}/stone_mod_${pkg}.sh $root/etc/stone.d/mod_${pkg}.sh
  118. echo "export WINDOWMANAGER=kde" > $root/etc/profile.d/windowmanager
  119. echo "Installing X-Windows Cron Script ..."
  120. cp -fv $base/package/x11/${pkg}/${pkg}.cron \
  121. $root/etc/cron.daily/80-${pkg}
  122. chmod +x $root/etc/cron.daily/80-${pkg}
  123. }
  124. # configure the World
  125. xf_config() {
  126. echo "Configuring X-Windows ..."
  127. cat >> config/cf/host.def << EOT
  128. /* Disable the internal zlib to use the system installed one */
  129. #define HasZlib YES
  130. /* Disable the internal expat library to use the system installed one */
  131. #define HasExpat YES
  132. /* Less warnings with recent gccs ... */
  133. #define DefaultCCOptions -ansi GccWarningOptions
  134. /* Make sure config files are allways installed ... */
  135. #define InstallXinitConfig YES
  136. #define InstallXdmConfig YES
  137. #define InstallFSConfig YES
  138. /* do not install duplicate crap in /etc/X11 */
  139. #define UseSeparateConfDir NO
  140. EOT
  141. if [[ $arch == "x86" && $arch_machine != "x86_64" ]] ; then
  142. echo "Enabling Matrox HALlib (since this is x86) ..."
  143. cat >> config/cf/host.def << EOT
  144. /* Additinal TV/DVI support since this is x86 */
  145. #define HaveMatroxHal YES
  146. EOT
  147. fi
  148. }