Gentoo Archives: gentoo-commits

From: "Sebastien Fabbro (bicatali)" <bicatali@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-libs/ntl/files: ntl-5.5.2-shared.patch ntl-5.5.2-singular.patch ntl-5.5.2-sage-tools.patch ntl-5.5.1-singular.patch linux.mk ntl-5.5.1-sage-tools.patch ntl-5.5.1-shared.patch
Date: Wed, 26 Aug 2009 20:25:58
Message-Id: E1MgNEe-0002tt-7D@stork.gentoo.org
1 bicatali 09/08/26 18:28:40
2
3 Added: ntl-5.5.2-shared.patch ntl-5.5.2-singular.patch
4 ntl-5.5.2-sage-tools.patch
5 Removed: ntl-5.5.1-singular.patch linux.mk
6 ntl-5.5.1-sage-tools.patch ntl-5.5.1-shared.patch
7 Log:
8 Version bump. Now gmp and gf2x are forced. Fixed parallel building, and hopefully as-needed issues (bug #282174). Simplified the shared lib patch. Added sci-mathematics herd as co-maintainer.
9 (Portage version: 2.2_rc38/cvs/Linux x86_64)
10
11 Revision Changes Path
12 1.1 dev-libs/ntl/files/ntl-5.5.2-shared.patch
13
14 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-libs/ntl/files/ntl-5.5.2-shared.patch?rev=1.1&view=markup
15 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-libs/ntl/files/ntl-5.5.2-shared.patch?rev=1.1&content-type=text/plain
16
17 Index: ntl-5.5.2-shared.patch
18 ===================================================================
19 --- src/DoConfig.orig 2009-05-05 07:46:39.000000000 +0100
20 +++ src/DoConfig 2009-08-10 19:24:43.000000000 +0100
21 @@ -25,14 +25,16 @@
22 'LDFLAGS_CXX' => '$(LDFLAGS)',
23 'LDLIBS' => '-lm',
24 'LDLIBS_CXX' => '$(LDLIBS)',
25 +'PICFLAG' => '-fPIC',
26 'CPPFLAGS' => '',
27
28 -'DEF_PREFIX' => '/usr/local',
29 +'DEF_PREFIX' => '/usr',
30
31 'PREFIX' => '$(DEF_PREFIX)',
32 'LIBDIR' => '$(PREFIX)/lib',
33 'INCLUDEDIR' => '$(PREFIX)/include',
34 'DOCDIR' => '$(PREFIX)/share/doc',
35 +'SHMAKE' => 'non-gld',
36
37 'GMP_PREFIX' => '$(DEF_PREFIX)',
38 'GMP_INCDIR' => '$(GMP_PREFIX)/include',
39 @@ -87,11 +89,6 @@
40
41 foreach $arg (@ARGV) {
42
43 - if ($arg =~ '-h|help|-help|--help') {
44 - system("more ../doc/config.txt");
45 - exit;
46 - }
47 -
48 if (($name, $val) = ($arg =~ /(.*?)=(.*)/)) {
49
50 if (exists($MakeFlag{$name}) && ($val =~ 'on|off')) {
51
52
53
54 --- src/mfile.orig 2009-05-05 07:46:39.000000000 +0100
55 +++ src/mfile 2009-08-10 20:31:36.000000000 +0100
56 @@ -141,6 +146,16 @@
57 WIZARD=@{WIZARD}
58 # Set to off if you want to bypass the wizard; otherwise, set to on.
59
60 +###############################################################
61 +#
62 +# New addition for shared library building. With gcc you need to
63 +# choose the Position Indepent Code flag. You have a choice of
64 +# -fpic better code but in rare case not available (ppc)
65 +# -fPIC slightly slower code but guaranted to work anywhere.
66 +#
67 +###############################################################
68 +
69 +PICFLAG=@{PICFLAG}
70
71 #################################################################
72 #
73 @@ -173,6 +188,8 @@
74
75 OBJ=$(O19)
76
77 +SHOBJ=$(subst .o,.lo,$(OBJ))
78 +
79 # library source files
80
81
82 @@ -320,7 +356,7 @@
83 LINK = $(CC) $(NTL_INCLUDE) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS)
84 LINK_CXX = $(CXX) $(NTL_INCLUDE) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS_CXX)
85
86 -
87 +.SUFFIXES: .lo
88
89 # 'make all' does a complete make, including all setup.
90 # It also creates the file 'all', which means you should
91 @@ -328,11 +364,11 @@
92 # again.
93
94 all:
95 - make setup1
96 - make setup2
97 - make setup3
98 - make setup4
99 - make ntl.a
100 + $(MAKE) setup1
101 + $(MAKE) setup2
102 + $(MAKE) setup3
103 + $(MAKE) setup4
104 + $(MAKE) ntl.a
105 touch all
106
107
108 @@ -378,18 +414,31 @@
109 lip.o: lip.c g_lip_impl.h c_lip_impl.h lip_gmp_aux_impl.h
110 $(LCOMP) $(COMPILE) $(GMP_OPT_INCDIR) lip.c
111
112 +lip.lo: lip.c g_lip_impl.h c_lip_impl.h lip_gmp_aux_impl.h
113 + $(LCOMP) $(COMPILE) $(PICFLAG) $(GMP_INCDIR) lip.c -o lip.lo
114 +
115 +
116 +
117 ctools.o: ctools.c
118 $(LCOMP) $(COMPILE) ctools.c
119
120 +ctools.lo: ctools.c
121 + $(LCOMP) $(COMPILE) $(PICFLAG) ctools.c -o ctools.lo
122 +
123
124 GetTime.o: GetTime.c
125 $(LCOMP) $(COMPILE) GetTime.c
126
127 -
128 +GetTime.lo: GetTime.c
129 + $(LCOMP) $(COMPILE) $(PICFLAG) GetTime.c -o GetTime.lo
130
131 .c.o:
132 $(LCOMP) $(COMPILE_CXX) $(GF2X_OPT_INCDIR) $<
133
134 +.c.lo:
135 + $(LCOMP) $(COMPILE_CXX) $(PICFLAG) $(GF2X_OPT_INCDIR) -o $@ $<
136 +
137 +
138 .c:
139 @{LSTAT} $(LINK_CXX) -o $@ $< ntl.a $(GMP_OPT_LIBDIR) $(GMP_OPT_LIB) $(GF2X_OPT_LIBDIR) $(GF2X_OPT_LIB) $(LDLIBS_CXX) #LSTAT
140 @{LSHAR} $(LIBTOOL) --mode=link $(LINK_CXX) -o $@ $< libntl.la #LSHAR
141 @@ -403,7 +452,7 @@
142
143 check:
144 sh RemoveProg $(PROGS)
145 - make QuickTest
146 + $(MAKE) QuickTest
147 ./QuickTest
148 sh RemoveProg QuickTest
149 sh TestScript
150 @@ -460,19 +509,18 @@
151 #
152 #################################################################
153
154 -clobber:
155 +clobber: clean
156 rm -f ntl.a mach_desc.h ../include/NTL/mach_desc.h GetTime.c
157 rm -f lip_gmp_aux_impl.h ../include/NTL/gmp_aux.h
158 - sh RemoveProg $(PROGS) MakeDesc TestGetTime gen_lip_gmp_aux gen_gmp_aux
159 - rm -f *.o
160 - rm -rf small
161 + sh RemoveProg $(PROGS)
162 + rm -f libntl*.so*
163 rm -f cfileout mfileout
164 rm -rf .libs *.lo libntl.la
165 rm -f all
166
167 clean:
168 sh RemoveProg MakeDesc TestGetTime gen_lip_gmp_aux gen_gmp_aux
169 - rm -f *.o
170 + rm -f *.o *.lo
171 rm -rf small
172 @{LSHAR} - $(LIBTOOL) --mode=clean rm -f libntl.la *.lo #LSHAR
173
174 @@ -549,3 +597,6 @@
175
176
177
178 +shared: DIRNAME $(SHOBJ)
179 + $(LINK_CXX) $(PICFLAG) -shared -Wl,-soname,lib`cat DIRNAME`.so -o lib`cat DIRNAME`.so $(SHOBJ) $(GMP_OPT_LIBDIR) $(GMP_OPT_LIB) $(GF2X_OPT_LIBDIR) $(GF2X_OPT_LIB)
180 + ln -s lib`cat DIRNAME`.so libntl.so
181
182
183
184 1.1 dev-libs/ntl/files/ntl-5.5.2-singular.patch
185
186 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-libs/ntl/files/ntl-5.5.2-singular.patch?rev=1.1&view=markup
187 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-libs/ntl/files/ntl-5.5.2-singular.patch?rev=1.1&content-type=text/plain
188
189 Index: ntl-5.5.2-singular.patch
190 ===================================================================
191 --- include/NTL/new.h.orig 2008-05-06 21:56:16.000000000 +1200
192 +++ include/NTL/new.h 2008-05-06 21:56:33.000000000 +1200
193 @@ -12,7 +12,8 @@
194
195 #include <new>
196
197 -#define NTL_NEW_OP new (std::nothrow)
198 +// uncommenting std::nothrow makes this ntl work properly with Singular
199 +#define NTL_NEW_OP new //(std::nothrow)
200
201
202 #else
203
204
205
206 1.1 dev-libs/ntl/files/ntl-5.5.2-sage-tools.patch
207
208 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-libs/ntl/files/ntl-5.5.2-sage-tools.patch?rev=1.1&view=markup
209 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-libs/ntl/files/ntl-5.5.2-sage-tools.patch?rev=1.1&content-type=text/plain
210
211 Index: ntl-5.5.2-sage-tools.patch
212 ===================================================================
213 --- include/NTL/tools.h.orig 2008-05-06 22:14:06.000000000 +1200
214 +++ include/NTL/tools.h 2008-05-06 22:14:23.000000000 +1200
215 @@ -249,6 +249,12 @@
216 char IntValToChar(long a);
217
218
219 +/*
220 + This function is not present in vanilla NTL
221 + See tools.c for documentation.
222 + */
223 +void SetErrorCallbackFunction(void (*func)(const char *s, void *context), void *context);
224 +
225
226 void Error(const char *s);
227
228 --- src/tools.c.orig 2008-05-06 22:15:32.000000000 +1200
229 +++ src/tools.c 2008-05-06 22:15:45.000000000 +1200
230 @@ -8,8 +8,35 @@
231 NTL_START_IMPL
232
233
234 +/*
235 + The following code differs from vanilla NTL
236 +
237 + We add a SetErrorCallbackFunction(). This sets a global callback function _function_,
238 + which gets called with parameter _context_ and an error message string whenever Error()
239 + gets called.
240 +
241 + Note that if the custom error handler *returns*, then NTL will dump the error message
242 + back to stderr and abort() as it habitually does.
243 +
244 + -- David Harvey (2008-04-12)
245 +*/
246 +
247 +void (*ErrorCallbackFunction)(const char*, void*) = NULL;
248 +void *ErrorCallbackContext = NULL;
249 +
250 +
251 +void SetErrorCallbackFunction(void (*function)(const char*, void*), void *context)
252 +{
253 + ErrorCallbackFunction = function;
254 + ErrorCallbackContext = context;
255 +}
256 +
257 +
258 void Error(const char *s)
259 {
260 + if (ErrorCallbackFunction != NULL)
261 + ErrorCallbackFunction(s, ErrorCallbackContext);
262 +
263 cerr << s << "\n";
264 abort();
265 }