File indexing completed on 2024-05-26 04:59:21
0001 #!/bin/sh 0002 0003 set -e 0004 0005 i18npath="$(readlink -f "$(dirname "$0")")" 0006 gitpath="$(readlink -f "$i18npath/../..")" 0007 0008 [ -d "$gitpath/po" ] || [ -d "$gitpath/poqm" ] && ( 0009 echo -e "ERROR: po/poqm directories already exist\n\nrm -rf \"$gitpath\"/po{,qm}" 0010 exit 1 0011 ) 0012 0013 releaseme_path="$i18npath/releaseme" 0014 fetchpo="$releaseme_path/fetchpo.rb" 0015 0016 [ ! -d "$releaseme_path" ] && git clone git@invent.kde.org:sdk/releaseme.git "$releaseme_path" 0017 0018 $fetchpo --origin trunk --project multimedia/subtitlecomposer --output-dir po --output-poqm-dir poqm . 0019 0020 patch -N -p1 -F5 -d "$gitpath" -r /dev/null --no-backup-if-mismatch <<"EOF" || true 0021 diff --git a/CMakeLists.txt b/CMakeLists.txt 0022 index 062c069..b6ce7e6 100644 0023 --- a/CMakeLists.txt 0024 +++ b/CMakeLists.txt 0025 @@ -28,7 +28,10 @@ find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS 0026 Auth Config ConfigWidgets CoreAddons I18n KIO XmlGui 0027 Sonnet Codecs TextWidgets WidgetsAddons) 0028 0029 -#PO_SUBDIR 0030 + 0031 +find_package(KF5I18n CONFIG REQUIRED) 0032 +ki18n_install(po) 0033 + 0034 add_subdirectory(src) 0035 0036 add_custom_target(nsis COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/pkg/mingw/nsi-installer.sh" `${CMAKE_C_COMPILER} -dumpmachine`) 0037 EOF 0038 0039 git="git -C $gitpath" 0040 files=(po CMakeLists.txt) 0041 if [ "$($git describe --all --match=obs/\* HEAD)" = "heads/obs/latest" ]; then 0042 gitver="$($git describe --always --tags --abbrev=10 kde/master)" 0043 echo "Updating version to $gitver" 0044 sed -E "s|SUBTITLECOMPOSER_VERSION_STRING|\"${gitver#v}\"|" -i $gitpath/src/main.cpp 0045 files+=(src/main.cpp) 0046 $git add "${files[@]}" 0047 $git commit -m "Added i18n - $gitver" 0048 else 0049 gitver="$($git describe --always --tags --abbrev=10 kde/master)" 0050 $git add "${files[@]}" 0051 sed -E "s|SUBTITLECOMPOSER_VERSION_STRING|\"${gitver#v}\"|" -i $gitpath/src/main.cpp 0052 echo -e "\n$git commit -c 'Added i18n - $gitver'" 0053 fi