diff options
author | Giancarlo Dessi <slack@giand.it> | 2023-08-05 10:52:05 +0900 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2023-08-05 10:08:52 +0700 |
commit | cbfe8c5b2aedf29122cc9f28ffbb128e30722e89 (patch) | |
tree | 2446bd818d53654358d32521aa85994b92bc13b7 /libraries | |
parent | a6fc27609177784f122886d00c1a1c7dd62331ea (diff) |
libraries/CGAL5: Added (Computational Geometry Algorithms Library).
Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'libraries')
-rw-r--r-- | libraries/CGAL5/CGAL5.SlackBuild | 119 | ||||
-rw-r--r-- | libraries/CGAL5/CGAL5.info | 10 | ||||
-rw-r--r-- | libraries/CGAL5/README | 17 | ||||
-rw-r--r-- | libraries/CGAL5/slack-desc | 19 |
4 files changed, 165 insertions, 0 deletions
diff --git a/libraries/CGAL5/CGAL5.SlackBuild b/libraries/CGAL5/CGAL5.SlackBuild new file mode 100644 index 0000000000000..089093d3e3ea8 --- /dev/null +++ b/libraries/CGAL5/CGAL5.SlackBuild @@ -0,0 +1,119 @@ +#!/bin/bash + +# Slackware build script for CGAL5 + +# Copyright 2023 Giancarlo Dessi, Cagliari, IT +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS 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 AUTHOR 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. + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=CGAL5 +VERSION=${VERSION:-5.6} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} +SRCNAM=cgal + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i586" ]; then + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + LIBDIRSUFFIX="64" +else + LIBDIRSUFFIX="" +fi + +set -e + +# CGAL5 cannot coexist with the CGAL package based on versions earlier +# than 5.0, so we need to detect if there are any incompatible installations +# in the system +if [[ -f /usr/lib${LIBDIRSUFFIX}/libCGAL.so ]] ; then + echo "************************* WARNING **************************"; + echo " CGAL package based on version earlier than 5.0 found in "; + echo " your system! CGAL is incompatible with CGAL5 and you must "; + echo " uninstall it before installing CGAL5. "; + echo " If the software already installed in your system depends "; + echo " on CGAL 4.x you should not need CGAL5 since it is required "; + echo " by other packages that depends on version greater than 4.x "; + echo " This script will be stopped. "; + echo "************************************************************"; + exit 1; +fi + +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 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +mkdir -p build +cd build + cmake \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_BUILD_TYPE=Release .. + make + make install/strip DESTDIR=$PKG +cd .. + +mv $PKG/usr/share/man $PKG/usr + +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $(find $PKG/usr/man -type l) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +mv $PKG/usr/share/doc/CGAL/* $PKG/usr/doc/$PRGNAM-$VERSION +rm -rf $PKG/usr/share +cp -a README.md copyright $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +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 diff --git a/libraries/CGAL5/CGAL5.info b/libraries/CGAL5/CGAL5.info new file mode 100644 index 0000000000000..f4c87597dad3b --- /dev/null +++ b/libraries/CGAL5/CGAL5.info @@ -0,0 +1,10 @@ +PRGNAM="CGAL5" +VERSION="5.6" +HOMEPAGE="https://www.cgal.org/" +DOWNLOAD="https://github.com/CGAL/cgal/archive/v5.6/cgal-5.6.tar.gz" +MD5SUM="f55aef6e75331106dc1e4afb4bae8b10" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Giancarlo Dessi" +EMAIL="slack@giand.it" diff --git a/libraries/CGAL5/README b/libraries/CGAL5/README new file mode 100644 index 0000000000000..879627829a4a4 --- /dev/null +++ b/libraries/CGAL5/README @@ -0,0 +1,17 @@ +The Computational Geometry Algorithms Library (CGAL) provides +efficient and reliable geometric algorithms in the form of a C++ +library. CGAL is used in various areas needing geometric computation, +such as computer graphics, scientific visualization, computer aided +design and modelling, geographic information systems, molecular +biology, medical imaging, robotics and motion planning, mesh generation +and numerical methods. + +Since version 5.0, GGAL is a header-only library and does not need to +be compiled. This package contains a version greater than 4.x, required +by some packages (for example SFCGAL version 1.4.x). It conflicts with +versions earlier than 5.0, hence CGAL5 is an alternative that cannot +coexist with the package CGAL also available in this repository. + +Packages that depend on CGAL may be incompatible with CGAL5 and vice +versa. Please make sure which package you really need, depending on the +software installed or to be installed on your system. diff --git a/libraries/CGAL5/slack-desc b/libraries/CGAL5/slack-desc new file mode 100644 index 0000000000000..110b97296755c --- /dev/null +++ b/libraries/CGAL5/slack-desc @@ -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 ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +CGAL5: CGAL5 (Computational Geometry Algorithms Library) +CGAL5: +CGAL5: CGAL is a C++ library of efficient and reliable geometric algorithms. +CGAL5: +CGAL5: This package contains a version greater than 4.x: since version 5.0, +CGAL5: CGAL is a header-only library. +CGAL5: +CGAL5: +CGAL5: Homepage: http://www.cgal.org/ +CGAL5: +CGAL5: |