patch-source_Makefile 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. $OpenBSD: patch-source_Makefile,v 1.4 2017/05/27 16:41:41 espie Exp $
  2. Index: source/Makefile
  3. --- source/Makefile.orig
  4. +++ source/Makefile
  5. @@ -215,9 +215,6 @@ ifdef msys
  6. BUILD_LIBPNG = YesPlease
  7. COPY_FONTS = yes
  8. endif
  9. - ifeq ($(shell gcc -v -static -static-libstdc++ 2>&1 | grep 'unrecognized option'),)
  10. - EXTRA_LIBS += -static -static-libgcc -static-libstdc++
  11. - endif
  12. endif
  13. ifeq ($(uname_S),Darwin)
  14. STRIP := strip -x
  15. @@ -325,11 +322,8 @@ endif
  16. #
  17. ifndef NO_APPLE_GCC
  18. ifeq ($(uname_S),Darwin)
  19. -ifneq ($(shell gcc -v 2>&1 | grep Apple),)
  20. -APPLE_GCC = YesPlease
  21. endif
  22. endif
  23. -endif
  24. ifdef WIN32
  25. @@ -511,15 +505,7 @@ ifneq ($(GCC_VER),)
  26. GCC_VER_SUFFIX:=-$(GCC_VER)
  27. endif
  28. -# Attempt to use a full compiler name, to make
  29. -# distcc builds work nicely.
  30. -LMACH := $(shell gcc -dumpmachine)-
  31. -ifeq ($(LMACH),-)
  32. LMACH :=
  33. -endif
  34. -ifeq ($(shell which $(LMACH)gcc$(GCC_VER_SUFFIX) > /dev/null 2> /dev/null && echo "Yes"),)
  35. -LMACH :=
  36. -endif
  37. ifneq ($(FORCE_CC),)
  38. GCC := $(FORCE_CC)
  39. @@ -639,9 +625,9 @@ ifndef BUILD_LUA
  40. BUILD_LUA = yes
  41. endif
  42. else
  43. - ifneq ($(shell $(PKGCONFIG) lua5.1 --exists || echo no),)
  44. - ifneq ($(shell $(PKGCONFIG) lua-5.1 --exists || echo no),)
  45. - ifneq ($(shell $(PKGCONFIG) lua --exists || echo no),)
  46. + ifneq ($(shell $(PKGCONFIG) lua --exists || echo no),)
  47. + ifneq ($(shell $(PKGCONFIG) lua${MODLUA_DEP_VERSION} --exists || echo no),)
  48. + ifneq ($(shell $(PKGCONFIG) lua${MODLUA_DEP_VERSION} --exists || echo no),)
  49. BUILD_LUA = yes
  50. else
  51. ifeq ($(shell $(PKGCONFIG) lua --modversion | head -c 3),5.1)
  52. @@ -651,16 +637,16 @@ ifndef BUILD_LUA
  53. endif
  54. endif
  55. else
  56. - LUA_PACKAGE = lua-5.1
  57. + LUA_PACKAGE = lua${MODLUA_DEP_VERSION}
  58. endif
  59. else
  60. - LUA_PACKAGE = lua5.1
  61. + LUA_PACKAGE = lua${MODLUA_DEP_VERSION}
  62. endif
  63. endif
  64. endif
  65. ifndef BUILD_LUA
  66. ifndef LUA_PACKAGE
  67. - LUA_PACKAGE = lua5.1
  68. + LUA_PACKAGE = lua${MODLUA_DEP_VERSION}
  69. endif
  70. INCLUDES_L += $(shell $(PKGCONFIG) $(LUA_PACKAGE) --cflags-only-I | sed -e 's/-I/-isystem /')
  71. CFLAGS_L += $(shell $(PKGCONFIG) $(LUA_PACKAGE) --cflags-only-other)
  72. @@ -673,7 +659,7 @@ endif
  73. ifndef BUILD_SQLITE
  74. ifeq ($(shell grep -q sqlite3_prepare $(SQLITE_INCLUDE_DIR)/sqlite3.h 2>/dev/null && echo yes),yes)
  75. - # INCLUDES_L += -isystem $(SQLITE_INCLUDE_DIR)
  76. + INCLUDES_L += -isystem $(SQLITE_INCLUDE_DIR)
  77. LIBS += $(SQLITE_LIB)
  78. ifneq ($(shell grep -q sqlite3_prepare_v2 $(SQLITE_INCLUDE_DIR)/sqlite3.h 2>/dev/null && echo yes),yes)
  79. DEFINES_L += -DANCIENT_SQLITE
  80. @@ -1122,51 +1108,6 @@ ifndef NO_OPTIMIZE
  81. endif
  82. endif
  83. endif
  84. -endif
  85. -
  86. -ifdef BUILD_PCRE
  87. -CONTRIBS += pcre
  88. -CONTRIB_LIBS += $(LIBPCRE)
  89. -endif
  90. -ifdef BUILD_FREETYPE
  91. -CONTRIBS += freetype
  92. -CONTRIB_LIBS += $(LIBFREETYPE)
  93. -endif
  94. -ifdef BUILD_LIBPNG
  95. -CONTRIBS += libpng
  96. -CONTRIB_LIBS := $(LIBPNG) $(CONTRIB_LIBS)
  97. -endif
  98. -ifdef BUILD_SDL2
  99. -CONTRIBS += sdl2
  100. -CONTRIB_LIBS := $(LIBSDL2) $(CONTRIB_LIBS)
  101. -ifeq ($(uname_S),Linux)
  102. -LIBS += -ldl -lrt
  103. -endif
  104. -endif
  105. -ifdef BUILD_SDL2IMAGE
  106. -CONTRIBS += sdl2-image
  107. -CONTRIB_LIBS := $(LIBSDL2IMAGE) $(CONTRIB_LIBS)
  108. -endif
  109. -ifdef BUILD_SDL2MIXER
  110. -CONTRIBS += sdl2-mixer
  111. -CONTRIB_LIBS := $(LIBSDL2MIXER) $(CONTRIB_LIBS)
  112. -endif
  113. -ifdef BUILD_ZLIB
  114. -CONTRIBS += zlib
  115. -CONTRIB_LIBS += $(LIBZ)
  116. -endif
  117. -ifdef BUILD_LUA
  118. -ifdef USE_LUAJIT
  119. -CONTRIBS += luajit/src
  120. -CFOTHER_L += -DUSE_LUAJIT
  121. -else
  122. -CONTRIBS += lua/src
  123. -endif
  124. -CONTRIB_LIBS += $(LIBLUA)
  125. -endif
  126. -ifdef BUILD_SQLITE
  127. -CONTRIBS += sqlite
  128. -CONTRIB_LIBS += $(LIBSQLITE)
  129. endif
  130. EXTRA_OBJECTS += version.o