diff options
Diffstat (limited to 'graphics/renderdoc/renderdoc.SlackBuild')
-rw-r--r-- | graphics/renderdoc/renderdoc.SlackBuild | 38 |
1 files changed, 30 insertions, 8 deletions
diff --git a/graphics/renderdoc/renderdoc.SlackBuild b/graphics/renderdoc/renderdoc.SlackBuild index 660ade67b2..bc9003d37b 100644 --- a/graphics/renderdoc/renderdoc.SlackBuild +++ b/graphics/renderdoc/renderdoc.SlackBuild @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for renderdoc @@ -22,10 +22,13 @@ # 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=renderdoc -VERSION=${VERSION:-1.10} +VERSION=${VERSION:-1.11} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -35,7 +38,14 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +# If the variable PRINT_PACKAGE_NAME is set, then this script will report what +# the name of the created package would be, and then exit. This information +# could be useful to other scripts. +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} @@ -64,7 +74,14 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -if pkg-config --exists python3 && pkg-config --exists Qt5Core; then +if [ "${DEBUG:=0}" != 0 ]; then + RELEASE=Debug + SLKCFLAGS="$(printf %s "$SLKCFLAGS" | sed 's/-O2/-O0/')" +else + RELEASE=Release +fi + +if [ "${QT:-yes}" = yes ] && pkg-config --exists Qt5Core python3; then GUI=ON else GUI=OFF @@ -89,13 +106,18 @@ cd build -DBUILD_VERSION_STABLE=ON \ -DBUILD_VERSION_DIST_NAME=slackware \ -DBUILD_VERSION_DIST_CONTACT='https://lists.slackbuilds.org/' \ - -DCMAKE_BUILD_TYPE=Release .. + -DCMAKE_BUILD_TYPE=$RELEASE .. make make install DESTDIR=$PKG cd .. -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 +# renderdoc explicity depends on CMAKE_INSTALL_RPATH +# -DCMAKE_SKIP_RPATH=TRUE \ + +if [ "$DEBUG" = 0 ]; then + 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 +fi mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild @@ -105,4 +127,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE |