]>
Commit | Line | Data |
---|---|---|
3647687d SS |
1 | ############################################################################### |
2 | # IPFire.org - An Open Source Firewall Solution # | |
3 | # Copyright (C) - IPFire Development Team <info@ipfire.org> # | |
4 | ############################################################################### | |
5 | ||
6 | name = compat-ncurses | |
7 | version = 5.9 | |
8 | revision = 20150117 | |
9 | release = 12.%{revision} | |
10 | thisapp = ncurses-%{version}-%{revision} | |
11 | ||
12 | groups = System/Base | |
13 | url = http://invisible-island.net/ncurses/ncurses.html | |
14 | license = MIT | |
15 | summary = Ncurses support utilities. | |
16 | ||
17 | description | |
18 | The curses library routines are a terminal-independent method of | |
19 | updating character screens with reasonable optimization. The ncurses | |
20 | (new curses) library is a freely distributable replacement for the | |
21 | discontinued 4.4 BSD classic curses library. | |
22 | end | |
23 | ||
24 | source_dl = ftp://invisible-island.net/ncurses/current/ | |
25 | sources = %{thisapp}.tgz | |
26 | ||
27 | build | |
28 | requires | |
29 | gcc-c++ | |
30 | end | |
31 | ||
32 | configure_options += \ | |
33 | --with-shared \ | |
34 | --without-debug \ | |
35 | --without-ada \ | |
36 | --with-ospeed=unsigned \ | |
37 | --with-chtype=long \ | |
38 | --enable-hard-tabs \ | |
39 | --enable-xmc-glitch \ | |
40 | --enable-colorfgbg \ | |
41 | --with-terminfo-dirs=%{sysconfdir}/terminfo:%{datadir}/terminfo \ | |
42 | --enable-overwrite \ | |
43 | --enable-pc-files \ | |
44 | --with-termlib=tinfo | |
45 | ||
46 | export PKG_CONFIG_LIBDIR=%{libdir}/pkgconfig | |
47 | ||
48 | build | |
49 | mkdir -pv narrowc widec | |
50 | ||
51 | # Build narrowc version. | |
52 | cd narrowc | |
53 | ln -svf ../configure . | |
54 | ./configure %{configure_options} --with-ticlib | |
55 | make %{PARALLELISMFLAGS} libs | |
56 | make %{PARALLELISMFLAGS} -C progs | |
57 | ||
58 | # Build widec version. | |
59 | cd ../widec | |
60 | ln -svf ../configure . | |
61 | ./configure %{configure_options} --enable-widec --without-progs | |
62 | make %{PARALLELISMFLAGS} libs | |
63 | cd .. | |
64 | end | |
65 | ||
66 | install | |
67 | make -C narrowc DESTDIR=%{BUILDROOT} install.libs | |
68 | rm -rvf %{BUILDROOT}%{libdir}/libtinfo.* | |
69 | make -C widec DESTDIR=%{BUILDROOT} install.libs | |
70 | ||
71 | chmod -v 755 %{BUILDROOT}%{libdir}/lib*.so.*.* | |
72 | ||
73 | # don't require -ltinfo when linking with --no-add-needed | |
74 | for l in %{BUILDROOT}%{libdir}/libncurses{,w}.so; do | |
75 | soname=$(basename $(readlink $l)) | |
76 | rm -f $l | |
77 | echo "INPUT($soname -ltinfo)" > $l | |
78 | done | |
79 | ||
80 | rm -f %{BUILDROOT}%{libdir}/libcurses{,w}.so | |
81 | echo "INPUT(-lncurses)" > %{BUILDROOT}%{libdir}/libcurses.so | |
82 | echo "INPUT(-lncursesw)" > %{BUILDROOT}%{libdir}/libcursesw.so | |
83 | echo "INPUT(-ltinfo)" > %{BUILDROOT}%{libdir}/libtermcap.so | |
84 | ||
85 | rm -vf %{BUILDROOT}%{libdir}/terminfo | |
86 | rm -vf %{BUILDROOT}%{libdir}/pkgconfig/{*_g,ncurses++*}.pc | |
87 | end | |
88 | end | |
89 | ||
90 | packages | |
91 | package %{name} | |
92 | template LIBS | |
93 | ||
94 | provides | |
95 | ncurses-libs = %{thisver} | |
96 | end | |
97 | ||
98 | obsoletes | |
99 | ncurses-libs <= %{thisver} | |
100 | end | |
101 | end | |
102 | ||
103 | package %{name}-debuginfo | |
104 | template DEBUGINFO | |
105 | end | |
106 | end |