development/cmake-202x: Added (cross-platform, FOSS make system)

Signed-off-by: Dave Woodfall <dave@slackbuilds.org>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
B. Watson 2020-09-18 19:44:31 +01:00 committed by Willy Sudiarto Raharjo
parent ad12611654
commit c8894756c3
No known key found for this signature in database
GPG key ID: 3F617144D7238786
5 changed files with 194 additions and 0 deletions

View file

@ -0,0 +1,14 @@
cmake-202x (cross-platform, open-source make system)
CMake is used to control the software process using simple platform
and compiler independent configuration files. CMake generates
native makefiles and workspaces that can be used in the
compiler environment of your choice.
This version of cmake is much newer than the version included in
Slackware 14.2. It installs to /opt, so it won't conflict with the
OS-provided cmake package.
See README_SBo.txt for directions on using this version of cmake with
your own SlackBuild scripts, or to develop/maintain software that
needs a newer cmake.

View file

@ -0,0 +1,34 @@
The main purpose for cmake-202x is to allow SlackBuild scripts to
build software that needs a cmake newer than the version that ships
with Slackware 14.2.
If you're writing a new SlackBuild or updating an old one, and you're
using cmake.template, but you get an error complaining that CMake is
too old, here's how to use this:
1. Change the "cmake" command in your SlackBuild to
/opt/cmake-202x/bin/cmake. In context, it will look like:
mkdir -p build
cd build
/opt/cmake-202x/bin/cmake \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
...etc, etc.
2. Add cmake-202x to the REQUIRES in your .info file.
That's it. Your SlackBuild shouldn't need any other changes. If you
want to look at a complete SlackBuild script that uses cmake-202x,
see academic/bibletime.
Note: If you're using cmake interactively (developing software outside
the context of SlackBuild scripts), there are a couple of things you
might want to add to your .bash_profile to make things smoother:
export PATH=/opt/cmake-202x/bin:$PATH
export MANPATH=/opt/cmake-202x/man:$MANPATH
Then when you type "cmake", you'll get the new version. Also "man
cmake" will show the man page for the new version. You *don't* need
this stuff in a SlackBuild script!

View file

@ -0,0 +1,115 @@
#!/bin/sh
############################################################
# NOTE: Remove this from the repo when 15.0 ships! #
# Also remove cmake-202x from REQUIRES in all .info files! #
############################################################
# Slackware build script for cmake-202x
# Written by B. Watson (yalhcru@gmail.com)
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
# This build exists because the cmake in Slackware 14.2 is too old,
# and can't be upgraded. This installs cmake under /opt, where it
# won't conflict with anything. README explains how to use it in your
# SlackBuild.
# cmake.manpages.tar.lz comes from Slackware, courtesy of Pat V. Since
# it's from -current (therefore subject to change), I mirrored the
# version I'm using on slackware.uk.
PRGNAM=cmake-202x
SRCNAM=cmake
VERSION=${VERSION:-3.18.2}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $SRCNAM-$VERSION
tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
cd $SRCNAM-$VERSION
chown -R root:root .
find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
PREFIX=${PREFIX:-/opt/$PRGNAM}
PKGPREFIX=$PKG/$PREFIX
# The --system-* and --no-system-* stuff is intended to use system
# versions of libraries that ship with core Slackware, and bundled
# (non-system) libs for everything that isn't in core, *even* if
# it's available on SBo. This will prevent SBo upgrades from randomly
# breaking things.
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./bootstrap \
--system-curl \
--system-expat \
--no-system-jsoncpp \
--system-zlib \
--system-bzip2 \
--system-liblzma \
--no-system-nghttp2 \
--no-system-zstd \
--system-libarchive \
--no-system-librhash \
--no-system-libuv \
--prefix=$PREFIX
make
make install/strip DESTDIR=$PKG
# To avoid a dependency on Sphinx (which has *26 dependencies* of its own),
# use Pat's prebuilt man pages.
tar xvf $CWD/cmake.manpages.tar.lz
mv usr/man $PKGPREFIX/man
gzip -9 $PKGPREFIX/man/man?/*.?
# Nothing in the doc dir but licenses. Move it to where users expect
# to find it.
mkdir -p $PKG/usr/doc
mv $PKGPREFIX/doc/$SRCNAM-* $PKG/usr/doc/$PRGNAM-$VERSION
rm -rf $PKGPREFIX/doc
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
cat $CWD/README_SBo.txt > $PKG/usr/doc/$PRGNAM-$VERSION/README_SBo.txt
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}

View file

@ -0,0 +1,12 @@
PRGNAM="cmake-202x"
VERSION="3.18.2"
HOMEPAGE="https://cmake.org/"
DOWNLOAD="https://github.com/Kitware/CMake/releases/download/v3.18.2/cmake-3.18.2.tar.gz \
https://slackware.uk/~urchlay/src/cmake.manpages.tar.lz"
MD5SUM="7a882b3764f42981705286ac9daa29c2 \
e8cbd51242f456eaaa48d68993afd723"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
MAINTAINER="B. Watson"
EMAIL="yalhcru@gmail.com"

View file

@ -0,0 +1,19 @@
# 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------------------------------------------------------|
cmake-202x: cmake-202x (cross-platform, open-source make system)
cmake-202x:
cmake-202x: CMake is used to control the software process using simple platform
cmake-202x: and compiler independent configuration files. CMake generates
cmake-202x: native makefiles and workspaces that can be used in the
cmake-202x: compiler environment of your choice.
cmake-202x:
cmake-202x: This version of cmake is much newer than the version included in
cmake-202x: Slackware 14.2. It installs to /opt, so it won't conflict with the
cmake-202x: OS-provided cmake package.
cmake-202x: