/
Portfile
77 lines (68 loc) · 3.14 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
PortSystem 1.0
PortGroup clang_dependency 1.0
name ncurses
version 6.4
revision 1
categories devel
platforms darwin freebsd
license MIT
maintainers {jmr @jmroot}
description emulation of curses in System V Release 4.0
long_description \
The Ncurses (new curses) library is a free software emulation of \
curses in System V Release 4.0, and more. It uses Terminfo format, \
supports pads and color and multiple highlights and forms \
characters and function-key mapping, and has all the other \
SYSV-curses enhancements over BSD Curses.
homepage https://invisible-island.net/ncurses/
master_sites gnu https://invisible-mirror.net/archives/ncurses/
checksums rmd160 a8b6ef8fe778c87ffdd3e0f3199c156c47b8dc39 \
sha256 6931283d9ac87c5073f30b6290c4c75f21632bb4fc3603ac8100812bed248159
# hex.diff from https://opensource.apple.com/source/ncurses/ncurses-57/patches.applied/
patchfiles hex.diff \
modules.patch
# Also needed by later clangs.
if {${os.platform} eq "darwin" && ${os.major} < 11 && ${cxx_stdlib} eq "libc++"} {
clang_dependency.extra_versions 3.7
}
configure.cppflags
configure.ldflags
configure.args --enable-widec \
--disable-lib-suffixes \
--enable-overwrite \
--with-shared \
--with-cxx-shared \
--without-debug \
--without-ada \
--with-manpage-format=normal \
--without-pkg-config \
--enable-pc-files \
--with-pkg-config-libdir="${prefix}/lib/pkgconfig" \
--disable-mixed-case
if {[string match *clang* ${configure.cxx}] && ${configure.cxx_stdlib} ne ""} {
configure.env-append CXXLIBS=-stdlib=${configure.cxx_stdlib}
}
post-configure {
# check that this doesn't start breaking anything with new versions
if {[variant_exists universal] && [variant_isset universal]} {
reinplace s/1UL/1U/g "${worksrcpath}/include/curses.head"
system -W ${worksrcpath} "ed - include/curses.head < ${filespath}/include_curses.head.ed"
}
}
post-destroot {
set major [lindex [split $version .] 0]
set archflags [get_canonical_archflags ld]
foreach f {form menu ncurses ncurses++ panel} {
ln -s lib${f}.${major}.dylib ${destroot}${prefix}/lib/lib${f}w.dylib
ln -s lib${f}.${major}.dylib ${destroot}${prefix}/lib/lib${f}w.${major}.dylib
ln -s lib${f}.a ${destroot}${prefix}/lib/lib${f}w.a
ln -s ${f}.pc ${destroot}${prefix}/lib/pkgconfig/${f}w.pc
reinplace "s|-Wl,-syslibroot,${configure.sdkroot}||" ${destroot}${prefix}/lib/pkgconfig/${f}.pc
reinplace "s|${archflags}||" ${destroot}${prefix}/lib/pkgconfig/${f}.pc
}
ln -s libncurses.${major}.dylib ${destroot}${prefix}/lib/libtermcap.dylib
ln -s ncurses6-config ${destroot}${prefix}/bin/ncursesw6-config
reinplace "s|-Wl,-syslibroot,${configure.sdkroot}||" ${destroot}${prefix}/bin/ncurses6-config
reinplace "s|${archflags}||" ${destroot}${prefix}/bin/ncurses6-config
}
livecheck.regex ${name}-(\[\\d.-\]+)${extract.suffix}