#!/bin/bash # # qwt.SlackBuild is free software; you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or any later version. # # qwt.SlackBuild is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # this program; if not, write to the Free Software Foundation, Inc., 59 Temple # Place - Suite 330, Boston, MA 02111-1307, USA # # default settings PACKAGE="qwt" PACKAGE_EXT="bz2" VERSION=${VERSION:=6.2.0} BUILD=${BUILD:=1} if [ -f ~/.slackbuildrc ]; then . ~/.slackbuildrc elif [ -f ../../runtime/slackbuildrc ]; then . ../../runtime/slackbuildrc elif [ -f ../../source/runtime/slackbuildrc ]; then . ../../source/runtime/slackbuildrc fi check_required SRC="$PACKAGE-$VERSION.tar.$PACKAGE_EXT" URL="https://downloads.sourceforge.net/qwt/${SRC}" get_source $SRC $URL unpack_source $SRC $PACKAGE-$VERSION sed -e '/^\s*QWT_INSTALL_PREFIX/ s|=.*|= /usr|' \ -e '/^QWT_INSTALL_DOCS/ s|/doc|/doc/qwt-$${VERSION}|' \ -e '/^QWT_INSTALL_HEADERS/ s|include|&/qwt|' \ -e '/^QWT_INSTALL_LIBS/ s|lib|lib$${LIBDIRSUFFIX}|' \ -e '/^QWT_INSTALL_PLUGINS/ s|plugins/designer|lib$${LIBDIRSUFFIX}/qt5/&|' \ -e '/^QWT_INSTALL_FEATURES/ s|features|lib$${LIBDIRSUFFIX}/qt5/mkspecs/&|' \ -i qwtconfig.pri # Disable building examples sed -i '/^QWT_CONFIG.*QwtExamples/s,^,#,' qwtconfig.pri mkdir -p build cd build qmake-qt5 .. LIBDIRSUFFIX=$LIBDIRSUFFIX VERSION=$VERSION make ${NUMJOBS} make install INSTALL_ROOT=$PKG cd .. #cd build # qmake-qt5 .. LIBDIRSUFFIX=$LIBDIRSUFFIX # make -j ${NUMJOBS} CFLAGS+="$SLKCFLAGS" CXXFLAGS+="$SLKCFLAGS -std=c++11 -fPIC" # make install INSTALL_ROOT=$PKG #cd .. # Rationalise the pkgconfig default filenames ( cd $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig [ -f qwt.pc ] && ln -s qwt.pc Qwt6.pc [ -f Qt5Qwt6.pc ] && ln -s Qt5Qwt6.pc qwt-qt5.pc ) mv $PKG/usr/doc/qwt-$VERSION/man $PKG/usr rm -f $PKG/usr/man/man3/_tmp* mkdir -p $DOCS/examples cp -a examples/* $DOCS/examples/ cp -a CHANGES* COPYING README $DOCS fixup_package $PKG # Clean up the extra stuff: set +u if [ "$1" = "--cleanup" ]; then rm -rf $TMP/$PACKAGE-$VERSION rm -rf $PKG fi