packages: qhull/qhull.spec, qhull/qhull-cmake.patch (NEW), qhull/qhull-upda...

qboosh qboosh at pld-linux.org
Mon Jul 4 21:19:07 CEST 2011


Author: qboosh                       Date: Mon Jul  4 19:19:07 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- updated to 2011.1 (note: new sonames)
- autotools support is gone, switched to messy cmake; removed update patch, added cmake patch instead
- added c++ subpackages with libqhullcpp

---- Files affected:
packages/qhull:
   qhull.spec (1.6 -> 1.7) , qhull-cmake.patch (NONE -> 1.1)  (NEW), qhull-update.patch (1.1 -> NONE)  (REMOVED)

---- Diffs:

================================================================
Index: packages/qhull/qhull.spec
diff -u packages/qhull/qhull.spec:1.6 packages/qhull/qhull.spec:1.7
--- packages/qhull/qhull.spec:1.6	Sat Oct 16 19:24:46 2010
+++ packages/qhull/qhull.spec	Mon Jul  4 21:19:02 2011
@@ -2,18 +2,16 @@
 Summary:	Qhull - convex hulls, triangulations and related computations
 Summary(pl.UTF-8):	Qhull - obliczanie powłok wypukłych, triangulacji i powiązanych rzeczy
 Name:		qhull
-Version:	2010.1
+Version:	2011.1
 Release:	1
 License:	distributable (see COPYING.txt)
 Group:		Libraries
 Source0:	http://www.qhull.org/download/%{name}-%{version}-src.tgz
-# Source0-md5:	e64138470acdeb18f752a0bc2a11ceb4
-Patch0:		%{name}-update.patch
+# Source0-md5:	1704bbae3a4d56d624ea7d309fbef46a
+Patch0:		%{name}-cmake.patch
 URL:		http://www.qhull.org/
-BuildRequires:	autoconf
-BuildRequires:	automake
-BuildRequires:	libtool
-BuildRequires:	sed >= 4.0
+BuildRequires:	cmake >= 2.6
+BuildRequires:	rpmbuild(macros) >= 1.603
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -56,21 +54,50 @@
 %description static -l pl.UTF-8
 Statyczna biblioteka Qhull.
 
+%package c++
+Summary:	QhullCPP library
+Summary(pl.UTF-8):	Biblioteka QhullCPP
+Group:		Libraries
+Requires:	%{name} = %{version}-%{release}
+
+%description c++
+QhullCPP library.
+
+%description c++ -l pl.UTF-8
+Biblioteka QhullCPP.
+
+%package c++-devel
+Summary:	Header files for QhullCPP library
+Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki QhullCPP
+Group:		Development/Libraries
+Requires:	%{name}-c++ = %{version}-%{release}
+Requires:	%{name}-devel = %{version}-%{release}
+Requires:	libstdc++-devel
+
+%description c++-devel
+Header files for QhullCPP library.
+
+%description c++-devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki QhullCPP.
+
+%package c++-static
+Summary:	Static QhullCPP library
+Summary(pl.UTF-8):	Statyczna biblioteka QhullCPP
+Group:		Development/Libraries
+Requires:	%{name}-c++-devel = %{version}-%{release}
+
+%description c++-static
+Static QhullCPP library.
+
+%description c++-static -l pl.UTF-8
+Statyczna biblioteka QhullCPP.
+
 %prep
 %setup -q
 %patch0 -p1
 
-sed -i -e 's/^echo Run/exit 0/' src/Make-config.sh
-
 %build
-cd src
-./Make-config.sh
-cd ..
-%{__libtoolize}
-%{__aclocal}
-%{__autoconf}
-%{__automake}
-%configure
+%cmake .
 %{__make}
 
 %install
@@ -79,7 +106,13 @@
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
-%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/qhull
+%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/packages
+%{__rm} $RPM_BUILD_ROOT%{_bindir}/user_eg*
+
+# missing in cmake
+install -d $RPM_BUILD_ROOT%{_mandir}/man1
+install html/qhull.man $RPM_BUILD_ROOT%{_mandir}/man1/qhull.1
+install html/rbox.man $RPM_BUILD_ROOT%{_mandir}/man1/rbox.1
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -97,7 +130,7 @@
 %attr(755,root,root) %{_bindir}/qvoronoi
 %attr(755,root,root) %{_bindir}/rbox
 %attr(755,root,root) %{_libdir}/libqhull.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libqhull.so.4
+%attr(755,root,root) %ghost %{_libdir}/libqhull.so.6
 %{_mandir}/man1/qhull.1*
 %{_mandir}/man1/rbox.1*
 
@@ -105,12 +138,27 @@
 %defattr(644,root,root,755)
 %doc html/*.{htm,gif}
 %attr(755,root,root) %{_libdir}/libqhull.so
-%{_libdir}/libqhull.la
-%{_includedir}/qhull
+%{_includedir}/libqhull
 
 %files static
 %defattr(644,root,root,755)
-%{_libdir}/libqhull.a
+%{_libdir}/libqhullstatic.a
+%{_libdir}/libqhullstatic_p.a
+
+%files c++
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libqhullcpp.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libqhullcpp.so.6
+
+%files c++-devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libqhullcpp.so
+%{_includedir}/libqhullcpp
+%{_includedir}/road
+
+%files c++-static
+%defattr(644,root,root,755)
+%{_libdir}/libqhullcppstatic.a
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -118,6 +166,11 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.7  2011/07/04 19:19:02  qboosh
+- updated to 2011.1 (note: new sonames)
+- autotools support is gone, switched to messy cmake; removed update patch, added cmake patch instead
+- added c++ subpackages with libqhullcpp
+
 Revision 1.6  2010/10/16 17:24:46  qboosh
 - updated to 2010.1
 - added update patch to update ac/am suite (included Makefile/cmake/qt suites don't support shared library)

================================================================
Index: packages/qhull/qhull-cmake.patch
diff -u /dev/null packages/qhull/qhull-cmake.patch:1.1
--- /dev/null	Mon Jul  4 21:19:07 2011
+++ packages/qhull/qhull-cmake.patch	Mon Jul  4 21:19:02 2011
@@ -0,0 +1,145 @@
+--- qhull-2011.1/CMakeLists.txt.orig	2011-04-18 02:38:33.000000000 +0200
++++ qhull-2011.1/CMakeLists.txt	2011-07-04 17:59:45.135402392 +0200
+@@ -159,21 +159,23 @@
+ 
+ string(REGEX MATCH "[^.]+" qhull_MAJOR "${qhull_VERSION}")
+ if(CMAKE_BUILD_TYPE MATCHES "[dD]ebug")
+-    set(qhull_CPP qhullcpp_d)
+-    set(qhull_SHARED qhull_d${qhull_MAJOR})
++    set(qhull_CPP_SHARED qhullcpp_d)
++    set(qhull_CPP_STATIC qhullcppstatic_d)
++    set(qhull_SHARED qhull_d)
+     set(qhull_STATIC qhullstatic_d)
+     set(qhull_STATICP qhullstatic_pd)
+ else()
+-    set(qhull_CPP qhullcpp)
+-    set(qhull_SHARED qhull${qhull_MAJOR})
++    set(qhull_CPP_SHARED qhullcpp)
++    set(qhull_CPP_STATIC qhullcppstatic)
++    set(qhull_SHARED qhull)
+     set(qhull_STATIC qhullstatic)
+     set(qhull_STATICP qhullstatic_p)
+ endif()
+ 
+ set(
+     qhull_TARGETS 
+-        ${qhull_CPP} ${qhull_SHARED} ${qhull_STATIC} ${qhull_STATICP} 
+-        qhull rbox qconvex qdelaunay qvoronoi qhalf
++        ${qhull_CPP_SHARED} ${qhull_CPP_STATIC} ${qhull_SHARED} ${qhull_STATIC} ${qhull_STATICP} 
++        qhullprog rbox qconvex qdelaunay qvoronoi qhalf
+         user_eg user_eg2 user_eg3
+ )
+ 
+@@ -186,21 +188,15 @@
+         src/libqhull/qhull-exports.def)
+ set_target_properties(${qhull_SHARED} PROPERTIES
+     COMPILE_DEFINITIONS "qh_QHpointer"
+-    VERSION ${qhull_VERSION})
++    VERSION ${qhull_VERSION} SOVERSION ${qhull_MAJOR})
+ 
+-#target_link_libraries(${qhull_SHARED} m)
++target_link_libraries(${qhull_SHARED} m)
+ 
+-if(UNIX)
+-    if(APPLE)
+-        set_target_properties(${qhull_SHARED} PROPERTIES 
+-            INSTALL_NAME_DIR "${LIB_INSTALL_DIR}")
+-    else()
+-        set_target_properties(${qhull_SHARED} PROPERTIES 
+-            INSTALL_RPATH "${LIB_INSTALL_DIR}"
+-            INSTALL_RPATH_USE_LINK_PATH TRUE
+-            BUILD_WITH_INSTALL_RPATH FALSE)
+-    endif()
+-endif(UNIX)
++add_library(${qhull_CPP_SHARED} SHARED ${libqhullcpp_SOURCES})
++set_target_properties(${qhull_CPP_SHARED} PROPERTIES
++    COMPILE_DEFINITIONS "qh_QHpointer"
++    VERSION ${qhull_VERSION} SOVERSION ${qhull_MAJOR})
++target_link_libraries(${qhull_CPP_SHARED} ${qhull_SHARED})
+ 
+ # ---------------------------------------
+ # Define static libraries qhullstatic and qhullstatic_p (qh_QHpointer)
+@@ -219,8 +215,8 @@
+ # Define C++ static library qhullcpp (qh_QHpointer)
+ # ---------------------------------------
+ 
+-add_library(${qhull_CPP} STATIC ${libqhullcpp_SOURCES})
+-set_target_properties(${qhull_CPP} PROPERTIES
++add_library(${qhull_CPP_STATIC} STATIC ${libqhullcpp_SOURCES})
++set_target_properties(${qhull_CPP_STATIC} PROPERTIES
+     COMPILE_DEFINITIONS "qh_QHpointer"
+     VERSION ${qhull_VERSION})
+ 
+@@ -241,40 +237,27 @@
+     set(user_eg_DEFINES qh_QHpointer)
+ endif()
+ 
+-add_executable(qhull ${qhull_SOURCES})
+-target_link_libraries(qhull ${qhull_STATIC})
+-set_target_properties(qhull PROPERTIES 
+-    VERSION ${qhull_VERSION})
++add_executable(qhullprog ${qhull_SOURCES})
++target_link_libraries(qhullprog ${qhull_STATIC} m)
++set_target_properties(qhullprog PROPERTIES OUTPUT_NAME qhull)
+ 
+ add_executable(rbox ${rbox_SOURCES})
+-target_link_libraries(rbox ${qhull_STATIC})
+-set_target_properties(rbox PROPERTIES
+-    VERSION ${qhull_VERSION})
++target_link_libraries(rbox ${qhull_STATIC} m)
+ 
+ add_executable(qconvex ${qconvex_SOURCES})
+-target_link_libraries(qconvex ${qhull_STATIC})
+-set_target_properties(qconvex PROPERTIES
+-    VERSION ${qhull_VERSION})
++target_link_libraries(qconvex ${qhull_STATIC} m)
+ 
+ add_executable(qdelaunay ${qdelaunay_SOURCES})
+-target_link_libraries(qdelaunay ${qhull_STATIC})
+-set_target_properties(qdelaunay PROPERTIES
+-    VERSION ${qhull_VERSION})
++target_link_libraries(qdelaunay ${qhull_STATIC} m)
+ 
+ add_executable(qvoronoi ${qvoronoi_SOURCES})
+-target_link_libraries(qvoronoi ${qhull_STATIC})
+-set_target_properties(qvoronoi PROPERTIES
+-    VERSION ${qhull_VERSION})
++target_link_libraries(qvoronoi ${qhull_STATIC} m)
+ 
+ add_executable(qhalf ${qhalf_SOURCES})
+-target_link_libraries(qhalf ${qhull_STATIC})
+-set_target_properties(qhalf PROPERTIES
+-    VERSION ${qhull_VERSION})
++target_link_libraries(qhalf ${qhull_STATIC} m)
+ 
+ add_executable(user_eg2 ${user_eg2_SOURCES})
+-target_link_libraries(user_eg2 ${qhull_STATIC})
+-set_target_properties(user_eg2 PROPERTIES
+-    VERSION ${qhull_VERSION})
++target_link_libraries(user_eg2 ${qhull_STATIC} m)
+ 
+ # ---------------------------------------
+ # Define qhull executables linked to qhull shared library
+@@ -286,8 +269,7 @@
+ # user_eg may be linked to qhull_STATIC if user_eg_DEFINES is removed
+ target_link_libraries(user_eg ${qhull_SHARED})
+ set_target_properties(user_eg PROPERTIES
+-    COMPILE_DEFINITIONS "${user_eg_DEFINES}"
+-    VERSION ${qhull_VERSION})
++    COMPILE_DEFINITIONS "${user_eg_DEFINES}")
+ 
+ # ---------------------------------------
+ # Define qhull executables linked to qhullstatic_p and qhullcpp static library
+@@ -301,10 +283,9 @@
+ 
+ add_executable(user_eg3 ${user_eg3_SOURCES})
+ # qhull_STATICP must be last, otherwise qh_fprintf,etc. are not loaded from qhull_CPP
+-target_link_libraries(user_eg3 ${qhull_CPP} ${qhull_STATICP})
++target_link_libraries(user_eg3 ${qhull_CPP_SHARED} ${qhull_SHARED})
+ set_target_properties(user_eg3 PROPERTIES
+-    COMPILE_DEFINITIONS "qh_QHpointer"
+-    VERSION ${qhull_VERSION})
++    COMPILE_DEFINITIONS "qh_QHpointer")
+ 
+ # ---------------------------------------
+ # Define install
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/qhull/qhull.spec?r1=1.6&r2=1.7&f=u



More information about the pld-cvs-commit mailing list