5644c1e2da30019775592078e583edcc7d58ec74
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / libffi / libffi.mk
1 ################################################################################
2 #
3 # libffi
4 #
5 ################################################################################
6
7 LIBFFI_VERSION = 3.1
8 LIBFFI_SITE = ftp://sourceware.org/pub/libffi
9 LIBFFI_LICENSE = MIT
10 LIBFFI_LICENSE_FILES = LICENSE
11 LIBFFI_INSTALL_STAGING = YES
12 LIBFFI_AUTORECONF = YES
13
14 # Move the headers to the usual location, and adjust the .pc file
15 # accordingly.
16 define LIBFFI_MOVE_STAGING_HEADERS
17         mv $(STAGING_DIR)/usr/lib/libffi-$(LIBFFI_VERSION)/include/*.h $(STAGING_DIR)/usr/include/
18         $(SED) '/^includedir.*/d' -e '/^Cflags:.*/d' \
19                 $(STAGING_DIR)/usr/lib/pkgconfig/libffi.pc
20         rm -rf $(TARGET_DIR)/usr/lib/libffi-*
21 endef
22
23 LIBFFI_POST_INSTALL_STAGING_HOOKS += LIBFFI_MOVE_STAGING_HEADERS
24
25 # Remove headers that are not at the usual location from the target
26 define LIBFFI_REMOVE_TARGET_HEADERS
27         $(RM) -rf $(TARGET_DIR)/usr/lib/libffi-$(LIBFFI_VERSION)
28 endef
29
30 LIBFFI_POST_INSTALL_TARGET_HOOKS += LIBFFI_REMOVE_TARGET_HEADERS
31
32 $(eval $(autotools-package))
33 $(eval $(host-autotools-package))