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

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

libzzip: bump revision, for two latest commits

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