2009-08-26 17:00:38 +02:00
|
|
|
# Set default version/arch/build. You can override these settings
|
|
|
|
# in the SlackBuild scripts for each package (koffice, for example,
|
|
|
|
# usually has a different version number), or by setting your own
|
|
|
|
# environment variables.
|
|
|
|
|
2016-06-30 22:26:57 +02:00
|
|
|
[ -z $VERSION ] && export VERSION=4.14.3
|
2009-08-26 17:00:38 +02:00
|
|
|
[ -z $BUILD ] && export BUILD=1
|
|
|
|
|
2010-05-19 10:58:23 +02:00
|
|
|
# Automatically determine the architecture we're building on:
|
2012-09-26 03:10:42 +02:00
|
|
|
MARCH=$( uname -m )
|
2010-05-19 10:58:23 +02:00
|
|
|
if [ -z "$ARCH" ]; then
|
2012-09-26 03:10:42 +02:00
|
|
|
case "$MARCH" in
|
2016-06-30 22:26:57 +02:00
|
|
|
i?86) export ARCH=i586 ;;
|
2012-09-26 03:10:42 +02:00
|
|
|
armv7hl) export ARCH=$MARCH ;;
|
|
|
|
arm*) export ARCH=arm ;;
|
2010-05-19 10:58:23 +02:00
|
|
|
# Unless $ARCH is already set, use uname -m for all other archs:
|
2012-09-26 03:10:42 +02:00
|
|
|
*) export ARCH=$MARCH ;;
|
2010-05-19 10:58:23 +02:00
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
2012-09-26 03:10:42 +02:00
|
|
|
[ -z $PKGARCH ] && export PKGARCH=$ARCH
|
|
|
|
|
2009-08-26 17:00:38 +02:00
|
|
|
# Use this as CFLAGS and CXXFLAGS:
|
|
|
|
if [ -z "$SLKCFLAGS" ]; then
|
2016-06-30 22:26:57 +02:00
|
|
|
if [ "$ARCH" = "i586" ]; then
|
2018-05-28 21:12:29 +02:00
|
|
|
export SLKCFLAGS="-O2 -march=i586 -mtune=i686 -fpermissive -fno-delete-null-pointer-checks"
|
2009-08-26 17:00:38 +02:00
|
|
|
export LIBDIRSUFFIX=""
|
|
|
|
elif [ "$ARCH" = "s390" ]; then
|
2018-05-28 21:12:29 +02:00
|
|
|
export SLKCFLAGS="-O2 -fpermissive -fno-delete-null-pointer-checks"
|
2009-08-26 17:00:38 +02:00
|
|
|
export LIBDIRSUFFIX=""
|
|
|
|
elif [ "$ARCH" = "x86_64" ]; then
|
2018-05-28 21:12:29 +02:00
|
|
|
export SLKCFLAGS="-O2 -fPIC -fpermissive -fno-delete-null-pointer-checks"
|
2009-08-26 17:00:38 +02:00
|
|
|
export LIBDIRSUFFIX="64"
|
|
|
|
elif [ "$ARCH" = "arm" ]; then
|
2018-05-28 21:12:29 +02:00
|
|
|
export SLKCFLAGS="-O2 -march=armv4 -mtune=xscale -fpermissive -fno-delete-null-pointer-checks"
|
2009-08-26 17:00:38 +02:00
|
|
|
export LIBDIRSUFFIX=""
|
|
|
|
elif [ "$ARCH" = "armel" ]; then
|
2018-05-28 21:12:29 +02:00
|
|
|
export SLKCFLAGS="-O2 -march=armv4t -fpermissive -fno-delete-null-pointer-checks"
|
2009-08-26 17:00:38 +02:00
|
|
|
export LIBDIRSUFFIX=""
|
2012-09-26 03:10:42 +02:00
|
|
|
elif [ "$ARCH" = "armv7hl" ]; then
|
2018-05-28 21:12:29 +02:00
|
|
|
export SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16 -fpermissive -fno-delete-null-pointer-checks"
|
2012-09-26 03:10:42 +02:00
|
|
|
export LIBDIRSUFFIX=""
|
2010-05-19 10:58:23 +02:00
|
|
|
else
|
2018-05-28 21:12:29 +02:00
|
|
|
export SLKCFLAGS="-O2 -fpermissive -fno-delete-null-pointer-checks"
|
2010-05-19 10:58:23 +02:00
|
|
|
export LIBDIRSUFFIX=""
|
2009-08-26 17:00:38 +02:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Use this to set the number of parallel make jobs:
|
|
|
|
if [ -z "$NUMJOBS" ]; then
|
|
|
|
export NUMJOBS="-j7"
|
|
|
|
fi
|
|
|
|
|
2010-05-19 10:58:23 +02:00
|
|
|
# Additional cmake flags that are spanned across the KDE modules
|
|
|
|
# Do not use "final build" unless we build an actual release.
|
|
|
|
#export KDE_OPT_ARGS=" -DKDE4_ENABLE_FINAL=\"ON\" -DSITE=\"slackware.com\" "
|
2013-11-04 18:08:47 +01:00
|
|
|
export KDE_OPT_ARGS=" -DKDE4_BUILD_TESTS=OFF -DSITE=\"slackware.com\" -DKDE_DISTRIBUTION_TEXT=\"volkerdi@slackware.com\" "
|
2010-05-19 10:58:23 +02:00
|
|
|
|