summaryrefslogtreecommitdiffhomepage
path: root/vars/libzip.vars
blob: da6fe2ea740e0d0819530cb7d63f72f300dcca34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#
# set -o errexit -o noglob are assumed.
#

pkg_libzip_configure() {
	local _build_type="";
	case "${BUILD}" in
	debug)		_build_type="Debug"; ;;
	release) 	_build_type="Release"; ;;
	*)		exit 1; ;;
	esac;
	rm -f config.cache;
	env	CFLAGS="-L${PKG_PREFIX}/lib --sysroot=${PKG_PREFIX}"		\
		PREFIX="" LDFLAGS="-lbz2"					\
	cmake	-DBZIP2_INCLUDE_DIR="${PKG_PREFIX}/include"			\
		-DBZIP2_LIBRARIES="${PKG_PREFIX}/lib/libbz2.lib.a"		\
		-DCMAKE_AR="${PREFIX}/bin/${PKG_AR}"				\
		-DCMAKE_BUILD_TYPE="${_build_type}"				\
		-DCMAKE_C_COMPILER="${PREFIX}/bin/${PKG_CC}"			\
		-DCMAKE_C_STANDARD_LIBRARIES="-lbz2 -lfts"			\
		-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY			\
		-DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER			\
		-DCMAKE_INSTALL_PREFIX=						\
		-DCMAKE_RANLIB="${PREFIX}/bin/${PKG_RANLIB}"			\
		-DCMAKE_SYSTEM_NAME="Midipix"					\
		-DENABLE_GNUTLS=:BOOL=OFF					\
		-DENABLE_MBEDTLS=:BOOL=OFF					\
		-DOPENSSL_CRYPTO_LIBRARY="${PKG_PREFIX}/lib/libcrypto.lib.a"	\
		-DOPENSSL_SSL_LIBRARY="${PKG_PREFIX}/lib/libssl.lib.a"		\
		-DZLIB_INCLUDE_DIR="${PKG_PREFIX}/include"			\
		-DZLIB_LIBRARY="${PKG_PREFIX}/lib/libz.lib.a"			\
		"../libzip-${PKG_VERSION}";
};

pkg_libzip_host_configure() {
	local _build_type="";
	case "${BUILD}" in
	debug)		_build_type="Debug"; ;;
	release) 	_build_type="Release"; ;;
	*)		exit 1; ;;
	esac;
	rm -f config.cache;
	env	PREFIX="" LDFLAGS="-L${PKG_PREFIX}/lib -lbz2 -lfts"		\
	cmake	-DCMAKE_BUILD_TYPE="${_build_type}"				\
		-DCMAKE_C_STANDARD_LIBRARIES="-lbz2 -lfts"			\
		-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY			\
		-DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER			\
		-DCMAKE_INSTALL_PREFIX=						\
		-DENABLE_GNUTLS=:BOOL=OFF					\
		-DENABLE_MBEDTLS=:BOOL=OFF					\
		"../libzip-${PKG_VERSION}";
};

# vim:filetype=sh