source: trunk/dports/devel/lua-md5/Portfile

Last change on this file was 114431, checked in by and.damore@…, 4 years ago

Drop maintenance, leave openmaintainer in ports with shared maintenance

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.4 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 114431 2013-12-08 09:48:42Z ryandesign@macports.org $
3
4PortSystem          1.0
5
6name                lua-md5
7version             1.1.2
8revision            1
9categories          devel
10license             MIT
11platforms           darwin
12maintainers         nomaintainer
13description         basic cryptographic facilities for Lua 5.1
14long_description    MD5 offers basic cryptographic facilities for Lua 5.1: a hash (digest) \
15                    function, a pair crypt/decrypt based on MD5 and CFB, and a pair \
16                    crypt/decrypt based on DES with 56-bit keys.
17
18homepage            http://www.keplerproject.org/md5
19master_sites        http://luaforge.net/frs/download.php/3355/
20distname            md5-${version}
21
22depends_lib         port:lua
23checksums           md5     68874cff64547f2157d5ecdc3572b544 \
24                    sha1    f6c2ee21faf94c6ee95fc767ef2fdf0cf0382dc9 \
25                    rmd160  bd74bc5eddf3167ff0d64b72be0ad428331399a7
26
27patchfiles          patch-config.diff \
28                    patch-tests-DES56-Makefile.diff
29
30post-patch {
31    eval file copy [glob -directory ${worksrcpath}/src des56.{h,c}] ${worksrcpath}/tests/DES56
32
33    # clang doesn't support -O6
34    if {[vercmp $xcodeversion 4.1] >= 0} {
35        reinplace "s| -O6||" ${worksrcpath}/tests/DES56/makefile     
36    }
37}
38
39variant universal {}
40
41build.args          CC=${configure.cc} \
42                    PREFIX=${prefix}
43
44# configure script is not from autotools, it only searches for lua binary prefix
45# it is needed to manually set flags env variable in build phase
46build.env-append    CFLAGS="${configure.cflags} [get_canonical_archflags cc]" \
47                    LDFLAGS="${configure.ldflags} [get_canonical_archflags ld] -llua -lm"
48
49post-build {
50    # fdemo example is broken, it's using libcrypt
51    system -W ${worksrcpath}/tests/DES56 "[join ${build.env}] ${build.cmd} [join ${build.args}] fdemo"
52}
53
54post-destroot {
55    xinstall -d ${destroot}${prefix}/share/doc/${name}
56    eval xinstall -m 644 ${worksrcpath}/README [glob ${worksrcpath}/doc/us/*] \
57        ${destroot}${prefix}/share/doc/${name}
58
59    xinstall -d ${destroot}${prefix}/share/examples/${name}
60    xinstall -m 755 ${worksrcpath}/tests/DES56/fdemo \
61        ${destroot}${prefix}/share/examples/${name}
62    xinstall -m 644 -W ${worksrcpath}/tests DES56/fdemo.c test.lua \
63        ${destroot}${prefix}/share/examples/${name}
64}
Note: See TracBrowser for help on using the repository browser.