SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
56
devel/libcoap/Makefile
Normal file
56
devel/libcoap/Makefile
Normal file
|
@ -0,0 +1,56 @@
|
|||
COMMENT= communicate with embedded devices using CoAP (RFC 7252)
|
||||
|
||||
GH_ACCOUNT= obgm
|
||||
GH_PROJECT= libcoap
|
||||
|
||||
GH_TAGNAME= v4.2.1
|
||||
DISTFILES= libcoap-${GH_TAGNAME}.tar.gz
|
||||
REVISION= 2
|
||||
|
||||
DTLS_V= 7f8c86e501e690301630029fa9bae22424adf618
|
||||
DISTFILES+= tinydtls-${DTLS_V:C/(........).*/\1/}{${DTLS_V}}.tar.gz:0
|
||||
|
||||
SHARED_LIBS += coap-2-tinydtls 2.0 # 2.1
|
||||
SHARED_LIBS += tinydtls 0.0 #
|
||||
|
||||
CATEGORIES= devel
|
||||
|
||||
HOMEPAGE= https://libcoap.net/
|
||||
|
||||
# BSD
|
||||
PERMIT_PACKAGE= Yes
|
||||
|
||||
WANTLIB += c
|
||||
|
||||
MASTER_SITES0= https://github.com/eclipse/tinydtls/archive/
|
||||
|
||||
BUILD_DEPENDS= devel/cunit \
|
||||
textproc/asciidoc \
|
||||
textproc/gsed
|
||||
|
||||
USE_GMAKE= Yes
|
||||
MAKE_ENV= LIBtinydtls_VERSION=${LIBtinydtls_VERSION}
|
||||
|
||||
CONFIGURE_STYLE= autoreconf
|
||||
CONFIGURE_ARGS= --disable-doxygen \
|
||||
--disable-shared \
|
||||
--enable-shared \
|
||||
--enable-examples \
|
||||
--enable-tests \
|
||||
--with-tinydtls
|
||||
|
||||
# --disable-doxygen is not taken into account by ext/tinydtls/configure
|
||||
CONFIGURE_ENV += ac_cv_path_DOXYGEN=:
|
||||
|
||||
AUTOCONF_VERSION= 2.69
|
||||
AUTOMAKE_VERSION= 1.15
|
||||
AUTORECONF= ./autogen.sh
|
||||
|
||||
post-extract:
|
||||
rmdir ${WRKSRC}/ext/tinydtls
|
||||
mv ${WRKDIR}/tinydtls-* ${WRKSRC}/ext/tinydtls
|
||||
|
||||
post-install:
|
||||
cd ${PREFIX}/man/man5; for i in *; do mv $$i ../man1/$${i%.5}.1; done
|
||||
|
||||
.include <bsd.port.mk>
|
4
devel/libcoap/distinfo
Normal file
4
devel/libcoap/distinfo
Normal file
|
@ -0,0 +1,4 @@
|
|||
SHA256 (libcoap-v4.2.1.tar.gz) = KaA5SiZdP+vuQeXi3APTQpKgrt439fgDNOUprA2rIyE=
|
||||
SHA256 (tinydtls-7f8c86e5.tar.gz) = AoDe2WJ7KgsBw/HsUPv7iWWQUd8NkMBKERw3uzwFdSg=
|
||||
SIZE (libcoap-v4.2.1.tar.gz) = 337438
|
||||
SIZE (tinydtls-7f8c86e5.tar.gz) = 210513
|
15
devel/libcoap/patches/patch-Makefile_am
Normal file
15
devel/libcoap/patches/patch-Makefile_am
Normal file
|
@ -0,0 +1,15 @@
|
|||
ld.lld won't allow -shared -pie (it doesn't make sense anyway)
|
||||
|
||||
Index: Makefile.am
|
||||
--- Makefile.am.orig
|
||||
+++ Makefile.am
|
||||
@@ -137,8 +137,7 @@ libcoap_include_HEADERS = \
|
||||
libcoap_@LIBCOAP_NAME_SUFFIX@_la_LDFLAGS = \
|
||||
-version-info $(LT_LIBCOAP_CURRENT):$(LT_LIBCOAP_REVISION):$(LT_LIBCOAP_AGE) \
|
||||
@libcoap_SYMBOLS@ \
|
||||
- $(DTLS_LIBS) \
|
||||
- -pie
|
||||
+ $(DTLS_LIBS)
|
||||
|
||||
## Collect symbols here we want to ignore while building the helper files
|
||||
## libcoap-$(LIBCOAP_API_VERSION).{map,sym} for the linker.
|
15
devel/libcoap/patches/patch-configure_ac
Normal file
15
devel/libcoap/patches/patch-configure_ac
Normal file
|
@ -0,0 +1,15 @@
|
|||
Index: configure.ac
|
||||
--- configure.ac.orig
|
||||
+++ configure.ac
|
||||
@@ -658,6 +658,11 @@ case $host in
|
||||
#AC_SUBST(OS_MACOS)
|
||||
;;
|
||||
|
||||
+ *-openbsd*)
|
||||
+ AC_MSG_RESULT([OpenBSD])
|
||||
+ ADDITIONAL_CFLAGS="-D_GNU_SOURCE -DWITH_POSIX"
|
||||
+ ;;
|
||||
+
|
||||
*-freebsd1*)
|
||||
AC_MSG_RESULT([FreeBSD-1x])
|
||||
ADDITIONAL_CFLAGS="-D_GNU_SOURCE"
|
13
devel/libcoap/patches/patch-examples_client_c
Normal file
13
devel/libcoap/patches/patch-examples_client_c
Normal file
|
@ -0,0 +1,13 @@
|
|||
Index: examples/client.c
|
||||
--- examples/client.c.orig
|
||||
+++ examples/client.c
|
||||
@@ -1266,6 +1266,9 @@ get_session(
|
||||
memset( &hints, 0, sizeof( struct addrinfo ) );
|
||||
hints.ai_family = AF_UNSPEC; /* Allow IPv4 or IPv6 */
|
||||
hints.ai_socktype = COAP_PROTO_RELIABLE(proto) ? SOCK_STREAM : SOCK_DGRAM; /* Coap uses UDP */
|
||||
+#ifndef AI_ALL
|
||||
+#define AI_ALL 0
|
||||
+#endif
|
||||
hints.ai_flags = AI_PASSIVE | AI_NUMERICHOST | AI_NUMERICSERV | AI_ALL;
|
||||
|
||||
s = getaddrinfo( local_addr, local_port, &hints, &result );
|
13
devel/libcoap/patches/patch-examples_tiny_c
Normal file
13
devel/libcoap/patches/patch-examples_tiny_c
Normal file
|
@ -0,0 +1,13 @@
|
|||
Index: examples/tiny.c
|
||||
--- examples/tiny.c.orig
|
||||
+++ examples/tiny.c
|
||||
@@ -88,6 +88,9 @@ get_session(const char *group) {
|
||||
memset(&hints, 0, sizeof(struct addrinfo));
|
||||
hints.ai_family = AF_UNSPEC; /* Allow IPv4 or IPv6 */
|
||||
hints.ai_socktype = SOCK_DGRAM; /* Coap uses UDP */
|
||||
+#ifndef AI_ALL
|
||||
+#define AI_ALL 0
|
||||
+#endif
|
||||
hints.ai_flags = AI_PASSIVE | AI_NUMERICHOST | AI_NUMERICSERV | AI_ALL;
|
||||
|
||||
s = getaddrinfo(group, NULL, &hints, &result);
|
32
devel/libcoap/patches/patch-ext_tinydtls_Makefile_in
Normal file
32
devel/libcoap/patches/patch-ext_tinydtls_Makefile_in
Normal file
|
@ -0,0 +1,32 @@
|
|||
Index: ext/tinydtls/Makefile.in
|
||||
--- ext/tinydtls/Makefile.in.orig
|
||||
+++ ext/tinydtls/Makefile.in
|
||||
@@ -31,8 +31,8 @@ exec_prefix = @exec_prefix@
|
||||
abs_builddir = @abs_builddir@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
-libdir = @libdir@
|
||||
-includedir = @includedir@/@PACKAGE_NAME@
|
||||
+libdir = $(PREFIX)/lib
|
||||
+includedir = $(PREFIX)/include/@PACKAGE_NAME@
|
||||
package = @PACKAGE_TARNAME@-@PACKAGE_VERSION@
|
||||
|
||||
install := cp
|
||||
@@ -52,7 +52,7 @@ DISTDIR=$(top_builddir)/$(package)
|
||||
FILES:=Makefile.in configure configure.ac dtls_config.h.in \
|
||||
Makefile.tinydtls $(SOURCES) $(HEADERS)
|
||||
LIB:=libtinydtls
|
||||
-LIBS:=$(LIB).a $(LIB).so
|
||||
+LIBS:=$(LIB).a $(LIB).so.${LIBtinydtls_VERSION}
|
||||
LDFLAGS:=@LIBS@
|
||||
ARFLAGS:=cru
|
||||
doc:=doc
|
||||
@@ -81,7 +81,7 @@ dirs: $(SUBDIRS)
|
||||
$(SUB_OBJECTS)::
|
||||
$(MAKE) -C $(@D) $(@F)
|
||||
|
||||
-$(LIB).so: $(OBJECTS)
|
||||
+$(LIB).so.${LIBtinydtls_VERSION}: $(OBJECTS)
|
||||
$(LINK.c) $(LDFLAGS) -shared $^ -o $@
|
||||
|
||||
$(LIB).a: $(OBJECTS)
|
12
devel/libcoap/patches/patch-man_Makefile_am
Normal file
12
devel/libcoap/patches/patch-man_Makefile_am
Normal file
|
@ -0,0 +1,12 @@
|
|||
Index: man/Makefile.am
|
||||
--- man/Makefile.am.orig
|
||||
+++ man/Makefile.am
|
||||
@@ -56,7 +56,7 @@ man7_MANS = $(MAN7)
|
||||
|
||||
# Man pages built byt a2x based on the NAMES section of the .txt file
|
||||
A2X_EXTRA_PAGES = @DOLLAR_SIGN@(shell for fil in $(TXT3) ; do sed -ne '/^NAME/,/^SYNOPSIS/p;/^SYNOPSIS/q' $${fil} | \
|
||||
- sed -ne '/coap_/{ s/ *, */\n/g; p }' | sed -ne 's/^\(coap_[a-zA-Z_]\+\).*$$/\1.3/p' ; done)
|
||||
+ gsed -ne '/coap_/{ s/ *, */\n/g; p }' | sed -ne 's/^\(coap_[a-zA-Z_]\+\).*$$/\1.3/p' ; done)
|
||||
|
||||
# Extra man pages that need to be installed due to limit of 10
|
||||
# names built by a2x
|
19
devel/libcoap/patches/patch-tests_test_error_response_c
Normal file
19
devel/libcoap/patches/patch-tests_test_error_response_c
Normal file
|
@ -0,0 +1,19 @@
|
|||
From bbc6b24abdd95a7d9dfe9855630e6f0f27f48e54 Mon Sep 17 00:00:00 2001
|
||||
From: Olaf Bergmann <bergmann@tzi.org>
|
||||
Date: Wed, 26 Feb 2020 12:49:38 +0100
|
||||
Subject: [PATCH] unit tests: Make global variables static
|
||||
|
||||
Index: tests/test_error_response.c
|
||||
--- tests/test_error_response.c.orig
|
||||
+++ tests/test_error_response.c
|
||||
@@ -16,8 +16,8 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
-coap_pdu_t *pdu; /* Holds the request PDU for most tests */
|
||||
-coap_opt_filter_t opts; /* option filter used for generating responses */
|
||||
+static coap_pdu_t *pdu; /* Holds the request PDU for most tests */
|
||||
+static coap_opt_filter_t opts; /* option filter used for generating responses */
|
||||
|
||||
/************************************************************************
|
||||
** PDU decoder
|
23
devel/libcoap/patches/patch-tests_test_wellknown_c
Normal file
23
devel/libcoap/patches/patch-tests_test_wellknown_c
Normal file
|
@ -0,0 +1,23 @@
|
|||
From bbc6b24abdd95a7d9dfe9855630e6f0f27f48e54 Mon Sep 17 00:00:00 2001
|
||||
From: Olaf Bergmann <bergmann@tzi.org>
|
||||
Date: Wed, 26 Feb 2020 12:49:38 +0100
|
||||
Subject: [PATCH] unit tests: Make global variables static
|
||||
|
||||
Index: tests/test_wellknown.c
|
||||
--- tests/test_wellknown.c.orig
|
||||
+++ tests/test_wellknown.c
|
||||
@@ -22,10 +22,10 @@
|
||||
#define TEST_PDU_SIZE 120
|
||||
#define TEST_URI_LEN 4
|
||||
|
||||
-coap_context_t *ctx; /* Holds the coap context for most tests */
|
||||
-coap_pdu_t *pdu; /* Holds the parsed PDU for most tests */
|
||||
-coap_session_t *session; /* Holds a reference-counted session object
|
||||
- * that is passed to coap_wellknown_response(). */
|
||||
+static coap_context_t *ctx; /* Holds the coap context for most tests */
|
||||
+static coap_pdu_t *pdu; /* Holds the parsed PDU for most tests */
|
||||
+static coap_session_t *session; /* Holds a reference-counted session object
|
||||
+ * that is passed to coap_wellknown_response(). */
|
||||
|
||||
static void
|
||||
t_wellknown1(void) {
|
21
devel/libcoap/pkg/DESCR
Normal file
21
devel/libcoap/pkg/DESCR
Normal file
|
@ -0,0 +1,21 @@
|
|||
libcoap implements a lightweight application-protocol for devices that
|
||||
are constrained in their resources such as computing power, RF range,
|
||||
memory, bandwidth, or network packet sizes. This protocol, CoAP was
|
||||
standardized in the IETF as RFC 7252.
|
||||
|
||||
The library provides the core functionality for development of
|
||||
resource-efficient CoAP servers and clients, including resource
|
||||
observation and block-wise transfer.
|
||||
|
||||
Example implementations show how these features can be used in
|
||||
applications, which are also useful in their own right:
|
||||
|
||||
- coap-client is a wget-like tool to generate simple requests for
|
||||
retrieval and modification of resources on a remote server.
|
||||
(https://github.com/glenndehaan/ikea-tradfri-coap-docs has details
|
||||
about using this with IKEA Tradfri).
|
||||
|
||||
- coap-server is a basic server application that illustrates various
|
||||
server-side features of libcoap.
|
||||
|
||||
- coap-rd implements a simple CoAP Resource Directory.
|
88
devel/libcoap/pkg/PLIST
Normal file
88
devel/libcoap/pkg/PLIST
Normal file
|
@ -0,0 +1,88 @@
|
|||
@bin bin/coap-client
|
||||
@bin bin/coap-rd
|
||||
@bin bin/coap-server
|
||||
include/coap2/
|
||||
include/coap2/address.h
|
||||
include/coap2/async.h
|
||||
include/coap2/bits.h
|
||||
include/coap2/block.h
|
||||
include/coap2/coap.h
|
||||
include/coap2/coap_debug.h
|
||||
include/coap2/coap_dtls.h
|
||||
include/coap2/coap_event.h
|
||||
include/coap2/coap_forward_decls.h
|
||||
include/coap2/coap_hashkey.h
|
||||
include/coap2/coap_io.h
|
||||
include/coap2/coap_mutex.h
|
||||
include/coap2/coap_session.h
|
||||
include/coap2/coap_time.h
|
||||
include/coap2/encode.h
|
||||
include/coap2/libcoap.h
|
||||
include/coap2/mem.h
|
||||
include/coap2/net.h
|
||||
include/coap2/option.h
|
||||
include/coap2/pdu.h
|
||||
include/coap2/prng.h
|
||||
include/coap2/resource.h
|
||||
include/coap2/str.h
|
||||
include/coap2/subscribe.h
|
||||
include/coap2/uri.h
|
||||
include/coap2/uthash.h
|
||||
include/tinydtls/
|
||||
include/tinydtls/aes/
|
||||
include/tinydtls/aes/rijndael.h
|
||||
include/tinydtls/alert.h
|
||||
include/tinydtls/ccm.h
|
||||
include/tinydtls/crypto.h
|
||||
include/tinydtls/dtls.h
|
||||
include/tinydtls/dtls_config.h
|
||||
include/tinydtls/dtls_debug.h
|
||||
include/tinydtls/dtls_mutex.h
|
||||
include/tinydtls/dtls_prng.h
|
||||
include/tinydtls/dtls_time.h
|
||||
include/tinydtls/ecc/
|
||||
include/tinydtls/ecc/ecc.h
|
||||
include/tinydtls/ecc/test_helper.h
|
||||
include/tinydtls/global.h
|
||||
include/tinydtls/hmac.h
|
||||
include/tinydtls/netq.h
|
||||
include/tinydtls/numeric.h
|
||||
include/tinydtls/peer.h
|
||||
include/tinydtls/session.h
|
||||
include/tinydtls/sha2/
|
||||
include/tinydtls/sha2/sha2.h
|
||||
include/tinydtls/state.h
|
||||
include/tinydtls/tinydtls.h
|
||||
include/tinydtls/uthash.h
|
||||
include/tinydtls/utlist.h
|
||||
@static-lib lib/libcoap-2-tinydtls.a
|
||||
lib/libcoap-2-tinydtls.la
|
||||
@lib lib/libcoap-2-tinydtls.so.${LIBcoap-2-tinydtls_VERSION}
|
||||
@static-lib lib/libtinydtls.a
|
||||
@lib lib/libtinydtls.so.${LIBtinydtls_VERSION}
|
||||
lib/pkgconfig/libcoap-2-tinydtls.pc
|
||||
@man man/man1/coap-client.1
|
||||
@man man/man1/coap-rd.1
|
||||
@man man/man1/coap-server.1
|
||||
@man man/man3/coap_add_data_blocked_response.3
|
||||
@man man/man3/coap_attribute.3
|
||||
@man man/man3/coap_context.3
|
||||
@man man/man3/coap_context_set_pki_root_cas.3
|
||||
@man man/man3/coap_encode_var_bytes.3
|
||||
@man man/man3/coap_encryption.3
|
||||
@man man/man3/coap_endpoint_str.3
|
||||
@man man/man3/coap_handler.3
|
||||
@man man/man3/coap_io.3
|
||||
@man man/man3/coap_keepalive.3
|
||||
@man man/man3/coap_logging.3
|
||||
@man man/man3/coap_observe.3
|
||||
@man man/man3/coap_pdu_setup.3
|
||||
@man man/man3/coap_recovery.3
|
||||
@man man/man3/coap_resource.3
|
||||
@man man/man3/coap_session.3
|
||||
@man man/man3/coap_session_get_app_data.3
|
||||
@man man/man3/coap_session_set_app_data.3
|
||||
@man man/man3/coap_split_path.3
|
||||
@man man/man3/coap_split_query.3
|
||||
@man man/man3/coap_tls_library.3
|
||||
@man man/man7/coap.7
|
Loading…
Add table
Add a link
Reference in a new issue