@ -23,9 +23,9 @@
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
PKGNAM=tdegwenview-i18n
PRGNAM=gwenview-i18n
[[ $I18N == "" ]] && echo -e "\nYou have tried to build $PRGNAM without selecting any language(s)\n" && exit
PKGNAM=tde$PRGNAM
[[ $I18N == "" ]] && echo -e "\033[39;1m\nYou have tried to build $PRGNAM without selecting any language(s)\n\033[0m" && exit
VERSION=${VERSION:-$TDEVERSION}
BUILD=${BUILD:-1}
TAG=${TAG:-_tde}
@ -38,42 +38,45 @@ untar_fn
# Add missing files for Spanish TDE handbook docs
if [[ $I18N == *es* ]]
then
sed -i 's|SUBDIRS= messages|SUBDIRS= messages doc|' es/Makefile.am
echo "KDE_LANG = es
KDE_DOCS=gwenview
" > es/doc/Makefile.am
## restore es/doc/CMakeLists.txt as the following creates a handbook index
sed -i 's|# ||' es/doc/CMakeLists.txt
# use the German index.docbook as a template
cp de/doc/index.docbook es/doc/index.docbook
cp de/doc/index.docbook es/doc/
# these index.docbook 'translations' have been made from the gwenview [US] English original,
# the other 'es' *.docbook files are the original translations in the source code
# any corrections from a Spanish speaker will be welcome
sed -i -e 's|German|Spanish|' -e 's|Das Handbuch zu Gwenview|Manual del usuario Gwenview|' -e 's|Deutsche Übersetzung|Traducción Española|' -e 's|ist ein Bildbetrachter für &kde;|es un visor de imágenes para TDE|' -e '85s|Bild|imagen|' -e '87s|Betrachter|visionador|' -e 's|Künstler|artista|' -e 's|Photo|foto|' -e '93s|Bild|dibujo|' -e 's|Tipps|Consejos|' -e 's|Thomas||' -e 's|Reitelbach||' -e 's|tr@erdfunkstelle.de||' es/doc/index.docbook
fi
## remove help documentation build instruction from all locales ...
sed -i '/BUILD_DOC/d' */CMakeLists.txt
listdocs_fn
# set support for additional language(s) as per I18N variable
# but only for languages available with this package
langs="";for Lang in $I18N;do [[ -d $Lang ]] && langs="$langs $Lang";done
sed -i "s|SUBDIRS=.*$|SUBDIRS=$langs|" Makefile.am
ltoolupdate_fn
langs=""
for Lang in $I18N
do
[[ -d $Lang ]] && {
langs="$langs $Lang/messages/gwenview.po"
## ... and restore help documentation for the selected and available locales
[[ -e $Lang/CMakeLists.txt ]] && echo 'tde_conditional_add_subdirectory( BUILD_DOC doc )' > $Lang/CMakeLists.txt
}
done
sed -i "s|\${po_files}|$langs|" CMakeLists.txt && \
langs=$(echo $langs|sed "s|/messages/gwenview.po||g")
chown_fn
cd_builddir_fn
LDFLAGS="${SLKLDFLAGS}" \
CFLAGS="${SLKCFLAGS} $TQT_INCLUDE_PATH" \
CXXFLAGS="${SLKCFLAGS}" \
CC=${COMPILER} \
CXX=${COMPILER_CXX} \
../configure \
--prefix=${INSTALL_TDE} \
--sysconfdir=$SYS_CNF_DIR \
--mandir=${INSTALL_TDE}/man \
--disable-rpath \
--enable-closure
cmake \
-DCMAKE_C_FLAGS:STRING=$SLKCFLAGS \
-DCMAKE_CXX_FLAGS:STRING=$SLKCFLAGS \
-DCMAKE_C_COMPILER=$COMPILER \
-DCMAKE_CXX_COMPILER=$COMPILER_CXX \
-DCMAKE_INSTALL_PREFIX=$INSTALL_TDE \
..
make_fn
@ -91,18 +94,18 @@ echo "
# exactly 11 lines for the formatting to be correct. It's also customary to
# leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
tdegwenview-i18n: tdegwenview-i18n (Internationalization files for gwenview.)
tdegwenview-i18n :
tdegwenview-i18n : For languages:
tdegwenview-i18n :
tdegwenview-i18n: $(echo $langs)
tdegwenview-i18n :
tdegwenview-i18n :
tdegwenview-i18n :
tdegwenview-i18n :
tdegwenview-i18n :
tdegwenview-i18n :
|-----handy-ruler------------------------------------------------------|
$PKGNAM: $PKGNAM (Internationalization files for gwenview.)
$PKGNAM :
$PKGNAM : For languages:
$PKGNAM :
$PKGNAM: $langs
$PKGNAM :
$PKGNAM :
$PKGNAM :
$PKGNAM :
$PKGNAM :
$PKGNAM :
" > $PKG/install/slack-desc