- added c++,doc patches to build with recent g++ and latex master
authorJakub Bogusz <qboosh@pld-linux.org>
Wed, 16 Nov 2011 18:03:45 +0000 (18:03 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- added shared patch to build shared library; use standard base/-devel/-static split
- added current URL
- release 4

Changed files:
    dime-c++.patch -> 1.1
    dime-doc.patch -> 1.1
    dime-shared.patch -> 1.1
    dime.spec -> 1.34

dime-c++.patch [new file with mode: 0644]
dime-doc.patch [new file with mode: 0644]
dime-shared.patch [new file with mode: 0644]
dime.spec

diff --git a/dime-c++.patch b/dime-c++.patch
new file mode 100644 (file)
index 0000000..651f5d7
--- /dev/null
@@ -0,0 +1,64 @@
+--- dime-0.9.1/include/dime/classes/Class.h.orig       1999-02-25 17:13:24.000000000 +0100
++++ dime-0.9.1/include/dime/classes/Class.h    2011-11-15 20:51:01.204433613 +0100
+@@ -44,6 +44,7 @@
+ class dimeInput;
+ class dimeMemHandler;
+ class dimeOutput;
++class dimeModel;
+ class dimeClass : public dimeRecordHolder
+ {
+--- dime-0.9.1/include/dime/entities/Entity.h.orig     1999-02-25 17:13:24.000000000 +0100
++++ dime-0.9.1/include/dime/entities/Entity.h  2011-11-15 20:52:01.871102310 +0100
+@@ -42,6 +42,7 @@
+ #include <dime/RecordHolder.h>
+ class dimeLayer;
++class dimeModel;
+ class dimeEntity : public dimeRecordHolder
+ {
+--- dime-0.9.1/include/dime/entities/Vertex.h.orig     1999-02-25 17:13:24.000000000 +0100
++++ dime-0.9.1/include/dime/entities/Vertex.h  2011-11-15 20:52:28.654436541 +0100
+@@ -39,6 +39,8 @@
+ #include <dime/entities/Entity.h>
+ #include <dime/util/Linear.h>
++class dimePolyline;
++
+ class dimeVertex : public dimeEntity
+ {
+   friend class dimePolyline;
+--- dime-0.9.1/include/dime/entities/Insert.h.orig     1999-02-25 17:13:24.000000000 +0100
++++ dime-0.9.1/include/dime/entities/Insert.h  2011-11-15 20:53:17.721104851 +0100
+@@ -39,6 +39,8 @@
+ #include <dime/entities/Entity.h>
+ #include <dime/util/Linear.h>
++class dimeBlock;
++
+ class dimeInsert : public dimeEntity
+ {
+   friend class dimeEntitiesSection;
+--- dime-0.9.1/include/dime/objects/Object.h.orig      1999-02-25 17:13:24.000000000 +0100
++++ dime-0.9.1/include/dime/objects/Object.h   2011-11-15 20:51:25.181101082 +0100
+@@ -41,6 +41,8 @@
+ #include <dime/util/Linear.h>
+ #include <dime/RecordHolder.h>
++class dimeModel;
++
+ class dimeObject : public dimeRecordHolder
+ {
+   friend class dimeObjectesSection;
+--- dime-0.9.1/include/dime/Output.h.orig      1999-02-25 17:13:23.000000000 +0100
++++ dime-0.9.1/include/dime/Output.h   2011-11-15 20:49:54.631098052 +0100
+@@ -38,6 +38,8 @@
+ #include <dime/Basic.h>
+ #include <stdio.h>
++class dimeModel;
++
+ class dimeOutput
+ {
+ public:
diff --git a/dime-doc.patch b/dime-doc.patch
new file mode 100644 (file)
index 0000000..81888e3
--- /dev/null
@@ -0,0 +1,17 @@
+--- dime-0.9.1/docs/latex/refman.tex.orig      1999-02-25 17:13:42.000000000 +0100
++++ dime-0.9.1/docs/latex/refman.tex   2011-11-15 21:08:20.837801758 +0100
+@@ -1,12 +1,12 @@
+ \documentclass[a4paper]{book}
+ \usepackage{a4wide}
+ \usepackage{makeidx}
+-\usepackage{fancyheadings}
++\usepackage{fancyhdr}
+ \usepackage{epsf}
+ \usepackage{doxygen}
+ \makeindex
+ \setcounter{tocdepth}{1}
+-\setlength{\footrulewidth}{0.4pt}
++\renewcommand{\footrulewidth}{0.4pt}
+ \begin{document}
+ \title{DIME Reference Manual}
+ \author{generated by Doxygen}
diff --git a/dime-shared.patch b/dime-shared.patch
new file mode 100644 (file)
index 0000000..28291b7
--- /dev/null
@@ -0,0 +1,42 @@
+--- dime-0.9.1/build/makefile.orig     1999-02-17 16:05:33.000000000 +0100
++++ dime-0.9.1/build/makefile  2011-11-15 20:57:49.877780630 +0100
+@@ -8,7 +8,7 @@
+ #****************************************************************
+           CC = g++
+-          LD = ar cqs
++          LD = $(CC)
+      INCLUDE = -I../include
+          OPT = -O2
+@@ -17,7 +17,9 @@
+         WARN =
+       CFLAGS = $(OPT) $(DEBUG) $(DEFINES) $(WARN) $(INCLUDE) -c
+-     COMPILE = $(CC) $(CFLAGS) $^ -o $@
++     COMPILE = libtool --mode=compile --tag=CXX $(CC) $(CFLAGS) $^ -o $(@:.o=.lo)
++      LIBDIR = /usr/lib
++        LINK = libtool --mode=link --tag=CXX $(LD) $(LDFLAGS) -rpath $(LIBDIR) -o
+      TARGETS = libdime.a
+@@ -79,6 +81,8 @@
+   objs/UCSTable.o \
+   objs/LayerTable.o
++LTOBJECTS=$(OBJECTS:%.o=%.lo)
++
+ #***************************************************************************
+ all:: $(TARGETS)
+@@ -89,8 +93,8 @@
+ objs:
+       @mkdir $@
+-libdime.a: objs $(OBJECTS)
+-      $(LD) $@ $(OBJECTS)
++libdime.la: objs $(OBJECTS)
++      $(LINK) $@ $(LTOBJECTS)
+ #***************************************************************************
index 3a94862..54bee24 100644 (file)
--- a/dime.spec
+++ b/dime.spec
@@ -2,16 +2,21 @@ Summary:      DIME - DXF Import, manipulation and Export library
 Summary(pl.UTF-8):     DIME - biblioteka do manipulacji plikami w formacie DXF
 Name:          dime
 Version:       0.9.1
-Release:       3
-License:       GPL
+Release:       4
+License:       GPL v2
 Group:         Libraries
-# Old site:    ftp://ftp.sim.no/pub/dime/
-# New site(?): http://download.berlios.de/cad2octree/
+# original source (no lonver available): ftp://ftp.sim.no/pub/dime/
+# new snapshot: ftp://ftp.sim.no/pub/snapshots/dime-latest.tar.gz
 Source0:       %{name}-%{version}-src.tar.bz2
 # Source0-md5: 142af240cd35508d606917a38164c759
 Source1:       %{name}-%{version}-doc.tar.bz2
 # Source1-md5: 994706320ce7d222a1597913ba0cbee0
-BuildRequires: gcc-c++
+Patch0:                %{name}-c++.patch
+Patch1:                %{name}-shared.patch
+Patch2:                %{name}-doc.patch
+URL:           http://www.coin3d.org/lib/dime
+BuildRequires: libstdc++-devel
+BuildRequires: libtool
 BuildRequires: tetex-dvips
 BuildRequires: tetex-fonts-ams
 BuildRequires: tetex-format-latex
@@ -57,41 +62,59 @@ Bibliotek obsługuje głównie następujące funkcje:
 - manipulacja hierarchią obiektów dime
 - przegląd hierarchii obiektów dime podczas wykonywania różnych zadań
 - zachowywanie obiektów hierarchii dime w postaci plików zgodnych z
-  formatem DXF Oryginalnym celem dime było importowanie i eksportowanie
-  plików DXF. Dlatego zaimplementowano specjalne techniki zarządzania
-  pamięcią, dzięki którym można znacznie zwiększyć wydajność.
+  formatem DXF
+
+Pierwotnym celem dime było importowanie i eksportowanie plików DXF.
+Dlatego zaimplementowano specjalne techniki zarządzania pamięcią,
+dzięki którym można znacznie zwiększyć wydajność.
 
 %package devel
-Summary:       DIME - development files
-Summary(pl.UTF-8):     DIME - część dla programistów
+Summary:       Header files for DIME
+Summary(pl.UTF-8):     Pliki nagłówkowe DIME
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
 
 %description devel
-Dime development files.
+Header files for DIME.
 
 %description devel -l pl.UTF-8
-Pliki dime przeznaczone dla programistów.
+Pliki nagłówkowe DIME.
+
+%package static
+Summary:       Static DIME library
+Summary(pl.UTF-8):     Statyczna biblioteka DIME
+Group:         Development/Libraries
+Requires:      %{name}-devel = %{version}-%{release}
+
+%description static
+Static DIME library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka DIME.
 
 %package documentation
-Summary:       DIME doc
+Summary:       DIME documentation
 Summary(pl.UTF-8):     DIME - dokumentacja
 Group:         Documentation
 
 %description documentation
-Dime documentation.
+DIME documentation.
 
 %description documentation -l pl.UTF-8
-Dokumentacja dime.
+Dokumentacja do DIME.
 
 %prep
-%setup -q
-%setup -q -D -b1
+%setup -q -b1
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
 
 %build
-%{__make} -C build \
+%{__make} -C build libdime.la \
        CC="%{__cxx}" \
-       OPT="%{rpmcflags}"
+       OPT="%{rpmcxxflags} %{rpmcppflags}" \
+       LDFLAGS="%{rpmldflags}" \
+       LIBDIR=%{_libdir}
 
 %{__make} -C docs/latex refman.ps
 
@@ -100,29 +123,35 @@ rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}} \
        $RPM_BUILD_ROOT%{_docdir}/%{name}-documentation-%{version}/{latex,html}
 
-cp -rp include/* $RPM_BUILD_ROOT%{_includedir}
-install build/libdime.a $RPM_BUILD_ROOT%{_libdir}
-cp -rp docs/latex/*.tex $RPM_BUILD_ROOT%{_docdir}/%{name}-documentation-%{version}/latex
-cp -rp docs/latex/*.sty $RPM_BUILD_ROOT%{_docdir}/%{name}-documentation-%{version}/latex
+cp -pr include/* $RPM_BUILD_ROOT%{_includedir}
+libtool --mode=install install build/libdime.la $RPM_BUILD_ROOT%{_libdir}
 
-cp -rp docs/latex/* $RPM_BUILD_ROOT%{_docdir}/%{name}-documentation-%{version}/html
+cp -pr docs/latex/*.tex $RPM_BUILD_ROOT%{_docdir}/%{name}-documentation-%{version}/latex
+cp -pr docs/latex/*.sty $RPM_BUILD_ROOT%{_docdir}/%{name}-documentation-%{version}/latex
+cp -pr docs/html/* $RPM_BUILD_ROOT%{_docdir}/%{name}-documentation-%{version}/html
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc README TODO ChangeLog
-%{_libdir}/libdime.a
+%doc ChangeLog README TODO
+%attr(755,root,root) %{_libdir}/libdime.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libdime.so.0
 
 %files devel
 %defattr(644,root,root,755)
-%doc docs/latex/refman.ps ChangeLog README TODO
+%doc docs/latex/refman.ps
+%attr(755,root,root) %{_libdir}/libdime.so
+%{_libdir}/libdime.la
 %{_includedir}/dime
 
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libdime.a
+
 %files documentation
 %defattr(644,root,root,755)
-#%doc docs/html/* docs/latex/*.tex docs/latex/*.sty
 %dir %{_docdir}/%{name}-documentation-%{version}
 %{_docdir}/%{name}-documentation-%{version}/latex
 %{_docdir}/%{name}-documentation-%{version}/html
This page took 0.131755 seconds and 4 git commands to generate.