Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
#
Lucio Andrés Illanes Albornoz 2b85d0
# set +o errexit -o noglob is 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 bf9edf
	if ! rtl_fileop cp "${PREFIX}/share/cmake-${PKG_VERSION%.*}/Modules/Platform/BSDOS.cmake"	\
Lucio Andrés Illanes Albornoz bf9edf
		"${PREFIX}/share/cmake-${PKG_VERSION%.*}/Modules/Platform/Midipix.cmake"		\
Lucio Andrés Illanes Albornoz bf9edf
	|| ! rtl_fileop rm config.cache									\
Lucio Andrés Illanes Albornoz bf9edf
	|| ! env CFLAGS="-L${PKG_PREFIX}/lib --sysroot=${PKG_PREFIX}" PREFIX=""				\
Lucio Andrés Illanes Albornoz bf9edf
	|| ! cmake	-DBZIP2_INCLUDE_DIR="${PKG_PREFIX}/include"					\
Lucio Andrés Illanes Albornoz bf9edf
			-DBZIP2_LIBRARIES="${PKG_PREFIX}/lib/libbz2.a"					\
Lucio Andrés Illanes Albornoz bf9edf
			-DCMAKE_AR="${PREFIX}/bin/${PKG_AR}"						\
Lucio Andrés Illanes Albornoz bf9edf
			-DCMAKE_C_COMPILER="${PREFIX}/bin/${PKG_CC}"					\
Lucio Andrés Illanes Albornoz bf9edf
			-DCMAKE_CXX_COMPILER="${PREFIX}/bin/${PKG_TARGET}-g++"				\
Lucio Andrés Illanes Albornoz bf9edf
			-DCMAKE_INSTALL_PREFIX=								\
Lucio Andrés Illanes Albornoz bf9edf
			-DCMAKE_RANLIB="${PREFIX}/bin/${PKG_RANLIB}"					\
Lucio Andrés Illanes Albornoz bf9edf
			-DCMAKE_SYSTEM_NAME=Midipix							\
Lucio Andrés Illanes Albornoz bf9edf
			-DCMAKE_USE_SYSTEM_BZIP2=ON							\
Lucio Andrés Illanes Albornoz bf9edf
			-DCMAKE_USE_SYSTEM_CURL=ON							\
Lucio Andrés Illanes Albornoz bf9edf
			-DCMAKE_USE_SYSTEM_EXPAT=OFF							\
Lucio Andrés Illanes Albornoz bf9edf
			-DCMAKE_USE_SYSTEM_LIBARCHIVE=ON						\
Lucio Andrés Illanes Albornoz bf9edf
			-DCMAKE_USE_SYSTEM_LIBUV=ON							\
Lucio Andrés Illanes Albornoz bf9edf
			-DCMAKE_USE_SYSTEM_ZLIB=ON							\
Lucio Andrés Illanes Albornoz bf9edf
			-DCMAKE_VERBOSE_MAKEFILE=ON							\
Lucio Andrés Illanes Albornoz bf9edf
			-DCURL_INCLUDE_DIR="${PKG_PREFIX}/include/curl"					\
Lucio Andrés Illanes Albornoz bf9edf
			-DCURL_LIBRARY="${PKG_PREFIX}/lib/libcurl.lib.a"				\
Lucio Andrés Illanes Albornoz bf9edf
			-DCURSES_NCURSES_LIBRARY="${PKG_PREFIX}/lib/libncurses.lib.a"			\
Lucio Andrés Illanes Albornoz bf9edf
			-DKWSYS_LFS_WORKS=YES								\
Lucio Andrés Illanes Albornoz bf9edf
			-DLibArchive_INCLUDE_DIR="${PKG_PREFIX}/include"				\
Lucio Andrés Illanes Albornoz bf9edf
			-DLibArchive_LIBRARY="${PKG_PREFIX}/lib/libarchive.lib.a"			\
Lucio Andrés Illanes Albornoz bf9edf
			-DLIBLZMA_HAS_AUTO_DECODER=YES							\
Lucio Andrés Illanes Albornoz bf9edf
			-DLIBLZMA_HAS_EASY_ENCODER=YES							\
Lucio Andrés Illanes Albornoz bf9edf
			-DLIBLZMA_HAS_LZMA_PRESET=YES							\
Lucio Andrés Illanes Albornoz bf9edf
			-DLIBLZMA_INCLUDE_DIR="${PKG_PREFIX}/include"					\
Lucio Andrés Illanes Albornoz bf9edf
			-DLIBLZMA_LIBRARY="${PKG_PREFIX}/lib/liblzma.lib.a"				\
Lucio Andrés Illanes Albornoz bf9edf
			-DLibUV_INCLUDE_DIR="${PKG_PREFIX}/include"					\
Lucio Andrés Illanes Albornoz bf9edf
			-DLibUV_LIBRARY="${PKG_PREFIX}/lib/libuv.1.0.0.lib.a"				\
Lucio Andrés Illanes Albornoz bf9edf
			-DZLIB_INCLUDE_DIR="${PKG_PREFIX}/include"					\
Lucio Andrés Illanes Albornoz bf9edf
			-DZLIB_LIBRARY="${PKG_PREFIX}/lib/libz.a"					\
Lucio Andrés Illanes Albornoz bf9edf
			"../cmake-${PKG_VERSION}"; then
Lucio Andrés Illanes Albornoz bf9edf
		return 1;
Lucio Andrés Illanes Albornoz bf9edf
	fi;
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
};
Lucio Andrés Illanes Albornoz (arab, vxp) d206c6
Lucio Andrés Illanes Albornoz (arab, vxp) c27bea
pkg_cmake_install_make_pre() {
Lucio Andrés Illanes Albornoz (arab, vxp) d01c02
	if [ ! -e cmake_install.cmake.orig ]; then
Lucio Andrés Illanes Albornoz (arab, vxp) d01c02
		sed -i.orig '/^\s*set(CMAKE_INSTALL_PREFIX ".*")$/s/".*"/""/'	\
Lucio Andrés Illanes Albornoz (arab, vxp) d01c02
			cmake_install.cmake;
Lucio Andrés Illanes Albornoz (arab, vxp) d01c02
	fi;
Lucio Andrés Illanes Albornoz (arab, vxp) d01c02
};
Lucio Andrés Illanes Albornoz (arab, vxp) d01c02
Lucio Andrés Illanes Albornoz 528b11
pkg_cmake_host_configure() {
Lucio Andrés Illanes Albornoz bf9edf
	if ! rtl_fileop rm config.cache									\
Lucio Andrés Illanes Albornoz bf9edf
	|| ! cmake -DCURSES_NCURSES_LIBRARY="${PKG_PREFIX}/lib/libncurses.so" "../cmake-${PKG_VERSION}"; then
Lucio Andrés Illanes Albornoz bf9edf
		return 1;
Lucio Andrés Illanes Albornoz bf9edf
	fi;
Lucio Andrés Illanes Albornoz 528b11
};
Lucio Andrés Illanes Albornoz 528b11
Lucio Andrés Illanes Albornoz (arab, vxp) c27bea
pkg_cmake_host_install_make_pre() {
Lucio Andrés Illanes Albornoz (arab, vxp) 6b9494
	pkg_cmake_install_make_pre;
Lucio Andrés Illanes Albornoz (arab, vxp) d01c02
};
Lucio Andrés Illanes Albornoz (arab, vxp) d01c02
Lucio Andrés Illanes Albornoz bf9edf
# vim:filetype=sh textwidth=0