From a8284ec8ca6ec66a2fa69846d2b8d1ad52005a33 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 1 Jan 1970 00:00:00 +0000 Subject: [PATCH 1/1] Added PDCurses. --- .hgignore | 1 + pdcurses/mingw32-pdcurses-3.4-build.patch | 54 +++++++++++++++++++ pdcurses/mingw32-pdcurses.spec | 89 +++++++++++++++++++++++++++++++ 3 files changed, 144 insertions(+) create mode 100644 pdcurses/mingw32-pdcurses-3.4-build.patch create mode 100644 pdcurses/mingw32-pdcurses.spec diff --git a/.hgignore b/.hgignore index e173ea3..0f05dfb 100644 --- a/.hgignore +++ b/.hgignore @@ -36,6 +36,7 @@ libxml2/libxml2-2.7.1.tar.gz nsis/nsis-2.19-src.tar.bz2 nsis/nsis-2.39-src.tar.bz2 pango/pango-1.21.6.tar.bz2 +pdcurses/PDCurses-3.4.tar.gz pixman/pixman-0.11.10.tar.gz pixman/pixman-0.12.0.tar.gz portablexdr/portablexdr-4.0.10.tar.gz diff --git a/pdcurses/mingw32-pdcurses-3.4-build.patch b/pdcurses/mingw32-pdcurses-3.4-build.patch new file mode 100644 index 0000000..6f87f8f --- /dev/null +++ b/pdcurses/mingw32-pdcurses-3.4-build.patch @@ -0,0 +1,54 @@ +--- PDCurses-3.4/win32/mingwin32.mak.orig 2008-09-25 15:30:14.000000000 +0100 ++++ PDCurses-3.4/win32/mingwin32.mak 2008-09-25 15:43:50.000000000 +0100 +@@ -30,8 +30,8 @@ + + CFLAGS += -I$(PDCURSES_SRCDIR) + +-BASEDEF = $(PDCURSES_SRCDIR)\exp-base.def +-WIDEDEF = $(PDCURSES_SRCDIR)\exp-wide.def ++BASEDEF = $(PDCURSES_SRCDIR)/exp-base.def ++WIDEDEF = $(PDCURSES_SRCDIR)/exp-wide.def + + DEFDEPS = $(BASEDEF) + +@@ -50,7 +50,7 @@ + + ifeq ($(DLL),Y) + CFLAGS += -DPDC_DLL_BUILD +- LIBEXE = gcc $(DEFFILE) ++ LIBEXE = i686-pc-mingw32-gcc $(DEFFILE) + LIBFLAGS = -Wl,--out-implib,pdcurses.a -shared -o + LIBCURSES = pdcurses.dll + LIBDEPS = $(LIBOBJS) $(PDCOBJS) $(DEFFILE) +@@ -70,24 +70,24 @@ + libs: $(LIBCURSES) + + clean: +- -del *.o +- -del *.exe +- -del $(CLEAN) ++ -rm *.o ++ -rm *.exe ++ -rm $(CLEAN) + + demos: $(DEMOS) +- strip *.exe ++ i686-pc-mingw32-strip *.exe + + $(DEFFILE): $(DEFDEPS) + echo LIBRARY pdcurses > $@ + echo EXPORTS >> $@ +- type $(BASEDEF) >> $@ ++ cat $(BASEDEF) >> $@ + ifeq ($(WIDE),Y) +- type $(WIDEDEF) >> $@ ++ cat $(WIDEDEF) >> $@ + endif + + $(LIBCURSES) : $(LIBDEPS) + $(LIBEXE) $(LIBFLAGS) $@ $? +- -copy pdcurses.a panel.a ++ -cp pdcurses.a panel.a + + $(LIBOBJS) $(PDCOBJS) : $(PDCURSES_HEADERS) + $(PDCOBJS) : $(PDCURSES_WIN_H) diff --git a/pdcurses/mingw32-pdcurses.spec b/pdcurses/mingw32-pdcurses.spec new file mode 100644 index 0000000..8b05777 --- /dev/null +++ b/pdcurses/mingw32-pdcurses.spec @@ -0,0 +1,89 @@ +%define __strip %{_mingw32_strip} +%define __objdump %{_mingw32_objdump} +%define _use_internal_dependency_generator 0 +%define __find_requires %{_mingw32_findrequires} +%define __find_provides %{_mingw32_findprovides} + +Name: mingw32-pdcurses +Version: 3.4 +Release: 1%{?dist} +Summary: Curses library for MinGW + +License: Public Domain +Group: Development/Libraries +URL: http://pdcurses.sourceforge.net/ +Source0: http://dl.sourceforge.net/sourceforge/pdcurses/PDCurses-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildArch: noarch + +Patch0: mingw32-pdcurses-3.4-build.patch + +BuildRequires: mingw32-filesystem >= 26 +BuildRequires: mingw32-gcc +BuildRequires: mingw32-binutils + + +%description +PDCurses is a public domain curses library for DOS, OS/2, Win32, X11 +and SDL, implementing most of the functions available in X/Open and +System V R4 curses. It supports many compilers for these +platforms. The X11 port lets you recompile existing text-mode curses +programs to produce native X11 applications. + +Note that ncurses is not available for MinGW / Windows. Applications +which need curses functionality can use this package, provided they +don't use any of the extensions specific to ncurses. + + +%prep +%setup -q -n PDCurses-%{version} +%patch0 -p1 + + +%build +pushd win32 +make -f mingwin32.mak \ + CC=%{_mingw32_cc} \ + LINK=%{_mingw32_cc} \ + WIDE=Y UTF8=Y DLL=Y +popd + + +%install +rm -rf $RPM_BUILD_ROOT + +mkdir -p $RPM_BUILD_ROOT%{_mingw32_bindir} +mkdir -p $RPM_BUILD_ROOT%{_mingw32_libdir} +mkdir -p $RPM_BUILD_ROOT%{_mingw32_includedir} + +install win32/*.exe $RPM_BUILD_ROOT%{_mingw32_bindir} +install win32/pdcurses.dll $RPM_BUILD_ROOT%{_mingw32_bindir}/pdcurses.dll +install win32/pdcurses.a $RPM_BUILD_ROOT%{_mingw32_libdir}/pdcurses.dll.a +install curses.h panel.h term.h $RPM_BUILD_ROOT%{_mingw32_includedir} + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root) +%{_mingw32_bindir}/pdcurses.dll +%{_mingw32_libdir}/pdcurses.dll.a +%{_mingw32_includedir}/curses.h +%{_mingw32_includedir}/panel.h +%{_mingw32_includedir}/term.h +%{_mingw32_bindir}/firework.exe +%{_mingw32_bindir}/newdemo.exe +%{_mingw32_bindir}/ptest.exe +%{_mingw32_bindir}/rain.exe +%{_mingw32_bindir}/testcurs.exe +%{_mingw32_bindir}/tuidemo.exe +%{_mingw32_bindir}/xmas.exe +%{_mingw32_bindir}/worm.exe + + +%changelog +* Thu Sep 25 2008 Richard Jones - 3.4-1 +- Initial RPM release. -- 1.8.3.1