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