@ -23,9 +23,9 @@
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
# SUCH DAMAGE.
PKGNAM=tdegwenview-i18n
PRGNAM=gwenview-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}
VERSION=${VERSION:-$TDEVERSION}
BUILD=${BUILD:-1}
BUILD=${BUILD:-1}
TAG=${TAG:-_tde}
TAG=${TAG:-_tde}
@ -38,42 +38,45 @@ untar_fn
# Add missing files for Spanish TDE handbook docs
# Add missing files for Spanish TDE handbook docs
if [[ $I18N == *es* ]]
if [[ $I18N == *es* ]]
then
then
sed -i 's|SUBDIRS= messages|SUBDIRS= messages doc|' es/Makefile.am
## restore es/doc/CMakeLists.txt as the following creates a handbook index
echo "KDE_LANG = es
sed -i 's|# ||' es/doc/CMakeLists.txt
KDE_DOCS=gwenview
" > es/doc/Makefile.am
# use the German index.docbook as a template
# 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,
# 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
# the other 'es' *.docbook files are the original translations in the source code
# any corrections from a Spanish speaker will be welcome
# 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
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
fi
## remove help documentation build instruction from all locales ...
sed -i '/BUILD_DOC/d' */CMakeLists.txt
listdocs_fn
listdocs_fn
# set support for additional language(s) as per I18N variable
# set support for additional language(s) as per I18N variable
# but only for languages available with this package
# but only for languages available with this package
langs="";for Lang in $I18N;do [[ -d $Lang ]] && langs="$langs $Lang";done
langs=""
sed -i "s|SUBDIRS=.*$|SUBDIRS=$langs|" Makefile.am
for Lang in $I18N
do
ltoolupdate_fn
[[ -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
chown_fn
cd_builddir_fn
cd_builddir_fn
LDFLAGS="${SLKLDFLAGS}" \
cmake \
CFLAGS="${SLKCFLAGS} $TQT_INCLUDE_PATH" \
-DCMAKE_C_FLAGS:STRING=$SLKCFLAGS \
CXXFLAGS="${SLKCFLAGS}" \
-DCMAKE_CXX_FLAGS:STRING=$SLKCFLAGS \
CC=${COMPILER} \
-DCMAKE_C_COMPILER=$COMPILER \
CXX=${COMPILER_CXX} \
-DCMAKE_CXX_COMPILER=$COMPILER_CXX \
../configure \
-DCMAKE_INSTALL_PREFIX=$INSTALL_TDE \
--prefix=${INSTALL_TDE} \
..
--sysconfdir=$SYS_CNF_DIR \
--mandir=${INSTALL_TDE}/man \
--disable-rpath \
--enable-closure
make_fn
make_fn
@ -91,18 +94,18 @@ echo "
# exactly 11 lines for the formatting to be correct. It's also customary to
# exactly 11 lines for the formatting to be correct. It's also customary to
# leave one space after the ':'.
# leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
|-----handy-ruler------------------------------------------------------|
tdegwenview-i18n: tdegwenview-i18n (Internationalization files for gwenview.)
$PKGNAM: $PKGNAM (Internationalization files for gwenview.)
tdegwenview-i18n :
$PKGNAM :
tdegwenview-i18n : For languages:
$PKGNAM : For languages:
tdegwenview-i18n :
$PKGNAM :
tdegwenview-i18n: $(echo $langs)
$PKGNAM: $langs
tdegwenview-i18n :
$PKGNAM :
tdegwenview-i18n :
$PKGNAM :
tdegwenview-i18n :
$PKGNAM :
tdegwenview-i18n :
$PKGNAM :
tdegwenview-i18n :
$PKGNAM :
tdegwenview-i18n :
$PKGNAM :
" > $PKG/install/slack-desc
" > $PKG/install/slack-desc