mirror of
https://github.com/dslm4515/BMLFS.git
synced 2025-08-13 14:24:02 +00:00
89 lines
2.9 KiB
Bash
89 lines
2.9 KiB
Bash
#! /bin/bash
|
|
|
|
# CMake
|
|
# Source: https://cmake.org/files/v4.0/cmake-4.0.3.tar.gz
|
|
#
|
|
# $BUILD = Directory to temporarily install
|
|
# $PKGS = Directory to store built package
|
|
#
|
|
# DEPS
|
|
# Required: libuv jsoncpp
|
|
# Recommended: cURL, libarchive, and nghttp2
|
|
# Optional: git, QT5, subversion, rhash, sphinx
|
|
# LTO: tested with LLVM
|
|
|
|
# If optimizing, use these flags
|
|
export CFLAGS="-march=native -mtune=native -pipe "
|
|
export CFLAGS+="-O3 -ffat-lto-objects -flto=auto "
|
|
export CXXFLAGS=$CFLAGS
|
|
export LDFLAGS="-flto=auto -Wl,-O2 -Wl,--as-needed "
|
|
|
|
export PVER="4.0.3"
|
|
|
|
sed -i '/"lib64"/s/64//' Modules/GNUInstallDirs.cmake
|
|
|
|
./bootstrap --prefix=/usr \
|
|
--system-libs \
|
|
--mandir=/share/man \
|
|
--no-system-jsoncpp \
|
|
--no-system-librhash \
|
|
--no-system-cppdap \
|
|
--docdir=/share/doc/cmake-$PVER &&
|
|
|
|
read -p "Compile? " && make -j4 &&
|
|
|
|
# if not using a package manager:
|
|
# make install
|
|
|
|
# if using pkgtools from Slackware, then:
|
|
sudo -S make DESTDIR=$BUILD install &&
|
|
sudo -S mkdir -pv /BMAN/install
|
|
sudo -S mkdir -pv /BMAN/usr/share
|
|
sudo -S mv $BUILD/usr/share/doc /BMAN/usr/share/
|
|
|
|
cd $BUILD && sudo mkdir -v install &&
|
|
cat > /tmp/slack-desc << "EOF"
|
|
# 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: CMake (cross-platform, open-source make system)
|
|
cmake:
|
|
cmake: CMake is used to control the software process using simple platform
|
|
cmake: and compiler independent configuration files. CMake generates
|
|
cmake: native makefiles and workspaces that can be used in the
|
|
cmake: compiler environment of your choice.
|
|
cmake:
|
|
cmake: CMake's home on the web is: http://www.cmake.org
|
|
cmake:
|
|
cmake:
|
|
cmake:
|
|
EOF
|
|
sudo mv /tmp/slack-desc install/ &&
|
|
|
|
read -p "Enter to build package" &&
|
|
sudo makepkg -l y -c n $PKGS/cmake-$PVER-$PSUFFIX &&
|
|
cd /BMAN
|
|
cat > /tmp/slack-desc << "EOF"
|
|
cmake-doc: Manuals for CMake (cross-platform, open-source make system)
|
|
cmake-doc:
|
|
cmake-doc: CMake is used to control the software process using simple platform
|
|
cmake-doc: and compiler independent configuration files. CMake generates
|
|
cmake-doc: native makefiles and workspaces that can be used in the
|
|
cmake-doc: compiler environment of your choice.
|
|
cmake-doc:
|
|
cmake-doc: CMake's home on the web is: http://www.cmake.org
|
|
cmake-doc:
|
|
cmake-doc:
|
|
EOF
|
|
sudo mv /tmp/slack-desc install/
|
|
sudo makepkg -l y -c n $PKGS/cmake-doc-$PVER-$NOPSUFFIX
|
|
|
|
sudo rm -rf /BMAN/*
|
|
sudo rm -rf $BUILD/*
|
|
unset PVER
|