Author: hobbes1069
Update of /cvs/nonfree/rpms/OCE/F-18
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv16080
Modified Files:
OCE.spec sources
Added Files:
OCE-0.11-freeimage.patch
Removed Files:
OCE-0.8.0-env.patch
Log Message:
* Fri Feb 15 2013 Richard Shaw <hobbes1069(a)gmail.com> - 0.11-1
- Update to latest upstream release.
OCE-0.11-freeimage.patch:
CMakeLists.txt | 17 +++++++++++++++--
adm/cmake/TKOpenGl/CMakeLists.txt | 14 ++++++++++++++
src/OpenGl/OpenGl_Workspace_2.cxx | 5 -----
3 files changed, 29 insertions(+), 7 deletions(-)
--- NEW FILE OCE-0.11-freeimage.patch ---
From 1f952ba08554b522b129f8a562dfc6fe7c19a16c Mon Sep 17 00:00:00 2001
From: Denis Barbier <bouzim(a)gmail.com>
Date: Mon, 18 Feb 2013 12:16:29 +0100
Subject: [PATCH] Link against FreeImage (instead of FreeImagePlus) on
non-Windows
FreeImage support is available in TKService and TKOpenGl.
In TKService, only the C API is used, so we can link
against freeimage. This is better because on some platforms
(Fedora for instance), symbols of freeimage are not duplicated
into freeimageplus, which causes unresolved symbols when linking
with --as-needed.
In TKOpenGl, the FreeImage support was not enabled, copy
it from TKService. It is used only in OpenGl_Workspace::Print,
and this method works only on Windows.
Remove #pragma from src/OpenGl/OpenGl_Workspace_2.cxx.
---
CMakeLists.txt | 17 +++++++++++++++--
adm/cmake/TKOpenGl/CMakeLists.txt | 14 ++++++++++++++
src/OpenGl/OpenGl_Workspace_2.cxx | 4 ----
3 files changed, 29 insertions(+), 6 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e9ddb85..bdbd5e2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -307,13 +307,22 @@ IF(${PROJECT_NAME}_VISUALISATION)
IF(${PROJECT_NAME}_WITH_FREEIMAGE)
FIND_PATH(FREEIMAGE_INCLUDE_DIR FreeImagePlus.h DOC "Location of header files for
FreeImage" ${CMAKE_SYSTEM_INCLUDE_PATH})
IF(FREEIMAGE_INCLUDE_DIR)
- FIND_LIBRARY( FREEIMAGE_LIBRARY freeimageplus "Path to the freeimage
library" )
+ FIND_LIBRARY( FREEIMAGE_LIBRARY freeimage "Path to the freeimage library" )
IF(CMAKE_CONFIGURATION_TYPES OR NMAKE)
- FIND_LIBRARY( FREEIMAGE_LIBRARY_DEBUG freeimageplusd "Path to the freeimage
debug library" )
+ FIND_LIBRARY( FREEIMAGE_LIBRARY_DEBUG freeimaged "Path to the freeimage debug
library" )
ENDIF(CMAKE_CONFIGURATION_TYPES OR NMAKE)
ENDIF(FREEIMAGE_INCLUDE_DIR)
MARK_AS_ADVANCED(FREEIMAGE_INCLUDE_DIR FREEIMAGE_LIBRARY)
+ IF(WIN32)
+ IF(FREEIMAGE_INCLUDE_DIR)
+ FIND_LIBRARY( FREEIMAGEPLUS_LIBRARY freeimageplus "Path to the freeimageplus
library" )
+ IF(CMAKE_CONFIGURATION_TYPES OR NMAKE)
+ FIND_LIBRARY( FREEIMAGEPLUS_LIBRARY_DEBUG freeimageplusd "Path to the
freeimageplus debug library" )
+ ENDIF(CMAKE_CONFIGURATION_TYPES OR NMAKE)
+ ENDIF(FREEIMAGE_INCLUDE_DIR)
+ MARK_AS_ADVANCED(FREEIMAGEPLUS_LIBRARY)
+ ENDIF(WIN32)
ENDIF(${PROJECT_NAME}_WITH_FREEIMAGE)
IF (NOT WIN32)
@@ -452,6 +461,8 @@ IF (${PROJECT_NAME}_USE_BUNDLE AND ${PROJECT_NAME}_BUNDLE_ROOT_PATH)
IF(${PROJECT_NAME}_WITH_FREEIMAGE)
SET(FREEIMAGE_LIBRARY ${${PROJECT_NAME}_BUNDLE_ROOT_PATH}/Win${BIT}/lib/FreeImage.lib
CACHE FILEPATH "" FORCE)
SET(FREEIMAGE_LIBRARY_DEBUG
${${PROJECT_NAME}_BUNDLE_ROOT_PATH}/Win${BIT}/libd/FreeImaged.lib CACHE FILEPATH
"" FORCE)
+ SET(FREEIMAGEPLUS_LIBRARY
${${PROJECT_NAME}_BUNDLE_ROOT_PATH}/Win${BIT}/lib/FreeImagePlus.lib CACHE FILEPATH
"" FORCE)
+ SET(FREEIMAGEPLUS_LIBRARY_DEBUG
${${PROJECT_NAME}_BUNDLE_ROOT_PATH}/Win${BIT}/libd/FreeImagePlusd.lib CACHE FILEPATH
"" FORCE)
SET(FREEIMAGE_INCLUDE_DIR ${${PROJECT_NAME}_BUNDLE_ROOT_PATH}/include/FreeImage CACHE
PATH "" FORCE)
ENDIF(${PROJECT_NAME}_WITH_FREEIMAGE)
ENDIF (${PROJECT_NAME}_VISUALISATION)
@@ -1114,6 +1125,8 @@ IF (${PROJECT_NAME}_BUNDLE_AUTOINSTALL)
IF (${PROJECT_NAME}_VISU_DEP AND ${PROJECT_NAME}_WITH_FREEIMAGE)
INSTALL(FILES ${${PROJECT_NAME}_BUNDLE_ROOT_PATH}/Win${BIT}/bind/FreeImaged.dll
DESTINATION ${${PROJECT_NAME}_INSTALL_BIN_DIR} CONFIGURATIONS Debug)
INSTALL(FILES ${${PROJECT_NAME}_BUNDLE_ROOT_PATH}/Win${BIT}/bin/FreeImage.dll
DESTINATION ${${PROJECT_NAME}_INSTALL_BIN_DIR} CONFIGURATIONS Release RelWithDebInfo
MinSizeRel)
+ INSTALL(FILES ${${PROJECT_NAME}_BUNDLE_ROOT_PATH}/Win${BIT}/bind/FreeImagePlusd.dll
DESTINATION ${${PROJECT_NAME}_INSTALL_BIN_DIR} CONFIGURATIONS Debug)
+ INSTALL(FILES ${${PROJECT_NAME}_BUNDLE_ROOT_PATH}/Win${BIT}/bin/FreeImagePlus.dll
DESTINATION ${${PROJECT_NAME}_INSTALL_BIN_DIR} CONFIGURATIONS Release RelWithDebInfo
MinSizeRel)
ENDIF(${PROJECT_NAME}_VISU_DEP AND ${PROJECT_NAME}_WITH_FREEIMAGE)
# Install TCL
diff --git a/adm/cmake/TKOpenGl/CMakeLists.txt b/adm/cmake/TKOpenGl/CMakeLists.txt
index aed0f9f..4c3b574 100644
--- a/adm/cmake/TKOpenGl/CMakeLists.txt
+++ b/adm/cmake/TKOpenGl/CMakeLists.txt
@@ -19,6 +19,20 @@ ENDIF(CMAKE_CONFIGURATION_TYPES OR NMAKE)
SET(TOOLKIT_INCLUDE_DIRECTORIES ${OPENGL_INCLUDE_DIR} ${FREETYPE_INCLUDE_DIRS}
${FTGL_INCLUDE_DIR})
+# OpenGl_Workspace::Print is available only on Windows
+IF(WIN32 AND FREEIMAGE_LIBRARY AND ${PROJECT_NAME}_WITH_FREEIMAGE)
+ ADD_DEFINITIONS(-DHAVE_FREEIMAGE)
+
+ IF(CMAKE_CONFIGURATION_TYPES OR NMAKE)
+ SET(TOOLKIT_LIBS_DEBUG ${TOOLKIT_LIBS_DEBUG} ${FREEIMAGEPLUS_LIBRARY_DEBUG}
${FREEIMAGE_LIBRARY_DEBUG})
+ SET(TOOLKIT_LIBS_OPTIMIZED ${TOOLKIT_LIBS_OPTIMIZED} ${FREEIMAGEPLUS_LIBRARY}
${FREEIMAGE_LIBRARY})
+ ELSE (CMAKE_CONFIGURATION_TYPES OR NMAKE)
+ SET(TOOLKIT_LIBS ${TOOLKIT_LIBS} ${FREEIMAGEPLUS_LIBRARY} ${FREEIMAGE_LIBRARY})
+ ENDIF(CMAKE_CONFIGURATION_TYPES OR NMAKE)
+
+ SET(TOOLKIT_INCLUDE_DIRECTORIES ${TOOLKIT_INCLUDE_DIRECTORIES}
${FREEIMAGE_INCLUDE_DIR})
+ENDIF(FREEIMAGE_LIBRARY AND ${PROJECT_NAME}_WITH_FREEIMAGE)
+
IF(GL2PS_LIBRARY AND ${PROJECT_NAME}_WITH_GL2PS)
ADD_DEFINITIONS(-DHAVE_GL2PS)
diff --git a/src/OpenGl/OpenGl_Workspace_2.cxx b/src/OpenGl/OpenGl_Workspace_2.cxx
index bff24b7..79910d1 100644
--- a/src/OpenGl/OpenGl_Workspace_2.cxx
+++ b/src/OpenGl/OpenGl_Workspace_2.cxx
@@ -31,10 +31,6 @@
#ifdef HAVE_FREEIMAGE
#include <NCollection_Handle.hxx>
#include <FreeImagePlus.h>
- #ifdef _MSC_VER
- #pragma comment( lib, "FreeImage.lib" )
- #pragma comment( lib, "FreeImagePlus.lib" )
- #endif
typedef NCollection_Handle<fipImage> FipHandle;
#endif
--
1.7.10
Index: OCE.spec
===================================================================
RCS file: /cvs/nonfree/rpms/OCE/F-18/OCE.spec,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- OCE.spec 5 Jul 2012 13:31:31 -0000 1.3
+++ OCE.spec 18 Feb 2013 17:17:11 -0000 1.4
@@ -1,5 +1,3 @@
-%global githash1 gc4c7d83
-%global githash2 de78904
#global relcan 1
# Use newer cmake on EL-6.
@@ -8,17 +6,17 @@
%endif
Name: OCE
-Version: 0.8.0
-Release: 3%{?relcan:.rc%{relcan}}%{?dist}
+Version: 0.11
+Release: 1%{?relcan:.rc%{relcan}}%{?dist}
Summary: OpenCASCADE Community Edition
License: Open CASCADE Technology Public License
URL:
https://github.com/tpaviot/oce
# Github source! Archive was generated on the fly with the following URL:
-#
https://github.com/tpaviot/oce/tarball/OCE-0.8.0
-Source0:
tpaviot-oce-%{name}-%{version}%{?relcan:-rc%{relcan}}-0-%{githash1}.tar.gz
+#
https://github.com/tpaviot/oce/archive/OCE-0.11.tar.gz
+Source0: oce-%{name}-%{version}%{?relcan:-rc%{relcan}}.tar.gz
-Patch0: OCE-0.8.0-env.patch
+Patch0: OCE-0.11-freeimage.patch
Source1: DRAWEXE.1
Source2: opencascade-draw.desktop
@@ -34,12 +32,14 @@
BuildRequires: cmake
%endif
BuildRequires: desktop-file-utils
-# Librraies
+# Libraries
BuildRequires: xorg-x11-proto-devel
BuildRequires: mesa-libGL-devel mesa-libGLU-devel
BuildRequires: libXmu-devel
-BuildRequires: ftgl-devel
+BuildRequires: ftgl-devel
+%if ! 0%{?el6}
BuildRequires: freeimage-devel
+%endif
BuildRequires: gl2ps-devel
BuildRequires: libgomp
BuildRequires: tcl-devel
@@ -129,8 +129,8 @@
%prep
-%setup -q -n tpaviot-oce-%{githash2}
-%patch0 -p1
+%setup -q -n oce-%{name}-%{version}
+%patch0 -p1 -b .cmake_freeimage
# Convert files to utf8
iconv --from=ISO-8859-1 --to=UTF-8 LICENSE.txt > LICENSE.txt.new && \
@@ -140,13 +140,14 @@
%build
rm -rf build && mkdir build && pushd build
+# Stop excessive linking that cmake projects are prone to.
LDFLAGS="-Wl,--as-needed";export LDFLAGS
%cmake -DOCE_BUILD_TYPE=RelWithDebInfo \
-DOCE_INSTALL_PREFIX=%{_prefix} \
-DOCE_INSTALL_LIB_DIR=%{_lib} \
-DOCE_WITH_FREEIMAGE=ON \
-DOCE_WITH_GL2PS=ON \
- -DOCE_MULTITHREAD_LIBRARY:STRING=OPENMP \
+ -DOCE_MULTITHREAD_LIBRARY:STRING=TBB \
-DOCE_DRAW=on \
../
@@ -277,7 +278,7 @@
%{_libdir}/libTKStdSchema.so.*
%files draw
-# Draw
+# Draw Libraries
%{_libdir}/oce-%{version}%{?relcan:-rc%{relcan}}/libTKDraw.so.*
%{_libdir}/oce-%{version}%{?relcan:-rc%{relcan}}/libTKTopTest.so.*
%{_libdir}/oce-%{version}%{?relcan:-rc%{relcan}}/libTKViewerTest.so.*
@@ -285,6 +286,7 @@
%{_libdir}/oce-%{version}%{?relcan:-rc%{relcan}}/libTKDCAF.so.*
%{_libdir}/oce-%{version}%{?relcan:-rc%{relcan}}/libTKXDEDRAW.so.*
%{_libdir}/oce-%{version}%{?relcan:-rc%{relcan}}/libTKTObjDRAW.so.*
+%{_libdir}/oce-%{version}%{?relcan:-rc%{relcan}}/libTKQADraw.so.*
# DRAWEXE application
%{_bindir}/DRAWEXE
%{_mandir}/man1/DRAWEXE.1.gz
@@ -295,11 +297,14 @@
%doc examples
%{_includedir}/*
%{_libdir}/*.so
-%exclude %{_libdir}/oce-%{version}%{?relcan:-rc%{relcan}}/*.so.*
-%{_libdir}/oce-%{version}%{?relcan:-rc%{relcan}}/
+%{_libdir}/oce-%{version}%{?relcan:-rc%{relcan}}/*.so
+%{_libdir}/oce-%{version}%{?relcan:-rc%{relcan}}/*.cmake
%changelog
+* Fri Feb 15 2013 Richard Shaw <hobbes1069(a)gmail.com> - 0.11-1
+- Update to latest upstream release.
+
* Wed May 02 2012 Richard Shaw <hobbes1069(a)gmail.com> - 0.8.0-3
- Update icons.
Index: sources
===================================================================
RCS file: /cvs/nonfree/rpms/OCE/F-18/sources,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- sources 24 Dec 2011 20:05:00 -0000 1.2
+++ sources 18 Feb 2013 17:17:11 -0000 1.3
@@ -1 +1 @@
-1ba89636b120b07bd72f18cf699425cd tpaviot-oce-OCE-0.8.0-0-gc4c7d83.tar.gz
+5d3f12abade78a69cd6734c1fdeb83b7 oce-OCE-0.11.tar.gz
--- OCE-0.8.0-env.patch DELETED ---