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 | |
---|
3 | PortSystem 1.0 |
---|
4 | |
---|
5 | name ipe |
---|
6 | version 7.2.24 |
---|
7 | categories graphics |
---|
8 | maintainers nomaintainer |
---|
9 | description The Ipe extensible drawing editor |
---|
10 | long_description \ |
---|
11 | Ipe is a drawing editor for creating figures in PDF or \ |
---|
12 | (encapsulated) Postscript format. It supports making small \ |
---|
13 | figures for inclusion into LaTeX-documents as well as making \ |
---|
14 | multi-page PDF presentations that can be shown on-line with \ |
---|
15 | Acrobat Reader. |
---|
16 | license GPL-3+ |
---|
17 | homepage http://ipe.otfried.org |
---|
18 | platforms macosx |
---|
19 | master_sites https://github.com/otfried/ipe/releases/download/v${version} |
---|
20 | distname ${name}-${version}-src |
---|
21 | worksrcdir ${name}-${version}/src |
---|
22 | |
---|
23 | checksums rmd160 f41fea71072796ad039f68d1825d3caf42562f30 \ |
---|
24 | sha256 feb879f24d1dce25910790770446d50b03e46ee2ebd7d28157b1705971644f6f \ |
---|
25 | size 1031794 |
---|
26 | |
---|
27 | depends_build-append port:pkgconfig |
---|
28 | |
---|
29 | depends_lib-append port:freetype \ |
---|
30 | port:gsl \ |
---|
31 | path:lib/pkgconfig/cairo.pc:cairo \ |
---|
32 | port:lua \ |
---|
33 | port:libpng \ |
---|
34 | port:libspiro \ |
---|
35 | port:zlib |
---|
36 | |
---|
37 | use_configure no |
---|
38 | universal_variant no |
---|
39 | |
---|
40 | patch.pre_args -p1 |
---|
41 | |
---|
42 | compiler.cxx_standard 2014 |
---|
43 | |
---|
44 | patchfiles guard-doxyfile.patch presenter-install-no-deps.patch |
---|
45 | |
---|
46 | variant qt4 conflicts qt5 description {Build using Qt4 based gui} { |
---|
47 | PortGroup qt4 1.0 |
---|
48 | build.args-append QT_CFLAGS="`pkg-config --cflags QtGui QtCore`" \ |
---|
49 | QT_LIBS="`pkg-config --libs QtGui QtCore`" |
---|
50 | } |
---|
51 | |
---|
52 | variant qt5 conflicts qt4 description {Build using Qt5 based gui} { |
---|
53 | PortGroup qt5 1.0 |
---|
54 | } |
---|
55 | |
---|
56 | variant qvoronoi description {Add qvoronoi ipelet} { |
---|
57 | depends_lib-append port:qhull |
---|
58 | build.args-append IPEQVORONOI=1 QHULL_CFLAGS=-I${prefix}/include/libqhull_r |
---|
59 | destroot.post_args IPEQVORONOI=1 |
---|
60 | } |
---|
61 | |
---|
62 | default_variants +qvoronoi |
---|
63 | |
---|
64 | pre-build { |
---|
65 | build.env CXXFLAGS=[get_canonical_archflags cxx] \ |
---|
66 | LDFLAGS=[get_canonical_archflags ld] |
---|
67 | build.args-append IPEPREFIX=${prefix} \ |
---|
68 | CXX=${configure.cxx} \ |
---|
69 | LUA_PACKAGE="lua" \ |
---|
70 | JPEG_LIBS="-framework ApplicationServices" \ |
---|
71 | IPECONFIGMAK="config.mak" |
---|
72 | if {[variant_isset qt4] || [variant_isset qt5]} { |
---|
73 | build.env-append PKG_CONFIG_PATH=\$PKG_CONFIG_PATH:${qt_pkg_config_dir} |
---|
74 | build.args-append IPEUI="QT" \ |
---|
75 | MOC=${qt_moc_cmd} |
---|
76 | } else { |
---|
77 | build.args-append IPEBUNDLE=1 |
---|
78 | } |
---|
79 | } |
---|
80 | |
---|
81 | use_parallel_build no |
---|
82 | |
---|
83 | destroot.args-append IPEPREFIX=${prefix} \ |
---|
84 | IPECONFIGMAK="config.mak" |
---|
85 | if {[variant_isset qt4] || [variant_isset qt5]} { |
---|
86 | destroot.args-append IPEUI="QT" |
---|
87 | } else { |
---|
88 | destroot.args-append IPEBUNDLE=1 |
---|
89 | destroot.target app |
---|
90 | use_xcode yes |
---|
91 | } |
---|
92 | |
---|
93 | platform macosx { |
---|
94 | post-destroot { |
---|
95 | if {[variant_isset qt4] || [variant_isset qt5]} { |
---|
96 | set app Ipe |
---|
97 | xinstall -d ${destroot}${applications_dir}/${app}.app/Contents/MacOS \ |
---|
98 | ${destroot}${applications_dir}/${app}.app/Contents/Resources |
---|
99 | xinstall -m 644 ${filespath}/Info.plist.in ${destroot}${applications_dir}/${app}.app/Contents/Info.plist |
---|
100 | reinplace "s|@VERSION@|${version}|g" ${destroot}${applications_dir}/${app}.app/Contents/Info.plist |
---|
101 | reinplace "s|@PREFIX@|${prefix}|g" ${destroot}${applications_dir}/${app}.app/Contents/Info.plist |
---|
102 | ln -s ${prefix}/bin/ipe ${destroot}${applications_dir}/${app}.app/Contents/MacOS/${app} |
---|
103 | xinstall -m 644 ${worksrcpath}/ipe/ipe.icns ${destroot}${applications_dir}/${app}.app/Contents/Resources/ipe.icns |
---|
104 | } else { |
---|
105 | copy ${worksrcpath}/../build/Ipe.app ${destroot}${applications_dir}/Ipe.app |
---|
106 | copy ${worksrcpath}/../build/IpePresenter.app ${destroot}${applications_dir}/IpePresenter.app |
---|
107 | reinplace "s|/usr/local/bin|/usr/local/bin:${prefix}/bin|g" ${destroot}${applications_dir}/Ipe.app/Contents/Info.plist |
---|
108 | reinplace "s|/usr/local/bin|/usr/local/bin:${prefix}/bin|g" ${destroot}${applications_dir}/IpePresenter.app/Contents/Info.plist |
---|
109 | xinstall -m 755 ${filespath}/ipe.in ${destroot}${prefix}/bin/ipe |
---|
110 | xinstall -m 755 ${filespath}/ipepresenter.in ${destroot}${prefix}/bin/ipepresenter |
---|
111 | reinplace "s|@APPLICATIONSDIR@|${applications_dir}|g" ${destroot}${prefix}/bin/ipe |
---|
112 | reinplace "s|@APPLICATIONSDIR@|${applications_dir}|g" ${destroot}${prefix}/bin/ipepresenter |
---|
113 | } |
---|
114 | } |
---|
115 | } |
---|
116 | |
---|
117 | livecheck.type regex |
---|
118 | livecheck.url ${homepage} |
---|
119 | livecheck.regex "${name}-(\\d+(?:\\.\\d+)*)-src" |
---|