Makefile 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. # $OpenBSD: Makefile,v 1.68 2017/05/01 16:25:20 jca Exp $
  2. COMMENT= GNU editor: extensible, customizable, self-documenting
  3. VERSION= 25.2
  4. DISTNAME= emacs-${VERSION}
  5. CATEGORIES= editors
  6. HOMEPAGE= https://www.gnu.org/software/emacs/
  7. MAINTAINER= Jeremie Courreges-Anglas <jca@wxcvbn.org>
  8. # GPLv3+
  9. PERMIT_PACKAGE_CDROM= Yes
  10. WANTLIB= c m ncurses pthread gnutls xml2 z
  11. MASTER_SITES= ${MASTER_SITE_GNU:=emacs/}
  12. USE_GMAKE= Yes
  13. FLAVORS= athena gtk2 gtk3 no_x11
  14. FLAVOR?= gtk3
  15. GCCARCH= ${MACHINE_ARCH}-unknown-openbsd
  16. CONFIGURE_STYLE= gnu
  17. MODGNU_CONFIG_GUESS_DIRS=${WRKSRC}/build-aux
  18. CONFIGURE_ARGS= --build="${GCCARCH}" \
  19. --without-sound
  20. CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
  21. LDFLAGS="-L${LOCALBASE}/lib -nopie" \
  22. ac_cv_header_execinfo_h=no
  23. CFLAGS+= -fno-pie
  24. MAKE_ENV= INSTALL_EMACS="${INSTALL_SCRIPT}" \
  25. LOGNAME="${SHAREOWN}"
  26. SUBST_VARS= GCCARCH VERSION
  27. LIB_DEPENDS= security/gnutls \
  28. textproc/libxml
  29. .if ${FLAVOR} == "no_x11"
  30. CONFIGURE_ARGS+= --without-x \
  31. --without-dbus \
  32. --without-file-notification \
  33. --without-gconf \
  34. --without-gsettings \
  35. --without-jpeg
  36. .else
  37. LIB_DEPENDS+= x11/dbus \
  38. x11/gnome/librsvg \
  39. devel/gconf2 \
  40. graphics/jpeg \
  41. graphics/png \
  42. graphics/tiff \
  43. graphics/giflib \
  44. graphics/ImageMagick
  45. RUN_DEPENDS+= devel/desktop-file-utils \
  46. devel/xdg-utils \
  47. x11/gtk+3,-guic
  48. . if ${FLAVOR} == "athena"
  49. CONFIGURE_ARGS+= --with-x-toolkit=athena
  50. LIB_DEPENDS+= x11/Xaw3d
  51. WANTLIB += ICE MagickCore-6.Q16 MagickWand-6.Q16 SM X11 Xaw3d
  52. WANTLIB += Xext Xft Xinerama Xmu Xpm Xrandr Xrender Xt cairo dbus-1
  53. WANTLIB += fontconfig freetype gconf-2 gdk_pixbuf-2.0 gif gio-2.0
  54. WANTLIB += glib-2.0 gobject-2.0 intl jpeg png rsvg-2 tiff X11-xcb Xfixes xcb
  55. . elif ${FLAVOR} == "gtk2"
  56. CONFIGURE_ARGS+= --with-x-toolkit=gtk2
  57. LIB_DEPENDS+= x11/gtk+2
  58. WANTLIB += ICE MagickCore-6.Q16 MagickWand-6.Q16 SM X11 Xcomposite
  59. WANTLIB += Xcursor Xdamage Xext Xfixes Xft Xi Xinerama Xpm Xrandr
  60. WANTLIB += Xrender atk-1.0 cairo dbus-1 fontconfig freetype gconf-2
  61. WANTLIB += gdk-x11-2.0 gdk_pixbuf-2.0 gif gio-2.0 glib-2.0 gobject-2.0
  62. WANTLIB += gtk-x11-2.0 intl jpeg pango-1.0 pangocairo-1.0 pangoft2-1.0
  63. WANTLIB += png rsvg-2 tiff X11-xcb xcb
  64. . elif ${FLAVOR} == "gtk3"
  65. CONFIGURE_ARGS+= --with-x-toolkit=gtk3
  66. LIB_DEPENDS+= x11/gtk+3
  67. WANTLIB += ICE MagickCore-6.Q16 MagickWand-6.Q16 SM X11 X11-xcb
  68. WANTLIB += Xfixes Xft Xinerama Xpm Xrandr Xrender atk-1.0 cairo
  69. WANTLIB += cairo-gobject dbus-1 fontconfig freetype gconf-2 gdk-3
  70. WANTLIB += gdk_pixbuf-2.0 gif gio-2.0 glib-2.0 gobject-2.0 gtk-3
  71. WANTLIB += intl jpeg pango-1.0 pangocairo-1.0 png rsvg-2 tiff
  72. WANTLIB += xcb
  73. . else
  74. ERRORS+= "Fatal: Conflicting flavor: ${FLAVOR}"
  75. . endif
  76. .endif
  77. post-install:
  78. chmod -t ${PREFIX}/bin/emacs-${VERSION}
  79. chmod -s ${PREFIX}/libexec/emacs/${VERSION}/${GCCARCH}/update-game-score
  80. .if ${FLAVOR:Mno_x11}
  81. rm -Rf ${PREFIX}/share/applications/ ${PREFIX}/share/icons/
  82. .endif
  83. .include <bsd.port.mk>