[R-pkg-team] Bug#1028124: Acknowledgement (r-cran-hunspell: old copy of internal hunspell headers breaks (autopkg)test with hunspell 1.7.2)

Rene Engelhard rene at debian.org
Sat Jan 7 14:40:48 GMT 2023


Hi again,

 > Updating those headers from hunspell 1.7.2 makes it work. The build and
(build-time) test passes.
 >
 > I have attached a full debdiff (also with . I can NMU if you wish 
(debdiff + adding bug number of this and the clean issue) and upload 
hunspell 1.7.2 to sid in the same go or you upload and I'll follow with 
an hunspell upload after it.

This probably also should result in an updated runtime dependency. Since 
this is for private stuff I'd avoid bumping hunspells .shlibs for all 
packages.

I think we should add a shlibs.local dpkg-shlibdeps will automatically 
pick up.

Done in attached new debdiff.

Regards,

Rene

-------------- next part --------------
diff -Nru r-cran-hunspell-3.0.2+dfsg/debian/changelog r-cran-hunspell-3.0.2+dfsg/debian/changelog
--- r-cran-hunspell-3.0.2+dfsg/debian/changelog	2022-09-12 12:37:44.000000000 +0200
+++ r-cran-hunspell-3.0.2+dfsg/debian/changelog	2023-01-07 15:37:01.000000000 +0100
@@ -1,3 +1,13 @@
+r-cran-hunspell (3.0.2+dfsg-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * update copy of (private) htypes.hxx and csutil.hxx to fix build
+    with hunspell 1.7.2. Bump (build-)dependency (closes: #1028124)
+  * add override_dh_auto_clean to clean up generated files
+    (closes: #1028123)
+
+ -- Rene Engelhard <rene at debian.org>  Sat, 07 Jan 2023 14:37:01 +0000
+
 r-cran-hunspell (3.0.2+dfsg-1) unstable; urgency=medium
 
   * New upstream version
diff -Nru r-cran-hunspell-3.0.2+dfsg/debian/control r-cran-hunspell-3.0.2+dfsg/debian/control
--- r-cran-hunspell-3.0.2+dfsg/debian/control	2022-09-12 12:37:44.000000000 +0200
+++ r-cran-hunspell-3.0.2+dfsg/debian/control	2023-01-07 14:35:04.000000000 +0100
@@ -14,7 +14,7 @@
                r-base-dev,
                r-cran-rcpp,
                r-cran-digest,
-               libhunspell-dev
+               libhunspell-dev (>= 1.7.2+really1.7.2)
 Testsuite: autopkgtest-pkg-r
 
 Package: r-cran-hunspell
diff -Nru r-cran-hunspell-3.0.2+dfsg/debian/hunspell/csutil.hxx r-cran-hunspell-3.0.2+dfsg/debian/hunspell/csutil.hxx
--- r-cran-hunspell-3.0.2+dfsg/debian/hunspell/csutil.hxx	2022-09-12 12:37:44.000000000 +0200
+++ r-cran-hunspell-3.0.2+dfsg/debian/hunspell/csutil.hxx	2023-01-07 14:34:41.000000000 +0100
@@ -1,7 +1,7 @@
 /* ***** BEGIN LICENSE BLOCK *****
  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  *
- * Copyright (C) 2002-2017 Németh László
+ * Copyright (C) 2002-2022 Németh László
  *
  * The contents of this file are subject to the Mozilla Public License Version
  * 1.1 (the "License"); you may not use this file except in compliance with
@@ -78,7 +78,9 @@
 #include <fstream>
 #include <string>
 #include <vector>
-#include <string.h>
+#include <cassert>
+#include <cstring>
+#include <algorithm>
 #include "w_char.hxx"
 #include "htypes.hxx"
 
@@ -135,14 +137,12 @@
 
 // convert UTF-8 characters to UTF-16
 LIBHUNSPELL_DLL_EXPORTED int u8_u16(std::vector<w_char>& dest,
-                                    const std::string& src);
+                                    const std::string& src,
+                                    bool only_convert_first_letter = false);
 
 // remove end of line char(s)
 LIBHUNSPELL_DLL_EXPORTED void mychomp(std::string& s);
 
-// duplicate string
-LIBHUNSPELL_DLL_EXPORTED char* mystrdup(const char* s);
-
 // parse into tokens with char delimiter
 LIBHUNSPELL_DLL_EXPORTED std::string::const_iterator mystrsep(const std::string &str,
                                                               std::string::const_iterator& start);
@@ -181,8 +181,6 @@
   unsigned char cupper;
 };
 
-LIBHUNSPELL_DLL_EXPORTED void initialize_utf_tbl();
-LIBHUNSPELL_DLL_EXPORTED void free_utf_tbl();
 LIBHUNSPELL_DLL_EXPORTED unsigned short unicodetoupper(unsigned short c,
                                                        int langnum);
 LIBHUNSPELL_DLL_EXPORTED w_char upper_utf(w_char u, int langnum);
@@ -276,10 +274,8 @@
 // "likely false", if ignored_chars characters are not ASCII)
 inline bool has_no_ignored_chars(const std::string& word,
                             const std::string& ignored_chars) {
-  for (std::string::const_iterator it = ignored_chars.begin(), end = ignored_chars.end(); it != end; ++it)
-    if (word.find(*it) != std::string::npos)
-      return false;
-  return true;
+  return std::all_of(ignored_chars.begin(), ignored_chars.end(), 
+    [&word](char ic) { return word.find(ic) == std::string::npos; });
 }
 
 // hash entry macros
@@ -319,9 +315,9 @@
   return ret;
 }
 
-inline char* HENTRY_FIND(struct hentry* h,
-                                                  const char* p) {
-  return (HENTRY_DATA(h) ? strstr(HENTRY_DATA(h), p) : NULL);
+inline char* HENTRY_FIND(struct hentry* h, const char* p) {
+  char* data = HENTRY_DATA(h);
+  return data ? strstr(data, p) : NULL;
 }
 
 #endif
diff -Nru r-cran-hunspell-3.0.2+dfsg/debian/hunspell/htypes.hxx r-cran-hunspell-3.0.2+dfsg/debian/hunspell/htypes.hxx
--- r-cran-hunspell-3.0.2+dfsg/debian/hunspell/htypes.hxx	2022-09-12 12:37:44.000000000 +0200
+++ r-cran-hunspell-3.0.2+dfsg/debian/hunspell/htypes.hxx	2023-01-07 14:34:34.000000000 +0100
@@ -1,7 +1,7 @@
 /* ***** BEGIN LICENSE BLOCK *****
  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  *
- * Copyright (C) 2002-2017 Németh László
+ * Copyright (C) 2002-2022 Németh László
  *
  * The contents of this file are subject to the Mozilla Public License Version
  * 1.1 (the "License"); you may not use this file except in compliance with
diff -Nru r-cran-hunspell-3.0.2+dfsg/debian/rules r-cran-hunspell-3.0.2+dfsg/debian/rules
--- r-cran-hunspell-3.0.2+dfsg/debian/rules	2022-09-12 12:37:44.000000000 +0200
+++ r-cran-hunspell-3.0.2+dfsg/debian/rules	2023-01-07 15:12:22.000000000 +0100
@@ -3,6 +3,10 @@
 %:
 	dh $@ --buildsystem R
 
+override_dh_auto_clean:
+	dh_auto_clean
+	rm -f src/hunspell/*
+
 override_dh_auto_build:
 	# FIXME: For the moment hack missing header files in here
 	# Once we are sure that package build file bug report against
diff -Nru r-cran-hunspell-3.0.2+dfsg/debian/shlibs.local r-cran-hunspell-3.0.2+dfsg/debian/shlibs.local
--- r-cran-hunspell-3.0.2+dfsg/debian/shlibs.local	1970-01-01 01:00:00.000000000 +0100
+++ r-cran-hunspell-3.0.2+dfsg/debian/shlibs.local	2023-01-07 15:35:15.000000000 +0100
@@ -0,0 +1 @@
+libhunspell-1.7	0 libhunspell-1.7-0 (>= 1.7.2+really1.7.2)


More information about the R-pkg-team mailing list