From a169d5aa63d7c097b034798acfbb04814b05cc7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Fri, 16 Sep 2022 13:43:04 +0200 Subject: [PATCH] Modernize and add FreeBSD port. --- configure.ac | 8 ++++---- freebsd/.gitignore | 2 ++ freebsd/Makefile.in | 33 +++++++++++++++++++++++++++++++++ lib/otp/Makefile.am | 3 +++ 4 files changed, 42 insertions(+), 4 deletions(-) create mode 100644 freebsd/.gitignore create mode 100644 freebsd/Makefile.in diff --git a/configure.ac b/configure.ac index d648730..2b18962 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ -AC_PREREQ([2.63]) -AC_INIT([cryb.otp], [0.20190326], [des@des.no], [cryb-otp], [http://cryb.to/]) +AC_PREREQ([2.69]) +AC_INIT([cryb.otp], [0.20220916], [des@des.no], [cryb-otp], [http://cryb.to/]) AC_CONFIG_SRCDIR([include/cryb/otp.h]) AC_CONFIG_MACRO_DIR([m4]) AM_INIT_AUTOMAKE([foreign no-dist-gzip dist-xz]) @@ -14,10 +14,9 @@ AM_MAINTAINER_MODE([enable]) # C compiler and features AC_LANG(C) AC_PROG_CC([clang gcc cc]) -AC_PROG_CC_STDC AC_PROG_CPP AC_PROG_CXX([clang++ g++ c++]) -AC_GNU_SOURCE +AC_USE_SYSTEM_EXTENSIONS AC_C_CONST AC_C_RESTRICT AC_C_VOLATILE @@ -149,6 +148,7 @@ CRYB_RESOLVE AC_CONFIG_FILES([ Makefile + freebsd/Makefile include/Makefile include/cryb/Makefile lib/Makefile diff --git a/freebsd/.gitignore b/freebsd/.gitignore new file mode 100644 index 0000000..438ddd4 --- /dev/null +++ b/freebsd/.gitignore @@ -0,0 +1,2 @@ +!/Makefile.in +/work diff --git a/freebsd/Makefile.in b/freebsd/Makefile.in new file mode 100644 index 0000000..56f6ca0 --- /dev/null +++ b/freebsd/Makefile.in @@ -0,0 +1,33 @@ +# $FreeBSD: portlint$ + +PORTNAME= @PACKAGE_TARNAME@ +PORTVERSION= @PACKAGE_VERSION@ +CATEGORIES= security +MASTER_SITES= # +DISTFILES= # + +MAINTAINER= @PACKAGE_BUGREPORT@ +COMMENT= OATH HOTP / TOTP + +LICENSE= BSD3CLAUSE + +USES= gmake libtool pkgconfig +USE_LDCONFIG= yes +GNU_CONFIGURE= yes +INSTALL_TARGET= install-strip +TEST_TARGET= check + +DESCR= ${WRKDIR}/pkg-descr + +do-extract: + (cd @abs_top_srcdir@ && \ + ${GMAKE} distdir && ${MV} ${PKGNAME} ${WRKDIR}) + (${CAT} ${WRKSRC}/README && ${ECHO} && \ + ${ECHO} "WWW: http://cryb.to/") >${DESCR} + +post-stage: + (cd ${STAGEDIR} && \ + ${FIND} -s . -type f -or -type l | cut -c 2- | \ + ${SED} -E '/\/man\//s/([0-9])$$/\1.gz/') >>${TMPPLIST} + +.include diff --git a/lib/otp/Makefile.am b/lib/otp/Makefile.am index 4c96426..e988513 100644 --- a/lib/otp/Makefile.am +++ b/lib/otp/Makefile.am @@ -8,6 +8,9 @@ libcryb_otp_la_SOURCES = \ \ cryb_otp.c +noinst_HEADERS = \ + cryb_otp_impl.h + libcryb_otp_la_CFLAGS = \ $(CRYB_CORE_CFLAGS) \ $(CRYB_OATH_CFLAGS)