1%?mingw_package_header 2 3Summary: shared libraries for terminal handling 4Name: mingw32-ncurses6 5Version: 6.5 6Release: 20240427 7License: X11 8Group: Development/Libraries 9URL: https://invisible-island.net/ncurses/ 10Source: https://invisible-island.net/archives/ncurses/ncurses-%{version}-%{release}.tgz 11 12BuildRequires: mingw32-filesystem >= 95 13BuildRequires: mingw32-gcc 14BuildRequires: mingw32-binutils 15 16BuildRequires: mingw64-filesystem >= 95 17BuildRequires: mingw64-gcc 18BuildRequires: 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 26Cross-compiling support for ncurses to mingw32. 27 28The ncurses library routines are a terminal-independent method of 29updating character screens with reasonable optimization. 30 31This package is used for testing ABI 6 with cross-compiles to MinGW. 32 33%package -n mingw64-ncurses6 34Summary: Curses library for MinGW64 35 36%description -n mingw64-ncurses6 37Cross-compiling support for ncurses to mingw64. 38 39The ncurses library routines are a terminal-independent method of 40updating character screens with reasonable optimization. 41 42This 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-interop \\\ 56 --enable-opaque-curses \\\ 57 --enable-opaque-form \\\ 58 --enable-opaque-menu \\\ 59 --enable-opaque-panel \\\ 60 --enable-pc-files \\\ 61 --enable-sp-funcs \\\ 62 --enable-term-driver \\\ 63 --enable-warnings \\\ 64 --enable-wgetch-events \\\ 65 --enable-widec \\\ 66 --with-config-suffix=dev \\\ 67 --verbose \\\ 68 --with-cxx-shared \\\ 69 --with-develop \\\ 70 --with-fallbacks=unknown,xterm \\\ 71 --with-tic-path=/usr/bin/tic%{MY_ABI} \\\ 72 --with-infocmp-path=/usr/bin/infocmp%{MY_ABI} \\\ 73 --with-install-prefix=$RPM_BUILD_ROOT \\\ 74 --with-pc-suffix=%{MY_ABI} \\\ 75 --with-pcre2 \\\ 76 --with-shared \\\ 77 --with-tparm-arg=intptr_t \\\ 78 --with-trace \\\ 79 --with-xterm-kbs=DEL \\\ 80 --without-ada \\\ 81 --without-debug \\\ 82 --without-manpages \\\ 83 --without-progs \\\ 84 --without-tests 85 86%define debug_package %{nil} 87%setup -q -n ncurses-%{version}-%{release} 88 89%build 90mkdir BUILD-W32 91pushd BUILD-W32 92CFLAGS="%{CC_NORMAL}" \ 93CC=%{mingw32_cc} \ 94%mingw32_configure %{CFG_OPTS} \ 95 --with-pkg-config-libdir=%{mingw32_libdir}/pkgconfig 96make 97popd 98 99mkdir BUILD-W64 100pushd BUILD-W64 101CFLAGS="%{CC_NORMAL}" \ 102CC=%{mingw64_cc} \ 103%mingw64_configure %{CFG_OPTS} \ 104 --with-pkg-config-libdir=%{mingw64_libdir}/pkgconfig 105make 106popd 107 108%install 109rm -rf $RPM_BUILD_ROOT 110 111mkdir -p $RPM_BUILD_ROOT%{_bindir} 112 113pushd BUILD-W32 114%{mingw32_make} install.libs 115for name in $RPM_BUILD_ROOT%{mingw32_bindir}/*-config; \ 116 do \ 117 base=`basename $name`; \ 118 ln -v $name $RPM_BUILD_ROOT%{_bindir}/%{mingw32_target}-$base; \ 119 done 120popd 121 122pushd BUILD-W64 123%{mingw64_make} install.libs 124for name in $RPM_BUILD_ROOT%{mingw64_bindir}/*-config; \ 125 do \ 126 base=`basename $name`; \ 127 ln -v $name $RPM_BUILD_ROOT%{_bindir}/%{mingw64_target}-$base; \ 128 done 129popd 130 131%files -n mingw32-ncurses6 132%defattr(-,root,root,-) 133%{_bindir}/%{mingw32_target}-* 134%{mingw32_bindir}/* 135%{mingw32_includedir}/* 136%{mingw32_libdir}/* 137 138%files -n mingw64-ncurses6 139%defattr(-,root,root,-) 140%{_bindir}/%{mingw64_target}-* 141%{mingw64_bindir}/* 142%{mingw64_includedir}/* 143%{mingw64_libdir}/* 144 145%changelog 146 147* Sat Feb 25 2023 Thomas Dickey 148- amend URLs per rpmlint 149 150* Sun Jun 30 2019 Thomas E. Dickey 151- use tic-path and infocmp-path options for fallbacks 152 153* Sat Feb 10 2018 Thomas E. Dickey 154- add several development features 155 156* Tue Dec 26 2017 Thomas E. Dickey 157- add --with-config-suffix option 158 159* Sat Sep 20 2014 Thomas E. Dickey 160- adjust install-rules for ncurses*-config 161 162* Sat Aug 03 2013 Thomas E. Dickey 163- initial version, using mingw-pdcurses package as a guide. 164