Skip to content
Permalink
Browse files

cryptlib: Update to 3.4.4

  • Loading branch information
ryandesign committed Mar 28, 2018
1 parent 12eaac5 commit 431389fbaabc6a08aae95f6c04ea6d099dbaffc0
Showing with 46 additions and 46 deletions.
  1. +22 −16 devel/cryptlib/Portfile
  2. +24 −19 devel/cryptlib/files/patch-makefile.diff
  3. +0 −11 devel/cryptlib/files/patch-tools-ccopts.sh.diff
@@ -5,19 +5,18 @@ PortGroup conflicts_build 1.0

# Quoth the makefile: "[Multiple-architecture building] is rather trouble-prone
# because the low-level crypto code has to configure itself for CPU endianness
# and word size for the algorithms that require low-level bit fiddling, and
# and word size 5975092or the algorithms that require low-level bit fiddling, and

This comment has been minimized.

Copy link
@l2dy

l2dy Mar 28, 2018

Member

Typo?

This comment has been minimized.

Copy link
@ryandesign

ryandesign Mar 28, 2018

Author Contributor

Oops. Paste-o.

# uses different code strategies depending on the CPU architecture and bit
# width. This single-pass build for multiple architectures often causes
# problems, and you're more or less on your own if you decide to try it."
PortGroup muniversal 1.0

name cryptlib
version 3.4.3.1
revision 1
version 3.4.4
set branch [join [lrange [split ${version} .] 0 1] .]
categories devel security crypto
platforms darwin
maintainers ryandesign openmaintainer
maintainers {ryandesign @ryandesign} openmaintainer
license {Sleepycat Restrictive}

description cryptlib is a powerful security toolkit (library)
@@ -34,44 +33,51 @@ long_description cryptlib is a powerful security toolkit that allows even \
homepage https://www.cs.auckland.ac.nz/~pgut001/cryptlib/
master_sites ftp://ftp.franken.de/pub/crypt/cryptlib/ \
http://www.cypherpunks.to/~peter/
# 3.4.3.1 was stealth-updated 2017-01-30
dist_subdir ${name}/${version}_1
distname cl[join [split $version .] ""]
use_zip yes

checksums rmd160 e4b48ea2b888a4cc684d425520b49e0578c39263 \
sha256 4a608d725f66669d983083420f9f57f763f320292c50346de3e8c1caeee743bd
checksums rmd160 0c51232bba6eac582b16991f6d01518dc8cbf49f \
sha256 aa461b57c703f987a649a3987feb10d088d440f42b3160ef36104058909fec3d \
size 5975092

depends_lib port:zlib

pre-extract {
# DOS to UNIX line endings.
extract.pre_args-append -a
}
extract.mkdir yes

patchfiles-append patch-makefile.diff \
patch-tools-ccopts.sh.diff
patchfiles-append patch-makefile.diff

# Build fails when compiler is gcc or llvm-gcc; warnings are printed when compiler is clang.
conflicts_build unixODBC

use_configure no

configure.ldflags-append -lz

build.target default shared
build.env CC="${configure.cc}" \
build.args CC="${configure.cc}" \
PREFIX="${prefix}"

configure.cppflags-replace -I${prefix}/include -isystem${prefix}/include

foreach arch ${universal_archs} {
lappend merger_build_env(${arch}) CFLAGS='${configure.cflags} ${configure.cppflags} -arch ${arch}'
lappend merger_build_env(${arch}) LDFLAGS='-arch ${arch}'
# set archflag "-arch ${arch}"
# lappend merger_build_env(${arch}) \
# CFLAGS=[list {*}${configure.cflags} {*}${configure.cppflags} {*}${archflag}] \
# LDFLAGS=[list {*}${configure.ldflags} {*}${archflag}]
lappend merger_build_env(${arch}) \
CFLAGS="${configure.cflags} ${configure.cppflags} -arch ${arch}" \
LDFLAGS="${configure.ldflags} -arch ${arch}"
}

if {![variant_isset universal] && [info exists merger_build_env(${build_arch})]} {
build.env-append $merger_build_env(${build_arch})
if {![variant_isset universal] && [info exists merger_build_env(${configure.build_arch})]} {
build.env-append $merger_build_env(${configure.build_arch})
}

destroot.env PREFIX="${prefix}"
destroot.args PREFIX="${prefix}"

post-destroot {
set docdir ${prefix}/share/doc/${subport}
@@ -1,6 +1,6 @@
--- makefile.orig 2016-12-06 21:19:04.000000000 -0600
+++ makefile 2017-01-16 20:53:04.000000000 -0600
@@ -90,7 +90,7 @@
--- makefile.orig 2018-02-08 12:39:38.000000000 -0600
+++ makefile 2018-03-28 08:16:58.000000000 -0500
@@ -93,7 +93,7 @@
# Further cc flags are gathered dynamically at runtime via the ccopts.sh
# script.

@@ -9,26 +9,31 @@
CFLAGS_ANALYSE = -c -D__UNIX__ -I.
CFLAGS_COVERAGE = -c -D__UNIX__ -I. -ggdb3 -fno-omit-frame-pointer -O1 --coverage -fprofile-arcs -ftest-coverage
CFLAGS_DEBUG = -c -D__UNIX__ -I. -ggdb3 -fno-omit-frame-pointer -O0
@@ -1489,7 +1489,8 @@
@@ -450,6 +450,7 @@
@if [ ! -d "$(DESTDIR)$(PATH_LIB)" ] ; then \
mkdir -p "$(DESTDIR)$(PATH_LIB)" ; \
chmod 755 "$(DESTDIR)$(PATH_LIB)" ; \
+ fi
@if [ ! -d "$(DESTDIR)$(PATH_INCLUDE)" ] ; then \
mkdir -p "$(DESTDIR)$(PATH_INCLUDE)" ; \
chmod 755 "$(DESTDIR)$(PATH_INCLUDE)" ; \
@@ -470,6 +471,8 @@
if [ -f "$(DYLIBNAME)" ] ; then \
cp "$(DYLIBNAME)" "$(DESTDIR)$(PATH_LIB)" ; \
chmod 755 "$(DESTDIR)$(PATH_LIB)/$(DYLIBNAME)" ; \
+ ln -s "$(DYLIBNAME)" "$(DESTDIR)$(PATH_LIB)/lib$(PROJ).$(MAJ).dylib" ; \
+ ln -s "$(DYLIBNAME)" "$(DESTDIR)$(PATH_LIB)/lib$(PROJ).dylib" ; \
fi
cp cryptlib.h "$(DESTDIR)$(PATH_INCLUDE)"
chmod 644 "$(DESTDIR)$(PATH_INCLUDE)/cryptlib.h"
@@ -1557,8 +1560,9 @@
$(STRIP) $(MAJ).$(MIN) $(OBJS) $(EXTRAOBJS)

$(DYLIBNAME): $(OBJS) $(EXTRAOBJS) $(TESTOBJS)
- @$(LD) -dynamiclib -compatibility_version $(MAJ).$(MIN) \
+ $(LD) $(LDFLAGS) -dynamiclib -install_name $(PREFIX)/lib/$(DYLIBNAME) \
+ -compatibility_version $(MAJ).$(MIN) \
+ $(LD) $(LDFLAGS) -dynamiclib -compatibility_version $(MAJ).$(MIN) \
-current_version $(MAJ).$(MIN).$(PLV) \
+ -install_name $(PATH_LIB)/$(DYLIBNAME) \
`./tools/getlibs.sh autodetect` \
-o $(DYLIBNAME) $(OBJS) $(EXTRAOBJS)

@@ -2854,3 +2855,12 @@
fi
@if [ `uname -s` = 'CYGWIN_NT-5.0' ] ; then rm -f *.exe; fi
@if [ `uname -s` = 'HP-UX' ] ; then rm -f lib$(PROJ).sl; fi
+
+
+install:
+ install -d $(DESTDIR)$(PREFIX)/lib
+ install -m 644 $(LIBNAME) $(DESTDIR)$(PREFIX)/lib
+ install -m 644 $(DYLIBNAME) $(DESTDIR)$(PREFIX)/lib
+ ln -s $(DYLIBNAME) $(DESTDIR)$(PREFIX)/lib/lib$(PROJ).dylib
+ install -d $(DESTDIR)$(PREFIX)/include
+ install -m 644 cryptlib.h $(DESTDIR)$(PREFIX)/include

This file was deleted.

0 comments on commit 431389f

Please sign in to comment.
You can’t perform that action at this time.