source: trunk/dports/devel/ncurses/Portfile

Last change on this file was 140232, checked in by jeremyhu@…, 2 years ago

ncurses: Fix build failure on older systems using libc++

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.5 KB
Line 
1# $Id: Portfile 140232 2015-09-13 10:45:12Z ryandesign@macports.org $
2
3PortSystem 1.0
4
5name            ncurses
6version         6.0
7categories      devel
8platforms       darwin freebsd
9license         MIT
10maintainers     jmr openmaintainer
11description     emulation of curses in System V Release 4.0
12long_description \
13    The Ncurses (new curses) library is a free software emulation of    \
14    curses in System V Release 4.0, and more. It uses Terminfo format,  \
15    supports pads and color and multiple highlights and forms           \
16    characters and function-key mapping, and has all the other          \
17    SYSV-curses enhancements over BSD Curses.
18
19homepage        http://www.gnu.org/software/ncurses/ncurses.html
20master_sites    gnu
21
22checksums       rmd160 4d9e5938f00b400bfb0d37f3c54f2f36c4157d48 \
23                sha256 f551c24b30ce8bfb6e96d9f59b42fbea30fa3a6123384172f9e7284bcf647260
24
25# hex.diff from http://opensource.apple.com/source/ncurses/ncurses-44/patches.applied/
26patchfiles      hex.diff configure.diff
27
28configure.cppflags
29configure.ldflags
30configure.args  --enable-widec \
31                --disable-lib-suffixes \
32                --enable-overwrite \
33                --with-shared \
34                --with-cxx-shared \
35                --without-debug  \
36                --without-ada \
37                --with-manpage-format=normal \
38                --enable-pc-files \
39                --with-pkg-config-libdir="${prefix}/lib/pkgconfig" \
40                --disable-mixed-case
41
42# Prevent -lstdc++ from creeping into the build when not needed
43if {[string match *clang* ${configure.cxx}]} {
44    configure.env-append \
45        CXXLIBS=-stdlib=${configure.cxx_stdlib} \
46        cf_cv_libstdcpp=no
47}
48
49if {[variant_isset universal]} {
50    # check that this doesn't start breaking anything with new versions
51    post-configure {
52        reinplace s/1UL/1U/g "${worksrcpath}/include/curses.head"
53        system -W ${worksrcpath} "ed - include/curses.head < ${filespath}/include_curses.head.ed"
54    }
55}
56
57post-destroot {
58    set major [lindex [split $version .] 0]
59    foreach f {form menu ncurses ncurses++ panel} {
60        ln -s lib${f}.${major}.dylib ${destroot}${prefix}/lib/lib${f}w.dylib
61        ln -s lib${f}.${major}.dylib ${destroot}${prefix}/lib/lib${f}w.${major}.dylib
62        ln -s lib${f}.a ${destroot}${prefix}/lib/lib${f}w.a
63        ln -s ${f}.pc ${destroot}${prefix}/lib/pkgconfig/${f}w.pc
64    }
65    ln -s libncurses.${major}.dylib ${destroot}${prefix}/lib/libtermcap.dylib
66    ln -s ncurses6-config ${destroot}${prefix}/bin/ncursesw6-config
67}
Note: See TracBrowser for help on using the repository browser.