Page 1 of 1

SLKBUILD cmake Template

Posted: 6. Feb 2023, 13:32
by laprjns
I believe that there is a typo in the cmake SLKBUILD template, see below. Also, there appear to be no sources for slkbuild in the 15.0 source repository,

[Beginning of snippet from cmake SLKBUILD]
# to see available flags.
cmake \
-DCMAKE_C_FLAGS:STRING="$CFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$CXXFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DLIB_SUFFIX=${LIBDIRSUFFIX} \
-DMAN_INSTALL_DIR=/usr/man \
-DCMAKE_BUILD_TYPE=Release \
.. <==== Typo Here??
make -j $numjobs || return 1
make install DESTDIR=$startdir/pkg

cd ..
[end snippit of cmake SLKBUILD]

Re: SLKBUILD cmake Template

Posted: 6. Feb 2023, 13:54
by DidierSpaier
Hi,

assuming you are speaking of https://github.com/gapan/slkbuild/blob/ ... UILD.cmake there is no typo. You run the cmake command from the 'build' sub-directory of $startdir/src/$pkgname-$pkgver but its target is $startdir/src/$pkgname-$pkgver whose relative path is ".." from $startdir/src/$pkgname-$pkgver/build.

Re: SLKBUILD cmake Template

Posted: 7. Feb 2023, 11:15
by laprjns
DidierSpaier wrote: 6. Feb 2023, 13:54 You run the cmake command from the 'build' sub-directory of $startdir/src/$pkgname-$pkgver but its target is $startdir/src/$pkgname-$pkgver whose relative path is ".." from $startdir/src/$pkgname-$pkgver/build.
Ok, thanks. That explains why my build fails.

Re: SLKBUILD cmake Template

Posted: 8. Feb 2023, 10:04
by gapan
Yes, you need this part that comes before the cmake command:

Code: Select all

        mkdir -p build
        cd build
I just added the missing source files in the source repo. No idea why they were missing. You should find them as soon as mirrors sync.