lua-rs232: Update to latest master
Should fix the no previous prototype errors. Also fixed the install paths. Now running this should be correct. Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
755144e7b7
commit
e87573a5a7
3 changed files with 8 additions and 39 deletions
|
@ -8,13 +8,13 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=lua-rs232
|
||||
PKG_SOURCE_DATE:=2019-11-20
|
||||
PKG_SOURCE_VERSION:=c106c94d1a5a84e8582c936528303528608776c2
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/srdgame/librs232
|
||||
PKG_SOURCE_DATE:=2019-09-17
|
||||
PKG_SOURCE_VERSION:=1c29a279484ee4850611b76a6571566e0ec133bb
|
||||
PKG_MIRROR_HASH:=c9063a729935135278f17dd98ca31757acfd4405bdf9f6e49d77ed0df8ddc823
|
||||
PKG_MIRROR_HASH:=6fcabfd1501b3a7719229334ce73f1cc74f5ac5795b8faf6d65eb2ae6b14f9a5
|
||||
|
||||
PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
|
||||
PKG_LICENSE:=MIT
|
||||
|
@ -48,8 +48,8 @@ define Build/InstallDev
|
|||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/librs232/rs232* $(1)/usr/include/librs232
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/librs232* $(1)/usr/lib/
|
||||
$(INSTALL_DIR) $(1)/usr/lib/lua/5.1
|
||||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lua/5.1/luars232* $(1)/usr/lib/lua/5.1
|
||||
$(INSTALL_DIR) $(1)/usr/lib/lua
|
||||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lua/5.1/luars232* $(1)/usr/lib/lua
|
||||
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
||||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/librs232.pc $(1)/usr/lib/pkgconfig
|
||||
endef
|
||||
|
@ -57,8 +57,8 @@ endef
|
|||
define Package/lua-rs232/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib/
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/librs232.so* $(1)/usr/lib/
|
||||
$(INSTALL_DIR) $(1)/usr/lib/lua/5.1
|
||||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lua/5.1/luars232* $(1)/usr/lib/lua/5.1
|
||||
$(INSTALL_DIR) $(1)/usr/lib/lua
|
||||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lua/5.1/luars232* $(1)/usr/lib/lua
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,lua-rs232))
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#define MODULE_NAMESPACE "luars232"
|
||||
#define MODULE_VERSION "1.0.3"
|
||||
#define MODULE_BUILD "$Id: luars232.c 15 2011-02-23 09:02:20Z sp $"
|
||||
@@ -552,9 +551,6 @@
|
||||
@@ -553,9 +552,6 @@
|
||||
lua_pushstring(L, MODULE_BUILD);
|
||||
lua_setfield(L, -2, "_BUILD");
|
||||
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
--- a/bindings/lua/luars232.c
|
||||
+++ b/bindings/lua/luars232.c
|
||||
@@ -529,7 +529,7 @@ static void create_metatables(lua_State *L, const char *name, const luaL_reg *me
|
||||
#endif
|
||||
}
|
||||
|
||||
-RS232_LIB int luaopen_luars232(lua_State *L)
|
||||
+RS232_LIB static int luaopen_luars232(lua_State *L)
|
||||
{
|
||||
int i;
|
||||
create_metatables(L, MODULE_NAMESPACE, port_methods);
|
||||
@@ -560,6 +560,7 @@ RS232_LIB int luaopen_luars232(lua_State *L)
|
||||
return 1;
|
||||
}
|
||||
|
||||
-RS232_LIB int luaopen_rs232_core(lua_State *L){
|
||||
+__attribute__((unused))
|
||||
+RS232_LIB static int luaopen_rs232_core(lua_State *L){
|
||||
return luaopen_luars232(L);
|
||||
}
|
||||
--- a/include/librs232/rs232.h
|
||||
+++ b/include/librs232/rs232.h
|
||||
@@ -134,7 +134,7 @@ enum rs232_flow_e {
|
||||
|
||||
enum rs232_status_e {
|
||||
RS232_PORT_CLOSED,
|
||||
- RS232_PORT_OPEN,
|
||||
+ RS232_PORT_OPEN
|
||||
};
|
||||
|
||||
enum rs232_dtr_e {
|
Loading…
Reference in a new issue