Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
#
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
# . ./build.vars and set -o errexit -o noglob are assumed.
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
#
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
Lucio Andrés Illanes Albornoz (arab, vxp) 0610d8
pkg_cmake_configure() {
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
	cp -p ../cmake-${PKG_VERSION}/Modules/Platform/BSDOS.cmake \
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
		../cmake-${PKG_VERSION}/Modules/Platform/Midipix.cmake;
Lucio Andrés Illanes Albornoz (arab, vxp) 0610d8
	secure_rm ../cmake-${PKG_VERSION}-host;
Lucio Andrés Illanes Albornoz (arab, vxp) 0610d8
	insecure_mkdir ../cmake-${PKG_VERSION}-host;
Lucio Andrés Illanes Albornoz (arab, vxp) 0610d8
	cd ../cmake-${PKG_VERSION}-host;
Lucio Andrés Illanes Albornoz (arab, vxp) 0610d8
	log_msg info "Bootstrapping cmake...";
Lucio Andrés Illanes Albornoz (arab, vxp) 0610d8
	(unset AR CC RANLIB;
Lucio Andrés Illanes Albornoz (arab, vxp) 0610d8
	 ../cmake-${PKG_VERSION}/configure ${PKG_CONFIGURE_ARGS};
Lucio Andrés Illanes Albornoz (arab, vxp) e41afc
	 make ${DEFAULT_MAKEFLAGS_BUILD} DESTDIR=${PREFIX} install);
Lucio Andrés Illanes Albornoz (arab, vxp) 0610d8
	log_msg info "Finished bootstrapping cmake.";
Lucio Andrés Illanes Albornoz (arab, vxp) 0610d8
	stat ../cmake-${PKG_VERSION};
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
};
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
pkg_cmake_build() {
Lucio Andrés Illanes Albornoz (arab, vxp) 0ddcce
	secure_rm ../cmake-${PKG_VERSION}-native-${PKG_TARGET};
Lucio Andrés Illanes Albornoz (arab, vxp) 0ddcce
	insecure_mkdir ../cmake-${PKG_VERSION}-native-${PKG_TARGET};
Lucio Andrés Illanes Albornoz (arab, vxp) 0ddcce
	cd ${WORKDIR}/cmake-${PKG_VERSION}-native-${PKG_TARGET};
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
	rm -f config.cache;
Lucio Andrés Illanes Albornoz (arab, vxp) 0610d8
	log_msg info "Calling cmake...";
Lucio Andrés Illanes Albornoz (arab, vxp) 0ddcce
	_pcb_prefix=${PREFIX};
Lucio Andrés Illanes Albornoz (arab, vxp) 0ddcce
	env	CFLAGS="-L${PKG_PREFIX}/lib --sysroot=${PKG_PREFIX}"		\
Lucio Andrés Illanes Albornoz (arab, vxp) 0ddcce
		PREFIX="" cmake							\
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
		-DBZIP2_INCLUDE_DIR=${PKG_PREFIX}/include			\
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
		-DBZIP2_LIBRARIES=${PKG_PREFIX}/lib/libbz2.a			\
Lucio Andrés Illanes Albornoz (arab, vxp) 0ddcce
		-DCMAKE_AR=${_pcb_prefix}/bin/${AR}				\
Lucio Andrés Illanes Albornoz (arab, vxp) 0ddcce
		-DCMAKE_C_COMPILER=${_pcb_prefix}/bin/${CC}			\
Lucio Andrés Illanes Albornoz (arab, vxp) 0ddcce
		-DCMAKE_CXX_COMPILER=${_pcb_prefix}/bin/${PKG_TARGET}-g++	\
Lucio Andrés Illanes Albornoz (arab, vxp) 0ddcce
		-DCMAKE_INSTALL_PREFIX=						\
Lucio Andrés Illanes Albornoz (arab, vxp) 0ddcce
		-DCMAKE_RANLIB=${_pcb_prefix}/bin/${RANLIB}			\
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
		-DCMAKE_SYSTEM_NAME=Midipix					\
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
		-DCMAKE_USE_SYSTEM_BZIP2=ON					\
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
		-DCMAKE_USE_SYSTEM_CURL=ON					\
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
		-DCMAKE_USE_SYSTEM_EXPAT=OFF					\
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
		-DCMAKE_USE_SYSTEM_LIBARCHIVE=ON				\
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
		-DCMAKE_USE_SYSTEM_ZLIB=ON					\
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
		-DCMAKE_VERBOSE_MAKEFILE=ON					\
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
		-DCURL_INCLUDE_DIR=${PKG_PREFIX}/include/curl			\
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
		-DCURL_LIBRARY=${PKG_PREFIX}/lib/libcurl.lib.a			\
Lucio Andrés Illanes Albornoz (arab, vxp) 0ddcce
		-DCURSES_NCURSES_LIBRARY=${PKG_PREFIX}/lib/libncurses.so	\
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
		-DKWSYS_LFS_WORKS=YES						\
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
		-DLibArchive_INCLUDE_DIR=${PKG_PREFIX}/include			\
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
		-DLibArchive_LIBRARY=${PKG_PREFIX}/lib/libarchive.lib.a		\
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
		-DLIBLZMA_HAS_AUTO_DECODER=YES					\
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
		-DLIBLZMA_HAS_EASY_ENCODER=YES					\
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
		-DLIBLZMA_HAS_LZMA_PRESET=YES					\
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
		-DLIBLZMA_INCLUDE_DIR=${PKG_PREFIX}/include			\
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
		-DLIBLZMA_LIBRARY=${PKG_PREFIX}/lib/liblzma.lib.a		\
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
		-DZLIB_INCLUDE_DIR=${PKG_PREFIX}/include 			\
Lucio Andrés Illanes Albornoz (arab, vxp) 5c2a6c
		-DZLIB_LIBRARY=${PKG_PREFIX}/lib/libz.a				\
Lucio Andrés Illanes Albornoz (arab, vxp) 0ddcce
			../cmake-${PKG_VERSION};
Lucio Andrés Illanes Albornoz (arab, vxp) 0ddcce
	unset _pcb_prefix;
Lucio Andrés Illanes Albornoz (arab, vxp) 0610d8
	log_msg info "Calling make...";
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
	make ${DEFAULT_MAKEFLAGS_BUILD};
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
};
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
# vim:filetype=sh