[gdl: 2/10] - Add patch to handle config.h properly - Fix %install
Orion Poplawski
orion at fedoraproject.org
Fri Mar 15 21:50:05 UTC 2013
commit d24329f86b2b37773de478ef24b177772242f34c
Author: Orion Poplawski <orion at cora.nwra.com>
Date: Fri Mar 18 16:57:26 2011 -0600
- Add patch to handle config.h properly
- Fix %install
gdl-0.9-config.patch | 24 ++++++++++++++++++++++++
gdl.spec | 10 +++++++---
2 files changed, 31 insertions(+), 3 deletions(-)
---
diff --git a/gdl-0.9-config.patch b/gdl-0.9-config.patch
new file mode 100644
index 0000000..a8b96bf
--- /dev/null
+++ b/gdl-0.9-config.patch
@@ -0,0 +1,24 @@
+diff -up gdl-0.9-cvs/CMakeLists.txt.config gdl-0.9-cvs/CMakeLists.txt
+--- gdl-0.9-cvs/CMakeLists.txt.config 2011-03-18 16:34:56.468675812 -0600
++++ gdl-0.9-cvs/CMakeLists.txt 2011-03-18 16:38:48.122620250 -0600
+@@ -543,7 +543,7 @@ install(FILES ${CMAKE_SOURCE_DIR}/AUTHOR
+ install(FILES ${CMAKE_SOURCE_DIR}/doc/gdl.1 DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man1)
+
+ # substitute variables in configure.h.cmake and move it to configure.h
+-configure_file(${CMAKE_SOURCE_DIR}/config.h.cmake ${CMAKE_SOURCE_DIR}/config.h)
++configure_file(${CMAKE_SOURCE_DIR}/config.h.cmake ${CMAKE_BINARY_DIR}/config.h)
+
+ # create a link src/gdl -> ${BUILD}/.../gdl
+ if(NOT PYTHON_MODULE)
+diff -up gdl-0.9-cvs/src/CMakeLists.txt.config gdl-0.9-cvs/src/CMakeLists.txt
+--- gdl-0.9-cvs/src/CMakeLists.txt.config 2011-03-18 16:34:56.491673128 -0600
++++ gdl-0.9-cvs/src/CMakeLists.txt 2011-03-18 16:38:39.272652389 -0600
+@@ -203,7 +203,7 @@ typetraits.hpp
+ widget.cpp
+ )
+
+-include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/src)
++include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/src ${CMAKE_BINARY_DIR})
+ link_directories(${LINK_DIRECTORIES})
+
+ if(PYTHON_MODULE) #libgdl
diff --git a/gdl.spec b/gdl.spec
index b7abce9..22e2226 100644
--- a/gdl.spec
+++ b/gdl.spec
@@ -21,6 +21,7 @@ Patch12: gdl-0.9-numpy.patch
# Build with system antlr library. Request for upstream change here:
# https://sourceforge.net/tracker/index.php?func=detail&aid=2685215&group_id=97659&atid=618686
Patch13: gdl-0.9-antlr-cmake.patch
+Patch14: gdl-0.9-config.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
#RHEL doesn't have the needed antlr version/headers, has old plplot
@@ -88,6 +89,7 @@ rm -rf src/antlr
%patch11 -p1 -b .hdf
%patch12 -p1 -b .numpy
%patch13 -p1 -b .antlr
+%patch14 -p1 -b .config
rm CMakeModules/FindPythonLibs.cmake
%global cmake_opts \\\
@@ -123,13 +125,15 @@ popd
rm -rf $RPM_BUILD_ROOT
pushd build
make install DESTDIR=$RPM_BUILD_ROOT
-rm -r $RPM_BUILD_ROOT%{_libdir}
popd
-
+pushd build-python
+make install DESTDIR=$RPM_BUILD_ROOT
# Install the python module
install -d -m 0755 $RPM_BUILD_ROOT/%{python_sitearch}
-install -m 0755 build-python/src/.libs/libgdl.so.0.0.0 \
+mv $RPM_BUILD_ROOT/%{_prefix}/lib/libgdl.so \
$RPM_BUILD_ROOT/%{python_sitearch}/GDL.so
+rm -r $RPM_BUILD_ROOT/%{_prefix}/lib
+popd
# Install the profile file to set GDL_PATH
install -d -m 0755 $RPM_BUILD_ROOT/%{_sysconfdir}/profile.d
More information about the scm-commits
mailing list