LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 01-13-2010, 07:33 PM   #1
Alexvader
Member
 
Registered: Oct 2009
Location: Japan
Distribution: Arch, Debian, Slackware
Posts: 994

Rep: Reputation: 94
How do I hack a slackbuild of a cmake project to comply with Slackware64...?


Hi Forum...

There is this slackbuild in which I have changed the part in bold...

Code:
#!/bin/sh
# Packager GioPower, luca.gio.85~at~gmail~dot~com
# VTK (Visualization Toolkit)
#
# The Visualization Toolkit (VTK) is an open-source, freely available
# software system for 3D computer graphics, image provessing and
# visualization.
#
# Web site: www.vtk.org
#


# Cmake flags
SHARED=ON
EXAMPLES=OFF

DO_STRIP=true

MAKE_FLAGS=-j5
# multithreading: may use -j3 for dual-core or -j5 for quad-core (or more ;))


CWD=`pwd`
TMP=${TMP:-/tmp/tgz}
NAME=vtk
MAJ_VERSION=5.4
VERSION=$MAJ_VERSION.2
ARCH=${ARCH:-x86_64}
BUILD=2gp
PKG=$TMP/package-$NAME
DESTDIR=$PKG/usr
rm -rf $PKG
mkdir -p $PKG
mkdir -p $DESTDIR


if [ "$ARCH" = "i486" ]; then
  SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
  SLKCFLAGS="-O2 -march=i686 -mtune=i686"
elif [ "$ARCH" = x86_64 ]; then
  SLKCFLAGS="-O2 -fPIC"
fi

SOURCE=http://www.vtk.org/files/release/$MAJ_VERSION/$NAME-$VERSION.tar.gz

if [ ! -e $NAME-$VERSION.tar.gz ]; then
wget -c $SOURCE
fi

cd $TMP
rm -rf $NAME-$VERSION
tar xzvf $CWD/$NAME-$VERSION.tar.gz || exit 1
mv VTK $NAME-$MAJ_VERSION
cd $NAME-$MAJ_VERSION
chown -R root:root .

#configure and build
cmake -D BUILD_TESTING=OFF \
      -D BUILD_EXAMPLES=$EXAMPLES \
      -D BUILD_SHARED_LIBS=$SHARED \
      -D CMAKE_INSTALL_PREFIX=$DESTDIR \
      -D CMAKE_CXX_FLAGS="$SLKCFLAGS" \
      -D CMAKE_C_FLAGS="$SLKCFLAGS" \
      -D VTK_USE_GUISUPPORT=ON \
      -D VTK_USE_QVTK=ON \
      -D DESIRED_QT_VERSION=4 \
      $TMP/$NAME-$MAJ_VERSION || exit 1
make $MAKE_FLAGS || exit 1
#make || exit 1
make install || exit 1

#strip
if [ $DO_STRIP ]; then
strip --strip-unneeded $DESTDIR/lib/*
strip --strip-unneeded $DESTDIR/bin/*
fi

mkdir -p $PKG/install
cat $CWD/slack-desc >$PKG/install/slack-desc
cat $CWD/doinst.sh >$PKG/install/doinst.sh
DOCDIR=$PKG/usr/doc/$NAME-$MAJ_VERSION
mkdir -p $DOCDIR
cat $CWD/slack-desc >$DOCDIR/slack-desk
cat $CWD/$NAME.SlackBuild >$DOCDIR/$NAME.SlackBuild

cd $PKG
requiredbuilder -y -v -s $CWD $PKG
makepkg -p -l y -c n $CWD/$NAME-$VERSION-$ARCH-$BUILD.txz

if [ "$1" = "--cleanup" ]; then
  rm -rf $TMP/$NAME-$MAJ_VERSION
  rm -rf $PKG
fi

This will still drop stuff into /usr/lib, which is clearly anti Slackware64... I do not know enough of cmake builds, which flag do I have to pass in the slackbuild for cmake to drop stuff in /usr/lib64...?

BRGDS

Alex
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 01-13-2010, 07:44 PM   #2
GooseYArd
Member
 
Registered: Jul 2009
Location: Reston, VA
Distribution: Slackware, Ubuntu, RHEL
Posts: 183

Rep: Reputation: 46
try VTK_INSTALL_LIB_DIR
 
1 members found this post helpful.
Old 01-14-2010, 08:27 AM   #3
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 5,395

Rep: Reputation: Disabled
Compare your cmake commandline to one that is actually used by Slackware:

Code:
mkdir -p build
cd build
  cmake \
    -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
    -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DMAN_INSTALL_DIR=/usr/man \
    -DSYSCONF_INSTALL_DIR=/etc/kde \
    -DLIB_SUFFIX=${LIBDIRSUFFIX} \
and you'll see how to get that package to install to "lib64".

Eric
 
2 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What changes must be made in a slackBuild from 11.x To build for Slackware64 current? Alexvader Slackware 5 12-30-2009 02:38 PM
Slackbuild of Scilab 5.1 fails under Slackware64 13... is this reproducible...?? Alexvader Slackware 21 11-29-2009 03:29 PM
Porting SlackBuild of Scilab from Slackware 12 to Slackware64 13 Alexvader Slackware 20 11-15-2009 10:20 PM
For the Krusader fans on slackware64 slackbuild ROXR Slackware 0 07-20-2009 07:03 PM
Kmymoney2 Slackware64 Sbo Slackbuild Error AlleyTrotter Slackware 4 07-05-2009 11:10 PM


All times are GMT -5. The time now is 11:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration