From: Olaf Wintermann Date: Thu, 5 Dec 2024 09:27:05 +0000 (+0100) Subject: disable unsupported toolkits X-Git-Url: https://uap-core.de/gitweb/?a=commitdiff_plain;h=20266e8c7587b0877da30684bc221ee5f186b508;p=note.git disable unsupported toolkits --- diff --git a/configure b/configure index 4fe9469..944a952 100755 --- a/configure +++ b/configure @@ -72,7 +72,7 @@ Installation directories: Options: --debug add extra compile flags for debug builds --release add extra compile flags for release builds - --toolkit=(libadwaita|gtk4|gtk3|gtk2|gtk2legacy|qt5|qt4|motif) + --toolkit=(libadwaita|gtk4|gtk3|cocoa) __EOF__ } @@ -822,77 +822,17 @@ GTKOBJ = draw_cairo.o __EOF__ return 0 } -checkopt_toolkit_gtk2() +checkopt_toolkit_cocoa() { VERR=0 - if dependency_error_gtk2 ; then + if dependency_error_cocoa ; then VERR=1 fi if [ $VERR -ne 0 ]; then return 1 fi cat >> "$TEMP_DIR/make.mk" << __EOF__ -TOOLKIT = gtk -GTKOBJ = draw_cairo.o -__EOF__ - return 0 -} -checkopt_toolkit_gtk2legacy() -{ - VERR=0 - if dependency_error_gtk2legacy ; then - VERR=1 - fi - if [ $VERR -ne 0 ]; then - return 1 - fi - cat >> "$TEMP_DIR/make.mk" << __EOF__ -TOOLKIT = gtk -GTKOBJ = draw_gdk.o -__EOF__ - return 0 -} -checkopt_toolkit_qt5() -{ - VERR=0 - if dependency_error_qt5 ; then - VERR=1 - fi - if [ $VERR -ne 0 ]; then - return 1 - fi - cat >> "$TEMP_DIR/make.mk" << __EOF__ -TOOLKIT = qt -LD = $(CXX) -__EOF__ - return 0 -} -checkopt_toolkit_qt4() -{ - VERR=0 - if dependency_error_qt4 ; then - VERR=1 - fi - if [ $VERR -ne 0 ]; then - return 1 - fi - cat >> "$TEMP_DIR/make.mk" << __EOF__ -TOOLKIT = qt -LD = $(CXX) -__EOF__ - return 0 -} -checkopt_toolkit_motif() -{ - VERR=0 - if dependency_error_motif ; then - VERR=1 - fi - if [ $VERR -ne 0 ]; then - return 1 - fi - cat >> "$TEMP_DIR/make.mk" << __EOF__ -TOOLKIT = motif +TOOLKIT = cocoa __EOF__ return 0 } @@ -982,6 +922,11 @@ if [ -z "$OPT_TOOLKIT" ]; then break fi fi + if checkopt_toolkit_libadwaita ; then + echo " toolkit: libadwaita" >> "$TEMP_DIR/options" + ERROR=0 + break + fi if checkopt_toolkit_gtk4 ; then echo " toolkit: gtk4" >> "$TEMP_DIR/options" ERROR=0 @@ -992,26 +937,6 @@ if [ -z "$OPT_TOOLKIT" ]; then ERROR=0 break fi - if checkopt_toolkit_qt5 ; then - echo " toolkit: qt5" >> "$TEMP_DIR/options" - ERROR=0 - break - fi - if checkopt_toolkit_gtk2 ; then - echo " toolkit: gtk2" >> "$TEMP_DIR/options" - ERROR=0 - break - fi - if checkopt_toolkit_qt4 ; then - echo " toolkit: qt4" >> "$TEMP_DIR/options" - ERROR=0 - break - fi - if checkopt_toolkit_motif ; then - echo " toolkit: motif" >> "$TEMP_DIR/options" - ERROR=0 - break - fi break done if [ $ERROR -ne 0 ]; then @@ -1048,41 +973,9 @@ else ERROR=1 DEPENDENCIES_FAILED="option 'toolkit' $DEPENDENCIES_FAILED" fi - elif [ "$OPT_TOOLKIT" = "gtk2" ]; then - echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options - if checkopt_toolkit_gtk2 ; then - : - else - ERROR=1 - DEPENDENCIES_FAILED="option 'toolkit' $DEPENDENCIES_FAILED" - fi - elif [ "$OPT_TOOLKIT" = "gtk2legacy" ]; then - echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options - if checkopt_toolkit_gtk2legacy ; then - : - else - ERROR=1 - DEPENDENCIES_FAILED="option 'toolkit' $DEPENDENCIES_FAILED" - fi - elif [ "$OPT_TOOLKIT" = "qt5" ]; then - echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options - if checkopt_toolkit_qt5 ; then - : - else - ERROR=1 - DEPENDENCIES_FAILED="option 'toolkit' $DEPENDENCIES_FAILED" - fi - elif [ "$OPT_TOOLKIT" = "qt4" ]; then + elif [ "$OPT_TOOLKIT" = "cocoa" ]; then echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options - if checkopt_toolkit_qt4 ; then - : - else - ERROR=1 - DEPENDENCIES_FAILED="option 'toolkit' $DEPENDENCIES_FAILED" - fi - elif [ "$OPT_TOOLKIT" = "motif" ]; then - echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options - if checkopt_toolkit_motif ; then + if checkopt_toolkit_cocoa ; then : else ERROR=1 diff --git a/make/project.xml b/make/project.xml index ff244ec..7535cb1 100644 --- a/make/project.xml +++ b/make/project.xml @@ -142,6 +142,11 @@ TOOLKIT = gtk GTKOBJ = draw_cairo.o + + cocoa + TOOLKIT = cocoa + + + +