Added cpu optimization

Added a section to BUILD-TDE.sh for cpu optimization.

It only functions for x86 - the build for any other cpu type works as before.

I would think that most people building these packages would be doing so for their own use on the machine where the build takes place, so it makes sense to provide an option to optimize the build for that machine.

Added the cpu option to get-source.sh, tqt3.SlackBuild, and tqca-tls.SlackBuild. Moved setting ARCH from get-source.sh and koffice.SlackBuild into BUILD-TDE.sh where it's used for this new option.

Added a summary of the selected options to the final dialog screen.

Other changes to BUILD-TDE.sh are an internal clean-up, mainly making use of dialog options.
pull/7/head
Ray-V 7 years ago
parent 7d1c735bf2
commit 7beca23e24

@ -32,8 +32,6 @@ TAG=${TAG:-_tde}
## build with libpng-1.4 - set in BUILD-TDE.sh - loading pngs in chalk/krita crashes with libpng16 ## build with libpng-1.4 - set in BUILD-TDE.sh - loading pngs in chalk/krita crashes with libpng16
[[ ${USE_PNG14:-} == yes ]] && \ [[ ${USE_PNG14:-} == yes ]] && \
[[ $(ls -l /usr/include/png.h) != *libpng14* ]] && \ [[ $(ls -l /usr/include/png.h) != *libpng14* ]] && \
{ [[ $(getconf LONG_BIT) == 64 ]] && ARCH=x86_64 || ARCH=i686
} && \
{ installpkg $LIBPNG_TMP/libpng-1.4.20-$ARCH-1.txz || \ { installpkg $LIBPNG_TMP/libpng-1.4.20-$ARCH-1.txz || \
{ echo -e "\033[39;1m\n (re)install libpng-1.4 \n\033[0m" && \ { echo -e "\033[39;1m\n (re)install libpng-1.4 \n\033[0m" && \
exit exit

@ -1,39 +1,39 @@
#!/bin/sh #!/bin/sh
## suppress error messages
exec 2>/dev/null
export TMPVARS=/tmp/build/vars export TMPVARS=/tmp/build/vars
if [ ! -d $TMPVARS ]; then if [ ! -d $TMPVARS ]; then
mkdir -p $TMPVARS mkdir -p $TMPVARS
fi fi
dialog --no-shadow --colors --title " Introduction " --msgbox \ dialog --cr-wrap --no-shadow --colors --title " Introduction " --msgbox \
"\n "
This is the set up script for TDE SlackBuilds on Slackware 14.2 for setting user preferences and options. This is the set up script for TDE SlackBuilds on Slackware 14.2 for setting user preferences and options.
\n\n
Source archives must be placed in the 'src' directory or will be downloaded during the build from a geoIP located mirror site. Source archives must be placed in the 'src' directory or will be downloaded during the build from a geoIP located mirror site.
\n\n
A package build list is created and successfully built and installed packages are removed from that list as the build progresses. A package build list is created and successfully built and installed packages are removed from that list as the build progresses.
\n\n
US English is the default language and support for additional languages can be added. US English is the default language and support for additional languages can be added.
\n\n
There is an option to abort the build on the final setup screen - so just run through the options and familiarize yourself with them before an actual build. " \ There is an option to abort the build on the final setup screen - so just run through the options and familiarize yourself with them before an actual build. " \
21 75 21 75
rm -f $TMPVARS/build-new rm -f $TMPVARS/build-new
dialog --yes-label "Re-use" --no-label "New" --defaultno --no-shadow --colors --title " TDE Build " --yesno \ dialog --cr-wrap --yes-label "Re-use" --no-label "New" --defaultno --no-shadow --colors --title " TDE Build " --yesno \
"\n "
Select \Zr\Z4\ZbNew\Zn if: Select \Zr\Z4\ZbNew\Zn if:
\n
This is a new build - OR This is a new build - OR
\n
Additional packages are being built Additional packages are being built
\n
\Zr\Z4\ZbNew\Zn will delete any previous build list. \Zr\Z4\ZbNew\Zn will delete any previous build list.
\n\n
Selecting \Z1R\Zb\Z0e-use\Zn avoids having to create the build list again when re-running the build for any SlackBuilds that failed." \ Selecting <\Z1R\Zb\Z0e-use\Zn> avoids having to create the build list again when re-running the build for any SlackBuilds that failed." \
13 75 13 75
[[ $(echo $?) == 0 ]] && echo no > $TMPVARS/build-new [[ $? == 0 ]] && echo no > $TMPVARS/build-new
[[ $(echo $?) == 1 ]] && rm $TMPVARS/TDEbuilds 2> /dev/null [[ $? == 1 ]] && rm $TMPVARS/TDEbuilds
build_core() build_core()
@ -81,230 +81,251 @@ ROOT=$(pwd)
run_dialog() run_dialog()
{ {
rm -f $TMPVARS/TDEVERSION rm -f $TMPVARS/TDEVERSION
dialog --nocancel --no-shadow --colors --title " TDE Version " --inputbox \ dialog --cr-wrap --nocancel --no-shadow --colors --title " TDE Version " --inputbox \
"\n "
Set the version of TDE to be built. Set the version of TDE to be built.
\n\n" \ " \
10 75 R14.0.4 \ 10 75 R14.0.4 \
2> $TMPVARS/TDEVERSION 2> $TMPVARS/TDEVERSION
rm -f $TMPVARS/INSTALL_TDE rm -f $TMPVARS/INSTALL_TDE
dialog --nocancel --no-shadow --colors --title " TDE Installation Directory " --inputbox \ dialog --cr-wrap --nocancel --no-shadow --colors --title " TDE Installation Directory " --inputbox \
"\n "
Set the directory that TDE is to be installed in. Set the directory that TDE is to be installed in.
\n\n" \ " \
10 75 /opt/trinity \ 10 75 /opt/trinity \
2> $TMPVARS/INSTALL_TDE 2> $TMPVARS/INSTALL_TDE
rm -f $TMPVARS/COMPILER rm -f $TMPVARS/COMPILER
dialog --nocancel --no-shadow --colors --title " Select The Compiler You Wish To Use " --menu \ dialog --cr-wrap --nocancel --no-shadow --colors --title " Select The Compiler You Wish To Use " --menu \
"\n "
Here you can select the compiler you wish to use to compile TDE. Here you can select the compiler you wish to use to compile TDE.
\n
Your choices are \Zb\Z3GCC\Zn and \Zb\Z3Clang\Zn Your choices are \Zb\Z3GCC\Zn and \Zb\Z3Clang\Zn
\n\n
This is a matter of personal preference and not a necessity, but the option exist. This is a matter of personal preference and not a necessity, but the option exist.
\n\n
If you're not sure which to select, you should probably just use \Zb\Z3GCC\Zn. If you're not sure which to select, you should probably just use \Zb\Z3GCC\Zn.
\n\n
Please note: the corresponding \Zb\Z3C++\Zn compiler will be chosen for you based on your \Zb\Z3C\Zn compiler selection. Please note: the corresponding \Zb\Z3C++\Zn compiler will be chosen for you based on your \Zb\Z3C\Zn compiler selection.
\n\n
So if you choose \Zb\Z3GCC\Zn, the \Zb\Z3g++\Zn compiler will be used. And if you choose \Zb\Z3Clang\Zn then \Zb\Z3clang++\Zn will be used. So if you choose \Zb\Z3GCC\Zn, the \Zb\Z3g++\Zn compiler will be used. And if you choose \Zb\Z3Clang\Zn then \Zb\Z3clang++\Zn will be used.
\n\n" \ " \
25 77 2 \ 23 77 2 \
"gcc" "GCC" \ "gcc" "GCC" \
"clang" "Clang" \ "clang" "Clang" \
2> $TMPVARS/COMPILER 2> $TMPVARS/COMPILER
# Lets try redirector
#rm -f $TMPVARS/TDE_MIRROR rm -f $TMPVARS/SET_MARCH
#dialog --nocancel --no-shadow --colors --title " TDE Source Mirror Site " --menu \ rm -f $TMPVARS/64_MARCH
#"\n rm -f $TMPVARS/ARCH
#Source archives can be pre-downloaded and placed in the 'src' directory or downloaded as required during the build from a TDE mirror. ## use this dialog widget for x86 processors only
#\n [[ $(uname -m) == *86* ]] && {
#The mirror will only be used if the source is not available in 'src'. ## get the native march/mtune options
#\n\n CPU_MARCH=$(gcc -Q -O2 -march=native --help=target | grep -E "march=|mtune=" | tr -d [:blank:])
#[Non-TDE apps are included in \Zb\Z3TDE Packages Selection\Zn options under ## what ARCH?
#\n [[ $(getconf LONG_BIT) == 64 ]] && echo x86_64 > $TMPVARS/ARCH || echo i586 > $TMPVARS/ARCH
# Misc and can also be downloaded during the build from their own ARCH=$(cat $TMPVARS/ARCH)
#\n ## get the default march/mtune options for a 64-bit build from the gcc configuration
# source URLs which are embedded in the SlackBuild script.] ## with a temporary file for the summary screen
#\n\n [[ $ARCH == x86_64 ]] && GCC_MOPTS="\Zb\Z6$(gcc -Q -O2 --help=target | grep -E "march=|mtune=" | tr -d [:blank:])\Zn which is the gcc default" && echo $GCC_MOPTS|sed 's|which.*$||' > $TMPVARS/64_MARCH
#This list of mirrors, which could change, is @ ## set the default march/mtune options for i586 and tune for i686 overriding the gcc configuration
#\n [[ $ARCH == i586 ]] && GCC_MOPTS="\Zb\Z6-march=i586 -mtune=i686\Zn"
# https://www.trinitydesktop.org/mirrorstatus.php ## run dialog
#\n\n" \ EXITVAL=2
#23 75 5 \ until [[ $EXITVAL -lt 2 ]] ; do
#"tde-mirror.yosemite.net/trinity" "USA" \ dialog --cr-wrap --defaultno --no-shadow --colors --ok-label " 2 / 3 " --cancel-label "1" --help-button --help-label "README" --title " gcc cpu optimization " --inputbox \
#"mirrorservice.org/sites/trinitydesktop.org/trinity" "UK" \ "
#"mirror.ntmm.org/trinity" "Sweden" \ The build can be set up for gcc optimization for the -march and -mtune options.
#"bg1.mirror.trinitydesktop.org/trinity" "Bulgaria" \
#"ftp.fau.de/trinity" "Germany" \ \Zr\Z4\Zb<1>\Zn - will use the option $(echo $GCC_MOPTS)
#2> $TMPVARS/TDE_MIRROR
<\Zb\Z02\Zn> - will use the gcc native option \Zb\Z6$(echo $CPU_MARCH)\Zn for this machine's cpu
<\Zb\Z03\Zn> - edit to specify \Zb\Z6march/mtune\Zn for a target machine
\Zb\Z0 [[ use any arrow key x2 to activate the input box for editing ]]\Zn
" \
21 75 "$(echo $CPU_MARCH)" \
2> $TMPVARS/SET_MARCH && break
EXITVAL=$?
[[ $EXITVAL == 1 ]] && [[ $ARCH == i586 ]] && echo "-march=i586 -mtune=i686" > $TMPVARS/SET_MARCH && break
## add this to show what mtune option has been overridden
[[ $ARCH == i586 ]] && I586_MSG=" overriding the option $(gcc -Q -O2 --help=target | grep mtune= | tr -d [:blank:]) configured into gcc"
[[ $EXITVAL == 2 ]] && dialog --aspect 3 --cr-wrap --no-shadow --colors --scrollbar --ok-label "Return" --msgbox \
"
<\Z2\Zb1\Zn> is the default where the target machine's cpu-type is not known
* for i586 the -mtune= option has been set at i686${I586_MSG:-}
* for x86_64 it is the gcc configured option.
<\Z2\Zb2\Zn> will be the best option for any builds to be installed on this machine or one with an identical cpu-type.
<\Z2\Zb3\Zn> has been included to build packages on this machine for installation on another machine with a known cpu-type, allowing that target machine's cpu instruction set to be fully utilized.
The relationship between -march and -mtune options and their use is detailed in the gcc man page in the section 'Intel 386 and AMD x86-64 Options'.
" \
0 0
done
}
rm -f $TMPVARS/NUMJOBS rm -f $TMPVARS/NUMJOBS
dialog --nocancel --no-shadow --colors --title " Parallel Build " --inputbox \ dialog --cr-wrap --nocancel --no-shadow --colors --title " Parallel Build " --inputbox \
"\n "
Set the number of simultaneous jobs for make to whatever your system will support. Set the number of simultaneous jobs for make to whatever your system will support.
\n\n" \ " \
11 75 -j6 \ 11 75 -j6 \
2> $TMPVARS/NUMJOBS 2> $TMPVARS/NUMJOBS
##
rm -f $TMPVARS/I18N rm -f $TMPVARS/I18N
EXITVAL=2 EXITVAL=2
until [[ $EXITVAL -lt 2 ]] ; do until [[ $EXITVAL -lt 2 ]] ; do
dialog --nocancel --no-shadow --colors --help-button --help-label "README" --title " Select Additional Languages " --inputbox \ dialog --cr-wrap --nocancel --no-shadow --colors --help-button --help-label "README" --title " Select Additional Languages " --inputbox \
"\n "
Additional language support Additional language support
\n\n
This is the complete list for tde-i18n - and will also apply for other packages. This is the complete list for tde-i18n - and will also apply for other packages.
\n
Other package sources may not have support for all these additional languages, but they will be included in the build for that package when the translations are included in the source. Other package sources may not have support for all these additional languages, but they will be included in the build for that package when the translations are included in the source.
\n
If any other translation is included in the package source, it can be added here but won't be supported by TDE. If any other translation is included in the package source, it can be added here but won't be supported by TDE.
\n\n
Multiple selections may be made - space separated. Multiple selections may be made - space separated.
\n\n
Build language packages/support for any of: Build language packages/support for any of:
\n
\Zb\Z6af ar az be bg bn br bs ca cs csb cy da de el en_GB eo es et eu fa fi fr fy ga gl he hi hr hu is it ja kk km ko lt lv mk mn ms nb nds nl nn pa pl pt pt_BR ro ru rw se sk sl sr sr@Latn ss sv ta te tg th tr uk uz uz@cyrillic vi wa zh_CN zh_TW\Zn \Zb\Z6af ar az be bg bn br bs ca cs csb cy da de el en_GB eo es et eu fa fi fr fy ga gl he hi hr hu is it ja kk km ko lt lv mk mn ms nb nds nl nn pa pl pt pt_BR ro ru rw se sk sl sr sr@Latn ss sv ta te tg th tr uk uz uz@cyrillic vi wa zh_CN zh_TW\Zn
\n\n" \ " \
26 75 \ 26 75 \
2> $TMPVARS/I18N && break 2> $TMPVARS/I18N && break
[[ $EXITVAL == 2 ]] && dialog --defaultno --yes-label "Ascii" --no-label "Continue" --no-shadow --colors --no-collapse --yesno \ [[ $EXITVAL == 2 ]] && dialog --cr-wrap --defaultno --yes-label "Ascii" --no-label "Utf-8" --no-shadow --colors --no-collapse --yesno \
"\n "
If you can see the two 'y' like characters, then you've probably got If you can see the two 'y' like characters, then you've probably got
\na suitable terminal font installed and can choose \Zr\Z4\ZbContinue\Zn, a suitable terminal font installed and can choose \Zr\Z4\ZbUtf-8\Zb\Zn,
\notherwise choose \Z1A\Zb\Z0scii\Zn. otherwise choose \Z1A\Zb\Z0scii\Zn.
\n\n
<<\Z3\Zb ҷ ɣ \Zn>> <<\Z3\Zb ҷ ɣ \Zn>>
\n\n
$(echo -e "\Zb\Z0A suitable font in a utf8 enabled terminal is needed to display all the extended characters in this list. Liberation Mono in an 'xterm' is known to work. Setting up a 'tty' is not worth the effort.\Zn") \Zb\Z0A suitable font in a utf8 enabled terminal is needed to display all the extended characters in this list. Liberation Mono in an 'xterm' is known to work. Setting up a 'tty' is not worth the effort.\Zn
\n\n" \ " \
15 75 15 75
EXVAL=$? EXVAL=$?
[[ $EXVAL == 1 ]] && dialog --no-shadow --colors --no-collapse --msgbox \ [[ $EXVAL == 1 ]] && dialog --cr-wrap --no-shadow --colors --no-collapse --ok-label "Return" --msgbox \
"\n "
\Zb\Z2PgDn/PgUp to scroll\Zn \Zb\Z2PgDn/PgUp to scroll\Zn
\n\n
$(xzless Core/tde-i18n/langcodes.xz | tr "\n" X | sed 's|X|\\n|g;s|Latn\t|Latn|g') $(xzless Core/tde-i18n/langcodes.xz | tr "\n" X | sed 's|X|\\n|g;s|Latn\t|Latn|g')
\n\n" \ " \
26 75 26 75
[[ $EXVAL == 0 ]] && dialog --no-shadow --colors --no-collapse --msgbox \ [[ $EXVAL == 0 ]] && dialog --cr-wrap --no-shadow --colors --no-collapse --ok-label "Return" --msgbox \
"\n "
\Zb\Z2PgDn/PgUp to scroll\Zn \Zb\Z2PgDn/PgUp to scroll\Zn
\n\n
$(xzless Core/tde-i18n/langcodes.xz |sed 's|\t\+|\t|g'|cut -f 1,3-| tr "\n" X | sed 's|X|\\n|g;s|\t|\t\t|g;s|cyrillic\t|cyrillic|g;s|Latn\t|Latn|g') $(xzless Core/tde-i18n/langcodes.xz |sed 's|\t\+|\t|g'|cut -f 1,3-| tr "\n" X | sed 's|X|\\n|g;s|\t|\t\t|g;s|cyrillic\t|cyrillic|g;s|Latn\t|Latn|g')
\n\n" \ " \
26 75 26 75
done done
rm -f $TMPVARS/TQT_DOCS rm -f $TMPVARS/TQT_DOCS
dialog --no-shadow --colors --defaultno --title " TQt html Documentation " --yesno \ dialog --cr-wrap --no-shadow --colors --defaultno --title " TQt html Documentation " --yesno \
"\n "
TQt html documentation is ~21M. TQt html documentation is ~21M.
\n\n
Include it in the package? Include it in the package?
\n\n" \ " \
9 75 9 75
[[ $(echo $?) == 0 ]] && echo yes > $TMPVARS/TQT_DOCS [[ $? == 0 ]] && echo yes > $TMPVARS/TQT_DOCS
[[ $(echo $?) == 1 ]] && echo no > $TMPVARS/TQT_DOCS [[ $? == 1 ]] && echo no > $TMPVARS/TQT_DOCS
rm -f $TMPVARS/EXIT_FAIL rm -f $TMPVARS/EXIT_FAIL
dialog --defaultno --yes-label "Continue" --no-label "Stop" --no-shadow --colors --title " Action on failure " --yesno \ dialog --cr-wrap --defaultno --yes-label "Continue" --no-label "Stop" --no-shadow --colors --title " Action on failure " --yesno \
"\n "
Do you want the build to \Zr\Z4\ZbStop\Zn at a failure or \Z1C\Zb\Z0ontinue\Zn to the next SlackBuild? Do you want the build to \Zr\Z4\ZbStop\Zn at a failure or <\Z1C\Zb\Z0ontinue\Zn> to the next SlackBuild?
\n\n
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'.
\n\n
A practical build method could be: A practical build method could be:
\n\n
1] build the \Zb\Zr\Z4R\Znequired packages with the \Zr\Z4\ZbStop\Zn option - if any SlackBuild fails, the temporary files for that build will be kept and the problem can be identified and the build restarted. 1] build the \Zb\Zr\Z4R\Znequired packages with the \Zr\Z4\ZbStop\Zn option - if any SlackBuild fails, the temporary files for that build will be kept and the problem can be identified and the build restarted.
\n
Any problems with the build environment will also become apparent here. Any problems with the build environment will also become apparent here.
\n\n
2] then build other packages with the \Z1C\Zb\Z0ontinue\Zn option which deletes the temporary build files while the successful package builds are completing. 2] then build other packages with the <\Z1C\Zb\Z0ontinue\Zn> option which deletes the temporary build files while the successful package builds are completing.
\n
Any failures here are likely to be related to dependencies not found. Any failures here are likely to be related to dependencies not found.
\n\n
3] re-run the build for the failed programs from [2] by re-using the build list and with the \Zr\Z4\ZbStop\Zn option ... 3] re-run the build for the failed programs from [2] by re-using the build list and with the \Zr\Z4\ZbStop\Zn option ...
\n " \ " \
26 75 26 75
[[ $(echo $?) == 0 ]] && 2> $TMPVARS/EXIT_FAIL [[ $? == 0 ]] && 2> $TMPVARS/EXIT_FAIL
[[ $(echo $?) == 1 ]] && echo "exit 1" > $TMPVARS/EXIT_FAIL [[ $? == 1 ]] && echo "exit 1" > $TMPVARS/EXIT_FAIL
rm -f $TMPVARS/KEEP_BUILD rm -f $TMPVARS/KEEP_BUILD
dialog --no-shadow --colors --defaultno --title " Temporary Build Files " --yesno \ dialog --cr-wrap --no-shadow --colors --defaultno --title " Temporary Build Files " --yesno \
"\n "
'tmp' & 'package' files from a previous package build are removed at the start of building the next package to keep the build area clear. 'tmp' & 'package' files from a previous package build are removed at the start of building the next package to keep the build area clear.
\n\n
If following the build method on the previous screen, the answer here should probably be \Zr\Z4\ZbNo\Zn. If following the build method on the previous screen, the answer here should probably be \Zr\Z4\ZbNo\Zn.
\n\n
Keep \ZuALL\ZU the temporary files, including for successfully built packages?" \ Keep \ZuALL\ZU the temporary files, including for successfully built packages?" \
14 75 14 75
[[ $(echo $?) == 0 ]] && echo yes > $TMPVARS/KEEP_BUILD [[ $? == 0 ]] && echo yes > $TMPVARS/KEEP_BUILD
[[ $(echo $?) == 1 ]] && echo no > $TMPVARS/KEEP_BUILD [[ $? == 1 ]] && echo no > $TMPVARS/KEEP_BUILD
rm -f $TMPVARS/SELECT rm -f $TMPVARS/SELECT
dialog --no-shadow --colors --defaultno --title " Required dependencies " --yesno \ dialog --cr-wrap --no-shadow --colors --defaultno --title " Required dependencies " --yesno \
"\n "
Pre-select TDE core modules and required dependencies for the build list? Pre-select TDE core modules and required dependencies for the build list?
\n\n
Select \Zr\Zb\Z4No\Zn here if they have already been built and installed and you are building additional packages. Select \Zr\Zb\Z4No\Zn here if they have already been built and installed and you are building additional packages.
\n\n" \ " \
11 75 11 75
[[ $(echo $?) == 0 ]] && echo on > $TMPVARS/SELECT [[ $? == 0 ]] && echo on > $TMPVARS/SELECT
[[ $(echo $?) == 1 ]] && echo off > $TMPVARS/SELECT [[ $? == 1 ]] && echo off > $TMPVARS/SELECT
export SELECT=$(cat $TMPVARS/SELECT) export SELECT=$(cat $TMPVARS/SELECT)
rm $TMPVARS/PREPEND rm $TMPVARS/PREPEND
EXITVAL=2 EXITVAL=2
until [[ $EXITVAL -lt 2 ]] ; do until [[ $EXITVAL -lt 2 ]] ; do
dialog --no-shadow --yes-label "Prepend" --help-button --help-label "README" --no-label "Default" --colors --defaultno --title " Libraries Search Path " --yesno \ dialog --cr-wrap --no-shadow --yes-label "Prepend" --help-button --help-label "README" --no-label "Default" --colors --defaultno --title " Libraries Search Path " --yesno \
"\n "
Select \Z1P\Zb\Z0repend\Zn to add the TDE libs paths to the beginning of the search path. Select <\Z1P\Zb\Z0repend\Zn> to add the TDE libs paths to the beginning of the search path.
\n\n
Try \Zr\Zb\Z4Default\Zn first - in most cases this will work. Try \Zr\Zb\Z4Default\Zn first - in most cases this will work.
\n\n" \ " \
10 75 10 75
EXITVAL=$? EXITVAL=$?
[[ $EXITVAL == 0 ]] && echo yes > $TMPVARS/PREPEND [[ $EXITVAL == 0 ]] && echo yes > $TMPVARS/PREPEND
[[ $EXITVAL == 1 ]] && 2> $TMPVARS/PREPEND [[ $EXITVAL == 1 ]] && 2> $TMPVARS/PREPEND
[[ $EXITVAL == 2 ]] && dialog --no-shadow --colors --msgbox \ [[ $EXITVAL == 2 ]] && dialog --cr-wrap --no-shadow --colors --ok-label "Return" --msgbox \
"\n "
The default with the tqt3 build is to append the TDE lib paths to /etc/ld.so.conf. The default with the tqt3 build is to append the TDE lib paths to /etc/ld.so.conf.
\n\n
This means that TDE libs will be at the end of the search path. If the package configuration sets up the search path without using the shell variables set up in this script, those TDE libs will not be used if a library of the same name exists - a conflict which could arise if another DE is installed. This means that TDE libs will be at the end of the search path. If the package configuration sets up the search path without using the shell variables set up in this script, those TDE libs will not be used if a library of the same name exists - a conflict which could arise if another DE is installed.
\n\n
If you experience any problems of this nature, then try the \Z1P\Zb\Z0repend\Zn option, which will set up doinst.sh for tqt3 to add the TDE libs paths to the beginning of the search path. If you experience any problems of this nature, then try the \Z1P\Zb\Z0repend\Zn option, which will set up doinst.sh for tqt3 to add the TDE libs paths to the beginning of the search path.
\n\n
Then \Zb\Z2rebuild tqt3\Zn. This build option only applies to that package. Then \Zb\Z2rebuild tqt3\Zn. This build option only applies to that package.
\n\n" \ " \
20 75 20 75
done done
export PREPEND=$(cat $TMPVARS/PREPEND)
rm -f $TMPVARS/TDEbuilds rm -f $TMPVARS/TDEbuilds
dialog --nocancel --no-shadow --colors --title " TDE Packages Selection " --item-help --checklist \ dialog --cr-wrap --nocancel --no-shadow --colors --title " TDE Packages Selection " --item-help --checklist \
"\n "
Required builds for a basic working TDE are marked \Zb\Zr\Z4R\Zn. Required builds for a basic working TDE are marked \Zb\Zr\Z4R\Zn.
\n\n
The packages selected form the build list and so dependencies are listed before the packages that need them. The packages selected form the build list and so dependencies are listed before the packages that need them.
\n\n
Look out for messages in the bottom line of the screen, especially relating to dependencies. Look out for messages in the bottom line of the screen, especially relating to dependencies.
\n\n
Non-TDE apps are in the Misc category and don't need the \Zb\Zr\Z4R\Znequired TDE packages." \ Non-TDE apps are in the Misc category and don't need the \Zb\Zr\Z4R\Znequired TDE packages." \
35 95 19 \ 0 0 0 \
"Deps/tqt3" "\Zb\Zr\Z4R\Zn The Qt package for TDE" ${SELECT:-off} "\Zb\Z6 \Zn" \ "Deps/tqt3" "\Zb\Zr\Z4R\Zn The Qt package for TDE" ${SELECT:-off} "\Zb\Z6 \Zn" \
"Deps/tqtinterface" "\Zb\Zr\Z4R\Zn TDE bindings to tqt3." ${SELECT:-off} "\Zb\Z6 \Zn" \ "Deps/tqtinterface" "\Zb\Zr\Z4R\Zn TDE bindings to tqt3." ${SELECT:-off} "\Zb\Z6 \Zn" \
"Deps/arts" "\Zb\Zr\Z4R\Zn Sound server for TDE" ${SELECT:-off} "\Zb\Z6 \Zn" \ "Deps/arts" "\Zb\Zr\Z4R\Zn Sound server for TDE" ${SELECT:-off} "\Zb\Z6 \Zn" \
@ -401,20 +422,17 @@ sed -i -e 's|$| |' -e 's|"||g' $TMPVARS/TDEbuilds
[[ $(sed 's|koffice-||' $TMPVARS/TDEbuilds | grep -o Apps/koffice) ]] && \ [[ $(sed 's|koffice-||' $TMPVARS/TDEbuilds | grep -o Apps/koffice) ]] && \
{ {
rm -f $TMPVARS/Krita_OPTS rm -f $TMPVARS/Krita_OPTS
dialog --nocancel --no-shadow --colors --title " Building chalk in koffice " --item-help --checklist \ dialog --cr-wrap --nocancel --no-shadow --colors --title " Building chalk in koffice " --item-help --checklist \
"\n "
There are three options that can be set up for building the imaging app in koffice. There are three options that can be set up for building the imaging app in koffice.
\n\n
[1] It is called \Zb\Z3chalk\Zn in TDE but is known as \Zb\Z3krita\Zn most other places. [1] It is called \Zb\Z3chalk\Zn in TDE but is known as \Zb\Z3krita\Zn most other places.
\n\n
[2] .pngs loaded into chalk/krita will crash if it is built with libpng-1.6, but will load if libpng-1.4 is used for the build. [2] .pngs loaded into chalk/krita will crash if it is built with libpng-1.6, but will load if libpng-1.4 is used for the build.
\n
If libpng is chosen here, it will be added to the build list and the package placed in $TMP - not installed. It will then be installed by koffice.SB if the libpng unversioned headers and libs are not linked to libpng14. If libpng is chosen here, it will be added to the build list and the package placed in $TMP - not installed. It will then be installed by koffice.SB if the libpng unversioned headers and libs are not linked to libpng14.
\n
The koffice.SB will restore those links to libpng16 when the build has finished or failed. The koffice.SB will restore those links to libpng16 when the build has finished or failed.
\n\n
[3] GraphicsMagick will enable an extended range of image formats to be loaded and saved. ImageMagick should be an alternative, but building fails with that, so without GM, the range of supported image formats will be limited. [3] GraphicsMagick will enable an extended range of image formats to be loaded and saved. ImageMagick should be an alternative, but building fails with that, so without GM, the range of supported image formats will be limited.
\n
If GM is chosen here, it will be added to the build list if not already selected or installed." \ If GM is chosen here, it will be added to the build list if not already selected or installed." \
30 75 3 \ 30 75 3 \
" krita" "Set the app name to krita" on "\Zb\Z6 otherwise will be \Zb\Z3chalk\Zn" \ " krita" "Set the app name to krita" on "\Zb\Z6 otherwise will be \Zb\Z3chalk\Zn" \
@ -425,12 +443,12 @@ There are three options that can be set up for building the imaging app in koffi
GM_VERSION=$(grep VERSION:- $ROOT/Misc/GraphicsMagick/GraphicsMagick.SlackBuild|cut -d- -f2|cut -d} -f1) GM_VERSION=$(grep VERSION:- $ROOT/Misc/GraphicsMagick/GraphicsMagick.SlackBuild|cut -d- -f2|cut -d} -f1)
[[ $(cat $TMPVARS/Krita_OPTS) == *useGM* ]] && \ [[ $(cat $TMPVARS/Krita_OPTS) == *useGM* ]] && \
[[ $(cat $TMPVARS/TDEbuilds) != *GraphicsMagick* ]] && \ [[ $(cat $TMPVARS/TDEbuilds) != *GraphicsMagick* ]] && \
[[ ! $(ls /var/log/packages/GraphicsMagick-${GM_VERSION}* 2>/dev/null) ]] && \ [[ ! $(ls /var/log/packages/GraphicsMagick-${GM_VERSION}*) ]] && \
sed -i 's|Apps/koffice|Misc/GraphicsMagick &|' $TMPVARS/TDEbuilds sed -i 's|Apps/koffice|Misc/GraphicsMagick &|' $TMPVARS/TDEbuilds
## If libpng-1.4 has been selected and hasn't already been built, add it to the build list before koffice ## If libpng-1.4 has been selected and hasn't already been built, add it to the build list before koffice
PNG_VERSION=$(grep VERSION:- $ROOT/Misc/libpng/libpng.SlackBuild|cut -d- -f2|cut -d} -f1) PNG_VERSION=$(grep VERSION:- $ROOT/Misc/libpng/libpng.SlackBuild|cut -d- -f2|cut -d} -f1)
[[ $(cat $TMPVARS/Krita_OPTS) == *libpng14* ]] && \ [[ $(cat $TMPVARS/Krita_OPTS) == *libpng14* ]] && \
[[ ! $(ls $LIBPNG_TMP/libpng-${PNG_VERSION}-*-1.txz 2>/dev/null) ]] && \ [[ ! $(ls $LIBPNG_TMP/libpng-${PNG_VERSION}-*-1.txz) ]] && \
sed -i 's|Apps/koffice|Misc/libpng &|' $TMPVARS/TDEbuilds sed -i 's|Apps/koffice|Misc/libpng &|' $TMPVARS/TDEbuilds
} }
} }
@ -439,32 +457,23 @@ sed -i 's|Apps/koffice|Misc/libpng &|' $TMPVARS/TDEbuilds
# option to change to stop the build when it fails # option to change to stop the build when it fails
if [[ $(cat $TMPVARS/build-new) == no ]] 2> /dev/null ; then if [[ $(cat $TMPVARS/build-new) == no ]] ; then
if [[ $(cat $TMPVARS/EXIT_FAIL) == "" ]] ; then if [[ $(cat $TMPVARS/EXIT_FAIL) == "" ]] ; then
if [[ $(cat $TMPVARS/KEEP_BUILD) == no ]] ; then if [[ $(cat $TMPVARS/KEEP_BUILD) == no ]] ; then
dialog --defaultno --yes-label "Stop" --no-label "Continue" --no-shadow --colors --title " Action on failure - 2 " --yesno \ dialog --cr-wrap --defaultno --yes-label "Stop" --no-label "Continue" --no-shadow --colors --title " Action on failure - 2 " --yesno \
"\n "
You have chosen to re-use the TDE build list, which now contains only those programs that failed to build. You have chosen to re-use the TDE build list, which now contains only those programs that failed to build.
\n\n
But this script is set to Continue in the event of a failure, which will delete all but the last build record. It will be easier to investigate each failure if the build is stopped when it fails. But this script is set to Continue in the event of a failure, which will delete all but the last build record. It will be easier to investigate each failure if the build is stopped when it fails.
\n\n
Do you still want the build to \Zr\Z4\ZbContinue\Zn at a failure Do you still want the build to \Zr\Z4\ZbContinue\Zn at a failure
\n
or change to \Z1S\Zb\Z0top\Zn ? or change to \Z1S\Zb\Z0top\Zn ?
\n " \ " \
15 75 15 75
[[ $(echo $?) == 0 ]] && echo "exit 1" > $TMPVARS/EXIT_FAIL [[ $? == 0 ]] && echo "exit 1" > $TMPVARS/EXIT_FAIL
fi;fi;fi fi;fi;fi
dialog --yes-label "Start" --no-label "Abort" --no-shadow --defaultno --colors --title " Start TDE Build " --yesno \
"\n
Setup is complete.
\n\n
\Z1S\Zb\Z0tart\Zn building the packages or \Zr\Z4\ZbAbort\Zn" \
9 75
[[ $(echo $?) == 1 ]] && echo -e "\n\nBuild aborted\n" && exit 1
echo
###################### ######################
# there should be no need to make any changes below # there should be no need to make any changes below
@ -472,16 +481,18 @@ echo
export TDEVERSION=$(cat $TMPVARS/TDEVERSION) export TDEVERSION=$(cat $TMPVARS/TDEVERSION)
export INSTALL_TDE=$(cat $TMPVARS/INSTALL_TDE) export INSTALL_TDE=$(cat $TMPVARS/INSTALL_TDE)
export COMPILER=$(cat $TMPVARS/COMPILER) export COMPILER=$(cat $TMPVARS/COMPILER)
# export TDE_MIRROR=$(cat $TMPVARS/TDE_MIRROR) export SET_march=$(cat $TMPVARS/SET_MARCH)
export ARCH=$(cat $TMPVARS/ARCH) # set again for the 'continue' option
export TDE_MIRROR=mirror.ppa.trinitydesktop.org/trinity export TDE_MIRROR=mirror.ppa.trinitydesktop.org/trinity
export NUMJOBS=$(cat $TMPVARS/NUMJOBS) export NUMJOBS=$(cat $TMPVARS/NUMJOBS)
export I18N=$(cat $TMPVARS/I18N) export I18N=$(cat $TMPVARS/I18N)
export TQT_DOCS=$(cat $TMPVARS/TQT_DOCS) export TQT_DOCS=$(cat $TMPVARS/TQT_DOCS)
export EXIT_FAIL=$(cat $TMPVARS/EXIT_FAIL) export EXIT_FAIL=$(cat $TMPVARS/EXIT_FAIL)
export KEEP_BUILD=$(cat $TMPVARS/KEEP_BUILD) export KEEP_BUILD=$(cat $TMPVARS/KEEP_BUILD)
export PREPEND=$(cat $TMPVARS/PREPEND)
# these exports are for koffice.SB # these exports are for koffice.SB
[[ $(cat $TMPVARS/Krita_OPTS 2>/dev/null) == *krita* ]] && export REVERT=yes [[ $(cat $TMPVARS/Krita_OPTS) == *krita* ]] && export REVERT=yes
[[ $(cat $TMPVARS/Krita_OPTS 2>/dev/null) == *libpng14* ]] && export USE_PNG14=yes [[ $(cat $TMPVARS/Krita_OPTS) == *libpng14* ]] && export USE_PNG14=yes
# See which compiler was selected and use the appropriate C++ compiler # See which compiler was selected and use the appropriate C++ compiler
[[ $(cat $TMPVARS/COMPILER) == gcc ]] && export COMPILER_CXX="g++" || export COMPILER_CXX="clang++" [[ $(cat $TMPVARS/COMPILER) == gcc ]] && export COMPILER_CXX="g++" || export COMPILER_CXX="clang++"
@ -510,6 +521,62 @@ export PKG_CONFIG_PATH
export PATH export PATH
export TQT_INCLUDE_PATH export TQT_INCLUDE_PATH
### set up variables for the summary list:
## New build
[[ $(cat $TMPVARS/build-new) != no ]] && NEW_BUILD=yes || NEW_BUILD='no - re-use existing'
## Action on failure
AOF=$(echo $EXIT_FAIL|cut -d" " -f1)
## koffice - only if it is being built
[[ $(sed 's|koffice-||' $TMPVARS/TDEbuilds | grep -o Apps/koffice) ]] && \
{
[[ $REVERT == yes ]] && RVT=\\Zb\\Z6yes\\Zn || RVT=\\Zb\\Z6no\\Zn
} && {
[[ $(cat $TMPVARS/Krita_OPTS) == *useGM* ]] && USE_GM=\\Zb\\Z6yes\\Zn || USE_GM\\Zb\\Z6=no\\Zn
} && {
[[ $USE_PNG14 == yes ]] && USE_PNG=\\Zb\\Z6yes\\Zn || USE_PNG=\\Zb\\Z6no\\Zn
} && SHADE=" "
## start dialog
EXITVAL=2
until [[ $EXITVAL -lt 2 ]] ; do
dialog --aspect 3 --no-collapse --cr-wrap --yes-label "Start" --no-label "Abort" --help-button --help-label "Build List" --no-shadow --defaultno --colors --title " Start TDE Build " --yesno \
"
Setup is complete - these are the build options:
New build list \Zb\Z6$NEW_BUILD\Zn
TDE version \Zb\Z6$TDEVERSION\Zn
TDE installation directory \Zb\Z6$INSTALL_TDE\Zn
Compiler \Zb\Z6$COMPILER\Zn
gcc cpu optimization \Zb\Z6${SET_march:-$(cat $TMPVARS/64_MARCH)}\Zn
Number of parallel jobs \Zb\Z6$(echo $NUMJOBS|sed 's|-j||')\Zn
Additional languages \Zb\Z6${I18N:-\Z0\Zbnone}\Zn
Include tqt html docs \Zb\Z6$TQT_DOCS\Zn
Action on failure \Zb\Z6${AOF:-continue}\Zn
Keep the temporary build files \Zb\Z6$KEEP_BUILD\Zn
Pre-select required [\Zb\Zr\Z4R\Zn] builds \Zb\Z6$(cat $TMPVARS/SELECT|sed 's|off|no|;s|on|yes|')\Zn
Prepend TDE libs paths \Zb\Z6${PREPEND:-no}\Zn${SHADE:-\Z0\Zb}
koffice:
revert chalk to krita ${RVT:-n/a}
build with libpng14 ${USE_PNG:-n/a}
build with GraphicsMagick ${USE_GM:-n/a}\Zn
<\Z1S\Zb\Z0tart\Zn> building the packages or \Zr\Z4\ZbAbort\Zn
" \
0 0
EXITVAL=$?
[[ $EXITVAL == 2 ]] && dialog --aspect 5 --cr-wrap --no-shadow --colors --scrollbar --ok-label "Return" --msgbox \
"
The packages to be built are:
$(cat $TMPVARS/TDEbuilds | tr -s " " "\n"|sed 's|^|\\Z0\\Zb|;s|/|\\Zn |'|sort -k 2)
" \
0 0
[[ $EXITVAL == 0 ]] && break
[[ $EXITVAL == 1 ]] && echo -e "\n\nBuild aborted\n" && exit 1
echo
done
###################################################### ######################################################
# package(s) build starts here # package(s) build starts here
@ -547,9 +614,9 @@ checkinstall ()
## otherwise test for the libpng package only, not installed ## otherwise test for the libpng package only, not installed
{ {
{ {
[[ ${package} != libpng ]] && [[ $(ls /var/log/packages/${package}-*$(eval echo $version)-*-${build}* 2>/dev/null) ]] [[ ${package} != libpng ]] && [[ $(ls /var/log/packages/${package}-*$(eval echo $version)-*-${build}*) ]]
} || { } || {
[[ ${package} == libpng ]] && [[ $(ls $LIBPNG_TMP/${package}-$(eval echo $version)-*-${build}*.txz 2>/dev/null) ]] [[ ${package} == libpng ]] && [[ $(ls $LIBPNG_TMP/${package}-$(eval echo $version)-*-${build}*.txz) ]]
} }
} && \ } && \
## if either test is successful, the above will exit 0, then remove 'package' from the build list \ ## if either test is successful, the above will exit 0, then remove 'package' from the build list \

@ -49,6 +49,10 @@ CXX=${COMPILER_CXX} \
./configure \ ./configure \
--qtdir=$TQTDIR-${VERSION} --qtdir=$TQTDIR-${VERSION}
## configure uses the installed tqt for it's flags - if this is a re-build of this package only,
## it may pick up the wrong march/mtune flags, or none at all - use SET_march as set up in BUILD-TDE.sh
sed -i "s|-march=.*-mtune=[a-z,0-9,-]*||;s|fvisibility-inlines-hidden|& $SET_march|" Makefile
make $NUMJOBS || exit 1 make $NUMJOBS || exit 1
mkdir -p $PKG$TQTDIR-${VERSION}/plugins/crypto/ mkdir -p $PKG$TQTDIR-${VERSION}/plugins/crypto/

@ -36,6 +36,9 @@ getsource_fn
untar_fn untar_fn
## add -march and -mtune options to CFLAGS where they've been set in BUILD-TDE.sh
sed -i "s|^QMAKE_CFLAGS[^_].*$|& $SET_march|" mkspecs/linux-g++/qmake.conf
listdocs_fn listdocs_fn
chown_fn chown_fn

@ -66,8 +66,6 @@ SRCURL=${SRCURL:-"http://$TDE_MIRROR/releases/${VERSION}$TDEMIR_SUBDIR/${PRGNAM}
# Automatically determine the architecture we're building on: # Automatically determine the architecture we're building on:
MARCH=$( uname -m ) MARCH=$( uname -m )
# uname -m will give the wrong architecture if 32bit with 64bit kernel
[[ $MARCH == "x86_64" ]] && ! [[ -d /lib64 ]] && MARCH="i586"
if [ -z "$ARCH" ]; then if [ -z "$ARCH" ]; then
case "$MARCH" in case "$MARCH" in
i?86) export ARCH=i586 ;; i?86) export ARCH=i586 ;;
@ -80,10 +78,10 @@ SRCURL=${SRCURL:-"http://$TDE_MIRROR/releases/${VERSION}$TDEMIR_SUBDIR/${PRGNAM}
fi fi
# Set CFLAGS/CXXFLAGS and LIBDIRSUFFIX: # Set CFLAGS/CXXFLAGS and LIBDIRSUFFIX:
case "$ARCH" in case "$ARCH" in
i586) SLKCFLAGS="-O2 -march=i586 -mtune=i686" i586) SLKCFLAGS="-O2 ${SET_march:-}"
SLKLDFLAGS="-L$INSTALL_TDE/lib$LIBDIRSUFFIX" SLKLDFLAGS="-L$INSTALL_TDE/lib$LIBDIRSUFFIX"
;; ;;
x86_64) SLKCFLAGS="-O2 -fPIC" x86_64) SLKCFLAGS="-O2 -fPIC ${SET_march:-}"
SLKLDFLAGS="-L$INSTALL_TDE/lib$LIBDIRSUFFIX -L/usr/lib64" SLKLDFLAGS="-L$INSTALL_TDE/lib$LIBDIRSUFFIX -L/usr/lib64"
;; ;;
armv7hl) SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16" armv7hl) SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
@ -235,9 +233,9 @@ ln -sf libpng16-config libpng-config )
(cd /usr/include (cd /usr/include
ln -sf libpng16/pngconf.h pngconf.h ln -sf libpng16/pngconf.h pngconf.h
ln -sf libpng16/png.h png.h ) ln -sf libpng16/png.h png.h )
(cd /usr/lib64/pkgconfig (cd /usr/lib$LIBDIRSUFFIX/pkgconfig
ln -sf libpng16.pc libpng.pc ) ln -sf libpng16.pc libpng.pc )
(cd /usr/lib64 (cd /usr/lib$LIBDIRSUFFIX
ln -sf libpng16.so libpng.so ln -sf libpng16.so libpng.so
ln -sf libpng16.la libpng.la ) ln -sf libpng16.la libpng.la )
} }

Loading…
Cancel
Save