Skip to content

Commit d9da0e0

Browse files
committed
Wim's changes
1 parent d5f710a commit d9da0e0

File tree

11 files changed

+522
-50
lines changed

11 files changed

+522
-50
lines changed

cmake/CMakeLists.txt

Lines changed: 249 additions & 37 deletions
Large diffs are not rendered by default.

cmake/Modules/FindPNG.cmake

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# - Find the native PNG includes and library
2+
#
3+
# This module searches libpng, the library for working with PNG images.
4+
#
5+
# It defines the following variables
6+
# PNG_INCLUDE_DIRS, where to find png.h, etc.
7+
# PNG_LIBRARIES, the libraries to link against to use PNG.
8+
# PNG_DEFINITIONS - You should add_definitons(${PNG_DEFINITIONS}) before compiling code that includes png library files.
9+
# PNG_FOUND, If false, do not try to use PNG.
10+
# PNG_VERSION_STRING - the version of the PNG library found (since CMake 2.8.8)
11+
# Also defined, but not for general use are
12+
# PNG_LIBRARY, where to find the PNG library.
13+
# For backward compatiblity the variable PNG_INCLUDE_DIR is also set. It has the same value as PNG_INCLUDE_DIRS.
14+
#
15+
# Since PNG depends on the ZLib compression library, none of the above will be
16+
# defined unless ZLib can be found.
17+
18+
#=============================================================================
19+
# Copyright 2002-2009 Kitware, Inc.
20+
#
21+
# Distributed under the OSI-approved BSD License (the "License");
22+
# see accompanying file Copyright.txt for details.
23+
#
24+
# This software is distributed WITHOUT ANY WARRANTY; without even the
25+
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
26+
# See the License for more information.
27+
#=============================================================================
28+
# (To distribute this file outside of CMake, substitute the full
29+
# License text for the above reference.)
30+
31+
if(PNG_FIND_QUIETLY)
32+
set(_FIND_ZLIB_ARG QUIET)
33+
endif()
34+
find_package(ZLIB ${_FIND_ZLIB_ARG})
35+
36+
if(ZLIB_FOUND)
37+
find_path(PNG_PNG_INCLUDE_DIR png.h
38+
/usr/local/include/libpng # OpenBSD
39+
)
40+
41+
foreach(l ${PNG_NAMES})
42+
list(APPEND PNG_DEBUG_NAMES "${l}d")
43+
endforeach()
44+
set(PNG_DEBUG_NAMES ${PNG_DEBUG_NAMES} png15d libpng15d png14d libpng14d png12d libpng12d)
45+
set(PNG_RELEASE_NAMES ${PNG_NAMES} png libpng png15 libpng15 png14 libpng14 png12 libpng12)
46+
find_library(PNG_DEBUG_LIBRARY NAMES ${PNG_DEBUG_NAMES} )
47+
find_library(PNG_RELEASE_LIBRARY NAMES ${PNG_RELEASE_NAMES} )
48+
if(PNG_DEBUG_LIBRARY AND PNG_RELEASE_LIBRARY)
49+
SET(PNG_LIBRARY debug ${PNG_DEBUG_LIBRARY} optimized ${PNG_RELEASE_LIBRARY})
50+
else(PNG_DEBUG_LIBRARY AND PNG_RELEASE_LIBRARY)
51+
SET(PNG_LIBRARY ${PNG_RELEASE_LIBRARY})
52+
endif(PNG_DEBUG_LIBRARY AND PNG_RELEASE_LIBRARY)
53+
54+
if (PNG_LIBRARY AND PNG_PNG_INCLUDE_DIR)
55+
# png.h includes zlib.h. Sigh.
56+
set(PNG_INCLUDE_DIRS ${PNG_PNG_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} )
57+
set(PNG_INCLUDE_DIR ${PNG_INCLUDE_DIRS} ) # for backward compatiblity
58+
set(PNG_LIBRARIES ${PNG_LIBRARY} ${ZLIB_LIBRARY})
59+
60+
if (CYGWIN)
61+
if(BUILD_SHARED_LIBS)
62+
# No need to define PNG_USE_DLL here, because it's default for Cygwin.
63+
else()
64+
set (PNG_DEFINITIONS -DPNG_STATIC)
65+
endif()
66+
endif ()
67+
68+
endif ()
69+
70+
if (PNG_PNG_INCLUDE_DIR AND EXISTS "${PNG_PNG_INCLUDE_DIR}/png.h")
71+
file(STRINGS "${PNG_PNG_INCLUDE_DIR}/png.h" png_version_str REGEX "^#define[ \t]+PNG_LIBPNG_VER_STRING[ \t]+\".+\"")
72+
73+
string(REGEX REPLACE "^#define[ \t]+PNG_LIBPNG_VER_STRING[ \t]+\"([^\"]+)\".*" "\\1" PNG_VERSION_STRING "${png_version_str}")
74+
unset(png_version_str)
75+
endif ()
76+
endif()
77+
78+
# handle the QUIETLY and REQUIRED arguments and set PNG_FOUND to TRUE if
79+
# all listed variables are TRUE
80+
include(FindPackageHandleStandardArgs)
81+
find_package_handle_standard_args(PNG
82+
REQUIRED_VARS PNG_LIBRARY PNG_PNG_INCLUDE_DIR
83+
VERSION_VAR PNG_VERSION_STRING)
84+
85+
mark_as_advanced(PNG_PNG_INCLUDE_DIR PNG_LIBRARY )

cmake/Modules/FindZLIB.cmake

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# - Find zlib
2+
# Find the native ZLIB includes and library.
3+
# Once done this will define
4+
#
5+
# ZLIB_INCLUDE_DIRS - where to find zlib.h, etc.
6+
# ZLIB_LIBRARIES - List of libraries when using zlib.
7+
# ZLIB_FOUND - True if zlib found.
8+
#
9+
# ZLIB_VERSION_STRING - The version of zlib found (x.y.z)
10+
# ZLIB_VERSION_MAJOR - The major version of zlib
11+
# ZLIB_VERSION_MINOR - The minor version of zlib
12+
# ZLIB_VERSION_PATCH - The patch version of zlib
13+
# ZLIB_VERSION_TWEAK - The tweak version of zlib
14+
#
15+
# The following variable are provided for backward compatibility
16+
#
17+
# ZLIB_MAJOR_VERSION - The major version of zlib
18+
# ZLIB_MINOR_VERSION - The minor version of zlib
19+
# ZLIB_PATCH_VERSION - The patch version of zlib
20+
#
21+
# An includer may set ZLIB_ROOT to a zlib installation root to tell
22+
# this module where to look.
23+
24+
#=============================================================================
25+
# Copyright 2001-2011 Kitware, Inc.
26+
#
27+
# Distributed under the OSI-approved BSD License (the "License");
28+
# see accompanying file Copyright.txt for details.
29+
#
30+
# This software is distributed WITHOUT ANY WARRANTY; without even the
31+
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
32+
# See the License for more information.
33+
#=============================================================================
34+
# (To distribute this file outside of CMake, substitute the full
35+
# License text for the above reference.)
36+
37+
set(_ZLIB_SEARCHES)
38+
39+
# Search ZLIB_ROOT first if it is set.
40+
if(ZLIB_ROOT)
41+
set(_ZLIB_SEARCH_ROOT PATHS ${ZLIB_ROOT} NO_DEFAULT_PATH)
42+
list(APPEND _ZLIB_SEARCHES _ZLIB_SEARCH_ROOT)
43+
endif()
44+
45+
# Normal search.
46+
set(_ZLIB_SEARCH_NORMAL
47+
PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\Zlib;InstallPath]"
48+
"$ENV{PROGRAMFILES}/zlib"
49+
)
50+
list(APPEND _ZLIB_SEARCHES _ZLIB_SEARCH_NORMAL)
51+
52+
set(ZLIB_RELEASE_NAMES z zlib zdll zlib1 zlibstatic)
53+
set(ZLIB_DEBUG_NAMES zlibd zlibd1 zlibstaticd)
54+
55+
# Try each search configuration.
56+
foreach(search ${_ZLIB_SEARCHES})
57+
find_path(ZLIB_INCLUDE_DIR NAMES zlib.h ${${search}} PATH_SUFFIXES include)
58+
find_library(ZLIB_DEBUG_LIBRARY NAMES ${ZLIB_DEBUG_NAMES} ${${search}} PATH_SUFFIXES lib)
59+
find_library(ZLIB_RELEASE_LIBRARY NAMES ${ZLIB_RELEASE_NAMES} ${${search}} PATH_SUFFIXES lib)
60+
endforeach()
61+
message(STATUS "zlib found: ${ZLIB_DEBUG_LIBRARY} ${ZLIB_RELEASE_LIBRARY}")
62+
63+
mark_as_advanced(ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
64+
65+
if(ZLIB_INCLUDE_DIR AND EXISTS "${ZLIB_INCLUDE_DIR}/zlib.h")
66+
file(STRINGS "${ZLIB_INCLUDE_DIR}/zlib.h" ZLIB_H REGEX "^#define ZLIB_VERSION \"[^\"]*\"$")
67+
68+
string(REGEX REPLACE "^.*ZLIB_VERSION \"([0-9]+).*$" "\\1" ZLIB_VERSION_MAJOR "${ZLIB_H}")
69+
string(REGEX REPLACE "^.*ZLIB_VERSION \"[0-9]+\\.([0-9]+).*$" "\\1" ZLIB_VERSION_MINOR "${ZLIB_H}")
70+
string(REGEX REPLACE "^.*ZLIB_VERSION \"[0-9]+\\.[0-9]+\\.([0-9]+).*$" "\\1" ZLIB_VERSION_PATCH "${ZLIB_H}")
71+
set(ZLIB_VERSION_STRING "${ZLIB_VERSION_MAJOR}.${ZLIB_VERSION_MINOR}.${ZLIB_VERSION_PATCH}")
72+
73+
# only append a TWEAK version if it exists:
74+
set(ZLIB_VERSION_TWEAK "")
75+
if( "${ZLIB_H}" MATCHES "^.*ZLIB_VERSION \"[0-9]+\\.[0-9]+\\.[0-9]+\\.([0-9]+).*$")
76+
set(ZLIB_VERSION_TWEAK "${CMAKE_MATCH_1}")
77+
set(ZLIB_VERSION_STRING "${ZLIB_VERSION_STRING}.${ZLIB_VERSION_TWEAK}")
78+
endif()
79+
80+
set(ZLIB_MAJOR_VERSION "${ZLIB_VERSION_MAJOR}")
81+
set(ZLIB_MINOR_VERSION "${ZLIB_VERSION_MINOR}")
82+
set(ZLIB_PATCH_VERSION "${ZLIB_VERSION_PATCH}")
83+
endif()
84+
if(ZLIB_DEBUG_LIBRARY AND ZLIB_RELEASE_LIBRARY)
85+
SET(ZLIB_LIBRARY debug ${ZLIB_DEBUG_LIBRARY} optimized ${ZLIB_RELEASE_LIBRARY})
86+
else(ZLIB_DEBUG_LIBRARY AND ZLIB_RELEASE_LIBRARY)
87+
SET(ZLIB_LIBRARY ${ZLIB_RELEASE_LIBRARY})
88+
endif(ZLIB_DEBUG_LIBRARY AND ZLIB_RELEASE_LIBRARY)
89+
90+
# handle the QUIETLY and REQUIRED arguments and set ZLIB_FOUND to TRUE if
91+
# all listed variables are TRUE
92+
include(FindPackageHandleStandardArgs)
93+
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZLIB REQUIRED_VARS ZLIB_LIBRARY ZLIB_INCLUDE_DIR
94+
VERSION_VAR ZLIB_VERSION_STRING)
95+
96+
if(ZLIB_FOUND)
97+
set(ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR})
98+
set(ZLIB_LIBRARIES ${ZLIB_LIBRARY})
99+
endif()
100+

cmake/build-openssl.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ message( STATUS "* OpenSSL - Compiling..." )
88
separate_arguments( OPENSSL_BUILD_COMMAND_WS UNIX_COMMAND "${OPENSSL_BUILD_COMMAND}" )
99

1010
execute_process(
11-
COMMAND ${OPENSSL_BUILD_COMMAND}
11+
COMMAND ${OPENSSL_BUILD_COMMAND_WS}
1212
WORKING_DIRECTORY ${OPENSSL_SOURCE_DIR}
1313
OUTPUT_FILE ${OPENSSL_SOURCE_DIR}-stamp/openssl-build2-out.txt
1414
ERROR_FILE ${OPENSSL_SOURCE_DIR}-stamp/openssl-build2-err.txt

cmake/configure-openssl.cmake

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,16 @@ set( ENV{PATH} "${_NEWPATH}" )
66
separate_arguments( OPENSSL_CONFIGURE_COMMAND_WS UNIX_COMMAND "${OPENSSL_CONFIGURE_COMMAND}" )
77

88
message( STATUS "* OpenSSL - Configuring..." )
9-
#message( STATUS "OPENSSL_CONFIGURE_COMMAND = ${OPENSSL_CONFIGURE_COMMAND}" )
9+
message( STATUS "OPENSSL_CONFIGURE_COMMAND = ${OPENSSL_CONFIGURE_COMMAND}" )
10+
message( STATUS "OPENSSL_CONFIGURE_COMMAND = ${OPENSSL_CONFIGURE_COMMAND_WS}" )
1011
execute_process(
11-
COMMAND ${OPENSSL_CONFIGURE_COMMAND}
12+
COMMAND ${OPENSSL_CONFIGURE_COMMAND_WS}
1213
WORKING_DIRECTORY ${OPENSSL_SOURCE_DIR}
1314
OUTPUT_FILE ${OPENSSL_SOURCE_DIR}-stamp/openssl-configure2-out.txt
1415
ERROR_FILE ${OPENSSL_SOURCE_DIR}-stamp/openssl-configure2-err.txt
15-
OUTPUT_QUIET
16-
ERROR_QUIET
16+
#OUTPUT_QUIET
17+
# ERROR_QUIET
18+
RESULT_VARIABLE RES
1719
)
18-
20+
21+
message( STATUS "* OpenSSL - result: ${RES}" )

cmake/genasm-openssl.cmake

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,16 @@ set( _NEWPATH ${WINST_DIR}\\bin ${_OLDPATH} )
33
set( ENV{PATH} "${_NEWPATH}" )
44

55
message( STATUS "* OpenSSL - Generating assembly code..." )
6+
message( STATUS "* OpenSSL - ${OPENSSL_SOURCE_DIR}" )
7+
message( STATUS "* OpenSSL - ${OPENSSL_GENASM_COMMAND}" )
68

79
if( OPENSSL_GENASM_COMMAND )
810
execute_process(
911
COMMAND ${OPENSSL_GENASM_COMMAND}
1012
WORKING_DIRECTORY ${OPENSSL_SOURCE_DIR}
1113
OUTPUT_FILE ${OPENSSL_SOURCE_DIR}-stamp/openssl-genasm-out.txt
1214
ERROR_FILE ${OPENSSL_SOURCE_DIR}-stamp/openssl-genasm-err.txt
13-
OUTPUT_QUIET
14-
ERROR_QUIET
15+
# OUTPUT_QUIET
16+
# ERROR_QUIET
1517
)
1618
endif( OPENSSL_GENASM_COMMAND )

cmake/install-openssl.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ message( STATUS "* OpenSSL - Installing..." )
88
separate_arguments( OPENSSL_INSTALL_COMMAND_WS UNIX_COMMAND "${OPENSSL_INSTALL_COMMAND}" )
99

1010
execute_process(
11-
COMMAND ${OPENSSL_INSTALL_COMMAND}
11+
COMMAND ${OPENSSL_INSTALL_COMMAND_WS}
1212
WORKING_DIRECTORY ${OPENSSL_SOURCE_DIR}
1313
OUTPUT_FILE ${OPENSSL_SOURCE_DIR}-stamp/openssl-install2-out.txt
1414
ERROR_FILE ${OPENSSL_SOURCE_DIR}-stamp/openssl-install2-err.txt
15-
OUTPUT_QUIET
16-
ERROR_QUIET
15+
# OUTPUT_QUIET
16+
# ERROR_QUIET
1717
)

patches/libharu-2.3.0RC2.patch

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,15 @@ diff -rupdN libharu-2.3.0RC2.orig/src/hpdf_image_ccitt.c libharu-2.3.0RC2/src/hp
8686
HPDF_UINT width,
8787
--- libharu-2.3.0RC2.orig/CMakeLists.txt Fri Jan 7 15:27:41 2011
8888
+++ libharu-2.3.0RC2/CMakeLists.txt Sun Mar 4 14:59:13 2012
89+
@@ -35,7 +35,7 @@
90+
cmake_minimum_required(VERSION 2.4.8 FATAL_ERROR)
91+
92+
# Location where the haru cmake build system first looks for cmake modules
93+
-set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/modules)
94+
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake/modules)
95+
96+
97+
# set library name, msvc does not append 'lib' automatically
8998
@@ -169,7 +169,6 @@ install(FILES ${haru_HDRS} DESTINATION i
9099

91100
# install various files
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
diff -ur openssl-OpenSSL_1_0_1e.orig/ms/do_nasm.bat openssl-OpenSSL_1_0_1e/ms/do_nasm.bat
2+
--- openssl-OpenSSL_1_0_1e.orig/ms/do_nasm.bat 2013-08-28 18:33:43.609476400 +0200
3+
+++ openssl-OpenSSL_1_0_1e/ms/do_nasm.bat 2013-08-28 18:35:16.164770200 +0200
4+
@@ -1,8 +1,12 @@
5+
6+
perl util\mkfiles.pl >MINFO
7+
perl util\mk1mf.pl nasm VC-WIN32 >ms\nt.mak
8+
+perl util\mk1mf.pl debug nasm VC-WIN32 >ms\ntd.mak
9+
perl util\mk1mf.pl dll nasm VC-WIN32 >ms\ntdll.mak
10+
+perl util\mk1mf.pl dll debug nasm VC-WIN32 >ms\ntdlld.mak
11+
perl util\mk1mf.pl nasm BC-NT >ms\bcb.mak
12+
13+
perl util\mkdef.pl 32 libeay > ms\libeay32.def
14+
+perl util\mkdef.pl D 32 libeay > ms\libeay32d.def
15+
perl util\mkdef.pl 32 ssleay > ms\ssleay32.def
16+
+perl util\mkdef.pl D 32 ssleay > ms\ssleay32d.def
17+
Only in openssl-OpenSSL_1_0_1e/ms: do_nasm.bat~
18+
diff -ur openssl-OpenSSL_1_0_1e.orig/util/mkdef.pl openssl-OpenSSL_1_0_1e/util/mkdef.pl
19+
--- openssl-OpenSSL_1_0_1e.orig/util/mkdef.pl 2013-08-28 18:33:44.823545800 +0200
20+
+++ openssl-OpenSSL_1_0_1e/util/mkdef.pl 2013-08-28 18:37:05.183005700 +0200
21+
@@ -59,6 +59,7 @@
22+
my $crypto_num= "util/libeay.num";
23+
my $ssl_num= "util/ssleay.num";
24+
my $libname;
25+
+my $SUFFIX = "";
26+
27+
my $do_update = 0;
28+
my $do_rewrite = 1;
29+
@@ -146,6 +147,7 @@
30+
foreach (@ARGV, split(/ /, $options))
31+
{
32+
$debug=1 if $_ eq "debug";
33+
+ $SUFFIX="D" if $_ eq "D";
34+
$W32=1 if $_ eq "32";
35+
$W16=1 if $_ eq "16";
36+
if($_ eq "NT") {
37+
@@ -1283,7 +1285,7 @@
38+
my $description = "$what $version, $name - http://$http_vendor";
39+
40+
if ($W32)
41+
- { $libname.="32"; }
42+
+ { $libname.="32"; $libname.=$SUFFIX; }
43+
elsif ($W16)
44+
{ $libname.="16"; }
45+
elsif ($OS2)
46+
Only in openssl-OpenSSL_1_0_1e/util: mkdef.pl~
47+
diff -ur openssl-OpenSSL_1_0_1e.orig/util/pl/VC-32.pl openssl-OpenSSL_1_0_1e/util/pl/VC-32.pl
48+
--- openssl-OpenSSL_1_0_1e.orig/util/pl/VC-32.pl 2013-08-28 18:33:44.871548500 +0200
49+
+++ openssl-OpenSSL_1_0_1e/util/pl/VC-32.pl 2013-08-28 18:38:31.720955400 +0200
50+
@@ -15,6 +15,10 @@
51+
{
52+
$crypto="libeay32";
53+
}
54+
+if ($debug) {
55+
+ $ssl.="d";
56+
+ $crypto.="d";
57+
+}
58+
59+
$o='\\';
60+
$cp='$(PERL) util/copy.pl';
61+
Only in openssl-OpenSSL_1_0_1e/util/pl: VC-32.pl~

winst

100755100644
File mode changed.

0 commit comments

Comments
 (0)