source: trunk/dports/archivers/unrar/Portfile

Last change on this file was 137799, checked in by and.damore@…, 2 years ago

port unrar: update to 5.2.7, fix #48109; maintainer timeout (in #40776)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.2 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 137799 2015-06-20 06:29:54Z ryandesign@macports.org $
3
4PortSystem              1.0
5
6name                    unrar
7set my_name             ${name}src
8version                 5.2.7
9categories              archivers
10platforms               darwin freebsd
11maintainers             krischik openmaintainer
12license                 Restrictive/Distributable
13
14description             Extract, view & test RAR archives
15
16long_description        The unRAR utility is a minor part of the RAR archiver \
17                        and contains RAR uncompression algorithm. unRAR \
18                        requires very small volume of memory to operate.
19
20homepage                http://www.rarlab.com/
21master_sites            ${homepage}rar/
22distname                ${my_name}-${version}
23
24checksums               rmd160  2c7379aeff32ea156a0d368b9ec89aeaa6069aa2 \
25                        sha256  ef14757e943787b439fedf2c564c1f38d0db315528a928e0de170860717e2fac
26
27patchfiles              patch-dll.hpp.diff \
28                        patch-makefile.unix.diff
29
30worksrcdir              ${name}
31
32use_configure           no
33
34variant universal {}
35
36if {[tbool configure.ccache]} {
37    configure.cxx "ccache ${configure.cxx}"
38}
39
40set cxx_stdlibflags {}
41if {[string match *clang* ${configure.cxx}]} {
42    set cxx_stdlibflags -stdlib=${configure.cxx_stdlib}
43}
44
45build.args              -f makefile \
46                        CXX="[join ${configure.cxx}]"
47
48# The makefile misuses the DESTDIR variable as if it were PREFIX. We need it at
49# build time so the library gets the correct install_name.
50build.args-append       DESTDIR=${prefix}
51
52pre-build {
53    build.args-append   CXXFLAGS="${configure.cxxflags} [get_canonical_archflags cxx] ${cxx_stdlibflags}" \
54                        LDFLAGS="${configure.ldflags} [get_canonical_archflags ld] ${cxx_stdlibflags}"
55}
56
57post-destroot {
58    set docdir ${prefix}/share/doc/${subport}
59    xinstall -d ${destroot}${docdir}
60    xinstall -m 644 -W ${worksrcpath} license.txt readme.txt ${destroot}${docdir}
61}
62
63platform darwin {
64    patchfiles-append   patch-dylib.diff
65}
66
67if {${name} == ${subport}} {
68    installs_libs       no
69   
70    destroot {
71        xinstall ${worksrcpath}/${name} ${destroot}${prefix}/bin
72    }
73   
74    livecheck.type      regex
75    livecheck.url       ${homepage}rar_add.htm
76    livecheck.regex     ${my_name}-(\\d+(?:\\.\\d+)*)
77} else {
78    livecheck.type      none
79}
80
81subport libunrar {
82    description         unrar library
83    long_description    ${description}
84   
85    # Copied from standalone libunrar port. Why do we need these?
86    configure.cxxflags-append -DSILENT -DGUI
87   
88    # The makefile adds -fPIC to the CXXFLAGS when building the library, but we
89    # override the CXXFLAGS with our own, so we have to manually add this again.
90    configure.cxxflags-append -fPIC
91   
92    build.target        lib
93   
94    destroot {
95        xinstall -d ${destroot}${prefix}/include/unrar
96        xinstall -m 644 ${worksrcpath}/dll.hpp ${destroot}${prefix}/include/unrar
97        if {${os.platform} eq "darwin"} {
98            xinstall ${worksrcpath}/libunrar.dylib ${destroot}${prefix}/lib
99        } else {
100            xinstall ${worksrcpath}/libunrar.so ${destroot}${prefix}/lib
101        }
102    }
103}
Note: See TracBrowser for help on using the repository browser.