source: trunk/dports/sysutils/getopt/Portfile

Last change on this file was 134066, checked in by devans@…, 2 years ago

getopt: build fix for non x86_64 archs, version 1.1.6 no longer ships with extraneous *.o files (#47173).

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.3 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 134066 2015-03-17 22:24:57Z ryandesign@macports.org $
3
4PortSystem          1.0
5
6name                getopt
7version             1.1.6
8categories          sysutils
9platforms           darwin
10license             GPL-2+
11maintainers         nomaintainer
12
13description         Parse command-line arguments from shell scripts
14long_description    Getopt(1) is a program to help shell scripts parse \
15                    command-line parameters. It is for example included \
16                    in util-linux (versions up to 2.7.1) for Linux. \
17                    But, there were some problems with that getopt(1) \
18                    implementation. I have written an implementation \
19                    of getopt(1) to solve some of these problems, \
20                    while still staying (for all practical purposes) \
21                    completely compatible with other getopt(1) \
22                    implementations. It has replaced the old util-linux \
23                    version, but it should be useful for other Unixes too.
24homepage            http://frodo.looijaard.name/project/getopt
25
26depends_lib         port:gettext
27installs_libs       no
28
29master_sites        http://frodo.looijaard.name/system/files/software/getopt
30
31checksums           rmd160  6ef3666d386450fa5ce249e7748805df5c8482c9 \
32                    sha256  d0bf1dc642a993e7388a1cddfb9409bed375c21d5278056ccca3a0acd09dc5fe
33
34patchfiles          patch-Makefile.diff
35
36post-patch {
37    reinplace -E "/^CFLAGS/s|\$| [get_canonical_archflags cc]|" ${worksrcpath}/Makefile
38    reinplace -E "/^LDFLAGS/s|\$| [get_canonical_archflags ld]|" ${worksrcpath}/Makefile
39}
40
41use_configure       no
42
43variant universal   {}
44
45build.args          CC=${configure.cc} \
46                    LIBCGETOPT=0 \
47                    mandir=${prefix}/share/man \
48                    prefix=${prefix}
49
50destroot.args       ${build.args}
51destroot.target     install install_doc
52
53post-destroot {
54    set docdir ${prefix}/share/doc/${name}
55    xinstall -d ${destroot}${docdir}
56    xinstall -m 644 -W ${worksrcpath} COPYING Changelog README TODO \
57        ${destroot}${docdir}
58}
59
60platform darwin 8 powerpc {
61    configure.universal_ldflags-append -liconv
62}
63
64livecheck.type      regex
65livecheck.url       ${homepage}
66livecheck.regex     ${name}-(\\d+(?:\\.\\d+)*)
Note: See TracBrowser for help on using the repository browser.