[LuxRender/f16] Give the right path to the library to the linker
Nicolas Chauvet
kwizart at fedoraproject.org
Mon Aug 8 21:43:35 UTC 2011
commit f49b11f7f54130d36c21a647845768f5ee186f92
Author: Nicolas Chauvet <kwizart at gmail.com>
Date: Mon Aug 8 19:14:55 2011 +0200
Give the right path to the library to the linker
LuxRender.spec | 9 +++++----
lux-45d3e13eb94c-ld.patch | 21 +++++++++++++++++++++
luxrays-e14ba5b1d111-ld.patch | 2 +-
3 files changed, 27 insertions(+), 5 deletions(-)
---
diff --git a/LuxRender.spec b/LuxRender.spec
index cb12c92..f171472 100644
--- a/LuxRender.spec
+++ b/LuxRender.spec
@@ -15,7 +15,8 @@ Source0: http://src.luxrender.net/lux/archive/lux-%{hash0}.tar.bz2
Source1: http://src.luxrender.net/luxblend25/archive/luxblend25-%{hash1}.tar.bz2
Source2: http://src.luxrender.net/luxrays/file/luxrays-%{hash2}.tar.bz2
Source3: luxblend-default.cfg
-Patch0: luxrays-e14ba5b1d111-ld.patch
+Patch0: lux-45d3e13eb94c-ld.patch
+Patch1: luxrays-e14ba5b1d111-ld.patch
BuildRequires: desktop-file-utils
BuildRequires: doxygen
@@ -87,7 +88,7 @@ developing applications that use %{name}.
%setup -q -n lux-%{hash0}
%setup -q -D -T -a 1 -n lux-%{hash0}
%setup -q -D -T -a 2 -n lux-%{hash0}
-
+%patch0 -p1 -b .ld
#Disable tweaking
sed -i -e 's/-O3//' CMakeLists.txt
%ifarch i686
@@ -102,7 +103,7 @@ sed -i -e 's/-mfpmath=sse//' CMakeLists.txt
#Patching luxrays
pushd luxrays-%{hash2}
-%patch0 -p1 -b .shared
+%patch1 -p1 -b .ld
popd
%build
@@ -135,7 +136,7 @@ pushd build
-DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE \
-DCMAKE_SKIP_RPATH:BOOL=ON \
-DLUXRAYS_INCLUDE_DIRS=%{_builddir}/%{buildsubdir}/luxrays-%{hash2}/include \
- -DLUXRAYS_LIBRARY=%{_builddir}/%{buildsubdir}/luxrays-%{hash2}/build/lib \
+ -DLUXRAYS_LIBRARY=%{_builddir}/%{buildsubdir}/luxrays-%{hash2}/build/lib/libluxrays.a \
-DLUXRAYS_DISABLE_OPENCL:BOOL=ON \
%if 0%{?fedora} >= 15
-DCMAKE_CXX_FLAGS="$CXXFLAGS -DBOOST_FILESYSTEM_VERSION=2 -DLUXRAYS_DISABLE_OPENCL=1" \
diff --git a/lux-45d3e13eb94c-ld.patch b/lux-45d3e13eb94c-ld.patch
new file mode 100644
index 0000000..a0e1abe
--- /dev/null
+++ b/lux-45d3e13eb94c-ld.patch
@@ -0,0 +1,21 @@
+diff -up lux-45d3e13eb94c/CMakeLists.txt.ld lux-45d3e13eb94c/CMakeLists.txt
+--- lux-45d3e13eb94c/CMakeLists.txt.ld 2011-08-08 19:06:32.539449845 +0200
++++ lux-45d3e13eb94c/CMakeLists.txt 2011-08-08 19:12:02.108557728 +0200
+@@ -862,7 +862,7 @@ IF( NOT CMAKE_VERSION VERSION_LESS 2.8.3
+ SET_TARGET_PROPERTIES(luxStatic PROPERTIES XCODE_ATTRIBUTE_GCC_VERSION com.apple.compilers.llvm.clang.1_0) # for testing new CLANG2.0, will be ignored for other OS
+ SET_TARGET_PROPERTIES(luxStatic PROPERTIES XCODE_ATTRIBUTE_LLVM_LTO NO ) # disabled due breaks bw compatibility
+ ENDIF()
+-#TARGET_LINK_LIBRARIES(luxStatic ${FREEIMAGE_LIBRARIES} ${Boost_LIBRARIES} )
++TARGET_LINK_LIBRARIES(luxStatic ${FREEIMAGE_LIBRARIES} ${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} )
+
+ #############################################################################
+ # Here we build the shared core library liblux.so
+@@ -877,7 +877,7 @@ IF(APPLE)
+ SET_TARGET_PROPERTIES(luxShared PROPERTIES XCODE_ATTRIBUTE_GCC_VERSION com.apple.compilers.llvm.clang.1_0) # for testing new CLANG2.0, will be ignored for other OS
+ SET_TARGET_PROPERTIES(luxShared PROPERTIES XCODE_ATTRIBUTE_LLVM_LTO NO ) # disabled due breaks bw compatibility
+ ENDIF()
+- TARGET_LINK_LIBRARIES(luxShared -all_load luxStatic -noall_load ${LUXRAYS_LIBRARY} ${OPENCL_LIBRARY} ${OPENGL_LIBRARY} ${FREEIMAGE_LIBRARIES} ${Boost_LIBRARIES} ${SYS_LIBRARIES} )
++ TARGET_LINK_LIBRARIES(luxShared -all_load luxStatic -noall_load ${LUXRAYS_LIBRARY} ${OPENCL_LIBRARY} ${OPENGL_LIBRARY} ${FREEIMAGE_LIBRARIES} ${Boost_LIBRARIES} ${SYS_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} )
+ ELSE(APPLE)
+ TARGET_LINK_LIBRARIES(luxShared -Wl,--whole-archive luxStatic -Wl,--no-whole-archive ${LUXRAYS_LIBRARY} ${OPENCL_LIBRARY} ${OPENGL_LIBRARY} ${FREEIMAGE_LIBRARIES} ${Boost_LIBRARIES} ${SYS_LIBRARIES} ${OPENEXR_LIBRARIES} ${PNG_LIBRARY})
+ ENDIF(APPLE)
diff --git a/luxrays-e14ba5b1d111-ld.patch b/luxrays-e14ba5b1d111-ld.patch
index 73b57ef..c79e26c 100644
--- a/luxrays-e14ba5b1d111-ld.patch
+++ b/luxrays-e14ba5b1d111-ld.patch
@@ -5,7 +5,7 @@ diff -up luxrays-e14ba5b1d111/samples/smallluxgpu/CMakeLists.txt.ld luxrays-e14b
TARGET_LINK_LIBRARIES(slg luxrays ${GLEW_LIBRARY} ${OPENGL_LIBRARY})
TARGET_LINK_LIBRARIES(slg ${OpenCL_LIBRARY})
TARGET_LINK_LIBRARIES(slg ${GLUT_LIBRARY})
-+TARGET_LINK_LIBRARIES(slg -lpthread)
++TARGET_LINK_LIBRARIES(slg ${CMAKE_THREAD_LIBS_INIT})
# This instructs FREEGLUT to emit a pragma for the static version
SET_TARGET_PROPERTIES(slg PROPERTIES COMPILE_DEFINITIONS FREEGLUT_STATIC)
More information about the scm-commits
mailing list