- Apply upstream's qh_gethash patch

- Silence %setup.
- Remove rpath.
This commit is contained in:
corsepiu 2010-02-02 08:56:26 +00:00
parent c8dea39dc4
commit dfa1131c11
2 changed files with 38 additions and 3 deletions

View File

@ -0,0 +1,25 @@
diff -up qhull-2003.1/src/poly.c.qh_gethash qhull-2003.1/src/poly.c
--- qhull-2003.1/src/poly.c.qh_gethash 2004-01-31 04:00:15.000000000 -0700
+++ qhull-2003.1/src/poly.c 2010-02-01 14:07:45.851966800 -0700
@@ -403,6 +403,7 @@ unsigned qh_gethash (int hashsize, setT
void **elemp= SETelemaddr_(set, firstindex, void);
ptr_intT hash = 0, elem;
int i;
+ unsigned result;
switch (size-firstindex) {
case 1:
@@ -441,9 +442,10 @@ unsigned qh_gethash (int hashsize, setT
}while(*elemp);
break;
}
- hash %= (ptr_intT) hashsize;
- /* hash= 0; for debugging purposes */
- return hash;
+ result= (unsigned)hash;
+ result %= (unsigned)hashsize;
+ /* result= 0; for debugging purposes */
+ return result;
} /* gethash */
/*-<a href="qh-poly.htm#TOC"

View File

@ -1,11 +1,12 @@
Summary: General dimension convex hull programs
Name: qhull
Version: 2003.1
Release: 13%{?dist}
Release: 14%{?dist}
License: Qhull
Group: System Environment/Libraries
Source0: http://www.qhull.org/download/qhull-%{version}.tar.gz
Patch0: qhull-2003.1-alias.patch
Patch1: http://www.qhull.org/download/qhull-2003.1-qh_gethash.patch
URL: http://www.qhull.org
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -33,12 +34,16 @@ diagrams, furthest-site Voronoi diagrams, and halfspace intersections
about a point.
%prep
%setup -n %{name}-%{version}
%setup -q -n %{name}-%{version}
%patch0 -p1
%patch1 -p1
sed -i -e "s,\"../html/,\"html/,g" src/*.htm
%build
%configure --disable-static
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make
%install
@ -67,6 +72,11 @@ rm -rf $RPM_BUILD_ROOT
%_includedir/*
%changelog
* Tue Feb 02 2010 Ralf Corsépius <corsepiu@fedoraproject.org> - 2003.1-14
- Apply upstream's qh_gethash patch
- Silence %%setup.
- Remove rpath.
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2003.1-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild