source: trunk/dports/graphics/jbigkit/Portfile

Last change on this file was 118747, checked in by ryandesign@…, 3 years ago

jbigkit: go back to removing -Wno-unused-result for old compilers; gcc-4.2 doesn't like it

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.1 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 118747 2014-04-10 12:22:39Z ryandesign@macports.org $
3
4PortSystem              1.0
5
6name                    jbigkit
7version                 2.1
8categories              graphics
9license                 GPL-2+
10platforms               darwin
11maintainers             nomaintainer
12
13description             Data compression algorithm for bi-level high-res images
14
15long_description        JBIG-KIT provides a portable library of compression \
16                        and decompression functions with a documented \
17                        interface that you can very easily include into your \
18                        image or document processing software. In addition, \
19                        JBIG-KIT provides ready-to-use compression and \
20                        decompression programs with a simple command line \
21                        interface (similar to the converters found in netpbm).
22
23homepage                http://www.cl.cam.ac.uk/~mgk25/${name}/
24master_sites            ${homepage}download/
25
26checksums               rmd160  71cc51fce3f65d8d9abf9ff52c29edf5469eb52f \
27                        sha256  de7106b6bfaf495d6865c7dd7ac6ca1381bd12e0d81405ea81e7f2167263d932
28
29patchfiles              patch-Makefile
30
31use_configure           no
32
33variant universal {}
34
35build.args              CC="${configure.cc} ${configure.cppflags} ${configure.cflags} [get_canonical_archflags cc]"
36
37test.run                yes
38test.target             test
39
40destroot {
41    xinstall -m 755 -d \
42        ${destroot}${prefix}/share/doc/${name} \
43        ${destroot}${prefix}/share/examples
44    xinstall -m 755 -W ${worksrcpath}/pbmtools jbgtopbm pbmtojbg \
45        ${destroot}${prefix}/bin
46    xinstall -m 644 -W ${worksrcpath}/pbmtools jbgtopbm.1 pbmtojbg.1 \
47        ${destroot}${prefix}/share/man/man1
48    xinstall -m 644 -W ${worksrcpath}/libjbig jbig.h jbig_ar.h \
49        ${destroot}${prefix}/include
50    xinstall -m 644 -W ${worksrcpath} ANNOUNCE CHANGES COPYING INSTALL TODO \
51        ${destroot}${prefix}/share/doc/${name}
52    copy ${worksrcpath}/examples \
53        ${destroot}${prefix}/share/examples/${name}
54}
55
56set name_version        ${version}
57set install_version     [join [lrange [split ${version} .] 0 0] .]
58
59platform darwin {
60    patchfiles-append   patch-libjbig_Makefile_darwin
61
62    post-patch {
63        reinplace "s|__MACPORTS_PREFIX__|${prefix}|g" \
64            ${worksrcpath}/libjbig/Makefile
65        reinplace "s|__MACPORTS_VERSION__|${name_version}|g" \
66            ${worksrcpath}/libjbig/Makefile
67        reinplace "s|__MACPORTS_INSTALL_VERSION__|${install_version}|g" \
68            ${worksrcpath}/libjbig/Makefile
69    }
70
71    post-destroot {
72        xinstall -m 644 -W ${worksrcpath}/libjbig libjbig.${name_version}.dylib \
73            ${destroot}${prefix}/lib
74        ln -s libjbig.${name_version}.dylib ${destroot}${prefix}/lib/libjbig.${install_version}.dylib
75        ln -s libjbig.${name_version}.dylib ${destroot}${prefix}/lib/libjbig.dylib
76    }
77}
78
79livecheck.type          regex
80livecheck.url           ${master_sites}
81livecheck.regex         "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"
Note: See TracBrowser for help on using the repository browser.