aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPietro Cerutti <gahr@FreeBSD.org>2018-01-22 13:36:10 +0000
committerPietro Cerutti <gahr@FreeBSD.org>2018-01-22 13:36:10 +0000
commit62768207eab3d327a296600e9cddca8d8051e7d0 (patch)
treeacb4a39bb62c0c46611557bab38e0d71a587240c
parentcbc42e3eceff8cc192de5c10538331a64b67db64 (diff)
downloadports-62768207eab3d327a296600e9cddca8d8051e7d0.tar.gz
ports-62768207eab3d327a296600e9cddca8d8051e7d0.zip
security/libtomcrypt: update to 1.18.1
Changes: https://github.com/libtom/libtomcrypt/blob/v1.18.1/changes Please note that the PDF documentation is not distributed anymore. You can find the latest version pre-built at the release page: https://github.com/libtom/libtomcrypt/releases/tag/v1.18.1
Notes
Notes: svn path=/head/; revision=459650
-rw-r--r--security/libtomcrypt/Makefile60
-rw-r--r--security/libtomcrypt/distinfo5
-rw-r--r--security/libtomcrypt/files/patch-src_headers_tomcrypt__macros.h104
-rw-r--r--security/libtomcrypt/pkg-plist11
4 files changed, 35 insertions, 145 deletions
diff --git a/security/libtomcrypt/Makefile b/security/libtomcrypt/Makefile
index 5356cad08d75..31fe975f1b69 100644
--- a/security/libtomcrypt/Makefile
+++ b/security/libtomcrypt/Makefile
@@ -2,11 +2,9 @@
# $FreeBSD$
PORTNAME= libtomcrypt
-PORTVERSION= 1.17
-PORTREVISION= 4
+PORTVERSION= 1.18.1
+DISTVERSIONPREFIX= v
CATEGORIES= security
-MASTER_SITES= http://libtom.net/files/
-DISTNAME= crypt-${PORTVERSION}
MAINTAINER= gahr@FreeBSD.org
COMMENT= Comprehensive, modular, and portable cryptographic toolkit
@@ -18,10 +16,13 @@ CFLAGS+= -I${LOCALBASE}/include
EXTRALIBS= -L${LOCALBASE}/lib
MAKEFILE= makefile.shared
ALL_TARGET= library
-MAKE_ARGS= IGNORE_SPEED=yes INCPATH="${PREFIX}/include" \
- LIBPATH="${PREFIX}/lib" EXTRALIBS="${EXTRALIBS}"
-WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
-USES= gmake libtool:build tar:bzip2
+MAKE_ARGS= INCPATH="${PREFIX}/include" LIBPATH="${PREFIX}/lib" \
+ EXTRALIBS="${EXTRALIBS}"
+USES= gmake libtool:build
+USE_LDCONFIG= yes
+
+USE_GITHUB= yes
+GH_ACCOUNT= libtom
OPTIONS_DEFINE= DOCS
OPTIONS_MULTI= MATH
@@ -48,32 +49,29 @@ DOCS_MAKE_ARGS_OFF= NODOCS=yes
post-patch:
@${REINPLACE_CMD} -e 's|gcc|${CC}|' -e 's| make | $$(MAKE) |' \
-e 's|-g $$(GROUP)||' -e 's|-o $$(USER)||' \
- ${WRKSRC}/makefile.shared ${WRKSRC}/testprof/makefile.shared
+ ${WRKSRC}/makefile.shared ${WRKSRC}/makefile_include.mk
post-install:
- @${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libtomcrypt_prof.so.0
- @${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libtomcrypt.so.0
-
-post-install-DOCS-on:
- @${MKDIR} ${STAGEDIR}${DOCSDIR}/pdf
- ${INSTALL_DATA} ${WRKSRC}/doc/crypt.pdf ${STAGEDIR}${DOCSDIR}/pdf
+ @${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libtomcrypt.so.1
do-test:
- @${ECHO_MSG} "Testing with -DUSE_TFM..."
- (cd ${WRKSRC} && CFLAGS="${CFLAGS} -DUSE_TFM" EXTRALIBS="-L${PREFIX}/lib -ltfm" ${MAKE_CMD} test && ${WRKSRC}/test)
-
- @${ECHO_MSG} "Cleaning up test binary..."
- @${RM} ${WRKSRC}/test
- @${RM} ${WRKSRC}/demos/test.o
-
- @${ECHO_MSG} "Testing with -DUSE_LTM..."
- (cd ${WRKSRC} && CFLAGS="${CFLAGS} -DUSE_LTM" EXTRALIBS="-L${PREFIX}/lib -ltommath" ${MAKE_CMD} test && ${WRKSRC}/test)
-
- @${ECHO_MSG} "Cleaning up test binary..."
- @${RM} ${WRKSRC}/test
- @${RM} ${WRKSRC}/demos/test.o
-
- @${ECHO_MSG} "Testing with -DUSE_GMP..."
- (cd ${WRKSRC} && CFLAGS="${CFLAGS} -DUSE_GMP" EXTRALIBS="-L${PREFIX}/lib -lgmp" ${MAKE_CMD} test && ${WRKSRC}/test)
+ # TomsFastMath
+ @${ECHO_CMD} "Testing TomsFastMath"
+ ${MAKE_CMD} -C ${WRKSRC} \
+ CFLAGS="-I${LOCALBASE}/include -DUSE_TFM -DTFM_DESC" \
+ EXTRALIBS="-L${LOCALBASE}/lib -ltfm" clean test
+ (cd ${WRKSRC} && ./test)
+ # LibTomMath
+ @${ECHO_CMD} "Testing LibTomMath"
+ ${MAKE_CMD} -C ${WRKSRC} \
+ CFLAGS="-I${LOCALBASE}/include -DUSE_LTM -DLTM_DESC" \
+ EXTRALIBS="-L${LOCALBASE}/lib -ltommath" clean test
+ (cd ${WRKSRC} && ./test)
+ # GMP
+ @${ECHO_CMD} "Testing GMP"
+ ${MAKE_CMD} -C ${WRKSRC} \
+ CFLAGS="-I${LOCALBASE}/include -DUSE_GMP -DGMP_DESC" \
+ EXTRALIBS="-L${LOCALBASE}/lib -lgmp" clean test
+ (cd ${WRKSRC} && ./test)
.include <bsd.port.mk>
diff --git a/security/libtomcrypt/distinfo b/security/libtomcrypt/distinfo
index f5ade49d262b..e5e136b8f31c 100644
--- a/security/libtomcrypt/distinfo
+++ b/security/libtomcrypt/distinfo
@@ -1,2 +1,3 @@
-SHA256 (crypt-1.17.tar.bz2) = e33b47d77a495091c8703175a25c8228aff043140b2554c08a3c3cd71f79d116
-SIZE (crypt-1.17.tar.bz2) = 1599215
+TIMESTAMP = 1516618104
+SHA256 (libtom-libtomcrypt-v1.18.1_GH0.tar.gz) = e1319d77bf8ac296b69cf68f66e4dadfb68a8519bd684cc83d29b8d6754d10ef
+SIZE (libtom-libtomcrypt-v1.18.1_GH0.tar.gz) = 2299746
diff --git a/security/libtomcrypt/files/patch-src_headers_tomcrypt__macros.h b/security/libtomcrypt/files/patch-src_headers_tomcrypt__macros.h
deleted file mode 100644
index ac376421b724..000000000000
--- a/security/libtomcrypt/files/patch-src_headers_tomcrypt__macros.h
+++ /dev/null
@@ -1,104 +0,0 @@
---- src/headers/tomcrypt_macros.h.orig 2007-05-12 14:46:25 UTC
-+++ src/headers/tomcrypt_macros.h
-@@ -262,21 +262,19 @@ static inline unsigned ROR(unsigned word
-
- #ifndef LTC_NO_ROLC
-
--static inline unsigned ROLc(unsigned word, const int i)
--{
-- asm ("roll %2,%0"
-- :"=r" (word)
-- :"0" (word),"I" (i));
-- return word;
--}
-+#define ROLc(word, i) ({ \
-+ unsigned _word = word; \
-+ asm ("roll %2,%0" \
-+ :"=r" (_word) \
-+ :"0" (_word),"I" (i)); \
-+ _word; })
-
--static inline unsigned RORc(unsigned word, const int i)
--{
-- asm ("rorl %2,%0"
-- :"=r" (word)
-- :"0" (word),"I" (i));
-- return word;
--}
-+#define RORc(word, i) ({ \
-+ unsigned _word = word; \
-+ asm ("rorl %2,%0" \
-+ :"=r" (_word) \
-+ :"0" (_word),"I" (i)); \
-+ _word; })
-
- #else
-
-@@ -305,21 +303,19 @@ static inline unsigned ROR(unsigned word
-
- #ifndef LTC_NO_ROLC
-
--static inline unsigned ROLc(unsigned word, const int i)
--{
-- asm ("rotlwi %0,%0,%2"
-- :"=r" (word)
-- :"0" (word),"I" (i));
-- return word;
--}
-+#define ROLc(word, i) ({ \
-+ unsigned _word = word; \
-+ asm ("rotlwi %0,%0,%2" \
-+ :"=r" (_word) \
-+ :"0" (_word),"I" (i)); \
-+ _word; })
-
--static inline unsigned RORc(unsigned word, const int i)
--{
-- asm ("rotrwi %0,%0,%2"
-- :"=r" (word)
-- :"0" (word),"I" (i));
-- return word;
--}
-+#define RORc(word, i) ({ \
-+ unsigned _word = word; \
-+ asm ("rotrwi %0,%0,%2" \
-+ :"=r" (_word) \
-+ :"0" (_word),"I" (i)); \
-+ _word; })
-
- #else
-
-@@ -361,21 +357,19 @@ static inline unsigned long ROR64(unsign
-
- #ifndef LTC_NO_ROLC
-
--static inline unsigned long ROL64c(unsigned long word, const int i)
--{
-- asm("rolq %2,%0"
-- :"=r" (word)
-- :"0" (word),"J" (i));
-- return word;
--}
-+#define ROL64c(word, i) ({ \
-+ unsigned long _word = word; \
-+ asm ("rolq %2,%0" \
-+ :"=r" (_word) \
-+ :"0" (_word),"J" (i)); \
-+ _word; })
-
--static inline unsigned long ROR64c(unsigned long word, const int i)
--{
-- asm("rorq %2,%0"
-- :"=r" (word)
-- :"0" (word),"J" (i));
-- return word;
--}
-+#define ROR64c(word, i) ({ \
-+ unsigned long _word = word; \
-+ asm ("rorq %2,%0" \
-+ :"=r" (_word) \
-+ :"0" (_word),"J" (i)); \
-+ _word; })
-
- #else /* LTC_NO_ROLC */
-
diff --git a/security/libtomcrypt/pkg-plist b/security/libtomcrypt/pkg-plist
index 957eaba25750..00296b76b941 100644
--- a/security/libtomcrypt/pkg-plist
+++ b/security/libtomcrypt/pkg-plist
@@ -11,13 +11,8 @@ include/tomcrypt_misc.h
include/tomcrypt_pk.h
include/tomcrypt_pkcs.h
include/tomcrypt_prng.h
-include/tomcrypt_test.h
lib/libtomcrypt.a
lib/libtomcrypt.so
-lib/libtomcrypt.so.0
-lib/libtomcrypt.so.0.0.117
-lib/libtomcrypt_prof.a
-lib/libtomcrypt_prof.so
-lib/libtomcrypt_prof.so.0
-lib/libtomcrypt_prof.so.0.0.117
-%%PORTDOCS%%%%DOCSDIR%%/pdf/crypt.pdf
+lib/libtomcrypt.so.1
+lib/libtomcrypt.so.1.0.1
+libdata/pkgconfig/libtomcrypt.pc