From 244019a4cb6dca8cc3efadbe0275d8d699060c39 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Sat, 28 Jan 2017 17:58:55 +0100 Subject: [PATCH] - added nocxx patch (disable cmake check for C++ compiler) - added nodocs patch (disable pdf rebuilding) - pass libjpeg path to fix build when native libjpeg-static is installed - release 2 --- crossmingw32-jasper.spec | 9 +++++++-- jasper-nocxx.patch | 10 ++++++++++ jasper-nodocs.patch | 24 ++++++++++++++++++++++++ 3 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 jasper-nocxx.patch create mode 100644 jasper-nodocs.patch diff --git a/crossmingw32-jasper.spec b/crossmingw32-jasper.spec index 3b9a908..2d98ebc 100644 --- a/crossmingw32-jasper.spec +++ b/crossmingw32-jasper.spec @@ -2,13 +2,15 @@ Summary: JasPer library for images manipulation - MinGW32 cross version Summary(pl.UTF-8): Biblioteka JasPer do obróbki obrazów - wersja skrośna dla MinGW32 Name: crossmingw32-jasper Version: 2.0.10 -Release: 1 +Release: 2 License: BSD-like Group: Development/Libraries #Source0Download: http://www.ece.uvic.ca/~frodo/jasper/#download Source0: http://www.ece.uvic.ca/~frodo/jasper/software/jasper-%{version}.tar.gz # Source0-md5: 06882adcf92524eb493f3cf0d3f62c9a Patch0: %{name}-libname.patch +Patch1: jasper-nocxx.patch +Patch2: jasper-nodocs.patch URL: http://www.ece.uvic.ca/~frodo/jasper/ BuildRequires: cmake >= 2.8.11 BuildRequires: crossmingw32-gcc @@ -72,6 +74,8 @@ Biblioteka DLL JasPer dla Windows. %prep %setup -q -n jasper-%{version} %patch0 -p1 +%patch1 -p1 +%patch2 -p1 %build # there is upstream directory named "build", use different name @@ -84,7 +88,8 @@ cd builddir -DCMAKE_SYSTEM_NAME=Windows \ -DJAS_ENABLE_AUTOMATIC_DEPENDENCIES=FALSE \ -DJAS_ENABLE_OPENGL=FALSE \ - -DJPEG_INCLUDE_DIR:PATH=%{_includedir} + -DJPEG_INCLUDE_DIR:PATH=%{_includedir} \ + -DJPEG_LIBRARY=%{_libdir}/libjpeg.dll.a %{__make} diff --git a/jasper-nocxx.patch b/jasper-nocxx.patch new file mode 100644 index 0000000..1f4c7d0 --- /dev/null +++ b/jasper-nocxx.patch @@ -0,0 +1,10 @@ +--- jasper-2.0.10/CMakeLists.txt.orig 2016-12-30 17:53:52.000000000 +0100 ++++ jasper-2.0.10/CMakeLists.txt 2017-01-28 10:34:17.024052784 +0100 +@@ -1,6 +1,6 @@ + cmake_minimum_required (VERSION 2.8.11) + +-project(JasPer) ++project(JasPer C) + + set(CMAKE_MODULE_PATH + ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/build/cmake/modules/") diff --git a/jasper-nodocs.patch b/jasper-nodocs.patch new file mode 100644 index 0000000..757d4c2 --- /dev/null +++ b/jasper-nodocs.patch @@ -0,0 +1,24 @@ +--- jasper-2.0.10/CMakeLists.txt.orig 2017-01-28 10:34:43.965367577 +0100 ++++ jasper-2.0.10/CMakeLists.txt 2017-01-28 10:38:07.115281724 +0100 +@@ -197,19 +197,10 @@ + # Perform plaform checks. + ################################################################################ + +-find_package(Doxygen) +-find_package(LATEX COMPONENTS PDFLATEX) + find_program(BASH_PROGRAM bash) + +-# On some (or maybe all?) systems, LATEX_FOUND is not set by FindLATEX. +-# So, instead, rely on LATEX_PDFLATEX_FOUND. +-message("PDFLATEX_COMPILER: ${PDFLATEX_COMPILER}") +-if ((NOT LATEX_FOUND) AND PDFLATEX_COMPILER) +- message(WARNING "Setting LATEX_FOUND to true.") +- message(WARNING "Your version of CMake may be buggy.") +- set(LATEX_FOUND true) +-endif() +-message("LATEX_FOUND ${LATEX_FOUND}") ++set(DOXYGEN_FOUND false) ++set(LATEX_FOUND false) + + check_include_files(fcntl.h JAS_HAVE_FCNTL_H) + check_include_files(io.h JAS_HAVE_IO_H) -- 2.43.0