Refined porting scripts

This commit is contained in:
Sebastian Kügler 2013-08-09 04:07:59 +02:00
parent 9c345e5be5
commit 801d4ae818
3 changed files with 39 additions and 3 deletions

21
tools/port-cmake.sh Executable file
View File

@ -0,0 +1,21 @@
#!/bin/sh
# ${KDE4_KIDLETIME_LIBRARY}
# ${KIdleTime_LIBRARIES}
# ${KCore_LIBRARIES}
# ${Solid_LIBRARIES}
# ${Plasma_LIBRARIES}
# ./geolocation/CMakeLists.txt:29: ${KDE4_PLASMA_LIBS}
# ./geolocation/CMakeLists.txt:30: ${KDE4_KDECORE_LIBS}
# ./geolocation/CMakeLists.txt:31: ${KDE4_KIO_LIBS}
# ./geolocation/CMakeLists.txt:32: ${KDE4_SOLID_LIBS})
for FS in `find $PWD -type f -name 'CMakeLists.txt'`; do
perl -p -i -e 's/kde4_add_plugin/plasma_add_plugin/g' $FS
perl -p -i -e 's/KDE4_KIDLETIME_LIBRARY/KIdleTime_LIBRARIES/g' $FS
perl -p -i -e 's/KDE4_PLASMA_LIBS/Plasma_LIBRARIES/g' $FS
perl -p -i -e 's/KDE4_KDECORE_LIBS/KCore_LIBRARIES/g' $FS
perl -p -i -e 's/KDE4_SOLID_LIBS/Solid_LIBRARIES/g' $FS
done

10
tools/port-kdebug.sh Normal file → Executable file
View File

@ -2,9 +2,13 @@
# kDebug() becomes qDebug() in cpp files
for FS in `find $PWD -type f -name '*.cpp'`; do
for FS in `find $PWD -name '*.h' -o -name '*.cpp'`; do
perl -p -i -e 's/\#include \<KDebug\>/\#include \<QDebug\>/g' $FS
perl -p -i -e 's/\#include \<kdebug\.h\>/\#include \<QDebug\>/g' $FS
perl -p -i -e 's/kDebug\(\)/qDebug()/g' $FS
perl -p -i -e 's/kDebug\(250\)/\/\/qDebug()/g' $FS
perl -p -i -e 's/kDebug\(96669\)/\/\/qDebug()/g' $FS
perl -p -i -e 's/kDebug\(kdbg_code\)/\/\/qDebug()/g' $FS
done
#exit;

11
tools/port-qslots.sh Executable file
View File

@ -0,0 +1,11 @@
#!/bin/sh
# slots -> Q_SLOTS, signals -> Q_SIGNALS
for FS in `find $PWD -type f -name '*.h'`; do
perl -p -i -e 's/ slots\:/ Q_SLOTS\:/g' $FS
perl -p -i -e 's/signals\:/Q_SIGNALS\:/g' $FS
done
#exit;