[graphics/krita] /: Revert "Add a mechanism to fetch translations when building Krita"
Halla Rempt
null at kde.org
Thu Feb 25 10:14:26 GMT 2021
Git commit 10f90ba6afbd05860f6eb539d0bbd78a689886cb by Halla Rempt.
Committed on 25/02/2021 at 10:13.
Pushed by rempt into branch 'master'.
Revert "Add a mechanism to fetch translations when building Krita"
This reverts commit aeb7c53b1a63cf2f86b8b06cd654942804a6e871.
This broke on the binary factory, and I'm not quite sure how to
repair it...
CCMAIL:kimageshop at kde.org
M +5 -18 CMakeLists.txt
D +0 -53 build-tools/fetch_translations.py
M +0 -1 build-tools/windows/build.cmd
M +0 -1 packaging/linux/appimage/build-krita.sh
M +0 -1 packaging/macos/osxbuild.sh
https://invent.kde.org/graphics/krita/commit/10f90ba6afbd05860f6eb539d0bbd78a689886cb
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8023c3880c..57eb727d86 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -201,8 +201,6 @@ option(ENABLE_UPDATERS "Enable updaters/update notifications" ON)
configure_file(config-updaters.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-updaters.h)
add_feature_info("Enable updaters" ENABLE_UPDATERS "Enable updaters/update notifications.")
-option(FETCH_TRANSLATIONS "Fetch all translations." OFF)
-
# Branding. Available options: default, Beta, Plus, Next. Can be set from command line
if (NOT DEFINED BRANDING)
set(BRANDING "default")
@@ -951,7 +949,7 @@ configure_file(config-ocio.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-ocio.h )
check_function_exists(powf HAVE_POWF)
configure_file(config-powf.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-powf.h)
-if (WIN32)
+if(WIN32)
include(${CMAKE_CURRENT_LIST_DIR}/packaging/windows/installer/ConfigureInstallerNsis.cmake)
endif()
@@ -962,22 +960,11 @@ endforeach()
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
-# Simple command calling the python script
-add_custom_target( get_translations
- COMMAND python3 ${CMAKE_SOURCE_DIR}/build-tools/fetch_translations.py
- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
-)
-
-if (FETCH_TRANSLATIONS AND NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/po)
- add_dependencies(krita get_translations)
-endif()
-
-if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/po)
- find_package(KF5I18n CONFIG REQUIRED)
- ki18n_install(po)
+if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/po OR EXISTS ${CMAKE_CURRENT_BINARY_DIR}/po )
+ find_package(KF5I18n CONFIG REQUIRED)
+ ki18n_install(po)
endif()
-
if (ANDROID)
# ECM passes this to Qt, which was already capable of detecting it..
set (ANDROID_SDK_COMPILE_API "29")
@@ -998,7 +985,7 @@ if (ANDROID)
endif()
endif()
-if (DEFINED QTANDROID_EXPORTED_TARGET AND NOT TARGET "create-apk")
+if(DEFINED QTANDROID_EXPORTED_TARGET AND NOT TARGET "create-apk")
set (_CMAKE_ANDROID_DIR "${ECM_DIR}/../toolchain")
list(LENGTH QTANDROID_EXPORTED_TARGET targetsCount)
include(${_CMAKE_ANDROID_DIR}/ECMAndroidDeployQt.cmake)
diff --git a/build-tools/fetch_translations.py b/build-tools/fetch_translations.py
deleted file mode 100644
index f8203c6633..0000000000
--- a/build-tools/fetch_translations.py
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/usr/bin/python3
-
-
-
-stable_url = "svn://anonsvn.kde.org/home/kde/branches/stable/l10n-kf5/"
-unstable_url = "svn://anonsvn.kde.org/home/kde/trunk/l10n-kf5/"
-krita_location = "messages/krita"
-
-# switch these between the stable and unstable krita branch
-url = unstable_url
-#url = stable_url
-
-print (url);
-
-# construct the url and get the subdirs file
-svn_command = url + "subdirs"
-
-import os
-os.makedirs("po", 0o777, True)
-os.chdir("po")
-
-import subprocess
-subdirs = subprocess.run(["svn", "cat", svn_command], stdout=subprocess.PIPE)
-for subdir in subdirs.stdout.decode('utf-8').split('\n'):
- po_url = url + '/' + subdir + '/' + krita_location + "/krita.po"
-
- res = subprocess.run(["svn", "cat", po_url], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
-
- po_contents = res.stdout.decode('utf-8')
- if (len(po_contents) == 0):
- print ("empty pofile for", subdir, " -- continuing.")
- continue
-
- import os
- import shutil
- try:
- shutil.rmtree(subdir)
- except:
- pass
-
- try:
- os.mkdir(subdir)
- except:
- pass
-
- pofile = subdir + "/krita.po"
-
- print("writing", len(po_contents), "bytes to", pofile)
-
- f = open(pofile, 'w')
- f.write(po_contents)
- f.close()
-
diff --git a/build-tools/windows/build.cmd b/build-tools/windows/build.cmd
index f050d671be..d4dcec83e5 100644
--- a/build-tools/windows/build.cmd
+++ b/build-tools/windows/build.cmd
@@ -787,7 +787,6 @@ set CMDLINE_CMAKE_KRITA="%CMAKE_EXE%" "%KRITA_SRC_DIR%\." ^
-DFOUNDATION_BUILD=ON ^
-DUSE_QT_TABLET_WINDOWS=ON ^
-DHIDE_SAFE_ASSERTS=ON ^
- -DFETCH_TRANSLATIONS=ON^
-Wno-dev ^
-G "MinGW Makefiles" ^
-DCMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE%
diff --git a/packaging/linux/appimage/build-krita.sh b/packaging/linux/appimage/build-krita.sh
index 6ec18db746..aa327a3089 100755
--- a/packaging/linux/appimage/build-krita.sh
+++ b/packaging/linux/appimage/build-krita.sh
@@ -78,7 +78,6 @@ cmake $KRITA_SOURCES \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-DFOUNDATION_BUILD=1 \
-DHIDE_SAFE_ASSERTS=ON \
- -DFETCH_TRANSLATIONS=ON \
-DBUILD_TESTING=FALSE \
-DPYQT_SIP_DIR_OVERRIDE=$DEPS_INSTALL_PREFIX/share/sip/ \
-DHAVE_MEMORY_LEAK_TRACKER=FALSE \
diff --git a/packaging/macos/osxbuild.sh b/packaging/macos/osxbuild.sh
index a12d75dc0f..3648c4a1e8 100755
--- a/packaging/macos/osxbuild.sh
+++ b/packaging/macos/osxbuild.sh
@@ -428,7 +428,6 @@ build_krita () {
-DDEFINE_NO_DEPRECATED=1 \
-DBUILD_TESTING=${OSXBUILD_TESTING} \
-DHIDE_SAFE_ASSERTS=ON \
- -DFETCH_TRANSLATIONS=ON \
-DKDE_INSTALL_BUNDLEDIR=${KIS_INSTALL_DIR}/bin \
-DPYQT_SIP_DIR_OVERRIDE=${KIS_INSTALL_DIR}/share/sip/ \
-DCMAKE_BUILD_TYPE=${OSXBUILD_TYPE} \
More information about the kimageshop
mailing list