Add new emacs-pgtk binary package for the PGTK port
authorSean Whitton <spwhitton@spwhitton.name>
Sun, 30 Jul 2023 19:44:52 +0000 (20:44 +0100)
committerSean Whitton <spwhitton@spwhitton.name>
Mon, 31 Jul 2023 08:23:38 +0000 (09:23 +0100)
debian/.gitignore
debian/control
debian/rules

index 49ccfeaae5792d6fe627655d3e5b16f7ae5af32d..8671e06d049a6123b19032deb5b301f939c5bb05 100644 (file)
@@ -3,6 +3,7 @@
 /*-stamp
 /.debhelper/
 /build-gtk/
+/build-pgtk/
 /build-lucid/
 /build-nox/
 /build-src/
 /emacs-gtk.postrm.debhelper
 /emacs-gtk.prerm
 /emacs-gtk.substvars
+/emacs-pgtk
+/emacs-pgtk.README.Debian
+/emacs-pgtk.debhelper.log
+/emacs-pgtk.desktop
+/emacs-pgtk.links
+/emacs-pgtk.lintian-overrides
+/emacs-pgtk.menu
+/emacs-pgtk.postinst
+/emacs-pgtk.postinst.debhelper
+/emacs-pgtk.postrm
+/emacs-pgtk.postrm.debhelper
+/emacs-pgtk.prerm
+/emacs-pgtk.substvars
 /emacs-lucid
 /emacs-lucid.README.Debian
 /emacs-lucid.debhelper.log
index f94307ce48e7c787367b6daad297154a40f89e2f..4be4c4e8b8eb0dd215f68b3638e29ef688c48640 100644 (file)
@@ -58,7 +58,7 @@ Vcs-Git: https://salsa.debian.org/rlb/deb-emacs.git
 Package: emacs
 Architecture: all
 Depends:
- emacs-gtk (>= 1:27.1) | emacs-lucid (>= 1:27.1) | emacs-nox (>= 1:27.1),
+ emacs-gtk (>= 1:27.1) | emacs-pgtk (>= 1:27.1) | emacs-lucid (>= 1:27.1) | emacs-nox (>= 1:27.1),
  ${misc:Depends},
 Description: GNU Emacs editor (metapackage)
  GNU Emacs is the extensible self-documenting text editor.
@@ -75,8 +75,8 @@ Depends:
 Provides: editor, emacs, emacsen, info-browser, mail-reader, news-reader
 Recommends: fonts-noto-color-emoji
 Suggests: emacs-common-non-dfsg
-Conflicts: emacs-gtk, emacs-nox
-Replaces: emacs-gtk, emacs-nox
+Conflicts: emacs-gtk, emacs-pgtk, emacs-nox
+Replaces: emacs-gtk, emacs-pgtk, emacs-nox
 Description: GNU Emacs editor (with Lucid GUI support)
  GNU Emacs is the extensible self-documenting text editor.  This
  package contains a version of Emacs with support for a graphical user
@@ -97,8 +97,8 @@ Depends:
  ${shlibs:Depends},
 Provides: editor, emacs, emacsen, info-browser, mail-reader, news-reader
 Suggests: emacs-common-non-dfsg
-Conflicts: emacs-gtk, emacs-lucid
-Replaces: emacs-gtk, emacs-lucid
+Conflicts: emacs-gtk, emacs-pgtk, emacs-lucid
+Replaces: emacs-gtk, emacs-pgtk, emacs-lucid
 Description: GNU Emacs editor (without GUI support)
  GNU Emacs is the extensible self-documenting text editor.  This
  package contains a version of Emacs compiled without support for X,
@@ -114,13 +114,36 @@ Depends:
 Provides: editor, emacs, emacsen, info-browser, mail-reader, news-reader
 Recommends: fonts-noto-color-emoji
 Suggests: emacs-common-non-dfsg
-Conflicts: emacs-lucid, emacs-nox
-Replaces: emacs-lucid, emacs-nox
+Conflicts: emacs-pgtk, emacs-lucid, emacs-nox
+Replaces: emacs-pgtk, emacs-lucid, emacs-nox
 Description: GNU Emacs editor (with GTK+ GUI support)
  GNU Emacs is the extensible self-documenting text editor.  This
  package contains a version of Emacs with a graphical user interface
- based on GTK+ (instead of the Lucid toolkit provided by the
- emacs-lucid package).
+ based on GTK+ for X11 and Wayland (instead of the Lucid toolkit
+ provided by the emacs-lucid package).
+ .
+ If you are using Wayland, you may wish to install emacs-pgtk instead.
+
+Package: emacs-pgtk
+Architecture: any
+Depends:
+ emacs-bin-common (= ${binary:Version}),
+ emacs-common (= ${source:Version}),
+ ${misc:Depends},
+ ${shlibs:Depends},
+Provides: editor, emacs, emacsen, info-browser, mail-reader, news-reader
+Recommends: fonts-noto-color-emoji
+Suggests: emacs-common-non-dfsg
+Conflicts: emacs-gtk, emacs-lucid, emacs-nox
+Replaces: emacs-gtk, emacs-lucid, emacs-nox
+Description: GNU Emacs editor (with GTK+ Wayland GUI support)
+ GNU Emacs is the extensible self-documenting text editor.  This
+ package contains a version of Emacs with a graphical user interface
+ based on GTK+ for Wayland.
+ .
+ If you are using exclusively X11, install emacs-gtk instead.  The
+ PGTK port works less well than the standard GTK+ build in a number of
+ respects.
 
 Package: emacs-bin-common
 Architecture: any
@@ -129,7 +152,7 @@ Recommends: mailutils
 Description: GNU Emacs editor's shared, architecture dependent files
  GNU Emacs is the extensible self-documenting text editor.
  This package contains the architecture dependent infrastructure
- that's shared by emacs-gtk, emacs-lucid, and emacs-nox.
+ that's shared by emacs-gtk, emacs-pgtk, emacs-lucid, and emacs-nox.
 
 Package: emacs-common
 Architecture: all
@@ -171,7 +194,7 @@ Replaces:
 Description: GNU Emacs editor's shared, architecture independent infrastructure
  GNU Emacs is the extensible self-documenting text editor.
  This package contains the architecture independent infrastructure
- that's shared by emacs-gtk, emacs-lucid, and emacs-nox.
+ that's shared by emacs-gtk, emacs-pgtk, emacs-lucid, and emacs-nox.
 
 Package: emacs-el
 Architecture: all
index dcc8bf3647a44d996c26361b4753598cdf7a71a2..edf1108fa0da833d348611b200b265c22a7d0887 100755 (executable)
@@ -124,7 +124,10 @@ nonpersistent_autogen_install_files := \
   debian/emacs-lucid.prerm \
   debian/emacs-gtk.lintian-overrides \
   debian/emacs-gtk.postinst \
-  debian/emacs-gtk.prerm
+  debian/emacs-gtk.prerm \
+  debian/emacs-pgtk.lintian-overrides \
+  debian/emacs-pgtk.postinst \
+  debian/emacs-pgtk.prerm
 
 autogen_build_files := \
   $(nonpersistent_autogen_build_files) $(persistent_autogen_build_files)
@@ -143,11 +146,13 @@ nonpersistent_autogen_files := \
 pkgdir_common := $(CURDIR)/debian/emacs-common
 pkgdir_bin_common := $(CURDIR)/debian/emacs-bin-common
 pkgdir_gtk := $(CURDIR)/debian/emacs-gtk
+pkgdir_pgtk := $(CURDIR)/debian/emacs-pgtk
 pkgdir_nox := $(CURDIR)/debian/emacs-nox
 pkgdir_lucid := $(CURDIR)/debian/emacs-lucid
 pkgdir_el := $(CURDIR)/debian/emacs-el
 
 install_dir_gtk := $(CURDIR)/debian/install-gtk
+install_dir_pgtk := $(CURDIR)/debian/install-pgtk
 install_dir_nox := $(CURDIR)/debian/install-nox
 install_dir_lucid := $(CURDIR)/debian/install-lucid
 
@@ -215,6 +220,9 @@ debian-sync: $(persistent_autogen_files)
 debian/emacs-gtk.%: xsupport := "gtk"
 debian/emacs-gtk.%: pkg_name := emacs-gtk
 
+debian/emacs-pgtk.%: xsupport := "pgtk"
+debian/emacs-pgtk.%: pkg_name := emacs-pgtk
+
 debian/emacs-nox.%: xsupport := "nox"
 debian/emacs-nox.%: pkg_name := emacs-nox
 
@@ -233,6 +241,9 @@ debian/emacs-nox.%: debian/emacsVAR.% debian/changelog debian/rules
 debian/emacs-gtk.%: debian/emacsVAR.% debian/changelog debian/rules
        $(call deb_sub,$<,$@)
 
+debian/emacs-pgtk.%: debian/emacsVAR.% debian/changelog debian/rules
+       $(call deb_sub,$<,$@)
+
 debian/emacs-lucid.%: debian/emacsVAR.% debian/changelog debian/rules
        $(call deb_sub,$<,$@)
 
@@ -284,6 +295,10 @@ confflags_gtk += --with-x-toolkit=gtk3
 # resulting emacs-gtk package will have the old scrollbars.
 confflags_gtk += --with-toolkit-scroll-bars
 
+# pgtk configure flags
+confflags_pgtk := $(confflags)
+confflags_pgtk += --with-pgtk
+
 # nox configure flags
 confflags_nox := $(confflags)
 confflags_nox += --with-x=no
@@ -317,15 +332,16 @@ override_dh_auto_configure:
 
 debian/stamp-configured: $(autogen_build_files)
         # If the deps for this target change, start over
-       rm -rf debian/build-src debian/build-gtk debian/build-lucid debian/build-nox
+       rm -rf debian/build-src debian/build-gtk debian/build-pgtk debian/build-lucid debian/build-nox
        mkdir debian/build-src
        cp -a $$(ls -A | egrep -v '^(\.git|\.pc|debian)$$') debian/build-src
        cp -a /usr/share/misc/config.guess /usr/share/misc/config.sub \
          debian/build-src
        cd debian/build-src && ./autogen.sh
-       mkdir debian/build-lucid debian/build-nox debian/build-gtk
+       mkdir debian/build-lucid debian/build-nox debian/build-gtk debian/build-pgtk
         # Create one VPATH build per-config
        $(call cfg_tree,debian/build-gtk,$(confflags_gtk))
+       $(call cfg_tree,debian/build-pgtk,$(confflags_pgtk))
        $(call cfg_tree,debian/build-nox,$(confflags_nox))
        $(call cfg_tree,debian/build-lucid,$(confflags_lucid))
        touch $@
@@ -334,6 +350,7 @@ override_dh_auto_build: debian/stamp-configured
         # The first build will bootstrap build-src, which will speed
         # the remaining builds.
        $(call build_cmd,debian/build-gtk)
+       $(call build_cmd,debian/build-pgtk)
        $(call build_cmd,debian/build-nox)
        $(call build_cmd,debian/build-lucid)
 
@@ -342,6 +359,7 @@ override_dh_auto_test:
        $(MAKE) -C debian/build-lucid check
        $(MAKE) -C debian/build-nox check
        $(MAKE) -C debian/build-gtk check
+       $(MAKE) -C debian/build-pgtk check
   endif
 
 ifdef deb_native_compilation_enabled
@@ -384,6 +402,7 @@ override_dh_auto_install: $(autogen_install_files)
          $(pkgdir_common)/* \
          $(pkgdir_bin_common)/* \
          $(pkgdir_gtk)/* \
+         $(pkgdir_pgtk)/* \
          $(pkgdir_nox)/* \
          $(pkgdir_lucid)/* \
          $(pkgdir_el)/*
@@ -508,6 +527,21 @@ override_dh_auto_install: $(autogen_install_files)
            $(pkgdir_gtk)/usr/share/applications/
         endif
 
+        ##################################################
+        # emacs-pgtk
+        ifneq (,$(findstring emacs, $(shell dh_listpackages)))
+         $(call emacs_inst,build-pgtk,$(install_dir_pgtk))
+         $(call install_common_binpkg_bits,\
+           $(install_dir_pgtk),$(pkgdir_pgtk),emacs-pgtk,pgtk)
+
+          # install desktop entries
+         install -d $(pkgdir_pgtk)/usr/share/applications
+         install -m 0644 \
+           debian/emacs.desktop \
+           debian/emacs-term.desktop \
+           $(pkgdir_pgtk)/usr/share/applications/
+        endif
+
         ##################################################
         # emacs-nox
         ifneq (,$(findstring emacs-nox, $(shell dh_listpackages)))
@@ -550,6 +584,7 @@ override_dh_auto_install: $(autogen_install_files)
         ##################################################
         # final cleanup
        rm -rf $(install_dir_gtk)
+       rm -rf $(install_dir_pgtk)
        rm -rf $(install_dir_nox)
        rm -rf $(install_dir_lucid)
 
@@ -597,11 +632,13 @@ override_dh_clean: $(persistent_autogen_files)
          debian/build-nox \
          debian/build-src \
          debian/build-gtk \
+         debian/build-pgtk \
          debian/elgz-canary \
          debian/elgz-info \
          debian/emacs-common.README.00 \
          debian/emacs-common.README.01 \
          debian/install-lucid \
          debian/install-nox \
-         debian/install-gtk
+         debian/install-gtk \
+         debian/install-pgtk
        rm -f $(nonpersistent_autogen_files)