qhull: add missing pkgconfig file
Add backwards compatibility symlinks to /usr/include/qhull. Add patch to fix format string security flaw (via Gentoo).
This commit is contained in:
parent
3d4c1449c7
commit
79351bde34
|
@ -0,0 +1,11 @@
|
||||||
|
prefix=/usr
|
||||||
|
exec_prefix=${prefix}
|
||||||
|
libdir=${exec_prefix}/lib
|
||||||
|
includedir=${prefix}/include
|
||||||
|
|
||||||
|
Name: qhull
|
||||||
|
Description: Computing the convex hull
|
||||||
|
Version: @VERSION@
|
||||||
|
Requires:
|
||||||
|
Libs: -L${libdir} -lqhull -lm
|
||||||
|
Cflags: -I${includedir}
|
|
@ -0,0 +1,29 @@
|
||||||
|
diff --git src/libqhull/io.c src/libqhull/io.c
|
||||||
|
index 09a0079..7ad4b35 100644
|
||||||
|
--- src/libqhull/io.c
|
||||||
|
+++ src/libqhull/io.c
|
||||||
|
@@ -68,8 +68,8 @@ void qh_produce_output2(void) {
|
||||||
|
qh_memstatistics(qh ferr);
|
||||||
|
d_1= sizeof(setT) + (qh hull_dim - 1) * SETelemsize;
|
||||||
|
qh_fprintf(qh ferr, 8040, "\
|
||||||
|
- size in bytes: merge %d ridge %d vertex %d facet %d\n\
|
||||||
|
- normal %d ridge vertices %d facet vertices or neighbors %d\n",
|
||||||
|
+ size in bytes: merge %zd ridge %zd vertex %zd facet %zd\n\
|
||||||
|
+ normal %d ridge vertices %d facet vertices or neighbors %zd\n",
|
||||||
|
(int)sizeof(mergeT), (int)sizeof(ridgeT),
|
||||||
|
(int)sizeof(vertexT), (int)sizeof(facetT),
|
||||||
|
qh normal_size, d_1, d_1 + SETelemsize);
|
||||||
|
diff --git src/libqhull/stat.c src/libqhull/stat.c
|
||||||
|
index 7dc60b9..5721130 100644
|
||||||
|
--- src/libqhull/stat.c
|
||||||
|
+++ src/libqhull/stat.c
|
||||||
|
@@ -472,7 +472,7 @@ void qh_initstatistics(void) {
|
||||||
|
qh_allstatI();
|
||||||
|
if (qhstat next > (int)sizeof(qhstat id)) {
|
||||||
|
qh_fprintf(qhmem.ferr, 6184, "qhull error (qh_initstatistics): increase size of qhstat.id[].\n\
|
||||||
|
- qhstat.next %d should be <= sizeof(qhstat id) %d\n", qhstat next, (int)sizeof(qhstat id));
|
||||||
|
+ qhstat.next %d should be <= sizeof(qhstat id) %zd\n", qhstat next, (int)sizeof(qhstat id));
|
||||||
|
#if 0 /* for locating error, Znumridges should be duplicated */
|
||||||
|
for(i=0; i < ZEND; i++) {
|
||||||
|
int j;
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
diff --git src/libqhull/io.c src/libqhull/io.c
|
||||||
|
index 6601ffd..fb1a7fd 100644
|
||||||
|
--- src/libqhull/io.c
|
||||||
|
+++ src/libqhull/io.c
|
||||||
|
@@ -2238,7 +2238,7 @@ void qh_printfacet3math(FILE *fp, facetT *facet, qh_PRINT format, int notfirst)
|
||||||
|
qh_memfree(point, qh normal_size);
|
||||||
|
qh_settempfree(&points);
|
||||||
|
qh_settempfree(&vertices);
|
||||||
|
- qh_fprintf(fp, 9110, endfmt);
|
||||||
|
+ qh_fprintf(fp, 9110, "%s", endfmt);
|
||||||
|
} /* printfacet3math */
|
||||||
|
|
||||||
|
|
|
@ -1,30 +1,38 @@
|
||||||
# Template file for 'qhull'
|
# Template file for 'qhull'
|
||||||
pkgname="qhull"
|
pkgname=qhull
|
||||||
version="2012.1"
|
version=2012.1
|
||||||
revision=1
|
revision=2
|
||||||
|
build_style=cmake
|
||||||
|
hostmakedepends="cmake"
|
||||||
short_desc="Computes volumes, surface areas and approximations to the convex hull"
|
short_desc="Computes volumes, surface areas and approximations to the convex hull"
|
||||||
maintainer="Martin Riese <grauehaare@gmx.de>"
|
maintainer="Martin Riese <grauehaare@gmx.de>"
|
||||||
license="GPL-3"
|
license="BSD"
|
||||||
homepage="http://www.qhull.org"
|
homepage="http://www.qhull.org"
|
||||||
distfiles="http://www.qhull.org/download/${pkgname}-${version}-src.tgz"
|
distfiles="http://www.qhull.org/download/${pkgname}-${version}-src.tgz"
|
||||||
checksum="a35ecaa610550b7f05c3ce373d89c30cf74b059a69880f03080c556daebcff88"
|
checksum=a35ecaa610550b7f05c3ce373d89c30cf74b059a69880f03080c556daebcff88
|
||||||
hostmakedepends="cmake"
|
|
||||||
build_style="cmake"
|
post_install() {
|
||||||
|
install -Dm644 ${FILESDIR}/qhull.pc ${DESTDIR}/usr/lib/pkgconfig/qhull.pc
|
||||||
|
sed -i "s|@VERSION@|${version}|" ${DESTDIR}/usr/lib/pkgconfig/qhull.pc
|
||||||
|
# convenience links for backwards compatibility
|
||||||
|
ln -sf libqhull ${DESTDIR}/usr/include/qhull
|
||||||
|
ln -sf libqhull.h ${DESTDIR}/usr/include/qhull/qhull.h
|
||||||
|
}
|
||||||
|
|
||||||
libqhull_package() {
|
libqhull_package() {
|
||||||
shorst_desc+=" - runtime libraries"
|
short_desc+=" - runtime libraries"
|
||||||
pkg_install() {
|
pkg_install() {
|
||||||
vmove "usr/lib/*.so.*"
|
vmove usr/lib/*.so.*
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
libqhull-devel_package() {
|
libqhull-devel_package() {
|
||||||
depends="${makedepends} libqhull>=${version}_${revision}"
|
depends="libqhull>=${version}_${revision}"
|
||||||
short_desc+=" - development files"
|
short_desc+=" - development files"
|
||||||
pkg_install() {
|
pkg_install() {
|
||||||
vmove "usr/include"
|
vmove usr/include
|
||||||
vmove "usr/lib/*.a"
|
vmove usr/lib/*.a
|
||||||
vmove "usr/lib/*.so"
|
vmove usr/lib/*.so
|
||||||
|
vmove usr/lib/pkgconfig
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue