diff options
author | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2013-06-17 12:08:40 +0200 |
---|---|---|
committer | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2013-06-17 12:08:40 +0200 |
commit | aa9d9413884702f23ec96cf42455052c27cf8b90 (patch) | |
tree | d21e262c738656fb947eb4ed9e9aaf69c57a5ba6 /src/lib | |
parent | 2aa9ef5e2030e3c4200a3ca198f0728c3ee384cf (diff) |
Random build fixes
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/Makefile.am | 47 | ||||
-rw-r--r-- | src/lib/PictHeader.cpp | 6 | ||||
-rw-r--r-- | src/lib/PictImage.cpp | 6 | ||||
-rw-r--r-- | src/lib/PictImage.h | 49 | ||||
-rw-r--r-- | src/lib/PictSVGGenerator.cpp | 2 | ||||
-rw-r--r-- | src/lib/PictSVGGenerator.h | 2 | ||||
-rw-r--r-- | src/lib/libpict.h.in | 37 | ||||
-rw-r--r-- | src/lib/libpict.rc.in | 8 | ||||
-rw-r--r-- | src/lib/libpict_utils.h | 15 |
9 files changed, 37 insertions, 135 deletions
diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am index bd4a158..ad6d047 100644 --- a/src/lib/Makefile.am +++ b/src/lib/Makefile.am @@ -1,35 +1,21 @@ if PLATFORM_WIN32 -no_undefined = -no-undefined version_info = -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) -avoid-version else -no_undefined = version_info = -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) endif -if OS_WIN32 -install-libtool-import-lib: - $(INSTALL) @Pict_OBJDIR@/libpict-@Pict_MAJOR_VERSION@.@Pict_MINOR_VERSION@.dll.a $(DESTDIR)$(libdir) - -uninstall-libtool-import-lib: - -rm $(DESTDIR)$(libdir)/libpict-@Pict_MAJOR_VERSION@.@Pict_MINOR_VERSION@.dll.a - -else -install-libtool-import-lib: -uninstall-libtool-import-lib: -endif +lib_LTLIBRARIES = libpict-@PICT_MAJOR_VERSION@.@PICT_MINOR_VERSION@.la +libpict_@PICT_MAJOR_VERSION@_@PICT_MINOR_VERSION@_includedir = $(includedir)/libpict-@PICT_MAJOR_VERSION@.@PICT_MINOR_VERSION@/libpict +libpict_@PICT_MAJOR_VERSION@_@PICT_MINOR_VERSION@_include_HEADERS = \ + $(top_srcdir)/inc/libpict/libpict.h \ + $(top_srcdir)/inc/libpict/PictImage.h -lib_LTLIBRARIES = libpict-@Pict_MAJOR_VERSION@.@Pict_MINOR_VERSION@.la -libpict_@Pict_MAJOR_VERSION@_@Pict_MINOR_VERSION@_includedir = $(includedir)/libpict-@Pict_MAJOR_VERSION@.@Pict_MINOR_VERSION@/libpict -libpict_@Pict_MAJOR_VERSION@_@Pict_MINOR_VERSION@_include_HEADERS = \ - libpict.h \ - PictImage.h - -AM_CXXFLAGS = $(LIBPict_CXXFLAGS) $(DEBUG_CXXFLAGS) +AM_CXXFLAGS = -I$(top_srcdir)/inc $(LIBPICT_CXXFLAGS) $(DEBUG_CXXFLAGS) -libpict_@Pict_MAJOR_VERSION@_@Pict_MINOR_VERSION@_la_LIBADD = $(LIBPict_LIBS) @LIBPict_WIN32_RESOURCE@ -libpict_@Pict_MAJOR_VERSION@_@Pict_MINOR_VERSION@_la_DEPENDENCIES = @LIBPict_WIN32_RESOURCE@ -libpict_@Pict_MAJOR_VERSION@_@Pict_MINOR_VERSION@_la_LDFLAGS = $(version_info) -export-dynamic $(no_undefined) -libpict_@Pict_MAJOR_VERSION@_@Pict_MINOR_VERSION@_la_SOURCES = \ +libpict_@PICT_MAJOR_VERSION@_@PICT_MINOR_VERSION@_la_LIBADD = $(LIBPICT_LIBS) @LIBPICT_WIN32_RESOURCE@ +libpict_@PICT_MAJOR_VERSION@_@PICT_MINOR_VERSION@_la_DEPENDENCIES = @LIBPICT_WIN32_RESOURCE@ +libpict_@PICT_MAJOR_VERSION@_@PICT_MINOR_VERSION@_la_LDFLAGS = $(version_info) -export-dynamic -no-undefined +libpict_@PICT_MAJOR_VERSION@_@PICT_MINOR_VERSION@_la_SOURCES = \ PictImage.cpp \ PictColor.cpp \ PictHeader.cpp \ @@ -50,21 +36,14 @@ libpict_@Pict_MAJOR_VERSION@_@Pict_MINOR_VERSION@_la_SOURCES = \ if OS_WIN32 -@LIBPict_WIN32_RESOURCE@ : libpict.rc $(libpict_@Pict_MAJOR_VERSION@_@Pict_MINOR_VERSION@_la_OBJECTS) +@LIBPICT_WIN32_RESOURCE@ : libpict.rc $(libpict_@PICT_MAJOR_VERSION@_@PICT_MINOR_VERSION@_la_OBJECTS) chmod +x $(top_srcdir)/build/win32/*compile-resource - WINDRES=@WINDRES@ $(top_srcdir)/build/win32/lt-compile-resource libpict.rc @LIBPict_WIN32_RESOURCE@ + WINDRES=@WINDRES@ $(top_srcdir)/build/win32/lt-compile-resource libpict.rc @LIBPICT_WIN32_RESOURCE@ endif - -install-data-local: install-libtool-import-lib - -uninstall-local: uninstall-libtool-import-lib - EXTRA_DIST = \ - libpict.h.in \ - libpict.rc.in \ - makefile.mk + libpict.rc.in # These may be in the builddir too BUILD_EXTRA_DIST = \ diff --git a/src/lib/PictHeader.cpp b/src/lib/PictHeader.cpp index 46905e1..c9338a6 100644 --- a/src/lib/PictHeader.cpp +++ b/src/lib/PictHeader.cpp @@ -28,7 +28,7 @@ unsigned char readU8(WPXInputStream *input) unsigned char const *p = input->read(sizeof(unsigned char), numBytesRead); if (numBytesRead != sizeof(unsigned char)) - ; + throw libpict::EndOfStreamException(); return *(unsigned char const *)(p); } @@ -38,7 +38,7 @@ unsigned short readU16(WPXInputStream *input) unsigned short const *p = (unsigned short const *)input->read(sizeof(unsigned short), numBytesRead); if (numBytesRead != sizeof(unsigned short)) - ; + throw libpict::EndOfStreamException(); return (unsigned short)((((unsigned char const *)(p))[1] << 0) | (((unsigned char const *)(p))[0] << 8)); } @@ -47,7 +47,7 @@ unsigned readU32(WPXInputStream *input) unsigned long numBytesRead; unsigned const *p = (unsigned const *)input->read(sizeof(unsigned), numBytesRead); if (numBytesRead != sizeof(unsigned)) - ; + throw libpict::EndOfStreamException(); return (unsigned)((((unsigned char const *)(p))[3] << 0) | (((unsigned char const *)(p))[2] << 8) | (((unsigned char const *)(p))[1] << 16) | (((unsigned char const *)(p))[0] << 24)); } diff --git a/src/lib/PictImage.cpp b/src/lib/PictImage.cpp index e2bee15..ad78e13 100644 --- a/src/lib/PictImage.cpp +++ b/src/lib/PictImage.cpp @@ -17,15 +17,15 @@ * Boston, MA 02111-1301 USA */ -#include "PictImage.h" +#include <sstream> +#include <libwpg/libwpg.h> +#include <libpict/libpict.h> #include "PictHeader.h" #include "PictXParser.h" #include "Pict1Parser.h" #include "Pict2Parser.h" #include "libpict_utils.h" #include "PictSVGGenerator.h" -#include <libwpg/libwpg.h> -#include <sstream> /** Analyzes the content of an input stream to see if it can be parsed diff --git a/src/lib/PictImage.h b/src/lib/PictImage.h deleted file mode 100644 index 9e10e5e..0000000 --- a/src/lib/PictImage.h +++ /dev/null @@ -1,49 +0,0 @@ -/* libpict - * Copyright (C) 2006 Ariya Hidayat (ariya@kde.org) - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02111-1301 USA - * - * For further information visit http://libpict.sourceforge.net - */ - -/* "This product is not manufactured, approved, or supported by - * Corel Corporation or Corel Corporation Limited." - */ - -#ifndef __PICTRAPHICS_H__ -#define __PICTRAPHICS_H__ - -#include <libwpd/libwpd.h> -#include <libwpd-stream/libwpd-stream.h> -#include <libwpg/libwpg.h> - - -namespace libpict -{ -class PictImage -{ -public: - - static bool isSupported(WPXInputStream *input); - - static bool parse(WPXInputStream *input, libwpg::WPGPaintInterface *painter); - - static bool generateSVG(WPXInputStream *input, WPXString &output); -}; - -} // namespace libpict - -#endif // __PICTRAPHICS_H__ diff --git a/src/lib/PictSVGGenerator.cpp b/src/lib/PictSVGGenerator.cpp index b44c604..7325c14 100644 --- a/src/lib/PictSVGGenerator.cpp +++ b/src/lib/PictSVGGenerator.cpp @@ -54,7 +54,7 @@ void libpict::PictSVGGenerator::startGraphics(const WPXPropertyList &propList) m_outputSink << "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\""; m_outputSink << " \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n"; - m_outputSink << "<!-- Created with pict2svg/libpict " << LIBPict_VERSION_STRING << " -->\n"; + m_outputSink << "<!-- Created with pict2svg/libpict -->\n"; m_outputSink << "<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" "; m_outputSink << "xmlns:xlink=\"http://www.w3.org/1999/xlink\" "; diff --git a/src/lib/PictSVGGenerator.h b/src/lib/PictSVGGenerator.h index 9541f66..e6caab5 100644 --- a/src/lib/PictSVGGenerator.h +++ b/src/lib/PictSVGGenerator.h @@ -31,7 +31,7 @@ #include <iostream> #include <libwpd/libwpd.h> #include <libwpg/libwpg.h> -#include "libpict.h" +#include <libpict/libpict.h> namespace libpict { diff --git a/src/lib/libpict.h.in b/src/lib/libpict.h.in deleted file mode 100644 index ee886fd..0000000 --- a/src/lib/libpict.h.in +++ /dev/null @@ -1,37 +0,0 @@ -/* libpict - * Copyright (C) 2006 Ariya Hidayat (ariya@kde.org) - * Copyright (C) 2004 Marc Oude Kotte (marc@solcon.nl) - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02111-1301 USA - * - * For further information visit http://libpict.sourceforge.net - */ - -/* "This product is not manufactured, approved, or supported by - * Corel Corporation or Corel Corporation Limited." - */ - -#ifndef __LIBPict_H__ -#define __LIBPict_H__ - -#define LIBPict_VERSION_MAJOR @Pict_MAJOR_VERSION@ -#define LIBPict_VERSION_MINOR @Pict_MINOR_VERSION@ -#define LIBPict_VERSION_REVISION @Pict_MICRO_VERSION@ -#define LIBPict_VERSION_STRING "@Pict_MAJOR_VERSION@.@Pict_MINOR_VERSION@.@Pict_MICRO_VERSION@" - -#include "PictImage.h" - -#endif diff --git a/src/lib/libpict.rc.in b/src/lib/libpict.rc.in index 5fbd713..93c9cf3 100644 --- a/src/lib/libpict.rc.in +++ b/src/lib/libpict.rc.in @@ -1,8 +1,8 @@ #include <winver.h> VS_VERSION_INFO VERSIONINFO - FILEVERSION @Pict_MAJOR_VERSION@,@Pict_MINOR_VERSION@,@Pict_MICRO_VERSION@,BUILDNUMBER - PRODUCTVERSION @Pict_MAJOR_VERSION@,@Pict_MINOR_VERSION@,@Pict_MICRO_VERSION@,0 + FILEVERSION @PICT_MAJOR_VERSION@,@PICT_MINOR_VERSION@,@PICT_MICRO_VERSION@,BUILDNUMBER + PRODUCTVERSION @PICT_MAJOR_VERSION@,@PICT_MINOR_VERSION@,@PICT_MICRO_VERSION@,0 FILEFLAGSMASK 0 FILEFLAGS 0 FILEOS VOS__WINDOWS32 @@ -15,12 +15,12 @@ VS_VERSION_INFO VERSIONINFO BEGIN VALUE "CompanyName", "The libpict developer community" VALUE "FileDescription", "libpict" - VALUE "FileVersion", "@Pict_MAJOR_VERSION@.@Pict_MINOR_VERSION@.@Pict_MICRO_VERSION@.BUILDNUMBER" + VALUE "FileVersion", "@PICT_MAJOR_VERSION@.@PICT_MINOR_VERSION@.@PICT_MICRO_VERSION@.BUILDNUMBER" VALUE "InternalName", "libpict-0.1" VALUE "LegalCopyright", "Copyright (C) 2004 Marc Oude Kotte, other contributers" VALUE "OriginalFilename", "libpict-0.1.dll" VALUE "ProductName", "libpict" - VALUE "ProductVersion", "@Pict_MAJOR_VERSION@.@Pict_MINOR_VERSION@.@Pict_MICRO_VERSION@" + VALUE "ProductVersion", "@PICT_MAJOR_VERSION@.@PICT_MINOR_VERSION@.@PICT_MICRO_VERSION@" END END BLOCK "VarFileInfo" diff --git a/src/lib/libpict_utils.h b/src/lib/libpict_utils.h index 3f9ee7f..87087f6 100644 --- a/src/lib/libpict_utils.h +++ b/src/lib/libpict_utils.h @@ -23,8 +23,8 @@ * Corel Corporation or Corel Corporation Limited." */ -#ifndef __LIBPict_UTILS_H__ -#define __LIBPict_UTILS_H__ +#ifndef __LIBPICT_UTILS_H__ +#define __LIBPICT_UTILS_H__ #include <stdio.h> @@ -47,4 +47,13 @@ #define Pict_DEBUG(M) #endif -#endif // __LIBPict_UTILS_H__ +namespace libpict +{ + +class EndOfStreamException +{ +}; + +} // namespace libpict + +#endif // __LIBPICT_UTILS_H__ |