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.

186 lines
6.2 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/blindcoder/nethack/nethack.conf
  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. nethack_premake () {
  23. # yes, we are linux
  24. sed -e 's,^/\* #define LINUX \*/.*,#define LINUX,g' -i include/unixconf.h
  25. # Timed Delay
  26. if [ "$ROCKCFG_PKG_NETHACK_DEL" == "1" ] ; then
  27. sed -e 's,^/\* #define TIMED_DELAY \*/.*,#define TIMED_DELAY,g' -i include/unixconf.h
  28. fi
  29. # Adding source files for UIs
  30. if [ "$ROCKCFG_PKG_NETHACK_TTY" == "0" ] ; then
  31. winsrc=""
  32. winobj=""
  33. winlib=""
  34. else
  35. winsrc='$(WINTTYSRC)'
  36. winobj='$(WINTTYOBJ)'
  37. winlib='$(WINTTYLIB)'
  38. fi
  39. if [ "$ROCKCFG_PKG_NETHACK_X11" == "1" ] ; then
  40. winsrc="$winsrc "'$(WINX11SRC)'
  41. winobj="$winobj "'$(WINX11OBJ)'
  42. winlib="$winlib "'$(WINX11LIB)'
  43. fi
  44. if [ "$ROCKCFG_PKG_NETHACK_QT" == "1" ] ; then
  45. winsrc="$winsrc "'$(WINQTSRC)'
  46. winobj="$winobj "'$(WINQTOBJ)'
  47. winlib="$winlib "'$(WINQTLIB)'
  48. fi
  49. if [ "$ROCKCFG_PKG_NETHACK_GNO" == "1" ] ; then
  50. winsrc="$winsrc "'$(WINGNOMESRC)'
  51. winobj="$winobj "'$(WINGNOMEOBJ)'
  52. winlib="$winlib "'$(WINGNOMELIB)'
  53. fi
  54. sed -e "s,^WINSRC = \$(WINTTYSRC),WINSRC = $winsrc,g" \
  55. -e "s,^WINOBJ = \$(WINTTYOBJ),WINOBJ = $winobj tile.o,g" \
  56. -i src/Makefile
  57. # more common things
  58. sed -e 's,^# WINTTYLIB = -lncurses,WINTTYLIB = -lncurses,g' \
  59. -e 's,^WINTTYLIB = -ltermlib,#WINTTYLIB = -ltermlib,g' \
  60. -i src/Makefile
  61. # Use libXpm?
  62. if [ "$ROCKCFG_PKG_NETHACK_XPM" == "1" ] ; then
  63. sed -e 's,^WINX11LIB = -lXaw -lXmu -lXext -lXt -lX11,WINX11LIB = -L/usr/X11R6/lib -lXaw -lXmu -lXext -lXt -lX11 -lXpm,g' \
  64. -i src/Makefile
  65. fi
  66. # Tiles for Qt
  67. if [ "$ROCKCFG_PKG_NETHACK_QT" == "1" ] ; then
  68. sed -e 's,^VARDATND =,VARDATND = x11tiles rip.xpm nhsplash.xpm pet_mark.xbm,g' \
  69. -i ./Makefile
  70. fi
  71. # more User Interfaces
  72. if [ "$ROCKCFG_PKG_NETHACK_TTY" == "0" ] ; then
  73. sed -e 's,^#define TTY_GRAPHICS,/* #define TTY_GRAPHICS */,g' \
  74. -i include/config.h
  75. fi
  76. if [ "$ROCKCFG_PKG_NETHACK_X11" == "1" ] ; then
  77. sed -e 's,^/\* #define X11_GRAPHICS \*/.*,#define X11_GRAPHICS,g' \
  78. -i include/config.h
  79. fi
  80. if [ "$ROCKCFG_PKG_NETHACK_QT" == "1" ] ; then
  81. sed -e 's,^/\* #define QT_GRAPHICS \*/.*,#define QT_GRAPHICS,g' \
  82. -i include/config.h
  83. fi
  84. if [ "$ROCKCFG_PKG_NETHACK_GNO" == "1" ] ; then
  85. sed -e 's,^/\* #define GNOME_GRAPHICS \*/.*,#define GNOME_GRAPHICS,g' \
  86. -i include/config.h
  87. fi
  88. # Wizard name, logfile, news
  89. sed -e "s,define WIZARD_NAME \"wizard\",define WIZARD_NAME \"$ROCKCFG_PKG_NETHACK_WIZ\",g" \
  90. -e "s,define LOGFILE \"logfile\",define LOGFILE \"$ROCKCFG_PKG_NETHACK_LOG\",g" \
  91. -e "s,define NEWS \"news\", define NEWS \"$ROCKCFG_PKG_NETHACK_NEW\",g" \
  92. -i include/config.h
  93. # Compression
  94. if [ "$ROCKCFG_PKG_NETHACK_USE_COM" == "1" ] ; then
  95. if [ "$ROCKCFG_PKG_NETHACK_COM" != "/usr/bin/compress" ] ; then
  96. sed -e "s,define COMPRESS \"/usr/bin/compress\",define COMPRESS \"$ROCKCFG_PKG_NETHACK_COM\",g" \
  97. -i include/config.h
  98. fi
  99. if [ "$ROCKCFG_PKG_NETHACK_EXT" != ".Z" ] ; then
  100. sed -e "s,define COMPRESS_EXTENSION \".Z\",define COMPRESS_EXTENSION \"$ROCKCFG_PKG_NETHACK_COM_EXT\",g" \
  101. -i include/config.h
  102. fi
  103. else
  104. sed -e 's,#define COMPRESS.*,// #define COMPRESS "/usr/bin/compress",g' \
  105. -e 's,#define COMPRESS_EXTENSION.*, // #define COMPRESS_EXTENSION ".Z",g' \
  106. -i include/config.h
  107. fi
  108. # Hackdir
  109. if [ "$ROCKCFG_PKG_NETHACK_HACKDIR" != "/usr/games/lib/nethackdir" ] ; then
  110. sed -e "s,define HACKDIR \"/usr/games/lib/nethackdir\",define HACKDIR \"$ROCKCFG_PKG_NETHACK_HACKDIR\",g" \
  111. -i include/config.h
  112. fi
  113. # Max number of players
  114. if [ $ROCKCFG_PKG_NETHACK_MAX -gt 0 ] ; then
  115. sed -e "s, \\* #define MAX_NR_OF_PLAYERS 6, * */\\n#define MAX_NR_OF_PLAYERS $ROCKCFG_PKG_NETHACK_MAX\\n/*,g" \
  116. -i include/config.h
  117. fi
  118. # dungeon features
  119. if [ "$ROCKCFG_PKG_NETHACK_SINKS" == "0" ] ; then
  120. sed -e 's,^#define SINKS,/* #define SINKS */,g' \
  121. -i include/config.h
  122. fi
  123. if [ "$ROCKCFG_PKG_NETHACK_MAZES" == "0" ] ; then
  124. sed -e 's,^#define WALLIFIED_MAZE,/* #define WALLIFIED_MAZE */,g' \
  125. -i include/config.h
  126. fi
  127. if [ "$ROCKCFG_PKG_NETHACK_REINCARNATION" == "0" ] ; then
  128. sed -e 's,^#define REINCARNATION,/* #define REINCARNATION */,g' \
  129. -i include/config.h
  130. fi
  131. if [ "$ROCKCFG_PKG_NETHACK_KOPS" == "0" ] ; then
  132. sed -e 's,^#define KOPS,/* #define KOPS */,g' \
  133. -i include/config.h
  134. fi
  135. if [ "$ROCKCFG_PKG_NETHACK_SEDUCE" == "0" ] ; then
  136. sed -e 's,^#define SEDUCE,/* #define SEDUCE */,g' \
  137. -i include/config.h
  138. fi
  139. if [ "$ROCKCFG_PKG_NETHACK_STEED" == "0" ] ; then
  140. sed -e 's,^#define STEED,/* #define STEED */,g' \
  141. -i include/config.h
  142. fi
  143. if [ "$ROCKCFG_PKG_NETHACK_TOURIST" == "0" ] ; then
  144. sed -e 's,^#define TOURIST,/* #define TOURIST */,g' \
  145. -i include/config.h
  146. fi
  147. if [ "$ROCKCFG_PKG_NETHACK_ELBERETH" == "0" ] ; then
  148. sed -e 's,^#define ELBERETH,/* #define ELBERETH */,g' \
  149. -i include/config.h
  150. fi
  151. if [ "$ROCKCFG_PKG_NETHACK_EXP" == "0" ] ; then
  152. sed -e 's,^#define EXP_ON_BOTL,/* #define EXP_ON_BOTL */,g' \
  153. -i include/config.h
  154. fi
  155. if [ "$ROCKCFG_PKG_NETHACK_SCORE" == "1" ] ; then
  156. sed -e 's,^#define SCORE_ON_BOTL,/* #define SCORE_ON_BOTL */,g' \
  157. -i include/config.h
  158. fi
  159. if [ "$ROCKCFG_PKG_NETHACK_GOLD" == "1" ] ; then
  160. sed -e 's,^#define GOLDOBJ,/* #define GOLDOBJ */,g' \
  161. -i include/config.h
  162. fi
  163. }
  164. runconf='0'
  165. prepatch="cd sys/unix/ ; sh setup.sh ; cd ../.."
  166. premake="nethack_premake"