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

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

use system python, in case user made bad python3 choice with python_select (#30477)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.7 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 82686 2011-08-18 09:36:35Z 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
44configure.env   PYTHON=/usr/bin/python
45
46post-configure {
47    set builddir [glob -dir ${worksrcpath} "Darwin*.d"]
48    reinplace -E {s|-arch [a-z0-9_]+||g} \
49        ${builddir}/zzip/zziplib-uninstalled.pc \
50        ${builddir}/zzip/zziplib.pc
51}
52
53# pax doesn't handle 32-bit uids, so running as nobody makes it fail...
54if {[getuid] == 0 && $macportsuser == "nobody"} {
55    build.asroot yes
56}
57
58post-destroot {
59    xinstall -d ${destroot}${docdir}/html
60
61    xinstall -m 0644 -W ${worksrcpath} COPYING.LIB ChangeLog README TODO \
62        ${destroot}${docdir}
63
64    eval xinstall -m 0644 [glob -directory ${worksrcpath}/docs "*.{css,htm}"] \
65        ${destroot}${docdir}/html
66
67    # We replace every soelim stub with a soft link, as ".so" groff directives
68    # don't work with gzip'd manpages.
69
70    foreach {f} [glob -directory ${destroot}${prefix}/share/man/man3 *.3] {
71        set channel [open ${f}]
72
73        if {[regexp {^\.so (.+)$} [read -nonewline ${channel}] _ target]} {
74            # This manpage is a soelim stub.
75            ln -sf [file tail ${target}] ${f}
76        }
77
78        close ${channel}
79    }
80}
81
82variant sdl description {Enable SDL support} {
83    depends_lib-append      path:lib/pkgconfig/sdl.pc:libsdl
84
85    configure.args-append   --enable-sdl
86
87    post-destroot {
88        xinstall -m 0644 ${worksrcpath}/docs/README.SDL ${destroot}${docdir}
89    }
90}
91
92livecheck.type      regex
93livecheck.url       http://sourceforge.net/projects/${my_name}/files/${my_name}13/
94livecheck.regex     "${my_name}13\/(\\d+(?:\\.\\d+)*)"
Note: See TracBrowser for help on using the repository browser.