diff options
author | Universebenzene | 2023-07-07 23:49:21 +0800 |
---|---|---|
committer | Universebenzene | 2023-07-07 23:49:21 +0800 |
commit | cbd8cd2b68e7d519a9031b4d532ec34ef8cee417 (patch) | |
tree | 764993752e6d2a82e102e1ae71765357f1b7fb9b | |
parent | de733dafb7c270150507eae08184fdd0bfa33eb2 (diff) | |
download | aur-cbd8cd2b68e7d519a9031b4d532ec34ef8cee417.tar.gz |
Correct gitignore
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | gdl-1.0.1-fix-python-wxGetApp.patch | 62 |
2 files changed, 63 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore index e973b6c95374..6659f11dfb07 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ -* !.gitignore !gdl.profile !gdl-python3.patch @@ -7,3 +6,4 @@ !gdl-tiff.patch !PKGBUILD !.SRCINFO +*tar* diff --git a/gdl-1.0.1-fix-python-wxGetApp.patch b/gdl-1.0.1-fix-python-wxGetApp.patch new file mode 100644 index 000000000000..0dc1f3c8791a --- /dev/null +++ b/gdl-1.0.1-fix-python-wxGetApp.patch @@ -0,0 +1,62 @@ +From 2a6d346d496cf5d8a3bed2737c8028438e2df99a Mon Sep 17 00:00:00 2001 +From: GillesDuvert <gilles.duvert@free.fr> +Date: Tue, 21 Feb 2023 00:35:50 +0100 +Subject: [PATCH] displace equivalent of wxIMPLEMENT_APP_NO_MAIN in + gdlwidget.cpp to enable Python module to use GDL.so + +--- + src/gdl.cpp | 11 ++++++----- + src/gdlwidget.cpp | 18 ++++++++++++++++++ + 2 files changed, 24 insertions(+), 5 deletions(-) + +diff --git a/src/gdl.cpp b/src/gdl.cpp +index 445145331..4b01f9d24 100644 +--- a/src/gdl.cpp ++++ b/src/gdl.cpp +@@ -66,11 +66,12 @@ + //initialize wxWidgets system: create an instance of wxAppGDL + #ifdef HAVE_LIBWXWIDGETS + #include "gdlwidget.hpp" +-#ifndef __WXMAC__ +-wxIMPLEMENT_APP_NO_MAIN( wxAppGDL); +-#else +-wxIMPLEMENT_APP_NO_MAIN( wxApp); +-#endif ++//displaced in gdlwidget.cpp to make wxGetApp() available under Python (in GDL.so) ++//#ifndef __WXMAC__ ++//wxIMPLEMENT_APP_NO_MAIN( wxAppGDL); ++//#else ++//wxIMPLEMENT_APP_NO_MAIN( wxApp); ++//#endif + #endif + + using namespace std; +diff --git a/src/gdlwidget.cpp b/src/gdlwidget.cpp +index 48abbf23a..b589d4868 100644 +--- a/src/gdlwidget.cpp ++++ b/src/gdlwidget.cpp +@@ -196,6 +196,24 @@ bool GDLWidget::handlersOk=false; + wxFont GDLWidget::defaultFont=wxNullFont; //the font defined by widget_control,default_font. + wxFont GDLWidget::systemFont=wxNullFont; //the initial system font. This to behave as IDL + ++ //initialize wxWidgets system: create an instance of wxAppGDL here, not at Main ( ++#ifndef __WXMAC__ ++ wxAppGDL& wxGetApp() { return *static_cast<wxAppGDL*>(wxApp::GetInstance()); } ++ wxAppConsole *wxCreateApp() ++ { ++ wxAppConsole::CheckBuildOptions(WX_BUILD_OPTIONS_SIGNATURE,"GDL"); ++ return new wxAppGDL; ++ } ++ wxAppInitializer wxTheAppInitializer((wxAppInitializerFunction) wxCreateApp); ++#else ++ wxApp& wxGetApp() { return *static_cast<wxApp*>(wxApp::GetInstance()); } ++ wxAppConsole *wxCreateApp() ++ { ++ wxAppConsole::CheckBuildOptions(WX_BUILD_OPTIONS_SIGNATURE,"GDL"); ++ return new wxApp; ++ } ++ wxAppInitializer wxTheAppInitializer((wxAppInitializerFunction) wxCreateApp); ++#endif + + void GDLEventQueue::Purge() + { |