Added Apps/kkbswitch

knemo.SlackBuild - added cmake
knetstats.SlackBuild - added cmake
knmap.SlackBuild - added cmake
get-source.sh - rename any pre-downloaded R14.0.6 archives
              - cgit - tde-i18n-$lang - remove the previous repo when downloading update
pull/25/head
Ray-V 5 years ago
parent 6ae1e640c3
commit 5d22ce25a4

@ -0,0 +1,99 @@
#!/bin/sh
# Generated by Alien's SlackBuild Toolkit: http://slackware.com/~alien/AST
# Copyright 2009, 2010, 2011, 2012, 2013, 2014, 2015 Eric Hameleers, Eindhoven, Netherlands
# Copyright 2015-2017 Thorn Inurcide
# Copyright 2015-2017 tde-slackbuilds project on GitHub
# All rights reserved.
#
# Permission to use, copy, modify, and distribute this software for
# any purpose with or without fee is hereby granted, provided that
# the above copyright notice and this permission notice appear in all
# copies.
#
# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
PRGNAM=kkbswitch
VERSION=${VERSION:-$TDEVERSION}
BUILD=${BUILD:-1}
TAG=${TAG:-_tde}
source ../../get-source.sh
getsource_fn
untar_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 [[ -s po/$Lang.po ]] && langs="$langs $Lang.po";done
## output list of available locales ...
(cd po
ls -1 *.po | while read line
do
## ... and compare to selected locales & remove those not required
[[ $langs != *$line* ]] && rm -rf $line
:
done)
[[ $langs != "" ]] && TRANS=ON && langs=$(echo $langs|sed "s|.po||g")
[[ $langs == *ru* || $langs == *uk* ]] && RU_UA=ON
listdocs_fn
chown_fn
cd_builddir_fn
cmake \
-DCMAKE_C_FLAGS:STRING=$SLKCFLAGS \
-DCMAKE_CXX_FLAGS:STRING=$SLKCFLAGS \
-DCMAKE_C_COMPILER=$COMPILER \
-DCMAKE_CXX_COMPILER=$COMPILER_CXX \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$INSTALL_TDE \
-DLIB_SUFFIX=$LIBDIRSUFFIX \
-DBUILD_TRANSLATIONS=${TRANS:-OFF} \
-DWITH_RU_UA_LAYOUT=${RU_UA:-OFF} \
-DCMAKE_SKIP_RPATH=ON \
..
make_fn
installdocs_fn
strip_fn
mkdir_install_fn
echo "
# HOW TO EDIT THIS FILE:
# The 'handy ruler' below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
$PRGNAM: KKBSwitch is a keyboard layout indicator which displays an icon in
$PRGNAM: the system tray that indicates which layout is currently active.
$PRGNAM:
$PRGNAM: Switch keyboard groups by clicking the icon or selecting the desired
$PRGNAM: group from the icon's menu
$PRGNAM: Toggle between the two most recently used groups.
$PRGNAM:
$PRGNAM:
$PRGNAM: With language support for:
$PRGNAM: en $langs
$PRGNAM:
" > $PKG/install/slack-desc
makepkg_fn

@ -40,34 +40,21 @@ sed -i -e 's|network_|knemo_network_|g' src/{knemod/interfaceicon,kcm/configdial
sed -i 's|<tr><td>|<tr><td width=70%>|g' src/knemod/interfacetooltip.cpp
# patch
sed -i 's|Default Gateway" ), LINK_QUALITY|Default Gateway" ), GATEWAY|' src/knemod/interfacetooltip.cpp
# 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 translations/$Lang ]] && langs="$langs $Lang";done
[[ $TDEVERSION == cgit ]] && LANG_SUFF=/messages/kcm_knemo.po
langs="";for Lang in $I18N;do [[ -d translations/$Lang ]] && langs="$langs $Lang${LANG_SUFF:-}";done
## convoluted method to work around cmake 'add_custom_target' seeing duplicate files
[[ $TDEVERSION == cgit ]] && LANG_SUFF=/messages/knemod.po && langs2="" && \
for Lang in $I18N;do [[ -d translations/$Lang ]] && langs2="$langs2 $Lang${LANG_SUFF:-}";done && \
langs="$langs $langs2" && \
sed -i "s|\${po_files}|$langs|" translations/CMakeLists.txt && \
langs=$(echo $langs2|sed "s|$LANG_SUFF||g") || \
sed -i "s|SUBDIRS=.*$|SUBDIRS=$langs|" translations/Makefile.am
[[ $langs != "" ]] && TRANS=ON
[[ $TDEVERSION == R14.0.4 ]] && {
## patch for clang
echo $'
--- src/knemod/knemodaemon.h
+++ src/knemod/knemodaemon.h
@@ -38 +38 @@
-class KNotifyClient::Instance;
+namespace KNotifyClient { class Instance; }
--- src/knemod/interfacestatusdialog.cpp
+++ src/knemod/interfacestatusdialog.cpp
@@ -215 +215 @@
- textLabelSpeedSend->setText( TDEIO::convertSize( bytesPerSecond ) + i18n( "/s" ) );
+ textLabelSpeedSend->setText( ( bytesPerSecond ) + i18n( "/s" ) );
@@ -217 +217 @@
- textLabelSpeedReceived->setText( TDEIO::convertSize( bytesPerSecond ) + i18n( "/s" ) );
+ textLabelSpeedReceived->setText( ( bytesPerSecond ) + i18n( "/s" ) );
' | while read line
do
patch -p0
done
}
ltoolupdate_fn
[[ $TDEVERSION == *14.0.6 ]] && ltoolupdate_fn
listdocs_fn
@ -75,6 +62,8 @@ chown_fn
cd_builddir_fn
[[ $TDEVERSION == *14.0.6 ]] && {
LDFLAGS=$SLKLDFLAGS \
CFLAGS="$SLKCFLAGS $TQT_INCLUDE_PATH" \
CXXFLAGS=$SLKCFLAGS \
@ -87,6 +76,22 @@ CXX=$COMPILER_CXX \
--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_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$INSTALL_TDE \
-DLIB_SUFFIX=$LIBDIRSUFFIX \
-DBUILD_TRANSLATIONS=${TRANS:-OFF} \
-DCMAKE_SKIP_RPATH=ON \
..
}
make_fn
installdocs_fn
@ -111,7 +116,7 @@ knemo: outgoing traffic. For every network interface it displays an icon in
knemo: the Panel.
knemo:
knemo: With language support for:
knemo: en$langs
knemo: en $langs
knemo:
knemo: IMPORTANT: KNemo has to be started using
knemo: Trinity Control Center|Internet & Network|Network Monitor.

@ -35,10 +35,11 @@ untar_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 translations/$Lang ]] && langs="$langs $Lang";done
sed -i "s|SUBDIRS=.*$|SUBDIRS=$langs|" translations/Makefile.am
ltoolupdate_fn
LANG_SUFF=/messages/$PRGNAM.po
langs="";for Lang in $I18N;do [[ -d translations/$Lang ]] && langs="$langs $Lang${LANG_SUFF:-}";done
sed -i "s|\${po_files}|$langs|" translations/CMakeLists.txt && \
langs=$(echo $langs|sed "s|$LANG_SUFF||g")
[[ $langs != "" ]] && TRANS=ON
listdocs_fn
@ -46,17 +47,17 @@ 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_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$INSTALL_TDE \
-DLIB_SUFFIX=$LIBDIRSUFFIX \
-DBUILD_TRANSLATIONS=${TRANS:-OFF} \
-DCMAKE_SKIP_RPATH=ON \
..
make_fn
@ -82,7 +83,7 @@ knetstats:
knetstats:
knetstats:
knetstats: With language support for:
knetstats: en$langs
knetstats: en $langs
knetstats:
knetstats:
knetstats:

@ -35,19 +35,20 @@ untar_fn
listdocs_fn
ltoolupdate_fn
chown_fn
cd_builddir_fn
LDFLAGS="${SLKLDFLAGS}" \
CFLAGS="${SLKCFLAGS} $TQT_INCLUDE_PATH" \
CXXFLAGS="${SLKCFLAGS}" \
CC=${COMPILER} \
CXX=${COMPILER_CXX} \
../configure \
--prefix=${INSTALL_TDE}
cmake \
-DCMAKE_C_FLAGS:STRING=$SLKCFLAGS \
-DCMAKE_CXX_FLAGS:STRING=$SLKCFLAGS \
-DCMAKE_C_COMPILER=$COMPILER \
-DCMAKE_CXX_COMPILER=$COMPILER_CXX \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$INSTALL_TDE \
-DLIB_SUFFIX=$LIBDIRSUFFIX \
-DCMAKE_SKIP_RPATH=ON \
..
make_fn

@ -55,15 +55,15 @@ chown_fn
#cd_builddir_fn - don't use
LDFLAGS="${SLKLDFLAGS}" \
CFLAGS="${SLKCFLAGS} $TQT_INCLUDE_PATH" \
CXXFLAGS="${SLKCFLAGS}" \
CC=${COMPILER} \
CXX=${COMPILER_CXX} \
LDFLAGS=$SLKLDFLAGS \
CFLAGS="$SLKCFLAGS $TQT_INCLUDE_PATH" \
CXXFLAGS=$SLKCFLAGS \
CC=$COMPILER \
CXX=$COMPILER_CXX \
./configure \
--prefix=${INSTALL_TDE} \
--prefix=$INSTALL_TDE \
--sysconfdir=$SYS_CNF_DIR \
--mandir=${INSTALL_TDE}/man \
--mandir=$INSTALL_TDE/man \
--disable-rpath \
--enable-closure
@ -87,7 +87,7 @@ echo "
|-----handy-ruler------------------------------------------------------|
ksquirrel: KSquirrel is an image viewer for TDE.
ksquirrel:
ksquirrel: Image decoding is based on it's own decoders (ksquirrel-libs)
ksquirrel: Image decoding is based on its own decoders (ksquirrel-libs)
ksquirrel:
ksquirrel: With OpenGL and KIPI support.
ksquirrel:

@ -273,7 +273,7 @@ dialog --cr-wrap --defaultno --yes-label "Continue" --no-label "Stop" --no-shado
"
Do you want the build to \Zr\Z4\ZbStop\Zn at a failure or <\Z1C\Zb\Z0ontinue\Zn> to the next SlackBuild?
Build logs are $TMP/'program'-build-log, and configure/cmake error logs will be in $TMP/build/tmp-'program'.
Build logs are $TMP/'program'-*-build-log, and configure/cmake error logs will be in $TMP/build/tmp-'program'.
A practical build method could be:
@ -412,6 +412,7 @@ Non-TDE apps are in the Misc category and don't need the \Zb\Zr\Z4R\Znequired TD
"Apps/kdbg" "GUI for gdb using TDE" off "\Zb\Z6 \Zn" \
"Apps/kdbusnotification" "A DBUS notification to TDE interface" off "\Zb\Z6 \Zn" \
"Apps/kile" "A TEX and LATEX source editor and shell" off "\Zb\Z6 \Zn" \
"Apps/kkbswitch" "A keyboard layout indicator" off "\Zb\Z6 \Zn" \
"Apps/knemo" "The TDE Network Monitor" off "\Zb\Z6 \Zn" \
"Apps/knetstats" "A network monitor that shows rx/tx LEDs" off "\Zb\Z6 \Zn" \
"Apps/knights" "A graphical chess interface" off "\Zb\Z6 \Zn" \
@ -750,11 +751,11 @@ do
build=$(cat $package.SlackBuild | grep "BUILD:" | cut -d "-" -f2 | rev | cut -c 2- | rev)
# The real build starts here
script -c "sh $package.SlackBuild" $TMP/$package-build-log || ${EXIT_FAIL:-"true"}
script -c "sh $package.SlackBuild" $TMP/$package-$TDEVERSION-$ARCH-build-log || ${EXIT_FAIL:-"true"}
# remove colorizing escape sequences from build-log
# Re: http://serverfault.com/questions/71285/in-centos-4-4-how-can-i-strip-escape-sequences-from-a-text-file
sed -ri "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g" $TMP/$package-build-log || ${EXIT_FAIL:-"true"}
sed -ri "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g" $TMP/$package-$TDEVERSION-$ARCH-build-log || ${EXIT_FAIL:-"true"}
checkinstall ()
{
@ -774,7 +775,7 @@ sed -i "s|$dir ||" $TMPVARS/TDEbuilds || \
{
echo "
Error: $package package build failed
Check the build log $TMP/$package-build-log
Check the build log $TMP/$package-$TDEVERSION-$ARCH-build-log
"
## if koffice was building with libpng14, restore the libpng16 headers for any following builds
[[ ${USE_PNG14:-} == yes ]] && source $BUILD_TDE_ROOT/get-source.sh && libpng16_fn || true

@ -90,6 +90,12 @@ done
## check for and remove any zero byte archive files
[[ ! -s $SRCDIR/../../src/$PRGNAM-$VERSION.${ARCHIVE_TYPE:-"tar.xz"} ]] && \
rm $SRCDIR/../../src/$PRGNAM-$VERSION.${ARCHIVE_TYPE:-"tar.xz"} 2>/dev/null || true
## R14.0.6 archive names include -trinity.
## To maintain compatibility with the previous naming convention,
## rename any pre-downloaded R14.0.6 archives
[[ $TDEVERSION == 14.0.6 ]] && [[ -s $SRCDIR/../../src/$PRGNAM-trinity-$VERSION.tar.xz ]] && \
mv $SRCDIR/../../src/$PRGNAM-trinity-$VERSION.tar.xz $SRCDIR/../../src/$PRGNAM-$VERSION.tar.xz
ln -sf $SRCDIR/../../src/$PRGNAM-$VERSION.${ARCHIVE_TYPE:-"tar.xz"} $SRCDIR
SOURCE=$SRCDIR/$PRGNAM-$VERSION.${ARCHIVE_TYPE:-"tar.xz"}
# SRCURL for non-TDE archives, set in the SB, will override the Trinity default *tar.xz URL
@ -195,6 +201,8 @@ true # stop the following i18n download (attempts) if this routine fails and i18
for lang in $I18N
do
cd tdei18n
## remove the previous repo to avoid build failures caused by any unused old files
rm -rf cgit/tde-i18n/plain/tde-i18n-$lang
wget -m --no-parent --no-host-directories https://mirror.git.trinitydesktop.org/cgit/tde-i18n/plain/tde-i18n-$lang/
##will download the tde-i18n-$lang files to:
##$BUILD_TDE_ROOT/src/cgit/tdei18n/cgit/tde-i18n/plain/tde-i18n-$lang/*
@ -310,7 +318,7 @@ installdocs_fn ()
{
[[ $TDEMIR_SUBDIR == misc || $PRGNAM == libart-lgpl ]] && INSTALL_TDE=/usr
mkdir -p $PKG$INSTALL_TDE/doc/$PRGNAM-$VERSION
(cd $DOCDIR;cp -a --parents ${DOCS:-} $PKG$INSTALL_TDE/doc/$PRGNAM-$VERSION) || true
(cd ${DOCDIR:-};cp -a --parents ${DOCS:-} $PKG$INSTALL_TDE/doc/$PRGNAM-$VERSION) || true # DOCDIR might not exist
cat $SRCDIR/$(basename $0) > $PKG$INSTALL_TDE/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
chown -R root:root $PKG$INSTALL_TDE/doc/$PRGNAM-$VERSION
find $PKG$INSTALL_TDE/doc -type f -exec chmod 644 {} \;

Loading…
Cancel
Save