1 | # $Id: Portfile 58489 2009-09-29 18:52:51Z toby@macports.org $ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | PortGroup muniversal 1.0 |
---|
5 | |
---|
6 | name ncurses |
---|
7 | version 5.7 |
---|
8 | categories devel |
---|
9 | platforms darwin freebsd |
---|
10 | maintainers imajes |
---|
11 | description emulation of curses in System V Release 4.0 |
---|
12 | long_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 | |
---|
19 | homepage http://www.gnu.org/software/ncurses/ncurses.html |
---|
20 | master_sites gnu |
---|
21 | |
---|
22 | checksums md5 cce05daf61a64501ef6cd8da1f727ec6 \ |
---|
23 | sha1 8233ee56ed84ae05421e4e6d6db6c1fe72ee6797 \ |
---|
24 | rmd160 a19ca026d32255f5a4d22eb006d65182041e0234 |
---|
25 | |
---|
26 | # required for terminfo |
---|
27 | depends_run port:ncursesw |
---|
28 | |
---|
29 | configure.cppflags |
---|
30 | configure.ldflags |
---|
31 | configure.args --with-shared \ |
---|
32 | --disable-rpath \ |
---|
33 | --without-debug \ |
---|
34 | --without-ada \ |
---|
35 | --enable-safe-sprintf \ |
---|
36 | --enable-sigwinch \ |
---|
37 | --without-progs \ |
---|
38 | --mandir=${prefix}/share/delete-me \ |
---|
39 | --with-manpage-format=normal |
---|
40 | |
---|
41 | platform darwin 10 { |
---|
42 | configure.args-delete --enable-safe-sprintf |
---|
43 | } |
---|
44 | platform darwin 11 { |
---|
45 | configure.args-delete --enable-safe-sprintf |
---|
46 | } |
---|
47 | |
---|
48 | post-destroot { |
---|
49 | # terminfo & manpages also do come with ncursesw |
---|
50 | delete ${destroot}${prefix}/lib/terminfo ${destroot}${prefix}/share |
---|
51 | } |
---|
52 | |
---|
53 | platform freebsd { |
---|
54 | depends_build-append lib:libncursesw:ncursesw |
---|
55 | destroot.env-append LD_LIBRARY_PATH=${prefix}/lib |
---|
56 | } |
---|
57 | |
---|
58 | if {[variant_isset universal]} { |
---|
59 | merger_arch_compiler yes |
---|
60 | |
---|
61 | pre-destroot { |
---|
62 | global merger_dont_diff |
---|
63 | # These tests must be done in pre-destroot to ensure universal_archs_to_use has the correct values. |
---|
64 | if { [llength ${universal_archs_to_use}] > 2 } { |
---|
65 | lappend merger_dont_diff ${prefix}/include/${name}/curses.h |
---|
66 | } |
---|
67 | } |
---|
68 | |
---|
69 | # When cross-compiling, force configure script to assume file system is the same on build and host architectures. |
---|
70 | # We can not use --enable-mixed-case=[yes,no] since HFS+ case sensitivity is not known. |
---|
71 | patchfiles-append patch-configure.diff |
---|
72 | |
---|
73 | # Build process requires compiler and pre-processor to build binaries which run on build architecture. |
---|
74 | lappend cross_configure_args --with-build-cc='${configure.cc}' |
---|
75 | lappend cross_configure_args --with-build-cpp='${configure.cpp}' |
---|
76 | |
---|
77 | # Unless, _XOPEN_SOURCE_EXTENDED is defined, include/curses.h will not include some system header files, |
---|
78 | # which in turn will cause problems with ncurses/curses.priv.h. |
---|
79 | lappend cross_configure_args --with-build-cppflags=-D_XOPEN_SOURCE_EXTENDED |
---|
80 | |
---|
81 | # Configure script attempts to run a test program which allocates a chunk of memory and writes to it. |
---|
82 | # If cross-compiling, default does not assume the program would succeed (safest option). |
---|
83 | lappend cross_configure_args --enable-big-core |
---|
84 | |
---|
85 | # For chtype, configure script chooses between int and long for smallest data type which can hold, up to version 5.7, 31 bits. |
---|
86 | # If sizeof(unsigned long)==sizeof(unsigned int), configure script chooses long. |
---|
87 | # For booltype, configure script tries to find data type xxx with sizeof(bool)==sizeof(xxx). |
---|
88 | if { ${os.arch}=="i386" } { |
---|
89 | if { ${os.major} >= 10 } { |
---|
90 | set merger_configure_args(ppc) "${cross_configure_args} --with-chtype=long --with-bool='unsigned int'" |
---|
91 | } |
---|
92 | set merger_configure_args(ppc64) "${cross_configure_args} --with-chtype=int --with-bool='unsigned char'" |
---|
93 | } else { |
---|
94 | set merger_configure_args(i386) "${cross_configure_args} --with-chtype=long --with-bool='unsigned char'" |
---|
95 | set merger_configure_args(x86_64) "${cross_configure_args} --with-chtype=int --with-bool='unsigned char'" |
---|
96 | } |
---|
97 | } |
---|
98 | |
---|
99 | use_parallel_build yes |
---|