Commit c738c293 authored by Sharaf Zaman's avatar Sharaf Zaman

Patches removed by including the API flag in `build_kf5.sh`

parent 4db60b31
......@@ -15,12 +15,8 @@ export ANDROID_NATIVE_API_LEVEL=android-$ANDROID_API_LEVEL
cd $KRITA_ROOT
# Get the directory where the script is stored
SRCDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
CURDIR="$(pwd)"/
mkdir kf5
cd kf5
git clone git://anongit.kde.org/scratch/cordlandwehr/kdesrc-conf-android.git
......@@ -41,48 +37,20 @@ sed -i -- 's/make-options -j8/make-options -j4 VERBOSE=1/g' kdesrc-conf-android/
if [ -e $qt_android_libs ]
then
sed -E -i "s|-DCMAKE_PREFIX_PATH=.*?\\ |-DCMAKE_PREFIX_PATH=$QT_ANDROID- -DCMAKE_ANDROID_NDK=$CMAKE_ANDROID_NDK -DECM_ADDITIONAL_FIND_ROOT_PATH=$QT_ANDROID\;$CURDIR/kf5/kde/install -DANDROID_STL=c++_static -DCMAKE_TOOLCHAIN_FILE=$CURDIR/kf5/kde/install/share/ECM/toolchain/Android.cmake -DKCONFIG_USE_DBUS=OFF |g" kdesrc-conf-android/kdesrc-buildrc
sed -E -i "s|-DCMAKE_PREFIX_PATH=.*?\\ |-DCMAKE_PREFIX_PATH=$QT_ANDROID- -DCMAKE_ANDROID_NDK=$CMAKE_ANDROID_NDK -DECM_ADDITIONAL_FIND_ROOT_PATH=$QT_ANDROID\;$CURDIR/kf5/kde/install -DANDROID_STL=c++_static -DCMAKE_TOOLCHAIN_FILE=$CURDIR/kf5/kde/install/share/ECM/toolchain/Android.cmake -DKCONFIG_USE_DBUS=OFF -DANDROID_PLATFORM=$ANDROID_NATIVE_API_LEVEL |g" kdesrc-conf-android/kdesrc-buildrc
sed -i -- "s/cxxflags.*/& -D__ANDROID_API__=$ANDROID_API_LEVEL/" kdesrc-conf-android/kdesrc-buildrc
else
echo "Qt Android libraries path doesn't exist. Exiting."
exit
fi
sed -E -i "s|use-modules.+|use-modules kconfig ki18n |g" kdesrc-conf-android/kdesrc-buildrc
rm -rf ${kf5_android_path}/kde/build/${android_architecture}/* # clean build folders
# Needs to be patched, ignore the errors
./kdesrc-build libintl-lite ki18n kcoreaddons kcompletion kitemmodels
# patches
sed -i -- 's/check_cxx_source_compiles/#check_cxx_source_compiles/g' kde/src/frameworks/ki18n/cmake/FindLibIntl.cmake
sed -i -- 's/target_link_libraries(ktranscript PRIVATE Qt5::Qml Qt5::Core)/target_link_libraries(ktranscript PRIVATE Qt5::Qml Qt5::Core -l:libc.a -Wl,--exclude-libs=ALL)/g' $CURDIR/kf5/kde/src/frameworks/ki18n/src/CMakeLists.txt
sed -i 's/static \(.*getpwent()\)/\1/' $CURDIR/kf5/kde/src/frameworks/kcoreaddons/src/lib/util/kuser_unix.cpp
sed -i 's/static \(.*setgrent()\)/\1/' $CURDIR/kf5/kde/src/frameworks/kcoreaddons/src/lib/util/kuser_unix.cpp
sed -i 's/static \(.*getgrent()\)/\1/' $CURDIR/kf5/kde/src/frameworks/kcoreaddons/src/lib/util/kuser_unix.cpp
sed -i 's/static \(.*endgrent()\)/\1/' $CURDIR/kf5/kde/src/frameworks/kcoreaddons/src/lib/util/kuser_unix.cpp
sed -i 's/KF5::WidgetsAddons/& -l:libc.a -Wl,--exclude-libs=ALL/' $CURDIR/kf5/kde/src/frameworks/kcompletion/src/CMakeLists.txt
sed -i '/add_subdirectory(tests)/s/^/#/' $CURDIR/kf5/kde/src/frameworks/kitemmodels/CMakeLists.txt
sed -i '/add_subdirectory(autotests)/s/^/#/' $CURDIR/kf5/kde/src/frameworks/kitemmodels/CMakeLists.txt
./kdesrc-build kcoreaddons \
frameworks-android \
kwidgetsaddons kcompletion \
kguiaddons ki18n \
kitemmodels kitemviews \
kwindowsystem
# Fix some config files
sed -i '/find_package(PythonInterp/ s/^/#/' kde/install/lib/cmake/KF5I18n/KF5I18nMacros.cmake
cp /usr/lib/x86_64-linux-gnu/libexec/kf5/kconfig_compiler_kf5 $CURDIR/kf5/kde/install/lib/libexec/kf5/kconfig_compiler_kf5
cd $CURDIR
rm -rf kde/build/* # clean build folders
./kdesrc-build libintl-lite \
ki18n kcoreaddons \
frameworks-android \
kwidgetsaddons kcompletion \
kguiaddons kitemmodels \
kitemviews kwindowsystem
......@@ -21,15 +21,15 @@ PYTHON_INCLUDE_PATH=$PY_INCLUDE_PATH
PYTHON_LIBRARY=$PY_LIBRARY
# Configure files using cmake
cmake .. -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX \
cmake $KRITA_ROOT -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX \
-DDEFINE_NO_DEPRECATED=1 \
-DBUILD_TESTING=OFF \
-DKDE4_BUILD_TESTS=OFF \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_TOOLCHAIN_FILE=$CMAKE_ANDROID_NDK/build/cmake/android.toolchain.cmake \
-DBUILD_TESTING=OFF \
-DKDE4_BUILD_TESTS=OFF \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_TOOLCHAIN_FILE=$CMAKE_ANDROID_NDK/build/cmake/android.toolchain.cmake \
-DANDROID_PLATFORM=$ANDROID_NATIVE_API_LEVEL \
-DPYTHON_INCLUDE_DIR=$PYTHON_INCLUDE_PATH \
-DPYTHON_LIBRARY=$PYTHON_LIBRARY \
-DPYTHON_INCLUDE_DIR=$PYTHON_INCLUDE_PATH \
-DPYTHON_LIBRARY=$PYTHON_LIBRARY \
-DCMAKE_PREFIX_PATH=$QT_ANDROID \
-DEIGEN3_INCLUDE_DIR=/usr/include/eigen3 \
-DBUILD_TESTING=OFF -DKDE4_BUILD_TESTS=OFF \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment