diff --git a/Mk/Uses/emacs.mk b/Mk/Uses/emacs.mk --- a/Mk/Uses/emacs.mk +++ b/Mk/Uses/emacs.mk @@ -79,7 +79,7 @@ # Only set FLAVORS when... . if defined(_EMACS_RUN_DEP) && !defined(_EMACS_NOFLAVORS) -FLAVORS= full canna nox devel_full devel_nox +FLAVORS= full canna nox wayland devel_full devel_nox # Sort the default to be first . if defined(EMACS_DEFAULT) FLAVORS:= ${EMACS_DEFAULT} ${FLAVORS:N${EMACS_DEFAULT}} diff --git a/editors/emacs/Makefile b/editors/emacs/Makefile --- a/editors/emacs/Makefile +++ b/editors/emacs/Makefile @@ -14,20 +14,23 @@ WWW= https://www.gnu.org/software/emacs/ COMMENT_nox= (No X flavor) COMMENT_canna= (Canna Japanese input flavor) +COMMENT_wayland= (Wayland flavor) LICENSE= GPLv3+ LICENSE_FILE= ${WRKSRC}/COPYING LIB_DEPENDS= libgmp.so:math/gmp -FLAVORS= full canna nox +FLAVORS= full canna nox wayland canna_PKGNAMESUFFIX= -canna canna_LIB_DEPENDS= libcanna.so:japanese/canna-lib -canna_CONFLICTS_INSTALL= emacs emacs-nox +canna_CONFLICTS_INSTALL= emacs emacs-nox emacs-wayland canna_DESCR= ${.CURDIR}/pkg-descr-canna -full_CONFLICTS_INSTALL= emacs-canna emacs-nox +full_CONFLICTS_INSTALL= emacs-canna emacs-nox emacs-wayland nox_PKGNAMESUFFIX= -nox -nox_CONFLICTS_INSTALL= emacs emacs-canna +nox_CONFLICTS_INSTALL= emacs emacs-canna emacs-wayland +wayland_PKGNAMESUFFIX= -wayland +wayland_CONFLICTS_INSTALL= emacs emacs-canna emacs-nox USES= cpe gmake localbase:ldflags ncurses pkgconfig tar:xz CPE_VENDOR= gnu @@ -41,8 +44,7 @@ --without-selinux .if ${FLAVOR:U} == canna CONFIGURE_ARGS+= --with-canna -.endif -.if ${FLAVOR:U} == nox +.elif ${FLAVOR:U} == nox CONFIGURE_ARGS+= --with-sound=no \ --with-x-toolkit=no \ --without-cairo \ @@ -65,7 +67,23 @@ --without-xim \ --without-xpm \ --without-xwidgets -.else +.elif ${FLAVOR:U} == wayland +CATEGORIES+= wayland +CONFIGURE_ARGS+= --with-cairo \ + --with-pgtk \ + --with-png \ + --with-toolkit-scroll-bars \ + --with-x-toolkit=gtk3 \ + --without-m17n-flt \ + --without-x \ + --without-xft \ + --without-xim \ + --without-xpm +LIB_DEPENDS+= libfontconfig.so:x11-fonts/fontconfig \ + libfreetype.so:print/freetype2 \ + libpng.so:graphics/png +USE_GNOME+= cairo gtk30 +.else # ${FLAVOR:U} == full CONFIGURE_ARGS+= --with-x .endif # See r468320 to determine if/when the next line can be removed @@ -115,6 +133,11 @@ PGTK PNG SCROLLBARS SVG TIFF WEBP XAW XAW3D XFT \ XIM XPM XWIDGETS .endif +.if ${FLAVOR:U} == wayland +OPTIONS_EXCLUDE= CAIRO GTK2 GTK3 M17N MOTIF PGTK PNG SCROLLBARS \ + XAW XAW3D XFT XIM XPM +.endif + OPTIONS_SUB= YES ACL_DESC= Access control list support @@ -257,13 +280,13 @@ .endif .if !${PORT_OPTIONS:MGTK2} && !${PORT_OPTIONS:MGTK3} && !${PORT_OPTIONS:MMOTIF} && \ - !${PORT_OPTIONS:MXAW} && !${PORT_OPTIONS:MXAW3D} + !${PORT_OPTIONS:MXAW} && !${PORT_OPTIONS:MXAW3D} && !${FLAVOR} == wayland CONFIGURE_ARGS+= --with-x-toolkit=no .endif # Schema generation is dependent on both PGTK, and GSETTINGS options # as per https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=183936ee8e5 -.if ${PORT_OPTIONS:MGSETTINGS} && ${PORT_OPTIONS:MPGTK} +.if ${PORT_OPTIONS:MGSETTINGS} && (${PORT_OPTIONS:MPGTK} || ${FLAVOR:U} == wayland) GLIB_SCHEMAS+= org.gnu.emacs.defaults.gschema.xml .endif