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.3 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../glide3/glide3.conf
  5. # Copyright (C) 2008 - 2009 The OpenSDE Project
  6. # Copyright (C) 2004 - 2006 The T2 SDE Project
  7. # Copyright (C) 1998 - 2003 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. makeinstopt=
  17. libver="3.10.0"
  18. pkgprefix -t libx11
  19. xlibdir=$root$( pkgprefix libdir libx11)
  20. glide_flags="$glide_flags XPATH=$xlibdir"
  21. if [ "$arch" = x86 ]; then
  22. glide_flags="USE_X86=1 USE_3DNOW=1 USE_MMX=1 USE_SSE=1 USE_SSE2=1 TEXUS2=1"
  23. buildloops=4
  24. else
  25. glide_flags="TEXUS2=1"
  26. buildloops=3
  27. fi
  28. glide3_preconf() {
  29. makeopt='-f makefile.linux $glide_flags'
  30. case "$buildloop" in
  31. 1)
  32. hw=h5
  33. ;;
  34. 2)
  35. hw=h3
  36. ;;
  37. 3)
  38. hw=cvg
  39. ;;
  40. 4)
  41. hw=sst1
  42. ;;
  43. esac
  44. if [ "$hw" = h3 -o "$hw" = h5 ]; then
  45. var_append makeopt ' ' "DRI=1"
  46. var_append makeopt ' ' "XPATH=$xlibdir"
  47. fi
  48. var_append makeopt ' ' "FX_GLIDE_HW=\$hw"
  49. }
  50. glide3_install_libs() {
  51. case "$buildloop" in
  52. 1) mv h5/lib/libglide3.so $xlibdir/libglide3-v5.so
  53. ;;
  54. 2) mv h3/lib/libglide3.so $xlibdir/libglide3-v3.so
  55. ;;
  56. 3) mv cvg/lib/libglide3x.so $xlibdir/libglide3-v2.so
  57. ;;
  58. 4) mv sst1/lib/libglide3x.so $xlibdir/libglide3-v1.so
  59. ;;
  60. esac
  61. eval $MAKE -f makefile.linux FX_GLIDE_HW=$hw realclean
  62. }
  63. glide3_install_headers() {
  64. cp swlibs/fxmisc/3dfx.h $includedir
  65. cp h5/glide3/src/g3ext.h $includedir
  66. cp h5/glide3/src/glide.h $includedir
  67. cp h5/glide3/src/glidesys.h $includedir
  68. cp h5/glide3/src/glideutl.h $includedir
  69. cp swlibs/fxmisc/linutil.h $includedir
  70. cp h5/incsrc/sst1vid.h $includedir
  71. cp swlibs/texus2/lib/texus.h $includedir
  72. }
  73. # Make the V2 glide default
  74. glide3_install_links() {
  75. ln -snf libglide3-v2.so $xlibdir/libglide3.so.$libver
  76. ln -snf libglide3.so.$libver $xlibdir/libglide3.so.3
  77. ln -snf libglide3.so.$libver $xlibdir/libglide3.so
  78. }
  79. hook_add preconf 3 "glide3_preconf"
  80. hook_add postmake 4 "glide3_install_headers"
  81. hook_add postmake 5 "glide3_install_libs"
  82. hook_add postmake 6 "glide3_install_links"