commit
51ae57de1c
@ -0,0 +1,2 @@
|
|||||||
|
SOURCES/libkml-1.3.0.tar.gz
|
||||||
|
SOURCES/minizip-1.3.0.tar.gz
|
@ -0,0 +1,2 @@
|
|||||||
|
cbf2fdb362e30904903068addca7b7eb18a60bac SOURCES/libkml-1.3.0.tar.gz
|
||||||
|
bece0bf0bc6044e9cbd1e3824d5b6f21a0aaf153 SOURCES/minizip-1.3.0.tar.gz
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,71 @@
|
|||||||
|
From 77cf351a61f3683b74e07857ca77b5580d1cedf0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Sandro Mani <manisandro@gmail.com>
|
||||||
|
Date: Fri, 8 Apr 2016 23:21:26 +0200
|
||||||
|
Subject: [PATCH 2/4] Fix mistaken use of std::cerr instead of std::endl
|
||||||
|
|
||||||
|
---
|
||||||
|
examples/engine/inlinestyles.cc | 8 ++++----
|
||||||
|
examples/engine/splitstyles.cc | 8 ++++----
|
||||||
|
2 files changed, 8 insertions(+), 8 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/examples/engine/inlinestyles.cc b/examples/engine/inlinestyles.cc
|
||||||
|
index 1cb4755..8ad1f57 100644
|
||||||
|
--- a/examples/engine/inlinestyles.cc
|
||||||
|
+++ b/examples/engine/inlinestyles.cc
|
||||||
|
@@ -35,20 +35,20 @@
|
||||||
|
bool InlineStyles(const char* input_filename, const char* output_filename) {
|
||||||
|
std::string kml_input;
|
||||||
|
if (!kmlbase::File::ReadFileToString(input_filename, &kml_input)) {
|
||||||
|
- std::cerr << "read failed: " << input_filename << std::cerr;
|
||||||
|
+ std::cerr << "read failed: " << input_filename << std::endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
std::string errors;
|
||||||
|
kmldom::ElementPtr root = kmlengine::InlineStyles(kml_input, &errors);
|
||||||
|
if (!root) {
|
||||||
|
- std::cerr << "parse failed: " << input_filename << std::cerr;
|
||||||
|
- std::cerr << "parse failed: " << errors << std::cerr;
|
||||||
|
+ std::cerr << "parse failed: " << input_filename << std::endl;
|
||||||
|
+ std::cerr << "parse failed: " << errors << std::endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string kml_output = kmldom::SerializePretty(root);
|
||||||
|
if (!kmlbase::File::WriteStringToFile(kml_output, output_filename)) {
|
||||||
|
- std::cerr << "write failed: " << output_filename << std::cerr;
|
||||||
|
+ std::cerr << "write failed: " << output_filename << std::endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
diff --git a/examples/engine/splitstyles.cc b/examples/engine/splitstyles.cc
|
||||||
|
index a3b190a..56203c9 100644
|
||||||
|
--- a/examples/engine/splitstyles.cc
|
||||||
|
+++ b/examples/engine/splitstyles.cc
|
||||||
|
@@ -35,20 +35,20 @@
|
||||||
|
bool SplitStyles(const char* input_filename, const char* output_filename) {
|
||||||
|
std::string kml_input;
|
||||||
|
if (!kmlbase::File::ReadFileToString(input_filename, &kml_input)) {
|
||||||
|
- std::cerr << "read failed: " << input_filename << std::cerr;
|
||||||
|
+ std::cerr << "read failed: " << input_filename << std::endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
std::string errors;
|
||||||
|
kmldom::ElementPtr root = kmlengine::SplitStyles(kml_input, &errors);
|
||||||
|
if (!root) {
|
||||||
|
- std::cerr << "parse failed: " << input_filename << std::cerr;
|
||||||
|
- std::cerr << "parse failed: " << errors << std::cerr;
|
||||||
|
+ std::cerr << "parse failed: " << input_filename << std::endl;
|
||||||
|
+ std::cerr << "parse failed: " << errors << std::endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string kml_output = kmldom::SerializePretty(root);
|
||||||
|
if (!kmlbase::File::WriteStringToFile(kml_output, output_filename)) {
|
||||||
|
- std::cerr << "write failed: " << output_filename << std::cerr;
|
||||||
|
+ std::cerr << "write failed: " << output_filename << std::endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
--
|
||||||
|
2.8.1
|
||||||
|
|
@ -0,0 +1,71 @@
|
|||||||
|
From b728c0815edc06c826fb5be8cd25cbb7f3b816b3 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Sandro Mani <manisandro@gmail.com>
|
||||||
|
Date: Fri, 8 Apr 2016 23:22:12 +0200
|
||||||
|
Subject: [PATCH 3/4] Fix python tests
|
||||||
|
|
||||||
|
---
|
||||||
|
tests/swig/CMakeLists.txt | 6 ++++++
|
||||||
|
tests/swig/kmldom_test.py | 2 +-
|
||||||
|
tests/swig/kmlengine_test.py | 3 ++-
|
||||||
|
3 files changed, 9 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/tests/swig/CMakeLists.txt b/tests/swig/CMakeLists.txt
|
||||||
|
index 52e398e..5ba1cd1 100644
|
||||||
|
--- a/tests/swig/CMakeLists.txt
|
||||||
|
+++ b/tests/swig/CMakeLists.txt
|
||||||
|
@@ -1,12 +1,18 @@
|
||||||
|
if(WITH_PYTHON)
|
||||||
|
add_test(NAME test_python_kmlbase
|
||||||
|
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/kmlbase_test.py)
|
||||||
|
+set_tests_properties(test_python_kmlbase
|
||||||
|
+ PROPERTIES ENVIRONMENT "PYTHONPATH=${CMAKE_BINARY_DIR}/src/swig:${CMAKE_BINARY_DIR}/lib")
|
||||||
|
|
||||||
|
add_test(NAME test_python_kmldom
|
||||||
|
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/kmldom_test.py)
|
||||||
|
+set_tests_properties(test_python_kmldom
|
||||||
|
+ PROPERTIES ENVIRONMENT "PYTHONPATH=${CMAKE_BINARY_DIR}/src/swig:${CMAKE_BINARY_DIR}/lib")
|
||||||
|
|
||||||
|
add_test(NAME test_python_kmlengine
|
||||||
|
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/kmlengine_test.py)
|
||||||
|
+set_tests_properties(test_python_kmlengine
|
||||||
|
+ PROPERTIES ENVIRONMENT "PYTHONPATH=${CMAKE_BINARY_DIR}/src/swig:${CMAKE_BINARY_DIR}/lib")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(WITH_JAVA)
|
||||||
|
diff --git a/tests/swig/kmldom_test.py b/tests/swig/kmldom_test.py
|
||||||
|
index e18c5a7..4762d6e 100644
|
||||||
|
--- a/tests/swig/kmldom_test.py
|
||||||
|
+++ b/tests/swig/kmldom_test.py
|
||||||
|
@@ -753,7 +753,7 @@ def TestColorStyle(colorstyle):
|
||||||
|
color = kmlbase.Color32(0xf0f0c80f)
|
||||||
|
colorstyle.set_color(color)
|
||||||
|
assert colorstyle.has_color()
|
||||||
|
- assert color == colorstyle.get_color()
|
||||||
|
+ assert color.to_string_argb() == colorstyle.get_color().to_string_argb()
|
||||||
|
# Clear <color> and verify has_
|
||||||
|
colorstyle.clear_color()
|
||||||
|
assert not colorstyle.has_color()
|
||||||
|
diff --git a/tests/swig/kmlengine_test.py b/tests/swig/kmlengine_test.py
|
||||||
|
index 8850221..7eb3c09 100644
|
||||||
|
--- a/tests/swig/kmlengine_test.py
|
||||||
|
+++ b/tests/swig/kmlengine_test.py
|
||||||
|
@@ -32,6 +32,7 @@ This file contains unit tests for the KML Engine Python SWIG bindings.
|
||||||
|
import unittest
|
||||||
|
import kmldom
|
||||||
|
import kmlengine
|
||||||
|
+import os
|
||||||
|
|
||||||
|
# These VerySimple tests really only verify that the function/class exists.
|
||||||
|
|
||||||
|
@@ -239,7 +240,7 @@ class BasicKmlFileSerializeToStringTestCase(unittest.TestCase):
|
||||||
|
|
||||||
|
class BasicKmzFileTestCase(unittest.TestCase):
|
||||||
|
def runTest(self):
|
||||||
|
- kmz_filepath = '../../testdata/kmz/model-macky.kmz'
|
||||||
|
+ kmz_filepath = os.path.join(os.path.dirname(__file__), '../../testdata/kmz/model-macky.kmz')
|
||||||
|
kmzfile = kmlengine.KmzFile.OpenFromFile(kmz_filepath)
|
||||||
|
assert kmzfile
|
||||||
|
(ok, kml) = kmzfile.ReadKml()
|
||||||
|
--
|
||||||
|
2.8.1
|
||||||
|
|
@ -0,0 +1,91 @@
|
|||||||
|
From 2382618c2de489b860228b74283a581b4333030d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Sandro Mani <manisandro@gmail.com>
|
||||||
|
Date: Fri, 8 Apr 2016 23:23:20 +0200
|
||||||
|
Subject: [PATCH 4/4] Correctly build and run java test
|
||||||
|
|
||||||
|
---
|
||||||
|
cmake/JUnit.cmake | 38 ++++++++++++++++++++++++++++++++++++++
|
||||||
|
tests/swig/CMakeLists.txt | 23 +++++++++++++++++------
|
||||||
|
2 files changed, 55 insertions(+), 6 deletions(-)
|
||||||
|
create mode 100644 cmake/JUnit.cmake
|
||||||
|
|
||||||
|
diff --git a/cmake/JUnit.cmake b/cmake/JUnit.cmake
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..3c114fd
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/cmake/JUnit.cmake
|
||||||
|
@@ -0,0 +1,38 @@
|
||||||
|
+include(FindJava)
|
||||||
|
+
|
||||||
|
+# add_junit_test(<target name>
|
||||||
|
+# CLASSPATH [path1 ...]
|
||||||
|
+# TESTS [class1 ...]
|
||||||
|
+# )
|
||||||
|
+function(add_junit_test TARGET_NAME)
|
||||||
|
+
|
||||||
|
+ if (WIN32 AND NOT CYGWIN)
|
||||||
|
+ set(SEPARATOR ";")
|
||||||
|
+ else (WIN32 AND NOT CYGWIN)
|
||||||
|
+ set(SEPARATOR ":")
|
||||||
|
+ endif(WIN32 AND NOT CYGWIN)
|
||||||
|
+
|
||||||
|
+ foreach (ARG ${ARGN})
|
||||||
|
+ if (ARG MATCHES "CLASSPATH" OR ARG MATCHES "TESTS" OR ARG MATCHES "JVMARGS")
|
||||||
|
+ set(TYPE ${ARG})
|
||||||
|
+
|
||||||
|
+ else ()
|
||||||
|
+
|
||||||
|
+ if (TYPE MATCHES "CLASSPATH")
|
||||||
|
+ set(CLASSPATH "${CLASSPATH}${SEPARATOR}${ARG}")
|
||||||
|
+
|
||||||
|
+ elseif (TYPE MATCHES "TESTS")
|
||||||
|
+ set(TESTS ${TESTS} ${ARG})
|
||||||
|
+
|
||||||
|
+ elseif (TYPE MATCHES "JVMARGS")
|
||||||
|
+ set(JVMARGS ${JVMARGS} ${ARG})
|
||||||
|
+
|
||||||
|
+ endif()
|
||||||
|
+
|
||||||
|
+ endif()
|
||||||
|
+
|
||||||
|
+ endforeach(ARG)
|
||||||
|
+
|
||||||
|
+ add_test(NAME ${TARGET_NAME} COMMAND ${Java_JAVA_EXECUTABLE} ${JVMARGS} -classpath ${CLASSPATH} org.junit.runner.JUnitCore ${TESTS})
|
||||||
|
+
|
||||||
|
+endfunction(add_junit_test)
|
||||||
|
diff --git a/tests/swig/CMakeLists.txt b/tests/swig/CMakeLists.txt
|
||||||
|
index 5ba1cd1..c859d4d 100644
|
||||||
|
--- a/tests/swig/CMakeLists.txt
|
||||||
|
+++ b/tests/swig/CMakeLists.txt
|
||||||
|
@@ -16,10 +16,21 @@ set_tests_properties(test_python_kmlengine
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(WITH_JAVA)
|
||||||
|
-add_test( NAME test_java_kmlbase
|
||||||
|
- COMMAND
|
||||||
|
- ${Java_JAVA_EXECUTABLE}
|
||||||
|
- -cp "${CMAKE_JAVA_INCLUDE_PATH}${PATH_SEPARATOR}${CMAKE_BINARY_DIR}/src/swig/LibKML.jar;${CMAKE_CURRENT_BINARY_DIR}"
|
||||||
|
- KmlBaseTest )
|
||||||
|
+include(UseJava)
|
||||||
|
+include(JUnit)
|
||||||
|
+find_file(JUNIT_JAR NAMES junit.jar PATHS ${JAVA_LIB_INSTALL_DIR} /usr/share/java)
|
||||||
|
+find_file(HAMCREST_JAR NAMES hamcrest/core.jar PATHS ${JAVA_LIB_INSTALL_DIR} /usr/share/java)
|
||||||
|
|
||||||
|
-endif()
|
||||||
|
\ No newline at end of file
|
||||||
|
+add_jar(KmlBaseTest KmlBaseTest.java INCLUDE_JARS /usr/share/java/junit.jar ${CMAKE_BINARY_DIR}/src/swig/LibKML.jar)
|
||||||
|
+add_dependencies(KmlBaseTest LibKML_jar)
|
||||||
|
+
|
||||||
|
+if(WIN32 AND NOT CYGWIN)
|
||||||
|
+ set(PATH_SEPARATOR ";")
|
||||||
|
+else(WIN32 AND NOT CYGWIN)
|
||||||
|
+ set(PATH_SEPARATOR ":")
|
||||||
|
+endif(WIN32 AND NOT CYGWIN)
|
||||||
|
+
|
||||||
|
+add_junit_test(test_java_kmlbase CLASSPATH "${JUNIT_JAR}${PATH_SEPARATOR}${HAMCREST_JAR}${PATH_SEPARATOR}${CMAKE_BINARY_DIR}/src/swig/LibKML.jar${PATH_SEPARATOR}${CMAKE_CURRENT_BINARY_DIR}/KmlBaseTest.jar" TESTS KmlBaseTest)
|
||||||
|
+set_tests_properties(test_java_kmlbase
|
||||||
|
+ PROPERTIES ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/lib")
|
||||||
|
+endif()
|
||||||
|
--
|
||||||
|
2.8.1
|
||||||
|
|
@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/tests/kml/engine/feature_view_test.cc b/tests/kml/engine/feature_view_test.cc
|
||||||
|
index ce572bb..0b53851 100644
|
||||||
|
--- a/tests/kml/engine/feature_view_test.cc
|
||||||
|
+++ b/tests/kml/engine/feature_view_test.cc
|
||||||
|
@@ -144,7 +144,7 @@ TEST(FeatureViewTest, TestComputeBboxLookAt) {
|
||||||
|
// These fields are expected to be set to these values.
|
||||||
|
ASSERT_DOUBLE_EQ(-86.032775, lookat->get_longitude());
|
||||||
|
ASSERT_DOUBLE_EQ(35.78925, lookat->get_latitude());
|
||||||
|
- ASSERT_DOUBLE_EQ(712928.68603440293, lookat->get_range());
|
||||||
|
+ ASSERT_NEAR(712928.68603440, lookat->get_range(), 0.0000001);
|
||||||
|
// These fields are not set by ComputeBboxLookAt.
|
||||||
|
ASSERT_FALSE(lookat->has_altitude());
|
||||||
|
ASSERT_FALSE(lookat->has_heading());
|
@ -0,0 +1,49 @@
|
|||||||
|
diff -rupN libkml-1.3.0/cmake/External_minizip.cmake libkml-1.3.0-new/cmake/External_minizip.cmake
|
||||||
|
--- libkml-1.3.0/cmake/External_minizip.cmake 2015-12-21 18:23:05.000000000 +0100
|
||||||
|
+++ libkml-1.3.0-new/cmake/External_minizip.cmake 2018-10-06 21:50:30.785912329 +0200
|
||||||
|
@@ -1,15 +1,18 @@
|
||||||
|
+set(MINIZIP_INSTALL_DIR ${CMAKE_BINARY_DIR}/MINIZIP/install/include)
|
||||||
|
+set(MINIZIP_BUILD_SHARED_LIBS FALSE)
|
||||||
|
+
|
||||||
|
ExternalProject_Add(MINIZIP
|
||||||
|
PREFIX MINIZIP
|
||||||
|
- URL "http://sourceforge.net/projects/libkml-files/files/1.3.0/minizip.tar.gz/download"
|
||||||
|
+ URL "${CMAKE_BINARY_DIR}/minizip-1.3.0.tar.gz"
|
||||||
|
URL_MD5 d5f74eff74e03e497ea60b2c43623416
|
||||||
|
BINARY_DIR ${CMAKE_BINARY_DIR}/MINIZIP/build
|
||||||
|
DEPENDS ${MINIZIP_DEPENDS}
|
||||||
|
- CMAKE_CACHE_ARGS
|
||||||
|
- -DCMAKE_INSTALL_PREFIX:PATH=${INSTALL_DIR}
|
||||||
|
+ CMAKE_ARGS
|
||||||
|
+ -DCMAKE_INSTALL_PREFIX:PATH=${MINIZIP_INSTALL_DIR}
|
||||||
|
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
|
||||||
|
-DZLIB_INCLUDE_DIR:PATH=${ZLIB_INCLUDE_DIR}
|
||||||
|
-DZLIB_LIBRARY:FILEPATH=${ZLIB_LIBRARY}
|
||||||
|
- -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS} )
|
||||||
|
+ -DBUILD_SHARED_LIBS:BOOL=${MINIZIP_BUILD_SHARED_LIBS} )
|
||||||
|
|
||||||
|
if(MSVC)
|
||||||
|
include_project_vars(MINIZIP "minizip")
|
||||||
|
diff -rupN libkml-1.3.0/cmake/LibKMLHelper.cmake libkml-1.3.0-new/cmake/LibKMLHelper.cmake
|
||||||
|
--- libkml-1.3.0/cmake/LibKMLHelper.cmake 2015-12-21 18:23:05.000000000 +0100
|
||||||
|
+++ libkml-1.3.0-new/cmake/LibKMLHelper.cmake 2018-10-06 21:52:17.978906400 +0200
|
||||||
|
@@ -59,16 +59,16 @@ endfunction(build_example)
|
||||||
|
|
||||||
|
|
||||||
|
macro(include_project_vars _project _lib)
|
||||||
|
- set(${_project}_INCLUDE_DIR "${INSTALL_DIR}/include")
|
||||||
|
+ set(${_project}_INCLUDE_DIR "${${_project}_INSTALL_DIR}/include")
|
||||||
|
if(WIN32)
|
||||||
|
set(_suffix ${CMAKE_LINK_LIBRARY_SUFFIX})
|
||||||
|
else(UNIX)
|
||||||
|
- if(BUILD_SHARED_LIBS)
|
||||||
|
+ if(${${_project}_BUILD_SHARED_LIBS})
|
||||||
|
set(_suffix ${CMAKE_SHARED_LIBRARY_SUFFIX})
|
||||||
|
else()
|
||||||
|
set(_suffix ".a")
|
||||||
|
endif()
|
||||||
|
endif(WIN32)
|
||||||
|
- set(${_project}_LIBRARY "${INSTALL_DIR}/lib/${_lib}${_suffix}")
|
||||||
|
+ set(${_project}_LIBRARY "${${_project}_INSTALL_DIR}/lib/${_lib}${_suffix}")
|
||||||
|
include_directories(${${_project}_INCLUDE_DIR})
|
||||||
|
endmacro()
|
@ -0,0 +1,147 @@
|
|||||||
|
diff -rupN libkml-1.3.0/src/kml/base/contrib/minizip/crypt.h libkml-1.3.0-new/src/kml/base/contrib/minizip/crypt.h
|
||||||
|
--- libkml-1.3.0/src/kml/base/contrib/minizip/crypt.h 1970-01-01 01:00:00.000000000 +0100
|
||||||
|
+++ libkml-1.3.0-new/src/kml/base/contrib/minizip/crypt.h 2018-06-19 13:59:43.300760312 +0200
|
||||||
|
@@ -0,0 +1,131 @@
|
||||||
|
+/* crypt.h -- base code for crypt/uncrypt ZIPfile
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+ Version 1.01e, February 12th, 2005
|
||||||
|
+
|
||||||
|
+ Copyright (C) 1998-2005 Gilles Vollant
|
||||||
|
+
|
||||||
|
+ This code is a modified version of crypting code in Infozip distribution
|
||||||
|
+
|
||||||
|
+ The encryption/decryption parts of this source code (as opposed to the
|
||||||
|
+ non-echoing password parts) were originally written in Europe. The
|
||||||
|
+ whole source package can be freely distributed, including from the USA.
|
||||||
|
+ (Prior to January 2000, re-export from the US was a violation of US law.)
|
||||||
|
+
|
||||||
|
+ This encryption code is a direct transcription of the algorithm from
|
||||||
|
+ Roger Schlafly, described by Phil Katz in the file appnote.txt. This
|
||||||
|
+ file (appnote.txt) is distributed with the PKZIP program (even in the
|
||||||
|
+ version without encryption capabilities).
|
||||||
|
+
|
||||||
|
+ If you don't need crypting in your application, just define symbols
|
||||||
|
+ NOCRYPT and NOUNCRYPT.
|
||||||
|
+
|
||||||
|
+ This code support the "Traditional PKWARE Encryption".
|
||||||
|
+
|
||||||
|
+ The new AES encryption added on Zip format by Winzip (see the page
|
||||||
|
+ http://www.winzip.com/aes_info.htm ) and PKWare PKZip 5.x Strong
|
||||||
|
+ Encryption is not supported.
|
||||||
|
+*/
|
||||||
|
+
|
||||||
|
+#define CRC32(c, b) ((*(pcrc_32_tab+(((int)(c) ^ (b)) & 0xff))) ^ ((c) >> 8))
|
||||||
|
+
|
||||||
|
+/***********************************************************************
|
||||||
|
+ * Return the next byte in the pseudo-random sequence
|
||||||
|
+ */
|
||||||
|
+static int decrypt_byte(unsigned long* pkeys, const z_crc_t* pcrc_32_tab)
|
||||||
|
+{
|
||||||
|
+ unsigned temp; /* POTENTIAL BUG: temp*(temp^1) may overflow in an
|
||||||
|
+ * unpredictable manner on 16-bit systems; not a problem
|
||||||
|
+ * with any known compiler so far, though */
|
||||||
|
+
|
||||||
|
+ temp = ((unsigned)(*(pkeys+2)) & 0xffff) | 2;
|
||||||
|
+ return (int)(((temp * (temp ^ 1)) >> 8) & 0xff);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+/***********************************************************************
|
||||||
|
+ * Update the encryption keys with the next byte of plain text
|
||||||
|
+ */
|
||||||
|
+static int update_keys(unsigned long* pkeys,const z_crc_t* pcrc_32_tab,int c)
|
||||||
|
+{
|
||||||
|
+ (*(pkeys+0)) = CRC32((*(pkeys+0)), c);
|
||||||
|
+ (*(pkeys+1)) += (*(pkeys+0)) & 0xff;
|
||||||
|
+ (*(pkeys+1)) = (*(pkeys+1)) * 134775813L + 1;
|
||||||
|
+ {
|
||||||
|
+ register int keyshift = (int)((*(pkeys+1)) >> 24);
|
||||||
|
+ (*(pkeys+2)) = CRC32((*(pkeys+2)), keyshift);
|
||||||
|
+ }
|
||||||
|
+ return c;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+/***********************************************************************
|
||||||
|
+ * Initialize the encryption keys and the random header according to
|
||||||
|
+ * the given password.
|
||||||
|
+ */
|
||||||
|
+static void init_keys(const char* passwd,unsigned long* pkeys,const z_crc_t* pcrc_32_tab)
|
||||||
|
+{
|
||||||
|
+ *(pkeys+0) = 305419896L;
|
||||||
|
+ *(pkeys+1) = 591751049L;
|
||||||
|
+ *(pkeys+2) = 878082192L;
|
||||||
|
+ while (*passwd != '\0') {
|
||||||
|
+ update_keys(pkeys,pcrc_32_tab,(int)*passwd);
|
||||||
|
+ passwd++;
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+#define zdecode(pkeys,pcrc_32_tab,c) \
|
||||||
|
+ (update_keys(pkeys,pcrc_32_tab,c ^= decrypt_byte(pkeys,pcrc_32_tab)))
|
||||||
|
+
|
||||||
|
+#define zencode(pkeys,pcrc_32_tab,c,t) \
|
||||||
|
+ (t=decrypt_byte(pkeys,pcrc_32_tab), update_keys(pkeys,pcrc_32_tab,c), t^(c))
|
||||||
|
+
|
||||||
|
+#ifdef INCLUDECRYPTINGCODE_IFCRYPTALLOWED
|
||||||
|
+
|
||||||
|
+#define RAND_HEAD_LEN 12
|
||||||
|
+ /* "last resort" source for second part of crypt seed pattern */
|
||||||
|
+# ifndef ZCR_SEED2
|
||||||
|
+# define ZCR_SEED2 3141592654UL /* use PI as default pattern */
|
||||||
|
+# endif
|
||||||
|
+
|
||||||
|
+static int crypthead(const char* passwd, /* password string */
|
||||||
|
+ unsigned char* buf, /* where to write header */
|
||||||
|
+ int bufSize,
|
||||||
|
+ unsigned long* pkeys,
|
||||||
|
+ const z_crc_t* pcrc_32_tab,
|
||||||
|
+ unsigned long crcForCrypting)
|
||||||
|
+{
|
||||||
|
+ int n; /* index in random header */
|
||||||
|
+ int t; /* temporary */
|
||||||
|
+ int c; /* random byte */
|
||||||
|
+ unsigned char header[RAND_HEAD_LEN-2]; /* random header */
|
||||||
|
+ static unsigned calls = 0; /* ensure different random header each time */
|
||||||
|
+
|
||||||
|
+ if (bufSize<RAND_HEAD_LEN)
|
||||||
|
+ return 0;
|
||||||
|
+
|
||||||
|
+ /* First generate RAND_HEAD_LEN-2 random bytes. We encrypt the
|
||||||
|
+ * output of rand() to get less predictability, since rand() is
|
||||||
|
+ * often poorly implemented.
|
||||||
|
+ */
|
||||||
|
+ if (++calls == 1)
|
||||||
|
+ {
|
||||||
|
+ srand((unsigned)(time(NULL) ^ ZCR_SEED2));
|
||||||
|
+ }
|
||||||
|
+ init_keys(passwd, pkeys, pcrc_32_tab);
|
||||||
|
+ for (n = 0; n < RAND_HEAD_LEN-2; n++)
|
||||||
|
+ {
|
||||||
|
+ c = (rand() >> 7) & 0xff;
|
||||||
|
+ header[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, c, t);
|
||||||
|
+ }
|
||||||
|
+ /* Encrypt random header (last two bytes is high word of crc) */
|
||||||
|
+ init_keys(passwd, pkeys, pcrc_32_tab);
|
||||||
|
+ for (n = 0; n < RAND_HEAD_LEN-2; n++)
|
||||||
|
+ {
|
||||||
|
+ buf[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, header[n], t);
|
||||||
|
+ }
|
||||||
|
+ buf[n++] = (unsigned char)zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 16) & 0xff, t);
|
||||||
|
+ buf[n++] = (unsigned char)zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 24) & 0xff, t);
|
||||||
|
+ return n;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+#endif
|
||||||
|
diff -rupN libkml-1.3.0/src/kml/base/contrib/minizip/unzip.c libkml-1.3.0-new/src/kml/base/contrib/minizip/unzip.c
|
||||||
|
--- libkml-1.3.0/src/kml/base/contrib/minizip/unzip.c 2015-12-21 18:23:05.000000000 +0100
|
||||||
|
+++ libkml-1.3.0-new/src/kml/base/contrib/minizip/unzip.c 2018-06-19 14:00:07.633758966 +0200
|
||||||
|
@@ -180,7 +180,7 @@ void init_unz_s(unz_s* un)
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifndef NOUNCRYPT
|
||||||
|
-#include <minizip/crypt.h>
|
||||||
|
+#include "crypt.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* ===========================================================================
|
@ -0,0 +1,24 @@
|
|||||||
|
diff -rupN libkml-1.3.0/src/swig/CMakeLists.txt libkml-1.3.0-new/src/swig/CMakeLists.txt
|
||||||
|
--- libkml-1.3.0/src/swig/CMakeLists.txt 2015-12-21 18:23:05.000000000 +0100
|
||||||
|
+++ libkml-1.3.0-new/src/swig/CMakeLists.txt 2017-08-07 21:26:23.717928168 +0200
|
||||||
|
@@ -23,12 +23,6 @@ if(WITH_PYTHON)
|
||||||
|
set_source_files_properties( ${CMAKE_CURRENT_BINARY_DIR}/${MODULE_NAME}PYTHON_wrap.cxx COMPILE_FLAGS "-Wno-long-long" )
|
||||||
|
swig_add_module(${MODULE_NAME} python ${INTERFACE_FILE})
|
||||||
|
swig_link_libraries(${MODULE_NAME} kmlbase kmlengine kmldom ${PYTHON_LIBRARIES})
|
||||||
|
- add_custom_command(
|
||||||
|
- TARGET _${MODULE_NAME}
|
||||||
|
- POST_BUILD
|
||||||
|
- COMMAND ${CMAKE_COMMAND} -E echo "Byte-compiling ${MODULE_NAME}.py"
|
||||||
|
- COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/cmake/pycompile.py ${CMAKE_CURRENT_BINARY_DIR}/${MODULE_NAME}.py
|
||||||
|
- DEPENDS kmlbase kmlengine kmldom)
|
||||||
|
|
||||||
|
install(TARGETS
|
||||||
|
_${MODULE_NAME}
|
||||||
|
@@ -36,7 +30,6 @@ if(WITH_PYTHON)
|
||||||
|
|
||||||
|
install(FILES
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/${MODULE_NAME}.py
|
||||||
|
- ${CMAKE_CURRENT_BINARY_DIR}/${MODULE_NAME}.pyc
|
||||||
|
DESTINATION ${PYTHON_INSTALL_DIR})
|
||||||
|
|
||||||
|
endforeach()
|
@ -0,0 +1,47 @@
|
|||||||
|
diff -rupN libkml-1.3.0/src/kml/base/file_win32.cc libkml-1.3.0-new/src/kml/base/file_win32.cc
|
||||||
|
--- libkml-1.3.0/src/kml/base/file_win32.cc 2015-12-21 18:23:05.000000000 +0100
|
||||||
|
+++ libkml-1.3.0-new/src/kml/base/file_win32.cc 2017-10-30 11:45:08.434800533 +0100
|
||||||
|
@@ -34,7 +34,6 @@
|
||||||
|
#include "kml/base/file.h"
|
||||||
|
#include <windows.h>
|
||||||
|
#include <tchar.h>
|
||||||
|
-#include <xstring>
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
|
namespace kmlbase {
|
||||||
|
@@ -42,7 +41,7 @@ namespace kmlbase {
|
||||||
|
// Internal to the win32 file class. We need a conversion from string to
|
||||||
|
// LPCWSTR.
|
||||||
|
static std::wstring Str2Wstr(const string& str) {
|
||||||
|
- std::wstring wstr(str.length(), L'');
|
||||||
|
+ std::wstring wstr(str.length(), '\0');
|
||||||
|
std::copy(str.begin(), str.end(), wstr.begin());
|
||||||
|
return wstr;
|
||||||
|
}
|
||||||
|
@@ -62,7 +61,7 @@ bool File::Exists(const string& full_pat
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
std::wstring wstr = Str2Wstr(full_path);
|
||||||
|
- DWORD attrs = ::GetFileAttributes(wstr.c_str());
|
||||||
|
+ DWORD attrs = ::GetFileAttributesW(wstr.c_str());
|
||||||
|
return (attrs != INVALID_FILE_ATTRIBUTES) &&
|
||||||
|
((attrs & FILE_ATTRIBUTE_DIRECTORY) == 0);
|
||||||
|
}
|
||||||
|
@@ -72,7 +71,7 @@ bool File::Delete(const string& filepath
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
std::wstring wstr = Str2Wstr(filepath);
|
||||||
|
- return ::DeleteFile(wstr.c_str()) ? true : false;
|
||||||
|
+ return ::DeleteFileW(wstr.c_str()) ? true : false;
|
||||||
|
}
|
||||||
|
|
||||||
|
static const unsigned int BUFSIZE = 1024;
|
||||||
|
@@ -97,7 +96,7 @@ bool File::CreateNewTempFile(string* pat
|
||||||
|
if (uRetVal == 0) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
- string str = Wstr2Str(szTempName);
|
||||||
|
+ string str = szTempName;
|
||||||
|
path->assign(str.c_str(), strlen(str.c_str()));
|
||||||
|
return true;
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
diff -rupN libkml-1.3.0/tests/kml/base/string_util_test.cc libkml-1.3.0-new/tests/kml/base/string_util_test.cc
|
||||||
|
--- libkml-1.3.0/tests/kml/base/string_util_test.cc 2015-12-21 18:23:05.000000000 +0100
|
||||||
|
+++ libkml-1.3.0-new/tests/kml/base/string_util_test.cc 2019-10-30 09:40:53.040877025 +0100
|
||||||
|
@@ -33,7 +33,7 @@ TEST(StringUtilTest, Testb2a_hex) {
|
||||||
|
const uint32_t kff = 0xff;
|
||||||
|
|
||||||
|
const char* e = "00";
|
||||||
|
- static char a[2];
|
||||||
|
+ static char a[3];
|
||||||
|
|
||||||
|
b2a_hex(k00, a);
|
||||||
|
ASSERT_EQ(0, strcmp(e, a));
|
@ -0,0 +1,439 @@
|
|||||||
|
# Parallel build broken
|
||||||
|
%global _smp_mflags -j1
|
||||||
|
|
||||||
|
%bcond_with java
|
||||||
|
|
||||||
|
%if 0%{?fedora}
|
||||||
|
%bcond_without mingw
|
||||||
|
%else
|
||||||
|
%bcond_with mingw
|
||||||
|
%endif
|
||||||
|
|
||||||
|
Name: libkml
|
||||||
|
Version: 1.3.0
|
||||||
|
Release: 41%{?dist}
|
||||||
|
Summary: Reference implementation of OGC KML 2.2
|
||||||
|
|
||||||
|
License: BSD
|
||||||
|
URL: https://github.com/libkml/libkml
|
||||||
|
Source0: https://github.com/libkml/libkml/archive/%{version}/libkml-%{version}.tar.gz
|
||||||
|
# TODO: Port to minizip-2.x, meanwhile bundle version 1.3.0
|
||||||
|
# wget -O minizip-1.3.0.tar.gz http://sourceforge.net/projects/libkml-files/files/1.3.0/minizip.tar.gz/download
|
||||||
|
Source1: minizip-1.3.0.tar.gz
|
||||||
|
|
||||||
|
## See https://github.com/libkml/libkml/pull/239
|
||||||
|
Patch0: 0001-Fix-build-failure-due-to-failure-to-convert-pointer-.patch
|
||||||
|
Patch1: 0002-Fix-mistaken-use-of-std-cerr-instead-of-std-endl.patch
|
||||||
|
Patch2: 0003-Fix-python-tests.patch
|
||||||
|
Patch3: 0004-Correctly-build-and-run-java-test.patch
|
||||||
|
# Fix a fragile test failing on i686
|
||||||
|
Patch4: fragile_test.patch
|
||||||
|
# Don't bytecompile python sources as part of build process, leave it to rpmbuild
|
||||||
|
Patch5: libkml_dont-bytecompile.patch
|
||||||
|
# Add crypt.h which was removed from Fedora minizip package (see #1424609)
|
||||||
|
Patch6: libkml_crypth.patch
|
||||||
|
# Use local file for bundled minizip
|
||||||
|
Patch7: libkml-bundle-minizip.patch
|
||||||
|
# Fix possible OOB array access in strcmp due to undersized array
|
||||||
|
Patch8: libkml_test_strcmp.patch
|
||||||
|
# MinGW build fixes
|
||||||
|
Patch9: libkml_mingw.patch
|
||||||
|
|
||||||
|
BuildRequires: cmake
|
||||||
|
BuildRequires: curl-devel
|
||||||
|
BuildRequires: boost-devel
|
||||||
|
BuildRequires: expat-devel
|
||||||
|
BuildRequires: gtest-devel
|
||||||
|
BuildRequires: gcc-c++
|
||||||
|
BuildRequires: make
|
||||||
|
BuildRequires: python3-devel
|
||||||
|
BuildRequires: swig
|
||||||
|
BuildRequires: uriparser-devel
|
||||||
|
BuildRequires: zlib-devel
|
||||||
|
%if %{with java}
|
||||||
|
BuildRequires: java-devel
|
||||||
|
BuildRequires: junit
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with mingw}
|
||||||
|
BuildRequires: mingw32-filesystem >= 95
|
||||||
|
BuildRequires: mingw32-gcc-c++
|
||||||
|
BuildRequires: mingw32-boost
|
||||||
|
BuildRequires: mingw32-curl
|
||||||
|
BuildRequires: mingw32-expat
|
||||||
|
BuildRequires: mingw32-python3
|
||||||
|
BuildRequires: mingw32-uriparser
|
||||||
|
BuildRequires: mingw32-zlib
|
||||||
|
|
||||||
|
BuildRequires: mingw64-filesystem >= 95
|
||||||
|
BuildRequires: mingw64-gcc-c++
|
||||||
|
BuildRequires: mingw64-boost
|
||||||
|
BuildRequires: mingw64-curl
|
||||||
|
BuildRequires: mingw64-expat
|
||||||
|
BuildRequires: mingw64-python3
|
||||||
|
BuildRequires: mingw64-uriparser
|
||||||
|
BuildRequires: mingw64-zlib
|
||||||
|
%endif
|
||||||
|
|
||||||
|
Provides: bundled(minizip) = 1.3.0
|
||||||
|
|
||||||
|
%global __requires_exclude_from ^%{_docdir}/.*$
|
||||||
|
%global __provides_exclude_from ^%{python3_sitearch}/.*\\.so$
|
||||||
|
|
||||||
|
|
||||||
|
%description
|
||||||
|
Reference implementation of OGC KML 2.2.
|
||||||
|
It also includes implementations of Google's gx: extensions used by Google
|
||||||
|
Earth, as well as several utility libraries for working with other formats.
|
||||||
|
|
||||||
|
|
||||||
|
%package -n python3-%{name}
|
||||||
|
Summary: Python 3 bindings for %{name}
|
||||||
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
|
%{?python_provide:%python_provide python3-%{name}}
|
||||||
|
|
||||||
|
%description -n python3-%{name}
|
||||||
|
The python3-%{name} package contains Python 3 bindings for %{name}.
|
||||||
|
|
||||||
|
|
||||||
|
%if %{with java}
|
||||||
|
%package java
|
||||||
|
Summary: Java bindings for %{name}
|
||||||
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
|
%description java
|
||||||
|
The %{name}-java package contains Java bindings for %{name}.
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
Summary: Development files for %{name}
|
||||||
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
|
Requires: boost-devel
|
||||||
|
Requires: expat-devel
|
||||||
|
|
||||||
|
%description devel
|
||||||
|
The %{name}-devel package contains libraries and header files for
|
||||||
|
developing applications that use %{name}.
|
||||||
|
|
||||||
|
%if %{with mingw}
|
||||||
|
%package -n mingw32-%{name}
|
||||||
|
Summary: MinGW Windows %{name} library
|
||||||
|
Requires: mingw32-boost
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description -n mingw32-%{name}
|
||||||
|
MinGW Windows %{name} library.
|
||||||
|
|
||||||
|
|
||||||
|
%package -n mingw32-python3-%{name}
|
||||||
|
Summary: MinGW Windows Python 3 %{name} library
|
||||||
|
Requires: mingw32-%{name} = %{version}-%{release}
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description -n mingw32-python3-%{name}
|
||||||
|
MinGW Windows Python 3 %{name} library.
|
||||||
|
|
||||||
|
|
||||||
|
%package -n mingw64-%{name}
|
||||||
|
Summary: MinGW Windows %{name} library
|
||||||
|
Requires: mingw64-boost
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description -n mingw64-%{name}
|
||||||
|
MinGW Windows %{name} library.
|
||||||
|
|
||||||
|
|
||||||
|
%package -n mingw64-python3-%{name}
|
||||||
|
Summary: MinGW Windows Python 3 %{name} library
|
||||||
|
Requires: mingw64-%{name} = %{version}-%{release}
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description -n mingw64-python3-%{name}
|
||||||
|
MinGW Windows Python 3 %{name} library.
|
||||||
|
|
||||||
|
|
||||||
|
%{?mingw_debug_package}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -p1 -a1
|
||||||
|
|
||||||
|
|
||||||
|
%build
|
||||||
|
# Build bundled minizip
|
||||||
|
pushd minizip
|
||||||
|
(
|
||||||
|
%cmake -DBUILD_SHARED_LIBS=OFF
|
||||||
|
%cmake_build
|
||||||
|
)
|
||||||
|
|
||||||
|
%if %{with mingw}
|
||||||
|
(
|
||||||
|
%mingw_cmake -DBUILD_SHARED_LIBS=OFF
|
||||||
|
%mingw_make_build
|
||||||
|
)
|
||||||
|
%endif
|
||||||
|
popd
|
||||||
|
|
||||||
|
# Native build
|
||||||
|
%cmake -DWITH_SWIG=ON -DWITH_PYTHON=ON \
|
||||||
|
%if %{with java}
|
||||||
|
-DWITH_JAVA=ON -DJNI_INSTALL_DIR=%{_libdir}/%{name} \
|
||||||
|
%endif
|
||||||
|
-DCMAKE_INSTALL_DIR=%{_libdir}/cmake/%{name} \
|
||||||
|
-DINCLUDE_INSTALL_DIR=%{_includedir}/kml \
|
||||||
|
-DPYTHON_LIBRARY=%{_libdir}/libpython%{python3_version}$(python3-config --abiflags).so \
|
||||||
|
-DPYTHON_INCLUDE_DIR=%{_includedir}/python%{python3_version}$(python3-config --abiflags)/ \
|
||||||
|
-DPYTHON_INSTALL_DIR=%{python3_sitearch} \
|
||||||
|
-DMINIZIP_INCLUDE_DIR=$PWD -DMINIZIP_LIBRARY=$PWD/minizip/%{_vpath_builddir}/libminizip.a \
|
||||||
|
-DBUILD_TESTING=ON \
|
||||||
|
-DBUILD_EXAMPLES=ON
|
||||||
|
%cmake_build
|
||||||
|
|
||||||
|
%if %{with mingw}
|
||||||
|
export MINGW32_CMAKE_ARGS="\
|
||||||
|
-DCMAKE_INSTALL_DIR=%{mingw32_libdir}/cmake/%{name} \
|
||||||
|
-DINCLUDE_INSTALL_DIR=%{mingw32_includedir}/kml \
|
||||||
|
-DPYTHON_LIBRARY=%{mingw32_libdir}/libpython%{mingw32_python3_version}.dll.a \
|
||||||
|
-DPYTHON_INCLUDE_DIR=%{mingw32_includedir}/python%{mingw32_python3_version}/ \
|
||||||
|
-DPYTHON_INSTALL_DIR=%{mingw32_python3_sitearch} \
|
||||||
|
-DMINIZIP_INCLUDE_DIR=$PWD -DMINIZIP_LIBRARY=$PWD/minizip/build_win32/libminizip.a"
|
||||||
|
|
||||||
|
export MINGW64_CMAKE_ARGS="\
|
||||||
|
-DCMAKE_INSTALL_DIR=%{mingw64_libdir}/cmake/%{name} \
|
||||||
|
-DINCLUDE_INSTALL_DIR=%{mingw64_includedir}/kml \
|
||||||
|
-DPYTHON_LIBRARY=%{mingw64_libdir}/libpython%{mingw64_python3_version}.dll.a \
|
||||||
|
-DPYTHON_INCLUDE_DIR=%{mingw64_includedir}/python%{mingw64_python3_version}/ \
|
||||||
|
-DPYTHON_INSTALL_DIR=%{mingw64_python3_sitearch} \
|
||||||
|
-DMINIZIP_INCLUDE_DIR=$PWD -DMINIZIP_LIBRARY=$PWD/minizip/build_win64/libminizip.a"
|
||||||
|
|
||||||
|
# MinGW build
|
||||||
|
%mingw_cmake -DWITH_SWIG=ON -DWITH_PYTHON=ON \
|
||||||
|
-DBUILD_TESTING=OFF \
|
||||||
|
-DBUILD_EXAMPLES=OFF
|
||||||
|
%mingw_make_build
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%install
|
||||||
|
%cmake_install
|
||||||
|
|
||||||
|
%if %{with mingw}
|
||||||
|
%mingw_make_install
|
||||||
|
%mingw_debug_install_post
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%check
|
||||||
|
%ctest
|
||||||
|
|
||||||
|
|
||||||
|
%files
|
||||||
|
%license LICENSE
|
||||||
|
%doc AUTHORS README.md
|
||||||
|
%{_libdir}/libkml*.so.*
|
||||||
|
|
||||||
|
%files -n python3-%{name}
|
||||||
|
%{python3_sitearch}/*.so
|
||||||
|
%{python3_sitearch}/*.py
|
||||||
|
%{python3_sitearch}/__pycache__/*.pyc
|
||||||
|
|
||||||
|
%if %{with java}
|
||||||
|
%files java
|
||||||
|
%{_javadir}/LibKML.jar
|
||||||
|
%{_libdir}/%{name}/
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%doc examples
|
||||||
|
%{_includedir}/kml/
|
||||||
|
%{_libdir}/libkml*.so
|
||||||
|
%{_libdir}/pkgconfig/%{name}.pc
|
||||||
|
%{_libdir}/cmake/%{name}/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
%if %{with mingw}
|
||||||
|
%files -n mingw32-%{name}
|
||||||
|
%license LICENSE
|
||||||
|
%{mingw32_bindir}/%{name}*.dll
|
||||||
|
%{mingw32_includedir}/kml/
|
||||||
|
%{mingw32_libdir}/%{name}*.dll.a
|
||||||
|
%{mingw32_libdir}/pkgconfig/%{name}.pc
|
||||||
|
%{mingw32_libdir}/cmake/%{name}/
|
||||||
|
|
||||||
|
%files -n mingw32-python3-%{name}
|
||||||
|
%{mingw32_python3_sitearch}/*.py*
|
||||||
|
|
||||||
|
%files -n mingw64-%{name}
|
||||||
|
%license LICENSE
|
||||||
|
%{mingw64_bindir}/%{name}*.dll
|
||||||
|
%{mingw64_includedir}/kml/
|
||||||
|
%{mingw64_libdir}/%{name}*.dll.a
|
||||||
|
%{mingw64_libdir}/pkgconfig/%{name}.pc
|
||||||
|
%{mingw64_libdir}/cmake/%{name}/
|
||||||
|
|
||||||
|
%files -n mingw64-python3-%{name}
|
||||||
|
%{mingw64_python3_sitearch}/*.py*
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Wed Jan 10 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 1.3.0-41
|
||||||
|
- Rebuilt for MSVSphere 9.3
|
||||||
|
|
||||||
|
* Sat Sep 25 2022 Tom Rix <trix@redhat.com> - 1.3.0-41
|
||||||
|
- Add mingw build conditional
|
||||||
|
|
||||||
|
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-40
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 1.3.0-39
|
||||||
|
- Rebuilt for Python 3.11
|
||||||
|
|
||||||
|
* Fri Mar 25 2022 Sandro Mani <manisandro@gmail.com> - 1.3.0-38
|
||||||
|
- Rebuild with mingw-gcc-12
|
||||||
|
|
||||||
|
* Thu Feb 24 2022 Sandro Mani <manisandro@gmail.com> - 1.3.0-37
|
||||||
|
- Make mingw subpackages noarch
|
||||||
|
|
||||||
|
* Mon Feb 21 2022 Sandro Mani <manisandro@gmail.com> - 1.3.0-36
|
||||||
|
- Add mingw subpackages
|
||||||
|
|
||||||
|
* Sat Feb 05 2022 Jiri Vanek <jvanek@redhat.com> - 1.3.0-35
|
||||||
|
- Rebuilt for java-17-openjdk as system jdk
|
||||||
|
|
||||||
|
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-34
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-33
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sat Jun 12 2021 Sandro Mani <manisandro@gmail.com> - 1.3.0-31
|
||||||
|
- Disable java build for now
|
||||||
|
|
||||||
|
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 1.3.0-31
|
||||||
|
- Rebuilt for Python 3.10
|
||||||
|
|
||||||
|
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-30
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-28
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sat Jul 11 2020 Jiri Vanek <jvanek@redhat.com> - 1.3.0-27
|
||||||
|
- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11
|
||||||
|
|
||||||
|
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1.3.0-26
|
||||||
|
- Rebuilt for Python 3.9
|
||||||
|
|
||||||
|
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-25
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Oct 30 2019 Sandro Mani <manisandro@gmail.com> - 1.3.0-24
|
||||||
|
- Fix possible OOB array access in strcmp due to undersized array
|
||||||
|
|
||||||
|
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1.3.0-23
|
||||||
|
- Rebuilt for Python 3.8.0rc1 (#1748018)
|
||||||
|
|
||||||
|
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1.3.0-22
|
||||||
|
- Rebuilt for Python 3.8
|
||||||
|
|
||||||
|
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-21
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Jun 03 2019 Sandro Mani <manisandro@gmail.com> - 1.3.0-20
|
||||||
|
- Don't hard-code abi flags
|
||||||
|
|
||||||
|
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-19
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jan 23 2019 Björn Esser <besser82@fedoraproject.org> - 1.3.0-18
|
||||||
|
- Append curdir to CMake invokation. (#1668512)
|
||||||
|
|
||||||
|
* Fri Oct 05 2018 Sandro Mani <manisandro@gmail.com> - 1.3.0-17
|
||||||
|
- Statically link against bundled minizip
|
||||||
|
|
||||||
|
* Thu Oct 04 2018 Sandro Mani <manisandro@gmail.com> - 1.3.0-16
|
||||||
|
- Drop python2 subpackage (#1634846)
|
||||||
|
- Bundle minizip (#1632186)
|
||||||
|
- Remove obsolete scriptlets
|
||||||
|
|
||||||
|
* Tue Aug 28 2018 Patrik Novotný <panovotn@redhat.com> - 1.3.0-15
|
||||||
|
- change requires to minizip-compat(-devel), rhbz#1609830, rhbz#1615381
|
||||||
|
|
||||||
|
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-14
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 1.3.0-13
|
||||||
|
- Rebuilt for Python 3.7
|
||||||
|
|
||||||
|
* Tue Jun 19 2018 Sandro Mani <manisandro@gmail.com> - 1.3.0-12
|
||||||
|
- Locally add crypt.h from minizip, which was removed in minizip-devel (see #1424609)
|
||||||
|
|
||||||
|
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 1.3.0-11
|
||||||
|
- Rebuilt for Python 3.7
|
||||||
|
|
||||||
|
* Sun Feb 18 2018 Sandro Mani <manisandro@gmail.com> - 1.3.0-10
|
||||||
|
- Add missing BR: gcc-c++, make
|
||||||
|
|
||||||
|
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-9
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Aug 07 2017 Sandro Mani <manisandro@gmail.com> - 1.3.0-8
|
||||||
|
- Workaround armv7hl FTBFS
|
||||||
|
- Add python3 bindings
|
||||||
|
|
||||||
|
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-7
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-6
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Jul 18 2017 Jonathan Wakely <jwakely@redhat.com> - 1.3.0-5
|
||||||
|
- Rebuilt for Boost 1.64
|
||||||
|
|
||||||
|
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.0-3
|
||||||
|
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
|
||||||
|
|
||||||
|
* Fri Apr 08 2016 Sandro Mani <manisandro@gmail.com> - 1.3.0-2
|
||||||
|
- Don't call it Google's reference implementation in Summary/Description
|
||||||
|
- Update Source URL
|
||||||
|
- Add python_provide macro
|
||||||
|
- Enable tests
|
||||||
|
|
||||||
|
* Thu Mar 31 2016 Sandro Mani <manisandro@gmail.com> - 1.3.0-1
|
||||||
|
- Update to 1.3.0
|
||||||
|
|
||||||
|
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.1-8
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Aug 02 2010 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 0.6.1-7
|
||||||
|
- Fix gcc warning that lead to failure due to -Werror flag
|
||||||
|
|
||||||
|
* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 0.6.1-6
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
|
||||||
|
|
||||||
|
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.1-5
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sun Apr 12 2009 Rakesh Pandit <rakesh@fedoraproject.org> 0.6.1-4
|
||||||
|
- Included *pyc and pyo files in %%files and added BuildRequires libgcj-devel.
|
||||||
|
|
||||||
|
* Sun Apr 12 2009 Rakesh Pandit <rakesh@fedoraproject.org> 0.6.1-3
|
||||||
|
- libkml-0.6.1.configure_ac.patch patch for swig > 1.3.35
|
||||||
|
|
||||||
|
* Sat Mar 07 2009 Rakesh Pandit <rakesh@fedoraproject.org> 0.6.1-2
|
||||||
|
- updated to 0.6.1
|
||||||
|
- libkml-third_party_removal.diff Removes third part dependency
|
||||||
|
- (provided by Peter Lemenkov)
|
||||||
|
|
||||||
|
* Fri Jan 16 2009 Rakesh Pandit <rakesh@fedoraproject.org> 0.6.1-1
|
||||||
|
- Updated to 0.6.1
|
||||||
|
|
||||||
|
* Mon Oct 06 2008 Rakesh Pandit <rakesh@fedoraproject.org> 0.4.0-2
|
||||||
|
- Added >= 1.3.35 for swing
|
||||||
|
|
||||||
|
* Sat Aug 09 2008 Rakesh Pandit <rakesh@fedoraproject.org> 0.4.0-1
|
||||||
|
- Initial package
|
Loading…
Reference in new issue