Page MenuHomeFreeBSD

Emacs: Add new Wayland flavor
ClosedPublic

Authored by jrm on Apr 23 2024, 5:31 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jul 17, 7:24 PM
Unknown Object (File)
Fri, Jul 5, 11:37 AM
Unknown Object (File)
Fri, Jul 5, 11:24 AM
Unknown Object (File)
Wed, Jun 26, 5:05 AM
Unknown Object (File)
Wed, Jun 26, 1:35 AM
Unknown Object (File)
Wed, Jun 26, 12:34 AM
Unknown Object (File)
Tue, Jun 25, 6:41 AM
Unknown Object (File)
Tue, Jun 25, 6:05 AM
Subscribers
None

Details

Summary

Emacs requires mutually exclusive build parameters depending on
whether the user is running on X11 or Wayland. Rather than require
either set of users to build a custom package, create a new Wayland
flavor.

Test Plan

Diff Detail

Repository
R11 FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jrm requested review of this revision.Apr 23 2024, 5:31 PM
jrm created this revision.

Don't change OPTIONS_DEFAULT here. Do it in a subsequent commit.

Ensure the correct LIB_DEPENDS and USES are specified

There is still a problem to be resolved. Even though we have OPTION_EXCLUDE=CAIRO... for the Wayland flavor, CAIRO_CONFIGURE_WITH=cairo is still adding --without-cairo to CONFIGURE_ARGS.

Add a few more tweaks mostly related to the change in D44929, which this revision depends on.

Restore changes after last arc diff --update

In D44917#1024160, @jrm wrote:

CAIRO_CONFIGURE_WITH=cairo is still adding --without-cairo to CONFIGURE_ARGS.

Why not use OPTIONS_SLAVE+=CAIRO? For example:

diff --git a/editors/emacs/Makefile b/editors/emacs/Makefile
index ab33440bf239..0542e5715e86 100644
--- a/editors/emacs/Makefile
+++ b/editors/emacs/Makefile
@@ -68,21 +68,9 @@ CONFIGURE_ARGS+=	--with-sound=no \
 			--without-xpm \
 			--without-xwidgets
 .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
+OPTIONS_SLAVE+=		PGTK ${PGTK_IMPLIES} ${PGTK_IMPLIES:@i@${${i}_IMPLIES}@}
+OPTIONS_EXCLUDE+=	GTK2 MOTIF XAW XAW3D XIM ${PGTK_PREVENTS} ${PGTK_IMPLIES:@i@${${i}_PREVENTS}@}
+CONFIGURE_ARGS+=	--without-x
 .else # ${FLAVOR:U} == full
 CONFIGURE_ARGS+=	--with-x
 .endif
@@ -133,10 +121,6 @@ OPTIONS_EXCLUDE=		ALSA CAIRO DBUS GFILE GIF GSETTINGS GTK2 GTK3 \
 				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
 
  • Incorporate jbeich's suggestion to use OPTIONS_SLAVE

Thanks updated.

Remove check for wayland flavor; it's no longer necessary with PGTK as a slave option.

This revision is now accepted and ready to land.May 6 2024, 3:03 PM
This revision was automatically updated to reflect the committed changes.