libffi.mk 1018 B

123456789101112131415161718192021222324252627282930313233
  1. #############################################################
  2. #
  3. # libffi
  4. #
  5. #############################################################
  6. LIBFFI_VERSION = 3.0.9
  7. LIBFFI_SITE = ftp://sources.redhat.com/pub/libffi/
  8. LIBFFI_INSTALL_STAGING = YES
  9. # Move the headers to the usual location, and adjust the .pc file
  10. # accordingly
  11. define LIBFFI_MOVE_STAGING_HEADERS
  12. mv $(STAGING_DIR)/usr/lib/libffi-*/include/*.h $(STAGING_DIR)/usr/include/
  13. sed -i '/^includedir.*/d' $(STAGING_DIR)/usr/lib/pkgconfig/libffi.pc
  14. rm -rf $(TARGET_DIR)/usr/lib/libffi-*
  15. endef
  16. LIBFFI_POST_INSTALL_STAGING_HOOKS += LIBFFI_MOVE_STAGING_HEADERS
  17. # Similar for target headers
  18. define LIBFFI_MOVE_TARGET_HEADERS
  19. install -d $(TARGET_DIR)/usr/include/
  20. mv $(TARGET_DIR)/usr/lib/libffi-*/include/*.h $(TARGET_DIR)/usr/include/
  21. sed -i '/^includedir.*/d' $(TARGET_DIR)/usr/lib/pkgconfig/libffi.pc
  22. rm -rf $(TARGET_DIR)/usr/lib/libffi-*
  23. endef
  24. LIBFFI_POST_INSTALL_TARGET_HOOKS += LIBFFI_MOVE_TARGET_HEADERS
  25. $(eval $(call AUTOTARGETS,package,libffi))