Index: security/libdecaf/Makefile =================================================================== --- /dev/null +++ security/libdecaf/Makefile @@ -0,0 +1,29 @@ +# $FreeBSD$ + +PORTNAME= libdecaf +PORTVERSION= 0.9.4 +CATEGORIES= security +MASTER_SITES= SF/ed448goldilocks/ + +MAINTAINER= krion@FreeBSD.org +COMMENT= Implementation of elliptic curve cryptography + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE.txt + +USES= gmake python:2.7 tar:tgz +USE_LDCONFIG= yes +LDFLAGS+= -L${LOCALBASE}/lib + +PLIST_FILES= bin/ristretto bin/shakesum \ + lib/libdecaf.so lib/libdecaf.so.1 + +post-patch: + @${REINPLACE_CMD} -e 's|PYTHON ?= python|PYTHON ?= ${PYTHON_CMD}|g' \ + ${WRKSRC}/Makefile + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/build/bin/* ${STAGEDIR}${PREFIX}/bin/ + ${INSTALL_LIB} ${WRKSRC}/build/lib/* ${STAGEDIR}${PREFIX}/lib/ + +.include Index: security/libdecaf/distinfo =================================================================== --- /dev/null +++ security/libdecaf/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1515406054 +SHA256 (libdecaf-0.9.4.tgz) = 6b0b6dc77a8dec88ea5b45902f8211d9f6c55b3346191dcd0aaeeb45a8d23f7f +SIZE (libdecaf-0.9.4.tgz) = 557122 Index: security/libdecaf/files/patch-Makefile =================================================================== --- /dev/null +++ security/libdecaf/files/patch-Makefile @@ -0,0 +1,45 @@ +--- Makefile.orig 2018-01-08 13:58:29 UTC ++++ Makefile +@@ -19,7 +19,7 @@ BUILD_IBIN = build/obj/bin + + DOXYGEN ?= doxygen + +-ifeq ($(UNAME),Darwin) ++ifeq ($(UNAME),FreeBSD) + CC = clang + CXX = clang++ + else +@@ -97,14 +97,14 @@ scan: clean + + # Internal test programs, which are not part of the final build/bin directory. + $(BUILD_IBIN)/test: $(BUILD_OBJ)/test_decaf.o lib +-ifeq ($(UNAME),Darwin) ++ifeq ($(UNAME),FreeBSD) + $(LDXX) $(LDFLAGS) -o $@ $< -L$(BUILD_LIB) -ldecaf + else + $(LDXX) $(LDFLAGS) -Wl,-rpath,`pwd`/$(BUILD_LIB) -o $@ $< -L$(BUILD_LIB) -ldecaf + endif + + $(BUILD_BIN)/ristretto: $(BUILD_OBJ)/ristretto.o lib +-ifeq ($(UNAME),Darwin) ++ifeq ($(UNAME),FreeBSD) + $(LDXX) $(LDFLAGS) -o $@ $< -L$(BUILD_LIB) -ldecaf + else + $(LDXX) $(LDFLAGS) -Wl,-rpath,`pwd`/$(BUILD_LIB) -o $@ $< -L$(BUILD_LIB) -ldecaf +@@ -112,14 +112,14 @@ endif + + # Internal test programs, which are not part of the final build/bin directory. + $(BUILD_IBIN)/test_ct: $(BUILD_OBJ)/test_ct.o lib +-ifeq ($(UNAME),Darwin) ++ifeq ($(UNAME),FreeBSD) + $(LDXX) $(LDFLAGS) -o $@ $< -L$(BUILD_LIB) -ldecaf + else + $(LDXX) $(LDFLAGS) -Wl,-rpath,`pwd`/$(BUILD_LIB) -o $@ $< -L$(BUILD_LIB) -ldecaf + endif + + $(BUILD_IBIN)/bench: $(BUILD_OBJ)/bench_decaf.o lib +-ifeq ($(UNAME),Darwin) ++ifeq ($(UNAME),FreeBSD) + $(LDXX) $(LDFLAGS) -o $@ $< -L$(BUILD_LIB) -ldecaf + else + $(LDXX) $(LDFLAGS) -Wl,-rpath,`pwd`/$(BUILD_LIB) -o $@ $< -L$(BUILD_LIB) -ldecaf Index: security/libdecaf/pkg-descr =================================================================== --- /dev/null +++ security/libdecaf/pkg-descr @@ -0,0 +1,5 @@ +Implementation of elliptic curve cryptography using the Montgomery +and Edwards curves Curve25519, Ed25519, Ed448-Goldilocks and +Curve448, using the Decaf / Ristretto encoding. + +WWW: http://ed448goldilocks.sourceforge.net/