You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
1.7 KiB

  1. #
  2. # Copyright (C) 2008-2015 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=check
  9. PKG_VERSION:=0.12.0
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://github.com/libcheck/check/releases/download/$(PKG_VERSION)
  13. PKG_HASH:=464201098bee00e90f5c4bdfa94a5d3ead8d641f9025b560a27755a83b824234
  14. PKG_LICENSE:=LGPL-2.1-or-later
  15. PKG_LICENSE_FILES:=COPYING.LESSER
  16. PKG_MAINTAINER:=Eduardo Abinader <eduardoabinader@gmail.com>
  17. PKG_INSTALL:=1
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/check
  20. SECTION:=libs
  21. CATEGORY:=Libraries
  22. TITLE:=Unit testing framework for C
  23. URL:=https://libcheck.github.io/check/
  24. DEPENDS:= +libpthread +librt
  25. endef
  26. define Package/check/description
  27. Check features a simple interface for defining unit tests, putting little in
  28. the way of the developer. Tests are run in a separate address space, so Check
  29. can catch both assertion failures and code errors that cause segmentation
  30. faults or other signals. The output from unit tests can be used within source
  31. code editors and IDEs.
  32. endef
  33. TARGET_CFLAGS += $(FPIC)
  34. CONFIGURE_VARS += \
  35. hw_cv_func_snprintf_c99=yes \
  36. hw_cv_func_vsnprintf_c99=yes \
  37. define Build/InstallDev
  38. $(INSTALL_DIR) $(1)/usr/include
  39. $(CP) $(PKG_INSTALL_DIR)/usr/include/check*.h $(1)/usr/include/
  40. $(INSTALL_DIR) $(1)/usr/lib
  41. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcheck.{a,so*} $(1)/usr/lib/
  42. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  43. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/check.pc $(1)/usr/lib/pkgconfig/
  44. endef
  45. define Package/check/install
  46. $(INSTALL_DIR) $(1)/usr/lib
  47. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcheck.so.* $(1)/usr/lib/
  48. endef
  49. $(eval $(call BuildPackage,check))