Ticket #34823: Portfile

File Portfile, 2.8 KB (added by jsd_macports@…, 12 years ago)

Portfile with override to force -L/opt/local/lib on compiler command line

Line 
1# $Id: Portfile 94199 2012-06-12 07:43:29Z ryandesign@macports.org $
2
3PortSystem 1.0
4
5name            cdrtools
6version         3.00
7revision        1
8categories      sysutils
9platforms               darwin
10description     ISO 9660 filesystem and CD creation tools
11long_description        The cdrtools software includes programs to create \
12                        and/or extract ISO 9660 filesystems, verify their \
13                        integrity, and write them to a disc. \
14                        Note, this port conflicts with the dvdrtools port.
15homepage        http://cdrecord.berlios.de/old/private/cdrecord.html
16maintainers     gmail.com:bytestorm openmaintainer
17master_sites    ftp://ftp.berlios.de/pub/cdrecord/ \
18                ftp://ftp.cs.tu-berlin.de/pub/misc/cdrecord/alpha/
19
20checksums       md5     f9fbab08fbd458b0d2312976d8c5f558 \
21                sha1    6464844d6b936d4f43ee98a04d637cd91131de4e \
22                rmd160  210684ab5e286ef59b788b49bd0b74d88f6435f4
23
24use_bzip2       yes
25
26depends_build   port:smake
27
28depends_lib     port:gettext
29
30post-patch {
31        reinplace "s|/opt/schily|${prefix}|g" \
32                ${worksrcpath}/DEFAULTS/Defaults.darwin \
33                ${worksrcpath}/DEFAULTS/Defaults.mac-os10 \
34                ${worksrcpath}/DEFAULTS_ENG/Defaults.darwin \
35                ${worksrcpath}/DEFAULTS_ENG/Defaults.mac-os10 \
36                ${worksrcpath}/libfind/find.c \
37                ${worksrcpath}/libfind/find_main.c \
38                ${worksrcpath}/librscg/scsi-remote.c \
39                ${worksrcpath}/TEMPLATES/Defaults.gcc
40}
41
42use_configure   no
43
44# hangs the same way as smake itself with both llvm-gcc-4.2 and
45# Xcode 4.1's clang
46# https://trac.macports.org/ticket/30310
47if {${configure.compiler} == "llvm-gcc-4.2"} {
48    configure.compiler  gcc-4.2
49} elseif {${configure.compiler} == "clang" && [vercmp $xcodeversion 4.3] < 0} {
50    depends_build-append port:apple-gcc42
51    configure.compiler  apple-gcc-4.2
52}
53
54build.cmd       smake
55build.args  CC=${configure.cc}
56#[J] link fails for isoinfo,mkisofs; https://trac.macports.org/ticket/34823
57build.args-append  LDPATH=-L/opt/local/lib
58
59use_parallel_build no
60
61post-build {
62    # The build script doesn't notice when a program fails to build, so we must
63    # verify it ourselves. See https://trac.macports.org/ticket/34823
64    set progs {btcflash cdda2wav cdrecord devdump isodebug isodump isoinfo isovfy mkisofs readcd scgcheck scgskeleton}
65    fs-traverse path ${worksrcpath} {
66        if {[file isfile ${path}] && [string match {*/OBJ/*} ${path}]} {
67            set file [file tail ${path}]
68            set prog_index [lsearch ${progs} ${file}]
69            if {${prog_index} != -1} {
70                set progs [lreplace ${progs} ${prog_index} ${prog_index}]
71            }
72        }
73    }
74    if {[llength ${progs}] > 0} {
75        ui_error "The following programs did not build: [join ${progs} {, }]"
76        return -code error "build failed"
77    }
78}
79
80destroot.args   DEFINSUSR=${install.user} DEFINSGRP=${install.group} INS_BASE=${prefix}
81
82post-destroot {
83    move ${destroot}/etc/default ${destroot}${prefix}/etc/
84}
85
86livecheck.url   [lindex ${master_sites} 0]
87livecheck.regex ${name}-(\[0-9.\]+)\\.tar