source: trunk/dports/devel/ResIL/Portfile

Last change on this file was 144441, checked in by devans@…, 23 months ago

libdevil, ResIL: add missing dependency on libGLU, increment revision to rebuild with libmng 2.0.3.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.3 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 144441 2016-01-08 23:45:11Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup muniversal 1.0
6
7name                ResIL
8conflicts           libdevil
9version             1.7.9
10revision            2
11categories          devel multimedia
12platforms           darwin
13license             LGPL-2.1
14maintainers         ryandesign openmaintainer
15
16description         Library to develop applications with powerful image \
17                    loading capabilities
18
19long_description    Resilient Image Library (ResIL, a fork of DevIL) is a programmer's \
20                    library to develop applications with very powerful image \
21                    loading capabilities, yet is easy for a developer to \
22                    learn and use. Ultimate control of images is left to the \
23                    developer, so unnecessary conversions, etc. are not \
24                    performed. ResIL utilizes a simple, yet powerful, \
25                    syntax. ResIL can load, save, convert, manipulate, \
26                    filter and display a wide variety of image formats.
27
28homepage            http://resil.sourceforge.net/
29master_sites        sourceforge:project/resil
30use_zip             yes
31
32checksums           rmd160  7a0e5a15df4af3db735234db8789909f2097deac \
33                    sha256  83f522170a3838f108e6d9e95989948f898df764c0838f614c8c18e6e8e8e918
34
35depends_lib         port:lcms \
36                    port:libmng \
37                    port:libpng \
38                    port:jpeg \
39                    port:tiff \
40                    port:jasper \
41                    port:xrender \
42                    port:libGLU \
43                    port:mesa
44
45extract {
46    # The 1.7.9 distfile has numerous packaging errors.
47    # https://sourceforge.net/p/resil/tickets/1/
48   
49    # Some files fail to extract. The names have non-ASCII characters; possibly a character encoding problem.
50    # Fortunately the files in question are unnecessary Visual Studio user settings so we can ignore the failure.
51    system -W ${distpath} "unzip ${extract.pre_args} ${distfiles} ${extract.post_args} || true"
52
53    # These directories are missing write permission for the user, causing permission errors when cleaning the port.
54    foreach d {include lib test} {
55        file attributes "${worksrcpath}/Input Libs/zlib128-dll/${d}" -permissions u+w
56    }
57
58    # Missing execute bit on scripts.
59    foreach f {build-aux/install-sh configure} {
60        file attributes ${worksrcpath}/${f} -permissions a+x
61    }
62}
63
64patchfiles          patch-ilur.c \
65                    patch-devil_internal_exports.h.diff \
66                    patch-lib-Makefile.am.diff \
67                    patch-include_IL_il.h \
68                    patch-src-IL-include-il_endian.h.diff \
69                    patch-strnicmp.diff
70
71# include/IL/config.h.in is missing.
72# https://sourceforge.net/p/resil/tickets/2/
73use_autoreconf      yes
74
75configure.args      --enable-ILU \
76                    --enable-ILUT \
77                    --enable-x11 \
78                    --enable-render \
79                    --enable-shm \
80                    --disable-allegro \
81                    --disable-exr \
82                    --disable-sdl \
83                    --disable-xpm
84if {![variant_isset universal]} {
85    if {${configure.build_arch} eq "i386"} {
86        configure.args-append   --enable-x86
87    } elseif {${configure.build_arch} eq "x86_64"} {
88        configure.args-append   --enable-x86_64
89    } else {
90        configure.args-append   --enable-ppc
91    }
92}
93set merger_configure_args(i386) --enable-x86
94set merger_configure_args(x86_64) --enable-x86_64
95set merger_configure_args(ppc) --enable-ppc
96set merger_configure_args(ppc64) --enable-ppc
97
98# https://sourceforge.net/p/resil/tickets/6/
99if {[string match *clang* ${configure.compiler}]} {
100    configure.cflags-append -std=gnu89
101}
102
103post-destroot {
104    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
105    xinstall -m 644 -W ${worksrcpath} AUTHORS COPYING CREDITS ChangeLog \
106        NEWS README TODO ${destroot}${prefix}/share/doc/${name}
107    file copy ${worksrcpath}/docs/html ${destroot}${prefix}/share/doc/${name}
108}
109
110variant sdl description {Enable libSDL renderer} {
111    depends_lib-append port:libsdl
112    configure.args-delete --disable-sdl
113}
114
115livecheck.regex     /${name}-(\[0-9.\]+)${extract.suffix}
Note: See TracBrowser for help on using the repository browser.