Modernize and add FreeBSD port.

This commit is contained in:
Dag-Erling Smørgrav 2022-09-16 13:43:04 +02:00
parent f8da6d5892
commit a169d5aa63
4 changed files with 42 additions and 4 deletions

View file

@ -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

2
freebsd/.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
!/Makefile.in
/work

33
freebsd/Makefile.in Normal file
View file

@ -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 <bsd.port.mk>

View file

@ -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)