Skip to content

Commit

Permalink
New port: comms/snap7
Browse files Browse the repository at this point in the history
Snap7, through three specialized components: Client and the inedited Server
and Partner, allows you to definitively integrate your PC based systems into
a PLC automation chain.

Designed to transfer large amounts of hi-speed data in industrial facilities,
it scales easily, down to small Linux Arm boards such as Raspberry PI.

Hi level object oriented wrappers are provided, currently C/C++, .NET/Mono,
Pascal, LabVIEW, Python with many source code examples.

Very detailed documentation provided.

WWW: http://sourceforge.net/projects/snap7/

PR:		215409
Submitted by:	[email protected]
  • Loading branch information
opsec committed Jan 6, 2019
1 parent 72c5841 commit 6639c61
Show file tree
Hide file tree
Showing 7 changed files with 105 additions and 0 deletions.
1 change: 1 addition & 0 deletions comms/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@
SUBDIR += seyon
SUBDIR += sms_client
SUBDIR += smstools3
SUBDIR += snap7
SUBDIR += spandsp
SUBDIR += splat
SUBDIR += sredird
Expand Down
34 changes: 34 additions & 0 deletions comms/snap7/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Created by: Vladimir Grebenschikov
# $FreeBSD$

PORTNAME= snap7
PORTVERSION= 1.4.2
CATEGORIES= comms
MASTER_SITES= SF/snap7/${PORTVERSION}
DISTNAME= ${PORTNAME}-full-${PORTVERSION}
EXTRACT_SUFX= .7z

MAINTAINER= [email protected]
COMMENT= Multi-platform Ethernet S7 PLC communication suite

LICENSE= GPLv3

ONLY_FOR_ARCHS= amd64 armv6 i386 mips

USES= gmake
USE_LDCONFIG= yes

WRKSRC= ${WRKDIR}/${PORTNAME}-full-${PORTVERSION}
WRKSRC_SUBDIR= build/unix

MAKE_ARGS= CC=${CC} CXX=${CXX} LinkerName=${CXX} SharedObjectLinkerName="${CXX} -shared -fPIC"

PLIST_FILES= lib/libsnap7.so include/snap7.h share/examples/snap7/c-cpp/snap7.cpp

SNAP_ARCH= ${ARCH:S/amd64/x86_64/:S/armv6/arm_v6/}
MAKEFILE= ${SNAP_ARCH}_bsd.mk

post-install:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libsnap7.so

.include <bsd.port.mk>
3 changes: 3 additions & 0 deletions comms/snap7/distinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
TIMESTAMP = 1546780813
SHA256 (snap7-full-1.4.2.7z) = 1f4270cde8684957770a10a1d311c226e670d9589c69841a9012e818f7b9f80e
SIZE (snap7-full-1.4.2.7z) = 20591252
18 changes: 18 additions & 0 deletions comms/snap7/files/patch-arm__v6__bsd.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
--- arm_v6_bsd.mk.orig 2016-12-20 09:52:10 UTC
+++ arm_v6_bsd.mk
@@ -0,0 +1,15 @@
+##
+## ARMHF V6 tested on
+## - Raspberry board -
+##
+## To improve the build speed in small systems disable -pedantic
+## switch in CXXFLAGS
+##
+TargetCPU :=arm_v6
+OS :=bsd
+CXXFLAGS := -O3 -g -fPIC -pedantic
+
+# Standard part
+
+include common.mk
+
21 changes: 21 additions & 0 deletions comms/snap7/files/patch-common.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
--- common.mk.orig 2014-04-16 08:16:20 UTC
+++ common.mk
@@ -22,7 +22,9 @@ LinkOptions := -O3
IncludePath := $(IncludeSwitch). $(IncludeSwitch)../../src/sys $(IncludeSwitch)../../src/core $(IncludeSwitch)../../src/lib
Libs := $(LibrarySwitch)pthread $(LibrarySwitch)rt
LibPath := $(LibraryPathSwitch).
-LibInstall := /usr/lib
+LibInstall := $(DESTDIR)/$(PREFIX)/lib
+IncInstall := $(DESTDIR)/$(PREFIX)/include
+WrapperInstall := $(DESTDIR)/$(PREFIX)/share/examples/snap7/c-cpp

##
## Common variables (CXXFLAGS varies across platforms)
@@ -108,4 +110,6 @@ clean:

install: all
cp -f $(OutputFile) $(LibInstall)
-
+ cp -f ../../release/Wrappers/c-cpp/snap7.h $(IncInstall)
+ $(MakeDirCommand) $(WrapperInstall)
+ cp -f ../../release/Wrappers/c-cpp/snap7.cpp $(WrapperInstall)
15 changes: 15 additions & 0 deletions comms/snap7/files/patch-mips__bsd.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
--- mips_bsd.mk.orig 2016-12-20 10:44:15 UTC
+++ mips_bsd.mk
@@ -0,0 +1,12 @@
+##
+## mips BSD based (FreeBSD etc.) Makefile
+## Use gmake instead of make
+##
+TargetCPU :=mips
+OS :=bsd
+CXXFLAGS := -O3 -fPIC -pedantic
+
+# Standard part
+
+include common.mk
+
13 changes: 13 additions & 0 deletions comms/snap7/pkg-descr
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Snap7, through three specialized components: Client and the inedited Server
and Partner, allows you to definitively integrate your PC based systems into
a PLC automation chain.

Designed to transfer large amounts of hi-speed data in industrial facilities,
it scales easily, down to small Linux Arm boards such as Raspberry PI.

Hi level object oriented wrappers are provided, currently C/C++, .NET/Mono,
Pascal, LabVIEW, Python with many source code examples.

Very detailed documentation provided.

WWW: http://sourceforge.net/projects/snap7/

0 comments on commit 6639c61

Please sign in to comment.