diff options
Diffstat (limited to 'media-libs/qhull')
-rw-r--r-- | media-libs/qhull/Manifest | 1 | ||||
-rw-r--r-- | media-libs/qhull/files/qhull-2010.1-cmake-install.patch | 98 | ||||
-rw-r--r-- | media-libs/qhull/files/qhull-2010.1-overflows.patch | 50 | ||||
-rw-r--r-- | media-libs/qhull/files/qhull-2012.1-64bit.patch | 32 | ||||
-rw-r--r-- | media-libs/qhull/files/qhull-2012.1-format-security.patch | 16 | ||||
-rw-r--r-- | media-libs/qhull/files/qhull-3.1-makefile.patch | 74 | ||||
-rw-r--r-- | media-libs/qhull/metadata.xml | 17 | ||||
-rw-r--r-- | media-libs/qhull/qhull-2012.1-r1.ebuild | 43 | ||||
-rw-r--r-- | media-libs/qhull/qhull-2012.1-r3.ebuild | 50 | ||||
-rw-r--r-- | media-libs/qhull/qhull-2012.1-r4.ebuild | 53 |
10 files changed, 434 insertions, 0 deletions
diff --git a/media-libs/qhull/Manifest b/media-libs/qhull/Manifest new file mode 100644 index 000000000000..3fb67aff5e81 --- /dev/null +++ b/media-libs/qhull/Manifest @@ -0,0 +1 @@ +DIST qhull-2012.1-src.tgz 716665 SHA256 a35ecaa610550b7f05c3ce373d89c30cf74b059a69880f03080c556daebcff88 SHA512 e35ea2cb73ef32b23b64a6594a8b5ea22ed8e2ea7535cfd72dca44331602368dfcb681600a0d2b090e80e67e6be7b32272244b9083d4805f2fbcf5897eb73240 WHIRLPOOL 37704b3f94b6d20c02886598cc2e862f47feb910e0d3259d686b1356242206b77640871509818c56530161720954214d41c295dfe740faa4ed575379b05259f6 diff --git a/media-libs/qhull/files/qhull-2010.1-cmake-install.patch b/media-libs/qhull/files/qhull-2010.1-cmake-install.patch new file mode 100644 index 000000000000..9e1914d13d29 --- /dev/null +++ b/media-libs/qhull/files/qhull-2010.1-cmake-install.patch @@ -0,0 +1,98 @@ +diff -Nur qhull-2010.1.orig/CMakeLists.txt qhull-2010.1/CMakeLists.txt +--- qhull-2010.1.orig/CMakeLists.txt 2010-10-03 23:04:04.000000000 +0100 ++++ qhull-2010.1/CMakeLists.txt 2010-10-03 23:26:54.000000000 +0100 +@@ -1,8 +1,44 @@ + project(qhull) +-cmake_minimum_required(VERSION 2.4) +-if(COMMAND cmake_policy) +- cmake_policy(SET CMP0003 NEW) +-endif(COMMAND cmake_policy) ++cmake_minimum_required(VERSION 2.6) ++ ++ ++set(QHULL_VERSION "2010.1") ++ ++if(INCLUDE_INSTALL_DIR) ++else() ++set(INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include) ++endif() ++if(LIB_INSTALL_DIR) ++else() ++set(LIB_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib) ++endif() ++if(BIN_INSTALL_DIR) ++else() ++set(BIN_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/bin) ++endif() ++if(DOC_INSTALL_DIR) ++else() ++set(DOC_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/share/doc/qhull) ++endif() ++ ++message(STATUS) ++message(STATUS "========== qhull Build Information ==========") ++message(STATUS "Build Version: ${QHULL_VERSION}") ++message(STATUS "Install Prefix (CMAKE_INSTALL_PREFIX): ${CMAKE_INSTALL_PREFIX}") ++message(STATUS "Binary Directory (BIN_INSTALL_DIR): ${BIN_INSTALL_DIR}") ++message(STATUS "Library Directory (LIB_INSTALL_DIR): ${LIB_INSTALL_DIR}") ++message(STATUS "Include Directory (INCLUDE_INSTALL_DIR): ${INCLUDE_INSTALL_DIR}") ++message(STATUS "Documentation Directory (DOC_INSTALL_DIR): ${DOC_INSTALL_DIR}") ++message(STATUS) ++message(STATUS "To change any of these options, override them using -D{OPTION_NAME} on the commandline.") ++message(STATUS "To build and install qhull, run \"make\" and \"make install\"") ++message(STATUS) ++ + + add_subdirectory(src) ++option(WITH_STATIC_LIBS "Build with a static library" OFF) ++option(WITH_DOCS "Install HTML documentation" OFF) + ++if (WITH_DOCS) ++install(DIRECTORY html/ DESTINATION ${DOC_INSTALL_DIR}) ++endif (WITH_DOCS) +diff -Nur qhull-2010.1.orig/src/CMakeLists.txt qhull-2010.1/src/CMakeLists.txt +--- qhull-2010.1.orig/src/CMakeLists.txt 2010-10-03 23:04:04.000000000 +0100 ++++ qhull-2010.1/src/CMakeLists.txt 2010-10-04 00:23:47.000000000 +0100 +@@ -23,8 +23,25 @@ + + file(GLOB qhull_hdr *.h) + +-add_library(qhull ${qhull_src}) ++add_library(qhull SHARED ${qhull_src}) + target_link_libraries(qhull m) ++if(UNIX) ++ if(APPLE) ++ set_target_properties(qhull PROPERTIES ++ INSTALL_NAME_DIR "${LIB_INSTALL_DIR}") ++ else(APPLE) ++ set_target_properties(qhull PROPERTIES ++ INSTALL_RPATH "${LIB_INSTALL_DIR}" ++ INSTALL_RPATH_USE_LINK_PATH TRUE ++ BUILD_WITH_INSTALL_RPATH FALSE) ++ endif(APPLE) ++endif(UNIX) ++ ++if(WITH_STATIC_LIBS) ++ add_library(qhullstatic STATIC ${qhull_src}) ++ set_property(TARGET qhullstatic PROPERTY OUTPUT_NAME "qhull") ++ install(TARGETS qhullstatic ARCHIVE DESTINATION ${LIB_INSTALL_DIR}) ++endif(WITH_STATIC_LIBS) + + set(qhullcmd_SOURCES unix.c) + set(rbox_SOURCES rbox.c) +@@ -36,6 +53,7 @@ + + add_executable(qhullcmd ${qhullcmd_SOURCES}) + target_link_libraries(qhullcmd qhull) ++set_property(TARGET qhullcmd PROPERTY OUTPUT_NAME "qhull") + + add_executable(rbox ${rbox_SOURCES}) + target_link_libraries(rbox qhull) +@@ -52,3 +70,7 @@ + add_executable(qhalf ${qhalf_SOURCES}) + target_link_libraries(qhalf qhull) + ++install(TARGETS qhull qhullcmd rbox qconvex qdelaunay qvoronoi qhalf ++ RUNTIME DESTINATION ${BIN_INSTALL_DIR} ++ LIBRARY DESTINATION ${LIB_INSTALL_DIR}) ++install(FILES ${qhull_hdr} DESTINATION ${INCLUDE_INSTALL_DIR}/qhull) diff --git a/media-libs/qhull/files/qhull-2010.1-overflows.patch b/media-libs/qhull/files/qhull-2010.1-overflows.patch new file mode 100644 index 000000000000..df4aa3da19c7 --- /dev/null +++ b/media-libs/qhull/files/qhull-2010.1-overflows.patch @@ -0,0 +1,50 @@ +From 176c01851026125f574a8223ad49ec58b2b58ec0 Mon Sep 17 00:00:00 2001 +From: Johannes Obermayr <johannesobermayr@gmx.de> +Date: Fri, 23 Jul 2010 20:02:19 +0200 +Subject: [PATCH] Fix some serious compiler warnings causing build breakage on openSUSE. + +--- + src/global.c | 2 +- + src/rboxlib.c | 6 +++--- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/global.c b/src/global.c +index 3c6141a..4c9f56c 100644 +--- a/src/global.c ++++ b/src/global.c +@@ -614,7 +614,7 @@ void qh_initflags(char *command) { + if (command <= &qh qhull_command[0] || command > &qh qhull_command[0] + sizeof(qh qhull_command)) { + if (command != &qh qhull_command[0]) { + *qh qhull_command= '\0'; +- strncat( qh qhull_command, command, sizeof( qh qhull_command)); ++ strncat(qh qhull_command, command, sizeof(qh qhull_command)-strlen(qh qhull_command)-1); + } + while (*s && !isspace(*s)) /* skip program name */ + s++; +diff --git a/src/rboxlib.c b/src/rboxlib.c +index 4f11d22..17d01ac 100644 +--- a/src/rboxlib.c ++++ b/src/rboxlib.c +@@ -124,7 +124,7 @@ int qh_rboxpoints(FILE* fout, FILE* ferr, char* rbox_command) { + } + + *command= '\0'; +- strncat(command, rbox_command, sizeof(command)); ++ strncat(command, rbox_command, sizeof(command)-strlen(command)-1); + + while (*s && !isspace(*s)) /* skip program name */ + s++; +@@ -346,8 +346,8 @@ int qh_rboxpoints(FILE* fout, FILE* ferr, char* rbox_command) { + } + }else if (israndom) { + seed= (int)time(&timedata); +- sprintf(seedbuf, " t%d", seed); /* appends an extra t, not worth removing */ +- strncat(command, seedbuf, sizeof(command)); ++ printf(seedbuf, " t%d", seed); /* appends an extra t, not worth removing */ ++ strncat(command, seedbuf, sizeof(command)-strlen(command)-1); + t= strstr(command, " t "); + if (t) + strcpy(t+1, t+3); /* remove " t " */ +-- +1.6.1 + diff --git a/media-libs/qhull/files/qhull-2012.1-64bit.patch b/media-libs/qhull/files/qhull-2012.1-64bit.patch new file mode 100644 index 000000000000..4c909c28c8f2 --- /dev/null +++ b/media-libs/qhull/files/qhull-2012.1-64bit.patch @@ -0,0 +1,32 @@ + src/libqhull/io.c | 4 ++-- + src/libqhull/stat.c | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/libqhull/io.c b/src/libqhull/io.c +index 09a0079..7ad4b35 100644 +--- a/src/libqhull/io.c ++++ b/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 a/src/libqhull/stat.c b/src/libqhull/stat.c +index 7dc60b9..5721130 100644 +--- a/src/libqhull/stat.c ++++ b/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; diff --git a/media-libs/qhull/files/qhull-2012.1-format-security.patch b/media-libs/qhull/files/qhull-2012.1-format-security.patch new file mode 100644 index 000000000000..14bce2baa75c --- /dev/null +++ b/media-libs/qhull/files/qhull-2012.1-format-security.patch @@ -0,0 +1,16 @@ + src/libqhull/io.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/libqhull/io.c b/src/libqhull/io.c +index 09a0079..2bd066e 100644 +--- a/src/libqhull/io.c ++++ b/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); ++ fprintf(fp, "%s", endfmt); + } /* printfacet3math */ + + diff --git a/media-libs/qhull/files/qhull-3.1-makefile.patch b/media-libs/qhull/files/qhull-3.1-makefile.patch new file mode 100644 index 000000000000..edb6e1766e4c --- /dev/null +++ b/media-libs/qhull/files/qhull-3.1-makefile.patch @@ -0,0 +1,74 @@ +--- Makefile.old 2001-02-11 21:26:08.000000000 -0500 ++++ Makefile 2007-11-18 08:03:19.000000000 -0500 +@@ -62,7 +62,7 @@ + + # OBJS in execution frequency order. CFILES after qhull.c are alphabetical + OBJS = user.o global.o stat.o io.o geom2.o poly2.o \ +- merge.o qhull.o geom.o poly.o qset.o mem.o ++ merge.o qhull.o geom.o poly.o qset.o mem.o unix.o + + CFILES= unix.c qhull.c geom.c geom2.c global.c io.c mem.c merge.c poly.c \ + poly2.c qset.c stat.c user.c qconvex.c qdelaun.c qhalf.c qvoronoi.c +@@ -78,7 +78,7 @@ + qh-poly.htm qh-qhull.htm qh-set.htm qh-stat.htm qh-user.htm \ + qdelau_f.htm qhalf.htm qvoronoi.htm qvoron_f.htm rbox.htm + +-all: rbox qconvex qdelaunay qhalf qvoronoi qhull ++all: rbox qconvex qdelaunay qhalf qvoronoi qhull libqhull.so + + unix.o: qhull.h user.h mem.h + qconvex.o: qhull.h user.h mem.h +@@ -100,6 +100,8 @@ + + .c.o: + $(CC) -c $(CCOPTS1) $< ++ mkdir -p .libs ++ $(CC) -c $(CCOPTS1) -fPIC $< -o .libs/$@ + + clean: + rm -f *.o ../core qconvex qdelaunay qhalf qvoronoi qhull +@@ -142,23 +144,23 @@ + + # don't use ../qconvex. Does not work on Red Hat Linux + qconvex: qconvex.o libqhull.a +- $(CC) -o qconvex $(CCOPTS2) qconvex.o -L. -lqhull -lm ++ $(CC) -o qconvex $(CCOPTS2) qconvex.o -L. libqhull.a -lm + cp qconvex .. + + qdelaunay: qdelaun.o libqhull.a +- $(CC) -o qdelaunay $(CCOPTS2) qdelaun.o -L. -lqhull -lm ++ $(CC) -o qdelaunay $(CCOPTS2) qdelaun.o -L. libqhull.a -lm + cp qdelaunay .. + + qhalf: qhalf.o libqhull.a +- $(CC) -o qhalf $(CCOPTS2) qhalf.o -L. -lqhull -lm ++ $(CC) -o qhalf $(CCOPTS2) qhalf.o -L. libqhull.a -lm + cp qhalf .. + + qvoronoi: qvoronoi.o libqhull.a +- $(CC) -o qvoronoi $(CCOPTS2) qvoronoi.o -L. -lqhull -lm ++ $(CC) -o qvoronoi $(CCOPTS2) qvoronoi.o -L. libqhull.a -lm + cp qvoronoi .. + + qhull: unix.o libqhull.a +- $(CC) -o qhull $(CCOPTS2) unix.o -L. -lqhull -lm ++ $(CC) -o qhull $(CCOPTS2) unix.o -L. libqhull.a -lm + cp qhull .. + -chmod +x ../eg/q_test ../eg/q_eg ../eg/q_egtest + -cd ..; ./rbox D4 | ./qhull +@@ -179,11 +181,13 @@ + cp rbox .. + + user_eg: user_eg.o libqhull.a +- $(CC) -o user_eg $(CCOPTS2) user_eg.o -L. -lqhull -lm ++ $(CC) -o user_eg $(CCOPTS2) user_eg.o -L. libqhull.a -lm + cp user_eg .. + + user_eg2: user_eg2.o libqhull.a +- $(CC) -o user_eg2 $(CCOPTS2) user_eg2.o -L. -lqhull -lm ++ $(CC) -o user_eg2 $(CCOPTS2) user_eg2.o -L. libqhull.a -lm + cp user_eg2 .. + + # end of Makefile ++libqhull.so: $(OBJS) ++ c++ -shared -Xlinker -soname -Xlinker $@ -o libqhull.so $(addprefix .libs/,$(OBJS)) diff --git a/media-libs/qhull/metadata.xml b/media-libs/qhull/metadata.xml new file mode 100644 index 000000000000..40b5a161adbe --- /dev/null +++ b/media-libs/qhull/metadata.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>sci-mathematics</herd> + <longdescription lang="en"> + Qhull computes the convex hull, Delaunay triangulation, Voronoi + diagram, halfspace intersection about a point, furthest-site + Delaunay triangulation, and furthest-site Voronoi diagram. The + source code runs in 2-d, 3-d, 4-d, and higher dimensions. Qhull + implements the Quickhull algorithm for computing the convex hull. It + handles roundoff errors from floating point arithmetic. It computes + volumes, surface areas, and approximations to the convex hull. + Qhull does not support constrained Delaunay triangulations, + triangulation of non-convex surfaces, mesh generation of non-convex + objects, or medium-sized inputs in 9-D and higher. +</longdescription> +</pkgmetadata> diff --git a/media-libs/qhull/qhull-2012.1-r1.ebuild b/media-libs/qhull/qhull-2012.1-r1.ebuild new file mode 100644 index 000000000000..15f0ea8cdb10 --- /dev/null +++ b/media-libs/qhull/qhull-2012.1-r1.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit cmake-utils flag-o-matic + +MY_P="${PN}${PV}" +DESCRIPTION="Geometry library" +HOMEPAGE="http://www.qhull.org/" +SRC_URI="${HOMEPAGE}/download/${P}-src.tgz" + +SLOT="0" +LICENSE="BSD" +KEYWORDS="amd64 ~arm ppc ppc64 x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" +IUSE="doc static-libs" + +DOCS=( Announce.txt File_id.diz README.txt REGISTER.txt ) + +src_configure() { + append-flags -fno-strict-aliasing + mycmakeargs+=( + -DLIB_INSTALL_DIR="${EPREFIX}"/usr/$(get_libdir) + -DDOC_INSTALL_DIR="${EPREFIX}"/usr/share/doc/${PF}/html + ) + cmake-utils_src_configure +} + +pkg_preinst() { + # See https://bugs.gentoo.org/show_bug.cgi?id=435006 + # If qhull-2010 is installed we need to remove its include dir so + # that it can be replaced with a symlink in this version. + rm -rf "${ROOT}"usr/include/qhull +} + +src_install() { + cmake-utils_src_install + # compatibility with previous installs + dosym libqhull /usr/include/qhull + use doc || rm -rf "${ED}"/usr/share/doc/${PF}/html + use static-libs || rm -f "${ED}"/usr/$(get_libdir)/lib*.a +} diff --git a/media-libs/qhull/qhull-2012.1-r3.ebuild b/media-libs/qhull/qhull-2012.1-r3.ebuild new file mode 100644 index 000000000000..9e6bf928df37 --- /dev/null +++ b/media-libs/qhull/qhull-2012.1-r3.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit cmake-utils flag-o-matic + +MY_P="${PN}${PV}" + +DESCRIPTION="Geometry library" +HOMEPAGE="http://www.qhull.org/" +SRC_URI="${HOMEPAGE}/download/${P}-src.tgz" + +SLOT="0" +LICENSE="BSD" +KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" +IUSE="doc static-libs" + +DOCS=( Announce.txt File_id.diz README.txt REGISTER.txt ) + +PATCHES=( "${FILESDIR}"/${P}-64bit.patch ) + +src_configure() { + append-flags -fno-strict-aliasing + mycmakeargs+=( + -DLIB_INSTALL_DIR="${EPREFIX}"/usr/$(get_libdir) + -DDOC_INSTALL_DIR="${EPREFIX}"/usr/share/doc/${PF}/html + ) + cmake-utils_src_configure +} + +pkg_preinst() { + # See https://bugs.gentoo.org/show_bug.cgi?id=435006 + # If qhull-2010 is installed we need to remove its include dir so + # that it can be replaced with a symlink in this version. + rm -rf "${EROOT}"usr/include/qhull || die +} + +src_install() { + cmake-utils_src_install + # compatibility with previous installs + dosym libqhull /usr/include/qhull + if ! use doc; then + rm -rf "${ED}"/usr/share/doc/${PF}/html || die + fi + if ! use static-libs; then + rm -f "${ED}"/usr/$(get_libdir)/lib*.a || die + fi +} diff --git a/media-libs/qhull/qhull-2012.1-r4.ebuild b/media-libs/qhull/qhull-2012.1-r4.ebuild new file mode 100644 index 000000000000..56c1456b9c89 --- /dev/null +++ b/media-libs/qhull/qhull-2012.1-r4.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit cmake-utils flag-o-matic + +MY_P="${PN}${PV}" + +DESCRIPTION="Geometry library" +HOMEPAGE="http://www.qhull.org/" +SRC_URI="${HOMEPAGE}/download/${P}-src.tgz" + +SLOT="0" +LICENSE="BSD" +KEYWORDS="~amd64 arm ~ppc ~ppc64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" +IUSE="doc static-libs" + +DOCS=( Announce.txt File_id.diz README.txt REGISTER.txt ) + +PATCHES=( + "${FILESDIR}"/${P}-64bit.patch + "${FILESDIR}"/${P}-format-security.patch + ) + +src_configure() { + append-flags -fno-strict-aliasing + mycmakeargs+=( + -DLIB_INSTALL_DIR="${EPREFIX}"/usr/$(get_libdir) + -DDOC_INSTALL_DIR="${EPREFIX}"/usr/share/doc/${PF}/html + ) + cmake-utils_src_configure +} + +pkg_preinst() { + # See https://bugs.gentoo.org/show_bug.cgi?id=435006 + # If qhull-2010 is installed we need to remove its include dir so + # that it can be replaced with a symlink in this version. + rm -rf "${EROOT}"usr/include/qhull || die +} + +src_install() { + cmake-utils_src_install + # compatibility with previous installs + dosym libqhull /usr/include/qhull + if ! use doc; then + rm -rf "${ED}"/usr/share/doc/${PF}/html || die + fi + if ! use static-libs; then + rm -f "${ED}"/usr/$(get_libdir)/lib*.a || die + fi +} |