]> ncurses.scripts.mit.edu Git - ncurses.git/blob - package/mingw-ncurses.spec
ncurses 6.0 - patch 20180106
[ncurses.git] / package / mingw-ncurses.spec
1 %?mingw_package_header
2
3 Summary: shared libraries for terminal handling
4 Name: mingw32-ncurses6
5 Version: 6.0
6 Release: 20180106
7 License: X11
8 Group: Development/Libraries
9 Source: ncurses-%{version}-%{release}.tgz
10 # URL: https://invisible-island.net/ncurses/
11
12 BuildRequires:  mingw32-filesystem >= 95
13 BuildRequires:  mingw32-gcc
14 BuildRequires:  mingw32-binutils
15
16 BuildRequires:  mingw64-filesystem >= 95
17 BuildRequires:  mingw64-gcc
18 BuildRequires:  mingw64-binutils
19
20 %global MY_ABI 6
21
22 %define CC_NORMAL -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wconversion
23 %define CC_STRICT %{CC_NORMAL} -W -Wbad-function-cast -Wcast-align -Wcast-qual -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wwrite-strings -ansi -pedantic
24
25 %description -n mingw32-ncurses6
26 Cross-compiling support for ncurses to mingw32.
27
28 The ncurses library routines are a terminal-independent method of
29 updating character screens with reasonable optimization.
30
31 This package is used for testing ABI 6 with cross-compiles to MinGW.
32
33 %package -n mingw64-ncurses6
34 Summary:        Curses library for MinGW64
35
36 %description -n mingw64-ncurses6
37 Cross-compiling support for ncurses to mingw64.
38
39 The ncurses library routines are a terminal-independent method of
40 updating character screens with reasonable optimization.
41
42 This package is used for testing ABI %{MY_ABI} with cross-compiles to MinGW.
43
44 %prep
45
46 %define CFG_OPTS \\\
47         --disable-db-install \\\
48         --disable-echo \\\
49         --disable-getcap \\\
50         --disable-hard-tabs \\\
51         --disable-leaks \\\
52         --disable-macros \\\
53         --disable-overwrite \\\
54         --disable-termcap \\\
55         --enable-const \\\
56         --enable-ext-colors \\\
57         --enable-ext-mouse \\\
58         --enable-ext-putwin \\\
59         --enable-interop \\\
60         --enable-pc-files \\\
61         --enable-sp-funcs \\\
62         --enable-term-driver \\\
63         --enable-warnings \\\
64         --enable-widec \\\
65         --with-config-suffix=dev \\\
66         --verbose \\\
67         --with-cxx-shared \\\
68         --with-develop \\\
69         --with-fallbacks=unknown,rxvt \\\
70         --with-install-prefix=$RPM_BUILD_ROOT \\\
71         --with-pc-suffix=%{MY_ABI} \\\
72         --with-shared \\\
73         --with-tparm-arg=intptr_t \\\
74         --with-trace \\\
75         --with-xterm-kbs=DEL \\\
76         --without-ada \\\
77         --without-debug \\\
78         --without-manpages \\\
79         --without-progs \\\
80         --without-tests
81
82 %define debug_package %{nil}
83 %setup -q -n ncurses-%{version}-%{release}
84
85 %build
86 mkdir BUILD-W32
87 pushd BUILD-W32
88 CFLAGS="%{CC_NORMAL}" \
89 CC=%{mingw32_cc} \
90 %mingw32_configure %{CFG_OPTS} \
91         --with-pkg-config-libdir=%{mingw32_libdir}/pkgconfig
92 make
93 popd
94
95 mkdir BUILD-W64
96 pushd BUILD-W64
97 CFLAGS="%{CC_NORMAL}" \
98 CC=%{mingw64_cc} \
99 %mingw64_configure %{CFG_OPTS} \
100         --with-pkg-config-libdir=%{mingw64_libdir}/pkgconfig
101 make
102 popd
103
104 %install
105 rm -rf $RPM_BUILD_ROOT
106
107 mkdir -p $RPM_BUILD_ROOT%{_bindir}
108
109 pushd BUILD-W32
110 %{mingw32_make} install.libs
111 for name in $RPM_BUILD_ROOT%{mingw32_bindir}/*-config; \
112         do \
113                 base=`basename $name`; \
114                 ln -v $name $RPM_BUILD_ROOT%{_bindir}/%{mingw32_target}-$base; \
115         done
116 popd
117
118 pushd BUILD-W64
119 %{mingw64_make} install.libs
120 for name in $RPM_BUILD_ROOT%{mingw64_bindir}/*-config; \
121         do \
122                 base=`basename $name`; \
123                 ln -v $name $RPM_BUILD_ROOT%{_bindir}/%{mingw64_target}-$base; \
124         done
125 popd
126
127 %clean
128 rm -rf $RPM_BUILD_ROOT
129
130 %files -n mingw32-ncurses6
131 %defattr(-,root,root,-)
132 %{_bindir}/%{mingw32_target}-*
133 %{mingw32_bindir}/*
134 %{mingw32_includedir}/*
135 %{mingw32_libdir}/*
136
137 %files -n mingw64-ncurses6
138 %defattr(-,root,root,-)
139 %{_bindir}/%{mingw64_target}-*
140 %{mingw64_bindir}/*
141 %{mingw64_includedir}/*
142 %{mingw64_libdir}/*
143
144 %changelog
145
146 * Tue Dec 26 2017 Thomas E. Dickey
147 - add --with-config-suffix option
148
149 * Sat Sep 20 2014 Thomas E. Dickey
150 - adjust install-rules for ncurses*-config
151
152 * Sat Aug 03 2013 Thomas E. Dickey
153 - initial version, using mingw-pdcurses package as a guide.