code:
Without <limits.h>, INT_MAX is not defined.

diff --git a/transport.hxx b/transport.hxx
index 35a57a7..838add6 100644
--- a/transport.hxx
+++ b/transport.hxx
@@ -11,6 +11,7 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <string.h>
+#include <limits.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>


code:
Patch backported by Sage.

Fix from upstream that happens to work around
https://trac.sagemath.org/ticket/23011
diff --git a/src/lsp/format.lsp b/src/lsp/format.lsp
index 77ca799..53b887c 100644
--- a/src/lsp/format.lsp
+++ b/src/lsp/format.lsp
@@ -307,11 +307,13 @@
                   :start (format-directive-start struct)
                   :end (format-directive-end struct))))

+(defconstant +format-directive-limit+ (1+ (char-code #\~)))
+
 #+formatter
 (defparameter *format-directive-expanders*
-  (make-array char-code-limit :initial-element nil))
+  (make-array +format-directive-limit+ :initial-element nil))
 (defparameter *format-directive-interpreters*
-  (make-array char-code-limit :initial-element nil))
+  (make-array +format-directive-limit+ :initial-element nil))

 (defparameter *default-format-error-control-string* nil)
 (defparameter *default-format-error-offset* nil)
@@ -550,24 +552,24 @@
            (write-string directive stream)
            (interpret-directive-list stream (cdr directives) orig-args args))
           (#-ecl format-directive #+ecl vector
+           (multiple-value-bind
+                 (new-directives new-args)
+               (let* ((code (char-code (format-directive-character directive)))
+                      (function
+                        (and (< code +format-directive-limit+)
+                             (svref *format-directive-interpreters* code)))
+                      (*default-format-error-offset*
+                        (1- (format-directive-end directive))))
+                 (unless function
+                   (error 'format-error
+                          :complaint "Unknown format directive."))
                  (multiple-value-bind
                        (new-directives new-args)
-                     (let ((function
-                            (svref *format-directive-interpreters*
-                                   (char-code (format-directive-character
-                                               directive))))
-                           (*default-format-error-offset*
-                            (1- (format-directive-end directive))))
-                       (unless function
-                         (error 'format-error
-                                :complaint "Unknown format directive."))
-                       (multiple-value-bind
-                             (new-directives new-args)
-                           (funcall function stream directive
-                                    (cdr directives) orig-args args)
-                         (values new-directives new-args)))
-                   (interpret-directive-list stream new-directives
-                                             orig-args new-args)))))
+                     (funcall function stream directive
+                              (cdr directives) orig-args args)
+                   (values new-directives new-args)))
+             (interpret-directive-list stream new-directives
+                                       orig-args new-args)))))
       args))

@@ -639,11 +641,12 @@
        (values `(write-string ,directive stream)
                more-directives))
       (format-directive
-       (let ((expander
-              (aref *format-directive-expanders*
-                    (char-code (format-directive-character directive))))
-             (*default-format-error-offset*
-              (1- (format-directive-end directive))))
+       (let* ((code (char-code (format-directive-character directive)))
+              (expander
+                (and (< code +format-directive-limit+)
+                     (svref *format-directive-expanders* code)))
+              (*default-format-error-offset*
+                (1- (format-directive-end directive))))
          (if expander
              (funcall expander directive more-directives)
              (error 'format-error

license: mit


code:
Patch adapted from Sage.
diff -Naur ecl-16.1.2.orig/src/c/file.d ecl-16.1.2/src/c/file.d
--- ecl-16.1.2.orig/src/c/file.d	2016-05-11 13:10:51.867673867 +1200
+++ ecl-16.1.2/src/c/file.d	2016-05-11 14:44:48.121907307 +1200
@@ -3354,8 +3354,10 @@
   ecl_disable_interrupts();
   do {
     out = fwrite(c, sizeof(char), n, IO_STREAM_FILE(strm));
-  } while (out < n && restartable_io_error(strm, "fwrite"));
-  ecl_enable_interrupts();
+  /* Ignore write errors to stderr to avoid an infinite loop */
+  } while (out < n && (IO_STREAM_FILE(strm) != stderr) && restartable_io_error(strm, "fwrite"));
+
+  ecl_enable_interrupts();
   return out;
 }


code:
Patch adapted from Sage. Allows building ECL on libffi 3.3.
diff --git a/src/c/ffi.d b/src/c/ffi.d
index 8861303e..8a959c23 100644
--- a/src/c/ffi.d
+++ b/src/c/ffi.d
@@ -133,8 +133,8 @@ static struct {
 #elif defined(X86_WIN64)
   {@':win64', FFI_WIN64},
 #elif defined(X86_ANY) || defined(X86) || defined(X86_64)
-  {@':cdecl', FFI_SYSV},
-  {@':sysv', FFI_SYSV},
+  {@':cdecl', FFI_UNIX64},
+  {@':sysv', FFI_UNIX64},
   {@':unix64', FFI_UNIX64},
 #endif
 };


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:
Fix completion for R5RS Scheme.
See https://github.com/ashinn/scheme-complete/issues/1

--- scheme-complete-master/scheme-complete.el.orig	2015-12-25 21:59:09.896909029 +0100
+++ scheme-complete-master/scheme-complete.el	2015-12-25 21:59:17.924993998 +0100
@@ -591,7 +591,7 @@
            '((exact->inexact (lambda (z) z))
              (inexact->exact (lambda (z) z)))
            (mapcar #'(lambda (x)
-                       (list x (scheme-env-lookup *scheme-r7rs-info* x)))
+                       (scheme-env-lookup *scheme-r7rs-info* x))
                    *scheme-r5rs-bindings*))))
   *scheme-r5rs-info*)


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:
Remove interactive build for telega-server, as it fails on Guix.
Modify the `telega-server--find-bin' function to only use the version
of telega-server installed by Guix.

Created by Brett Gilio <brettg@gnu.org>

--- a/telega-server.el
+++ b/telega-server.el
@@ -113,7 +113,6 @@ If already deferring, then just executes the BODY."
 If BUILD-FLAGS is specified, then rebuild server without any
 queries using this flags for building, could be empty string.
 Otherwise query user about building flags."
-  (interactive)
   (telega-test-env 'quiet)
   (when (or build-flags
             (y-or-n-p "Build `telega-server'? "))
@@ -137,11 +136,8 @@ 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"))))
+  (or (executable-find "telega-server")
+      (error "`telega-server' not found in exec-path")))

 (defun telega-server-version ()
   "Return telega-server version."


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:
From 52bfd419bf9022726048f818d955b8ea10a16d5c Mon Sep 17 00:00:00 2001
From: Patrick Mosby <info@schreiblogade.de>
Date: Mon, 7 Sep 2015 09:05:56 +0200
Subject: [PATCH] Don't save undo file for ignored files.

This fixes #4.
---
 undohist.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/undohist.el b/undohist.el
index b184a26..de60356 100644
--- a/undohist.el
+++ b/undohist.el
@@ -164,7 +164,8 @@ To use undohist, you just call this function."
                 undohist-ignored-files)))

 (defun undohist-save-1 ()
-  (when (consp buffer-undo-list)
+  (when (and (consp buffer-undo-list)
+             (undohist-recover-file-p (buffer-file-name (current-buffer))))
     (let ((file (make-undohist-file-name (buffer-file-name)))
           (contents `((digest . ,(md5 (current-buffer)))
                       (undo-list . ,(undohist-encode buffer-undo-list)))))
--
2.21.0


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:
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:
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:
Fix CVE-2017-14859, CVE-2017-14862 and CVE-2017-14864.

https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-14859
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-14862
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-14864

Copied from upstream:

https://github.com/Exiv2/exiv2/commit/8a586c74bbe3fbca64e86e42a42282c73f427607

From 8a586c74bbe3fbca64e86e42a42282c73f427607 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= <dan.cermak@cgc-instruments.com>
Date: Sat, 7 Oct 2017 23:08:36 +0200
Subject: [PATCH] Fix for CVE-2017-14864, CVE-2017-14862 and CVE-2017-14859

The invalid memory dereference in
Exiv2::getULong()/Exiv2::StringValueBase::read()/Exiv2::DataValue::read()
is caused further up the call-stack, by
v->read(pData, size, byteOrder) in TiffReader::readTiffEntry()
passing an invalid pData pointer (pData points outside of the Tiff
file). pData can be set out of bounds in the (size > 4) branch where
baseOffset() and offset are added to pData_ without checking whether
the result is still in the file. As offset comes from an untrusted
source, an attacker can craft an arbitrarily large offset into the
file.

This commit adds a check into the problematic branch, whether the
result of the addition would be out of bounds of the Tiff
file. Furthermore the whole operation is checked for possible
overflows.
---
 src/tiffvisitor.cpp | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/src/tiffvisitor.cpp b/src/tiffvisitor.cpp
index 4ab733d4..ef13542e 100644
--- a/src/tiffvisitor.cpp
+++ b/src/tiffvisitor.cpp
@@ -47,6 +47,7 @@ EXIV2_RCSID("@(#) $Id$")
 #include <iostream>
 #include <iomanip>
 #include <cassert>
+#include <limits>

 // *****************************************************************************
 namespace {
@@ -1517,7 +1518,19 @@ namespace Exiv2 {
                 size = 0;
         }
         if (size > 4) {
+            // setting pData to pData_ + baseOffset() + offset can result in pData pointing to invalid memory,
+            // as offset can be arbitrarily large
+            if ((static_cast<uintptr_t>(baseOffset()) > std::numeric_limits<uintptr_t>::max() - static_cast<uintptr_t>(offset))
+             || (static_cast<uintptr_t>(baseOffset() + offset) > std::numeric_limits<uintptr_t>::max() - reinterpret_cast<uintptr_t>(pData_)))
+            {
+                throw Error(59);
+            }
+            if (pData_ + static_cast<uintptr_t>(baseOffset()) + static_cast<uintptr_t>(offset) > pLast_) {
+                throw Error(58);
+            }
             pData = const_cast<byte*>(pData_) + baseOffset() + offset;
+
+	    // check for size being invalid
             if (size > static_cast<uint32_t>(pLast_ - pData)) {
 #ifndef SUPPRESS_WARNINGS
                 EXV_ERROR << "Upper boundary of data for "


code:
Fix CVE-2017-14860.

https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-14860
https://nvd.nist.gov/vuln/detail/CVE-2017-14860

Copied from upstream:

https://github.com/Exiv2/exiv2/commit/ff18fec24b119579df26fd2ebb8bb012cde102ce

From ff18fec24b119579df26fd2ebb8bb012cde102ce Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= <dan.cermak@cgc-instruments.com>
Date: Fri, 6 Oct 2017 23:09:08 +0200
Subject: [PATCH] Fix for CVE-2017-14860

A heap buffer overflow could occur in memcpy when icc.size_ is larger
than data.size_ - pad, as then memcpy would read out of bounds of data.

This commit adds a sanity check to iccLength (= icc.size_): if it is
larger than data.size_ - pad (i.e. an overflow would be caused) an
exception is thrown.

This fixes #71.
---
 src/jp2image.cpp | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/jp2image.cpp b/src/jp2image.cpp
index 747145cf..748d39b5 100644
--- a/src/jp2image.cpp
+++ b/src/jp2image.cpp
@@ -269,10 +269,15 @@ namespace Exiv2
                             std::cout << "Exiv2::Jp2Image::readMetadata: "
                                      << "Color data found" << std::endl;
 #endif
-                            long pad = 3 ; // 3 padding bytes 2 0 0
+                            const long pad = 3 ; // 3 padding bytes 2 0 0
                             DataBuf data(subBox.length+8);
                             io_->read(data.pData_,data.size_);
-                            long    iccLength = getULong(data.pData_+pad, bigEndian);
+                            const long    iccLength = getULong(data.pData_+pad, bigEndian);
+                            // subtracting pad from data.size_ is safe:
+                            // size_ is at least 8 and pad = 3
+                            if (iccLength > data.size_ - pad) {
+                                throw Error(58);
+			    }
                             DataBuf icc(iccLength);
                             ::memcpy(icc.pData_,data.pData_+pad,icc.size_);
 #ifdef DEBUG


code:
Remove build machinery for bundled dependencies.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 89e6125e..c5e90750 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -36,7 +36,7 @@ endif()
 if(PACKAGE)
   # this needs to be set before project() is called
   set(CMAKE_OSX_DEPLOYMENT_TARGET 10.12)
-  set(ASSETS ON) # necessary for packaging
+  set(ASSETS OFF) # necessary for packaging
   message(STATUS "Building Extempore for binary distribution (assets directory will be downloaded)")
 endif()

@@ -134,71 +134,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 #
-#############
-
-add_library(portaudio STATIC
-  src/portaudio/src/common/pa_allocation.c
-  src/portaudio/src/common/pa_allocation.h
-  src/portaudio/src/common/pa_converters.c
-  src/portaudio/src/common/pa_converters.h
-  src/portaudio/src/common/pa_cpuload.c
-  src/portaudio/src/common/pa_cpuload.h
-  src/portaudio/src/common/pa_debugprint.c
-  src/portaudio/src/common/pa_debugprint.h
-  src/portaudio/src/common/pa_dither.c
-  src/portaudio/src/common/pa_dither.h
-  src/portaudio/src/common/pa_endianness.h
-  src/portaudio/src/common/pa_front.c
-  src/portaudio/src/common/pa_hostapi.h
-  src/portaudio/src/common/pa_memorybarrier.h
-  src/portaudio/src/common/pa_process.c
-  src/portaudio/src/common/pa_process.h
-  src/portaudio/src/common/pa_ringbuffer.c
-  src/portaudio/src/common/pa_ringbuffer.h
-  src/portaudio/src/common/pa_stream.c
-  src/portaudio/src/common/pa_stream.h
-  src/portaudio/src/common/pa_trace.c
-  src/portaudio/src/common/pa_trace.h
-  src/portaudio/src/common/pa_types.h
-  src/portaudio/src/common/pa_util.h
-  )
-
-target_include_directories(portaudio
-  PRIVATE src/portaudio/include
-  PRIVATE src/portaudio/src/common)
-
 # platform-specific

 if(APPLE)
@@ -224,25 +159,8 @@ if(APPLE)

 elseif(UNIX AND NOT APPLE)
   # use ALSA on Linux
-  target_sources(portaudio
-    PRIVATE src/portaudio/src/hostapi/alsa/pa_linux_alsa.c
-    PRIVATE src/portaudio/src/os/unix/pa_unix_hostapis.c
-    PRIVATE src/portaudio/src/os/unix/pa_unix_util.c
-    )
-  target_include_directories(portaudio
-    PRIVATE src/portaudio/src/os/unix)
-  target_compile_definitions(portaudio
-    PRIVATE -DPA_USE_ALSA)
-  target_link_libraries(portaudio
-    PRIVATE asound)

   if(JACK)
-    target_sources(portaudio
-      PRIVATE src/portaudio/src/hostapi/jack/pa_jack.c)
-    target_compile_definitions(portaudio
-      PRIVATE -DPA_USE_JACK)
-    target_link_libraries(portaudio
-      PRIVATE jack)
   endif()

 elseif(WIN32)
@@ -292,8 +210,6 @@ if(ASIO)
 endif()

 if(PACKAGE)
-  target_compile_options(portaudio
-    PRIVATE -mtune=generic)
 endif()

 ##############
@@ -411,8 +327,6 @@ endif()

 # dependencies

-add_dependencies(extempore pcre portaudio)
-
 if(BUILD_LLVM)
   if(WIN32)
     add_dependencies(extempore LLVM-install)
@@ -553,7 +467,7 @@ else()
   install(TARGETS extempore
     RUNTIME
     DESTINATION ".")
-  install(DIRECTORY assets runtime libs examples tests
+  install(DIRECTORY runtime libs examples
     DESTINATION "."
     PATTERN ".DS_Store" EXCLUDE)
 endif()


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:
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:
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