mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-03 08:57:14 +08:00
cmake: moved to platform and rebuild with bootstrap enabled to fix bug report #158
This commit is contained in:
parent
b1353ca9a6
commit
8317358f86
52
cmake/PKGBUILD
Normal file
52
cmake/PKGBUILD
Normal file
@ -0,0 +1,52 @@
|
||||
# maintainer: Neophytos Kolokotronis <tetris4ATgmailDOTcom>
|
||||
|
||||
pkgname=cmake
|
||||
pkgver=2.8.12.1
|
||||
pkgrel=2
|
||||
pkgdesc="A cross-platform open-source make system"
|
||||
arch=('x86_64')
|
||||
license=('custom')
|
||||
url="http://www.cmake.org"
|
||||
depends=('curl' 'libarchive>=2.3.1' 'shared-mime-info')
|
||||
makedepends=('qt' 'cmake')
|
||||
install=${pkgname}.install
|
||||
source=("http://www.cmake.org/files/v2.8/${pkgname}-${pkgver}.tar.gz"
|
||||
"findfreetype.patch")
|
||||
sha1sums=('5661a607acbce7c16bb5f15ff2895fa5ca53a4da'
|
||||
'6976bb5d6e54931b360a79e74f1425354f01d1fb')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}"/${pkgname}-${pkgver}
|
||||
patch -Np1 < ${srcdir}/findfreetype.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "${srcdir}"/${pkgname}-${pkgver}
|
||||
|
||||
# cmake -DBUILD_QtDialog=ON \
|
||||
# -DCMAKE_INSTALL_PREFIX=/usr \
|
||||
# -DCMAKE_USE_SYSTEM_LIBRARIES=ON \
|
||||
# .
|
||||
|
||||
# below version is for boostrapping cmake;
|
||||
# one can use it to break the recursive makedependency
|
||||
./bootstrap --prefix=/usr \
|
||||
--mandir=/share/man \
|
||||
--docdir=/share/doc/cmake \
|
||||
--system-libs \
|
||||
--qt-gui \
|
||||
--parallel=$(/usr/bin/getconf _NPROCESSORS_ONLN)
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}"/${pkgname}-${pkgver}
|
||||
make DESTDIR="${pkgdir}" install
|
||||
|
||||
vimpath="$pkgdir/usr/share/vim/vimfiles"
|
||||
install -Dm644 Docs/cmake-indent.vim ${vimpath}/indent/cmake-indent.vim
|
||||
install -Dm644 Docs/cmake-syntax.vim ${vimpath}/syntax/cmake-syntax.vim
|
||||
install -Dm644 Docs/cmake-mode.el ${pkgdir}/usr/share/emacs/site-lisp/cmake-mode.el
|
||||
|
||||
install -Dm644 Copyright.txt ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
|
||||
}
|
12
cmake/add_extra_prefix_to_find_paths.patch
Normal file
12
cmake/add_extra_prefix_to_find_paths.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -Naur cmake-2.8.10.2-orig/Modules/FindGTK2.cmake cmake-2.8.10.2/Modules/FindGTK2.cmake
|
||||
--- cmake-2.8.10.2-orig/Modules/FindGTK2.cmake 2012-11-27 14:26:32.000000000 +0100
|
||||
+++ cmake-2.8.10.2/Modules/FindGTK2.cmake 2013-10-06 10:38:08.368594779 +0200
|
||||
@@ -218,6 +218,8 @@
|
||||
/usr/pkg/include/glib
|
||||
$ENV{GTKMM_BASEPATH}/include
|
||||
$ENV{GTKMM_BASEPATH}/lib
|
||||
+ /extra/usr/include
|
||||
+ /extra/usr/lib
|
||||
[HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path]/include
|
||||
[HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path]/lib
|
||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path]/include
|
12
cmake/cmake.install
Normal file
12
cmake/cmake.install
Normal file
@ -0,0 +1,12 @@
|
||||
post_install() {
|
||||
update-mime-database usr/share/mime &> /dev/null
|
||||
[[ -x usr/bin/update-desktop-database ]] && update-desktop-database -q || true
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
post_install
|
||||
}
|
||||
|
||||
post_remove() {
|
||||
post_install
|
||||
}
|
26
cmake/findfreetype.patch
Normal file
26
cmake/findfreetype.patch
Normal file
@ -0,0 +1,26 @@
|
||||
diff --git a/Modules/FindFreetype.cmake b/Modules/FindFreetype.cmake
|
||||
index 179dc00..0f5a2b4 100644
|
||||
--- a/Modules/FindFreetype.cmake
|
||||
+++ b/Modules/FindFreetype.cmake
|
||||
@@ -62,10 +62,10 @@ find_path(FREETYPE_INCLUDE_DIR_ft2build ft2build.h
|
||||
ENV GTKMM_BASEPATH
|
||||
[HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path]
|
||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path]
|
||||
- PATH_SUFFIXES include/freetype2 include
|
||||
+ PATH_SUFFIXES include/freetype2 include/freetype include
|
||||
)
|
||||
|
||||
-find_path(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
|
||||
+find_path(FREETYPE_INCLUDE_DIR_freetype2 config/ftheader.h
|
||||
HINTS
|
||||
ENV FREETYPE_DIR
|
||||
PATHS
|
||||
@@ -76,7 +76,7 @@ find_path(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
|
||||
ENV GTKMM_BASEPATH
|
||||
[HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path]
|
||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path]
|
||||
- PATH_SUFFIXES include/freetype2 include
|
||||
+ PATH_SUFFIXES include/freetype2 include/freetype include include/freetype2/freetype
|
||||
)
|
||||
|
||||
find_library(FREETYPE_LIBRARY
|
Loading…
Reference in New Issue
Block a user