]> git.pld-linux.org Git - packages/OpenPTC-GGI.git/commitdiff
- new, based on OpenPTC-x11.spec
authorJakub Bogusz <qboosh@pld-linux.org>
Sat, 21 Dec 2002 13:25:50 +0000 (13:25 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    OpenPTC-GGI-DESTDIR.patch -> 1.1
    OpenPTC-GGI-acfix.patch -> 1.1
    OpenPTC-GGI-gcc3.patch -> 1.1
    OpenPTC-GGI-include.patch -> 1.1
    OpenPTC-GGI.spec -> 1.1

OpenPTC-GGI-DESTDIR.patch [new file with mode: 0644]
OpenPTC-GGI-acfix.patch [new file with mode: 0644]
OpenPTC-GGI-gcc3.patch [new file with mode: 0644]
OpenPTC-GGI-include.patch [new file with mode: 0644]
OpenPTC-GGI.spec [new file with mode: 0644]

diff --git a/OpenPTC-GGI-DESTDIR.patch b/OpenPTC-GGI-DESTDIR.patch
new file mode 100644 (file)
index 0000000..489a345
--- /dev/null
@@ -0,0 +1,39 @@
+--- OpenPTC-GGI-0.5.0/Makefile.in.orig Sat May  1 23:45:14 1999
++++ OpenPTC-GGI-0.5.0/Makefile.in      Sat Dec 21 10:29:42 2002
+@@ -49,24 +49,23 @@
+ install:
+       @echo "Installing under $(prefix)"
+-      install -d $(prefix)/include/ptc/Core
+-      install -d $(prefix)/include/ptc/GGI
+-      install -d $(exec_prefix)/lib
+-      install -d $(exec_prefix)/bin
+-      install -m 0644 source/ptc.h $(prefix)/include/ptc
++      install -d $(DESTDIR)$(prefix)/include/ptc/Core
++      install -d $(DESTDIR)$(prefix)/include/ptc/GGI
++      install -d $(DESTDIR)$(exec_prefix)/lib
++      install -d $(DESTDIR)$(exec_prefix)/bin
++      install -m 0644 source/ptc.h $(DESTDIR)$(prefix)/include/ptc
+       for incfile in $(CORE_HEADER_FILES); do \
+-        install -m 0644 source/Core/$$incfile $(prefix)/include/ptc/Core; \
++        install -m 0644 source/Core/$$incfile $(DESTDIR)$(prefix)/include/ptc/Core; \
+       done
+       for incfile in $(GGI_HEADER_FILES); do \
+-        install -m 0644 source/GGI/$$incfile $(prefix)/include/ptc/GGI; \
++        install -m 0644 source/GGI/$$incfile $(DESTDIR)$(prefix)/include/ptc/GGI; \
+       done
+-      install -m 0644 $(PTC_LIBRARY_PATH)/$(PTC_LIBRARY_NAME) $(exec_prefix)/lib
+-      @cd $(exec_prefix)/lib ; ln -sf $(PTC_LIBRARY_NAME) libptc.a
+-      install -m 0755 ptc-config $(exec_prefix)/bin
+-      chmod 755 $(exec_prefix)/bin/ptc-config
++      install -m 0644 $(PTC_LIBRARY_PATH)/$(PTC_LIBRARY_NAME) $(DESTDIR)$(exec_prefix)/lib
++      install -m 0755 ptc-config $(DESTDIR)$(exec_prefix)/bin
++      chmod 755 $(DESTDIR)$(exec_prefix)/bin/ptc-config
+       if test -e library/$(PTC_LIBRARY_DYN); then \
+-        install -m 0755 library/$(PTC_LIBRARY_DYN) $(exec_prefix)/lib; \
+-        cd $(exec_prefix)/lib ; ln -sf $(PTC_LIBRARY_DYN) libptc.so ; \
++        install -m 0755 library/$(PTC_LIBRARY_DYN) $(DESTDIR)$(exec_prefix)/lib; \
++        cd $(DESTDIR)$(exec_prefix)/lib ; ln -sf $(PTC_LIBRARY_DYN) libptc.so ; \
+       fi
diff --git a/OpenPTC-GGI-acfix.patch b/OpenPTC-GGI-acfix.patch
new file mode 100644 (file)
index 0000000..e96e176
--- /dev/null
@@ -0,0 +1,32 @@
+--- OpenPTC-GGI-0.5.0/configure.in.orig        Tue May  4 08:37:09 1999
++++ OpenPTC-GGI-0.5.0/configure.in     Sat Dec 21 02:25:31 2002
+@@ -41,18 +41,16 @@
+ dnl Check for HERMES
+ dnl ----
+-AC_CHECK_LIB(Hermes,Hermes_ConverterInstance,
++AC_CHECK_LIB(Hermes,Hermes_ConverterInstance,,
+ [
+-],[
+ AC_ERROR(HERMES has to be installed first. See INSTALL for more info)
+ ])
+ dnl Check for GGI
+ dnl ----
+-AC_CHECK_LIB(ggi, ggiOpen,
++AC_CHECK_LIB(ggi, ggiOpen,,
+ [
+-],[
+ AC_ERROR(libggi has to be installed first. See INSTALL for more info)
+ ])
+@@ -62,7 +60,7 @@
+ AC_CHECK_HEADERS(unistd.h)
+-AC_CHECK_HEADERS(Hermes/Hermes.h,
++AC_CHECK_HEADERS(Hermes/Hermes.h,,
+ [],
+ [
+ AC_ERROR(HERMES is required in order to build PTC. See INSTALL for more.)
diff --git a/OpenPTC-GGI-gcc3.patch b/OpenPTC-GGI-gcc3.patch
new file mode 100644 (file)
index 0000000..9b6f5e5
--- /dev/null
@@ -0,0 +1,355 @@
+--- OpenPTC-GGI-0.5.0/source/GGI/Console.h.orig        Tue May  4 08:47:41 1999
++++ OpenPTC-GGI-0.5.0/source/GGI/Console.h     Sat Dec 21 09:44:00 2002
+@@ -12,7 +12,7 @@
+ #include <ptc.h>
+ #include <stdlib.h>
+ #include <string.h>
+-#include <fstream.h>
++#include <fstream>
+ #include <ggi/ggi.h>
+ #include <ggi/gii.h>
+--- OpenPTC-GGI-0.5.0/source/GGI/Console.cc.orig       Tue May  4 08:51:14 1999
++++ OpenPTC-GGI-0.5.0/source/GGI/Console.cc    Sat Dec 21 09:45:35 2002
+@@ -59,7 +59,7 @@
+ void Console::configure( const char file[] )
+ {
+     // open configuration file
+-    ifstream f( file, ios::in );
++    std::ifstream f( file, std::ios::in );
+     
+     // check file
+     if( !f ) {
+@@ -327,7 +327,7 @@
+     // Block until we get a key.
+     giiEventRead( l_ggi_input, &l_ggi_event, ( ggi_event_mask )
+-                                        emKeyPress | emKeyRepeat );
++                                        (emKeyPress | emKeyRepeat) );
+     int code = l_ggi_event.key.sym;
+     bool alt = l_ggi_event.key.modifiers & GII_MOD_ALT;
+@@ -922,7 +922,7 @@
+     return l_ptc_mode;
+ }
+-ggi_mode *Console::translate( const Mode &l_ptc_mode, int pages = 0 )
++ggi_mode *Console::translate( const Mode &l_ptc_mode, int pages /* = 0 */)
+ {
+     
+     ggi_mode    *l_ggi_mode = new ggi_mode;
+--- OpenPTC-GGI-0.5.0/source/Core/Palette.cc.orig      Mon May  3 20:06:57 1999
++++ OpenPTC-GGI-0.5.0/source/Core/Palette.cc   Sat Dec 21 09:50:18 2002
+@@ -116,7 +116,7 @@
+ {
+     // load palette data
+   //    memcpy(Hermes_PaletteGet(m_handle),data,1024);
+-    Hermes_PaletteSet(m_handle,data);
++    Hermes_PaletteSet(m_handle,(int32*)data);
+ }
+--- OpenPTC-GGI-0.5.0/demos/tunnel3d/Tunnel3D.cc.orig  Thu Apr  1 02:04:41 1999
++++ OpenPTC-GGI-0.5.0/demos/tunnel3d/Tunnel3D.cc       Sat Dec 21 09:58:50 2002
+@@ -11,8 +11,8 @@
+ #include "ptc.h"
+ #include <math.h>
+ #include <string.h>
+-#include <iostream.h>
+-#include <fstream.h>
++#include <iostream>
++#include <fstream>
+ #include "Tunnel3D.h"
+ #include "Calc.h"
+@@ -94,9 +94,9 @@
+   while(((int)tunneltex)&0xffff!=0)
+   tunneltex++;
+-  ifstream texfile("Tunnel3D.raw",ios::binary|ios::in);
+-  texfile.read(pal,768);
+-  texfile.read(tmp,65536);
++  std::ifstream texfile("Tunnel3D.raw",std::ios::binary|std::ios::in);
++  texfile.read((char*)pal,768);
++  texfile.read((char*)tmp,65536);
+   texfile.close();
+   // Generate lookup table for lighting (65 because of possible inaccuracies)
+@@ -319,7 +319,7 @@
+ }
+-void main()
++int main()
+ {
+   try {
+@@ -370,4 +370,5 @@
+   { error.report();
+   }
++  return 0;
+ }
+--- OpenPTC-GGI-0.5.0/examples/image/Image.cc.orig     Sat Mar 20 23:11:27 1999
++++ OpenPTC-GGI-0.5.0/examples/image/Image.cc  Sat Dec 21 10:03:27 2002
+@@ -6,13 +6,13 @@
+ // include files
+ #include "ptc.h"
+-#include <fstream.h>
++#include <fstream>
+ void load(Surface &surface,char filename[])
+ {
+     // open image file
+-    ifstream is(filename,ios::in|ios::binary|ios::nocreate);
++    std::ifstream is(filename,std::ios::in|std::ios::binary);
+     // check image file stream
+     if (!is) throw Error("could not load image");
+--- OpenPTC-GGI-0.5.0/examples/info/Info.cc.orig       Sat Mar 20 23:12:18 1999
++++ OpenPTC-GGI-0.5.0/examples/info/Info.cc    Sat Dec 21 10:04:07 2002
+@@ -34,7 +34,7 @@
+ }
+-void main()
++int main()
+ {
+     try
+     {
+@@ -68,5 +68,6 @@
+         // report error
+         error.report();
+     }
++    return 0;
+ }
+--- OpenPTC-GGI-0.5.0/examples/modes/Modes.cc.orig     Sat Mar 20 23:14:23 1999
++++ OpenPTC-GGI-0.5.0/examples/modes/Modes.cc  Sat Dec 21 10:05:07 2002
+@@ -47,7 +47,7 @@
+ }\r
\r
\r
+-void main()\r
++int main()\r
+ {\r
+     try\r
+     {\r
+@@ -87,5 +87,6 @@
+         // report error\r
+         error.report();\r
+     }\r
++    return 0;\r
+ }\r
\r
+--- OpenPTC-GGI-0.5.0/examples/pixel/Pixel.cc.orig     Sat Mar 20 23:16:04 1999
++++ OpenPTC-GGI-0.5.0/examples/pixel/Pixel.cc  Sat Dec 21 10:07:02 2002
+@@ -24,7 +24,7 @@
+ }
+-void main()
++int main()
+ {
+     try
+     {
+@@ -57,4 +57,5 @@
+         // report error
+         error.report();
+     }
++    return 0;
+ }
+--- OpenPTC-GGI-0.5.0/examples/save/Save.cc.orig       Sat Mar 20 23:17:22 1999
++++ OpenPTC-GGI-0.5.0/examples/save/Save.cc    Sat Dec 21 10:08:29 2002
+@@ -7,13 +7,13 @@
+ // include files
+ #include "ptc.h"
+ #include <math.h>
+-#include <fstream.h>
++#include <fstream>
+ void save(Surface &surface,char filename[])
+ {
+     // open image file for writing
+-    ofstream os(filename,ios::out|ios::binary);
++    std::ofstream os(filename,std::ios::out|std::ios::binary);
+     // check image file stream
+     if (!os) throw Error("could not open image file for writing");
+@@ -37,7 +37,7 @@
+     header[16] = 24;
+     // write tga header
+-    os.write(header,18);
++    os.write((const char*)header,18);
+     // calculate size of image pixels
+     const int size = width * height * 3;
+--- OpenPTC-GGI-0.5.0/examples/stretch/Stretch.cc.orig Sun Mar 21 00:07:08 1999
++++ OpenPTC-GGI-0.5.0/examples/stretch/Stretch.cc      Sat Dec 21 10:09:52 2002
+@@ -7,13 +7,13 @@
+ // include files
+ #include "ptc.h"
+ #include <math.h>
+-#include <fstream.h>
++#include <fstream>
+ void load(Surface &surface,char filename[])
+ {
+     // open image file
+-    ifstream is(filename,ios::in|ios::binary|ios::nocreate);
++    std::ifstream is(filename,std::ios::in|std::ios::binary);
+     // check image file stream
+     if (!is) throw Error("could not load image");
+--- OpenPTC-GGI-0.5.0/demos/fire/Fire.cc.orig  Sun Mar 21 00:46:48 1999
++++ OpenPTC-GGI-0.5.0/demos/fire/Fire.cc       Sat Dec 21 10:10:48 2002
+@@ -68,7 +68,7 @@
+ }
+-void main()
++int main()
+ {
+     try
+     {
+--- OpenPTC-GGI-0.5.0/demos/flower/Flower.cc.orig      Sun Mar 21 00:47:26 1999
++++ OpenPTC-GGI-0.5.0/demos/flower/Flower.cc   Sat Dec 21 10:11:24 2002
+@@ -93,7 +93,7 @@
+ }
+-void main()
++int main()
+ {
+     try
+     {
+--- OpenPTC-GGI-0.5.0/demos/land/Land.cc.orig  Sun Mar 21 01:06:36 1999
++++ OpenPTC-GGI-0.5.0/demos/land/Land.cc       Sat Dec 21 10:13:06 2002
+@@ -256,10 +256,11 @@
+ //
+ void View(int x0,int y0,int angle, int height, int32 *surface_buffer)
+ {
++ int d;
+  //
+  // Initialize last-y and last-color arrays
+  //
+- for ( int d=0; d<SCREENWIDTH; d++ )
++ for ( d=0; d<SCREENWIDTH; d++ )
+  {
+   lasty[d]=SCREENHEIGHT;
+   lastc[d]=-1;
+--- OpenPTC-GGI-0.5.0/demos/lights/Lights.cc.orig      Sun Mar 21 00:48:15 1999
++++ OpenPTC-GGI-0.5.0/demos/lights/Lights.cc   Sat Dec 21 10:13:49 2002
+@@ -22,7 +22,7 @@
+ }
+-void main()
++int main()
+ {
+     try
+     {
+--- OpenPTC-GGI-0.5.0/demos/mojo/Mojo.cc.orig  Sun Mar 21 00:47:37 1999
++++ OpenPTC-GGI-0.5.0/demos/mojo/Mojo.cc       Sat Dec 21 10:15:57 2002
+@@ -20,7 +20,7 @@
+ #include "ptc.h"
+ #include <math.h>
+ #include <stdio.h>
+-#include <fstream.h>
++#include <fstream>
+ #include <stdlib.h>
+ #include <string.h>
+@@ -316,7 +316,7 @@
+       /////////////////
+       // load Mojo.raw
+-    ifstream file("Mojo.raw");
++    std::ifstream file("Mojo.raw");
+     file.read((char*)MaskMap,320*200);
+     file.close();
+@@ -456,7 +456,7 @@
+ }
+-void main()
++int main()
+ {
+     try
+     {
+@@ -486,4 +486,5 @@
+         // report error
+         error.report();
+     }
++    return 0;
+ }
+--- OpenPTC-GGI-0.5.0/demos/tunnel/Tunnel.cc.orig      Sun Mar 21 00:47:18 1999
++++ OpenPTC-GGI-0.5.0/demos/tunnel/Tunnel.cc   Sat Dec 21 10:16:41 2002
+@@ -103,7 +103,7 @@
+ };
+-void main()
++int main()
+ {
+     try
+     {
+@@ -153,4 +153,5 @@
+         // report error
+         error.report();
+     }
++    return 0;
+ }
+--- OpenPTC-GGI-0.5.0/tests/Console.cc.orig    Thu Feb 18 16:08:52 1999
++++ OpenPTC-GGI-0.5.0/tests/Console.cc Sat Dec 21 10:17:48 2002
+@@ -10,7 +10,7 @@
+ #include <string.h>
+-void main()
++int main()
+ {
+     try
+     {
+@@ -169,4 +169,5 @@
+         // report error
+         error.report();
+     }
++    return 0;
+ }
+--- OpenPTC-GGI-0.5.0/tests/Link.cc.orig       Thu Feb 18 16:07:46 1999
++++ OpenPTC-GGI-0.5.0/tests/Link.cc    Sat Dec 21 10:18:50 2002
+@@ -603,8 +603,9 @@
+ }\r
\r
+-void main()
++int main()
+ {\r
+     // this program does nothing but test linkage with OpenPTC\r
+     printf("congratulations you passed the link test\n");\r
++    return 0;
+ }
+--- OpenPTC-GGI-0.5.0/tests/Timer.cc.orig      Thu Feb 18 16:28:08 1999
++++ OpenPTC-GGI-0.5.0/tests/Timer.cc   Sat Dec 21 10:19:11 2002
+@@ -10,7 +10,7 @@
+ #include <stdio.h>
+-void main()
++int main()
+ {
+     try
+     {
+@@ -84,4 +84,5 @@
+         // report error
+         error.report();
+     }
++    return 0;
+ }
diff --git a/OpenPTC-GGI-include.patch b/OpenPTC-GGI-include.patch
new file mode 100644 (file)
index 0000000..6c6a015
--- /dev/null
@@ -0,0 +1,10 @@
+--- OpenPTC-GGI-0.5.0/source/Core/Timer.cc.orig        Mon May  3 20:06:57 1999
++++ OpenPTC-GGI-0.5.0/source/Core/Timer.cc     Sat Dec 21 09:51:16 2002
+@@ -5,6 +5,7 @@
+ //
+ // include files
++#include <stdlib.h>
+ #include <sys/time.h>
+ #include "Timer.h"
+ #include "Error.h"
diff --git a/OpenPTC-GGI.spec b/OpenPTC-GGI.spec
new file mode 100644 (file)
index 0000000..27cb9db
--- /dev/null
@@ -0,0 +1,143 @@
+Summary:       OpenPTC for GGI
+Summary(pl):   OpenPTC dla GGI
+Name:          OpenPTC-GGI
+Version:       0.5.0
+Release:       1
+License:       LGPL
+Group:         Libraries
+Source0:       http://www.gaffer.org/ptc/download/distributions/Unix/%{name}-%{version}.tgz
+Patch0:                %{name}-acfix.patch
+Patch1:                %{name}-gcc3.patch
+Patch2:                %{name}-include.patch
+Patch3:                %{name}-DESTDIR.patch
+URL:           http://www.gaffer.org/ptc/ptc.html
+BuildRequires: Hermes-devel >= 1.2.4
+BuildRequires: autoconf
+BuildRequires: libggi-devel
+BuildRequires: libstdc++-devel >= 2.10.0
+Requires:      Hermes >= 1.2.4
+Provides:      OpenPTC
+Obsoletes:     OpenPTC-x11
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Prometheus Truecolour (OpenPTC) is a third-generation standard for
+cross platform low-level graphics access. A lot of design experience
+has gone into it to provide one of the cleanest APIs available for
+this kind of purpose.
+
+OpenPTC will provide you with a frame-buffer to draw into. You can
+choose that buffer to use a pixel format convenient for you, OpenPTC
+will convert it to the video modes on the target platform, using
+highly optimised x86 and MMX routines where available. This is
+achieved using the HERMES ((c)1998/99 Christian Nentwich et al) pixel
+conversion library.
+
+OpenPTC 1.0 is available for X11, GGI (Linux), Win32, DOS and JAVA.
+Work for other platforms is in progress. All implementations of PTC
+come with full source code and may be used free of charge even in
+commercial projects.
+
+%description -l pl
+Prometheus Truecolour (OpenPTC) jest trzeci± generacj± standardu dla
+wieloplatformowej niskopoziomowej grafiki. Umo¿liwia operacje na
+frame-bufferze oraz konwersj± (przy pomocy biblioteki Hermes) na ró¿ne
+tryby graficzne.
+
+OpenPTC jest dostêpne dla X11, GGI, Win32, DOS i JAVA.
+
+%package devel
+Summary:       OpenPTC development package
+Summary(pl):   Pakiet programistyczny dla OpenPTC
+Group:         Development/Libraries
+Requires:      %{name} = %{version}
+Provides:      OpenPTC-devel
+Obsoletes:     OpenPTC-x11-devel
+
+%description devel
+OpenPTC development package.
+
+%description devel -l pl
+Pakiet programistyczny dla OpenPTC.
+
+%package static
+Summary:       OpenPTC static libraries
+Summary(pl):   Biblioteki statyczne dla OpenPTC
+Group:         Development/Libraries
+Requires:      %{name}-devel = %{version}
+Provides:      OpenPTC-static
+Obsoletes:     OpenPTC-x11-static
+
+%description static
+OpenPTC static libraries.
+
+%description static -l pl
+Biblioteki statyczne dla OpenPTC.
+
+%package demos
+Summary:       OpenPTC demos and examples
+Summary(pl):   Programy demonstracyjne i przyk³adowe do OpenPTC
+Group:         Applications/Graphics
+Requires:      %{name} = %{version}
+
+%description demos
+OpenPTC demos and examples (executables and sources).
+
+%description demos -l pl
+Programy demonstracyjne i przyk³adowe do OpenPTC (pliki wykonywalne
+i ¼ród³a).
+
+%prep
+%setup -q
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+
+%build
+%{__autoconf}
+echo y | \
+%configure
+
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+       DESTDIR=$RPM_BUILD_ROOT
+
+install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+find demos examples -name '*.o' | xargs rm -f
+cp -rf demos examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+echo '%defattr(644,root,root,755)' > demos.list
+find demos examples -type d | \
+       sed -e "s@^@%dir %{_examplesdir}/%{name}-%{version}/@" >> demos.list
+find demos examples -type f -a ! -perm -100 | \
+       sed -e "s@^@%{_examplesdir}/%{name}-%{version}/@" >> demos.list
+find demos examples -type f -a -perm -100 | \
+       sed -e "s@^@%attr(755,root,root) %{_examplesdir}/%{name}-%{version}/@" >> demos.list
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post   -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc BUGS DOCUMENTATION README WARNING
+%attr(755,root,root) %{_libdir}/lib*.so.*.*
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/ptc-config
+%attr(755,root,root) %{_libdir}/lib*.so
+%{_includedir}/ptc
+
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/lib*.a
+
+%files demos -f demos.list
+%defattr(644,root,root,755)
This page took 0.095184 seconds and 4 git commands to generate.