Blame vars/cmake.vars

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) d206c6
pkg_cmake_configure_pre() {
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) d206c6
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
	rm -rf ../cmake-${PKG_VERSION}-host;
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
	mkdir  ../cmake-${PKG_VERSION}-host;
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
	cd     ../cmake-${PKG_VERSION}-host;
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
	echo   XXXXXXXXXXXXXXXXXXXXXXXXXXXX
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
	(unset AR ARFLAGS CC CFLAGS RANLIB RANLIBFLAGS;
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
		../cmake-${PKG_VERSION}/configure ${PKG_CONFIGURE_ARGS};
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
		make DESTDIR=${PREFIX} install;
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
	);
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
	set_build_script_done configure -clean;
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
	echo   YYYYYYYYYYYYYYYYYYYYYYYYYYYY
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_configure() {
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
	stat ../cmake-${PKG_VERSION}
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
	set_build_script_done configure -clean;
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) d206c6
	rm -f config.cache;
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
	env CFLAGS="--sysroot=${PKG_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) d206c6
		-DCMAKE_C_COMPILER=${PREFIX}/bin/${CC}				\
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
		-DCMAKE_CXX_COMPILER=${PREFIX}/bin/${PKG_TARGET}-g++		\
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
		-DCMAKE_INSTALL_PREFIX=../cmake-${PKG_VERSION}			\
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) 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) d206c6
		-DZLIB_LIBRARY=z ../cmake-${PKG_VERSION};
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
	make ${DEFAULT_MAKEFLAGS_BUILD};
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
	set_build_script_done build -install
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_install() {
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
	make DESTDIR=${PKG_PREFIX} install;
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
	set_build_script_done install -finish
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
	set_build_script_done finish
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