From 841a7a2835de1e695bcd5fe0f491feed4a69dcfa Mon Sep 17 00:00:00 2001 From: mappu Date: Wed, 6 Nov 2024 18:29:56 +1300 Subject: [PATCH] qscintilla6: definitions --- cmd/genbindings/config-libraries.go | 12 ++++++++++++ docker/genbindings.Dockerfile | 1 + pkg-config/QScintilla6.pc.example | 9 +++++++++ qt-restricted-extras/qscintilla6/cflags.go | 8 ++++++++ 4 files changed, 30 insertions(+) create mode 100644 pkg-config/QScintilla6.pc.example create mode 100644 qt-restricted-extras/qscintilla6/cflags.go diff --git a/cmd/genbindings/config-libraries.go b/cmd/genbindings/config-libraries.go index 5fc155fb..e10e050b 100644 --- a/cmd/genbindings/config-libraries.go +++ b/cmd/genbindings/config-libraries.go @@ -227,4 +227,16 @@ func ProcessLibraries(clangBin, outDir, extraLibsDir string) { ClangMatchSameHeaderDefinitionOnly, ) + // Depends on QtCore/Gui/Widgets, QPrintSupport + generate( + "qt-restricted-extras/qscintilla6", + []string{ + "/usr/include/x86_64-linux-gnu/qt6/Qsci", + }, + AllowAllHeaders, + clangBin, + "--std=c++17 "+pkgConfigCflags("Qt6PrintSupport"), + outDir, + ClangMatchSameHeaderDefinitionOnly, + ) } diff --git a/docker/genbindings.Dockerfile b/docker/genbindings.Dockerfile index 31898be3..228f75af 100644 --- a/docker/genbindings.Dockerfile +++ b/docker/genbindings.Dockerfile @@ -8,6 +8,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update && \ qt6-base-dev \ qt6-multimedia-dev \ libqscintilla2-qt5-dev \ + libqscintilla2-qt6-dev \ clang \ git \ ca-certificates \ diff --git a/pkg-config/QScintilla6.pc.example b/pkg-config/QScintilla6.pc.example new file mode 100644 index 00000000..fd6f6af5 --- /dev/null +++ b/pkg-config/QScintilla6.pc.example @@ -0,0 +1,9 @@ +includedir=/usr/include/x86_64-linux-gnu/qt6/Qsci/ + +Name: QScintilla6 +Description: Qt6 port of the Scintilla source code editing widget +URL: http://www.riverbankcomputing.co.uk/software/qscintilla +Version: 2.13.3 +Requires: Qt6Widgets, Qt6PrintSupport +Libs: -lqscintilla2_qt6 +Cflags: -I${includedir} diff --git a/qt-restricted-extras/qscintilla6/cflags.go b/qt-restricted-extras/qscintilla6/cflags.go new file mode 100644 index 00000000..f9f4dde7 --- /dev/null +++ b/qt-restricted-extras/qscintilla6/cflags.go @@ -0,0 +1,8 @@ +package qscintilla6 + +/* +#cgo CFLAGS: +#cgo CXXFLAGS: -std=c++17 +#cgo pkg-config: QScintilla6 +*/ +import "C"