1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-02-02 11:09:29 +00:00

- Update to 1.06

- Provide options for new mathematical backends
- Transfer maintainership to submitter

PR:		ports/83040
Submitted by:	Wesley Shields <wxs@csh.rit.edu>
Approved by:	Afarsec <afarsec@012.net.il> (maintainer)
This commit is contained in:
Pav Lucistnik 2005-08-29 14:58:21 +00:00
parent bc6e6582e1
commit 9e9dcc48e9
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=141339
4 changed files with 84 additions and 16 deletions

View File

@ -6,25 +6,48 @@
#
PORTNAME= libtomcrypt
PORTVERSION= 1.02
PORTVERSION= 1.06
CATEGORIES= security
MASTER_SITES= http://libtomcrypt.org/files/
DISTNAME= crypt-${PORTVERSION}
MAINTAINER= onatan@gmail.com
PATCH_SITES= http://www.libtomcrypt.org/files/patch-1.06/
PATCHFILES= makefile.diff
MAINTAINER= wxs@csh.rit.edu
COMMENT= Comprehensive, modular and portable cryptographic toolkit
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
MAKEFILE= makefile
MAKE_ARGS= DESTDIR="${PREFIX}" LIBPATH="/lib" INCPATH="/include" \
DATAPATH="${DOCSDIR}/pdf"
USE_BZIP2= yes
USE_GMAKE= yes
USE_REINPLACE= yes
ALL_TARGET= library
OPTIONS= DOCS "build documentation (depends on teTeX)" off
CFLAGS+= -I${PREFIX}/include
OPTIONS= DOCS "build documentation (depends on teTeX)" off \
LIBTOMMATH "Use LibTomMath" on \
TOMSFASTMATH "Use TomsFastMath" off
.include <bsd.port.pre.mk>
.if defined(WITHOUT_LIBTOMMATH) && defined(WITHOUT_TOMSFASTMATH)
IGNORE= You must choose either LibTomMath or TomsFastMath (or both)
.endif
.if !defined(WITHOUT_LIBTOMMATH)
BUILD_DEPENDS+= ${LOCALBASE}/include/tommath.h:${PORTSDIR}/math/libtommath
CFLAGS+= -DLTM_DESC
.endif
.if defined(WITH_TOMSFASTMATH)
BUILD_DEPENDS+= ${LOCALBASE}/include/tfm.h:${PORTSDIR}/math/tomsfastmath
CFLAGS+= -DTFM_DESC
.endif
.if defined(WITH_DOCS)
BUILD_DEPENDS+= latex:${PORTSDIR}/print/teTeX
.else
@ -32,16 +55,9 @@ NOPORTDOCS= yes
INSTALL_TARGET= install_lib
.endif
post-patch:
@${REINPLACE_CMD} -e \
's|/usr|${PREFIX}|; s|dvipdf|dvipdft|; \
s|-O3||; s|-funroll-loops||; s|-fomit-frame-pointer||; \
s|-Wno-unused-parameter||' \
${WRKSRC}/makefile
.if defined(MAINTAINER_MODE)
test: build
(cd ${WRKSRC}/demos/test && ${MAKE} test ${MAKE_ARGS} && ${WRKSRC}/demos/test/test)
(cd ${WRKSRC} && ${GMAKE} test && ${WRKSRC}/test)
.endif
.include <bsd.port.post.mk>

View File

@ -1,2 +1,4 @@
MD5 (crypt-1.02.tar.bz2) = f571fb2f984ec59d229a7f691c35b4d1
SIZE (crypt-1.02.tar.bz2) = 1025539
MD5 (crypt-1.06.tar.bz2) = f7b5fd2a5d4b2917576da7885f27e4a0
SIZE (crypt-1.06.tar.bz2) = 1160330
MD5 (makefile.diff) = 76b18782400494589c35e12e6cdd081d
SIZE (makefile.diff) = 1372

View File

@ -0,0 +1,52 @@
--- makefile.orig Thu Aug 18 13:07:13 2005
+++ makefile Thu Aug 18 13:10:14 2005
@@ -15,7 +15,7 @@
#ARFLAGS=r
# Compilation flags. Note the += does not write over the user's CFLAGS!
-CFLAGS += -c -I./testprof/ -I./src/headers/ -Wall -Wsign-compare -W -Wshadow -Wno-unused-parameter -DLTC_SOURCE
+CFLAGS += -c -I./testprof/ -I./src/headers/ -Wall -Wsign-compare -W -Wshadow -DLTC_SOURCE
# additional warnings (newer GCC 3.4 and higher)
#CFLAGS += -Wsystem-headers -Wdeclaration-after-statement -Wbad-function-cast -Wcast-align -Wstrict-prototypes -Wmissing-prototypes \
@@ -24,10 +24,10 @@
ifndef IGNORE_SPEED
# optimize for SPEED
-CFLAGS += -O3 -funroll-loops
+#CFLAGS += -O3 -funroll-loops
# add -fomit-frame-pointer. hinders debugging!
-CFLAGS += -fomit-frame-pointer
+#CFLAGS += -fomit-frame-pointer
# optimize for SIZE
#CFLAGS += -Os -DLTC_SMALL_CODE
@@ -249,10 +249,16 @@
install: library docs
install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(LIBPATH)
install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(INCPATH)
- install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(DATAPATH)
+ install -d -g $(GROUP) -o $(USER) $(DATAPATH)
+ install -g $(GROUP) -o $(USER) $(LIBNAME) $(DESTDIR)$(LIBPATH)
+ install -g $(GROUP) -o $(USER) $(HEADERS) $(DESTDIR)$(INCPATH)
+ install -g $(GROUP) -o $(USER) doc/crypt.pdf $(DATAPATH)
+
+install_lib: library
+ install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(LIBPATH)
+ install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(INCPATH)
install -g $(GROUP) -o $(USER) $(LIBNAME) $(DESTDIR)$(LIBPATH)
install -g $(GROUP) -o $(USER) $(HEADERS) $(DESTDIR)$(INCPATH)
- install -g $(GROUP) -o $(USER) doc/crypt.pdf $(DESTDIR)$(DATAPATH)
install_test: testprof/$(LIBTEST)
install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(LIBPATH)
@@ -305,7 +311,7 @@
latex crypt > /dev/null
makeindex crypt.idx > /dev/null
latex crypt > /dev/null
- dvipdf crypt
+ dvipdft crypt
mv -ivf crypt.pdf doc/crypt.pdf
rm -f $(LEFTOVERS)

View File

@ -1,4 +1,3 @@
include/ltc_tommath.h
include/tomcrypt.h
include/tomcrypt_argchk.h
include/tomcrypt_cfg.h
@ -7,13 +6,12 @@ include/tomcrypt_custom.h
include/tomcrypt_hash.h
include/tomcrypt_mac.h
include/tomcrypt_macros.h
include/tomcrypt_math.h
include/tomcrypt_misc.h
include/tomcrypt_pk.h
include/tomcrypt_pkcs.h
include/tomcrypt_prng.h
include/tomcrypt_test.h
include/tommath_class.h
include/tommath_superclass.h
lib/libtomcrypt.a
%%PORTDOCS%%%%DOCSDIR%%/pdf/crypt.pdf
%%PORTDOCS%%@dirrm %%DOCSDIR%%/pdf