Ticket #38306: Portfile.2

File Portfile.2, 1.5 KB (added by cooljeanius (Eric Gallager), 12 years ago)

new portfile

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$
3
4PortSystem          1.0
5
6name                osxbom
7categories          sysutils
8maintainers         gwmail.gwu.edu:egall openmaintainer
9platforms           darwin
10license             public-domain
11
12description         A free re-implementation of the NextSTEP/OSX lsbom utility
13long_description    ${description}. Used by the PureDarwin project to work with MacPorts \
14                    binary packages.
15homepage            https://cauldrondevelopment.com/svn/${name}/trunk/
16variant universal {}
17
18livecheck.type      none
19
20fetch.type          svn
21svn.url             ${homepage}
22svn.revision        3
23version             0.0.${svn.revision}
24
25worksrcdir          trunk
26
27use_configure       no
28
29set CFLAGS         "${configure.cflags} [get_canonical_archflags cc]"
30
31build.env-append    CC=${configure.cc} \
32                    CXX=${configure.cxx} \
33                    CPP=${configure.cpp}
34
35pre-build {
36    reinplace "s|-Werror|${CFLAGS}|" ${worksrcpath}/Makefile
37}
38
39destroot {
40        xinstall ${worksrcpath}/lsbom ${destroot}${prefix}/bin
41        xinstall ${worksrcpath}/bom.h ${destroot}${prefix}/include
42}
43
44variant rename description {Prevent osxbom from shadowing the system lsbom} {
45    destroot {
46        xinstall ${worksrcpath}/lsbom ${destroot}${prefix}/bin/${name}
47        xinstall -d ${destroot}${prefix}/include/${name}
48        xinstall ${worksrcpath}/bom.h ${destroot}${prefix}/include/${name}
49    }
50}
51
52default_variants    +rename