From 94be7937d285d84971d4cbc7f6d87f49d323336b Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 6 Jan 2024 03:36:49 +0100 Subject: [PATCH] update to 1.0.7 [release 1.0.7-1mamba;Wed Dec 12 2012] --- README.md | 6 ++++ libEMF-1.0-gcc3.patch | 75 ++++++++++++++++++++++++++++++++++++++ libEMF.spec | 83 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 164 insertions(+) create mode 100644 libEMF-1.0-gcc3.patch create mode 100644 libEMF.spec diff --git a/README.md b/README.md index 2af88aa..8f76db6 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,8 @@ # libEMF +LibEMF is a C/C++ library which provides a drawing toolkit based on ECMA-234. +The general purpose of this library is to create vector graphics files on POSIX systems which can be imported into StarOffice/OpenOffice. + +Therefore, if your graphics code only outputs PostScript, you can now easily +convert it to EMF. + diff --git a/libEMF-1.0-gcc3.patch b/libEMF-1.0-gcc3.patch new file mode 100644 index 0000000..5c811ae --- /dev/null +++ b/libEMF-1.0-gcc3.patch @@ -0,0 +1,75 @@ +diff -pur libEMF-1.0/libemf/libemf.cpp libEMF-1.0-gcc3/libemf/libemf.cpp +--- libEMF-1.0/libemf/libemf.cpp 2002-01-29 04:37:54.000000000 +0100 ++++ libEMF-1.0-gcc3/libemf/libemf.cpp 2005-07-28 14:27:11.000000000 +0200 +@@ -48,7 +48,7 @@ namespace EMF { + be32 = !be16; + + if ( be32 != be16 ) { +- cerr << "endian-ness not consistent between short's and int's!" << endl; ++ std::cerr << "endian-ness not consistent between short's and int's!" << std::endl; + ::abort(); + } + +@@ -849,7 +849,7 @@ extern "C" { + if ( dc->fp ) { + + std::for_each( dc->records.begin(), dc->records.end(), +- std::bind2nd( std::mem_fun1( &EMF::METARECORD::serialize ), ++ std::bind2nd( mem_fun1( &EMF::METARECORD::serialize ), + dc->ds ) ); + fclose( dc->fp ); + +@@ -896,7 +896,7 @@ extern "C" { + if ( dc->fp ) { + + std::for_each( dc->records.begin(), dc->records.end(), +- std::bind2nd( std::mem_fun1( &EMF::METARECORD::serialize ), ++ std::bind2nd( mem_fun1( &EMF::METARECORD::serialize ), + dc->ds ) ); + } + +@@ -1032,7 +1032,7 @@ extern "C" { + if ( feof( fp ) ) break; + + if ( emr.nSize == 0 ) { +- cerr << "GetEnhMetaFileW error: record size == 0. cannot continue" << endl; ++ std::cerr << "GetEnhMetaFileW error: record size == 0. cannot continue" << std::endl; + fclose( fp ); + return 0; + } +@@ -1050,8 +1050,8 @@ extern "C" { + dc->appendRecord( record ); + } + else +- cerr << "GetEnhMetaFileW warning: read unknown record type " << emr.iType +- << " of size " << emr.nSize << endl; ++ std::cerr << "GetEnhMetaFileW warning: read unknown record type " << emr.iType ++ << " of size " << emr.nSize << std::endl; + + // Regardless, position ourselves at the next record. + fseek( fp, next_position, SEEK_SET ); +@@ -1108,7 +1108,7 @@ extern "C" { + if ( dc == 0 ) return; + + std::for_each( dc->records.begin(), dc->records.end(), +- std::mem_fun( &EMF::METARECORD::edit ) ); ++ mem_fun( &EMF::METARECORD::edit ) ); + #endif /* ENABLE_EDITING */ + } + +diff -pur libEMF-1.0/libemf/libemf.h libEMF-1.0-gcc3/libemf/libemf.h +--- libEMF-1.0/libemf/libemf.h 2002-01-29 05:54:27.000000000 +0100 ++++ libEMF-1.0-gcc3/libemf/libemf.h 2005-07-28 14:27:49.000000000 +0200 +@@ -21,10 +21,12 @@ + #ifndef _LIBEMF_H + #define _LIBEMF_H 1 + ++#include + #include + #include + #include + #include ++#include + #include + + #include diff --git a/libEMF.spec b/libEMF.spec new file mode 100644 index 0000000..b1317a8 --- /dev/null +++ b/libEMF.spec @@ -0,0 +1,83 @@ +Name: libEMF +Version: 1.0.7 +Release: 1mamba +Summary: Library for manipulation with Enhanced MetaFile (EMF, ECMA-234) +Group: System/Libraries +Vendor: openmamba +Distribution: openmamba +Packager: Aleph0 +URL: http://libemf.sourceforge.net +Source: http://downloads.sourceforge.net/project/libemf/libemf/%{version}/libEMF-%{version}.tar.gz +Patch: %{name}-1.0-gcc3.patch +License: GPL +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +BuildRequires: libgcc +BuildRequires: libstdc++6-devel +## AUTOBUILDREQ-END +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +LibEMF is a C/C++ library which provides a drawing toolkit based on ECMA-234. +The general purpose of this library is to create vector graphics files on POSIX systems which can be imported into StarOffice/OpenOffice. + +Therefore, if your graphics code only outputs PostScript, you can now easily +convert it to EMF. + +%package devel +Group: Development/Libraries +Summary: Static libraries and headers for %{name} +Requires: %{name} = %{version} + +%description devel +LibEMF is a C/C++ library which provides a drawing toolkit based on ECMA-234. +The general purpose of this library is to create vector graphics files on POSIX systems which can be imported into StarOffice/OpenOffice. + +This package contains static libraries and header files need for development. + +%prep +%setup -q +#%patch -p1 + +%build +%configure +%make + +%install +[ "%{buildroot}" != / ] && rm -rf %{buildroot} +%makeinstall + +%clean +[ "%{buildroot}" != / ] && rm -rf %{buildroot} + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%files +%defattr(-,root,root) +%{_bindir}/printemf +%{_libdir}/*.so.* +%doc AUTHORS COPYING COPYING.LIB ChangeLog INSTALL NEWS README + +%files devel +%defattr(-,root,root) +%dir %{_includedir}/libEMF +%{_includedir}/libEMF/*.h +%{_includedir}/libEMF/wine/*.h +%{_libdir}/*.a +%{_libdir}/*.la +%{_libdir}/*.so +%doc doc/html/* + +%changelog +* Wed Dec 12 2012 Silvan Calarco 1.0.7-1mamba +- update to 1.0.7 + +* Thu Jun 03 2010 Automatic Build System 1.0.4-1mamba +- automatic update by autodist + +* Wed Jul 02 2008 Tiziana Ferro 1.0-2mamba +- update Vendor, Distribution, mantainer, buildrequirements list + +* Thu Jul 28 2005 Davide Madrisan 1.0-1qilnx +- package created by autospec