1 |
bicatali 10/10/03 21:55:52 |
2 |
|
3 |
Added: qhull-2010.1-overflows.patch |
4 |
qhull-2010.1-cmake-install.patch |
5 |
Log: |
6 |
Added a patch for overflows. Add a patch that allows to install everything with cmake, so install include file and libararies properly now fixing bug #338964. Added longdescription and a static-libs use flag. |
7 |
|
8 |
(Portage version: 2.2_rc88/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.1 media-libs/qhull/files/qhull-2010.1-overflows.patch |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/qhull/files/qhull-2010.1-overflows.patch?rev=1.1&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/qhull/files/qhull-2010.1-overflows.patch?rev=1.1&content-type=text/plain |
15 |
|
16 |
Index: qhull-2010.1-overflows.patch |
17 |
=================================================================== |
18 |
From 176c01851026125f574a8223ad49ec58b2b58ec0 Mon Sep 17 00:00:00 2001 |
19 |
From: Johannes Obermayr <johannesobermayr@×××.de> |
20 |
Date: Fri, 23 Jul 2010 20:02:19 +0200 |
21 |
Subject: [PATCH] Fix some serious compiler warnings causing build breakage on openSUSE. |
22 |
|
23 |
--- |
24 |
src/global.c | 2 +- |
25 |
src/rboxlib.c | 6 +++--- |
26 |
2 files changed, 4 insertions(+), 4 deletions(-) |
27 |
|
28 |
diff --git a/src/global.c b/src/global.c |
29 |
index 3c6141a..4c9f56c 100644 |
30 |
--- a/src/global.c |
31 |
+++ b/src/global.c |
32 |
@@ -614,7 +614,7 @@ void qh_initflags(char *command) { |
33 |
if (command <= &qh qhull_command[0] || command > &qh qhull_command[0] + sizeof(qh qhull_command)) { |
34 |
if (command != &qh qhull_command[0]) { |
35 |
*qh qhull_command= '\0'; |
36 |
- strncat( qh qhull_command, command, sizeof( qh qhull_command)); |
37 |
+ strncat(qh qhull_command, command, sizeof(qh qhull_command)-strlen(qh qhull_command)-1); |
38 |
} |
39 |
while (*s && !isspace(*s)) /* skip program name */ |
40 |
s++; |
41 |
diff --git a/src/rboxlib.c b/src/rboxlib.c |
42 |
index 4f11d22..17d01ac 100644 |
43 |
--- a/src/rboxlib.c |
44 |
+++ b/src/rboxlib.c |
45 |
@@ -124,7 +124,7 @@ int qh_rboxpoints(FILE* fout, FILE* ferr, char* rbox_command) { |
46 |
} |
47 |
|
48 |
*command= '\0'; |
49 |
- strncat(command, rbox_command, sizeof(command)); |
50 |
+ strncat(command, rbox_command, sizeof(command)-strlen(command)-1); |
51 |
|
52 |
while (*s && !isspace(*s)) /* skip program name */ |
53 |
s++; |
54 |
@@ -346,8 +346,8 @@ int qh_rboxpoints(FILE* fout, FILE* ferr, char* rbox_command) { |
55 |
} |
56 |
}else if (israndom) { |
57 |
seed= (int)time(&timedata); |
58 |
- sprintf(seedbuf, " t%d", seed); /* appends an extra t, not worth removing */ |
59 |
- strncat(command, seedbuf, sizeof(command)); |
60 |
+ printf(seedbuf, " t%d", seed); /* appends an extra t, not worth removing */ |
61 |
+ strncat(command, seedbuf, sizeof(command)-strlen(command)-1); |
62 |
t= strstr(command, " t "); |
63 |
if (t) |
64 |
strcpy(t+1, t+3); /* remove " t " */ |
65 |
-- |
66 |
1.6.1 |
67 |
|
68 |
|
69 |
|
70 |
|
71 |
1.1 media-libs/qhull/files/qhull-2010.1-cmake-install.patch |
72 |
|
73 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/qhull/files/qhull-2010.1-cmake-install.patch?rev=1.1&view=markup |
74 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/qhull/files/qhull-2010.1-cmake-install.patch?rev=1.1&content-type=text/plain |
75 |
|
76 |
Index: qhull-2010.1-cmake-install.patch |
77 |
=================================================================== |
78 |
diff -Nur qhull-2010.1.orig/CMakeLists.txt qhull-2010.1/CMakeLists.txt |
79 |
--- qhull-2010.1.orig/CMakeLists.txt 2010-01-10 00:07:32.000000000 +0000 |
80 |
+++ qhull-2010.1/CMakeLists.txt 2010-10-03 22:16:50.000000000 +0100 |
81 |
@@ -1,8 +1,44 @@ |
82 |
project(qhull) |
83 |
-cmake_minimum_required(VERSION 2.4) |
84 |
-if(COMMAND cmake_policy) |
85 |
- cmake_policy(SET CMP0003 NEW) |
86 |
-endif(COMMAND cmake_policy) |
87 |
+cmake_minimum_required(VERSION 2.6) |
88 |
+ |
89 |
+ |
90 |
+set(QHULL_VERSION "2010.1") |
91 |
+ |
92 |
+if(INCLUDE_INSTALL_DIR) |
93 |
+else() |
94 |
+set(INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include) |
95 |
+endif() |
96 |
+if(LIB_INSTALL_DIR) |
97 |
+else() |
98 |
+set(LIB_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib) |
99 |
+endif() |
100 |
+if(BIN_INSTALL_DIR) |
101 |
+else() |
102 |
+set(BIN_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/bin) |
103 |
+endif() |
104 |
+if(DOC_INSTALL_DIR) |
105 |
+else() |
106 |
+set(DOC_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/share/doc/qhull) |
107 |
+endif() |
108 |
+ |
109 |
+message(STATUS) |
110 |
+message(STATUS "========== qhull Build Information ==========") |
111 |
+message(STATUS "Build Version: ${QHULL_VERSION}") |
112 |
+message(STATUS "Install Prefix (CMAKE_INSTALL_PREFIX): ${CMAKE_INSTALL_PREFIX}") |
113 |
+message(STATUS "Binary Directory (BIN_INSTALL_DIR): ${BIN_INSTALL_DIR}") |
114 |
+message(STATUS "Library Directory (LIB_INSTALL_DIR): ${LIB_INSTALL_DIR}") |
115 |
+message(STATUS "Include Directory (INCLUDE_INSTALL_DIR): ${INCLUDE_INSTALL_DIR}") |
116 |
+message(STATUS "Documentation Directory (DOC_INSTALL_DIR): ${DOC_INSTALL_DIR}") |
117 |
+message(STATUS) |
118 |
+message(STATUS "To change any of these options, override them using -D{OPTION_NAME} on the commandline.") |
119 |
+message(STATUS "To build and install qhull, run \"make\" and \"make install\"") |
120 |
+message(STATUS) |
121 |
+ |
122 |
|
123 |
add_subdirectory(src) |
124 |
+option(WITH_STATIC_LIBS "Build with a static library" OFF) |
125 |
+option(WITH_DOCS "Install HTML documentation" OFF) |
126 |
|
127 |
+if (WITH_DOCS) |
128 |
+install(DIRECTORY html/ DESTINATION ${DOC_INSTALL_DIR}) |
129 |
+endif (WITH_DOCS) |
130 |
diff -Nur qhull-2010.1.orig/src/CMakeLists.txt qhull-2010.1/src/CMakeLists.txt |
131 |
--- qhull-2010.1.orig/src/CMakeLists.txt 2010-01-10 00:07:32.000000000 +0000 |
132 |
+++ qhull-2010.1/src/CMakeLists.txt 2010-10-03 22:21:34.000000000 +0100 |
133 |
@@ -23,8 +23,25 @@ |
134 |
|
135 |
file(GLOB qhull_hdr *.h) |
136 |
|
137 |
-add_library(qhull ${qhull_src}) |
138 |
+add_library(qhull SHARED ${qhull_src}) |
139 |
target_link_libraries(qhull m) |
140 |
+if(UNIX) |
141 |
+ if(APPLE) |
142 |
+ set_target_properties(qhull PROPERTIES |
143 |
+ INSTALL_NAME_DIR "${LIB_INSTALL_DIR}") |
144 |
+ else(APPLE) |
145 |
+ set_target_properties(qhull PROPERTIES |
146 |
+ INSTALL_RPATH "${LIB_INSTALL_DIR}" |
147 |
+ INSTALL_RPATH_USE_LINK_PATH TRUE |
148 |
+ BUILD_WITH_INSTALL_RPATH FALSE) |
149 |
+ endif(APPLE) |
150 |
+endif(UNIX) |
151 |
+ |
152 |
+if(WITH_STATIC_LIBS) |
153 |
+ add_library(qhullstatic STATIC ${qhull_src}) |
154 |
+ set_property(TARGET qhullstatic PROPERTY OUTPUT_NAME "qhull") |
155 |
+ install(TARGETS qhullstatic ARCHIVE DESTINATION ${LIB_INSTALL_DIR}) |
156 |
+endif(WITH_STATIC_LIBS) |
157 |
|
158 |
set(qhullcmd_SOURCES unix.c) |
159 |
set(rbox_SOURCES rbox.c) |
160 |
@@ -36,6 +53,7 @@ |
161 |
|
162 |
add_executable(qhullcmd ${qhullcmd_SOURCES}) |
163 |
target_link_libraries(qhullcmd qhull) |
164 |
+set_property(TARGET qhullcmd PROPERTY OUTPUT_NAME "qhull") |
165 |
|
166 |
add_executable(rbox ${rbox_SOURCES}) |
167 |
target_link_libraries(rbox qhull) |
168 |
@@ -52,3 +70,7 @@ |
169 |
add_executable(qhalf ${qhalf_SOURCES}) |
170 |
target_link_libraries(qhalf qhull) |
171 |
|
172 |
+install(TARGETS qhull qhullcmd rbox qconvex qdelaunay qvoronoi qhalf |
173 |
+ RUNTIME DESTINATION ${BIN_INSTALL_DIR} |
174 |
+ LIBRARY DESTINATION ${LIB_INSTALL_DIR}) |
175 |
+install(FILES libqhull.h DESTINATION ${INCLUDE_INSTALL_DIR}) |