<?xml version="1.0"?>
<package name="ncurses">
	<description>Shared libraries for terminal handling</description>
	<releases>
		<release version="6.6" revision="1" tag="stage2">
			<build>
				<script>
					<archive name="ncurses-$VERSION">
						<!-- do not run tic from host even though we are cross compiling -->
						<cmd>sed -i -e 's/^if.*cross_compiling.*/if true/' misc/run_tic.in</cmd>

						<cmd>./configure --build=$HOST --host=$TARGET --with-build-cc=gcc --with-shared --without-normal --without-profile --without-debug --without-cxx --without-ada --disable-static --enable-widec --disable-nls</cmd>
						<cmd>make</cmd>
						<cmd>make install</cmd>

						<!-- add compatibility symlinks -->
						<cmd>ln -svf libncursesw.so.6 /stage2/lib/libcurses.so</cmd>
						<cmd>ln -svf libncursesw.so.6 /stage2/lib/libtermcap.so</cmd>
						<cmd>ln -svf libncursesw.so.6 /stage2/lib/libncurses.so</cmd>
						<cmd>ln -svf libformw.so.6 /stage2/lib/libform.so</cmd>
						<cmd>ln -svf libpanelw.so.6 /stage2/lib/libpanel.so</cmd>
						<cmd>ln -svf libmenuw.so.6 /stage2/lib/libmenu.so</cmd>
					</archive>
				</script>
			</build>
		</release>
		<release version="6.6" revision="1">
			<deps>
				<dep name="glibc"/>
				<dep name="pkgconfig"/>
			</deps>
			<build>
				<script>
					<archive name="ncurses-$VERSION">
						<cmd>./configure --with-shared --without-normal --without-profile --without-debug --without-ada --disable-static --enable-widec --enable-pc-files</cmd>
						<cmd>make</cmd>
						<cmd>make install</cmd>

						<!-- add compatibility symlinks -->
						<cmd>ln -svf libncursesw.so.6 /usr/lib/libcurses.so</cmd>
						<cmd>ln -svf libncursesw.so.6 /usr/lib/libtermcap.so</cmd>
						<cmd>ln -svf libncursesw.so.6 /usr/lib/libncurses.so</cmd>
						<cmd>ln -svf libformw.so.6 /usr/lib/libform.so</cmd>
						<cmd>ln -svf libpanelw.so.6 /usr/lib/libpanel.so</cmd>
						<cmd>ln -svf libmenuw.so.6 /usr/lib/libmenu.so</cmd>
					</archive>
				</script>
			</build>
		</release>
	</releases>
</package>
