0002-lua-cjson-add-host-build-support.patch 967 B

1234567891011121314151617181920212223242526272829303132
  1. From: Matthias Schiffer <mschiffer@universe-factory.net>
  2. Date: Wed, 30 Dec 2015 01:00:49 +0100
  3. Subject: lua-cjson: add host build support
  4. diff --git a/lang/lua-cjson/Makefile b/lang/lua-cjson/Makefile
  5. index fbdcf17..1adfeb3 100644
  6. --- a/lang/lua-cjson/Makefile
  7. +++ b/lang/lua-cjson/Makefile
  8. @@ -20,6 +20,7 @@ PKG_MD5SUM:=24f270663e9f6ca8ba2a02cef19f7963
  9. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
  10. +include $(INCLUDE_DIR)/host-build.mk
  11. include $(INCLUDE_DIR)/package.mk
  12. include $(INCLUDE_DIR)/cmake.mk
  13. @@ -39,6 +40,9 @@ endef
  14. CMAKE_OPTIONS += \
  15. -DUSE_LUA=ON
  16. +CMAKE_HOST_OPTIONS += \
  17. + -DLUA_MATH_LIBRARY=m
  18. +
  19. define Package/lua-cjson/install
  20. $(INSTALL_DIR) $(1)/usr/lib/lua
  21. $(INSTALL_BIN) $(PKG_BUILD_DIR)/cjson.so $(1)/usr/lib/lua/
  22. @@ -47,4 +51,5 @@ define Package/lua-cjson/install
  23. $(INSTALL_DATA) $(PKG_BUILD_DIR)/lua/cjson/util.lua $(1)/usr/lib/lua/cjson
  24. endef
  25. +$(eval $(call HostBuild))
  26. $(eval $(call BuildPackage,lua-cjson))