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.

52 lines
1.4 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.15.2
  10. PKG_RELEASE:=$(AUTORELEASE)
  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:=a8de4e0bacfb4d76dd1c618ded263523b53b85d92a146d8835eb1a52932fa20a
  14. PKG_MAINTAINER:=Eduardo Abinader <eduardoabinader@gmail.com>
  15. PKG_LICENSE:=LGPL-2.1-or-later
  16. PKG_LICENSE_FILES:=COPYING.LESSER
  17. CMAKE_INSTALL:=1
  18. include $(INCLUDE_DIR)/package.mk
  19. include $(INCLUDE_DIR)/cmake.mk
  20. define Package/check
  21. SECTION:=libs
  22. CATEGORY:=Libraries
  23. TITLE:=Unit testing framework for C
  24. URL:=https://libcheck.github.io/check/
  25. DEPENDS:= +libpthread +librt
  26. endef
  27. define Package/check/description
  28. Check features a simple interface for defining unit tests, putting little in
  29. the way of the developer. Tests are run in a separate address space, so Check
  30. can catch both assertion failures and code errors that cause segmentation
  31. faults or other signals. The output from unit tests can be used within source
  32. code editors and IDEs.
  33. endef
  34. CMAKE_OPTIONS += \
  35. -DBUILD_TESTING=OFF \
  36. -DCMAKE_POSITION_INDEPENDENT_CODE=ON
  37. define Package/check/install
  38. $(INSTALL_DIR) $(1)/usr/lib
  39. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcheck.so.* $(1)/usr/lib/
  40. endef
  41. $(eval $(call BuildPackage,check))