source: trunk/dports/archivers/libzzip/Portfile @ 82687

Last change on this file since 82687 was 82687, checked in by afb@…, 9 years ago

have libtool sort out the linker flag mess instead

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.8 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 82687 2011-08-18 09:38:30Z afb@macports.org $
3
4PortSystem      1.0
5
6name            libzzip
7set my_name     zziplib
8version         0.13.60
9categories      archivers devel
10platforms       darwin
11license         LGPL-2+
12maintainers     nomaintainer
13description     library providing read access on ZIP-archives
14
15long_description \
16    The ZZIPlib provides read access on ZIP-archives. The \
17    library uses only the patent-free compression-algorithms \
18    supported by Zlib. It provides functions that transparently \
19    access files being either real files or zipped files, \
20    both with the same filepath.
21
22homepage        http://zziplib.sourceforge.net/
23master_sites    sourceforge:${my_name}
24distname        ${my_name}-${version}
25use_bzip2       yes
26
27checksums       sha1    821ff9a7984ddccb6734e4a753e401e93c7d47ee \
28                rmd160  1640194821a456593c843288c65ec2ba1ffd2504
29
30depends_build   port:pkgconfig \
31                port:xmlto
32
33depends_lib     port:zlib
34
35patchfiles      patch-zzip_Makefile.in.diff
36
37set docdir ${prefix}/share/doc/${name}
38
39if {[variant_isset universal]} {
40    patchfiles-append patch-configure.ac.diff
41    use_autoconf yes
42}
43
44post-patch {
45    reinplace {/ZZIPLIB_LDFLAGS=/s/--export-dynamic/-export-dynamic/} \
46        ${worksrcpath}/configure
47}
48
49configure.env   PYTHON=/usr/bin/python
50
51post-configure {
52    set builddir [glob -dir ${worksrcpath} "Darwin*.d"]
53    reinplace -E {s|-arch [a-z0-9_]+||g} \
54        ${builddir}/zzip/zziplib-uninstalled.pc \
55        ${builddir}/zzip/zziplib.pc
56}
57
58# pax doesn't handle 32-bit uids, so running as nobody makes it fail...
59if {[getuid] == 0 && $macportsuser == "nobody"} {
60    build.asroot yes
61}
62
63post-destroot {
64    xinstall -d ${destroot}${docdir}/html
65
66    xinstall -m 0644 -W ${worksrcpath} COPYING.LIB ChangeLog README TODO \
67        ${destroot}${docdir}
68
69    eval xinstall -m 0644 [glob -directory ${worksrcpath}/docs "*.{css,htm}"] \
70        ${destroot}${docdir}/html
71
72    # We replace every soelim stub with a soft link, as ".so" groff directives
73    # don't work with gzip'd manpages.
74
75    foreach {f} [glob -directory ${destroot}${prefix}/share/man/man3 *.3] {
76        set channel [open ${f}]
77
78        if {[regexp {^\.so (.+)$} [read -nonewline ${channel}] _ target]} {
79            # This manpage is a soelim stub.
80            ln -sf [file tail ${target}] ${f}
81        }
82
83        close ${channel}
84    }
85}
86
87variant sdl description {Enable SDL support} {
88    depends_lib-append      path:lib/pkgconfig/sdl.pc:libsdl
89
90    configure.args-append   --enable-sdl
91
92    post-destroot {
93        xinstall -m 0644 ${worksrcpath}/docs/README.SDL ${destroot}${docdir}
94    }
95}
96
97livecheck.type      regex
98livecheck.url       http://sourceforge.net/projects/${my_name}/files/${my_name}13/
99livecheck.regex     "${my_name}13\/(\\d+(?:\\.\\d+)*)"
Note: See TracBrowser for help on using the repository browser.