Use system copy of qtiocompressor
This commit is contained in:
parent
7bcd80bdaf
commit
2462c6c58f
|
@ -0,0 +1,82 @@
|
|||
diff -up mmapper-2.1.0-source/CMakeLists.txt.system_qtiocompressor mmapper-2.1.0-source/CMakeLists.txt
|
||||
--- mmapper-2.1.0-source/CMakeLists.txt.system_qtiocompressor 2010-08-22 23:25:23.000000000 +0300
|
||||
+++ mmapper-2.1.0-source/CMakeLists.txt 2010-08-23 10:20:30.369359972 +0300
|
||||
@@ -9,6 +9,18 @@ include(${QT_USE_FILE})
|
||||
|
||||
find_package(OpenGL REQUIRED)
|
||||
|
||||
+# try to find system copy of qtiocompressor
|
||||
+find_path(QTIOCOMPRESSOR_INCLUDE_DIRS qtiocompressor.h PATH_SUFFIXES QtSolutions)
|
||||
+find_library(QTIOCOMPRESSOR_LIBRARIES QtSolutions_IOCompressor-2.3)
|
||||
+if (QTIOCOMPRESSOR_INCLUDE_DIRS AND QTIOCOMPRESSOR_LIBRARIES)
|
||||
+ message(STATUS "Found QtIOCompressor: ${QTIOCOMPRESSOR_LIBRARIES}")
|
||||
+else()
|
||||
+ message(STATUS "QtIOCompressor not found; using bundled copy.")
|
||||
+ add_subdirectory(src/3rdparty)
|
||||
+ set(QTIOCOMPRESSOR_INCLUDE_DIRS ${PROJECT_SOURCE_DIR}/src/3rdparty)
|
||||
+ set(QTIOCOMPRESSOR_LIBRARIES qtiocompressor)
|
||||
+endif()
|
||||
+
|
||||
if (NOT MINGW)
|
||||
find_package(ZLIB REQUIRED)
|
||||
else (NOT MINGW)
|
||||
diff -up mmapper-2.1.0-source/src/3rdparty/CMakeLists.txt.system_qtiocompressor mmapper-2.1.0-source/src/3rdparty/CMakeLists.txt
|
||||
--- mmapper-2.1.0-source/src/3rdparty/CMakeLists.txt.system_qtiocompressor 2010-08-23 10:19:54.542587698 +0300
|
||||
+++ mmapper-2.1.0-source/src/3rdparty/CMakeLists.txt 2010-08-23 10:19:54.542587698 +0300
|
||||
@@ -0,0 +1,14 @@
|
||||
+set(qtiocompressor_SRCS
|
||||
+ qtiocompressor.cpp
|
||||
+)
|
||||
+
|
||||
+set(qtiocompressor_MOC_HDRS
|
||||
+ qtiocompressor.h
|
||||
+)
|
||||
+
|
||||
+QT4_WRAP_CPP(qtiocompressor_MOC_SRCS ${qtiocompressor_MOC_HDRS})
|
||||
+
|
||||
+ADD_LIBRARY(qtiocompressor STATIC
|
||||
+ ${qtiocompressor_SRCS}
|
||||
+ ${qtiocompressor_MOC_SRCS}
|
||||
+)
|
||||
diff -up mmapper-2.1.0-source/src/CMakeLists.txt.system_qtiocompressor mmapper-2.1.0-source/src/CMakeLists.txt
|
||||
--- mmapper-2.1.0-source/src/CMakeLists.txt.system_qtiocompressor 2010-08-22 23:25:23.000000000 +0300
|
||||
+++ mmapper-2.1.0-source/src/CMakeLists.txt 2010-08-23 10:19:54.542587698 +0300
|
||||
@@ -1,6 +1,5 @@
|
||||
set(mmapper_SRCS
|
||||
main.cpp
|
||||
- 3rdparty/qtiocompressor.cpp
|
||||
configuration/configuration.cpp
|
||||
display/connectionselection.cpp
|
||||
display/mapcanvas.cpp
|
||||
@@ -95,7 +94,6 @@ if (APPLE)
|
||||
endif (APPLE)
|
||||
|
||||
set(mmapper_MOC_HDRS
|
||||
- 3rdparty/qtiocompressor.h
|
||||
display/connectionselection.h
|
||||
display/mapcanvas.h
|
||||
display/mapwindow.h
|
||||
@@ -147,7 +145,6 @@ set(mmapper_UIS
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
- ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/configuration
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/display
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/expandoracommon
|
||||
@@ -163,6 +160,7 @@ include_directories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/proxy
|
||||
${OPENGL_INCLUDE_DIR}
|
||||
${ZLIB_INCLUDE_DIR}
|
||||
+ ${QTIOCOMPRESSOR_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
QT4_WRAP_CPP(mmapper_MOC_SRCS ${mmapper_MOC_HDRS})
|
||||
@@ -187,6 +185,7 @@ target_link_libraries(mmapper
|
||||
${QT_LIBRARIES}
|
||||
${OPENGL_gl_LIBRARY}
|
||||
${ZLIB_LIBRARIES}
|
||||
+ ${QTIOCOMPRESSOR_LIBRARIES}
|
||||
)
|
||||
|
||||
# Begin CPack Settings
|
16
mmapper.spec
16
mmapper.spec
|
@ -4,19 +4,17 @@ Release: 1%{?dist}
|
|||
Summary: Graphical MUME mapper
|
||||
|
||||
Group: Amusements/Games
|
||||
# The following files are dual licensed under
|
||||
# LGPLv2 with exceptions or GPLv3 with exceptions:
|
||||
# - src/3rdparty/qtiocompressor.cpp
|
||||
# - src/3rdparty/qtiocompressor.h
|
||||
# The rest of the source files are GPLv2+
|
||||
License: GPLv2
|
||||
License: GPLv2+
|
||||
URL: http://sourceforge.net/projects/mmapper
|
||||
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}-source.tar.gz
|
||||
# Backported patch from upstream svn
|
||||
Patch0: mmapper-2.1.0-system_qtiocompressor.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
BuildRequires: cmake
|
||||
BuildRequires: desktop-file-utils
|
||||
BuildRequires: qt4-devel
|
||||
BuildRequires: qtiocompressor-devel
|
||||
Requires: hicolor-icon-theme
|
||||
|
||||
%description
|
||||
|
@ -29,6 +27,10 @@ data in real time and show player's position in a map.
|
|||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{version}-source
|
||||
%patch0 -p1 -b .system_qtiocompressor
|
||||
|
||||
# remove bundled copy of qtiocompressor
|
||||
rm -rf src/3rdparty
|
||||
|
||||
|
||||
%build
|
||||
|
@ -70,7 +72,6 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
|||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc ChangeLog.txt COPYING.txt doc/*.txt
|
||||
%doc src/3rdparty/LGPL_EXCEPTION.txt src/3rdparty/LICENSE.LGPL
|
||||
%{_bindir}/mmapper
|
||||
%{_datadir}/applications/mmapper.desktop
|
||||
%{_datadir}/icons/hicolor/*/apps/mmapper.png
|
||||
|
@ -80,6 +81,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
|||
* Mon Aug 23 2010 Kalev Lember <kalev@smartlink.ee> - 2.1.0-1
|
||||
- Update to 2.1.0
|
||||
- Dropped upstreamed patches
|
||||
- Use system copy of qtiocompressor
|
||||
|
||||
* Thu Feb 25 2010 Kalev Lember <kalev@smartlink.ee> - 2.0.4-5.final2
|
||||
- Added patch to fix renderer crash with Qt 4.6
|
||||
|
|
Loading…
Reference in New Issue