From: <ai...@us...> - 2013-06-04 21:45:57
|
Revision: 12360 http://sourceforge.net/p/plplot/code/12360 Author: airwin Date: 2013-06-04 21:45:51 +0000 (Tue, 04 Jun 2013) Log Message: ----------- Implement proper linking to the math library. Modified Paths: -------------- trunk/cmake/build_projects/libharu/CMakeLists.txt trunk/cmake/build_projects/libharu/demo/CMakeLists.txt Modified: trunk/cmake/build_projects/libharu/CMakeLists.txt =================================================================== --- trunk/cmake/build_projects/libharu/CMakeLists.txt 2013-06-04 21:44:35 UTC (rev 12359) +++ trunk/cmake/build_projects/libharu/CMakeLists.txt 2013-06-04 21:45:51 UTC (rev 12360) @@ -141,12 +141,13 @@ include(haru) include(summary) +set(ADDITIONAL_LIBRARIES ${MATH_LIB}) # check zlib availibility find_package(ZLIB) if(ZLIB_FOUND) set(HAVE_LIBZ ON) include_directories(${ZLIB_INCLUDE_DIR}) - set(ADDITIONAL_LIBRARIES ${ZLIB_LIBRARIES}) + list(APPEND ADDITIONAL_LIBRARIES ${ZLIB_LIBRARIES}) else(ZLIB_FOUND) set(HPDF_NOZLIB ON) endif(ZLIB_FOUND) @@ -157,7 +158,7 @@ set(HAVE_LIBPNG ON) include_directories(${PNG_INCLUDE_DIR}) add_definitions(${PNG_DEFINITIONS}) - set(ADDITIONAL_LIBRARIES ${ADDITIONAL_LIBRARIES} ${PNG_LIBRARIES}) + list(APPEND ADDITIONAL_LIBRARIES ${PNG_LIBRARIES}) else(PNG_FOUND) set(HPDF_NOPNGLIB ON) endif(PNG_FOUND) Modified: trunk/cmake/build_projects/libharu/demo/CMakeLists.txt =================================================================== --- trunk/cmake/build_projects/libharu/demo/CMakeLists.txt 2013-06-04 21:44:35 UTC (rev 12359) +++ trunk/cmake/build_projects/libharu/demo/CMakeLists.txt 2013-06-04 21:45:51 UTC (rev 12360) @@ -112,6 +112,23 @@ endif(USE_RPATH) endforeach(demo) + if(MATH_LIB) + # These are a subset of the demos above which include math.h and which + # therefore require linking with ${MATH_LIB}. + set( + demos_requiring_MATH_LIB + text_demo2 + text_demo + raw_image_demo + image_demo + make_rawimage + ) + + foreach(demo ${demos_requiring_MATH_LIB}) + target_link_libraries(${demo} ${MATH_LIB}) + endforeach(demo ${demos_requiring_MATH_LIB}) + endif(MATH_LIB) + add_executable(grid_sheet grid_sheet.c) # the grid_sheet demo needs extra define, but cannot use add_definitions # for that because that command affects all source files in the directory. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-07-01 04:14:20
|
Revision: 12398 http://sourceforge.net/p/plplot/code/12398 Author: airwin Date: 2013-07-01 04:14:16 +0000 (Mon, 01 Jul 2013) Log Message: ----------- Make libharu and its demos build properly for MinGW compiler. The visibility macros and corresponding CMake logic were completely reorganized and rationalized and another fix (HPDF_FontDef and HPDF_U3D typedefs implemented) done to make build work with MinGW compiler. Tested by: Alan W. Irwin <ai...@us...> using the build_libharu target for both "Unix Makefiles" on Linux and "MinGW Makefiles" on Wine version of Windows. Modified Paths: -------------- trunk/cmake/build_projects/libharu/CMakeLists.txt trunk/cmake/build_projects/libharu/demo/CMakeLists.txt trunk/cmake/build_projects/libharu/include/hpdf.h trunk/cmake/build_projects/libharu/src/CMakeLists.txt Modified: trunk/cmake/build_projects/libharu/CMakeLists.txt =================================================================== --- trunk/cmake/build_projects/libharu/CMakeLists.txt 2013-07-01 03:59:28 UTC (rev 12397) +++ trunk/cmake/build_projects/libharu/CMakeLists.txt 2013-07-01 04:14:16 UTC (rev 12398) @@ -82,23 +82,6 @@ option(USE_RPATH "Use -rpath when linking libraries, executables" ON) endif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") -# Set macros to define visibility for various Windows platforms. -# (gcc visibility support happens by default if none of these -# are defined). -# N.B. something slightly different must be done for the demo -# visibility, but at this stage this CMake-based build system ignores -# building the demos so don't worry about this issue for now. - -if(WIN32) - if(CYGWIN) - # Special Cygwin visibility support. - add_definitions(-DHPDF_DLL_MAKE_CDECL) - else(CYGWIN) - # proprietary and Mingw compilers for Windows without Cygwin. - add_definitions(-DHPDF_DLL_MAKE) - endif(CYGWIN) -endif(WIN32) - # Description of libharu for cpack. set(LIBHARU_DESCRIPTION "libHaru is a free, cross platform, open source library for generating PDF files.") set(LIBHARU_PACKAGE_NAME "libHaru-${LIBHARU_VERSION}-${COMPILER_LABEL}") Modified: trunk/cmake/build_projects/libharu/demo/CMakeLists.txt =================================================================== --- trunk/cmake/build_projects/libharu/demo/CMakeLists.txt 2013-07-01 03:59:28 UTC (rev 12397) +++ trunk/cmake/build_projects/libharu/demo/CMakeLists.txt 2013-07-01 04:14:16 UTC (rev 12398) @@ -66,6 +66,11 @@ # link the examples to the shared library otherwise to the static if(LIBHARU_SHARED) set(_LIBHARU_LIB hpdf) + if(CYGWIN OR MINGW) + add_definitions(-DHPDF_DLL_CDECL) + elseif(WIN32) + add_definitions(-DHPDF_DLL) + endif(CYGWIN OR MINGW) else(LIBHARU_SHARED) set(_LIBHARU_LIB hpdf_static) endif(LIBHARU_SHARED) Modified: trunk/cmake/build_projects/libharu/include/hpdf.h =================================================================== --- trunk/cmake/build_projects/libharu/include/hpdf.h 2013-07-01 03:59:28 UTC (rev 12397) +++ trunk/cmake/build_projects/libharu/include/hpdf.h 2013-07-01 04:14:16 UTC (rev 12398) @@ -20,37 +20,33 @@ #include "hpdf_config.h" #include "hpdf_version.h" -#ifdef HPDF_DLL_MAKE -# define HPDF_EXPORT(A) __declspec(dllexport) A __stdcall +#if defined ( hpdf_EXPORTS ) + #if defined ( HPDF_DLL_MAKE ) + #define HPDF_EXPORT(A) __declspec(dllexport) A __stdcall + #elif defined ( HPDF_DLL_MAKE_CDECL ) + #define HPDF_EXPORT(A) __declspec(dllexport) A + #elif defined ( __GNUC__ ) && __GNUC__ > 3 + // Follow ideas in http://gcc.gnu.org/wiki/Visibility for GCC version 4.x + #define HPDF_EXPORT(A) __attribute__ ((visibility("default"))) A + #elif defined ( HPDF_SHARED_MAKE ) + #define HPDF_EXPORT(A) extern A + #else + #define HPDF_EXPORT(A) extern A + #endif #else -# ifdef HPDF_DLL_MAKE_CDECL -# define HPDF_EXPORT(A) __declspec(dllexport) A -# else -# ifdef HPDF_SHARED_MAKE -# define HPDF_EXPORT(A) extern A -# elif defined ( __GNUC__ ) && __GNUC__ > 3 -/* Follow ideas in http://gcc.gnu.org/wiki/Visibility for GCC version 4.x */ -# define HPDF_EXPORT(A) __attribute__ ((visibility("default"))) A -# endif -# endif /* HPDF_DLL_MAKE_CDECL */ -#endif /* HPDF_DLL_MAKE */ + #if defined ( HPDF_DLL) + #define HPDF_SHARED + #define HPDF_EXPORT(A) __declspec(dllimport) A __stdcall + #elif defined ( HPDF_DLL_CDECL ) + #define HPDF_SHARED + #define HPDF_EXPORT(A) __declspec(dllimport) A + #else + #define HPDF_EXPORT(A) extern A + #endif +#endif -#ifdef HPDF_DLL -# define HPDF_SHARED -# define HPDF_EXPORT(A) __declspec(dllimport) A __stdcall -#else -# ifdef HPDF_DLL_CDECL -# define HPDF_SHARED -# define HPDF_EXPORT(A) __declspec(dllimport) A -# endif /* HPDF_DLL_CDECL */ -#endif /* HPDF_DLL */ - #ifdef HPDF_SHARED -#ifndef HPDF_EXPORT -#define HPDF_EXPORT(A) extern A -#endif /* HPDF_EXPORT */ - #include "hpdf_consts.h" #include "hpdf_types.h" @@ -67,13 +63,11 @@ typedef HPDF_HANDLE HPDF_XObject; typedef HPDF_HANDLE HPDF_Annotation; typedef HPDF_HANDLE HPDF_ExtGState; +typedef HPDF_HANDLE HPDF_FontDef; +typedef HPDF_HANDLE HPDF_U3D; #else -#ifndef HPDF_EXPORT -#define HPDF_EXPORT(A) A -#endif /* HPDF_EXPORT */ - #include "hpdf_consts.h" #include "hpdf_doc.h" Modified: trunk/cmake/build_projects/libharu/src/CMakeLists.txt =================================================================== --- trunk/cmake/build_projects/libharu/src/CMakeLists.txt 2013-07-01 03:59:28 UTC (rev 12397) +++ trunk/cmake/build_projects/libharu/src/CMakeLists.txt 2013-07-01 04:14:16 UTC (rev 12398) @@ -86,6 +86,16 @@ ) endif(POST_2.1.0) +# Set macros to define visibility for various Windows platforms. +# (gcc visibility support happens by default if none of these +# are defined). + +if(CYGWIN OR MINGW) + add_definitions(-DHPDF_DLL_MAKE_CDECL) +elseif(WIN32) + add_definitions(-DHPDF_DLL_MAKE) +endif(CYGWIN OR MINGW) + # ======================================================================= # create static and shared haru library # ======================================================================= This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-10-21 22:14:03
|
Revision: 12615 http://sourceforge.net/p/plplot/code/12615 Author: airwin Date: 2013-10-21 22:14:00 +0000 (Mon, 21 Oct 2013) Log Message: ----------- Convert from 2.1.0 release to 2.2.1 release. Convert to using patches to express changes to the 2.2.1 release rather than files which are difficult to adjust for any upstream libharu changes in future. Tested by Alan W. Irwin <airwin.users.sourceforge.net> following directions in README.libharu for a standalone build on Linux and also using the build_projects approach on Linux. ToDo: MinGW/MSYS/Wine currently fails (presumably due to 2.1.0 ==> 2.2.1 change). So will have to figure out the problem, and update the patches for that case. Modified Paths: -------------- trunk/cmake/build_projects/libharu/README.libharu trunk/cmake/build_projects/libharu/bp.cmake Added Paths: ----------- trunk/cmake/build_projects/libharu/cmake.patch trunk/cmake/build_projects/libharu/large_font.patch trunk/cmake/build_projects/libharu/missing_zlib_headers.patch trunk/cmake/build_projects/libharu/visibility.patch Removed Paths: ------------- trunk/cmake/build_projects/libharu/cmake/ trunk/cmake/build_projects/libharu/demo/ trunk/cmake/build_projects/libharu/include/ trunk/cmake/build_projects/libharu/include_hpdf_config.h.patch trunk/cmake/build_projects/libharu/src/ Modified: trunk/cmake/build_projects/libharu/README.libharu =================================================================== --- trunk/cmake/build_projects/libharu/README.libharu 2013-10-21 01:11:34 UTC (rev 12614) +++ trunk/cmake/build_projects/libharu/README.libharu 2013-10-21 22:14:00 UTC (rev 12615) @@ -6,64 +6,45 @@ CMake logic that automatically builds libharu as part of the "Build Projects" project (see CMakeLists.txt file in the parent directory) -that uses ExternalProject_Add to build projects that have a ep.cmake +that uses ExternalProject_Add to build projects that have a bp.cmake file: -ep.cmake +bp.cmake Improved build system (Werner's build system culled from the git version of libharu with additional improvements by me): -CMakeLists.txt -cmake/modules/haru.cmake -cmake/modules/summary.cmake -src/CMakeLists.txt -include/CMakeLists.txt -demo/CMakeLists.txt -include/hpdf_config.h.cmake +cmake.patch Support for larger font sizes (without this, example 24 does not work): -include/hpdf_consts.h -src/hpdf_page_operator.c +large_font.patch Support for gcc visibility: -include/hpdf.h +visibility.patch Bug fix for the case where zlib is not available. -include_hpdf_config.h.patch +missing_zlib_headers.patch -(1) copy selected files from here on top of a pre-existing freshly -unpacked version of libharu-2.1.0, e.g., +(1) Patch a pre-existing freshly unpacked version of libharu-2.2.1, +with these patches, e.g., -mkdir -p /home/software/libharu/libharu-2.1.0/cmake/modules -cp -f libharu/CMakeLists.txt /home/software/libharu/libharu-2.1.0 -cp -f libharu/demo/CMakeLists.txt /home/software/libharu/libharu-2.1.0/demo -cp -f libharu/src/hpdf_page_operator.c libharu/src/CMakeLists.txt \ -/home/software/libharu/libharu-2.1.0/src -cp -f libharu/cmake/modules/haru.cmake libharu/cmake/modules/summary.cmake \ -/home/software/libharu/libharu-2.1.0/cmake/modules -cp -f libharu/include/hpdf_consts.h libharu/include/hpdf_config.h.cmake \ -libharu/include/hpdf.h libharu/include/CMakeLists.txt \ -/home/software/libharu/libharu-2.1.0/include +patch -d /home/software/libharu/libharu-2.2.1 -p1 < cmake.patch +patch -d /home/software/libharu/libharu-2.2.1 -p1 < large_font.patch +patch -d /home/software/libharu/libharu-2.2.1 -p1 < visibility.patch +patch -d /home/software/libharu/libharu-2.2.1 -p1 < missing_zlib_headers.patch -N.B. libharu-2.1.0 has no cmake-based build-system at all (unlike the -git version) so this cp operation installs that as well as changes to -implement the larger font size support and gcc visibility. - -(2) Fix bug for case when zlib is not available. -patch -d /home/software/libharu/libharu-2.1.0 -p1 < libharu/include_hpdf_config.h.patch - -(3) configure, build, and install libharu starting with an empty build tree +(2) configure, build, and install libharu starting with an empty build tree and empty install tree, e.g., +cd /home/software/libharu +mkdir -p build_dir +cd build_dir rm -rf /home/software/libharu/build_dir/* /home/software/libharu/install -cd /home/software/libharu/build_dir cmake -DCMAKE_INSTALL_PREFIX=/home/software/libharu/install \ --DPOST_2.1.0=OFF -DLIBHARU_EXAMPLES=ON \ -../libharu-2.1.0 >& cmake.out +../libharu-2.2.1 >& cmake.out make -j4 install >& make_install.out The above step works fine on Linux with @@ -71,10 +52,9 @@ export CFLAGS='-g -fvisibility=hidden' set before the "cmake" invocation to test the new gcc visibility support -in hpdf.h. Note -DPOST_2.1.0=OFF is essential for the 2.1.0 -version, but you should drop this option for anything after 2.1.0. -Also note that -DLIBHARU_EXAMPLES=ON builds the demos, but does not -test them. +in hpdf.h. Note that the -DLIBHARU_EXAMPLES=ON cmake option would attempt +to build the demos (but not test them). However, avoid using this +option with 2.2.1 since no demos are included with that release. N.B. This improved CMake-based build system has been tested for both Linux and MinGW/MSYS now using the "Build Projects" project (see the Modified: trunk/cmake/build_projects/libharu/bp.cmake =================================================================== --- trunk/cmake/build_projects/libharu/bp.cmake 2013-10-21 01:11:34 UTC (rev 12614) +++ trunk/cmake/build_projects/libharu/bp.cmake 2013-10-21 22:14:00 UTC (rev 12615) @@ -33,8 +33,8 @@ set(${BP_PACKAGE}_configured ON) # Data that is related to downloads. -set(${BP_PACKAGE}_URL http://${BP_PACKAGE}.org/files/${BP_PACKAGE}-2.1.0.tar.gz) -set(${BP_PACKAGE}_URL_MD5 0623b8fb08ae1b28af08b2cdbd66b662) +set(${BP_PACKAGE}_URL http://${BP_PACKAGE}.org/files/${BP_PACKAGE}-2.2.1.tar.gz) +set(${BP_PACKAGE}_URL_MD5 63da8e087744f1d6cf16f9501b1cb766) # Data that is related to the PATH that must be used. if(MSYS_PLATFORM) @@ -48,63 +48,27 @@ build_${BP_PACKAGE} URL ${${BP_PACKAGE}_URL} URL_MD5 ${${BP_PACKAGE}_URL_MD5} - # Note -DPOST_2.1.0=OFF is essential for the 2.1.0 version, but you - # should drop this option for anything after 2.1.0. Also note that - # -DLIBHARU_EXAMPLES=ON builds the demos, but does not test them. - CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_CMAKE_COMMAND} -DPOST_2.1.0=OFF -DLIBHARU_EXAMPLES=ON ${EP_BASE}/Source/build_${BP_PACKAGE} + PATCH_COMMAND "" + # Do not use -DLIBHARU_EXAMPLES=ON (which builds the demos, but does + # not test them) because latest release does not include demos. + CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_CMAKE_COMMAND} ${EP_BASE}/Source/build_${BP_PACKAGE} BUILD_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_BUILD_COMMAND} INSTALL_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_BUILD_COMMAND} install ) -# Add custom commands to the current no-command update step. add_custom_command( OUTPUT - ${EP_BASE}/Stamp/build_${BP_PACKAGE}/build_${BP_PACKAGE}-update - COMMAND ${CMAKE_COMMAND} -E make_directory ${EP_BASE}/Source/build_${BP_PACKAGE}/cmake/modules - COMMAND ${CMAKE_COMMAND} -E copy - ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/CMakeLists.txt - ${EP_BASE}/Source/build_${BP_PACKAGE}/CMakeLists.txt - COMMAND ${CMAKE_COMMAND} -E copy - ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/demo/CMakeLists.txt - ${EP_BASE}/Source/build_${BP_PACKAGE}/demo/CMakeLists.txt - COMMAND ${CMAKE_COMMAND} -E copy - ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/src/hpdf_page_operator.c - ${EP_BASE}/Source/build_${BP_PACKAGE}/src/hpdf_page_operator.c - COMMAND ${CMAKE_COMMAND} -E copy - ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/src/CMakeLists.txt - ${EP_BASE}/Source/build_${BP_PACKAGE}/src/CMakeLists.txt - COMMAND ${CMAKE_COMMAND} -E copy - ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/cmake/modules/haru.cmake - ${EP_BASE}/Source/build_${BP_PACKAGE}/cmake/modules/haru.cmake - COMMAND ${CMAKE_COMMAND} -E copy - ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/cmake/modules/summary.cmake - ${EP_BASE}/Source/build_${BP_PACKAGE}/cmake/modules/summary.cmake - COMMAND ${CMAKE_COMMAND} -E copy - ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/include/hpdf_consts.h - ${EP_BASE}/Source/build_${BP_PACKAGE}/include/hpdf_consts.h - COMMAND ${CMAKE_COMMAND} -E copy - ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/include/hpdf_config.h.cmake - ${EP_BASE}/Source/build_${BP_PACKAGE}/include/hpdf_config.h.cmake - COMMAND ${CMAKE_COMMAND} -E copy - ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/include/hpdf.h - ${EP_BASE}/Source/build_${BP_PACKAGE}/include/hpdf.h - COMMAND ${CMAKE_COMMAND} -E copy - ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/include/CMakeLists.txt - ${EP_BASE}/Source/build_${BP_PACKAGE}/include/CMakeLists.txt - COMMAND ${PATCH_EXECUTABLE} -d ${EP_BASE}/Source/build_${BP_PACKAGE} -p1 < ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/include_hpdf_config.h.patch - COMMENT "Custom updating of ${BP_PACKAGE}" + ${EP_BASE}/Stamp/build_${BP_PACKAGE}/build_${BP_PACKAGE}-patch + COMMAND ${CMAKE_COMMAND} -E echo "Apply all patches" + COMMAND ${PATCH_EXECUTABLE} -p1 < ${CMAKE_CURRENT_SOURCE_DIR}/${BP_PACKAGE}/cmake.patch + COMMAND ${PATCH_EXECUTABLE} -p1 < ${CMAKE_CURRENT_SOURCE_DIR}/${BP_PACKAGE}/large_font.patch + COMMAND ${PATCH_EXECUTABLE} -p1 < ${CMAKE_CURRENT_SOURCE_DIR}/${BP_PACKAGE}/missing_zlib_headers.patch + COMMAND ${PATCH_EXECUTABLE} -p1 < ${CMAKE_CURRENT_SOURCE_DIR}/${BP_PACKAGE}/visibility.patch DEPENDS - ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/CMakeLists.txt - ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/demo/CMakeLists.txt - ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/src/hpdf_page_operator.c - ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/src/CMakeLists.txt - ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/cmake/modules/haru.cmake - ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/cmake/modules/summary.cmake - ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/include/hpdf_consts.h - ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/include/hpdf_config.h.cmake - ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/include/hpdf.h - ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/include/CMakeLists.txt - ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/include_hpdf_config.h.patch + ${CMAKE_CURRENT_SOURCE_DIR}/${BP_PACKAGE}/cmake.patch + ${CMAKE_CURRENT_SOURCE_DIR}/${BP_PACKAGE}/large_font.patch + ${CMAKE_CURRENT_SOURCE_DIR}/${BP_PACKAGE}/missing_zlib_headers.patch + ${CMAKE_CURRENT_SOURCE_DIR}/${BP_PACKAGE}/visibility.patch APPEND ) Added: trunk/cmake/build_projects/libharu/cmake.patch =================================================================== --- trunk/cmake/build_projects/libharu/cmake.patch (rev 0) +++ trunk/cmake/build_projects/libharu/cmake.patch 2013-10-21 22:14:00 UTC (rev 12615) @@ -0,0 +1,857 @@ +diff -Naur libharu-2.2.1_pristine/CMakeLists.txt libharu-2.2.1/CMakeLists.txt +--- libharu-2.2.1_pristine/CMakeLists.txt 1969-12-31 16:00:00.000000000 -0800 ++++ libharu-2.2.1/CMakeLists.txt 2013-10-21 10:51:25.543121062 -0700 +@@ -0,0 +1,216 @@ ++# CMakeLists.txt ++# ++# Copyright (C) 2008 Werner Smekal ++# Copyright (C) 2010 Alan W. Irwin ++# ++# This software is provided 'as-is', without any express or implied warranty. ++# ++# In no event will the authors be held liable for any damages arising from the ++# use of this software. ++# ++# Permission is granted to anyone to use this software for any purpose,including ++# commercial applications, and to alter it and redistribute it freely, subject ++# to the following restrictions: ++# ++# 1. The origin of this software must not be misrepresented; you must not claim ++# that you wrote the original software. If you use this software in a ++# product, an acknowledgment in the product documentation would be ++# appreciated but is not required. ++# 2. Altered source versions must be plainly marked as such, and must not be ++# misrepresented as being the original software. ++# 3. This notice may not be removed or altered from any source distribution. ++# ++# Process this file with cmake to produce Makefiles or project files ++# for your specific compiler tool set ++# ++# TODO: ++# - shared and static library ++# - packaging ++# - devpackage ++# ======================================================================= ++# libharu project ++# ======================================================================= ++project(libharu C) ++ ++# we want cmake version 2.4.8 at least ++cmake_minimum_required(VERSION 2.4.8 FATAL_ERROR) ++ ++# Location where the haru cmake build system first looks for cmake modules ++set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/modules) ++ ++# determine compiler name ++set(COMPILER_LABEL "unknown") ++if(CMAKE_COMPILER_IS_GNUCC) ++ set(COMPILER_LABEL "gcc") ++endif(CMAKE_COMPILER_IS_GNUCC) ++if(MSVC) ++ set(COMPILER_LABEL "vc") ++endif(MSVC) ++ ++### Version information for libharu software package. ++### N.B. Needs review before each release! ++set(LIBHARU_MAJOR 2) ++set(LIBHARU_MINOR 2) ++set(LIBHARU_PATCH 0) ++set(LIBHARU_VERSION ${LIBHARU_MAJOR}.${LIBHARU_MINOR}.${LIBHARU_PATCH}) ++# libhpdf library version information. ++# N.B. Not to be confused with package version set above! ++ ++# Rules: ++# (1) If a backwards incompatible API change has been made in the library ++# API (e.g., if old compiled and linked applications will no longer work) ++# then increment SOVERSION and zero the corresponding minor and patch ++# numbers just before release. ++# (2) If the library changes are limited to additions to the API, then ++# then leave SOVERSION alone, increment the minor number and zero the ++# patch number just before release. ++# (3) If the library changes are limited to implementation changes with ++# no API changes at all, then leave SOVERSION and minor number alone, and ++# increment the patch number just before the release. ++# (4) If there are no library source code changes at all, then leave all ++# library version numbers the same for the release. ++# If library has not been properly versioned before start the numbering ++# at 0.0.0. ++set(hpdf_SOVERSION 0) ++set(hpdf_VERSION ${hpdf_SOVERSION}.0.0) ++### End of version information to be reviewed. ++ ++# Use RPATH? ++if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") ++ # No rpath on Darwin. Setting it will only cause trouble. ++else(CMAKE_SYSTEM_NAME STREQUAL "Darwin") ++ option(USE_RPATH "Use -rpath when linking libraries, executables" ON) ++endif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") ++ ++# Description of libharu for cpack. ++set(LIBHARU_DESCRIPTION "libHaru is a free, cross platform, open source library for generating PDF files.") ++set(LIBHARU_PACKAGE_NAME "libHaru-${LIBHARU_VERSION}-${COMPILER_LABEL}") ++ ++# Comment out all this name stuff which I feel is probably unnecessary (since ++# PLplot doesn't bother with this.) ++# set library name, msvc does not prepend 'lib' automatically ++#if(MSVC) ++# set(LIBHARU_NAME lib) ++#endif(MSVC) ++#set(LIBHARU_NAME ${LIBHARU_NAME}hpdf) ++#set(LIBHARU_NAME_STATIC ${LIBHARU_NAME}s) ++ ++# ======================================================================= ++# command line options ++# ======================================================================= ++option(LIBHARU_SHARED "Build shared lib" YES) ++option(LIBHARU_STATIC "Build static lib" YES) ++option(LIBHARU_EXAMPLES "Build libharu examples" NO) ++option(DEVPAK "Create DevPackage" NO) ++ ++if(DEVPAK AND NOT WIN32) ++ message( STATUS "DevPackage only available for Win32. Set DEVPAK to OFF." ) ++ set(DEVPAK OFF) ++endif(DEVPAK AND NOT WIN32) ++if(DEVPAK AND LIBHARU_EXAMPLES) ++ message( STATUS "Examples are not build for DevPackage. Set LIBHARU_EXAMPLES to OFF." ) ++ set(LIBHARU_EXAMPLES OFF) ++endif(DEVPAK AND LIBHARU_EXAMPLES) ++ ++ ++ ++if(BUILD_SHARED_LIBS) ++ set(LIBHARU_SHARED ON) ++endif(BUILD_SHARED_LIBS) ++ ++# ======================================================================= ++# look for headers and libraries ++# ======================================================================= ++include(haru) ++include(summary) ++ ++set(ADDITIONAL_LIBRARIES ${MATH_LIB}) ++# check zlib availibility ++find_package(ZLIB) ++if(ZLIB_FOUND) ++ set(HAVE_LIBZ ON) ++ include_directories(${ZLIB_INCLUDE_DIR}) ++ list(APPEND ADDITIONAL_LIBRARIES ${ZLIB_LIBRARIES}) ++else(ZLIB_FOUND) ++ set(HPDF_NOZLIB ON) ++endif(ZLIB_FOUND) ++ ++# check png availibility ++find_package(PNG) ++if(PNG_FOUND) ++ set(HAVE_LIBPNG ON) ++ include_directories(${PNG_INCLUDE_DIR}) ++ add_definitions(${PNG_DEFINITIONS}) ++ list(APPEND ADDITIONAL_LIBRARIES ${PNG_LIBRARIES}) ++else(PNG_FOUND) ++ set(HPDF_NOPNGLIB ON) ++endif(PNG_FOUND) ++ ++# ======================================================================= ++# Add compiler flags ++# ======================================================================= ++# add definitions and directories to include ++#if(CMAKE_COMPILER_IS_GNUCC) ++# add_definitions("-Wall") ++#endif(CMAKE_COMPILER_IS_GNUCC) ++if(MSVC_VERSION GREATER 1399) ++ add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE) ++endif(MSVC_VERSION GREATER 1399) ++include_directories(${CMAKE_SOURCE_DIR}/include) ++include_directories(${CMAKE_BINARY_DIR}/include) ++ ++# create DevPackage file ++if(DEVPAK) ++ configure_file( ++ ${CMAKE_SOURCE_DIR}/libharu.DevPackage.cmake ++ ${CMAKE_BINARY_DIR}/libharu.DevPackage ++ ) ++endif(DEVPAK) ++ ++# ======================================================================= ++# Configure and install header files. ++# ======================================================================= ++add_subdirectory(include) ++ ++# ======================================================================= ++# create library and demos ++# ======================================================================= ++add_subdirectory(src) ++add_subdirectory(demo) ++ ++# install various files ++# These commented out to keep install tree as lean as possible. May want ++# to add some documentation files later to the install tree. ++#install(FILES README CHANGES INSTALL DESTINATION .) ++#install(DIRECTORY doc DESTINATION .) ++#if(NOT DEVPAK) ++# install(DIRECTORY if DESTINATION .) ++#endif(NOT DEVPAK) ++#if(DEVPAK) ++# install(FILES ${CMAKE_BINARY_DIR}/libharu.DevPackage DESTINATION .) ++#endif(DEVPAK) ++# ======================================================================= ++# print out some information ++# ======================================================================= ++summary() ++ ++# ======================================================================= ++# packing stuff ++# ======================================================================= ++set(CPACK_PACKAGE_DESCRIPTION_SUMMARY ${LIBHARU_DESCRIPTION}) ++set(CPACK_PACKAGE_VENDOR "Werner Smekal") ++set(CPACK_PACKAGE_DESCRIPTION_FILE ${CMAKE_CURRENT_SOURCE_DIR}/README) ++set(CPACK_PACKAGE_VERSION_MAJOR "${LIBHARU_MAJOR}") ++set(CPACK_PACKAGE_VERSION_MINOR "${LIBHARU_MINOR}") ++set(CPACK_PACKAGE_VERSION_PATCH "${LIBHARU_PATCH}") ++set(CPACK_PACKAGE_FILE_NAME "libHaru-${LIBHARU_VERSION}-${COMPILER_LABEL}") ++ ++set(CPACK_STRIP_FILES ON) ++ ++if(WIN32) ++ set(CPACK_GENERATOR ZIP) ++else(WIN32) ++ set(CPACK_GENERATOR TGZ) ++endif(WIN32) ++ ++INCLUDE( CPack ) +diff -Naur libharu-2.2.1_pristine/cmake/modules/haru.cmake libharu-2.2.1/cmake/modules/haru.cmake +--- libharu-2.2.1_pristine/cmake/modules/haru.cmake 1969-12-31 16:00:00.000000000 -0800 ++++ libharu-2.2.1/cmake/modules/haru.cmake 2013-10-21 10:52:11.838244974 -0700 +@@ -0,0 +1,54 @@ ++# cmake/modules/haru.cmake ++# ++# Copyright (C) 2008 Werner Smekal ++# ++# This software is provided 'as-is', without any express or implied warranty. ++# ++# In no event will the authors be held liable for any damages arising from the ++# use of this software. ++# ++# Permission is granted to anyone to use this software for any purpose,including ++# commercial applications, and to alter it and redistribute it freely, subject ++# to the following restrictions: ++# ++# 1. The origin of this software must not be misrepresented; you must not claim ++# that you wrote the original software. If you use this software in a ++# product, an acknowledgment in the product documentation would be ++# appreciated but is not required. ++# 2. Altered source versions must be plainly marked as such, and must not be ++# misrepresented as being the original software. ++# 3. This notice may not be removed or altered from any source distribution. ++# ++# check if headers exist ++# Need these modules to do subsequent checks. ++include(CheckIncludeFiles) ++ ++# ======================================================================= ++# check header availability ++# ======================================================================= ++# check if header file exists ++check_include_files(dlfcn.h HAVE_DLFCN_H) ++check_include_files(inttypes.h HAVE_INTTYPES_H) ++check_include_files(memory.h HAVE_MEMORY_H) ++check_include_files(stdint.h HAVE_STDINT_H) ++check_include_files(stdlib.h HAVE_STDLIB_H) ++check_include_files(strings.h HAVE_STRINGS_H) ++check_include_files(string.h HAVE_STRING_H) ++check_include_files(sys/stat.h HAVE_SYS_STAT_H) ++check_include_files(sys/types.h HAVE_SYS_TYPES_H) ++check_include_files(unistd.h HAVE_UNISTD_H) ++ ++ ++# ======================================================================= ++# additional library support ++# ======================================================================= ++# On windows systems the math library is not separated so do not specify ++# it unless you are on a non-windows system. ++if(NOT WIN32) ++ find_library(MATH_LIB NAMES m PATHS /usr/local/lib /usr/lib) ++ if(NOT MATH_LIB) ++ message(FATAL_ERROR "Cannot find required math library") ++ endif(NOT MATH_LIB) ++else(NOT WIN32) ++ set(MATH_LIB) ++endif(NOT WIN32) +diff -Naur libharu-2.2.1_pristine/cmake/modules/summary.cmake libharu-2.2.1/cmake/modules/summary.cmake +--- libharu-2.2.1_pristine/cmake/modules/summary.cmake 1969-12-31 16:00:00.000000000 -0800 ++++ libharu-2.2.1/cmake/modules/summary.cmake 2013-10-21 10:52:36.297782032 -0700 +@@ -0,0 +1,66 @@ ++# cmake/modules/summary.cmake ++# ++# Copyright (C) 2008 Werner Smekal ++# ++# This software is provided 'as-is', without any express or implied warranty. ++# ++# In no event will the authors be held liable for any damages arising from the ++# use of this software. ++# ++# Permission is granted to anyone to use this software for any purpose,including ++# commercial applications, and to alter it and redistribute it freely, subject ++# to the following restrictions: ++# ++# 1. The origin of this software must not be misrepresented; you must not claim ++# that you wrote the original software. If you use this software in a ++# product, an acknowledgment in the product documentation would be ++# appreciated but is not required. ++# 2. Altered source versions must be plainly marked as such, and must not be ++# misrepresented as being the original software. ++# 3. This notice may not be removed or altered from any source distribution. ++# ++# Macro for outputting all the most important CMake variables for haru ++ ++# ======================================================================= ++# print summary of configuration to screen ++# ======================================================================= ++ ++macro(summary) ++set(_output_results " ++Summary of CMake build system results for the haru library ++ ++Install location variables which can be set by the user: ++CMAKE_INSTALL_PREFIX: ${CMAKE_INSTALL_PREFIX} ++CMAKE_INSTALL_EXEC_PREFIX ${CMAKE_INSTALL_EXEC_PREFIX} ++CMAKE_INSTALL_BINDIR ${CMAKE_INSTALL_BINDIR} ++CMAKE_INSTALL_LIBDIR ${CMAKE_INSTALL_LIBDIR} ++CMAKE_INSTALL_INCLUDEDIR ${CMAKE_INSTALL_INCLUDEDIR} ++ ++Other important CMake variables: ++ ++CMAKE_SYSTEM_NAME: ${CMAKE_SYSTEM_NAME} ++UNIX: ${UNIX} ++WIN32: ${WIN32} ++APPLE: ${APPLE} ++MSVC: ${MSVC} (MSVC_VERSION: ${MSVC_VERSION}) ++MINGW: ${MINGW} ++MSYS: ${MSYS} ++CYGWIN: ${CYGWIN} ++BORLAND: ${BORLAND} ++WATCOM: ${WATCOM} ++ ++CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE} ++CMAKE_C_COMPILER CMAKE_C_FLAGS: ${CMAKE_C_COMPILER} ${CMAKE_C_FLAGS} ++ ++Library options: ++LIBHARU_SHARED: ${LIBHARU_SHARED} ++LIBHARU_STATIC: ${LIBHARU_STATIC} ++LIBHARU_EXAMPLES: ${LIBHARU_EXAMPLES} ++DEVPAK: ${DEVPAK} ++ ++Optional libraries: ++HAVE_LIBZ: ${HAVE_LIBZ} ++HAVE_LIBPNG: ${HAVE_LIBPNG} ++") ++message("${_output_results}") ++endmacro(summary) +diff -Naur libharu-2.2.1_pristine/demo/CMakeLists.txt libharu-2.2.1/demo/CMakeLists.txt +--- libharu-2.2.1_pristine/demo/CMakeLists.txt 1969-12-31 16:00:00.000000000 -0800 ++++ libharu-2.2.1/demo/CMakeLists.txt 2013-10-21 10:54:41.939403569 -0700 +@@ -0,0 +1,183 @@ ++# demo/CMakeLists.txt ++# ++# Copyright (C) 2008 Werner Smekal ++# Copyright (C) 2010 Alan W. Irwin ++# ++# This software is provided 'as-is', without any express or implied warranty. ++# ++# In no event will the authors be held liable for any damages arising from the ++# use of this software. ++# ++# Permission is granted to anyone to use this software for any purpose,including ++# commercial applications, and to alter it and redistribute it freely, subject ++# to the following restrictions: ++# ++# 1. The origin of this software must not be misrepresented; you must not claim ++# that you wrote the original software. If you use this software in a ++# product, an acknowledgment in the product documentation would be ++# appreciated but is not required. ++# 2. Altered source versions must be plainly marked as such, and must not be ++# misrepresented as being the original software. ++# 3. This notice may not be removed or altered from any source distribution. ++## ++# create demo executables ++ ++if(LIBHARU_EXAMPLES) ++ # ======================================================================= ++ # source file names and c flags ++ # ======================================================================= ++ set( ++ demos_NAMES ++ character_map ++ encoding_list ++ encryption ++ ext_gstate_demo ++ font_demo ++ image_demo ++ jpeg_demo ++ jpfont_demo ++ line_demo ++ link_annotation ++ make_rawimage ++ outline_demo ++ #outline_demo_jp ++ permission ++ png_demo ++ slide_show_demo ++ text_annotation ++ ttfont_demo ++ ttfont_demo_jp ++ ) ++ ++ set( ++ demos_with_grid_NAMES ++ arc_demo ++ chfont_demo ++ raw_image_demo ++ text_demo ++ text_demo2 ++ ) ++ ++ # we need to add some definitions for win 32 ++ if(WIN32 AND NOT CYGWIN) ++ add_definitions(-D__WIN32__) ++ endif(WIN32 AND NOT CYGWIN) ++ ++ # link the examples to the shared library otherwise to the static ++ if(LIBHARU_SHARED) ++ set(_LIBHARU_LIB hpdf) ++ if(CYGWIN OR MINGW) ++ add_definitions(-DHPDF_DLL_CDECL) ++ elseif(WIN32) ++ add_definitions(-DHPDF_DLL) ++ endif(CYGWIN OR MINGW) ++ else(LIBHARU_SHARED) ++ set(_LIBHARU_LIB hpdf_static) ++ endif(LIBHARU_SHARED) ++ ++ # ======================================================================= ++ # create demos ++ # ======================================================================= ++ foreach(demo ${demos_NAMES}) ++ add_executable(${demo} ${demo}.c) ++ target_link_libraries(${demo} ${_LIBHARU_LIB}) ++ if(USE_RPATH) ++ set_target_properties( ++ ${demo} ++ PROPERTIES ++ INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib" ++ INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib" ++ ) ++ else(USE_RPATH) ++ set_target_properties( ++ ${demo} ++ PROPERTIES ++ INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib" ++ ) ++ endif(USE_RPATH) ++ endforeach(demo) ++ ++ # some demos need grid_sheet.c compiled in ++ foreach(demo ${demos_with_grid_NAMES}) ++ add_executable(${demo} ${demo}.c grid_sheet.c) ++ target_link_libraries(${demo} ${_LIBHARU_LIB}) ++ if(USE_RPATH) ++ set_target_properties( ++ ${demo} ++ PROPERTIES ++ INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib" ++ INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib" ++ ) ++ else(USE_RPATH) ++ set_target_properties( ++ ${demo} ++ PROPERTIES ++ INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib" ++ ) ++ endif(USE_RPATH) ++ endforeach(demo) ++ ++ if(MATH_LIB) ++ # These are a subset of the demos above which include math.h and which ++ # therefore require linking with ${MATH_LIB}. ++ set( ++ demos_requiring_MATH_LIB ++ text_demo2 ++ text_demo ++ raw_image_demo ++ image_demo ++ make_rawimage ++ ) ++ ++ foreach(demo ${demos_requiring_MATH_LIB}) ++ target_link_libraries(${demo} ${MATH_LIB}) ++ endforeach(demo ${demos_requiring_MATH_LIB}) ++ endif(MATH_LIB) ++ ++ add_executable(grid_sheet grid_sheet.c) ++ # the grid_sheet demo needs extra define, but cannot use add_definitions ++ # for that because that command affects all source files in the directory. ++ # So use set_target_properties instead. ++ set_target_properties(grid_sheet PROPERTIES COMPILE_FLAGS "-DSTAND_ALONE") ++ target_link_libraries(grid_sheet ${_LIBHARU_LIB}) ++ if(USE_RPATH) ++ set_target_properties( ++ grid_sheet ++ PROPERTIES ++ INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib" ++ INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib" ++ ) ++ else(USE_RPATH) ++ set_target_properties( ++ grid_sheet ++ PROPERTIES ++ INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib" ++ ) ++ endif(USE_RPATH) ++ ++ # ======================================================================= ++ # install demo source, demo executables and other files ++ # ======================================================================= ++ ++ # comment out the rest of this until have better install tree ++ # location for these files. For example, the current location makes ++ # a real mess on Unix. In any case, demo executables should not be ++ # installed. Instead, an independent demo build and test system ++ # (say, CMake-based as for PLplot) would be nice to implement for ++ # the installed demos. ++ ++ # install( ++ # TARGETS ${demos_NAMES} ${demos_with_grid_NAMES} grid_sheet ++ # DESTINATION demo ++ # ) ++ ++ # foreach(demo ${demos_NAMES} ${demos_with_grid_NAMES} grid_sheet) ++ # install(FILES ${demo}.c DESTINATION demo) ++ # endforeach(demo) ++ ++ # install demo files ++ # install( ++ # DIRECTORY images mbtext pngsuite rawimage ttfont type1 ++ # DESTINATION demo ++ # ) ++endif(LIBHARU_EXAMPLES) +diff -Naur libharu-2.2.1_pristine/include/CMakeLists.txt libharu-2.2.1/include/CMakeLists.txt +--- libharu-2.2.1_pristine/include/CMakeLists.txt 1969-12-31 16:00:00.000000000 -0800 ++++ libharu-2.2.1/include/CMakeLists.txt 2013-10-21 10:53:43.508509852 -0700 +@@ -0,0 +1,63 @@ ++# include/CMakeLists.txt for libharu. ++### ++### Process this file with cmake to produce Makefile ++### ++# Copyright (C) 2008 Werner Smekal ++# Copyright (C) 2010 Alan W. Irwin ++# ++# This software is provided 'as-is', without any express or implied warranty. ++# ++# In no event will the authors be held liable for any damages arising from the ++# use of this software. ++# ++# Permission is granted to anyone to use this software for any purpose,including ++# commercial applications, and to alter it and redistribute it freely, subject ++# to the following restrictions: ++# ++# 1. The origin of this software must not be misrepresented; you must not claim ++# that you wrote the original software. If you use this software in a ++# product, an acknowledgment in the product documentation would be ++# appreciated but is not required. ++# 2. Altered source versions must be plainly marked as such, and must not be ++# misrepresented as being the original software. ++# 3. This notice may not be removed or altered from any source distribution. ++# ++ ++configure_file( ++ ${CMAKE_CURRENT_SOURCE_DIR}/hpdf_config.h.cmake ++ ${CMAKE_CURRENT_BINARY_DIR}/hpdf_config.h ++ ) ++ ++set(include_INSTALLED_HEADERS ++ hpdf.h ++ hpdf_annotation.h ++ hpdf_catalog.h ++ hpdf_conf.h ++ ${CMAKE_CURRENT_BINARY_DIR}/hpdf_config.h ++ hpdf_consts.h ++ hpdf_destination.h ++ hpdf_doc.h ++ hpdf_encoder.h ++ hpdf_encrypt.h ++ hpdf_encryptdict.h ++ hpdf_error.h ++ hpdf_ext_gstate.h ++ hpdf_font.h ++ hpdf_fontdef.h ++ hpdf_gstate.h ++ hpdf_image.h ++ hpdf_info.h ++ hpdf_list.h ++ hpdf_mmgr.h ++ hpdf_objects.h ++ hpdf_outline.h ++ hpdf_page_label.h ++ hpdf_pages.h ++ hpdf_streams.h ++ hpdf_types.h ++ hpdf_u3d.h ++ hpdf_utils.h ++ hpdf_version.h ++ ) ++ ++install(FILES ${include_INSTALLED_HEADERS} DESTINATION include/hpdf) +diff -Naur libharu-2.2.1_pristine/include/hpdf_config.h.cmake libharu-2.2.1/include/hpdf_config.h.cmake +--- libharu-2.2.1_pristine/include/hpdf_config.h.cmake 1969-12-31 16:00:00.000000000 -0800 ++++ libharu-2.2.1/include/hpdf_config.h.cmake 2013-10-21 10:55:06.162944881 -0700 +@@ -0,0 +1,97 @@ ++/* ++ * Copyright (C) 2008 Werner Smekal ++ * Copyright (C) 2010 Alan W. Irwin ++ * ++ * This software is provided 'as-is', without any express or implied warranty. ++ * ++ * In no event will the authors be held liable for any damages arising from the ++ * use of this software. ++ * ++ * Permission is granted to anyone to use this software for any purpose,including ++ * commercial applications, and to alter it and redistribute it freely, subject ++ * to the following restrictions: ++ * ++ * 1. The origin of this software must not be misrepresented; you must not claim ++ * that you wrote the original software. If you use this software in a ++ * product, an acknowledgment in the product documentation would be ++ * appreciated but is not required. ++ * 2. Altered source versions must be plainly marked as such, and must not be ++ * misrepresented as being the original software. ++ * 3. This notice may not be removed or altered from any source distribution. ++ */ ++ ++/* include/hpdf_config.h.in. Generated from configure.in by autoheader. */ ++ ++#ifndef _HPDF_CONFIG_H ++#define _HPDF_CONFIG_H ++ ++/* Define to 1 if you have the <dlfcn.h> header file. */ ++#cmakedefine LIBHPDF_HAVE_DLFCN_H ++ ++/* Define to 1 if you have the <inttypes.h> header file. */ ++#cmakedefine LIBHPDF_HAVE_INTTYPES_H ++ ++/* Define to 1 if you have the `png' library (-lpng). */ ++#cmakedefine HAVE_LIBPNG ++ ++/* Define to 1 if you have the `z' library (-lz). */ ++#cmakedefine HAVE_LIBZ ++ ++/* Define to 1 if you have the <memory.h> header file. */ ++#cmakedefine LIBHPDF_HAVE_MEMORY_H ++ ++/* Define to 1 if you have the <stdint.h> header file. */ ++#cmakedefine LIBHPDF_HAVE_STDINT_H ++ ++/* Define to 1 if you have the <stdlib.h> header file. */ ++#cmakedefine LIBHPDF_HAVE_STDLIB_H ++ ++/* Define to 1 if you have the <strings.h> header file. */ ++#cmakedefine LIBHPDF_HAVE_STRINGS_H ++ ++/* Define to 1 if you have the <string.h> header file. */ ++#cmakedefine LIBHPDF_HAVE_STRING_H ++ ++/* Define to 1 if you have the <sys/stat.h> header file. */ ++#cmakedefine LIBHPDF_HAVE_SYS_STAT_H ++ ++/* Define to 1 if you have the <sys/types.h> header file. */ ++#cmakedefine LIBHPDF_HAVE_SYS_TYPES_H ++ ++/* Define to 1 if you have the <unistd.h> header file. */ ++#cmakedefine LIBHPDF_HAVE_UNISTD_H ++ ++/* debug build */ ++#cmakedefine LIBHPDF_DEBUG ++ ++/* debug trace enabled */ ++#cmakedefine LIBHPDF_DEBUG_TRACE ++ ++/* libpng is not available */ ++#cmakedefine HPDF_NOPNGLIB ++ ++/* zlib is not available */ ++#cmakedefine HPDF_NOZLIB ++ ++/* Define to the address where bug reports for this package should be sent. */ ++#cmakedefine LIBHPDF_PACKAGE_BUGREPORT ++ ++/* Define to the full name of this package. */ ++#cmakedefine LIBHPDF_PACKAGE_NAME ++ ++/* Define to the full name and version of this package. */ ++#cmakedefine LIBHPDF_PACKAGE_STRING ++ ++/* Define to the one symbol short name of this package. */ ++#cmakedefine LIBHPDF_PACKAGE_TARNAME ++ ++/* Define to the version of this package. */ ++#cmakedefine LIBHPDF_PACKAGE_VERSION ++ ++/* Define to 1 if you have the ANSI C header files. */ ++#cmakedefine LIBHPDF_STDC_HEADERS ++ ++/* Define to `unsigned int' if <sys/types.h> does not define. */ ++#cmakedefine LIBHPDF_size_t ++ ++#endif /* _HPDF_CONFIG_H */ +diff -Naur libharu-2.2.1_pristine/src/CMakeLists.txt libharu-2.2.1/src/CMakeLists.txt +--- libharu-2.2.1_pristine/src/CMakeLists.txt 1969-12-31 16:00:00.000000000 -0800 ++++ libharu-2.2.1/src/CMakeLists.txt 2013-10-21 10:53:23.164894950 -0700 +@@ -0,0 +1,150 @@ ++# src/CMakeLists.txt ++# ++# Copyright (C) 2008 Werner Smekal ++# Copyright (C) 2010 Alan W. Irwin ++# ++# This software is provided 'as-is', without any express or implied warranty. ++# ++# In no event will the authors be held liable for any damages arising from the ++# use of this software. ++# ++# Permission is granted to anyone to use this software for any purpose,including ++# commercial applications, and to alter it and redistribute it freely, subject ++# to the following restrictions: ++# ++# 1. The origin of this software must not be misrepresented; you must not claim ++# that you wrote the original software. If you use this software in a ++# product, an acknowledgment in the product documentation would be ++# appreciated but is not required. ++# 2. Altered source versions must be plainly marked as such, and must not be ++# misrepresented as being the original software. ++# 3. This notice may not be removed or altered from any source distribution. ++# ++# create library ++# ======================================================================= ++# libharu source files ++# ======================================================================= ++set( ++ libharu_SRCS ++ hpdf_annotation.c ++ hpdf_array.c ++ hpdf_binary.c ++ hpdf_boolean.c ++ hpdf_catalog.c ++ hpdf_destination.c ++ hpdf_dict.c ++ hpdf_doc_png.c ++ hpdf_doc.c ++ hpdf_encoder_cns.c ++ hpdf_encoder_cnt.c ++ hpdf_encoder_jp.c ++ hpdf_encoder_kr.c ++ hpdf_encoder.c ++ hpdf_encrypt.c ++ hpdf_encryptdict.c ++ hpdf_error.c ++ hpdf_ext_gstate.c ++ hpdf_font_cid.c ++ hpdf_font_tt.c ++ hpdf_font_type1.c ++ hpdf_font.c ++ hpdf_fontdef_base14.c ++ hpdf_fontdef_cid.c ++ hpdf_fontdef_cns.c ++ hpdf_fontdef_cnt.c ++ hpdf_fontdef_jp.c ++ hpdf_fontdef_kr.c ++ hpdf_fontdef_tt.c ++ hpdf_fontdef_type1.c ++ hpdf_fontdef.c ++ hpdf_gstate.c ++ hpdf_image_png.c ++ hpdf_image.c ++ hpdf_info.c ++ hpdf_list.c ++ hpdf_mmgr.c ++ hpdf_name.c ++ hpdf_null.c ++ hpdf_number.c ++ hpdf_objects.c ++ hpdf_outline.c ++ hpdf_page_label.c ++ hpdf_page_operator.c ++ hpdf_pages.c ++ hpdf_real.c ++ hpdf_streams.c ++ hpdf_string.c ++ hpdf_u3d.c ++ hpdf_utils.c ++ hpdf_xref.c ++ ) ++option(POST_2.1.0 "Version after 2.1.0?" ON) ++# Source code has one additional file in git version after 2.1.0 was released. ++if(POST_2.1.0) ++ list(APPEND libharu_SRCS ++ hpdf_namedict.c ++ ) ++endif(POST_2.1.0) ++ ++# Set macros to define visibility for various Windows platforms. ++# (gcc visibility support happens by default if none of these ++# are defined). ++ ++if(CYGWIN OR MINGW) ++ add_definitions(-DHPDF_DLL_MAKE_CDECL) ++elseif(WIN32) ++ add_definitions(-DHPDF_DLL_MAKE) ++endif(CYGWIN OR MINGW) ++ ++# ======================================================================= ++# create static and shared haru library ++# ======================================================================= ++if(LIBHARU_STATIC) ++ add_library(hpdf_static STATIC ${libharu_SRCS}) ++ target_link_libraries(hpdf_static ${ADDITIONAL_LIBRARIES}) ++ set_target_properties( ++ hpdf_static ++ PROPERTIES ++ OUTPUT_NAME hpdf ++ ) ++ install( ++ TARGETS hpdf_static ++ ARCHIVE DESTINATION lib ++ LIBRARY DESTINATION lib ++ RUNTIME DESTINATION bin ++ ) ++ if(WIN32 AND NOT CYGWIN) ++ foreach(addlib ${ADDITIONAL_LIBRARIES}) ++ install(FILES ${addlib} DESTINATION lib) ++ endforeach(addlib) ++ endif(WIN32 AND NOT CYGWIN) ++endif(LIBHARU_STATIC) ++if(LIBHARU_SHARED) ++ add_library(hpdf SHARED ${libharu_SRCS}) ++ target_link_libraries(hpdf ${ADDITIONAL_LIBRARIES}) ++ if(USE_RPATH) ++ set_target_properties( ++ hpdf ++ PROPERTIES ++ SOVERSION ${hpdf_SOVERSION} ++ VERSION ${hpdf_VERSION} ++ INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib" ++ INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib" ++ ) ++ else(USE_RPATH) ++ set_target_properties( ++ hpdf ++ PROPERTIES ++ SOVERSION ${hpdf_SOVERSION} ++ VERSION ${hpdf_VERSION} ++ INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib" ++ ) ++ endif(USE_RPATH) ++ ++ install( ++ TARGETS hpdf ++ ARCHIVE DESTINATION lib ++ LIBRARY DESTINATION lib ++ RUNTIME DESTINATION bin ++ ) ++endif(LIBHARU_SHARED) Deleted: trunk/cmake/build_projects/libharu/include_hpdf_config.h.patch =================================================================== --- trunk/cmake/build_projects/libharu/include_hpdf_config.h.patch 2013-10-21 01:11:34 UTC (rev 12614) +++ trunk/cmake/build_projects/libharu/include_hpdf_config.h.patch 2013-10-21 22:14:00 UTC (rev 12615) @@ -1,11 +0,0 @@ -diff -Naur build_libharu_original/src/hpdf_streams.c build_libharu/src/hpdf_streams.c ---- build_libharu_original/src/hpdf_streams.c 2008-05-27 11:23:31.000000000 -0700 -+++ build_libharu/src/hpdf_streams.c 2013-06-04 12:33:49.304096528 -0700 -@@ -17,6 +17,7 @@ - - #include <errno.h> - -+#include "hpdf_config.h" - #ifndef HPDF_NOZLIB - #include <zlib.h> - #include <zconf.h> Added: trunk/cmake/build_projects/libharu/large_font.patch =================================================================== --- trunk/cmake/build_projects/libharu/large_font.patch (rev 0) +++ trunk/cmake/build_projects/libharu/large_font.patch 2013-10-21 22:14:00 UTC (rev 12615) @@ -0,0 +1,24 @@ +diff -Naur libharu-2.2.1_pristine/include/hpdf_consts.h libharu-2.2.1/include/hpdf_consts.h +--- libharu-2.2.1_pristine/include/hpdf_consts.h 2010-11-22 01:57:44.000000000 -0800 ++++ libharu-2.2.1/include/hpdf_consts.h 2013-10-21 09:55:26.093664806 -0700 +@@ -142,7 +142,7 @@ + #define HPDF_MAX_WORDSPACE 300 + #define HPDF_MIN_CHARSPACE -30 + #define HPDF_MAX_CHARSPACE 300 +-#define HPDF_MAX_FONTSIZE 300 ++#define HPDF_MAX_FONTSIZE 600 + #define HPDF_MAX_ZOOMSIZE 10 + #define HPDF_MAX_LEADING 300 + #define HPDF_MAX_LINEWIDTH 100 +diff -Naur libharu-2.2.1_pristine/src/hpdf_page_operator.c libharu-2.2.1/src/hpdf_page_operator.c +--- libharu-2.2.1_pristine/src/hpdf_page_operator.c 2010-02-01 02:26:13.000000000 -0800 ++++ libharu-2.2.1/src/hpdf_page_operator.c 2013-10-21 09:55:26.093664806 -0700 +@@ -1162,7 +1162,7 @@ + return HPDF_RaiseError (page->error, HPDF_PAGE_INVALID_FONT, 0); + + if (size <= 0 || size > HPDF_MAX_FONTSIZE) +- return HPDF_RaiseError (page->error, HPDF_PAGE_INVALID_FONT_SIZE, 0); ++ return HPDF_RaiseError (page->error, HPDF_PAGE_INVALID_FONT_SIZE, size); + + if (page->mmgr != font->mmgr) + return HPDF_RaiseError (page->error, HPDF_PAGE_INVALID_FONT, 0); Added: trunk/cmake/build_projects/libharu/missing_zlib_headers.patch =================================================================== --- trunk/cmake/build_projects/libharu/missing_zlib_headers.patch (rev 0) +++ trunk/cmake/build_projects/libharu/missing_zlib_headers.patch 2013-10-21 22:14:00 UTC (rev 12615) @@ -0,0 +1,11 @@ +diff -Naur libharu-2.2.1_pristine/src/hpdf_streams.c libharu-2.2.1/src/hpdf_streams.c +--- libharu-2.2.1_pristine/src/hpdf_streams.c 2010-02-08 01:49:57.000000000 -0800 ++++ libharu-2.2.1/src/hpdf_streams.c 2013-10-21 11:47:12.026846086 -0700 +@@ -23,6 +23,7 @@ + #include "hpdf_consts.h" + #include "hpdf_utils.h" + #include "hpdf_streams.h" ++#include "hpdf_config.h" + + #ifndef LIBHPDF_HAVE_NOZLIB + #include <zlib.h> Added: trunk/cmake/build_projects/libharu/visibility.patch =================================================================== --- trunk/cmake/build_projects/libharu/visibility.patch (rev 0) +++ trunk/cmake/build_projects/libharu/visibility.patch 2013-10-21 22:14:00 UTC (rev 12615) @@ -0,0 +1,72 @@ +diff -Naur libharu-2.2.1_pristine/include/hpdf.h libharu-2.2.1/include/hpdf.h +--- libharu-2.2.1_pristine/include/hpdf.h 2010-11-22 01:57:27.000000000 -0800 ++++ libharu-2.2.1/include/hpdf.h 2013-10-21 11:35:14.480238924 -0700 +@@ -20,34 +20,33 @@ + #include "hpdf_config.h" + #include "hpdf_version.h" + +-#ifdef HPDF_DLL_MAKE +-# define HPDF_EXPORT(A) __declspec(dllexport) A __stdcall ++#if defined ( hpdf_EXPORTS ) ++ #if defined ( HPDF_DLL_MAKE ) ++ #define HPDF_EXPORT(A) __declspec(dllexport) A __stdcall ++ #elif defined ( HPDF_DLL_MAKE_CDECL ) ++ #define HPDF_EXPORT(A) __declspec(dllexport) A ++ #elif defined ( __GNUC__ ) && __GNUC__ > 3 ++ // Follow ideas in http://gcc.gnu.org/wiki/Visibility for GCC version 4.x ++ #define HPDF_EXPORT(A) __attribute__ ((visibility("default"))) A ++ #elif defined ( HPDF_SHARED_MAKE ) ++ #define HPDF_EXPORT(A) extern A ++ #else ++ #define HPDF_EXPORT(A) extern A ++ #endif + #else +-# ifdef HPDF_DLL_MAKE_CDECL +-# define HPDF_EXPORT(A) __declspec(dllexport) A +-# else +-# ifdef HPDF_SHARED_MAKE +-# define HPDF_EXPORT(A) extern A +-# endif /* HPDF_SHARED_MAKE */ +-# endif /* HPDF_DLL_MAKE_CDECL */ +-#endif /* HPDF_DLL_MAKE */ +- +-#ifdef HPDF_DLL +-# define HPDF_SHARED +-# define HPDF_EXPORT(A) __declspec(dllimport) A __stdcall +-#else +-# ifdef HPDF_DLL_CDECL +-# define HPDF_SHARED +-# define HPDF_EXPORT(A) __declspec(dllimport) A +-# endif /* HPDF_DLL_CDECL */ +-#endif /* HPDF_DLL */ ++ #if defined ( HPDF_DLL) ++ #define HPDF_SHARED ++ #define HPDF_EXPORT(A) __declspec(dllimport) A __stdcall ++ #elif defined ( HPDF_DLL_CDECL ) ++ #define HPDF_SHARED ++ #define HPDF_EXPORT(A) __declspec(dllimport) A ++ #else ++ #define HPDF_EXPORT(A) extern A ++ #endif ++#endif + + #ifdef HPDF_SHARED + +-#ifndef HPDF_EXPORT +-#define HPDF_EXPORT(A) extern A +-#endif /* HPDF_EXPORT */ +- + #include "hpdf_consts.h" + #include "hpdf_types.h" + +@@ -75,10 +74,6 @@ + + #else + +-#ifndef HPDF_EXPORT +-#define HPDF_EXPORT(A) A +-#endif /* HPDF_EXPORT */ +- + #include "hpdf_consts.h" + #include "hpdf_doc.h" + #include "hpdf_error.h" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-10-23 02:42:11
|
Revision: 12618 http://sourceforge.net/p/plplot/code/12618 Author: airwin Date: 2013-10-23 02:42:08 +0000 (Wed, 23 Oct 2013) Log Message: ----------- Update libharu-2.2.1 build configuration so that it works on both Linux and MinGW/MSYS. Tested by Alan W. Irwin <ai...@us...> using the build_plplot_lite target of the build_projects project on both Linux and MinGW/MSYS/Wine. The PDF files resulting from the test_noninteractive target run as part of that build, look reasonable on both platforms and there were no obvious run-time errors. Modified Paths: -------------- trunk/cmake/build_projects/libharu/bp.cmake trunk/cmake/build_projects/libharu/cmake.patch Added Paths: ----------- trunk/cmake/build_projects/libharu/remove_configured.patch Removed Paths: ------------- trunk/cmake/build_projects/libharu/missing_zlib_headers.patch Modified: trunk/cmake/build_projects/libharu/bp.cmake =================================================================== --- trunk/cmake/build_projects/libharu/bp.cmake 2013-10-22 17:47:13 UTC (rev 12617) +++ trunk/cmake/build_projects/libharu/bp.cmake 2013-10-23 02:42:08 UTC (rev 12618) @@ -62,12 +62,12 @@ COMMAND ${CMAKE_COMMAND} -E echo "Apply all patches" COMMAND ${PATCH_EXECUTABLE} -p1 < ${CMAKE_CURRENT_SOURCE_DIR}/${BP_PACKAGE}/cmake.patch COMMAND ${PATCH_EXECUTABLE} -p1 < ${CMAKE_CURRENT_SOURCE_DIR}/${BP_PACKAGE}/large_font.patch - COMMAND ${PATCH_EXECUTABLE} -p1 < ${CMAKE_CURRENT_SOURCE_DIR}/${BP_PACKAGE}/missing_zlib_headers.patch + COMMAND ${PATCH_EXECUTABLE} -p1 < ${CMAKE_CURRENT_SOURCE_DIR}/${BP_PACKAGE}/remove_configured.patch COMMAND ${PATCH_EXECUTABLE} -p1 < ${CMAKE_CURRENT_SOURCE_DIR}/${BP_PACKAGE}/visibility.patch DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${BP_PACKAGE}/cmake.patch ${CMAKE_CURRENT_SOURCE_DIR}/${BP_PACKAGE}/large_font.patch - ${CMAKE_CURRENT_SOURCE_DIR}/${BP_PACKAGE}/missing_zlib_headers.patch + ${CMAKE_CURRENT_SOURCE_DIR}/${BP_PACKAGE}/remove_configured.patch ${CMAKE_CURRENT_SOURCE_DIR}/${BP_PACKAGE}/visibility.patch APPEND ) Modified: trunk/cmake/build_projects/libharu/cmake.patch =================================================================== --- trunk/cmake/build_projects/libharu/cmake.patch 2013-10-22 17:47:13 UTC (rev 12617) +++ trunk/cmake/build_projects/libharu/cmake.patch 2013-10-23 02:42:08 UTC (rev 12618) @@ -1,6 +1,6 @@ diff -Naur libharu-2.2.1_pristine/CMakeLists.txt libharu-2.2.1/CMakeLists.txt --- libharu-2.2.1_pristine/CMakeLists.txt 1969-12-31 16:00:00.000000000 -0800 -+++ libharu-2.2.1/CMakeLists.txt 2013-10-21 10:51:25.543121062 -0700 ++++ libharu-2.2.1/CMakeLists.txt 2013-10-22 15:55:30.205030236 -0700 @@ -0,0 +1,216 @@ +# CMakeLists.txt +# @@ -136,7 +136,7 @@ + include_directories(${ZLIB_INCLUDE_DIR}) + list(APPEND ADDITIONAL_LIBRARIES ${ZLIB_LIBRARIES}) +else(ZLIB_FOUND) -+ set(HPDF_NOZLIB ON) ++ set(LIBHPDF_HAVE_NOZLIB ON) +endif(ZLIB_FOUND) + +# check png availibility @@ -147,7 +147,7 @@ + add_definitions(${PNG_DEFINITIONS}) + list(APPEND ADDITIONAL_LIBRARIES ${PNG_LIBRARIES}) +else(PNG_FOUND) -+ set(HPDF_NOPNGLIB ON) ++ set(LIBHPDF_HAVE_NOPNGLIB ON) +endif(PNG_FOUND) + +# ======================================================================= @@ -220,7 +220,7 @@ +INCLUDE( CPack ) diff -Naur libharu-2.2.1_pristine/cmake/modules/haru.cmake libharu-2.2.1/cmake/modules/haru.cmake --- libharu-2.2.1_pristine/cmake/modules/haru.cmake 1969-12-31 16:00:00.000000000 -0800 -+++ libharu-2.2.1/cmake/modules/haru.cmake 2013-10-21 10:52:11.838244974 -0700 ++++ libharu-2.2.1/cmake/modules/haru.cmake 2013-10-22 15:55:30.205030236 -0700 @@ -0,0 +1,54 @@ +# cmake/modules/haru.cmake +# @@ -278,7 +278,7 @@ +endif(NOT WIN32) diff -Naur libharu-2.2.1_pristine/cmake/modules/summary.cmake libharu-2.2.1/cmake/modules/summary.cmake --- libharu-2.2.1_pristine/cmake/modules/summary.cmake 1969-12-31 16:00:00.000000000 -0800 -+++ libharu-2.2.1/cmake/modules/summary.cmake 2013-10-21 10:52:36.297782032 -0700 ++++ libharu-2.2.1/cmake/modules/summary.cmake 2013-10-22 15:55:30.213030083 -0700 @@ -0,0 +1,66 @@ +# cmake/modules/summary.cmake +# @@ -348,7 +348,7 @@ +endmacro(summary) diff -Naur libharu-2.2.1_pristine/demo/CMakeLists.txt libharu-2.2.1/demo/CMakeLists.txt --- libharu-2.2.1_pristine/demo/CMakeLists.txt 1969-12-31 16:00:00.000000000 -0800 -+++ libharu-2.2.1/demo/CMakeLists.txt 2013-10-21 10:54:41.939403569 -0700 ++++ libharu-2.2.1/demo/CMakeLists.txt 2013-10-22 15:55:30.213030083 -0700 @@ -0,0 +1,183 @@ +# demo/CMakeLists.txt +# @@ -535,7 +535,7 @@ +endif(LIBHARU_EXAMPLES) diff -Naur libharu-2.2.1_pristine/include/CMakeLists.txt libharu-2.2.1/include/CMakeLists.txt --- libharu-2.2.1_pristine/include/CMakeLists.txt 1969-12-31 16:00:00.000000000 -0800 -+++ libharu-2.2.1/include/CMakeLists.txt 2013-10-21 10:53:43.508509852 -0700 ++++ libharu-2.2.1/include/CMakeLists.txt 2013-10-22 15:55:30.213030083 -0700 @@ -0,0 +1,63 @@ +# include/CMakeLists.txt for libharu. +### @@ -602,8 +602,8 @@ +install(FILES ${include_INSTALLED_HEADERS} DESTINATION include/hpdf) diff -Naur libharu-2.2.1_pristine/include/hpdf_config.h.cmake libharu-2.2.1/include/hpdf_config.h.cmake --- libharu-2.2.1_pristine/include/hpdf_config.h.cmake 1969-12-31 16:00:00.000000000 -0800 -+++ libharu-2.2.1/include/hpdf_config.h.cmake 2013-10-21 10:55:06.162944881 -0700 -@@ -0,0 +1,97 @@ ++++ libharu-2.2.1/include/hpdf_config.h.cmake 2013-10-22 15:56:31.771881667 -0700 +@@ -0,0 +1,91 @@ +/* + * Copyright (C) 2008 Werner Smekal + * Copyright (C) 2010 Alan W. Irwin @@ -637,12 +637,6 @@ +/* Define to 1 if you have the <inttypes.h> header file. */ +#cmakedefine LIBHPDF_HAVE_INTTYPES_H + -+/* Define to 1 if you have the `png' library (-lpng). */ -+#cmakedefine HAVE_LIBPNG -+ -+/* Define to 1 if you have the `z' library (-lz). */ -+#cmakedefine HAVE_LIBZ -+ +/* Define to 1 if you have the <memory.h> header file. */ +#cmakedefine LIBHPDF_HAVE_MEMORY_H + @@ -674,10 +668,10 @@ +#cmakedefine LIBHPDF_DEBUG_TRACE + +/* libpng is not available */ -+#cmakedefine HPDF_NOPNGLIB ++#cmakedefine LIBHPDF_HAVE_NOPNGLIB + +/* zlib is not available */ -+#cmakedefine HPDF_NOZLIB ++#cmakedefine LIBHPDF_HAVE_NOZLIB + +/* Define to the address where bug reports for this package should be sent. */ +#cmakedefine LIBHPDF_PACKAGE_BUGREPORT @@ -703,7 +697,7 @@ +#endif /* _HPDF_CONFIG_H */ diff -Naur libharu-2.2.1_pristine/src/CMakeLists.txt libharu-2.2.1/src/CMakeLists.txt --- libharu-2.2.1_pristine/src/CMakeLists.txt 1969-12-31 16:00:00.000000000 -0800 -+++ libharu-2.2.1/src/CMakeLists.txt 2013-10-21 10:53:23.164894950 -0700 ++++ libharu-2.2.1/src/CMakeLists.txt 2013-10-22 15:55:30.213030083 -0700 @@ -0,0 +1,150 @@ +# src/CMakeLists.txt +# Deleted: trunk/cmake/build_projects/libharu/missing_zlib_headers.patch =================================================================== --- trunk/cmake/build_projects/libharu/missing_zlib_headers.patch 2013-10-22 17:47:13 UTC (rev 12617) +++ trunk/cmake/build_projects/libharu/missing_zlib_headers.patch 2013-10-23 02:42:08 UTC (rev 12618) @@ -1,11 +0,0 @@ -diff -Naur libharu-2.2.1_pristine/src/hpdf_streams.c libharu-2.2.1/src/hpdf_streams.c ---- libharu-2.2.1_pristine/src/hpdf_streams.c 2010-02-08 01:49:57.000000000 -0800 -+++ libharu-2.2.1/src/hpdf_streams.c 2013-10-21 11:47:12.026846086 -0700 -@@ -23,6 +23,7 @@ - #include "hpdf_consts.h" - #include "hpdf_utils.h" - #include "hpdf_streams.h" -+#include "hpdf_config.h" - - #ifndef LIBHPDF_HAVE_NOZLIB - #include <zlib.h> Added: trunk/cmake/build_projects/libharu/remove_configured.patch =================================================================== --- trunk/cmake/build_projects/libharu/remove_configured.patch (rev 0) +++ trunk/cmake/build_projects/libharu/remove_configured.patch 2013-10-23 02:42:08 UTC (rev 12618) @@ -0,0 +1,131 @@ +diff -Naur libharu-2.2.1_pristine/include/hpdf_config.h libharu-2.2.1/include/hpdf_config.h +--- libharu-2.2.1_pristine/include/hpdf_config.h 2010-11-22 02:00:33.000000000 -0800 ++++ libharu-2.2.1/include/hpdf_config.h 1969-12-31 16:00:00.000000000 -0800 +@@ -1,127 +0,0 @@ +-#ifndef _INCLUDE_HPDF_CONFIG_H +-#define _INCLUDE_HPDF_CONFIG_H 1 +- +-/* include/hpdf_config.h. Generated automatically at end of configure. */ +-/* include/config.h. Generated from config.h.in by configure. */ +-/* include/config.h.in. Generated from configure.in by autoheader. */ +- +-/* debug build */ +-#ifndef LIBHPDF_DEBUG +-#define LIBHPDF_DEBUG /**/ +-#endif +- +-/* debug trace enabled */ +-/* #undef DEBUG_TRACE */ +- +-/* Define to 1 if you have the <dlfcn.h> header file. */ +-#ifndef LIBHPDF_HAVE_DLFCN_H +-#define LIBHPDF_HAVE_DLFCN_H 1 +-#endif +- +-/* Define to 1 if you have the <inttypes.h> header file. */ +-#ifndef LIBHPDF_HAVE_INTTYPES_H +-#define LIBHPDF_HAVE_INTTYPES_H 1 +-#endif +- +-/* Define to 1 if you have the `png' library (-lpng). */ +-#ifndef LIBHPDF_HAVE_LIBPNG +-#define LIBHPDF_HAVE_LIBPNG 1 +-#endif +- +-/* Define to 1 if you have the `z' library (-lz). */ +-#ifndef LIBHPDF_HAVE_LIBZ +-#define LIBHPDF_HAVE_LIBZ 1 +-#endif +- +-/* Define to 1 if you have the <memory.h> header file. */ +-#ifndef LIBHPDF_HAVE_MEMORY_H +-#define LIBHPDF_HAVE_MEMORY_H 1 +-#endif +- +-/* libpng is not available */ +-/* #undef HAVE_NOPNGLIB */ +- +-/* zlib is not available */ +-/* #undef HAVE_NOZLIB */ +- +-/* Define to 1 if you have the <stdint.h> header file. */ +-#ifndef LIBHPDF_HAVE_STDINT_H +-#define LIBHPDF_HAVE_STDINT_H 1 +-#endif +- +-/* Define to 1 if you have the <stdlib.h> header file. */ +-#ifndef LIBHPDF_HAVE_STDLIB_H +-#define LIBHPDF_HAVE_STDLIB_H 1 +-#endif +- +-/* Define to 1 if you have the <strings.h> header file. */ +-#ifndef LIBHPDF_HAVE_STRINGS_H +-#define LIBHPDF_HAVE_STRINGS_H 1 +-#endif +- +-/* Define to 1 if you have the <string.h> header file. */ +-#ifndef LIBHPDF_HAVE_STRING_H +-#define LIBHPDF_HAVE_STRING_H 1 +-#endif +- +-/* Define to 1 if you have the <sys/stat.h> header file. */ +-#ifndef LIBHPDF_HAVE_SYS_STAT_H +-#define LIBHPDF_HAVE_SYS_STAT_H 1 +-#endif +- +-/* Define to 1 if you have the <sys/types.h> header file. */ +-#ifndef LIBHPDF_HAVE_SYS_TYPES_H +-#define LIBHPDF_HAVE_SYS_TYPES_H 1 +-#endif +- +-/* Define to 1 if you have the <unistd.h> header file. */ +-#ifndef LIBHPDF_HAVE_UNISTD_H +-#define LIBHPDF_HAVE_UNISTD_H 1 +-#endif +- +-/* Define to the sub-directory in which libtool stores uninstalled libraries. +- */ +-#ifndef LIBHPDF_LT_OBJDIR +-#define LIBHPDF_LT_OBJDIR ".libs/" +-#endif +- +-/* Define to the address where bug reports for this package should be sent. */ +-#ifndef LIBHPDF_PACKAGE_BUGREPORT +-#define LIBHPDF_PACKAGE_BUGREPORT "" +-#endif +- +-/* Define to the full name of this package. */ +-#ifndef LIBHPDF_PACKAGE_NAME +-#define LIBHPDF_PACKAGE_NAME "libhpdf" +-#endif +- +-/* Define to the full name and version of this package. */ +-#ifndef LIBHPDF_PACKAGE_STRING +-#define LIBHPDF_PACKAGE_STRING "libhpdf 2.2.1" +-#endif +- +-/* Define to the one symbol short name of this package. */ +-#ifndef LIBHPDF_PACKAGE_TARNAME +-#define LIBHPDF_PACKAGE_TARNAME "libhpdf" +-#endif +- +-/* Define to the home page for this package. */ +-#ifndef LIBHPDF_PACKAGE_URL +-#define LIBHPDF_PACKAGE_URL "" +-#endif +- +-/* Define to the version of this package. */ +-#ifndef LIBHPDF_PACKAGE_VERSION +-#define LIBHPDF_PACKAGE_VERSION "2.2.1" +-#endif +- +-/* Define to 1 if you have the ANSI C header files. */ +-#ifndef LIBHPDF_STDC_HEADERS +-#define LIBHPDF_STDC_HEADERS 1 +-#endif +- +-/* Define to `unsigned int' if <sys/types.h> does not define. */ +-/* #undef size_t */ +- +-/* once: _INCLUDE_HPDF_CONFIG_H */ +-#endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |