Ticket #40741: Portfile.3

File Portfile.3, 3.4 KB (added by christophe.pradal@…, 11 years ago)

Replace the initial Portfile, taking into account the comments

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: $
3
4PortSystem                      1.0
5
6name                            libPyQGLViewer
7version                         2.3.17   
8platforms                       darwin
9maintainers                     inria.fr:christophe.pradal openmaintainer
10license                         {GPL-2+ Commercial}
11categories                      graphics
12description                     A friendly fork of a C++ library based on Qt that eases the creation of OpenGL \
13                                3D viewers
14homepage                        http://www.libqglviewer.com/
15long_description                libQGLViewer is a C++ library based on Qt that eases the \
16                                creation of OpenGL 3D viewers. It provides some of the typical \
17                                3D viewer functionalities, such as the possibility to move the \
18                                camera using the mouse, which lacks in most of the other APIs. \
19                                Other features include mouse manipulated frames, interpolated \
20                                keyFrames, object selection, stereo display, screenshot saving \
21                                and much more. It can be used by OpenGL beginners as well as \
22                                to create complex applications, being fully customizable and \
23                                easy to extend.  \
24                                It as been forked to allow running sip on it to create Python wrappers.
25
26conflicts                       libQGLViewer
27
28master_sites                    https://gforge.inria.fr/frs/download.php/32979
29
30
31distname                       libPyQGLViewer
32worksrcdir                      ${distname}-${version}
33
34checksums                       rmd160  6451253bd9d6f347d1af73e7a48bc9d2d5cf48db \
35                                sha256  94860a337879f63ad7598192f0d31da1d275af7bff8c910a0c0abd5b902887fb
36
37patchfiles                      patch-QGLViewer.pro.diff \
38                                patch-designerPlugin.pro.diff
39# the terrain example does not compile on Lion; see #30886
40platform darwin 11 {
41    patchfiles-append           patch-contribs.pro.diff
42}
43
44variant universal {}
45
46PortGroup                   qmake 1.0
47
48
49post-patch {
50    reinplace "s|@@QT_PLUGINS_DIR@@|${qt_plugins_dir}|g" ${worksrcpath}/designerPlugin/designerPlugin.pro
51   
52    if {[variant_isset universal]} {
53        file copy ${filespath}/universal.sh ${worksrcpath}
54        reinplace "s|@@@WRKSRCPATH@@@|${worksrcpath}|" ${worksrcpath}/universal.sh
55        reinplace "s|@@@ARCHS@@@|${configure.universal_cxxflags}|" ${worksrcpath}/universal.sh
56        system "chmod +x ${worksrcpath}/universal.sh && ${worksrcpath}/universal.sh"
57    }
58}
59
60configure.pre_args-append       DOC_DIR=${prefix}/share/doc/${name}
61configure.post_args-append      -after QMAKE_POST_LINK=\"\"
62
63use_parallel_build              no
64
65post-destroot {
66    system -W ${worksrcpath}/examples "make clean"
67    copy ${worksrcpath}/examples ${destroot}${applications_dir}/libQGLViewer\ Examples
68    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
69    xinstall -m 644 -W ${worksrcpath} \
70        changelog.txt \
71        GPL_exception.txt \
72        licence.txt  \
73        readMe.txt \
74        ${destroot}${prefix}/share/doc/${name}
75}
76
77livecheck.type                  regex
78livecheck.regex                 "Version (\\d+(?:\\.\\d+)*)"