File indexing completed on 2024-04-28 05:41:44

0001 #!/bin/sh
0002 # SPDX-FileCopyrightText: 2023 Laurent Montel <montel@kde.org>
0003 # SPDX-License-Identifier: CC0-1.0
0004 #
0005 list='ConfigCore
0006     KIOCore
0007     XmlGui
0008     I18n
0009     ConfigWidgets
0010     Codecs
0011     Purpose
0012     PurposeWidgets
0013     NewStuffWidgets
0014     NewStuff
0015     ItemViews
0016     KIOWidgets
0017     Crash
0018     TextEditor
0019     DocTools
0020     DBusAddons
0021     Archive
0022     SyntaxHighlighting
0023     IconThemes
0024     KIO
0025     WidgetsAddons
0026     TextWidgets
0027     Completion
0028     IconThemes
0029     Contacts
0030     CalendarCore
0031     ItemModels
0032     Service
0033     Holidays
0034     GuiAddons
0035     CoreAddons
0036     GlobalAccel
0037     DNSSD
0038     KCMUtils
0039     Notifications
0040     NotifyConfig
0041     Parts
0042     WindowSystem
0043     Config
0044     JobWidgets
0045     Prison
0046     ConfigGui
0047     KIOFileWidgets
0048     SonnetUi
0049     Sonnet
0050     SonnetCore
0051     Bookmarks
0052     Syndication
0053     KIOGui
0054     ItemModels
0055     Wallet
0056     IdleTime
0057     ActivitiesStats
0058     Solid
0059     FileMetaData
0060     Baloo
0061     Plotting
0062     UnitConversion
0063     Kirigami2
0064     Package
0065     AuthCore
0066     QuickAddons
0067     Plasma
0068     Wayland';
0069 for i in $list ;
0070 do
0071      echo " **** $i******";
0072      git grep -l "KF5::$i" | xargs perl -pi -e "s;\bKF5::$i\b;KF\\$\{KF_MAJOR_VERSION\}::$i;g"
0073      git grep -l "KF5$i"  | egrep -v Config.cmake.in | xargs perl -pi -e "s;\bKF5$i\b;KF\\$\{KF_MAJOR_VERSION\}$i;g"
0074      find -iname  *Config.cmake.in | xargs perl -pi -e "s;\bKF5$i\b;KF\\@KF_MAJOR_VERSION\\@$i;g"
0075      git grep -l "KF5$i_FOUND" | xargs perl -pi -e "s,KF5$i_FOUND,KF\\$\{KF_MAJOR_VERSION\}$i_FOUND,"
0076 done
0077 git grep -l "find_package(KF5 " | xargs perl -pi -e "s,find_package\\(KF5 ,find_package\\(KF\\$\{KF_MAJOR_VERSION\} ,"
0078 git grep -l "Qt5.*_QCH" | xargs perl -pi -e 's,Qt5Gui_QCH,Qt\${QT_MAJOR_VERSION}Gui_QCH,'
0079 git grep -l "Qt5.*_QCH" | xargs perl -pi -e 's,Qt5Core_QCH,Qt\${QT_MAJOR_VERSION}Core_QCH,'
0080 git grep -l "Qt5.*_QCH" | xargs perl -pi -e 's,Qt5Widgets_QCH,Qt\${QT_MAJOR_VERSION}Widgets_QCH,'
0081 
0082 perl -pi -e 's,include\(ECMDeprecationSettings\),include\(ECMDeprecationSettings\)\nif (QT_MAJOR_VERSION STREQUAL "6")\n    set(QT_REQUIRED_VERSION "6.4.0")\n    set(KF_MIN_VERSION "5.240.0")\n    set(KF_MAJOR_VERSION "6")\nelse()\n    set(KF_MAJOR_VERSION "5")\nendif(),' CMakeLists.txt
0083 perl -pi -e "s;Dependencies:;Dependencies:\n\- \'on\': \[\'Linux/Qt6\', \'FreeBSD/Qt6\', \'Windows/Qt6\', \'Android/Qt6\'\]\n  'require':\n add \\@latest\-kf6\n;" .kde-ci.yml
0084 perl -pi -e "s;\- \'on\': \[\'\@all\'\];\- \'on\': \[\'Linux/Qt5\', \'FreeBSD/Qt5\', \'Windows/Qt5\', \'Android/Qt5\'\];" .kde-ci.yml
0085 
0086 # Allow to build against not deprecated Qt 6.4 method
0087 perl -pi -e 's,QT 5.15.2,QT 6.4,' CMakeLists.txt
0088 
0089 # Warn about we need to adapt .kde-ci.yml file. 
0090 echo "Adapt $PWD/.kde-ci.yml"
0091 #git di
0092