Take emacs-bin-common binaries from the pgtk build
authorSean Whitton <spwhitton@spwhitton.name>
Tue, 22 Aug 2023 12:38:22 +0000 (13:38 +0100)
committerSean Whitton <spwhitton@spwhitton.name>
Tue, 22 Aug 2023 14:04:21 +0000 (15:04 +0100)
Use the pgtk build to populate emacs-common too, for simplicity.

Thanks to Arto Jantunen for investigation and discussion.

Closes: #1043060
debian/rules

index 610e950cdea69f8e25c7e4daad9b1c21f75f6600..aa6bfba6ff540efb35a5cd903d7cdf8d61691495 100755 (executable)
@@ -409,13 +409,13 @@ override_dh_auto_install: $(autogen_install_files)
          $(pkgdir_lucid)/* \
          $(pkgdir_el)/*
 
-       $(call emacs_inst,build-gtk,$(install_dir_gtk))
+       $(call emacs_inst,build-pgtk,$(install_dir_pgtk))
 
         ##################################################
         # emacs-common
         ifneq (,$(findstring emacs-common, $(shell dh_listpackages)))
          install -d $(pkgdir_common)
-         cp -a $(install_dir_gtk)/* $(pkgdir_common)
+         cp -a $(install_dir_pgtk)/* $(pkgdir_common)
 
          rm -r $(pkgdir_common)/usr/bin
          rm \
@@ -488,9 +488,12 @@ override_dh_auto_install: $(autogen_install_files)
         # emacs-bin-common
         ifneq (,$(findstring emacs-bin-common, $(shell dh_listpackages)))
          # Move common binaries to emacs-bin-common.
+         # We take them from pgtk because that build's emacsclient
+         # can handle connections to all flavours, while the other
+         # builds' emacsclients cannot connect to pgtk under Wayland.
          install -d $(pkgdir_bin_common)/usr
-         cp -a $(install_dir_gtk)/usr/bin $(pkgdir_bin_common)/usr
-         cp -a $(install_dir_gtk)/usr/libexec $(pkgdir_bin_common)/usr
+         cp -a $(install_dir_pgtk)/usr/bin $(pkgdir_bin_common)/usr
+         cp -a $(install_dir_pgtk)/usr/libexec $(pkgdir_bin_common)/usr
 
          # Make sure there's just one.
          test -f $(pkgdir_bin_common)/usr/bin/emacs-*
@@ -517,7 +520,8 @@ override_dh_auto_install: $(autogen_install_files)
 
         ##################################################
         # emacs-gtk
-        ifneq (,$(findstring emacs, $(shell dh_listpackages)))
+        ifneq (,$(findstring emacs-gtk, $(shell dh_listpackages)))
+         $(call emacs_inst,build-gtk,$(install_dir_gtk))
          $(call install_common_binpkg_bits,\
            $(install_dir_gtk),$(pkgdir_gtk),emacs-gtk,gtk)
 
@@ -531,8 +535,7 @@ override_dh_auto_install: $(autogen_install_files)
 
         ##################################################
         # emacs-pgtk
-        ifneq (,$(findstring emacs-pgtk, $(shell dh_listpackages)))
-         $(call emacs_inst,build-pgtk,$(install_dir_pgtk))
+        ifneq (,$(findstring emacs, $(shell dh_listpackages)))
          $(call install_common_binpkg_bits,\
            $(install_dir_pgtk),$(pkgdir_pgtk),emacs-pgtk,pgtk)