Makefile 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. # $OpenBSD: Makefile,v 1.10 2017/05/31 08:10:01 espie Exp $
  2. COMMENT = Enhanced Duke Nukem 3D engine
  3. RDATE = 20160610
  4. RTAG = 5775
  5. DISTNAME = eduke32_src_${RDATE}-${RTAG}
  6. PKGNAME = eduke32-2.0.0.${RTAG}
  7. EXTRACT_SUFX = .tar.xz
  8. CATEGORIES = games x11
  9. REVISION = 0
  10. HOMEPAGE = http://www.eduke32.com/
  11. MAINTAINER = Ryan Freeman <ryan@slipgate.org>
  12. # GPLv2, BUILD license and shareware data
  13. PERMIT_PACKAGE_CDROM = "BUILD engine license is not compatible with GPLv2."
  14. PERMIT_PACKAGE_FTP = "BUILD engine license is not compatible with GPLv2."
  15. PERMIT_DISTFILES_FTP = "BUILD engine license is not compatible with GPLv2."
  16. BUILD_DEPENDS = archivers/unzip \
  17. graphics/gdk-pixbuf2
  18. .if ${MACHINE_ARCH} == "i386"
  19. BUILD_DEPENDS += devel/nasm
  20. .endif
  21. WANTLIB += c m ogg png pthread vorbis vorbisfile vpx z lz4
  22. WANTLIB += SDL2 SDL2_mixer FLAC execinfo ${LIBECXX}
  23. LIB_DEPENDS = archivers/lz4 \
  24. audio/libvorbis \
  25. audio/flac \
  26. devel/sdl2 \
  27. devel/sdl2-mixer \
  28. devel/libexecinfo \
  29. multimedia/libvpx
  30. # dlopen()'d; shows as Extra in check-lib-depends but it is used
  31. LIB_DEPENDS += x11/gtk+2
  32. WANTLIB += gtk-x11-2.0
  33. RUN_DEPENDS = games/duke3ddata
  34. MASTER_SITES = http://dukeworld.duke4.net/eduke32/synthesis/${RDATE}-${RTAG}/
  35. COMPILER = gcc
  36. # make sure we can see compilation output, respect CC/CXX, don't strip!
  37. MAKE_ENV = PRETTY_OUTPUT=0 \
  38. PACKAGE_REPOSITORY=1
  39. MAKE_FLAGS += CC="${CC}" \
  40. CXX="${CXX}" \
  41. STRIP=true
  42. USE_GMAKE = Yes
  43. NO_TEST = Yes
  44. WRKDIST = ${WRKDIR}/eduke32_${RDATE}-${RTAG}
  45. post-extract:
  46. # check for data files in correct location
  47. @sed -i "s,/usr/share/games/eduke32,${TRUEPREFIX}/share/duke3d," \
  48. ${WRKSRC}/source/common.c
  49. rm ${WRKSRC}/build/include/lz4.h ${WRKSRC}/build/src/lz4.c
  50. do-install:
  51. ${INSTALL_PROGRAM} ${WRKBUILD}/eduke32 ${PREFIX}/bin
  52. ${INSTALL_PROGRAM} ${WRKBUILD}/mapster32 ${PREFIX}/bin
  53. ${INSTALL_DATA_DIR} ${PREFIX}/share/duke3d
  54. ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/eduke32
  55. ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/eduke32
  56. # mapster32 help files
  57. ${INSTALL_DATA} ${WRKDIST}/package/sdk/m32help.hlp \
  58. ${PREFIX}/share/duke3d/
  59. ${INSTALL_DATA} ${WRKDIST}/package/sdk/SEHELP.HLP \
  60. ${PREFIX}/share/duke3d/
  61. ${INSTALL_DATA} ${WRKDIST}/package/sdk/STHELP.HLP \
  62. ${PREFIX}/share/duke3d/
  63. # mapster32 config and config header file
  64. ${INSTALL_DATA} ${WRKDIST}/package/sdk/tiles.cfg \
  65. ${PREFIX}/share/duke3d/
  66. ${INSTALL_DATA} ${WRKDIST}/package/sdk/names.h \
  67. ${PREFIX}/share/duke3d/
  68. # eduke32/mapster32 licenses
  69. ${INSTALL_DATA} ${WRKDIST}/package/common/gpl-2.0.txt \
  70. ${PREFIX}/share/doc/eduke32/
  71. ${INSTALL_DATA} ${WRKDIST}/package/common/buildlic.txt \
  72. ${PREFIX}/share/doc/eduke32/
  73. # sample game mapping/modding data files
  74. ${INSTALL_DATA} ${WRKDIST}/package/sdk/samples/* \
  75. ${PREFIX}/share/examples/eduke32/
  76. .if ${MACHINE_ARCH:Mi386}
  77. CFLAGS += -fno-pie
  78. MAKE_FLAGS += MISCLINKOPTS=-nopie
  79. .endif
  80. .include <bsd.port.mk>
  81. .if ${PROPERTIES:Mclang}
  82. # lto doesn't work with binutils, at all
  83. MAKE_FLAGS += LDFLAGS=-fuse-ld=/usr/bin/ld.lld
  84. # alternately, we could disable LTO
  85. # MAKE_FLAGS += LTO=0
  86. .endif