source: trunk/dports/net/whois/Portfile

Last change on this file was 154094, checked in by mojca@…, 9 months ago

whois: switch to perl5.24 (#52081)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.0 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 154094 2016-10-20 02:58:18Z ryandesign@macports.org $
3
4################################################################
5# The developer of whois is hostile toward bug reports. Do     #
6# not waste his time and yours by speaking with him about his  #
7# software. If you encounter problems updating this port to a  #
8# newer version, find a workaround and write a patch. Do not   #
9# report upstream. See http://trac.macports.org/ticket/16037   #
10################################################################
11
12PortSystem                  1.0
13PortGroup                   compiler_blacklist_versions 1.0
14PortGroup                   perl5 1.0
15
16name                        whois
17conflicts                   bahamut expect ripe-whois
18version                     5.2.12
19revision                    1
20categories                  net
21maintainers                 ryandesign
22license                     GPL-2+
23homepage                    http://www.linux.it/~md/software/
24platforms                   darwin
25use_parallel_build          yes
26
27description                 A replacement whois client
28
29long_description            whois is an improved whois client that follows the \
30                            delegations from the Verisign whois server.
31
32master_sites                http://ftp.debian.org/debian/pool/main/w/${name}/
33use_xz                      yes
34
35checksums                   rmd160  2740a4d95127e83b6016458620d981003df9d665 \
36                            sha256  b26d4027b8987d9911466aa06ce2c167a50017cd59a622a429bd506222f6cdf1
37
38distfiles                   ${name}_${version}${extract.suffix}
39
40perl5.branches              5.24
41
42depends_build               port:perl${perl5.major}
43
44depends_lib                 port:gettext \
45                            port:libidn \
46                            port:libiconv
47
48# arc4random_buf is not available until OS X v10.7.
49patchfiles-append           patch-arc4random_buf.diff
50
51# Bugs should be reported to MacPorts, not upstream.
52patchfiles-append           patch-bugreport.diff
53
54# entropy should not be redeclared.
55patchfiles-append           patch-entropy.diff
56
57# Add libidn and libiconv support.
58patchfiles-append           patch-idn-iconv.diff
59
60platform darwin {
61    # -lcrypt cannot be used (and is unnecessary) on Mac OS X
62    patchfiles-append       patch-lcrypt.diff
63}
64
65post-patch {
66    reinplace "s|/etc/whois\.conf|${prefix}/etc/whois.conf|g" ${worksrcpath}/whois.1
67}
68
69use_configure               no
70
71compiler.blacklist          {clang < 318}
72
73configure.cflags-append     -DENABLE_NLS
74configure.ldflags-append    -lintl
75configure.perl              ${perl5.bin}
76
77post-configure {
78    system -W ${worksrcpath} "CC='${configure.cc}' ${build.cmd} depend servers_charset.h PERL='${configure.perl}'"
79}
80
81variant universal {}
82
83build.target-append         pos
84build.env                   CC="${configure.cc} [get_canonical_archflags]" \
85                            CONFIG_FILE=${prefix}/etc/whois.conf \
86                            HAVE_LIBIDN=1 \
87                            HAVE_ICONV=1 \
88                            LOCALEDIR=${prefix}/share/locale
89build.args                  prefix=${prefix} \
90                            INCLUDES="${configure.cflags} ${configure.cppflags}" \
91                            LIBS="${configure.ldflags}" \
92                            PERL="${configure.perl}"
93
94destroot.target-append      install-pos
95destroot.args               prefix=${destroot}${prefix}
96
97post-destroot {
98    xinstall -m 644 -W ${worksrcpath} whois.conf ${destroot}${prefix}/etc/whois.conf.sample
99}
100
101notes "
102To customize which whois servers get used, copy\
103${prefix}/etc/whois.conf.sample to\
104${prefix}/etc/whois.conf and then make changes.
105"
106
107pre-activate {
108    # Clear the notes if the user has already done what they say to do.
109    if {[file exists ${prefix}/etc/whois.conf]} {
110        notes
111    }
112}
113
114livecheck.type              regex
115livecheck.url               [lindex ${master_sites} 0]?C=M&O=D
116livecheck.regex             "${name}_(.+?)${extract.suffix}"
Note: See TracBrowser for help on using the repository browser.