New port: devel/libsml

libSML is a library which implements the Smart Message Language
(SML) protocol specified by VDE's Forum Netztechnik/Netzbetrieb
(FNN). It can be utilized to communicate to FNN specified Smart
Meters or Smart Meter components (EDL/MUC).

WWW: https://github.com/volkszaehler/libsml

PR:		227367
Submitted by:	Gerrit Beine <mail+freebsd@gerritbeine.de>
This commit is contained in:
Kurt Jaeger
2018-06-21 12:54:21 +00:00
parent d124151df4
commit db58f246df
7 changed files with 98 additions and 0 deletions

View File

@@ -1572,6 +1572,7 @@
SUBDIR += libsimdpp
SUBDIR += libslang2
SUBDIR += libsmdev
SUBDIR += libsml
SUBDIR += libsmpp34
SUBDIR += libsmraw
SUBDIR += libsoup

31
devel/libsml/Makefile Normal file
View File

@@ -0,0 +1,31 @@
# Created by: Gerrit Beine <mail+freebsd@gerritbeine.de>
# $FreeBSD$
PORTNAME= libsml
PORTVERSION= 0.1.1
CATEGORIES= devel
MAINTAINER= mail+freebsd@gerritbeine.de
COMMENT= Implementation in C of the Smart Message Language (SML) protocol
LICENSE= GPLv3
LIB_DEPENDS= libuuid.so:misc/e2fsprogs-libuuid
USES= dos2unix gmake
USE_LDCONFIG= yes
USE_GITHUB= yes
DOS2UNIX_FILES= test/unity/unity.c
GH_ACCOUNT= volkszaehler
GH_TAGNAME= 2a8445b
ALL_TARGET= all
CFLAGS+= -I ${PREFIX}/include
post-patch:
${REINPLACE_CMD} -e "s|-luuid|-luuid -L ${PREFIX}/lib|" ${WRKSRC}/examples/Makefile
${REINPLACE_CMD} -e "s|-luuid|-luuid -L ${PREFIX}/lib|" ${WRKSRC}/test/Makefile
${REINPLACE_CMD} -e "s|prefix = /usr/local|prefix = ${STAGEDIR}${PREFIX}|" ${WRKSRC}/examples/Makefile
${REINPLACE_CMD} -e "s|prefix = /usr/local|prefix = ${STAGEDIR}${PREFIX}|" ${WRKSRC}/sml/Makefile
.include <bsd.port.mk>

3
devel/libsml/distinfo Normal file
View File

@@ -0,0 +1,3 @@
TIMESTAMP = 1520165866
SHA256 (volkszaehler-libsml-0.1.1-2a8445b_GH0.tar.gz) = e9342a0e2b86a2e79d40fe8e6743a574e7d7a83034399f34044d3bbd3870f70f
SIZE (volkszaehler-libsml-0.1.1-2a8445b_GH0.tar.gz) = 106002

View File

@@ -0,0 +1,13 @@
--- sml/Makefile.orig 2018-01-25 17:04:21 UTC
+++ sml/Makefile
@@ -4,10 +4,6 @@ CFLAGS += -I./include/ -fPIC -fno-stack-protector -g -
# Available Flags:
# SML_NO_UUID_LIB - compile without uuid lib
-ifneq ($(UNAME), Darwin)
-LIBS=-luuid
-endif
-
NAME=libsml
SOVERSION=1
ifeq ($(UNAME), Darwin)

View File

@@ -0,0 +1,13 @@
--- test/unity/unity.c.orig 2018-01-25 17:04:21 UTC
+++ test/unity/unity.c
@@ -19,9 +19,7 @@
#ifdef __APPLE__
struct _Unity Unity = { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , { 0 } };
#else
-struct _Unity Unity = { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
- .AbortFrame = { {.__jmpbuf = {0}, .__mask_was_saved = 0, .__saved_mask = {{0}} } }
-};
+struct _Unity Unity = { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , { 0 } };
#endif
const char* UnityStrNull = "NULL";

6
devel/libsml/pkg-descr Normal file
View File

@@ -0,0 +1,6 @@
libSML is a library which implements the Smart Message Language
(SML) protocol specified by VDE's Forum Netztechnik/Netzbetrieb
(FNN). It can be utilized to communicate to FNN specified Smart
Meters or Smart Meter components (EDL/MUC).
WWW: https://github.com/volkszaehler/libsml

31
devel/libsml/pkg-plist Normal file
View File

@@ -0,0 +1,31 @@
bin/sml_server
lib/libsml.a
lib/libsml.so
lib/libsml.so.1
include/sml/sml_attention_response.h
include/sml/sml_boolean.h
include/sml/sml_close_request.h
include/sml/sml_close_response.h
include/sml/sml_crc16.h
include/sml/sml_file.h
include/sml/sml_get_list_request.h
include/sml/sml_get_list_response.h
include/sml/sml_get_proc_parameter_request.h
include/sml/sml_get_proc_parameter_response.h
include/sml/sml_get_profile_list_request.h
include/sml/sml_get_profile_list_response.h
include/sml/sml_get_profile_pack_request.h
include/sml/sml_get_profile_pack_response.h
include/sml/sml_list.h
include/sml/sml_message.h
include/sml/sml_number.h
include/sml/sml_octet_string.h
include/sml/sml_open_request.h
include/sml/sml_open_response.h
include/sml/sml_set_proc_parameter_request.h
include/sml/sml_shared.h
include/sml/sml_status.h
include/sml/sml_time.h
include/sml/sml_transport.h
include/sml/sml_tree.h
include/sml/sml_value.h