From d206c683e44d4de5a72f90a23e4c39b184e4daa0 Mon Sep 17 00:00:00 2001 From: Lucio Andrés Illanes Albornoz (arab, vxp) Date: Nov 16 2016 12:07:42 +0000 Subject: cmake: adds CMake v3.6.3 (via midipix.) --- diff --git a/vars/build.vars b/vars/build.vars index f7dbf3f..734b8b7 100644 --- a/vars/build.vars +++ b/vars/build.vars @@ -401,10 +401,10 @@ LEAF_PACKAGES_CONFIGURE_ARGS="-C --disable-nls --host=${TARGET} --prefix= --targ LEAF_PACKAGES_LDFLAGS_CONFIGURE="--sysroot=${PREFIX_NATIVE}"; LEAF_PACKAGES_MAKEFLAGS_INSTALL="DESTDIR=${PREFIX_NATIVE}"; LEAF_PACKAGES_PACKAGES=" -apk_tools bash coreutils cparser cron dash diffutils dos2unix ed file findutils gawk git gnupg grep -hexcurse htop inetutils infounzip infozip irssi john less lynx make man_db mc mksh nano netcat openssh -p7zip pacman patch perl procps_ng python3 rsync rxvt_unicode sed tar tcsh the_silver_searcher tmux -util_linux vim weechat which whois xeyes xwd zsh"; +apk_tools bash cmake coreutils cparser cron dash diffutils dos2unix ed file findutils gawk git gnupg +grep hexcurse htop inetutils infounzip infozip irssi john less lynx make man_db mc mksh nano netcat +openssh p7zip pacman patch perl procps_ng python3 rsync rxvt_unicode sed tar tcsh the_silver_searcher +tmux util_linux vim weechat which whois xeyes xwd zsh"; LEAF_PACKAGES_PREFIX="${PREFIX_NATIVE}"; : ${PKG_APK_TOOLS_ENV_VARS_EXTRA:=CFLAGS=--sysroot=${PREFIX_NATIVE}:CROSS_COMPILE=${TARGET}-:LUAAPK=:VERBOSE=1:PREFIX=${PREFIX_NATIVE}}; : ${PKG_APK_TOOLS_MAKEFLAGS_INSTALL_EXTRA:=MANDIR=/share/man DOCDIR=/share/doc/apk}; @@ -417,6 +417,10 @@ LEAF_PACKAGES_PREFIX="${PREFIX_NATIVE}"; : ${PKG_BASH_SHA256SUM:=afc687a28e0e24dc21b988fa159ff9dbcf6b7caa92ade8645cc6d5605cd024d4}; : ${PKG_BASH_VERSION:=4.3}; : ${PKG_BASH_URL:=https://ftp.gnu.org/gnu/bash/bash-${PKG_BASH_VERSION}.tar.gz}; +: ${PKG_CMAKE_VERSION:=3.6.3}; +: ${PKG_CMAKE_SHA256SUM:=7d73ee4fae572eb2d7cd3feb48971aea903bb30a20ea5ae8b4da826d8ccad5fe}; +: ${PKG_CMAKE_URL:=https://cmake.org/files/v${PKG_CMAKE_VERSION%.*}/cmake-${PKG_CMAKE_VERSION}.tar.gz}; +: ${PKG_CMAKE_CONFIGURE_ARGS:="--prefix="}; : ${PKG_COREUTILS_PREFIX_EXTRA:=${PREFIX_MINIPIX}}; : ${PKG_COREUTILS_SHA256SUM:=ec43ca5bcfc62242accb46b7f121f6b684ee21ecd7d075059bf650ff9e37b82d}; : ${PKG_COREUTILS_VERSION:=8.23}; diff --git a/vars/cmake.vars b/vars/cmake.vars new file mode 100644 index 0000000..0eae553 --- /dev/null +++ b/vars/cmake.vars @@ -0,0 +1,68 @@ +# +# . ./build.vars and set -o errexit -o noglob are assumed. +# + +pkg_cmake_configure_pre() { + cp -p ../cmake-${PKG_VERSION}/Modules/Platform/BSDOS.cmake \ + ../cmake-${PKG_VERSION}/Modules/Platform/Midipix.cmake; + + rm -rf ../cmake-${PKG_VERSION}-host; + mkdir ../cmake-${PKG_VERSION}-host; + cd ../cmake-${PKG_VERSION}-host; + + echo XXXXXXXXXXXXXXXXXXXXXXXXXXXX + + (unset AR ARFLAGS CC CFLAGS RANLIB RANLIBFLAGS; + ../cmake-${PKG_VERSION}/configure ${PKG_CONFIGURE_ARGS}; + make DESTDIR=${PREFIX} install; + ); + + set_build_script_done configure -clean; + echo YYYYYYYYYYYYYYYYYYYYYYYYYYYY +}; + +pkg_cmake_configure() { + stat ../cmake-${PKG_VERSION} + set_build_script_done configure -clean; +} + +pkg_cmake_build() { + rm -f config.cache; + + env CFLAGS="--sysroot=${PKG_PREFIX}" cmake \ + -DBZIP2_INCLUDE_DIR=${PKG_PREFIX}/include \ + -DBZIP2_LIBRARIES=${PKG_PREFIX}/lib/libbz2.a \ + -DCMAKE_C_COMPILER=${PREFIX}/bin/${CC} \ + -DCMAKE_CXX_COMPILER=${PREFIX}/bin/${PKG_TARGET}-g++ \ + -DCMAKE_INSTALL_PREFIX=../cmake-${PKG_VERSION} \ + -DCMAKE_SYSTEM_NAME=Midipix \ + -DCMAKE_USE_SYSTEM_BZIP2=ON \ + -DCMAKE_USE_SYSTEM_CURL=ON \ + -DCMAKE_USE_SYSTEM_EXPAT=OFF \ + -DCMAKE_USE_SYSTEM_LIBARCHIVE=ON \ + -DCMAKE_USE_SYSTEM_ZLIB=ON \ + -DCMAKE_VERBOSE_MAKEFILE=ON \ + -DCURL_INCLUDE_DIR=${PKG_PREFIX}/include/curl \ + -DCURL_LIBRARY=${PKG_PREFIX}/lib/libcurl.lib.a \ + -DKWSYS_LFS_WORKS=YES \ + -DLibArchive_INCLUDE_DIR=${PKG_PREFIX}/include \ + -DLibArchive_LIBRARY=${PKG_PREFIX}/lib/libarchive.lib.a \ + -DLIBLZMA_HAS_AUTO_DECODER=YES \ + -DLIBLZMA_HAS_EASY_ENCODER=YES \ + -DLIBLZMA_HAS_LZMA_PRESET=YES \ + -DLIBLZMA_INCLUDE_DIR=${PKG_PREFIX}/include \ + -DLIBLZMA_LIBRARY=${PKG_PREFIX}/lib/liblzma.lib.a \ + -DZLIB_INCLUDE_DIR=${PKG_PREFIX}/include \ + -DZLIB_LIBRARY=z ../cmake-${PKG_VERSION}; + + make ${DEFAULT_MAKEFLAGS_BUILD}; + set_build_script_done build -install +}; + +pkg_cmake_install() { + make DESTDIR=${PKG_PREFIX} install; + set_build_script_done install -finish + set_build_script_done finish +} + +# vim:filetype=sh