package/python-simplejson: bump version to 3.8.2
[buildroot-gz.git] / package / libffi / libffi.mk
blob38ef2d60d086f2995613139923e933c57254f9ff
1 ################################################################################
3 # libffi
5 ################################################################################
7 LIBFFI_VERSION = 3.2.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
14 # Move the headers to the usual location, and adjust the .pc file
15 # accordingly.
16 define LIBFFI_MOVE_HEADERS
17 mv $(1)/usr/lib/libffi-$(LIBFFI_VERSION)/include/*.h $(1)/usr/include/
18 $(SED) '/^includedir.*/d' -e '/^Cflags:.*/d' \
19 $(1)/usr/lib/pkgconfig/libffi.pc
20 rm -rf $(1)/usr/lib/libffi-*
21 endef
23 LIBFFI_MOVE_STAGING_HEADERS = $(call LIBFFI_MOVE_HEADERS,$(STAGING_DIR))
24 LIBFFI_POST_INSTALL_STAGING_HOOKS += LIBFFI_MOVE_STAGING_HEADERS
26 HOST_LIBFFI_MOVE_HOST_HEADERS = $(call LIBFFI_MOVE_HEADERS,$(HOST_DIR))
27 HOST_LIBFFI_POST_INSTALL_HOOKS += HOST_LIBFFI_MOVE_HOST_HEADERS
29 # Remove headers that are not at the usual location from the target
30 define LIBFFI_REMOVE_TARGET_HEADERS
31 $(RM) -rf $(TARGET_DIR)/usr/lib/libffi-$(LIBFFI_VERSION)
32 endef
34 LIBFFI_POST_INSTALL_TARGET_HOOKS += LIBFFI_REMOVE_TARGET_HEADERS
36 $(eval $(autotools-package))
37 $(eval $(host-autotools-package))