/
Portfile
105 lines (83 loc) · 4.02 KB
/
Portfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# -*- 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
PortSystem 1.0
PortGroup github 1.0
PortGroup active_variants 1.1
if {${os.platform} eq "darwin" && ${os.major} < 11} {
PortGroup qmake 1.0
# See: https://github.com/CsoundQt/CsoundQt/issues/393
github.setup CsoundQt CsoundQt 0.9.7
revision 1
checksums rmd160 a7fbcf9b68c4ddba3eb7d30766d1545a113f7cbe \
sha256 6f82998cbbc212d488179e68f6463a98b102e83061e3e47b5761f15f94d9028d \
size 67231374
github.tarball_from releases
distname ${name}-qt4-src-${version}
use_zip yes
worksrcdir ${name}-qt4
patchfiles-append patch-qcs-macx.diff \
patch-fix-includes.diff
} else {
PortGroup qmake5 1.0
github.setup CsoundQt CsoundQt 1.1.1 v
revision 0
checksums rmd160 c274b03cccda9092311a477d1f12058391c0cbbe \
sha256 652fa51dc19acae031919216ec8043cb3767763008a62a134854940e2d065326 \
size 67621515
github.tarball_from archive
qt5.depends_component qtxmlpatterns
patchfiles-append patch-qcs-macx-qt5.diff
}
categories aqua audio
license LGPL-2.1+
maintainers {@barracuda156 gmail.com:vital.had} openmaintainer
description ${name} is a frontend for Csound
long_description {*}${description} featuring a highlighting editor \
with autocomplete, interactive widgets and integrated help. \
It is cross-platform and aims to be a simple yet powerful \
and complete development environment for Csound.
homepage https://csoundqt.github.io
depends_lib-append port:csound \
port:libsndfile
compiler.cxx_standard 2011
post-patch {
reinplace "s,@PREFIX@,${prefix},g" ${worksrcpath}/qcs-macx.pro ${worksrcpath}/qcs.pro ${worksrcpath}/config.pri
reinplace "s,@CC@,${configure.cc},g" ${worksrcpath}/qcs.pro
reinplace "s,@CXX@,${configure.cxx},g" ${worksrcpath}/qcs.pro
reinplace "s,@DESTDIR@,${worksrcpath}," ${worksrcpath}/qcs.pro
reinplace "s,@CFLAGS@,${configure.cppflags} ${configure.cflags} [get_canonical_archflags cc]," ${worksrcpath}/qcs.pro
reinplace "s,@CXXFLAGS@,${configure.cppflags} ${configure.cxxflags} [get_canonical_archflags cxx]," ${worksrcpath}/qcs.pro
reinplace "s,@LFLAGS@,[get_canonical_archflags ld]," ${worksrcpath}/qcs.pro
}
if {${configure.build_arch} ni [list arm i386 ppc]} {
default_variants-append +double
}
if [variant_isset double] {
set cs_conf CONFIG+=build64
set libname CsoundLib64
set appname ${name}-d-cs6
} else {
set cs_conf CONFIG+=build32
set libname CsoundLib
set appname ${name}-f-cs6
}
configure {
system -W ${worksrcpath} "${qt_qmake_cmd} qcs.pro ${cs_conf}"
}
build.cmd make
build.target
set cs_framework_path ${libname}.framework/Versions/6.0
set csoundlib ${cs_framework_path}/${libname}
destroot {
system -W ${worksrcpath} "install_name_tool -change ${prefix}/lib/${csoundlib} ${frameworks_dir}/${csoundlib} ./${appname}.app/Contents/MacOS/${appname}"
move ${worksrcpath}/${appname}.app ${destroot}${applications_dir}/${name}.app
}
variant double description "Use double precision" {
require_active_variants port:csound double
}
if {![catch {set result [active_variants csound double]}]} {
if {$result} {
if {![variant_isset double]} {
return -code error "csound has been built with double precision, please install ${name} with +double."
}
}
}