diff options
author | B. Watson <yalhcru@gmail.com> | 2022-02-25 14:24:16 -0500 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2022-02-27 01:09:46 +0700 |
commit | 2a418ad20c20653893bc8696af94883c72bf7435 (patch) | |
tree | 1b2297d2442b4ccb2a76a3d79fc782f766a7c6ac /graphics/oyranos/oyranos.SlackBuild | |
parent | 84c851c9189ea9ac5753aa3c42fee75cbb39b816 (diff) |
graphics/oyranos: Fix 15.0 build.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'graphics/oyranos/oyranos.SlackBuild')
-rw-r--r-- | graphics/oyranos/oyranos.SlackBuild | 65 |
1 files changed, 39 insertions, 26 deletions
diff --git a/graphics/oyranos/oyranos.SlackBuild b/graphics/oyranos/oyranos.SlackBuild index 2c9aa2fbde4de..cbb6a7895ea26 100644 --- a/graphics/oyranos/oyranos.SlackBuild +++ b/graphics/oyranos/oyranos.SlackBuild @@ -23,11 +23,18 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# 20220222 bkw: Modified by SlackBuilds.org, BUILD=2: +# - fix build on 15.0. +# - add qt4 dependency. +# - use cmake directly, instead of fake configure script. +# - stop trying to build one of the examples with qt5 (it fails). +# - don't build with fltk, if installed (it fails). + cd $(dirname $0) ; CWD=$(pwd) PRGNAM=oyranos VERSION=${VERSION:-0.9.6} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -39,9 +46,6 @@ if [ -z "$ARCH" ]; then esac fi -# 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 @@ -51,6 +55,8 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} +# 20220225 bkw: These flags get used, but cmake puts a "-O3" right +# after them, meaning the -O2 is ignored. Not going to fix. if [ "$ARCH" = "i586" ]; then SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" @@ -67,6 +73,8 @@ fi set -e +export PATH=/usr/lib$LIBDIRSUFFIX/qt4/bin:$PATH + rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP @@ -76,33 +84,38 @@ cd $PRGNAM-$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 \ + -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 {} \; - -CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS" \ -./configure \ - --prefix=/usr \ - --libdir=/usr/lib${LIBDIRSUFFIX} \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --mandir=/usr/man \ - --docdir=/usr/doc/$PRGNAM-$VERSION \ - --build=$ARCH-slackware-linux - -make -make install DESTDIR=$PKG - -find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+ + +# The qcmsevents tool supposedly can be built with qt5, but it +# fails (wrong qt5 version probably). Force it to use qt4. +sed -i '/FIND_PACKAGE(Qt5/d' src/tools/qcmsevents/CMakeLists.txt + +# The build fails if fltk is installed, one of the example programs +# fails to compile. So, do without it. +sed -i '/IF/s,FLTK_FOUND,FALSE,' src/examples/CMakeLists.txt + +mkdir -p build +cd build + cmake \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DLIB_SUFFIX=${LIBDIRSUFFIX} \ + -DMAN_INSTALL_DIR=/usr/man \ + -DCMAKE_BUILD_TYPE=Release .. + make VERBOSE=1 + 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 +gzip -9 $PKG/usr/man/man*/* +# 20220225 bkw: does an empty BUGS file count as a bug? or just a +# statement of extreme confidence? mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a AUTHORS.md BUGS COPYING.md README.md PACKAGING.md \ +cp -a AUTHORS.md COPYING.md README.md \ $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild |