diff -Nru scim-1.4.18/debian/changelog scim-1.4.18/debian/changelog
--- scim-1.4.18/debian/changelog	2018-04-15 22:08:23.000000000 +1000
+++ scim-1.4.18/debian/changelog	2018-06-17 22:29:24.000000000 +1000
@@ -1,3 +1,25 @@
+scim (1.4.18-2.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * debian/changelog:
+    - Remove trailing whitespace.
+  * debian/control:
+    - Use a recommended URI format in the Vcs-Git field.
+    - Update the package description of scim-gtk-immodule.
+    - Convert scim-dev to Architecture: any (Closes: #901056).
+    - Mark scim-dev Multi-Arch: same.
+    - Mark scim-dev-doc Multi-Arch: foreign (Closes: #901051).
+  * debian/patches:
+    - Add a patch to detect whether certain xsl files exist on the build
+      machine, instead of the host machine. Thanks to Helmut Grohne for
+      supplying the patch (Closes: #876162).
+    - Add a patch fixing several spelling errors.
+  * debian/rules:
+    - Add 'hardening=+all' to DEB_BUILD_MAINT_OPTIONS.
+    - Drop obsolete call to dh_gtkmodules (Closes: #897987).
+
+ -- Hugh McMaster <hugh.mcmaster@outlook.com>  Sun, 17 Jun 2018 22:30:00 +1000
+
 scim (1.4.18-2) unstable; urgency=medium
 
   * copyright: update to 2018
@@ -329,12 +351,12 @@
   [ Rolf Leggewie ]
   * debian/README*: fix some spelling mistakes and bitrot
   * debian/rules: remove obsolete Chinese manual (Closes: #427520)
-  * debian/control: 
+  * debian/control:
     - let scim-bridge pull in clients packages by default
     - let libscim8c2a conflict with older versions of scim-gtk2-immodule
       to offer Ubuntu a safe way out of earlier packaging mistakes
   * debian/scim.postinst: improve handling of update-alternatives
-  * debian/patches: 
+  * debian/patches:
     - push back and update a number of patches from Ubuntu
     - drop AltGr as trigger key from 20_scim_config.dpatch
   * add a lintian override for libscim8c2a package
@@ -353,15 +375,15 @@
   * drop 90_relibtoolize.dpatch, looks like the retooling was done upstream
 
   [ LI Daobing ]
-  * debian/control: 
-    - add me to uploaders. 
+  * debian/control:
+    - add me to uploaders.
     - bump debhelper version to >= 7.
     - fix typo in description: GTK -> GTK+.
     - fix typo in description: meta package -> metapackage.
   * debian/compat:
     - bump debhelper version to 7.
-  * debian/scim-dev-doc.doc-base: change section to Text. 
-  * debian/rules: 
+  * debian/scim-dev-doc.doc-base: change section to Text.
+  * debian/rules:
     - bump shlib version to 1.4.9.
     - change "rm" to "rm -f".
     - remove deprecated desktop entry
@@ -703,7 +725,7 @@
 
 scim (1.0.1-2) unstable; urgency=high
 
-  * Patch to redirects the messages to standard error per Aaron M. Ucko. 
+  * Patch to redirects the messages to standard error per Aaron M. Ucko.
     (Closes: #280374)
 
  -- Osamu Aoki <osamu@debian.org>  Tue, 09 Nov 2004 07:31:17 +0100
diff -Nru scim-1.4.18/debian/control scim-1.4.18/debian/control
--- scim-1.4.18/debian/control	2018-04-15 22:08:00.000000000 +1000
+++ scim-1.4.18/debian/control	2018-06-17 19:57:42.000000000 +1000
@@ -11,7 +11,7 @@
  libltdl-dev, doxygen
 Homepage: https://github.com/scim-im/scim
 Vcs-Browser: https://github.com/leggewie-DM/scim
-Vcs-Git: git@github.com:leggewie-DM/scim.git
+Vcs-Git: https://github.com/leggewie-DM/scim.git
 
 Package: scim
 Architecture: any
@@ -98,16 +98,16 @@
 Conflicts: scim-gtk2-immodule, scim-gtk-immodule
 Replaces: scim-gtk2-immodule
 Enhances: scim
-Description: GTK+ input method module with SCIM as backend
+Description: GTK+ input method module, with SCIM as the input backend
  SCIM (Smart Common Input Method) is an input method (IM) platform.
  .
  This package is the GTK+ native input method module for SCIM.  It provides
- a GTK+ IM module for version 2 and 3 of GTK with SCIM as the input backend.
+ a GTK+ IM module for versions 2 and 3 of GTK+, with SCIM as the input backend.
  This input method module should work within all GTK+ platforms, including
  gtk-x11, gtk-linuxfb and gtk-directfb.
  .
- The GTK+ IM module communicates with SCIM backend through the IM agent
- provided by scim-im-agent package.
+ The GTK+ IM module communicates with the SCIM backend through the IM agent
+ provided by the scim-im-agent package.
  .
  For more information about SCIM, please see the description of scim package.
 
@@ -183,7 +183,8 @@
 
 Package: scim-dev
 Section: devel
-Architecture: all
+Architecture: any
+Multi-Arch: same
 Depends: libscim-dev (>= ${source:Version}), scim-dev-doc (= ${source:Version}), ${misc:Depends}
 Description: development files for SCIM platform
  SCIM (Smart Common Input Method) is an input method (IM) platform.
@@ -197,6 +198,7 @@
 Section: doc
 Depends: ${misc:Depends}, libjs-jquery
 Architecture: all
+Multi-Arch: foreign
 Description: development documentation for SCIM platform
  SCIM (Smart Common Input Method) is an input method (IM) platform.
  .
diff -Nru scim-1.4.18/debian/patches/02_replace_AC_CHECK_FILE.patch scim-1.4.18/debian/patches/02_replace_AC_CHECK_FILE.patch
--- scim-1.4.18/debian/patches/02_replace_AC_CHECK_FILE.patch	1970-01-01 10:00:00.000000000 +1000
+++ scim-1.4.18/debian/patches/02_replace_AC_CHECK_FILE.patch	2018-06-17 15:29:51.000000000 +1000
@@ -0,0 +1,41 @@
+From: Helmut Grohne <helmut@subdivi.de>
+Subject: fix cross compilation
+
+We are not interested in whether these .xsl files exist on the host machine,
+but want to know whether they exist on the build machine. Thus AC_CHECK_FILE
+must not be used.
+
+Index: scim-1.4.18/configure.ac
+===================================================================
+--- scim-1.4.18.orig/configure.ac
++++ scim-1.4.18/configure.ac
+@@ -131,20 +131,14 @@
+ AC_SUBST(XSLTPROC)
+ 
+ # Checks if docbook-style-xsl is available
+-AC_CHECK_FILE(
+- [/usr/share/sgml/docbook/xsl-stylesheets/html/tldp-html.xsl],
+- [DOCBOOK_XSL=/usr/share/sgml/docbook/xsl-stylesheets/html/tldp-html.xsl],
+- [AC_CHECK_FILE(
+-  [/usr/share/sgml/docbook/xsl-stylesheets/html/docbook.xsl],
+-  [DOCBOOK_XSL=/usr/share/sgml/docbook/xsl-stylesheets/html/docbook.xsl],
+-   [AC_CHECK_FILE(
+-    [/usr/share/xml/docbook/stylesheet/nwalsh/current/html/docbook.xsl],
+-    [DOCBOOK_XSL=/usr/share/xml/docbook/stylesheet/nwalsh/current/html/docbook.xsl],
+-    [DOCBOOK_XSL=no]
+-    )]
+-  )]
+-)
+-
++AC_MSG_CHECKING(docbook xsl)
++DOCBOOK_XSL=no
++for f in /usr/share/sgml/docbook/xsl-stylesheets/html/tldp-html.xsl /usr/share/sgml/docbook/xsl-stylesheets/html/docbook.xsl /usr/share/xml/docbook/stylesheet/nwalsh/current/html/docbook.xsl; do
++  test -f "$f" || continue
++  DOCBOOK_XSL=$f
++  break
++done
++AC_MSG_RESULT($DOCBOOK_XSL)
+ AC_SUBST(DOCBOOK_XSL)
+ 
+ AM_CONDITIONAL(HAVE_DOCBOOK, test x$DOCBOOK_XSL != xno)
+
diff -Nru scim-1.4.18/debian/patches/03_scim_spelling_fixes.patch scim-1.4.18/debian/patches/03_scim_spelling_fixes.patch
--- scim-1.4.18/debian/patches/03_scim_spelling_fixes.patch	1970-01-01 10:00:00.000000000 +1000
+++ scim-1.4.18/debian/patches/03_scim_spelling_fixes.patch	2018-06-17 19:52:21.000000000 +1000
@@ -0,0 +1,37 @@
+Description: Fix some spelling errors in scim's source files.
+Author: Hugh McMaster <hugh.mcmaster@outlook.com>
+Last-Update: 2018-06-17
+
+--- scim-1.4.18.orig/extras/immodules/agent/scim-bridge-agent.cpp
++++ scim-1.4.18/extras/immodules/agent/scim-bridge-agent.cpp
+@@ -249,16 +249,16 @@ retval_t ScimBridgeAgentImpl::run_event_
+             } else {
+                 if (socket_fd > max_fd) max_fd = socket_fd;
+                 if (triggers & SCIM_BRIDGE_AGENT_EVENT_READ) {
+-                    scim_bridge_pdebugln (1, "FD (%d) is registred as a reading socket", socket_fd);
++                    scim_bridge_pdebugln (1, "FD (%d) is registered as a reading socket", socket_fd);
+                     FD_SET (socket_fd, &read_set);
+                 }
+                 if (triggers & SCIM_BRIDGE_AGENT_EVENT_WRITE) {
+                     FD_SET (socket_fd, &write_set);
+-                    scim_bridge_pdebugln (1, "FD (%d) is registred as a writing socket", socket_fd);
++                    scim_bridge_pdebugln (1, "FD (%d) is registered as a writing socket", socket_fd);
+                 }
+                 if (triggers & SCIM_BRIDGE_AGENT_EVENT_ERROR) {
+                     FD_SET (socket_fd, &error_set);
+-                    scim_bridge_pdebugln (1, "FD (%d) is registred as a error socket", socket_fd);
++                    scim_bridge_pdebugln (1, "FD (%d) is registered as a error socket", socket_fd);
+                 }
+             }
+             ++i;
+--- scim-1.4.18.orig/extras/immodules/client-common/scim-bridge-client.c
++++ scim-1.4.18/extras/immodules/client-common/scim-bridge-client.c
+@@ -1569,7 +1569,7 @@ retval_t scim_bridge_client_reset_imcont
+     }
+ 
+     if (pending_response.status == RESPONSE_SUCCEEDED) {
+-        scim_bridge_pdebugln (6, "reseted: id = %d", id);
++        scim_bridge_pdebugln (6, "reset: id = %d", id);
+         pending_response.header = NULL;
+         pending_response.status = RESPONSE_DONE;
+         return RETVAL_SUCCEEDED;
diff -Nru scim-1.4.18/debian/patches/series scim-1.4.18/debian/patches/series
--- scim-1.4.18/debian/patches/series	2018-04-15 22:04:19.000000000 +1000
+++ scim-1.4.18/debian/patches/series	2018-06-17 19:39:43.000000000 +1000
@@ -1 +1,3 @@
 01_scim_config.patch
+02_replace_AC_CHECK_FILE.patch
+03_scim_spelling_fixes.patch
diff -Nru scim-1.4.18/debian/rules scim-1.4.18/debian/rules
--- scim-1.4.18/debian/rules	2018-04-15 22:04:19.000000000 +1000
+++ scim-1.4.18/debian/rules	2018-06-17 19:03:55.000000000 +1000
@@ -1,6 +1,7 @@
 #!/usr/bin/make -f
 export DH_VERBOSE=1
 export DH_OPTIONS=-v
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 export DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 
 %:
@@ -28,8 +29,6 @@
 override_dh_install-arch:
 	dh_install
 	sed -i -e 's/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' debian/scim/etc/X11/xinit/xinput.d/scim-immodule
-	LD_LIBRARY_PATH=debian/libscim8v5/usr/lib/$(DEB_HOST_MULTIARCH):$(LD_LIBRARY_PATH) \
-		dh_gtkmodules -p scim-gtk-immodule
 
 override_dh_makeshlibs:
 	dh_makeshlibs -p libscim8v5 -V "libscim8v5 (>= 1.4)"
