diff --git a/x11-libs/qscintilla/patches/qscintilla-2.11.6.patchset b/x11-libs/qscintilla/patches/qscintilla-2.11.6.patchset new file mode 100644 index 000000000..91a8bcfa3 --- /dev/null +++ b/x11-libs/qscintilla/patches/qscintilla-2.11.6.patchset @@ -0,0 +1,57 @@ +From d46e0b3ce8dc18bff63491959b57adbce568096d Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Tue, 2 Feb 2021 09:13:05 +0100 +Subject: Haiku patch + + +diff --git a/include/Platform.h b/include/Platform.h +index 887ed4b..6370790 100644 +--- a/include/Platform.h ++++ b/include/Platform.h +@@ -39,14 +39,15 @@ + #undef PLAT_CURSES + #define PLAT_CURSES 1 + +-#elif defined(__HAIKU__) +-#undef PLAT_HAIKU +-#define PLAT_HAIKU 1 +- + #elif defined(SCINTILLA_QT) + #undef PLAT_QT + #define PLAT_QT 1 + ++#if defined(__HAIKU__) ++#undef PLAT_QT_HAIKU ++#define PLAT_QT_HAIKU 1 ++#endif ++ + #include + QT_BEGIN_NAMESPACE + class QPainter; +diff --git a/pyproject.toml b/pyproject.toml +index fa0d820..2071ecf 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -18,3 +18,6 @@ description-file = "Python/README" + # Bootstrap the project. + [tool.sip] + project-factory = "Python/project.py" ++ ++ [tool.sip.project] ++sip-include-dirs = ['BINDINGS_DIR'] +diff --git a/src/RunStyles.cpp b/src/RunStyles.cpp +index ad3084a..7dc68f4 100644 +--- a/src/RunStyles.cpp ++++ b/src/RunStyles.cpp +@@ -308,7 +308,7 @@ void RunStyles::Check() const { + + template class Scintilla::RunStyles; + template class Scintilla::RunStyles; +-#if (PTRDIFF_MAX != INT_MAX) || PLAT_HAIKU ++#if (PTRDIFF_MAX != INT_MAX) || PLAT_QT_HAIKU + template class Scintilla::RunStyles; + template class Scintilla::RunStyles; + #endif +-- +2.30.0 + diff --git a/x11-libs/qscintilla/qscintilla-2.10.1.recipe b/x11-libs/qscintilla/qscintilla-2.11.6.recipe similarity index 51% rename from x11-libs/qscintilla/qscintilla-2.10.1.recipe rename to x11-libs/qscintilla/qscintilla-2.11.6.recipe index acb704fb4..dc28e7705 100644 --- a/x11-libs/qscintilla/qscintilla-2.10.1.recipe +++ b/x11-libs/qscintilla/qscintilla-2.11.6.recipe @@ -26,16 +26,17 @@ HOMEPAGE="https://www.riverbankcomputing.com/software/qscintilla/" COPYRIGHT="2015-2017 Riverbank Computing Limited" LICENSE="GNU GPL v3" REVISION="1" -SOURCE_URI="https://sourceforge.net/projects/pyqt/files/QScintilla2/QScintilla-$portVersion/QScintilla_gpl-$portVersion.tar.gz" -CHECKSUM_SHA256="97f98a9d91f908db6ce37fecc6d241d955b388a1c487173b60726cba9a3dfa64" -SOURCE_DIR="QScintilla_gpl-$portVersion" +SOURCE_URI="https://www.riverbankcomputing.com/static/Downloads/QScintilla/$portVersion/QScintilla-$portVersion.tar.gz" +CHECKSUM_SHA256="e7346057db47d2fb384467fafccfcb13aa0741373c5d593bc72b55b2f0dd20a7" +SOURCE_DIR="QScintilla-$portVersion" +PATCHES="qscintilla-$portVersion.patchset" ARCHITECTURES="!x86_gcc2 x86_64" SECONDARY_ARCHITECTURES="x86" PROVIDES=" qscintilla$secondaryArchSuffix = $portVersion - lib:libqscintilla2_qt5$secondaryArchSuffix = $portVersion + lib:libqscintilla2_qt5$secondaryArchSuffix = 15.0.0 compat >= 15 " REQUIRES=" haiku$secondaryArchSuffix @@ -48,43 +49,89 @@ REQUIRES=" PROVIDES_devel=" qscintilla${secondaryArchSuffix}_devel = $portVersion - devel:libqscintilla2_qt5$secondaryArchSuffix = $portVersion + devel:libqscintilla2_qt5$secondaryArchSuffix = 15.0.0 compat >= 15 " REQUIRES_devel=" haiku${secondaryArchSuffix}_devel qscintilla$secondaryArchSuffix == $portVersion base " +PROVIDES_python38=" + qscintilla${secondaryArchSuffix}_python38 = $portVersion + " +REQUIRES_python38=" + qscintilla$secondaryArchSuffix == $portVersion base + pyqt5_python38 + " + BUILD_REQUIRES=" haiku${secondaryArchSuffix}_devel devel:libQt5Core$secondaryArchSuffix devel:libQt5Gui$secondaryArchSuffix devel:libQt5PrintSupport$secondaryArchSuffix devel:libQt5Widgets$secondaryArchSuffix + pyqt5_python38 + pyqt_builder_python38 + sip_python38 " BUILD_PREREQUIRES=" cmd:g++$secondaryArchSuffix cmd:make + cmd:python3.8 + cmd:sed + cmd:sip " BUILD() { + export QMAKEFEATURES=$PWD/Qt4Qt5/features/ cd Qt4Qt5 qmake + make $jobArgs + + cd ../designer-Qt4Qt5 + qmake INCLUDEPATH+=../Qt4Qt5 QMAKE_LIBDIR+=../Qt4Qt5 + make $jobArgs + + cd .. + export LIBRARY_PATH=$LIBRARY_PATH:$PWD/Qt4Qt5/ + installLocation=$prefix/../pyqt5_python38/lib/python3.8/vendor-packages + BINDINGS_DIR=$installLocation/PyQt5/bindings/ + sed -i -e "s|BINDINGS_DIR|$BINDINGS_DIR|g" pyproject.toml + sip-build --no-make \ + --qsci-features-dir Qt4Qt5/features --qsci-include-dir Qt4Qt5 \ + --qsci-library-dir Qt4Qt5 \ + --api-dir $dataDir/Qt5/qsci/api/python \ + --verbose --tracing + cd build make $jobArgs } INSTALL() { cd Qt4Qt5 -# doesn't work -# make INSTALL_ROOT=$PREFIX install - mkdir -p $libDir $includeDir - cp libqscintilla2_qt5* $libDir - cp -r Qsci $includeDir + sed -i -e 's|INSTALL_ROOT)/boot/system/|INSTALL_ROOT)/|g' Makefile + make INSTALL_ROOT=$prefix install + + cd ../designer-Qt4Qt5 + sed -i -e 's|INSTALL_ROOT)/boot/system/|INSTALL_ROOT)/|g' Makefile + make INSTALL_ROOT=$prefix install + + cd ../build + sed -i -e 's|/packages/python.*/.self/non-packaged/lib/python3.8/site-packages|/lib/python3.8/vendor-packages|g' \ + Makefile Qsci/Makefile Qsci/Qsci.pro inventory.txt QScintilla.pro + + make INSTALL_ROOT=$prefix install + + cp -R $prefix/packages/*/.self/* $prefix/ + rm -rf $prefix/packages prepareInstalledDevelLibs \ libqscintilla2_qt5 packageEntries devel \ - $developDir + $developDir \ + $dataDir/Qt5/mkspecs + packageEntries python38 \ + $libDir/python* \ + $dataDir/Qt5/qsci }