code:
From 99b578501643377e0b1994b2a068b790d189d5ad Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Wed, 13 Jun 2018 09:41:01 -0400
Subject: [PATCH] remove extra decl

Signed-off-by: Peter Jones <pjones@redhat.com>
---
 src/efibootmgr.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/efibootmgr.c b/src/efibootmgr.c
index de38f01..4e1a680 100644
--- a/src/efibootmgr.c
+++ b/src/efibootmgr.c
@@ -1536,9 +1536,6 @@ parse_opts(int argc, char **argv)
 					       "invalid numeric value %s\n",
 					       optarg);
 			}
-                        /* XXX efivar-36 accidentally doesn't have a public
-                         * header for this */
-			extern int efi_set_verbose(int verbosity, FILE *errlog);
 			efi_set_verbose(opts.verbose - 2, stderr);
 			break;
 		case 'V':
--
2.24.0


code:
Fix build with -Werror=address-of-packed-member, which is default since
GCC 9.

This is a combination of three upstream commits:

  https://github.com/rhboot/efivar/commit/b98ba8921010d03f46704a476c69861515deb1ca
  https://github.com/rhboot/efivar/commit/c3c553db85ff10890209d0fe48fb4856ad68e4e0
  https://github.com/rhboot/efivar/commit/0dad6d78a7fb5f6c5fb4a1d646040539db6cf865

diff --git a/src/dp-media.c b/src/dp-media.c
index 96a576f..be691c4 100644
--- a/src/dp-media.c
+++ b/src/dp-media.c
@@ -46,8 +46,7 @@ _format_media_dn(char *buf, size_t size, const_efidp dp)
 			break;
 		case EFIDP_HD_SIGNATURE_GUID:
 			format(buf, size, off, "HD", "GPT,");
-			format_guid(buf, size, off, "HD",
-				    (efi_guid_t *)dp->hd.signature);
+			format_guid(buf, size, off, "HD", dp->hd.signature);
 			format(buf, size, off, "HD",
 			       ",0x%"PRIx64",0x%"PRIx64")",
 			       dp->hd.start, dp->hd.size);
diff --git a/src/dp-message.c b/src/dp-message.c
index 3724e5f..6b8e907 100644
--- a/src/dp-message.c
+++ b/src/dp-message.c
@@ -364,7 +364,7 @@ _format_message_dn(char *buf, size_t size, const_efidp dp)
 			       dp->infiniband.port_gid[1],
 			       dp->infiniband.port_gid[0]);
 			format_guid(buf, size, off, "Infiniband",
-				    (efi_guid_t *)&dp->infiniband.ioc_guid);
+				    &dp->infiniband.ioc_guid);
 			format(buf, size, off, "Infiniband",
 			       ",%"PRIu64",%"PRIu64")",
 			       dp->infiniband.target_port_id,
@@ -620,11 +620,13 @@ _format_message_dn(char *buf, size_t size, const_efidp dp)
 			  ) / sizeof(efi_ip_addr_t);
 		format(buf, size, off, "Dns", "Dns(");
 		for (int i=0; i < end; i++) {
-			const efi_ip_addr_t *addr = &dp->dns.addrs[i];
+			efi_ip_addr_t addr;
+
+			memcpy(&addr, &dp->dns.addrs[i], sizeof(addr));
 			if (i != 0)
 				format(buf, size, off, "Dns", ",");
 			format_ip_addr(buf, size, off, "Dns",
-				       dp->dns.is_ipv6, addr);
+				       dp->dns.is_ipv6, &addr);
 		}
 		format(buf, size, off, "Dns", ")");
 		break;
diff --git a/src/dp.h b/src/dp.h
index aa4e390..1f921d5 100644
--- a/src/dp.h
+++ b/src/dp.h
@@ -70,8 +70,11 @@
 #define format_guid(buf, size, off, dp_type, guid) ({			\
 		int _rc;						\
 		char *_guidstr = NULL;					\
+		efi_guid_t _guid;					\
+		const efi_guid_t * const _guid_p = &_guid;		\
 									\
-		_rc = efi_guid_to_str(guid, &_guidstr);			\
+		memmove(&_guid, guid, sizeof(_guid));			\
+		_rc = efi_guid_to_str(_guid_p, &_guidstr);		\
 		if (_rc < 0) {						\
 			efi_error("could not build %s GUID DP string",	\
 				  dp_type);				\
@@ -79,7 +82,7 @@
 			_guidstr = onstack(_guidstr,			\
 					   strlen(_guidstr)+1);		\
 			_rc = format(buf, size, off, dp_type, "%s",	\
-				     _guidstr);	\
+				     _guidstr);				\
 		}							\
 		_rc;							\
 	})
diff --git a/src/guid.c b/src/guid.c
index 306c9ff..3156b3b 100644
--- a/src/guid.c
+++ b/src/guid.c
@@ -31,7 +31,7 @@
 extern const efi_guid_t efi_guid_zero;

 int NONNULL(1, 2) PUBLIC
-efi_guid_cmp(const efi_guid_t *a, const efi_guid_t *b)
+efi_guid_cmp(const void * const a, const void * const b)
 {
 	return memcmp(a, b, sizeof (efi_guid_t));
 }
diff --git a/src/include/efivar/efivar.h b/src/include/efivar/efivar.h
index 316891c..ad6449d 100644
--- a/src/include/efivar/efivar.h
+++ b/src/include/efivar/efivar.h
@@ -128,7 +128,7 @@ extern int efi_symbol_to_guid(const char *symbol, efi_guid_t *guid)

 extern int efi_guid_is_zero(const efi_guid_t *guid);
 extern int efi_guid_is_empty(const efi_guid_t *guid);
-extern int efi_guid_cmp(const efi_guid_t *a, const efi_guid_t *b);
+extern int efi_guid_cmp(const void * const a, const void * const b);

 /* import / export functions */
 typedef struct efi_variable efi_variable_t;
diff --git a/src/ucs2.h b/src/ucs2.h
index dbb5900..edd8367 100644
--- a/src/ucs2.h
+++ b/src/ucs2.h
@@ -23,16 +23,21 @@
 	(((val) & ((mask) << (shift))) >> (shift))

 static inline size_t UNUSED
-ucs2len(const uint16_t * const s, ssize_t limit)
+ucs2len(const void *vs, ssize_t limit)
 {
 	ssize_t i;
-	for (i = 0; i < (limit >= 0 ? limit : i+1) && s[i] != (uint16_t)0; i++)
+	const uint16_t *s = vs;
+	const uint8_t *s8 = vs;
+
+	for (i = 0;
+	     i < (limit >= 0 ? limit : i+1) && s8[0] != 0 && s8[1] != 0;
+	     i++, s8 += 2, s++)
 		;
 	return i;
 }

 static inline size_t UNUSED
-ucs2size(const uint16_t * const s, ssize_t limit)
+ucs2size(const void *s, ssize_t limit)
 {
 	size_t rc = ucs2len(s, limit);
 	rc *= sizeof (uint16_t);
@@ -69,10 +74,11 @@ utf8size(uint8_t *s, ssize_t limit)
 }

 static inline unsigned char * UNUSED
-ucs2_to_utf8(const uint16_t * const chars, ssize_t limit)
+ucs2_to_utf8(const void * const voidchars, ssize_t limit)
 {
 	ssize_t i, j;
 	unsigned char *ret;
+	const uint16_t * const chars = voidchars;

 	if (limit < 0)
 		limit = ucs2len(chars, -1);
@@ -124,10 +130,12 @@ ucs2_to_utf8(const uint16_t * const chars, ssize_t limit)
 }

 static inline ssize_t UNUSED NONNULL(4)
-utf8_to_ucs2(uint16_t *ucs2, ssize_t size, int terminate, uint8_t *utf8)
+utf8_to_ucs2(void *ucs2void, ssize_t size, int terminate, uint8_t *utf8)
 {
 	ssize_t req;
 	ssize_t i, j;
+	uint16_t *ucs2 = ucs2void;
+	uint16_t val16;

 	if (!ucs2 && size > 0) {
 		errno = EINVAL;
@@ -162,10 +170,13 @@ utf8_to_ucs2(uint16_t *ucs2, ssize_t size, int terminate, uint8_t *utf8)
 			val = utf8[i] & 0x7f;
 			i += 1;
 		}
-		ucs2[j] = val;
+		val16 = val;
+		ucs2[j] = val16;
+	}
+	if (terminate) {
+		val16 = 0;
+		ucs2[j++] = val16;
 	}
-	if (terminate)
-		ucs2[j++] = (uint16_t)0;
 	return j;
 };

repo_name: maximed/guix

license: mit


code:
From ef3cc72cb65e2d500459c178c63e349bacfa834f Mon Sep 17 00:00:00 2001
From: Luke Peterson <hazelnusse@gmail.com>
Date: Thu, 8 Oct 2020 12:16:53 -0700
Subject: [PATCH] Remove error counting in OpenMP parallelize_gemm

This resolves a compilation error associated with
Eigen::eigen_assert_exception. It also eliminates the counting of
exceptions that may occur in the OpenMP parallel section. If an
unhandled exception occurs in this section, the behavior is non-conforming
according to the OpenMP specification.
---
 Eigen/src/Core/products/Parallelizer.h | 14 +++++---------
 test/CMakeLists.txt                    |  2 +-
 2 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/Eigen/src/Core/products/Parallelizer.h b/Eigen/src/Core/products/Parallelizer.h
index 67b2442b5..a3cc05b77 100644
--- a/Eigen/src/Core/products/Parallelizer.h
+++ b/Eigen/src/Core/products/Parallelizer.h
@@ -132,8 +132,7 @@ void parallelize_gemm(const Functor& func, Index rows, Index cols, Index depth,

   ei_declare_aligned_stack_constructed_variable(GemmParallelInfo<Index>,info,threads,0);

-  int errorCount = 0;
-  #pragma omp parallel num_threads(threads) reduction(+: errorCount)
+  #pragma omp parallel num_threads(threads)
   {
     Index i = omp_get_thread_num();
     // Note that the actual number of threads might be lower than the number of request ones.
@@ -152,14 +151,11 @@ void parallelize_gemm(const Functor& func, Index rows, Index cols, Index depth,
     info[i].lhs_start = r0;
     info[i].lhs_length = actualBlockRows;

-    EIGEN_TRY {
-      if(transpose) func(c0, actualBlockCols, 0, rows, info);
-      else          func(0, rows, c0, actualBlockCols, info);
-    } EIGEN_CATCH(...) {
-      ++errorCount;
-    }
+    if(transpose)
+      func(c0, actualBlockCols, 0, rows, info);
+    else
+      func(0, rows, c0, actualBlockCols, info);
   }
-  if (errorCount) EIGEN_THROW_X(Eigen::eigen_assert_exception());
 #endif
 }

diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 0747aa6cb..b02577780 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -163,7 +163,7 @@ ei_add_test(constructor)
 ei_add_test(linearstructure)
 ei_add_test(integer_types)
 ei_add_test(unalignedcount)
-if(NOT EIGEN_TEST_NO_EXCEPTIONS)
+if(NOT EIGEN_TEST_NO_EXCEPTIONS AND NOT EIGEN_TEST_OPENMP)
   ei_add_test(exceptions)
 endif()
 ei_add_test(redux)
--
GitLab


code:
From: Tobias Geerinckx-Rice <me@tobias.gr>
Date: Mon, 16 Mar 2020 22:51:37 +0000
Subject: gnu: eigen: Stabilise sparseqr test.

Taken verbatim from this[0] upstream commit.

[0]: https://gitlab.com/libeigen/eigen/-/commit/3b5deeb546d4017b24846f5b0dc3296a50a039fe

From 3b5deeb546d4017b24846f5b0dc3296a50a039fe Mon Sep 17 00:00:00 2001
From: Gael Guennebaud <g.gael@free.fr>
Date: Tue, 19 Feb 2019 22:57:51 +0100
Subject: [PATCH] bug #899: make sparseqr unit test more stable by 1) trying
 with larger threshold and 2) relax rank computation for rank-deficient
 problems.

---
 test/sparseqr.cpp | 31 ++++++++++++++++++++++++++-----
 1 file changed, 26 insertions(+), 5 deletions(-)

diff --git a/test/sparseqr.cpp b/test/sparseqr.cpp
index 3ffe62314..3576cc626 100644
--- a/test/sparseqr.cpp
+++ b/test/sparseqr.cpp
@@ -43,6 +43,7 @@ int generate_sparse_rectangular_problem(MatrixType& A, DenseMat& dA, int maxRows

 template<typename Scalar> void test_sparseqr_scalar()
 {
+  typedef typename NumTraits<Scalar>::Real RealScalar;
   typedef SparseMatrix<Scalar,ColMajor> MatrixType;
   typedef Matrix<Scalar,Dynamic,Dynamic> DenseMat;
   typedef Matrix<Scalar,Dynamic,1> DenseVector;
@@ -91,14 +92,34 @@ template<typename Scalar> void test_sparseqr_scalar()
     exit(0);
     return;
   }
-
-  VERIFY_IS_APPROX(A * x, b);
-
-  //Compare with a dense QR solver
+
+  // Compare with a dense QR solver
   ColPivHouseholderQR<DenseMat> dqr(dA);
   refX = dqr.solve(b);

-  VERIFY_IS_EQUAL(dqr.rank(), solver.rank());
+  bool rank_deficient = A.cols()>A.rows() || dqr.rank()<A.cols();
+  if(rank_deficient)
+  {
+    // rank deficient problem -> we might have to increase the threshold
+    // to get a correct solution.
+    RealScalar th = RealScalar(20)*dA.colwise().norm().maxCoeff()*(A.rows()+A.cols()) * NumTraits<RealScalar>::epsilon();
+    for(Index k=0; (k<16) && !test_isApprox(A*x,b); ++k)
+    {
+      th *= RealScalar(10);
+      solver.setPivotThreshold(th);
+      solver.compute(A);
+      x = solver.solve(b);
+    }
+  }
+
+  VERIFY_IS_APPROX(A * x, b);
+
+  // For rank deficient problem, the estimated rank might
+  // be slightly off, so let's only raise a warning in such cases.
+  if(rank_deficient) ++g_test_level;
+  VERIFY_IS_EQUAL(solver.rank(), dqr.rank());
+  if(rank_deficient) --g_test_level;
+
   if(solver.rank()==A.cols()) // full rank
     VERIFY_IS_APPROX(x, refX);
 //   else
--
2.24.1


code:
These patches are required to build with a modern GCC; most of them
are taken from the Debian package. Upstream has disappeared.

diff -r -u einstein-2.0.orig/convert.h einstein-2.0/convert.h
--- einstein-2.0.orig/convert.h	2005-08-14 04:40:58.000000000 +0200
+++ einstein-2.0/convert.h	2016-03-05 18:25:08.488917021 +0100
@@ -5,6 +5,7 @@
 #include <iostream>
 #include <sstream>
 #include <string>
+#include <typeinfo>

 #include "exceptions.h"
 #include "unicode.h"
diff -r -u einstein-2.0.orig/descr.cpp einstein-2.0/descr.cpp
--- einstein-2.0.orig/descr.cpp	2005-08-17 15:42:29.000000000 +0200
+++ einstein-2.0/descr.cpp	2016-03-05 18:29:27.960352230 +0100
@@ -139,9 +139,9 @@
 {
     currentPage = 0;
     //area.add(parentArea, false);
-    titleFont = new Font(L"nova.ttf", 26);
-    buttonFont = new Font(L"laudcn2.ttf", 14);
-    textFont = new Font(L"laudcn2.ttf", 16);
+    titleFont = new Font(L"DejaVuSans.ttf", 26);
+    buttonFont = new Font(L"DejaVuSans.ttf", 14);
+    textFont = new Font(L"DejaVuSans.ttf", 16);
     textHeight = (int)(textFont->getHeight(L"A") * 1.0);
     text = new TextParser(msg(L"rulesText"), *textFont, START_X, START_Y,
                 CLIENT_WIDTH, CLIENT_HEIGHT);
diff -r -u einstein-2.0.orig/font.h einstein-2.0/font.h
--- einstein-2.0.orig/font.h	2005-08-16 00:33:17.000000000 +0200
+++ einstein-2.0/font.h	2016-03-05 18:22:05.563794039 +0100
@@ -3,7 +3,7 @@

 #include <string>
-#include <SDL_ttf.h>
+#include <SDL/SDL_ttf.h>

 class Font
diff -r -u einstein-2.0.orig/formatter.cpp einstein-2.0/formatter.cpp
--- einstein-2.0.orig/formatter.cpp	2005-08-14 04:40:58.000000000 +0200
+++ einstein-2.0/formatter.cpp	2016-03-05 18:18:41.146882565 +0100
@@ -58,7 +58,7 @@
             if ((c.type == INT_ARG) || (c.type == STRING_ARG) ||
                     (c.type == FLOAT_ARG) || (c.type == DOUBLE_ARG))
             {
-                int no = (int)c.data;
+                long no = (long)c.data;
                 args[no - 1] = c.type;
             }
         }
@@ -123,7 +123,7 @@
 std::wstring Formatter::format(std::vector<ArgValue*> &argValues) const
 {
     std::wstring s;
-    int no;
+    long no;

     for (int i = 0; i < commandsCnt; i++) {
         Command *cmd = &commands[i];
@@ -135,8 +135,8 @@

             case STRING_ARG:
             case INT_ARG:
-                no = (int)cmd->data - 1;
-                if (no < (int)argValues.size())
+                no = (long)cmd->data - 1;
+                if (no < (long)argValues.size())
                     s += argValues[no]->format(cmd);
                 break;

diff -r -u einstein-2.0.orig/game.cpp einstein-2.0/game.cpp
--- einstein-2.0.orig/game.cpp	2005-08-23 00:44:54.000000000 +0200
+++ einstein-2.0/game.cpp	2016-03-05 18:29:27.960352230 +0100
@@ -33,7 +33,7 @@
     screen.draw(8, 10, tile);
     SDL_FreeSurface(tile);

-    Font titleFont(L"nova.ttf", 28);
+    Font titleFont(L"DejaVuSans.ttf", 28);
     titleFont.draw(screen.getSurface(), 20, 20, 255,255,0, true,
             msg(L"einsteinPuzzle"));

@@ -89,7 +89,7 @@
 {
     lastRun = elapsed = lastUpdate = 0;
     stop();
-    font = new Font(L"luximb.ttf", 16);
+    font = new Font(L"DejaVuSans.ttf", 16);
 }

 Watch::Watch(std::istream &stream)
@@ -97,7 +97,7 @@
     elapsed = readInt(stream);
     lastUpdate = 0;
     stop();
-    font = new Font(L"luximb.ttf", 16);
+    font = new Font(L"DejaVuSans.ttf", 16);
 }

 Watch::~Watch()
@@ -178,7 +178,7 @@
             watch->stop();
             Area area;
             area.add(background, false);
-            Font font(L"laudcn2.ttf", 16);
+            Font font(L"DejaVuSans.ttf", 16);
             area.add(new Window(280, 275, 240, 50, L"greenpattern.bmp", 6));
             area.add(new Label(&font, 280, 275, 240, 50, Label::ALIGN_CENTER,
                 Label::ALIGN_MIDDLE, 255,255,0, msg(L"paused")));
@@ -209,7 +209,7 @@
         virtual void doAction() {
             sound->play(L"applause.wav");
             watch->stop();
-            Font font(L"laudcn2.ttf", 20);
+            Font font(L"DejaVuSans.ttf", 20);
             showMessageWindow(gameArea, L"marble1.bmp",
                     500, 70, &font, 255,0,0, msg(L"won"));
             gameArea->draw();
@@ -257,8 +257,8 @@
             sound->play(L"glasbk2.wav");
             bool restart = false;
             bool newGame = false;
-            Font font(L"laudcn2.ttf", 24);
-            Font btnFont(L"laudcn2.ttf", 14);
+            Font font(L"DejaVuSans.ttf", 24);
+            Font btnFont(L"DejaVuSans.ttf", 14);
             Area area;
             area.add(gameArea);
             area.add(new Window(220, 240, 360, 140, L"redpattern.bmp", 6));
@@ -329,7 +329,7 @@
         CheatCommand(Area *a) { gameArea = a; };

         virtual void doAction() {
-            Font font(L"nova.ttf", 30);
+            Font font(L"DejaVuSans.ttf", 30);
             showMessageWindow(gameArea, L"darkpattern.bmp",
                     500, 100, &font, 255,255,255,
                     msg(L"iddqd"));
@@ -475,7 +475,7 @@
     drawWallpaper(L"rain.bmp");
     Window window(230, 260, 340, 80, L"greenpattern.bmp", 6);
     window.draw();
-    Font font(L"laudcn2.ttf", 16);
+    Font font(L"DejaVuSans.ttf", 16);
     Label label(&font, 280, 275, 240, 50, Label::ALIGN_CENTER,
                 Label::ALIGN_MIDDLE, 255,255,0, msg(L"loading"));
     label.draw();
@@ -533,7 +533,7 @@
 void Game::run()
 {
     Area area;
-    Font btnFont(L"laudcn2.ttf", 14);
+    Font btnFont(L"DejaVuSans.ttf", 14);

     area.setTimer(300, watch);

diff -r -u einstein-2.0.orig/main.cpp einstein-2.0/main.cpp
--- einstein-2.0.orig/main.cpp	2005-09-26 12:32:54.000000000 +0200
+++ einstein-2.0/main.cpp	2016-03-05 18:29:27.960352230 +0100
@@ -2,7 +2,7 @@
 #include <iostream>
 #include <SDL.h>
 #include <SDL_main.h>
-#include <SDL_ttf.h>
+#include <SDL/SDL_ttf.h>
 #include "main.h"
 #include "utils.h"
 #include "storage.h"
@@ -78,7 +78,7 @@
 /*static void checkBetaExpire()
 {
     if (1124832535L + 60L*60L*24L*40L < time(NULL)) {
-        Font font(L"laudcn2.ttf", 16);
+        Font font(L"DejaVuSans.ttf", 16);
         Area area;
         showMessageWindow(&area, L"darkpattern.bmp",
                 700, 100, &font, 255,255,255,
diff -r -u einstein-2.0.orig/Makefile einstein-2.0/Makefile
--- einstein-2.0.orig/Makefile	2005-09-25 23:20:30.000000000 +0200
+++ einstein-2.0/Makefile	2016-03-05 18:14:22.365450608 +0100
@@ -49,10 +49,14 @@

 $(TARGET): $(OBJECTS)
+	cd mkres && make
+	cd res && ../mkres/mkres --source resources.descr --output ../einstein.res
 	$(CXX) $(LNFLAGS) $(OBJECTS) -o $(TARGET)

 clean:
 	rm -f $(OBJECTS) core* *core $(TARGET) *~
+	cd res && rm -f einstein.res
+	cd mkres && make clean

 depend:
 	@makedepend $(SOURCES) 2> /dev/null
diff -r -u einstein-2.0.orig/menu.cpp einstein-2.0/menu.cpp
--- einstein-2.0.orig/menu.cpp	2005-09-25 22:51:00.000000000 +0200
+++ einstein-2.0/menu.cpp	2016-03-05 18:29:27.960352230 +0100
@@ -23,11 +23,11 @@
     SDL_Surface *title = loadImage(L"nova.bmp");
     screen.draw(0, 0, title);
     SDL_FreeSurface(title);
-    Font font(L"nova.ttf", 28);
+    Font font(L"DejaVuSans.ttf", 28);
     std::wstring s(msg(L"einsteinFlowix"));
     int width = font.getWidth(s);
     font.draw((screen.getWidth() - width) / 2, 30, 255,255,255, true, s);
-    Font urlFont(L"luximb.ttf", 16);
+    Font urlFont(L"DejaVuSans.ttf", 16);
     s = L"http://games.flowix.com";
     width = urlFont.getWidth(s);
     urlFont.draw((screen.getWidth() - width) / 2, 60, 255,255,0, true, s);
@@ -133,9 +133,9 @@

         virtual void doAction() {
             Area area;
-            Font titleFont(L"nova.ttf", 26);
-            Font font(L"laudcn2.ttf", 14);
-            Font urlFont(L"luximb.ttf", 16);
+            Font titleFont(L"DejaVuSans.ttf", 26);
+            Font font(L"DejaVuSans.ttf", 14);
+            Font urlFont(L"DejaVuSans.ttf", 16);

 #define LABEL(pos, c, f, text) area.add(new Label(&f, 220, pos, 360, 20, \
             Label::ALIGN_CENTER, Label::ALIGN_MIDDLE, 255,255,c, text));
@@ -171,7 +171,7 @@
 void menu()
 {
     Area area;
-    Font font(L"laudcn2.ttf", 20);
+    Font font(L"DejaVuSans.ttf", 20);

     area.add(new MenuBackground());
     area.draw();
diff -r -u einstein-2.0.orig/mkres/compressor.cpp einstein-2.0/mkres/compressor.cpp
--- einstein-2.0.orig/mkres/compressor.cpp	2005-08-14 04:40:58.000000000 +0200
+++ einstein-2.0/mkres/compressor.cpp	2016-03-05 18:26:13.194264129 +0100
@@ -2,6 +2,7 @@
 #include <zlib.h>
 #include "convert.h"
 #include "exceptions.h"
+#include "string.h"

 ResourceCompressor::ResourceCompressor()
diff -r -u einstein-2.0.orig/mkres/convert.h einstein-2.0/mkres/convert.h
--- einstein-2.0.orig/mkres/convert.h	2005-08-14 04:40:58.000000000 +0200
+++ einstein-2.0/mkres/convert.h	2016-03-05 18:25:21.479990669 +0100
@@ -5,6 +5,7 @@
 #include <iostream>
 #include <sstream>
 #include <string>
+#include <typeinfo>

 #include "exceptions.h"
 #include "unicode.h"
diff -r -u einstein-2.0.orig/mkres/main.cpp einstein-2.0/mkres/main.cpp
--- einstein-2.0.orig/mkres/main.cpp	2005-08-14 04:40:58.000000000 +0200
+++ einstein-2.0/mkres/main.cpp	2016-03-05 18:25:55.062765900 +0100
@@ -1,5 +1,6 @@
 #include "compressor.h"
 #include "exceptions.h"
+#include "string.h"
 #include "unicode.h"
 #include "table.h"

diff -r -u einstein-2.0.orig/mkres/unicode.cpp einstein-2.0/mkres/unicode.cpp
--- einstein-2.0.orig/mkres/unicode.cpp	2005-08-14 04:40:58.000000000 +0200
+++ einstein-2.0/mkres/unicode.cpp	2016-03-05 18:26:28.065492890 +0100
@@ -5,6 +5,7 @@
 #endif
 #include "unicode.h"
 #include "exceptions.h"
+#include "string.h"

 /// Returns length of wide character in utf-8
diff -r -u einstein-2.0.orig/opensave.cpp einstein-2.0/opensave.cpp
--- einstein-2.0.orig/opensave.cpp	2005-08-14 23:33:36.000000000 +0200
+++ einstein-2.0/opensave.cpp	2016-03-05 18:29:27.960352230 +0100
@@ -160,7 +160,7 @@
 static void showListWindow(SavesList &list, Command **commands,
         const std::wstring &title, Area &area, Font *font)
 {
-    Font titleFont(L"nova.ttf", 26);
+    Font titleFont(L"DejaVuSans.ttf", 26);

     area.add(new Window(250, 90, 300, 420, L"blue.bmp"));
     area.add(new Label(&titleFont, 250, 95, 300, 40, Label::ALIGN_CENTER,
@@ -189,7 +189,7 @@

     Area area;
     area.add(parentArea, false);
-    Font font(L"laudcn2.ttf", 14);
+    Font font(L"DejaVuSans.ttf", 14);
     bool saved = false;

     SavesList list;
@@ -258,7 +258,7 @@

     Area area;
     area.add(parentArea, false);
-    Font font(L"laudcn2.ttf", 14);
+    Font font(L"DejaVuSans.ttf", 14);

     Game *newGame = NULL;

diff -r -u einstein-2.0.orig/options.cpp einstein-2.0/options.cpp
--- einstein-2.0.orig/options.cpp	2005-09-26 12:33:18.000000000 +0200
+++ einstein-2.0/options.cpp	2016-03-05 18:29:27.960352230 +0100
@@ -53,8 +53,8 @@

 void showOptionsWindow(Area *parentArea)
 {
-    Font titleFont(L"nova.ttf", 26);
-    Font font(L"laudcn2.ttf", 14);
+    Font titleFont(L"DejaVuSans.ttf", 26);
+    Font font(L"DejaVuSans.ttf", 14);

     bool fullscreen = (getStorage()->get(L"fullscreen", 1) != 0);
     bool niceCursor = (getStorage()->get(L"niceCursor", 1) != 0);
diff -r -u einstein-2.0.orig/res/resources.descr einstein-2.0/res/resources.descr
--- einstein-2.0.orig/res/resources.descr	2005-09-25 22:51:14.000000000 +0200
+++ einstein-2.0/res/resources.descr	2016-03-05 18:30:08.563704873 +0100
@@ -89,13 +89,11 @@
     { name = "title.bmp" }
     { name = "marble1.bmp" }
     { name = "blue.bmp" }
-    { name = "luximb.ttf" }
     { name = "redpattern.bmp" }
     { name = "greenpattern.bmp" }
     { name = "darkpattern.bmp" }
     { name = "nova.bmp" }
-    { name = "nova.ttf" }
-    { name = "laudcn2.ttf" }
+    { name = "DejaVuSans.ttf" }
     { name = "btn.bmp" }
     { name = "rules.txt", format = "messages" group = "messages" }
     { name = "rules_ru.txt", format = "messages" group = "messages" }
Only in einstein-2.0/res: resources.descr.orig
diff -r -u einstein-2.0.orig/sound.h einstein-2.0/sound.h
--- einstein-2.0.orig/sound.h	2005-09-24 08:24:20.000000000 +0200
+++ einstein-2.0/sound.h	2016-03-05 18:22:19.314931225 +0100
@@ -4,7 +4,7 @@

 #include <string>
 #include <map>
-#include <SDL_mixer.h>
+#include <SDL/SDL_mixer.h>

 class Sound
diff -r -u einstein-2.0.orig/topscores.cpp einstein-2.0/topscores.cpp
--- einstein-2.0.orig/topscores.cpp	2005-08-14 23:08:43.000000000 +0200
+++ einstein-2.0/topscores.cpp	2016-03-05 18:29:27.970353055 +0100
@@ -103,9 +103,9 @@
 ScoresWindow::ScoresWindow(int x, int y, TopScores *scores, int highlight):
                 Window(x, y, 320, 350, L"blue.bmp")
 {
-    Font titleFont(L"nova.ttf", 26);
-    Font entryFont(L"laudcn2.ttf", 14);
-    Font timeFont(L"luximb.ttf", 14);
+    Font titleFont(L"DejaVuSans.ttf", 26);
+    Font entryFont(L"DejaVuSans.ttf", 14);
+    Font timeFont(L"DejaVuSans.ttf", 14);

     std::wstring txt = msg(L"topScores");
     int w = titleFont.getWidth(txt);
@@ -139,7 +139,7 @@
 {
     Area area;

-    Font font(L"laudcn2.ttf", 16);
+    Font font(L"DejaVuSans.ttf", 16);
     area.add(parentArea);
     area.add(new ScoresWindow(240, 125, scores, highlight));
     ExitCommand exitCmd(area);
@@ -154,7 +154,7 @@
 {
     Area area;

-    Font font(L"laudcn2.ttf", 16);
+    Font font(L"DejaVuSans.ttf", 16);
     area.add(parentArea);
     area.add(new Window(170, 280, 460, 100, L"blue.bmp"));
     Storage *storage = getStorage();
diff -r -u einstein-2.0.orig/unicode.cpp einstein-2.0/unicode.cpp
--- einstein-2.0.orig/unicode.cpp	2005-08-14 04:40:58.000000000 +0200
+++ einstein-2.0/unicode.cpp	2016-03-05 18:26:55.747780024 +0100
@@ -5,6 +5,7 @@
 #endif
 #include "unicode.h"
 #include "exceptions.h"
+#include "string.h"

 /// Returns length of wide character in utf-8


code:
This patch allows us to skip tests that require PTRACE_ATTACH in situations
where PTRACE_ATTACH is only allowed when CAP_SYS_PTRACE is held (i.e., for
root, by default.)

Reported at <https://bugzilla.redhat.com/show_bug.cgi?id=1210966>.

--- elfutils-0.161/tests/run-deleted.sh	2015-04-11 16:38:33.028556235 +0200
+++ elfutils-0.161/tests/run-deleted.sh	2015-04-11 16:46:15.012442185 +0200
@@ -17,6 +17,15 @@

 . $srcdir/backtrace-subr.sh

+# Check whether the Yama policy allows us to use PTRACE_ATTACH.
+if [ -f /proc/sys/kernel/yama/ptrace_scope ]
+then
+    if [ `cat /proc/sys/kernel/yama/ptrace_scope` -ne 0 ]
+    then
+	exit 77
+    fi
+fi
+
 tempfiles deleted deleted-lib.so
 cp -p ${abs_builddir}/deleted ${abs_builddir}/deleted-lib.so .

--- elfutils-0.161/tests/vdsosyms.c	2015-04-11 16:40:20.633461110 +0200
+++ elfutils-0.161/tests/vdsosyms.c	2015-04-11 16:45:06.611866677 +0200
@@ -23,6 +23,8 @@
 #include <stdio.h>
 #include <string.h>
 #include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
 #include <unistd.h>
 #include ELFUTILS_HEADER(dwfl)

@@ -68,6 +70,7 @@ module_callback (Dwfl_Module *mod, void
 int
 main (int argc __attribute__ ((unused)), char **argv __attribute__ ((unused)))
 {
+  static const char ptrace_scope_file[] = "/proc/sys/kernel/yama/ptrace_scope";
   static char *debuginfo_path;
   static const Dwfl_Callbacks proc_callbacks =
     {
@@ -76,6 +79,20 @@ main (int argc __attribute__ ((unused)),

       .find_elf = dwfl_linux_proc_find_elf,
     };
+
+  /* Check whether the Yama policy allows us to use PTRACE_ATTACH.  */
+  int ptrace_scope = open (ptrace_scope_file, O_RDONLY);
+  if (ptrace_scope >= 0)
+    {
+      char buf[10];
+      int count = read (ptrace_scope, buf, sizeof buf);
+      assert (count > 0);
+      if (buf[0] != '0')
+	/* We're not allowed, so skip this test.  */
+	return 77;
+      close (ptrace_scope);
+    }
+
   Dwfl *dwfl = dwfl_begin (&proc_callbacks);
   if (dwfl == NULL)
     error (2, 0, "dwfl_begin: %s", dwfl_errmsg (-1));


code:
In the package definition the call to the command 'git' is substituted with
the full path to the git executable. This change causes the mix formatting tool
to complain that the line is too long. This workaround reformats the file
after the substitution is made.

--- a/Makefile
+++ b/Makefile
@@ -265,6 +265,7 @@ format: compile
	$(call FORMAT)

 test_formatted: compile
+	$(call FORMAT,lib/mix/lib/mix/scm/git.ex)
	$(call FORMAT,--check-formatted)

 test_erlang: compile $(TEST_ERLS)


code:
commit 20d80e2323b565a36751c9455e535d8f73fa32f7
Author: Robert Vollmert <rob@vllmrt.net>
Date:   Fri Jun 14 16:05:47 2019 +0200

    disable reactor

diff --git a/elm.cabal b/elm.cabal
index c75f9689..ece63c46 100644
--- a/elm.cabal
+++ b/elm.cabal
@@ -45,9 +45,6 @@ Executable elm
         builder/src
         ui/terminal/src

-    other-extensions:
-        TemplateHaskell
-
     Main-Is:
         Main.hs

@@ -56,8 +53,6 @@ Executable elm
         Develop
         Develop.Generate.Help
         Develop.Generate.Index
-        Develop.StaticFiles
-        Develop.StaticFiles.Build
         Diff
         Init
         Install
diff --git a/ui/terminal/src/Develop.hs b/ui/terminal/src/Develop.hs
index 4b2252e1..7ed7716e 100644
--- a/ui/terminal/src/Develop.hs
+++ b/ui/terminal/src/Develop.hs
@@ -23,7 +23,6 @@ import Snap.Util.FileServe
 import qualified Elm.Project as Project
 import qualified Develop.Generate.Help as Generate
 import qualified Develop.Generate.Index as Index
-import qualified Develop.StaticFiles as StaticFiles
 import qualified Generate.Output as Output
 import qualified Json.Encode as Encode
 import qualified Reporting.Exit as Exit
@@ -219,16 +218,7 @@ compileToHtmlBuilder mode file =

 serveAssets :: Snap ()
-serveAssets =
-  do  file <- getSafePath
-      case StaticFiles.lookup file of
-        Nothing ->
-          pass
-
-        Just (content, mimeType) ->
-          do  modifyResponse (setContentType (mimeType <> ";charset=utf-8"))
-              writeBS content
-
+serveAssets = pass

 -- MIME TYPES
diff --git a/ui/terminal/src/Main.hs b/terminal/src/Main.hs
index 7000f3ca..2c76965a 100644
--- a/ui/terminal/src/Main.hs
+++ b/ui/terminal/src/Main.hs
@@ -39,7 +39,6 @@ main =
       complex intro outro
         [ repl
         , init
-        , reactor
         , make
         , install
         , bump


code:
commit e3512d887df41a8162c3e361171c04beca08415b
Author: Tom Stejskal <tom.stejskal@gmail.com>
Date:   Mon Nov 19 20:09:43 2018 +0100

    Fix Map.!: given key is not an element in the map

diff --git a/compiler/src/Elm/Compiler/Type/Extract.hs b/compiler/src/Elm/Compiler/Type/Extract.hs
index 1aafe1d4..99763392 100644
--- a/compiler/src/Elm/Compiler/Type/Extract.hs
+++ b/compiler/src/Elm/Compiler/Type/Extract.hs
@@ -10,6 +10,7 @@ module Elm.Compiler.Type.Extract

 import Data.Map ((!))
+import qualified Data.Map as Map
 import qualified Data.Maybe as Maybe
 import qualified Data.Set as Set

@@ -134,11 +135,15 @@ extractUnion interfaces (Opt.Global home name) =
     else
       let
         pname = toPublicName home name
-        unions = I._unions (interfaces ! home)
+        maybeUnions = I._unions <$> Map.lookup home interfaces
       in
-      case I.toUnionInternals (unions ! name) of
-        Can.Union vars ctors _ _ ->
-          T.Union pname vars <$> traverse extractCtor ctors
+      case Map.lookup name =<< maybeUnions of
+        Just union ->
+          case I.toUnionInternals union of
+            Can.Union vars ctors _ _ ->
+              T.Union pname vars <$> traverse extractCtor ctors
+        Nothing ->
+          return $ T.Union pname [] []

 extractCtor :: Can.Ctor -> Extractor (N.Name, [T.Type])


code:
Do not capture the build-time value of $PATH in the 'emacs' executable
since this can noticeably increase the size of the closure of Emacs
with things like GCC being referenced.

--- a/lisp/loadup.el
+++ b/lisp/loadup.el
@@ -481,7 +481,8 @@ lost after dumping")))
                         ((equal dump-mode "dump") "emacs")
                         ((equal dump-mode "bootstrap") "emacs")
                         ((equal dump-mode "pbootstrap") "bootstrap-emacs.pdmp")
-                        (t (error "unrecognized dump mode %s" dump-mode)))))
+                        (t (error "unrecognized dump mode %s" dump-mode))))
+          (exec-path nil))
       (message "Dumping under the name %s" output)
       (condition-case ()
           (delete-file output)


code:
From edb930005b0ba83051ca8a59b493e9a3c8ef580a Mon Sep 17 00:00:00 2001
From: Chris Feng <chris.w.feng@gmail.com>
Date: Sun, 14 Jun 2020 00:00:00 +0000
Subject: [PATCH] Fix fullscreen states

* exwm-layout.el (exwm-layout-set-fullscreen,
exwm-layout-unset-fullscreen): Use `exwm--id' for interactive use.
(exwm-layout-unset-fullscreen): Mandatorily clear fullscreen states.
---
 exwm-layout.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/exwm-layout.el b/exwm-layout.el
index 170c2be..79d0c95 100644
--- a/exwm-layout.el
+++ b/exwm-layout.el
@@ -205,7 +205,7 @@
                        :border-width 0
                        :stack-mode xcb:StackMode:Above))
     (cl-pushnew xcb:Atom:_NET_WM_STATE_FULLSCREEN exwm--ewmh-state)
-    (exwm-layout--set-ewmh-state id)
+    (exwm-layout--set-ewmh-state exwm--id)
     (xcb:flush exwm--connection)
     (set-window-dedicated-p (get-buffer-window) t)
     (exwm-input--release-keyboard exwm--id)))
@@ -233,7 +233,9 @@
       (let ((window (get-buffer-window nil t)))
         (when window
           (exwm-layout--show exwm--id window))))
-    (exwm-layout--set-ewmh-state id)
+    (setq exwm--ewmh-state
+          (delq xcb:Atom:_NET_WM_STATE_FULLSCREEN exwm--ewmh-state))
+    (exwm-layout--set-ewmh-state exwm--id)
     (xcb:flush exwm--connection)
     (set-window-dedicated-p (get-buffer-window) nil)
     (when (eq 'line-mode exwm--selected-input-mode)
--
2.26.2


code:
Fix 'scheme-indent-function' to indent s-expressions starting with a keyword
properly, like this:

(#:foo 1
 #:bar 2)

instead of like this:

(#:foo 1
       #:bar 2)

The fix is made by Mark H Weaver <mhw@netris.org>:
<http://www.netris.org/~mhw/scheme-indent-function.el>

--- a/lisp/progmodes/scheme.el
+++ b/lisp/progmodes/scheme.el
@@ -494,6 +494,12 @@ indentation."
                         (> (length function) 3)
                         (string-match "\\`def" function)))
                (lisp-indent-defform state indent-point))
+              ((and (null method)
+                    (> (length function) 1)
+                    ;; The '#' in '#:' seems to get lost, not sure why
+                    (string-match "\\`:" function))
+               (let ((lisp-body-indent 1))
+                 (lisp-indent-defform state indent-point)))
               ((integerp method)
                (lisp-indent-specform method state
                                      indent-point normal-indent))


code:
Copyright © 2017 Oleg Pykhalov <go.wigust@gmail.com>
Copyright © 2017 Ludovic Courtès <ludo@gnu.org>

This patch adds highlighting for (guix) G-Expressions.

diff --git a/highlight-stages.el b/highlight-stages.el
index 3094c3c..e11260e 100644
--- a/highlight-stages.el
+++ b/highlight-stages.el
@@ -237,14 +237,14 @@ non-nil, (match-string 0) must be the expression matched."

 (defun highlight-stages-lisp-quote-matcher (&optional limit)
   (when (highlight-stages--search-forward-regexp
-         "\\(?:`\\|\\(#?'\\)\\)\\|([\s\t\n]*\\(?:backquote\\|\\(quote\\)\\)[\s\t\n]+" limit)
+         "\\(?:`\\|\\(#?'\\)\\)\\|([\s\t\n]*\\(?:backquote\\|\\(quote\\)\\)[\s\t\n]+\\|\\(?:#~\\)\\|([\s\t\n]*\\(?:gexp\\)[\s\t\n]+" limit)
     (prog1 (if (or (match-beginning 1) (match-beginning 2)) 'real t)
       (set-match-data
        (list (point)
              (progn (ignore-errors (forward-sexp 1)) (point)))))))

 (defun highlight-stages-lisp-escape-matcher (&optional limit)
-  (when (highlight-stages--search-forward-regexp ",@?\\|([\s\t\n]*\\\\,@?+[\s\t\n]+" limit)
+  (when (highlight-stages--search-forward-regexp ",@?\\|([\s\t\n]*\\\\,@?+[\s\t\n]+\\|\\(unquote\\)\\|\\(unquote-splicing\\)\\|\\(ungexp-native\\)\\|\\(ungexp-splicing\\)\\|\\(ungexp-native-splicing\\)\\|\\(ungexp\\)\\|#\\$" limit)
     (set-match-data
      (list (point)
            (progn (ignore-errors (forward-sexp 1)) (point))))


code:
From 6d5c587ec719e3309077c7d637b03b13db65c047 Mon Sep 17 00:00:00 2001
From: Joseph LaFreniere <joseph@lafreniere.xyz>
Date: Fri, 12 Jul 2019 12:43:46 -0500
Subject: [PATCH] Move definition of hyperbole-toggle-messaging to hsettings

---
 hsettings.el | 25 +++++++++++++++++++++++++
 hyperbole.el | 26 --------------------------
 2 files changed, 25 insertions(+), 26 deletions(-)

diff --git a/hsettings.el b/hsettings.el
index 6cdd1b8..9632067 100644
--- a/hsettings.el
+++ b/hsettings.el
@@ -163,6 +163,31 @@ package to display search results."
 			      search-term)))
       (user-error "(Hyperbole): Invalid web search service `%s'" service-name))))

+;;;###autoload
+(defun hyperbole-toggle-messaging (&optional arg)
+  "Toggle Hyperbole support for explicit buttons in mail and news buffers.
+Toggles the boolean variable `inhibit-hyperbole-messaging’ and either
+adds hooks (nil value) or removes them (t value).
+
+With optional prefix ARG > 0, enables support.  If ARG <= 0,
+disables/inhibits support."
+  (interactive "P")
+  (setq inhibit-hyperbole-messaging (if (null arg)
+					(not inhibit-hyperbole-messaging)
+				      (<= (prefix-numeric-value arg) 0)))
+  (if inhibit-hyperbole-messaging
+      (var:remove-all)
+    (var:append-all)
+    ;; Add any hooks that were skipped when inhibit-hyperbole-messaging
+    ;; was nil.
+    (cond ((boundp 'hyperbole-loading))
+	  ((not after-init-time)
+	   (add-hook 'after-init-hook (lambda () (load "hyperbole"))))
+	  (t (load "hyperbole"))))
+  (if (called-interactively-p 'interactive)
+      (message "Hyperbole messaging button support is %s"
+	       (if inhibit-hyperbole-messaging "disabled" "enabled"))))
+
 (defcustom inhibit-hyperbole-messaging t
   "*Determines whether Hyperbole supports explicit buttons in mail and news buffers.
 The default of t means disable such support (work remains to
diff --git a/hyperbole.el b/hyperbole.el
index 4aa427d..872dbaf 100644
--- a/hyperbole.el
+++ b/hyperbole.el
@@ -121,32 +121,6 @@
 			    t)))
     (error "(Hyperbole): Startup failure: `hyperb:dir' must be manually added to `load-path' to fix.")))

-;; This must be defined before the defcustom `inhbit-hyperbole-messaging'.
-;;;###autoload
-(defun hyperbole-toggle-messaging (&optional arg)
-  "Toggle Hyperbole support for explicit buttons in mail and news buffers.
-Toggles the boolean variable `inhibit-hyperbole-messaging’ and either
-adds hooks (nil value) or removes them (t value).
-
-With optional prefix ARG > 0, enables support.  If ARG <= 0,
-disables/inhibits support."
-  (interactive "P")
-  (setq inhibit-hyperbole-messaging (if (null arg)
-					(not inhibit-hyperbole-messaging)
-				      (<= (prefix-numeric-value arg) 0)))
-  (if inhibit-hyperbole-messaging
-      (var:remove-all)
-    (var:append-all)
-    ;; Add any hooks that were skipped when inhibit-hyperbole-messaging
-    ;; was nil.
-    (cond ((boundp 'hyperbole-loading))
-	  ((not after-init-time)
-	   (add-hook 'after-init-hook (lambda () (load "hyperbole"))))
-	  (t (load "hyperbole"))))
-  (if (called-interactively-p 'interactive)
-      (message "Hyperbole messaging button support is %s"
-	       (if inhibit-hyperbole-messaging "disabled" "enabled"))))
-
 (defgroup hyperbole-koutliner nil
   "Hyperbole multi-level autonumbered outliner customizations."
   :group 'hyperbole)
--
2.22.0


code:
Fix contributed upstream here:
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=42694.

Index: emacs-26.3/src/xfns.c
===================================================================
--- emacs-26.3.orig/src/xfns.c
+++ emacs-26.3/src/xfns.c
@@ -2628,6 +2628,8 @@ xic_free_xfontset (struct frame *f)
 static XIMStyle
 best_xim_style (XIMStyles *xim)
 {
+  if (xim == NULL) goto out;
+
   int i, j;
   int nr_supported = ARRAYELTS (supported_xim_styles);

@@ -2636,6 +2638,7 @@ best_xim_style (XIMStyles *xim)
       if (supported_xim_styles[i] == xim->supported_styles[j])
	return supported_xim_styles[i];

+ out:
   /* Return the default style.  */
   return XIMPreeditNothing | XIMStatusNothing;
 }


code:
Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>

This patch fixes tests for Emacs 25.

Upstream bug URL:

https://github.com/gongo/json-reformat/issues/33

diff --git a/test/json-reformat-test.el b/test/json-reformat-test.el
index 7de3be1..b4a4dde 100644
--- a/test/json-reformat-test.el
+++ b/test/json-reformat-test.el
@@ -58,7 +58,7 @@
 (ert-deftest json-reformat-test:string-to-string ()
   (should (string= "\"foobar\"" (json-reformat:string-to-string "foobar")))
   (should (string= "\"fo\\\"o\\nbar\"" (json-reformat:string-to-string "fo\"o\nbar")))
-  (should (string= "\"\\u2661\"" (json-reformat:string-to-string "\u2661")))
+  (should (string= "\"♡\"" (json-reformat:string-to-string "\u2661")))

   (should (string= "\"^(amq\\\\.gen.*|amq\\\\.default)$\"" (json-reformat:string-to-string "^(amq\\.gen.*|amq\\.default)$")))
   )
@@ -148,6 +148,6 @@ bar\"" (json-reformat:string-to-string "fo\"o\nbar")))
 [{ foo : \"bar\" }, { \"foo\" : \"baz\" }]") ;; At 3 (line)
         (json-reformat-region (point-min) (point-max)))
       (should (string=
-               "JSON parse error [Reason] Bad string format: \"doesn't start with '\\\"'!\" [Position] In buffer, line 3 (char 6)"
+               "JSON parse error [Reason] Bad string format: \"doesn't start with \`\\\"'!\" [Position] In buffer, line 3 (char 6)"
                message-string))
       )))
--
2.15.1


code:
From de3c48d72ec7064e7f0522877fe759c729df0c50 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Wed, 25 Mar 2020 11:32:18 -0400
Subject: [PATCH] Allow using a system provided libgit2 library

Setting the USE_SYSTEM_LIBGIT2 Make or CMake variable (through the
BUILD_OPTIONS variable) to any value enables using the system library.
The default behavior of using a bundled copy of libgit2 is unchanged.
---
 CMakeLists.txt     |  9 +++++++--
 Makefile           | 11 +++++++++++
 src/CMakeLists.txt |  9 +++++++--
 3 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index a393d7c..75d6ca6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,9 +7,14 @@ set(BUILD_SHARED_LIBS OFF CACHE BOOL "shared" FORCE)
 set(BUILD_CLAR OFF CACHE BOOL "clar" FORCE)
 set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DEGIT_DEBUG")

-add_subdirectory(libgit2)
+if(USE_SYSTEM_LIBGIT2)
+  find_package(PkgConfig REQUIRED)
+  pkg_check_modules(git2 REQUIRED IMPORTED_TARGET libgit2)
+else()
+  add_subdirectory(libgit2)
+  find_library(git2 libgit2.a)
+endif()

-find_library(git2 libgit2.a)
 add_subdirectory(src)

 enable_testing()
diff --git a/Makefile b/Makefile
index 8199532..6a6a4e1 100644
--- a/Makefile
+++ b/Makefile
@@ -13,6 +13,13 @@ ifeq ($(UNAME),MSYS)
 	BUILD_OPTIONS+= -G "MSYS Makefiles"
 endif

+# If the variable USE_SYSTEM_LIBGIT2 is set to *any* value, use the
+# system provided libgit2 library.
+USE_SYSTEM_LIBGIT2? := \
+	$(if $(or $(USE_SYSTEM_LIBGIT2),\
+	 	  $(findstring USE_SYSTEM_LIBGIT2,$(BUILD_OPTIONS))),\
+		true)
+
 ifeq "$(TRAVIS)" "true"
 ## Makefile for Travis ###################################################
 #
@@ -87,7 +94,11 @@ submodule-update:
 	@git submodule update

 libgit2:
+ifeq ($(USE_SYSTEM_LIBGIT2?),)
 	@git submodule update --init
+else
+	@echo "Using the system provided libgit2 library"
+endif

 CLEAN  = $(ELCS) $(PKG)-autoloads.el build

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index cfb5777..0dbad8a 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -13,8 +13,13 @@ if(WIN32)
   set_target_properties(egit2 PROPERTIES PREFIX lib)
 endif(WIN32)

-target_link_libraries(egit2 git2)
-target_include_directories(egit2 SYSTEM PRIVATE "${libgit2_SOURCE_DIR}/include")
+if(USE_SYSTEM_LIBGIT2)
+  target_link_libraries(egit2 PRIVATE PkgConfig::git2)
+else()
+  target_link_libraries(egit2 git2)
+  target_include_directories(
+    egit2 SYSTEM PRIVATE "${libgit2_SOURCE_DIR}/include")
+endif()

 if(CMAKE_COMPILER_IS_GNUCC)
   target_compile_options(egit2 PRIVATE -Wall -Wextra)
--
2.26.2


code:
Honor SOURCE_DATE_EPOCH variable to avoid non-determinism in generated
"autoloads" files.

--- a/lisp/emacs-lisp/autoload.el
+++ b/lisp/emacs-lisp/autoload.el
@@ -419,8 +419,12 @@
   ;;              nil t))
   ;;        (match-end 2))))
   (insert generate-autoload-section-header)
-  (prin1 `(autoloads ,autoloads ,load-name ,file ,time)
-	 outbuf)
+  (let* ((env  (getenv "SOURCE_DATE_EPOCH"))
+         (time (if env
+                   (seconds-to-time (string-to-number env))
+                 time)))
+    (prin1 `(autoloads ,autoloads ,load-name ,file ,time)
+           outbuf))
   (terpri outbuf)
   ;; Break that line at spaces, to avoid very long lines.
   ;; Make each sub-line into a comment.


code:
From 865b8c553722a971c68742c2e849e41eb0e2360c Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Thu, 24 Jun 2021 23:43:50 +0800
Subject: [PATCH] Replace code that search path with placeholder for
 configuration.

---
 telega-server.el | 6 +-----
 telega-util.el   | 2 +-
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/telega-server.el b/telega-server.el
index 999125d..0fa0817 100644
--- a/telega-server.el
+++ b/telega-server.el
@@ -142,11 +142,7 @@ Otherwise query user about building flags."
 (defun telega-server--find-bin ()
   "Find telega-server executable.
 Raise error if not found."
-  (let ((exec-path (cons telega-directory exec-path)))
-    (or (executable-find "telega-server")
-        (progn (telega-server-build)
-               (executable-find "telega-server"))
-        (error "`telega-server' not found in exec-path"))))
+  "@TELEGA_SERVER_BIN@")

 (defun telega-server-version ()
   "Return telega-server version."
diff --git a/telega-util.el b/telega-util.el
index 73a46b1..f53e20a 100644
--- a/telega-util.el
+++ b/telega-util.el
@@ -464,7 +464,7 @@ N can't be 0."

 (defun telega-etc-file (filename)
   "Return absolute path to FILENAME from etc/ directory in telega."
-  (expand-file-name (concat "etc/" filename) telega--lib-directory))
+  (concat "@TELEGA_SHARE@" "/" filename))

 (defun telega-link-props (link-type link-to &optional face)
   "Generate props for link button openable with `telega-link--button-action'."
--
2.32.0


code:
Test Emacs environment on startup.

Patch by Diego N. Barbato

--- a/telega.el	2020-02-07 17:07:18.549970090 +0100
+++ b/telega.el	2020-02-07 17:10:08.383499765 +0100
@@ -82,6 +82,7 @@
   "Start telegramming.
 If prefix ARG is given, then will not pop to telega root buffer."
   (interactive "P")
+  (telega-test-env t)
   (telega--create-hier)

   (unless (telega-server-live-p)


code:
Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com>

This patch forces the use of adaptive-wrap. This feature is optional but we
prefer to enable it by default.

diff --git a/wordnut.el b/wordnut.el
index 0ae86ad..72f9221 100644
--- a/wordnut.el
+++ b/wordnut.el
@@ -4,6 +4,7 @@
 (require 'subr-x)
 (require 'outline)
 (require 'imenu)
+(require 'adaptive-wrap)

 (require 'wordnut-history)

--
2.17.1


code:
Author: Reiner Herrmann <reiner@reiner-h.de>
Origin: https://salsa.debian.org/android-tools-team/enjarify/blob/master/debian/patches/setup_py.patch
Description: provides a minimal setup.py to build/install the package

Index: enjarify/setup.py
===================================================================
--- /dev/null
+++ enjarify/setup.py
@@ -0,0 +1,10 @@
+#!/usr/bin/env python3
+
+from setuptools import setup, find_packages
+
+setup(name='enjarify',
+      version='1.0.3',
+      url='https://github.com/google/enjarify',
+      packages=find_packages(),
+      )
+


code:
diff --git a/src/bin/e_auth.c b/src/bin/e_auth.c
index 8b0aa6641..3dff0ad84 100644
--- a/src/bin/e_auth.c
+++ b/src/bin/e_auth.c
@@ -12,8 +12,7 @@ e_auth_begin(char *passwd)
    if (pwlen == 0) goto out;

    snprintf(buf, sizeof(buf),
-            "%s/enlightenment/utils/enlightenment_ckpasswd pw",
-            e_prefix_lib_get());
+            "/run/setuid-programs/enlightenment_ckpasswd pw");
    exe = ecore_exe_pipe_run(buf, ECORE_EXE_PIPE_WRITE, NULL);
    if (!exe) goto out;
    if (ecore_exe_send(exe, passwd, pwlen) != EINA_TRUE) goto out;
@@ -47,8 +46,7 @@ e_auth_polkit_begin(char *passwd, const char *cookie, unsigned int uid)
    if (pwlen == 0) goto out;

    snprintf(buf, sizeof(buf),
-            "%s/enlightenment/utils/enlightenment_ckpasswd pk",
-            e_prefix_lib_get());
+            "/run/setuid-programs/enlightenment_ckpasswd pk");
    exe = ecore_exe_pipe_run(buf, ECORE_EXE_PIPE_WRITE, NULL);
    if (!exe) goto out;
    snprintf(buf, sizeof(buf), "%s %u %s", cookie, uid, passwd);
diff --git a/src/bin/e_fm/e_fm_main_eeze.c b/src/bin/e_fm/e_fm_main_eeze.c
index 9b10b3117..74e6b72ad 100644
--- a/src/bin/e_fm/e_fm_main_eeze.c
+++ b/src/bin/e_fm/e_fm_main_eeze.c
@@ -318,7 +318,7 @@ _e_fm_main_eeze_volume_eject(E_Volume *v)
      {
         char buf[PATH_MAX];

-        snprintf(buf, sizeof(buf), "%s/enlightenment/utils/enlightenment_sys", eina_prefix_lib_get(pfx));
+        snprintf(buf, sizeof(buf), "/run/setuid-programs/enlightenment_sys");
         eeze_disk_mount_wrapper_set(v->disk, buf);
      }
    v->guard = ecore_timer_loop_add(E_FM_EJECT_TIMEOUT, (Ecore_Task_Cb)_e_fm_main_eeze_vol_eject_timeout, v);
@@ -512,7 +512,7 @@ _e_fm_main_eeze_volume_unmount(E_Volume *v)
      {
         char buf[PATH_MAX];

-        snprintf(buf, sizeof(buf), "%s/enlightenment/utils/enlightenment_sys", eina_prefix_lib_get(pfx));
+        snprintf(buf, sizeof(buf), "/run/setuid-programs/enlightenment_sys");
         eeze_disk_mount_wrapper_set(v->disk, buf);
      }
    v->guard = ecore_timer_loop_add(E_FM_UNMOUNT_TIMEOUT, (Ecore_Task_Cb)_e_fm_main_eeze_vol_unmount_timeout, v);
@@ -548,7 +548,7 @@ _e_fm_main_eeze_volume_mount(E_Volume *v)
      {
         char buf2[PATH_MAX];

-        snprintf(buf2, sizeof(buf2), "%s/enlightenment/utils/enlightenment_sys", eina_prefix_lib_get(pfx));
+        snprintf(buf2, sizeof(buf2), "/run/setuid-programs/enlightenment_sys");
         eeze_disk_mount_wrapper_set(v->disk, buf2);
      }
    v->guard = ecore_timer_loop_add(E_FM_MOUNT_TIMEOUT, (Ecore_Task_Cb)_e_fm_main_eeze_vol_mount_timeout, v);
diff --git a/src/bin/e_start_main.c b/src/bin/e_start_main.c
index b2c439455..cb16c7bd4 100644
--- a/src/bin/e_start_main.c
+++ b/src/bin/e_start_main.c
@@ -710,7 +710,7 @@ main(int argc, char **argv)
             "E_ALERT_FONT_DIR=%s/data/fonts", eina_prefix_data_get(pfx));
    putenv(buf2);
    snprintf(buf3, sizeof(buf3),
-            "E_ALERT_SYSTEM_BIN=%s/enlightenment/utils/enlightenment_system", eina_prefix_lib_get(pfx));
+            "E_ALERT_SYSTEM_BIN=/run/setuid-programs/enlightenment_system");
    putenv(buf3);

    if ((valgrind_mode || valgrind_tool) &&
diff --git a/src/bin/e_system.c b/src/bin/e_system.c
index 1e7aabb64..dc0173219 100644
--- a/src/bin/e_system.c
+++ b/src/bin/e_system.c
@@ -132,7 +132,7 @@ _system_spawn(void)
    else _respawn_count = 0;
    if (_respawn_count > 5) return;
    snprintf(buf, sizeof(buf),
-            "%s/enlightenment/utils/enlightenment_system", e_prefix_lib_get());
+            "/run/setuid-programs/enlightenment_system");
    _system_exe = ecore_exe_pipe_run
      (buf, ECORE_EXE_NOT_LEADER | ECORE_EXE_TERM_WITH_PARENT |
       ECORE_EXE_PIPE_READ | ECORE_EXE_PIPE_WRITE, NULL);


code:
Patch originally from https://sources.debian.net/patches/erlang/1:20.0.1%2Bdfsg-2/man.patch/
by Francois-Denis Gonthier <neumann@lostwebsite.net>.

Patch description rewritten for Guix.

This patch allows access to the man page with the 'erl -man' command
(Erlang manual pages are placed to /gnu/store/..erlang../share/man/ hierarchy
as other man pages.)

--- a/erts/etc/common/erlexec.c
+++ b/erts/etc/common/erlexec.c
@@ -709,8 +709,10 @@
 			error("-man not supported on Windows");
 #else
 			argv[i] = "man";
-			erts_snprintf(tmpStr, sizeof(tmpStr), "%s/man", rootdir);
-			set_env("MANPATH", tmpStr);
+			/*
+			* Conform to erlang-manpages content.
+			*/
+			putenv(strsave("MANSECT=1:3:5:7"));
 			execvp("man", argv+i);
 			error("Could not execute the 'man' command.");
 #endif


code:
From 9b09ff673954c459218e2c664386286ca68aae51 Mon Sep 17 00:00:00 2001
From: Tobias Geerinckx-Rice <me@tobias.gr>
Date: Sat, 24 Jul 2021 23:55:26 +0200
Subject: [PATCH] gnu: esmtp: Always assume that -lesmtp will work.

libesmtp 1.1.0 removed the libesmtp-config helper in favour of pkg-config.
This does not use that (I lack the chops and the patience).  Assume that
the build environment has everything set up for us, which is true on Guix.
---
 configure.ac | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/configure.ac b/configure.ac
index 9252ec2..7ccf71a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,15 +32,8 @@ then
 	AC_CHECK_HEADER(libesmtp.h, ,[AC_MSG_ERROR([libesmtp.h not found in $with_libesmtp])])
 fi
 AC_MSG_CHECKING(for libESMTP)
-if libesmtp-config --version > /dev/null 2>&1
-then
-	AC_MSG_RESULT(yes)
-	CFLAGS="$CFLAGS `libesmtp-config --cflags`"
-	LIBS="$LIBS `libesmtp-config --libs`"
-else
-	AC_MSG_RESULT(no)
-	AC_MSG_ERROR(libESMTP library not found)
-fi
+AC_MSG_RESULT(assumed)
+LIBS="$LIBS -lesmtp"

 jrf_FUNC_GETOPT

--
2.32.0


code:
Add $EUDEV_RULES_DIRECTORY to the list of rules directories.

The old udev 182 supported $UDEV_CONFIG_FILE, which in turn allowed
the search path to be customized, but eudev no longer has this, hence
this hack.

--- eudev-3.1.5/src/udev/udev-rules.c	2015-10-13 06:22:14.000000000 +0800
+++ eudev-3.1.5/src/udev/udev-rules.c	2015-10-16 20:45:38.491934336 +0800
@@ -47,15 +47,11 @@
         };
 };

-static const char* const rules_dirs[] = {
+static const char* rules_dirs[] = {
         UDEV_CONF_DIR "/rules.d",
         UDEV_RULES_DIR,
-        UDEV_ROOT_RUN "/udev/rules.d",
         UDEV_LIBEXEC_DIR "/rules.d",
-#ifdef HAVE_SPLIT_USR
-        "/lib/udev/rules.d",
-        "/usr/lib/udev/rules.d",
-#endif
+        NULL,			/* placeholder for $EUDEV_RULES_DIRECTORY */
         NULL};

 struct udev_rules {
@@ -1704,6 +1700,9 @@

         udev_rules_check_timestamp(rules);

+        /* Allow the user to specify an additional rules directory.  */
+        rules_dirs[3] = getenv("EUDEV_RULES_DIRECTORY");
+
         r = conf_files_list_strv(&files, ".rules", NULL, rules_dirs);
         if (r < 0) {
                 log_error_errno(r, "failed to enumerate rules files: %m");


code:
evilwm may sometimes lose focus after closing a window.  This means that
evilwm stops responding to keyboard shortcuts, and if no other window is open
which the mouse can be moved over to regain focus evilwm becomes unusable and
has to be restarted.

Patch derived from discussion at
https://wiki.archlinux.org/index.php/Evilwm#Lost_focus_bug_fix

--- evilwm-1.1.1/client.c
+++ evilwm-1.1.1/client.c
@@ -172,6 +172,7 @@
 	 *  _NET_WM_STATE) */
 	if (c->remove) {
 		LOG_DEBUG("setting WithdrawnState\n");
+		XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot, CurrentTime);
 		set_wm_state(c, WithdrawnState);
 		ewmh_withdraw_client(c);
 	} else {


code:
From 6489f20d6905cc797e2b2581c415e558c457caa7 Mon Sep 17 00:00:00 2001
From: Milan Crha <mcrha@redhat.com>
Date: Wed, 12 Feb 2020 18:59:52 +0100
Subject: [PATCH] I#784 - Warn about and limit what can be attached using
 mailto: URI

Closes https://gitlab.gnome.org/GNOME/evolution/issues/784
---
 src/composer/e-msg-composer.c | 58 +++++++++++++++++++++++++++++------
 src/e-util/e-system.error.xml |  7 ++++-
 2 files changed, 54 insertions(+), 11 deletions(-)

diff --git a/src/composer/e-msg-composer.c b/src/composer/e-msg-composer.c
index e4c9ac095e..cd3168d882 100644
--- a/src/composer/e-msg-composer.c
+++ b/src/composer/e-msg-composer.c
@@ -4761,7 +4761,8 @@ handle_mailto (EMsgComposer *composer,
 	gchar *header, *content, *buf;
 	gsize nread, nwritten;
 	const gchar *p;
-	gint len, clen;
+	gint len, clen, has_attachments = 0;
+	gboolean has_blacklisted_attachment = FALSE;

 	table = e_msg_composer_get_header_table (composer);
 	view = e_msg_composer_get_attachment_view (composer);
@@ -4844,22 +4845,36 @@ handle_mailto (EMsgComposer *composer,
 			} else if (!g_ascii_strcasecmp (header, "attach") ||
 				   !g_ascii_strcasecmp (header, "attachment")) {
 				EAttachment *attachment;
+				GFile *file;

 				camel_url_decode (content);
-				if (file_is_blacklisted (content))
-					e_alert_submit (
-						E_ALERT_SINK (e_msg_composer_get_editor (composer)),
-						"mail:blacklisted-file",
-						content, NULL);
 				if (g_ascii_strncasecmp (content, "file:", 5) == 0)
 					attachment = e_attachment_new_for_uri (content);
 				else
 					attachment = e_attachment_new_for_path (content);
-				e_attachment_store_add_attachment (store, attachment);
-				e_attachment_load_async (
-					attachment, (GAsyncReadyCallback)
-					e_attachment_load_handle_error, composer);
+				file = e_attachment_ref_file (attachment);
+				if (!file || !g_file_peek_path (file) ||
+				    !g_file_test (g_file_peek_path (file), G_FILE_TEST_EXISTS) ||
+				    g_file_test (g_file_peek_path (file), G_FILE_TEST_IS_DIR)) {
+					/* Do nothing, simply ignore the attachment request */
+				} else {
+					has_attachments++;
+
+					if (file_is_blacklisted (content)) {
+						has_blacklisted_attachment = TRUE;
+						e_alert_submit (
+							E_ALERT_SINK (e_msg_composer_get_editor (composer)),
+							"mail:blacklisted-file",
+							content, NULL);
+					}
+
+					e_attachment_store_add_attachment (store, attachment);
+					e_attachment_load_async (
+						attachment, (GAsyncReadyCallback)
+						e_attachment_load_handle_error, composer);
+				}
 				g_object_unref (attachment);
+				g_clear_object (&file);
 			} else if (!g_ascii_strcasecmp (header, "from")) {
 				/* Ignore */
 			} else if (!g_ascii_strcasecmp (header, "reply-to")) {
@@ -4883,6 +4898,29 @@ handle_mailto (EMsgComposer *composer,

 	g_free (buf);

+	if (has_attachments && !has_blacklisted_attachment) {
+		const gchar *primary;
+		gchar *secondary;
+
+		primary = g_dngettext (GETTEXT_PACKAGE,
+			"Review attachment before sending.",
+			"Review attachments before sending.",
+			has_attachments);
+
+		secondary = g_strdup_printf (g_dngettext (GETTEXT_PACKAGE,
+			"There had been added %d attachment. Make sure it does not contain any sensitive information before sending the message.",
+			"There had been added %d attachments. Make sure they do not contain any sensitive information before sending the message.",
+			has_attachments),
+			has_attachments);
+
+		e_alert_submit (
+			E_ALERT_SINK (e_msg_composer_get_editor (composer)),
+			"system:generic-warning",
+			primary, secondary, NULL);
+
+		g_free (secondary);
+	}
+
 	merge_always_cc_and_bcc (table, to, &cc, &bcc);

 	tov = destination_list_to_vector (to);
diff --git a/src/e-util/e-system.error.xml b/src/e-util/e-system.error.xml
index ddcf989fda..02facb7d26 100644
--- a/src/e-util/e-system.error.xml
+++ b/src/e-util/e-system.error.xml
@@ -1,6 +1,11 @@
 <?xml version="1.0"?>
 <error-list domain="system">
-  <error type="error" id="generic-error">
+  <error id="generic-error" type="error">
+    <primary>{0}</primary>
+    <secondary>{1}</secondary>
+  </error>
+
+  <error id="generic-warning" type="warning">
     <primary>{0}</primary>
     <secondary>{1}</secondary>
   </error>
--
GitLab


code:
From ba82be72cfd427b5d72ff21f929b3a6d8529c4df Mon Sep 17 00:00:00 2001
From: Milan Crha <mcrha@redhat.com>
Date: Mon, 22 Jun 2020 13:40:17 +0200
Subject: [PATCH] I#226 - CVE-2020-14928: Response Injection via STARTTLS in
 SMTP and POP3

Closes https://gitlab.gnome.org/GNOME/evolution-data-server/-/issues/226
---
 src/camel/camel-stream-buffer.c               | 19 +++++++++++++++++++
 src/camel/camel-stream-buffer.h               |  1 +
 src/camel/providers/pop3/camel-pop3-store.c   |  2 ++
 src/camel/providers/pop3/camel-pop3-stream.c  | 11 +++++++++++
 src/camel/providers/pop3/camel-pop3-stream.h  |  1 +
 .../providers/smtp/camel-smtp-transport.c     |  2 ++
 6 files changed, 36 insertions(+)

diff --git a/src/camel/camel-stream-buffer.c b/src/camel/camel-stream-buffer.c
index 3e2e0dd36..a6f605ae5 100644
--- a/src/camel/camel-stream-buffer.c
+++ b/src/camel/camel-stream-buffer.c
@@ -518,3 +518,22 @@ camel_stream_buffer_read_line (CamelStreamBuffer *sbf,

 	return g_strdup ((gchar *) sbf->priv->linebuf);
 }
+
+/**
+ * camel_stream_buffer_discard_cache:
+ * @sbf: a #CamelStreamBuffer
+ *
+ * Discards any cached data in the @sbf. The next read reads
+ * from the stream.
+ *
+ * Since: 3.38
+ **/
+void
+camel_stream_buffer_discard_cache (CamelStreamBuffer *sbf)
+{
+	g_return_if_fail (CAMEL_IS_STREAM_BUFFER (sbf));
+
+	sbf->priv->ptr = sbf->priv->buf;
+	sbf->priv->end = sbf->priv->buf;
+	sbf->priv->ptr[0] = '\0';
+}
diff --git a/src/camel/camel-stream-buffer.h b/src/camel/camel-stream-buffer.h
index ef92cfd8e..094e9926b 100644
--- a/src/camel/camel-stream-buffer.h
+++ b/src/camel/camel-stream-buffer.h
@@ -93,6 +93,7 @@ gint		camel_stream_buffer_gets	(CamelStreamBuffer *sbf,
 gchar *		camel_stream_buffer_read_line	(CamelStreamBuffer *sbf,
 						 GCancellable *cancellable,
 						 GError **error);
+void		camel_stream_buffer_discard_cache	(CamelStreamBuffer *sbf);

 G_END_DECLS

diff --git a/src/camel/providers/pop3/camel-pop3-store.c b/src/camel/providers/pop3/camel-pop3-store.c
index 81c370f0a..5c9eb1eaa 100644
--- a/src/camel/providers/pop3/camel-pop3-store.c
+++ b/src/camel/providers/pop3/camel-pop3-store.c
@@ -205,6 +205,8 @@ connect_to_server (CamelService *service,

 	if (tls_stream != NULL) {
 		camel_stream_set_base_stream (stream, tls_stream);
+		/* Truncate any left cached input from the insecure part of the session */
+		camel_pop3_stream_discard_cache (pop3_engine->stream);
 		g_object_unref (tls_stream);
 	} else {
 		g_prefix_error (
diff --git a/src/camel/providers/pop3/camel-pop3-stream.c b/src/camel/providers/pop3/camel-pop3-stream.c
index 74bb11e61..c485b9bd6 100644
--- a/src/camel/providers/pop3/camel-pop3-stream.c
+++ b/src/camel/providers/pop3/camel-pop3-stream.c
@@ -457,3 +457,14 @@ camel_pop3_stream_getd (CamelPOP3Stream *is,

 	return 1;
 }
+
+void
+camel_pop3_stream_discard_cache (CamelPOP3Stream *is)
+{
+	if (is) {
+		is->ptr = is->end = is->buf;
+		is->lineptr = is->linebuf;
+		is->lineend = is->linebuf + CAMEL_POP3_STREAM_LINE_SIZE;
+		is->ptr[0] = '\n';
+	}
+}
diff --git a/src/camel/providers/pop3/camel-pop3-stream.h b/src/camel/providers/pop3/camel-pop3-stream.h
index bb6dbb903..128c8c45a 100644
--- a/src/camel/providers/pop3/camel-pop3-stream.h
+++ b/src/camel/providers/pop3/camel-pop3-stream.h
@@ -87,6 +87,7 @@ gint		camel_pop3_stream_getd		(CamelPOP3Stream *is,
 						 guint *len,
 						 GCancellable *cancellable,
 						 GError **error);
+void		camel_pop3_stream_discard_cache	(CamelPOP3Stream *is);

 G_END_DECLS

diff --git a/src/camel/providers/smtp/camel-smtp-transport.c b/src/camel/providers/smtp/camel-smtp-transport.c
index 035baf367..1fc0f3206 100644
--- a/src/camel/providers/smtp/camel-smtp-transport.c
+++ b/src/camel/providers/smtp/camel-smtp-transport.c
@@ -323,6 +323,8 @@ connect_to_server (CamelService *service,

 	if (tls_stream != NULL) {
 		camel_stream_set_base_stream (stream, tls_stream);
+		/* Truncate any left cached input from the insecure part of the session */
+		camel_stream_buffer_discard_cache (transport->istream);
 		g_object_unref (tls_stream);
 	} else {
 		g_prefix_error (
--
GitLab


code:
From 2cc39592b532cf0dc994fd3694b8e6bf924c9ab5 Mon Sep 17 00:00:00 2001
From: Milan Crha <mcrha@redhat.com>
Date: Mon, 10 Feb 2020 10:00:32 +0100
Subject: [PATCH] I#189 - Crash on malformed server response with minimal
 capabilities

Closes https://gitlab.gnome.org/GNOME/evolution-data-server/issues/189
---
 src/camel/providers/imapx/camel-imapx-server.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/camel/providers/imapx/camel-imapx-server.c b/src/camel/providers/imapx/camel-imapx-server.c
index 3c38fb1e9..3883321ec 100644
--- a/src/camel/providers/imapx/camel-imapx-server.c
+++ b/src/camel/providers/imapx/camel-imapx-server.c
@@ -3045,7 +3045,8 @@ connected:

 			/* See if we got new capabilities
 			 * in the STARTTLS response. */
-			imapx_free_capability (is->priv->cinfo);
+			if (is->priv->cinfo)
+				imapx_free_capability (is->priv->cinfo);
 			is->priv->cinfo = NULL;
 			if (ic->status->condition == IMAPX_CAPABILITY) {
 				is->priv->cinfo = ic->status->u.cinfo;
--
GitLab


code:
Prevent test failure and possible data loss due to API change in libical 3.0.7.

https://gitlab.gnome.org/GNOME/evolution-data-server/issues/185
https://lists.infradead.org/pipermail/libical-devel/2020-January/000907.html

Adapted from upstream:

https://gitlab.gnome.org/GNOME/evolution-data-server/commit/77384ab552c19bf374dbeda53dc37f98d07bd4ec

diff --git a/CMakeLists.txt b/CMakeLists.txt
index e16b8b225..b3c881967 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -111,7 +111,7 @@ add_definitions(-DSOUP_VERSION_MIN_REQUIRED=${soup_encoded_version})

 set(gcr_minimum_version 3.4)
 set(libgdata_minimum_version 0.15.1)
-set(libical_glib_minimum_version 3.0.5)
+set(libical_glib_minimum_version 3.0.7)
 set(libsecret_minimum_version 0.5)
 set(libxml_minimum_version 2.0.0)
 set(sqlite_minimum_version 3.7.17)
diff --git a/src/calendar/libedata-cal/e-cal-meta-backend.c b/src/calendar/libedata-cal/e-cal-meta-backend.c
index 7501f2a43..93f4806ba 100644
--- a/src/calendar/libedata-cal/e-cal-meta-backend.c
+++ b/src/calendar/libedata-cal/e-cal-meta-backend.c
@@ -4067,8 +4067,7 @@ e_cal_meta_backend_inline_local_attachments_sync (ECalMetaBackend *meta_backend,
 					gchar *base64;

 					base64 = g_base64_encode ((const guchar *) content, len);
-					new_attach = i_cal_attach_new_from_data (base64, NULL, NULL);
+					new_attach = i_cal_attach_new_from_data (base64, (GFunc) g_free, NULL);
 					g_free (content);
-					g_free (base64);

 					ecmb_remove_all_but_filename_parameter (prop);


code:
This patch fixes locale canonicalization when using newer versions of
ICU.  It comes from the upstream repo, and should appear starting in
version 3.33.5.

From fe4ac94ce3c14f200e049a5d102fc0e4b811c71e Mon Sep 17 00:00:00 2001
From: Milan Crha <mcrha@redhat.com>
Date: Tue, 16 Jul 2019 07:22:07 +0200
Subject: [PATCH] I#137 - POSIX locale tests fail with ICU 64.x

Closes https://gitlab.gnome.org/GNOME/evolution-data-server/issues/137
---
 src/libedataserver/e-collator.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/libedataserver/e-collator.c b/src/libedataserver/e-collator.c
index 718eac5da..ec2cf7951 100644
--- a/src/libedataserver/e-collator.c
+++ b/src/libedataserver/e-collator.c
@@ -132,6 +132,11 @@ canonicalize_locale (const gchar *posix_locale,
 	gint   len;
 	const gchar *collation_type = NULL;

+	if (posix_locale && (
+	    g_ascii_strcasecmp (posix_locale, "C") == 0 ||
+	    g_ascii_strcasecmp (posix_locale, "POSIX") == 0))
+		posix_locale = "en_US_POSIX";
+
 	len = uloc_canonicalize (posix_locale, locale_buffer, LOCALE_BUFFER_LEN, &status);

 	if (U_FAILURE (status)) {
--
2.22.0


code:
From bc22f7d43c12c5f79c71b0319666e71f29d61322 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jakub=20K=C4=85dzio=C5=82ka?= <kuba@kadziolka.net>
Date: Mon, 25 May 2020 18:53:04 +0200
Subject: [PATCH] Disable self-update.

Based on a Fedora patch by Elliott Sales de Andrade.
---
 cli/cli.go | 44 +-------------------------------------------
 1 file changed, 1 insertion(+), 43 deletions(-)

diff --git a/cli/cli.go b/cli/cli.go
index 4312eb0..5f62297 100644
--- a/cli/cli.go
+++ b/cli/cli.go
@@ -10,13 +10,10 @@ import (
 	"io"
 	"io/ioutil"
 	"net/http"
-	"runtime"
 	"strings"
 	"time"

 	"github.com/blang/semver"
-	"github.com/exercism/cli/debug"
-	update "github.com/inconshreveable/go-update"
 )

 var (
@@ -95,46 +92,7 @@ func (c *CLI) IsUpToDate() (bool, error) {

 // Upgrade allows the user to upgrade to the latest version of the CLI.
 func (c *CLI) Upgrade() error {
-	var (
-		OS   = osMap[runtime.GOOS]
-		ARCH = archMap[runtime.GOARCH]
-	)
-
-	if OS == "" || ARCH == "" {
-		return fmt.Errorf("unable to upgrade: OS %s ARCH %s", OS, ARCH)
-	}
-
-	buildName := fmt.Sprintf("%s-%s", OS, ARCH)
-	if BuildARCH == "arm" {
-		if BuildARM == "" {
-			return fmt.Errorf("unable to upgrade: arm version not found")
-		}
-		buildName = fmt.Sprintf("%s-v%s", buildName, BuildARM)
-	}
-
-	var downloadRC *bytes.Reader
-	for _, a := range c.LatestRelease.Assets {
-		if strings.Contains(a.Name, buildName) {
-			debug.Printf("Downloading %s\n", a.Name)
-			var err error
-			downloadRC, err = a.download()
-			if err != nil {
-				return fmt.Errorf("error downloading executable: %s", err)
-			}
-			break
-		}
-	}
-	if downloadRC == nil {
-		return fmt.Errorf("no executable found for %s/%s%s", BuildOS, BuildARCH, BuildARM)
-	}
-
-	bin, err := extractBinary(downloadRC, OS)
-	if err != nil {
-		return err
-	}
-	defer bin.Close()
-
-	return update.Apply(bin, update.Options{})
+	return fmt.Errorf("Please use Guix to update Exercism")
 }

 func (c *CLI) fetchLatestRelease() error {
--
2.26.2


code:
From b48ef9af13a154939acc245c32d72358001d00f1 Mon Sep 17 00:00:00 2001
From: Giacomo Leidi <goodoldpaul@autistici.org>
Date: Sun, 20 Jun 2021 12:53:27 +0200
Subject: [PATCH] Remove build machinery for bundled dependencies.

---
 CMakeLists.txt | 192 +------------------------------------------------
 1 file changed, 1 insertion(+), 191 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 17d13d7c..2a7206ed 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,9 +1,6 @@
 cmake_minimum_required(VERSION 3.1) # we use target_sources()
 project(Extempore VERSION 0.8.9)

-# for backwards compatibility with CMake older than 3.19
-cmake_policy(SET CMP0114 OLD)
-
 option(ASSETS "download multimedia assets (approx 500MB)" OFF)
 option(BUILD_TESTS "build test targets (including examples)" ON)
 option(PACKAGE "set up install targets for packaging" OFF)
@@ -142,55 +139,6 @@ else()
   message(FATAL_ERROR "Sorry, Extempore isn't supported on this platform - macOS, Linux & Windows only.")
 endif()

-########
-# PCRE #
-########
-
-# current in-tree PCRE version: 8.38
-
-add_library(pcre STATIC
-  # headers
-  src/pcre/config.h
-  src/pcre/pcre.h
-  src/pcre/ucp.h
-  # source files
-  src/pcre/pcre_chartables.c
-  src/pcre/pcre_compile.c
-  src/pcre/pcre_exec.c
-  src/pcre/pcre_globals.c
-  src/pcre/pcre_internal.h
-  src/pcre/pcre_newline.c
-  src/pcre/pcre_tables.c
-  )
-
-target_compile_definitions(pcre
-  PRIVATE -DHAVE_CONFIG_H
-  )
-
-if(PACKAGE)
-  target_compile_options(pcre
-    PRIVATE -mtune=generic)
-endif()
-
-#############
-# portaudio #
-#############
-
-include(ExternalProject)
-
-ExternalProject_Add(portaudio_static
-  PREFIX portaudio
-  URL https://github.com/PortAudio/portaudio/archive/3f7bee79a65327d2e0965e8a74299723ed6f072d.zip
-  URL_MD5 182b76e05f6ef21d9f5716da7489905d
-  CMAKE_ARGS
-  -DPA_BUILD_STATIC=ON
-  -DPA_BUILD_SHARED=OFF
-  -DPA_LIBNAME_ADD_SUFFIX=OFF
-  -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-  -DCMAKE_C_FLAGS=${EXT_DEPS_C_FLAGS}
-  -DCMAKE_CXX_FLAGS=${EXT_DEPS_CXX_FLAGS}
-  -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/portaudio)
-
 ##############
 # LLVM 3.8.0 #
 ##############
@@ -323,11 +271,6 @@ if(UNIX)
   set_source_files_properties(src/Scheme.cpp PROPERTIES COMPILE_FLAGS -Wno-switch)
 endif()

-# static extempore build dependencies
-
-add_dependencies(extempore pcre)
-add_dependencies(extempore portaudio_static)
-
 if(BUILD_LLVM)
   if(WIN32)
     add_dependencies(extempore LLVM-install)
@@ -342,12 +285,9 @@ endif()

 target_include_directories(extempore
   PRIVATE
-  src/pcre
-  ${CMAKE_BINARY_DIR}/portaudio/include # installed by ExternalProject
   ${EXT_LLVM_DIR}/include)

-target_link_directories(extempore PRIVATE ${CMAKE_BINARY_DIR}/portaudio/lib)
-target_link_libraries(extempore PRIVATE pcre portaudio${CMAKE_STATIC_LIBRARY_SUFFIX} ${LLVM_LIBRARIES})
+target_link_libraries(extempore PRIVATE pcre portaudio ${LLVM_LIBRARIES})
 if(UNIX AND NOT APPLE)
   target_link_libraries(extempore PRIVATE asound)
 endif()
@@ -425,7 +365,6 @@ elseif(APPLE) # macOS
     PRIVATE "-framework AudioToolbox")

 elseif(UNIX AND NOT APPLE) # Linux
-  set_property(TARGET pcre PROPERTY POSITION_INDEPENDENT_CODE ON)
   set_property(TARGET extempore PROPERTY POSITION_INDEPENDENT_CODE ON)
   # target_link_libraries(extempore PRIVATE --export-dynamic)
   target_link_libraries(extempore PRIVATE dl)
@@ -529,7 +468,6 @@ else(WIN32)
       DEPENDS ${filename} extempore)
     set_target_properties(${targetname} PROPERTIES FOLDER AOT)
     if(NOT ${group} STREQUAL "core")
-      add_dependencies(${targetname} external_shlibs_${group})
       add_dependencies(aot_external_${group} ${targetname})
     endif()
     foreach(dep ${ARGN})
@@ -568,59 +506,6 @@ add_custom_target(clean_aot
 if(UNIX)
   if(EXTERNAL_SHLIBS_AUDIO)

-    # first, download & build the shared libraries themselves (these are all external to Extempore)
-
-    ExternalProject_Add(portmidi
-      PREFIX portmidi
-      URL https://github.com/extemporelang/portmidi/archive/8602f548f71daf5ef638b2f7d224753400cb2158.zip
-      CMAKE_ARGS
-      -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-      -DCMAKE_C_FLAGS=${EXT_DEPS_C_FLAGS}
-      -DCMAKE_CXX_FLAGS=${EXT_DEPS_CXX_FLAGS}
-      -DCMAKE_INSTALL_PREFIX=${EXT_DEPS_INSTALL_DIR})
-    set_target_properties(portmidi PROPERTIES FOLDER EXTERNAL_SHLIBS)
-
-    ExternalProject_Add(rtmidi
-      PREFIX rtmidi
-      URL https://github.com/thestk/rtmidi/archive/84d130bf22d878ff1b0e224346e2e0f9e3ba8099.zip
-      URL_MD5 d932b9fef01b859a1b8b86a3c8dc6621
-      CMAKE_ARGS
-      -DRTMIDI_BUILD_TESTING=OFF
-      -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-      -DCMAKE_C_FLAGS=${EXT_DEPS_C_FLAGS}
-      -DCMAKE_CXX_FLAGS=${EXT_DEPS_CXX_FLAGS}
-      -DCMAKE_INSTALL_PREFIX=${EXT_DEPS_INSTALL_DIR})
-    set_target_properties(rtmidi PROPERTIES FOLDER EXTERNAL_SHLIBS)
-
-    ExternalProject_Add(kiss_fft
-      PREFIX kiss_fft
-      URL https://github.com/extemporelang/kiss_fft/archive/1.3.0.zip
-      CMAKE_ARGS
-      -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-      -DCMAKE_C_FLAGS=${EXT_DEPS_C_FLAGS}
-      -DCMAKE_CXX_FLAGS=${EXT_DEPS_CXX_FLAGS}
-      -DCMAKE_INSTALL_PREFIX=${EXT_DEPS_INSTALL_DIR})
-    set_target_properties(kiss_fft PROPERTIES FOLDER EXTERNAL_SHLIBS)
-
-    # build with as few deps as we can get away with
-
-    ExternalProject_Add(sndfile
-    PREFIX libsndfile
-    URL https://github.com/erikd/libsndfile/archive/ae64caf9b5946d365971c550875000342e763de6.zip
-    CMAKE_ARGS
-    -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-    -DCMAKE_C_FLAGS=${EXT_DEPS_C_FLAGS}
-    -DCMAKE_CXX_FLAGS=${EXT_DEPS_CXX_FLAGS}
-    -DCMAKE_INSTALL_PREFIX=${EXT_DEPS_INSTALL_DIR}
-    -DBUILD_SHARED_LIBS=ON
-    -DBUILD_PROGRAMS=OFF
-    -DBUILD_EXAMPLES=OFF
-	-DENABLE_EXTERNAL_LIBS=OFF
-    -DBUILD_TESTING=OFF
-    -DENABLE_CPACK=OFF
-    -DENABLE_PACKAGE_CONFIG=OFF)
-    set_target_properties(sndfile PROPERTIES FOLDER EXTERNAL_SHLIBS)
-
     add_custom_target(aot_external_audio ALL)
     set_target_properties(aot_external_audio PROPERTIES FOLDER AOT)
     aotcompile_lib(libs/external/fft.xtm audio base math)
@@ -629,76 +514,13 @@ if(UNIX)
     aotcompile_lib(libs/external/instruments_ext.xtm audio base sndfile instruments)
     aotcompile_lib(libs/external/portmidi.xtm audio base)

-    add_custom_target(external_shlibs_audio
-      COMMENT "moving shared libs into ${EXT_PLATFORM_SHLIBS_DIR}"
-      DEPENDS LLVM sndfile kiss_fft portmidi rtmidi
-      COMMAND ${CMAKE_COMMAND} -E make_directory ${EXT_PLATFORM_SHLIBS_DIR}
-      COMMAND ${CMAKE_COMMAND} -E copy libkiss_fft${CMAKE_SHARED_LIBRARY_SUFFIX} ${EXT_PLATFORM_SHLIBS_DIR}
-      COMMAND ${CMAKE_COMMAND} -E copy libportmidi${CMAKE_SHARED_LIBRARY_SUFFIX} ${EXT_PLATFORM_SHLIBS_DIR}
-      COMMAND ${CMAKE_COMMAND} -E copy librtmidi${CMAKE_SHARED_LIBRARY_SUFFIX} ${EXT_PLATFORM_SHLIBS_DIR}
-      COMMAND ${CMAKE_COMMAND} -E copy libsndfile${CMAKE_SHARED_LIBRARY_SUFFIX} ${EXT_PLATFORM_SHLIBS_DIR}
-      WORKING_DIRECTORY ${EXT_DEPS_INSTALL_DIR}/lib)
-    set_target_properties(external_shlibs_audio PROPERTIES FOLDER EXTERNAL_SHLIBS)
-
     add_dependencies(aot_external_audio extempore)
-    add_dependencies(aot_external_audio external_shlibs_audio)

   endif(EXTERNAL_SHLIBS_AUDIO)

   if(EXTERNAL_SHLIBS_GRAPHICS)

-    ExternalProject_Add(nanovg
-      PREFIX nanovg
-      URL https://github.com/extemporelang/nanovg/archive/3c60175fcc2e5fe305b04355cdce35d499c80310.tar.gz
-      CMAKE_ARGS
-      -DEXTEMPORE_LIB_PATH=${CMAKE_SOURCE_DIR}/libs/platform-shlibs/extempore.lib
-      -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-      -DCMAKE_C_FLAGS=${EXT_DEPS_C_FLAGS}
-      -DCMAKE_CXX_FLAGS=${EXT_DEPS_CXX_FLAGS}
-      -DCMAKE_INSTALL_PREFIX=${EXT_DEPS_INSTALL_DIR})
-    set_target_properties(nanovg PROPERTIES FOLDER EXTERNAL_SHLIBS)
-
-    add_dependencies(nanovg extempore)
-
-    ExternalProject_Add(stb_image
-      PREFIX stb_image
-      URL https://github.com/extemporelang/stb/archive/152a250a702bf28951bb0220d63bc0c99830c498.zip
-      CMAKE_ARGS
-      -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-      -DCMAKE_C_FLAGS=${EXT_DEPS_C_FLAGS}
-      -DCMAKE_CXX_FLAGS=${EXT_DEPS_CXX_FLAGS}
-      -DCMAKE_INSTALL_PREFIX=${EXT_DEPS_INSTALL_DIR})
-    set_target_properties(nanovg PROPERTIES FOLDER EXTERNAL_SHLIBS)
-
-    ExternalProject_Add(glfw3
-      PREFIX glfw3
-      URL https://github.com/glfw/glfw/releases/download/3.2.1/glfw-3.2.1.zip
-      CMAKE_ARGS
-      -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-      -DCMAKE_C_FLAGS=${EXT_DEPS_C_FLAGS}
-      -DCMAKE_CXX_FLAGS=${EXT_DEPS_CXX_FLAGS}
-      -DBUILD_SHARED_LIBS=ON
-      -DGLFW_BUILD_EXAMPLES=OFF
-      -DGLFW_BUILD_TESTS=OFF
-      -DCMAKE_INSTALL_PREFIX=${EXT_DEPS_INSTALL_DIR})
-    set_target_properties(glfw3 PROPERTIES FOLDER EXTERNAL_SHLIBS)
-
-    ExternalProject_Add(assimp
-      PREFIX assimp
-      URL https://github.com/assimp/assimp/archive/v3.2.zip
-      CMAKE_ARGS
-      -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-      -DCMAKE_C_FLAGS=${EXT_DEPS_C_FLAGS}
-      -DCMAKE_CXX_FLAGS=${EXT_DEPS_CXX_FLAGS}
-      -DCMAKE_DEBUG_POSTFIX=
-      -DASSIMP_BUILD_ASSIMP_TOOLS=OFF
-      -DASSIMP_BUILD_SAMPLES=OFF
-      -DASSIMP_BUILD_TESTS=OFF
-      -DCMAKE_INSTALL_PREFIX=${EXT_DEPS_INSTALL_DIR})
-    set_target_properties(assimp PROPERTIES FOLDER EXTERNAL_SHLIBS)
-
     add_custom_target(aot_external_graphics ALL)
-    set_target_properties(assimp PROPERTIES FOLDER AOT)

     aotcompile_lib(libs/external/stb_image.xtm graphics base)
     aotcompile_lib(libs/external/glfw3.xtm graphics base)
@@ -715,20 +537,8 @@ if(UNIX)
     aotcompile_lib(libs/external/assimp.xtm graphics base stb_image graphics-pipeline)
     aotcompile_lib(libs/external/gl/glcompat-${GL_BIND_METHOD}.xtm graphics base)

-    add_custom_target(external_shlibs_graphics
-      COMMENT "moving shared libs into ${EXT_PLATFORM_SHLIBS_DIR}"
-      DEPENDS LLVM assimp glfw3 stb_image nanovg
-      COMMAND ${CMAKE_COMMAND} -E make_directory ${EXT_PLATFORM_SHLIBS_DIR}
-      COMMAND ${CMAKE_COMMAND} -E copy libassimp${CMAKE_SHARED_LIBRARY_SUFFIX} ${EXT_PLATFORM_SHLIBS_DIR}
-      COMMAND ${CMAKE_COMMAND} -E copy libglfw${CMAKE_SHARED_LIBRARY_SUFFIX} ${EXT_PLATFORM_SHLIBS_DIR}
-      COMMAND ${CMAKE_COMMAND} -E copy libnanovg${CMAKE_SHARED_LIBRARY_SUFFIX} ${EXT_PLATFORM_SHLIBS_DIR}
-      COMMAND ${CMAKE_COMMAND} -E copy libstb_image${CMAKE_SHARED_LIBRARY_SUFFIX} ${EXT_PLATFORM_SHLIBS_DIR}
-      WORKING_DIRECTORY ${EXT_DEPS_INSTALL_DIR}/lib)
-    set_target_properties(external_shlibs_graphics PROPERTIES FOLDER EXTERNAL_SHLIBS)
-
     # set up these libs for AOT compilation
     add_dependencies(aot_external_graphics extempore)
-    add_dependencies(aot_external_graphics external_shlibs_graphics)

   endif(EXTERNAL_SHLIBS_GRAPHICS)
 endif(UNIX)
--
2.32.0


code:
From: Tobias Geerinckx-Rice <me@tobias.gr>
Date: Thu, 16 Aug 2018 21:12:30 +0200
Subject: extundelete: Fix build with e2fsprogs 1.44.

The ‘inode.i_file_acl’ field was replaced with ‘inode.i_size_high’. I'm
not sure the field name is still accurate or useful, so don't print it
at all.

Based on this[0] patch by ‘conikost’[1].

[0]: https://sourceforge.net/p/extundelete/tickets/5/
[1]: https://sourceforge.net/u/conikost

--- a/src/insertionops.cc	2012-12-30 18:23:32.000000000 +0100
+++ b/src/insertionops.cc	2018-05-07 22:58:13.065868723 +0200
@@ -33,7 +33,6 @@
   os << "File flags: " << inode.i_flags << std::endl;
   os << "File version (for NFS): " << inode.i_generation << std::endl;
   os << "File ACL: " << inode.i_file_acl << std::endl;
-  os << "Directory ACL: " << inode.i_dir_acl << std::endl;
   os << "Fragment address: " << inode.i_faddr << std::endl;
   os << "Direct blocks: ";
   for (int n = 0; n < EXT2_NDIR_BLOCKS; n++)


code:
This patch comes from upstream:
https://gitlab.freedesktop.org/farstream/farstream/-/merge_requests/4

From 54987d445ea714b467d901b7daf8c09ed0644189 Mon Sep 17 00:00:00 2001
From: Debarshi Ray <debarshir@freedesktop.org>
Date: Thu, 12 Mar 2020 14:07:23 +0100
Subject: [PATCH] build: Adapt to backwards incompatible change in GNU Make 4.3

GNU Make 4.3 has a backwards incompatible change affecting the use of
number signs or hashes (ie., #) inside function invocations. See:
https://lists.gnu.org/archive/html/info-gnu/2020-01/msg00004.html

In this case, it would expand the '\#' in the '\n\#include \"$(h)\"'
argument to the foreach call to '\#', not '#'. This would lead to
spurious backslashes in front of the '#include' directives in the
generated fs-enumtypes.c file.

Spotted by Ernestas Kulik.
---
 common-modified/gst-glib-gen.mak | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/common-modified/gst-glib-gen.mak b/common-modified/gst-glib-gen.mak
index 14f1ba37..2247a41c 100644
--- a/common-modified/gst-glib-gen.mak
+++ b/common-modified/gst-glib-gen.mak
@@ -6,7 +6,8 @@
 #glib_gen_prefix=gst_color_balance
 #glib_gen_basename=colorbalance

-enum_headers=$(foreach h,$(glib_enum_headers),\n\#include \"$(h)\")
+hash:=\#
+enum_headers=$(foreach h,$(glib_enum_headers),\n$(hash)include \"$(h)\")

 # these are all the rules generating the relevant files
 $(glib_gen_basename)-enumtypes.h: $(glib_enum_headers)
--
GitLab


code:
Don't use timing as there is a type conflict.

--- nix-build-fastcap-2.0-18Sep92.drv-1/src/mulGlobal.h.orig	2015-07-21 15:58:49.199101566 +0200
+++ nix-build-fastcap-2.0-18Sep92.drv-1/src/mulGlobal.h	2015-07-21 16:18:39.456751313 +0200
@@ -57,7 +57,7 @@
 /* time variables/structs */
 #ifndef _TIME_                  /* if not on a Sun4 */
 #ifndef NEWS                    /* if not on a NWS-38XX */
-#include <time.h>
+//#include <time.h>
 #endif
 #endif


code:
Add forward declarations.

--- fastcap/src/mulSetup.c.orig	2015-07-22 13:55:21.592119775 +0200
+++ fastcap/src/mulSetup.c	2015-07-22 14:08:50.157688209 +0200
@@ -35,6 +35,14 @@

 #include "mulGlobal.h"

+static getnbrs(ssystem*);
+static linkcubes(ssystem*);
+static setMaxq(ssystem*);
+static getAllInter(ssystem*);
+static set_vector_masks(ssystem*);
+static indexkid(ssystem*, cube*, int*, int*);
+static int placeq(int, ssystem*, charge*);
+
 cube *cstack[1024];		/* Stack used in several routines. */

 /*


code:
Add forward declarations.

--- fasthenry-3.0/src/fasthenry/sparse/spAllocate.c.orig	2015-07-22 09:45:28.864758891 +0200
+++ fasthenry-3.0/src/fasthenry/sparse/spAllocate.c	2015-07-22 13:04:17.579742206 +0200
@@ -107,7 +107,9 @@
 #include "spDefs.h"

-
+static InitializeElementBlocks( MatrixPtr, int, int );
+static RecordAllocation( MatrixPtr, char* );
+static AllocateBlockOfAllocationList( MatrixPtr );


code:
Add forward declarations.

--- fasthenry-3.0/src/fasthenry/sparse/spBuild.c.orig	2015-07-22 10:13:30.884638176 +0200
+++ fasthenry-3.0/src/fasthenry/sparse/spBuild.c	2015-07-22 13:08:48.862973419 +0200
@@ -106,6 +106,8 @@
 #include "spDefs.h"

+static void Translate( MatrixPtr, int*, int* );
+static ExpandTranslationArrays( MatrixPtr, register int );


code:
Add forward declarations.

--- fasthenry-3.0/src/fasthenry/sparse/spFactor.c.orig	2015-07-22 10:37:04.934043468 +0200
+++ fasthenry-3.0/src/fasthenry/sparse/spFactor.c	2015-07-22 12:52:55.515636802 +0200
@@ -105,7 +105,29 @@
 #include "spDefs.h"

-
+static int FactorComplexMatrix( MatrixPtr );
+static CreateInternalVectors( MatrixPtr );
+static CountMarkowitz( MatrixPtr, register RealVector, int );
+static MarkowitzProducts( MatrixPtr, int );
+static ElementPtr SearchForPivot( MatrixPtr, int, int );
+static ElementPtr SearchForSingleton( MatrixPtr, int );
+static ElementPtr QuicklySearchDiagonal( MatrixPtr, int );
+static ElementPtr SearchDiagonal( MatrixPtr, register int );
+static ElementPtr SearchEntireMatrix( MatrixPtr, int );
+static RealNumber FindLargestInCol( register  ElementPtr );
+static RealNumber FindBiggestInColExclude( MatrixPtr, register  ElementPtr,
+                                           register  int );
+static ExchangeRowsAndCols( MatrixPtr, ElementPtr, register int );
+static ExchangeColElements( MatrixPtr, int, register  ElementPtr,
+                            int, register  ElementPtr, int );
+static ExchangeRowElements( MatrixPtr, int, register ElementPtr,
+                            int, register ElementPtr, int );
+static RealRowColElimination( MatrixPtr, register  ElementPtr );
+static ComplexRowColElimination( MatrixPtr, register  ElementPtr );
+static UpdateMarkowitzNumbers( MatrixPtr, ElementPtr );
+static ElementPtr CreateFillin( MatrixPtr, register int, int );
+static int MatrixIsSingular( MatrixPtr, int );
+static int ZeroPivot( MatrixPtr, int );


code:
Add forward declarations.

--- fasthenry-3.0/src/fasthenry/sparse/spSolve.c.orig	2015-07-22 12:06:20.502771958 +0200
+++ fasthenry-3.0/src/fasthenry/sparse/spSolve.c	2015-07-22 12:12:03.822798513 +0200
@@ -95,6 +95,7 @@
 #include "spDefs.h"

+static void SolveComplexMatrix( MatrixPtr, RealVector, RealVector );


code:
Add forward declarations.

--- fasthenry-3.0/src/fasthenry/sparse/spUtils.c.orig	2015-07-22 12:12:52.579370846 +0200
+++ fasthenry-3.0/src/fasthenry/sparse/spUtils.c	2015-07-22 12:14:09.636275633 +0200
@@ -107,6 +107,7 @@
 #include "spDefs.h"

+static RealNumber ComplexCondition( MatrixPtr, RealNumber, int* );


code:
https://github.com/geometer/FBReader/commit/b7c78e965d06f78043a57e230c866c3af3f5a1eb.patch
https://github.com/geometer/FBReader/issues/310
https://github.com/geometer/FBReader/pull/311/commits

From b7c78e965d06f78043a57e230c866c3af3f5a1eb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= <vcunat@gmail.com>
Date: Sun, 9 Dec 2018 10:18:03 +0100
Subject: [PATCH] fix compatibility with curl-7.62

https://github.com/curl/curl/commit/3f3b26d6fe
---
 zlibrary/core/src/unix/curl/ZLCurlNetworkManager.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/zlibrary/core/src/unix/curl/ZLCurlNetworkManager.cpp b/zlibrary/core/src/unix/curl/ZLCurlNetworkManager.cpp
index 54cc37f6c..03e2a5721 100644
--- a/zlibrary/core/src/unix/curl/ZLCurlNetworkManager.cpp
+++ b/zlibrary/core/src/unix/curl/ZLCurlNetworkManager.cpp
@@ -285,9 +285,11 @@ std::string ZLCurlNetworkManager::perform(const ZLExecutionData::Vector &dataLis
 #endif
 					errors.insert(ZLStringUtil::printf(errorResource["peerFailedVerificationMessage"].value(), ZLNetworkUtil::hostFromUrl(url)));
 					break;
+#if LIBCURL_VERSION_NUM < 0x073e00
 				case CURLE_SSL_CACERT:
 					errors.insert(ZLStringUtil::printf(errorResource["sslCertificateAuthorityMessage"].value(), ZLNetworkUtil::hostFromUrl(url)));
 					break;
+#endif
 				case CURLE_SSL_CACERT_BADFILE:
 					errors.insert(ZLStringUtil::printf(errorResource["sslBadCertificateFileMessage"].value(), request.sslCertificate().Path));
 					break;


code:
Fix build failure when using Swig 4.

Taken from upstream:
https://github.com/fifengine/fifengine/commit/d14f232f4cd9a00b05d6872957070e8c020f515d

diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -893,7 +893,7 @@ if(build-python)
   find_package(PythonLibs ${PYTHON_VERSION_STRING} EXACT)
   include_directories(${PYTHON_INCLUDE_PATH})

-  set(CMAKE_SWIG_FLAGS -modern -fastdispatch -dirvtable -nosafecstrings -noproxydel -fastproxy -fastinit -fastunpack -fastquery -modernargs -nobuildnone -keyword -w511 -w473 -w404 -w314)
+  set(CMAKE_SWIG_FLAGS -modern -fastdispatch -dirvtable -noproxydel -fastproxy -fastinit -fastunpack -fastquery -modernargs -keyword -w511 -w473 -w404 -w314)

   set_source_files_properties("${PROJECT_BINARY_DIR}/fife.i" PROPERTIES CPLUSPLUS ON)
   set(FIFE_SOURCES ${FIFE_CORE_SRC})


code:
From 0871db30bd73d112a434f54572d34cca28de61c5 Mon Sep 17 00:00:00 2001
From: fis <ybbs.daans@hotmail.com>
Date: Sat, 26 May 2018 22:58:37 +0800
Subject: [PATCH 2/2] * CMakeLists.txt: Fix flags for gcc.

---
 CMakeLists.txt | 18 ++----------------
 1 file changed, 2 insertions(+), 16 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index eba147b..d60dcef 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -6,20 +6,6 @@ add_executable(unit src/fifo_map.hpp test/unit.cpp)

 target_include_directories(unit PRIVATE "test" "src")

-if(MSVC)
-    set(CMAKE_CXX_FLAGS
-        "/EHsc"
-    )
+set(CMAKE_CXX_FLAGS "-std=c++11 -fpermissive")

-    STRING(REPLACE "/O2" "/Od" CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE})
-
-    add_definitions(-D_SCL_SECURE_NO_WARNINGS)
-else(MSVC)
-    set(CMAKE_CXX_FLAGS
-        "-std=c++11 -stdlib=libc++"
-    )
-endif(MSVC)
-
-include_directories(
-    src test
-)
+include_directories(src test)
--
2.14.3


code:
From 20dcf90fd02511f8d78ea7cc8ac82c121fd2f6cf Mon Sep 17 00:00:00 2001
From: fis <ybbs.daans@hotmail.com>
Date: Sat, 26 May 2018 22:56:29 +0800
Subject: [PATCH 1/2] * CMakeLists.txt: Remove catch.hpp.

---
 CMakeLists.txt | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6603c7f..eba147b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,11 +2,9 @@ cmake_minimum_required(VERSION 2.8)

 project(fifo_map LANGUAGES CXX)

-add_executable(unit
-    src/fifo_map.hpp test/thirdparty/catch/catch.hpp test/unit.cpp
-)
+add_executable(unit src/fifo_map.hpp test/unit.cpp)

-target_include_directories(unit PRIVATE "test" "src" "test/thirdparty")
+target_include_directories(unit PRIVATE "test" "src")

 if(MSVC)
     set(CMAKE_CXX_FLAGS
--
2.14.3


code:
Do not try to create $localstatedir (aka. /var) since we don't have
write access.

--- findutils-4.4.2/locate/Makefile.in	2015-06-04 12:40:52.690935795 +0200
+++ findutils-4.4.2/locate/Makefile.in	2015-06-04 12:41:32.087286685 +0200
@@ -1212,7 +1212,7 @@ updatedb: updatedb.sh Makefile
 	chmod +x $@

 install-data-hook:
-	$(top_srcdir)/build-aux/mkinstalldirs $(DESTDIR)$(localstatedir)
+	true

 dblocation.texi: Makefile
 	echo '@set LOCATE_DB $(LOCATE_DB)' > $@


code:
Skip "test-rwlock1" when multithreading is disabled, which is the case
during bootstrapping on architectures not supported by GNU Mes.

Taken from upstream gnulib:
https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=fdff8bd09a7f053381f8bdb107ab5280b7c95959

diff --git a/gnulib-tests/test-rwlock1.c b/gnulib-tests/test-rwlock1.c
--- a/gnulib-tests/test-rwlock1.c
+++ b/gnulib-tests/test-rwlock1.c
@@ -21,6 +21,8 @@

 #include <config.h>

+#if USE_ISOC_THREADS || USE_POSIX_THREADS || USE_ISOC_AND_POSIX_THREADS || USE_WINDOWS_THREADS
+
 #include "glthread/lock.h"

 #include <errno.h>
@@ -151,3 +153,18 @@ main ()
       sleep (1);
     }
 }
+
+#else
+
+/* No multithreading available.  */
+
+#include <stdio.h>
+
+int
+main ()
+{
+  fputs ("Skipping test: multithreading not enabled\n", stderr);
+  return 77;
+}
+
+#endif


code:
Fixes this issue:
 <https://github.com/mariusmuja/flann/issues/369>.
Patch from Buildroot:
 <https://github.com/buildroot/buildroot/commit/45a39b3e2ba42b72d19bfcef30db1b8da9ead51a>.

From fa5ec96a94646492a3f908e12905b3e48a8e800b Mon Sep 17 00:00:00 2001
From: Romain Naour <romain.naour@gmail.com>
Date: Wed, 18 Apr 2018 20:24:13 +0200
Subject: [PATCH] src/cpp: fix cmake >= 3.11 build

CMake < 3.11 doesn't support add_library() without any source file
(i.e add_library(foo SHARED)). But flann CMake use a trick that use
an empty string "" as source list (i.e add_library(foo SHARED "")).
This look like a bug in CMake < 3.11.

With CMake >= 3.11, the new behaviour of add_library() break the
existing flann CMake code.

From CMake Changelog [1]:
"add_library() and add_executable() commands can now be called without
 any sources and will not complain as long as sources are added later
 via the target_sources() command."

Note: flann CMake code doesn't use target_sources() since no source file
are provided intentionally since the flann shared library is created by
linking with the flann_cpp_s static library with this line:

target_link_libraries(flann_cpp -Wl,-whole-archive flann_cpp_s -Wl,-no-whole-archive)

If you try to use "add_library(flann_cpp SHARED ${CPP_SOURCES})" (as it should
be normally done), the link fail due to already defined symbol.

They are building the shared version using the static library "to speedup the
build time" [3]

This issue is already reported upstream [2] with a proposed solution.

Upstream status: Pending

Fixes:
http://autobuild.buildroot.net/results/b2f/b2febfaf8c44ce477b3e4a5b9b976fd25e8d7454

[1] https://cmake.org/cmake/help/v3.11/release/3.11.html
[2] https://github.com/mariusmuja/flann/issues/369
[3] https://github.com/mariusmuja/flann/commit/0fd62b43be2fbb0b8d791ee36290791224dc030c

Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
 src/cpp/CMakeLists.txt | 4 ++--
 src/cpp/empty.cpp      | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)
 create mode 100644 src/cpp/empty.cpp

diff --git a/src/cpp/CMakeLists.txt b/src/cpp/CMakeLists.txt
index b44a735..a816863 100644
--- a/src/cpp/CMakeLists.txt
+++ b/src/cpp/CMakeLists.txt
@@ -29,7 +29,7 @@ if (BUILD_CUDA_LIB)
 endif()

 if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_COMPILER_IS_GNUCC)
-    add_library(flann_cpp SHARED "")
+    add_library(flann_cpp SHARED "empty.cpp")
     set_target_properties(flann_cpp PROPERTIES LINKER_LANGUAGE CXX)
     target_link_libraries(flann_cpp -Wl,-whole-archive flann_cpp_s -Wl,-no-whole-archive)

@@ -85,7 +85,7 @@ if (BUILD_C_BINDINGS)
     set_property(TARGET flann_s PROPERTY COMPILE_DEFINITIONS FLANN_STATIC)

     if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_COMPILER_IS_GNUCC)
-        add_library(flann SHARED "")
+        add_library(flann SHARED "empty.cpp")
         set_target_properties(flann PROPERTIES LINKER_LANGUAGE CXX)
         target_link_libraries(flann -Wl,-whole-archive flann_s -Wl,-no-whole-archive)
     else()
diff --git a/src/cpp/empty.cpp b/src/cpp/empty.cpp
new file mode 100644
index 0000000..40a8c17
--- /dev/null
+++ b/src/cpp/empty.cpp
@@ -0,0 +1 @@
+/* empty */
--
2.14.3


code:
Avoid usage of PATH_MAX.

Taken from https://salsa.debian.org/freedesktop-team/fontconfig/-/blob/master/debian/patches/path_max.patch

Index: fontconfig-2.13.1/src/fccfg.c
===================================================================
--- fontconfig-2.13.1.orig/src/fccfg.c
+++ fontconfig-2.13.1/src/fccfg.c
@@ -2231,7 +2231,7 @@ FcConfigRealFilename (FcConfig		*config,

     if (n)
     {
-	FcChar8 buf[PATH_MAX];
+	FcChar8 buf[FC_PATH_MAX];
 	ssize_t len;

 	if (sysroot)


code:
From: Markus Koschany <apo@debian.org>
Date: Thu, 8 Mar 2018 17:49:24 +0100
Subject: pkg-config

Use pkg-config instead of the deprecated freetype-config command.

Bug-Debian: https://bugs.debian.org/892338
Forwarded: no
---
 src/Makefile.am | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 3b7d0fe..0f5a5dd 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -158,8 +158,8 @@ endif
 SDL_CFLAGS = `sdl-config --cflags`
 SDL_LIBS   = `sdl-config --libs`

-FREETYPE_CFLAGS = `freetype-config --cflags`
-FREETYPE_LIBS   = `freetype-config --libs`
+FREETYPE_CFLAGS = `pkg-config --cflags freetype2`
+FREETYPE_LIBS   = `pkg-config --libs freetype2`

 if USE_MATHSINGLE
 MATH_CFLAGS = -DVMATH_SINGLE_PRECISION
@@ -233,4 +233,4 @@ AM_CFLAGS = -Wall ${FREETYPE_CFLAGS} ${SDL_CFLAGS} ${NVIDIA_CFLAGS} ${SOUND_CFLA
             ${OPTIMIZATION_CFLAGS} ${USESSE_CFLAGS} ${USEWIN_CFLAGS} ${FASTMATH_CFLAGS} ${DEBIAN_CFLAGS} -lm

 AM_LDFLAGS = ${all_libraries} ${FREETYPE_LIBS} ${SDL_LIBS}
-LDADD = ${LDADD_FLAGS}
\ No newline at end of file
+LDADD = ${LDADD_FLAGS}


code:
Remove/patch metadata timestamps for reproducibility.

diff -ur fpcbuild-3.0.0.old/fpcsrc/packages/fpmkunit/src/fpmkunit.pp fpcbuild-3.0.0/fpcsrc/packages/fpmkunit/src/fpmkunit.pp
--- fpcbuild-3.0.0.old/fpcsrc/packages/fpmkunit/src/fpmkunit.pp	2015-11-04 16:17:00.000000000 -0500
+++ fpcbuild-3.0.0/fpcsrc/packages/fpmkunit/src/fpmkunit.pp	2017-01-26 16:25:29.327339282 -0500
@@ -3779,7 +3779,7 @@
       Values[KeyName]:=Name;
       Values[KeyVersion]:=Version;
       // TODO Generate checksum based on PPUs
-      InstalledChecksum:=DateTimeToFileDate(Now);
+      InstalledChecksum:=0;
       Values[KeyChecksum]:=IntToStr(InstalledChecksum);
       Values[KeyCPU]:=CPUToString(ACPU);
       Values[KeyOS]:=OSToString(AOS);
diff -ur fpcbuild-3.0.0.old/fpcsrc/utils/fpcmkcfg/fpcmkcfg.pp fpcbuild-3.0.0/fpcsrc/utils/fpcmkcfg/fpcmkcfg.pp
--- fpcbuild-3.0.0.old/fpcsrc/utils/fpcmkcfg/fpcmkcfg.pp	2013-06-01 18:27:16.000000000 -0400
+++ fpcbuild-3.0.0/fpcsrc/utils/fpcmkcfg/fpcmkcfg.pp	2017-01-26 16:24:22.949044903 -0500
@@ -234,8 +234,8 @@
   TemplateParser.Values['FPCTARGETOS'] := BuildOSTarget;
   TemplateParser.Values['FPCBIN'] := 'fpc';
   TemplateParser.Values['PWD'] := GetCurrentDir;
-  TemplateParser.Values['BUILDDATE'] := DateToStr(Date);
-  TemplateParser.Values['BUILDTIME'] := TimeToStr(Time);
+  TemplateParser.Values['BUILDDATE'] := '';
+  TemplateParser.Values['BUILDTIME'] := '';

   TemplateParser.Values['LOCALREPOSITORY'] := GetDefaultLocalRepository;
   TemplateParser.Values['LOCALBASEPATH'] := GetDefaultLocalBasepath;


code:
See https://github.com/fplll/fplll/issues/444

--- fplll-5.3.3-checkout.old/fplll/enum/enumerate_base.h	2020-09-23 13:55:27.833769823 +0200
+++ fplll-5.3.3-checkout/fplll/enum/enumerate_base.h	2020-09-23 13:56:14.313771769 +0200
@@ -127,10 +127,10 @@
   int rounding_backup;
   void save_rounding()
   {
-    rounding_backup = std::fegetround();
-    std::fesetround(FE_TONEAREST);
+    rounding_backup = fegetround();
+    fesetround(FE_TONEAREST);
   }
-  void restore_rounding() { std::fesetround(rounding_backup); }
+  void restore_rounding() { fesetround(rounding_backup); }

   inline bool next_pos_up()
   {


code:
From 85f8dda6de28ef86e58f26c8aa863a26524f6ce0 Mon Sep 17 00:00:00 2001
From: Jesse Gibbons <jgibbons2357+freedink@gmail.com>
Date: Sun, 9 Feb 2020 21:46:26 -0700
Subject: [PATCH] Fix mouse/touch event hints for SDL 2.0.10.

This fixes the bug reported at
<https://lists.gnu.org/archive/html/bug-freedink/2019-08/msg00000.html>.

It should remain backwards compatible with releases of SDL prior to 2.0.10.
---
 src/input.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/input.cpp b/src/input.cpp
index b5ae21e..153d349 100644
--- a/src/input.cpp
+++ b/src/input.cpp
@@ -91,7 +91,12 @@ void input_init(void)

   // TODO: don't attempt to simulate mouse events from touch events -
   // fake mouse events often are de-centered
+#ifdef SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH
   SDL_SetHint(SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH, "0");
+#elif defined SDL_HINT_MOUSE_TOUCH_EVENTS && defined SDL_HINT_TOUCH_MOUSE_EVENTS
+  SDL_SetHint(SDL_HINT_MOUSE_TOUCH_EVENTS, "0");
+  SDL_SetHint(SDL_HINT_TOUCH_MOUSE_EVENTS, "0");
+#endif

   /* Touch devices */
   {
--
2.25.0