Conan_Kudo / build / midipix_build

Forked from build/midipix_build 4 years ago
Clone
Blob Blame History Raw
#
# . ./build.vars and set -o errexit -o noglob are assumed.
#

pkg_cmake_configure() {
	build_fileop cp ../cmake-${PKG_VERSION}/Modules/Platform/BSDOS.cmake \
		../cmake-${PKG_VERSION}/Modules/Platform/Midipix.cmake;
	build_fileop rm ../cmake-${PKG_VERSION}-host;
	build_fileop mkdir ../cmake-${PKG_VERSION}-host;
	build_fileop cd ../cmake-${PKG_VERSION}-host;
	log_msg info "Bootstrapping cmake...";
	(unset AR CC CXX RANLIB;
	 ../cmake-${PKG_VERSION}/configure ${PKG_CONFIGURE_ARGS};
	 make ${DEFAULT_MAKEFLAGS_BUILD} DESTDIR=${PREFIX} install);
	log_msg info "Finished bootstrapping cmake.";
	stat ../cmake-${PKG_VERSION};
};

pkg_cmake_build() {
	build_fileop rm ../cmake-${PKG_VERSION}-native-${PKG_TARGET};
	build_fileop mkdir ../cmake-${PKG_VERSION}-native-${PKG_TARGET};
	build_fileop cd ${WORKDIR}/cmake-${PKG_VERSION}-native-${PKG_TARGET};
	rm -f config.cache;
	log_msg info "Calling cmake...";
	_pcb_prefix=${PREFIX};
	env	CFLAGS="-L${PKG_PREFIX}/lib --sysroot=${PKG_PREFIX}"		\
		PREFIX="" cmake							\
		-DBZIP2_INCLUDE_DIR=${PKG_PREFIX}/include			\
		-DBZIP2_LIBRARIES=${PKG_PREFIX}/lib/libbz2.a			\
		-DCMAKE_AR=${_pcb_prefix}/bin/${AR}				\
		-DCMAKE_C_COMPILER=${_pcb_prefix}/bin/${CC}			\
		-DCMAKE_CXX_COMPILER=${_pcb_prefix}/bin/${PKG_TARGET}-g++	\
		-DCMAKE_INSTALL_PREFIX=						\
		-DCMAKE_RANLIB=${_pcb_prefix}/bin/${RANLIB}			\
		-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			\
		-DCURSES_NCURSES_LIBRARY=${PKG_PREFIX}/lib/libncurses.so	\
		-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=${PKG_PREFIX}/lib/libz.a				\
			../cmake-${PKG_VERSION};
	unset _pcb_prefix;
	log_msg info "Calling make...";
	make ${DEFAULT_MAKEFLAGS_BUILD};
};

# vim:filetype=sh