cmake: fix cross
This commit is contained in:
parent
1d22ff8c45
commit
f08570a296
1 changed files with 32 additions and 23 deletions
|
@ -1,50 +1,59 @@
|
|||
pkgver=3.19.2
|
||||
pkgver=3.23.1
|
||||
pkgname=cmake
|
||||
pkgrel=1
|
||||
mkdeps="samu"
|
||||
mkdeps="samurai"
|
||||
deps=""
|
||||
bad=""
|
||||
ext=""
|
||||
|
||||
fetch() {
|
||||
curl "https://cmake.org/files/v3.19/cmake-3.19.2.tar.gz" -o $pkgname-$pkgver.tar.gz
|
||||
curl "https://cmake.org/files/v3.23/cmake-$pkgver.tar.gz" -o $pkgname-$pkgver.tar.gz
|
||||
tar -xf $pkgname-$pkgver.tar.gz
|
||||
}
|
||||
|
||||
build() {
|
||||
cd $pkgname-$pkgver
|
||||
./bootstrap \
|
||||
--prefix=/usr \
|
||||
--mandir=/share/man \
|
||||
--datadir=/share/$pkgname \
|
||||
--docdir=/share/doc/$pkgname \
|
||||
--generator=Ninja \
|
||||
--no-system-libs
|
||||
if [ -z "$WITH_CROSS" ]; then
|
||||
./bootstrap \
|
||||
--prefix=/usr \
|
||||
--mandir=/share/man \
|
||||
--datadir=/share/$pkgname \
|
||||
--docdir=/share/doc/$pkgname \
|
||||
--generator=Ninja \
|
||||
--no-system-libs
|
||||
else
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake -G Ninja .. \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_SYSTEM_NAME=Linux \
|
||||
-DCMAKE_SYSROOT=$WITH_CROSS_DIR \
|
||||
-DCMAKE_C_COMPILER_TARGET=$TRIPLE \
|
||||
-DCMAKE_CXX_COMPILER_TARGET=$TRIPLE \
|
||||
-DCMAKE_ASM_COMPILER_TARGET=$TRIPLE \
|
||||
-DHAVE_POLL_FINE_EXITCODE=OFF \
|
||||
-DHAVE_POLL_FINE_EXITCODE__TRYRUN_OUTPUT=OFF \
|
||||
-DCMAKE_PREFIX_PATH=$WITH_CROSS_DIR \
|
||||
-DBUILD_CursesDialog=OFF
|
||||
fi
|
||||
|
||||
samu
|
||||
}
|
||||
|
||||
package() {
|
||||
cd $pkgname-$pkgver
|
||||
if [ ! -z "$WITH_CROSS" ]; then
|
||||
cd build
|
||||
fi
|
||||
DESTDIR=$pkgdir samu install
|
||||
|
||||
}
|
||||
|
||||
package_doc() {
|
||||
cd $pkgname-$pkgver
|
||||
DESDIR=$pkgdir samu install
|
||||
rm -r $pkgdir/usr/bin
|
||||
rm -r $pkgdir/usr/share/info
|
||||
rm -r $pkgdir/usr/include
|
||||
}
|
||||
package_dev() {
|
||||
cd $pkgname-$pkgver
|
||||
DESTDIR=$pkgdir samu install
|
||||
rm -r $pkgdir/usr/bin
|
||||
rm -r $pkgdir/usr/share
|
||||
backup() {
|
||||
return
|
||||
}
|
||||
|
||||
license() {
|
||||
cd $pkgname-$pkgver
|
||||
cat COPYING
|
||||
cat Copyright.txt
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue