stop removing aes.c and aes.h in libdivecomputer, they are from

https://github.com/kokke/tiny-AES-c and the license is ok,
from kristaps (maintainer)

tweaks from me: REVISION=0 not =1, and split CONFIGURE_ARGS into separate
lines as is normal in the ports tree
This commit is contained in:
sthen 2019-07-18 10:42:49 +00:00
parent 36cddaee52
commit 88b1ee1426
3 changed files with 5 additions and 78 deletions

View File

@ -1,8 +1,9 @@
# $OpenBSD: Makefile,v 1.2 2019/07/12 20:47:51 sthen Exp $
# $OpenBSD: Makefile,v 1.3 2019/07/18 10:42:49 sthen Exp $
COMMENT = library for communication with dive computers
DISTNAME = libdivecomputer-0.6.0
REVISION = 0
SHARED_LIBS = divecomputer 0.0
@ -21,14 +22,11 @@ MASTER_SITES = https://www.libdivecomputer.org/releases/
USE_GMAKE = Yes
CONFIGURE_STYLE = gnu
CONFIGURE_ARGS = --without-libusb --without-hidapi --without-bluez
CONFIGURE_ARGS = --without-libusb \
--without-hidapi \
--without-bluez
# Mandoc is only used to generate HTML pages, which are useless since
# we install the mdoc(7) sources, so pretend we do not have mandoc.
CONFIGURE_ENV = ac_cv_prog_DOXYGEN= ac_cv_prog_MANDOC=
# Remove obvious third-party files
# that have no author information and no license.
post-extract:
rm ${WRKSRC}/src/aes.{c,h}
.include <bsd.port.mk>

View File

@ -1,34 +0,0 @@
$OpenBSD: patch-src_Makefile_in,v 1.1.1.1 2018/08/14 16:12:55 schwarze Exp $
Remove obvious third-party files aes.c and aes.h
that have no author information and no license.
Index: src/Makefile.in
--- src/Makefile.in.orig
+++ src/Makefile.in
@@ -167,7 +167,7 @@ am__libdivecomputer_la_SOURCES_DIST = version.c descri
mares_darwin_parser.c mares_iconhd.h mares_iconhd.c \
mares_iconhd_parser.c ihex.h ihex.c hw_ostc.h hw_ostc.c \
hw_ostc_parser.c hw_frog.h hw_frog.c hw_ostc3.h hw_ostc3.c \
- aes.h aes.c cressi_edy.h cressi_edy.c cressi_edy_parser.c \
+ cressi_edy.h cressi_edy.c cressi_edy_parser.c \
cressi_leonardo.h cressi_leonardo.c cressi_leonardo_parser.c \
zeagle_n2ition3.h zeagle_n2ition3.c atomics_cobalt.h \
atomics_cobalt.c atomics_cobalt_parser.c shearwater_common.h \
@@ -204,7 +204,7 @@ am_libdivecomputer_la_OBJECTS = version.lo descriptor.
mares_nemo_parser.lo mares_puck.lo mares_darwin.lo \
mares_darwin_parser.lo mares_iconhd.lo mares_iconhd_parser.lo \
ihex.lo hw_ostc.lo hw_ostc_parser.lo hw_frog.lo hw_ostc3.lo \
- aes.lo cressi_edy.lo cressi_edy_parser.lo cressi_leonardo.lo \
+ cressi_edy.lo cressi_edy_parser.lo cressi_leonardo.lo \
cressi_leonardo_parser.lo zeagle_n2ition3.lo atomics_cobalt.lo \
atomics_cobalt_parser.lo shearwater_common.lo \
shearwater_predator.lo shearwater_predator_parser.lo \
@@ -456,7 +456,7 @@ libdivecomputer_la_SOURCES = version.c descriptor.c it
mares_darwin.c mares_darwin_parser.c mares_iconhd.h \
mares_iconhd.c mares_iconhd_parser.c ihex.h ihex.c hw_ostc.h \
hw_ostc.c hw_ostc_parser.c hw_frog.h hw_frog.c hw_ostc3.h \
- hw_ostc3.c aes.h aes.c cressi_edy.h cressi_edy.c \
+ hw_ostc3.c cressi_edy.h cressi_edy.c \
cressi_edy_parser.c cressi_leonardo.h cressi_leonardo.c \
cressi_leonardo_parser.c zeagle_n2ition3.h zeagle_n2ition3.c \
atomics_cobalt.h atomics_cobalt.c atomics_cobalt_parser.c \

View File

@ -1,37 +0,0 @@
$OpenBSD: patch-src_hw_ostc3_c,v 1.1.1.1 2018/08/14 16:12:55 schwarze Exp $
Remove obvious third-party files aes.c and aes.h
that have no author information and no license.
Index: src/hw_ostc3.c
--- src/hw_ostc3.c.orig
+++ src/hw_ostc3.c
@@ -29,7 +29,6 @@
#include "device-private.h"
#include "serial.h"
#include "array.h"
-#include "aes.h"
#include "platform.h"
#define ISINSTANCE(device) dc_device_isinstance((device), &hw_ostc3_device_vtable)
@@ -1064,7 +1063,9 @@ hw_ostc3_firmware_readfile3 (hw_ostc3_firmware_t *firm
bytes += 16;
// Load the iv for AES-FCB-mode
- AES128_ECB_encrypt (iv, ostc3_key, tmpbuf);
+ // AES128_ECB_encrypt (iv, ostc3_key, tmpbuf);
+ ERROR (context, "No license for AES128_ECB_encrypt().");
+ return DC_STATUS_UNSUPPORTED;
for (addr = 0; addr < SZ_FIRMWARE; addr += 16, bytes += 16) {
rc = hw_ostc3_firmware_readline (fp, context, bytes, encrypted, sizeof(encrypted));
@@ -1079,7 +1080,9 @@ hw_ostc3_firmware_readfile3 (hw_ostc3_firmware_t *firm
firmware->data[addr + i] = encrypted[i] ^ tmpbuf[i];
// Run the next round of encryption
- AES128_ECB_encrypt (encrypted, ostc3_key, tmpbuf);
+ // AES128_ECB_encrypt (encrypted, ostc3_key, tmpbuf);
+ ERROR (context, "No license for AES128_ECB_encrypt().");
+ return DC_STATUS_UNSUPPORTED;
}
// This file format contains a tail with the checksum in