From 9fb58ee6083de4314b338087080e48df3b17ea99 Mon Sep 17 00:00:00 2001
From: Alex Hughes <ahughesalex@gmail.com>
Date: Thu, 30 Jan 2025 20:35:43 -0800
Subject: [PATCH] Reintroduce the scintilla

---
 docker/genbindings.Dockerfile | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/docker/genbindings.Dockerfile b/docker/genbindings.Dockerfile
index 46bb2c5f..97e31575 100644
--- a/docker/genbindings.Dockerfile
+++ b/docker/genbindings.Dockerfile
@@ -35,5 +35,26 @@ ENV QT_PLUGIN_PATH=/opt/Qt/$QT6_VERSION/gcc_64/plugins
 ENV QTDIR=/opt/Qt/$QT6_VERSION/gcc_64
 ENV PKG_CONFIG_PATH=/opt/Qt/$QT6_VERSION/gcc_64/lib/pkgconfig:$PKG_CONFIG_PATH
 
+RUN mkdir -p /usr/local/src/scintilla && \
+    git clone 'https://github.com/mirror/scintilla.git' /usr/local/src/scintilla && \
+    git -C /usr/local/src/scintilla checkout rel-5-5-2
+
+RUN \
+    cd /usr/local/src/scintilla/qt/ScintillaEditBase && \
+    qmake && \
+    make && \
+    cd /usr/local/src/scintilla/qt/ScintillaEdit && \
+    python3 WidgetGen.py && \
+    qmake && \
+    make
+
+RUN mkdir -p /usr/local/lib/pkgconfig
+
+COPY pkg-config/QScintilla.pc.example /opt/Qt/$QT5_VERSION/gcc_64/lib/pkgconfig/QScintilla.pc
+COPY pkg-config/ScintillaEdit.pc.example /opt/Qt/$QT5_VERSION/gcc_64/lib/pkgconfig/ScintillaEdit.pc
+
+COPY pkg-config/QScintilla.pc.example /opt/Qt/$QT6_VERSION/gcc_64/lib/pkgconfig/QScintilla.pc
+COPY pkg-config/ScintillaEdit.pc.example /opt/Qt/$QT6_VERSION/gcc_64/lib/pkgconfig/ScintillaEdit.pc
+
 
 ENV GOFLAGS=-buildvcs=false