Gentoo Archives: gentoo-commits

From: "Patrick Lauer (patrick)" <patrick@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sci-libs/parmgridgen/files: parmgridgen-1.0-autotools.patch
Date: Sat, 25 Apr 2009 16:04:27
Message-Id: E1LxkMZ-0004P4-4w@stork.gentoo.org
1 patrick 09/04/25 16:04:23
2
3 Added: parmgridgen-1.0-autotools.patch
4 Log:
5 Initial import from sunrise overlay. Dependency of OpenFoam. Thanks to Oliver Borm for the ebuild
6 (Portage version: 2.2_rc31/cvs/Linux x86_64)
7
8 Revision Changes Path
9 1.1 sci-libs/parmgridgen/files/parmgridgen-1.0-autotools.patch
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/parmgridgen/files/parmgridgen-1.0-autotools.patch?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/parmgridgen/files/parmgridgen-1.0-autotools.patch?rev=1.1&content-type=text/plain
13
14 Index: parmgridgen-1.0-autotools.patch
15 ===================================================================
16 --- ParMGridGen-1.0-src/mgridgen.h 2001-11-09 00:41:22.000000000 +0100
17 +++ ParMGridGen-1.0/mgridgen.h 1970-01-01 01:00:00.000000000 +0100
18 @@ -1,7 +0,0 @@
19 -typedef int idxtype;
20 -typedef double realtype;
21 -
22 -
23 -void MGridGen(int, idxtype *, realtype *, realtype *, idxtype *, realtype *,
24 - int, int, int *, int *, int *, idxtype *);
25 -
26 --- ParMGridGen-1.0-src/parmgridgen.h 2001-12-06 00:05:37.000000000 +0100
27 +++ ParMGridGen-1.0/parmgridgen.h 1970-01-01 01:00:00.000000000 +0100
28 @@ -1,5 +0,0 @@
29 -typedef int idxtype;
30 -typedef double realtype;
31 -
32 -void ParMGridGen(idxtype *, idxtype *, realtype *, realtype *, idxtype *,
33 - realtype *, int *, int, int, int *, idxtype *, MPI_Comm *);
34 --- ParMGridGen-1.0-src/acx_mpi.m4 1970-01-01 01:00:00.000000000 +0100
35 +++ ParMGridGen-1.0/acx_mpi.m4 2008-07-19 22:10:53.000000000 +0200
36 @@ -0,0 +1,181 @@
37 +# ===========================================================================
38 +# http://autoconf-archive.cryp.to/acx_mpi.html
39 +# ===========================================================================
40 +#
41 +# SYNOPSIS
42 +#
43 +# ACX_MPI([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
44 +#
45 +# DESCRIPTION
46 +#
47 +# This macro tries to find out how to compile programs that use MPI
48 +# (Message Passing Interface), a standard API for parallel process
49 +# communication (see http://www-unix.mcs.anl.gov/mpi/)
50 +#
51 +# On success, it sets the MPICC, MPICXX, MPIF77, or MPIFC output variable
52 +# to the name of the MPI compiler, depending upon the current language.
53 +# (This may just be $CC/$CXX/$F77/$FC, but is more often something like
54 +# mpicc/mpiCC/mpif77/mpif90.) It also sets MPILIBS to any libraries that
55 +# are needed for linking MPI (e.g. -lmpi or -lfmpi, if a special
56 +# MPICC/MPICXX/MPIF77/MPIFC was not found).
57 +#
58 +# If you want to compile everything with MPI, you should set:
59 +#
60 +# CC="MPICC" #OR# CXX="MPICXX" #OR# F77="MPIF77" #OR# FC="MPIFC"
61 +# LIBS="$MPILIBS $LIBS"
62 +#
63 +# NOTE: The above assumes that you will use $CC (or whatever) for linking
64 +# as well as for compiling. (This is the default for automake and most
65 +# Makefiles.)
66 +#
67 +# The user can force a particular library/compiler by setting the
68 +# MPICC/MPICXX/MPIF77/MPIFC and/or MPILIBS environment variables.
69 +#
70 +# ACTION-IF-FOUND is a list of shell commands to run if an MPI library is
71 +# found, and ACTION-IF-NOT-FOUND is a list of commands to run if it is not
72 +# found. If ACTION-IF-FOUND is not specified, the default action will
73 +# define HAVE_MPI.
74 +#
75 +# LAST MODIFICATION
76 +#
77 +# 2008-04-12
78 +#
79 +# COPYLEFT
80 +#
81 +# Copyright (c) 2008 Steven G. Johnson <stevenj@××××××××.edu>
82 +# Copyright (c) 2008 Julian C. Cummings <cummings@××××××××××××.edu>
83 +#
84 +# This program is free software: you can redistribute it and/or modify it
85 +# under the terms of the GNU General Public License as published by the
86 +# Free Software Foundation, either version 3 of the License, or (at your
87 +# option) any later version.
88 +#
89 +# This program is distributed in the hope that it will be useful, but
90 +# WITHOUT ANY WARRANTY; without even the implied warranty of
91 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
92 +# Public License for more details.
93 +#
94 +# You should have received a copy of the GNU General Public License along
95 +# with this program. If not, see <http://www.gnu.org/licenses/>.
96 +#
97 +# As a special exception, the respective Autoconf Macro's copyright owner
98 +# gives unlimited permission to copy, distribute and modify the configure
99 +# scripts that are the output of Autoconf when processing the Macro. You
100 +# need not follow the terms of the GNU General Public License when using
101 +# or distributing such scripts, even though portions of the text of the
102 +# Macro appear in them. The GNU General Public License (GPL) does govern
103 +# all other use of the material that constitutes the Autoconf Macro.
104 +#
105 +# This special exception to the GPL applies to versions of the Autoconf
106 +# Macro released by the Autoconf Macro Archive. When you make and
107 +# distribute a modified version of the Autoconf Macro, you may extend this
108 +# special exception to the GPL to apply to your modified version as well.
109 +
110 +AC_DEFUN([ACX_MPI], [
111 +AC_PREREQ(2.50) dnl for AC_LANG_CASE
112 +
113 +AC_LANG_CASE([C], [
114 + AC_REQUIRE([AC_PROG_CC])
115 + AC_ARG_VAR(MPICC,[MPI C compiler command])
116 + AC_CHECK_PROGS(MPICC, mpicc hcc mpxlc_r mpxlc mpcc cmpicc, $CC)
117 + acx_mpi_save_CC="$CC"
118 + CC="$MPICC"
119 + AC_SUBST(MPICC)
120 +],
121 +[C++], [
122 + AC_REQUIRE([AC_PROG_CXX])
123 + AC_ARG_VAR(MPICXX,[MPI C++ compiler command])
124 + AC_CHECK_PROGS(MPICXX, mpic++ mpicxx mpiCC hcp mpxlC_r mpxlC mpCC cmpic++, $CXX)
125 + acx_mpi_save_CXX="$CXX"
126 + CXX="$MPICXX"
127 + AC_SUBST(MPICXX)
128 +],
129 +[Fortran 77], [
130 + AC_REQUIRE([AC_PROG_F77])
131 + AC_ARG_VAR(MPIF77,[MPI Fortran 77 compiler command])
132 + AC_CHECK_PROGS(MPIF77, mpif77 hf77 mpxlf_r mpxlf mpf77 cmpifc, $F77)
133 + acx_mpi_save_F77="$F77"
134 + F77="$MPIF77"
135 + AC_SUBST(MPIF77)
136 +],
137 +[Fortran], [
138 + AC_REQUIRE([AC_PROG_FC])
139 + AC_ARG_VAR(MPIFC,[MPI Fortran compiler command])
140 + AC_CHECK_PROGS(MPIFC, mpif90 mpxlf95_r mpxlf90_r mpxlf95 mpxlf90 mpf90 cmpif90c, $FC)
141 + acx_mpi_save_FC="$FC"
142 + FC="$MPIFC"
143 + AC_SUBST(MPIFC)
144 +])
145 +
146 +if test x = x"$MPILIBS"; then
147 + AC_LANG_CASE([C], [AC_CHECK_FUNC(MPI_Init, [MPILIBS=" "])],
148 + [C++], [AC_CHECK_FUNC(MPI_Init, [MPILIBS=" "])],
149 + [Fortran 77], [AC_MSG_CHECKING([for MPI_Init])
150 + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[ call MPI_Init])],[MPILIBS=" "
151 + AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)])],
152 + [Fortran], [AC_MSG_CHECKING([for MPI_Init])
153 + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[ call MPI_Init])],[MPILIBS=" "
154 + AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)])])
155 +fi
156 +AC_LANG_CASE([Fortran 77], [
157 + if test x = x"$MPILIBS"; then
158 + AC_CHECK_LIB(fmpi, MPI_Init, [MPILIBS="-lfmpi"])
159 + fi
160 + if test x = x"$MPILIBS"; then
161 + AC_CHECK_LIB(fmpich, MPI_Init, [MPILIBS="-lfmpich"])
162 + fi
163 +],
164 +[Fortran], [
165 + if test x = x"$MPILIBS"; then
166 + AC_CHECK_LIB(fmpi, MPI_Init, [MPILIBS="-lfmpi"])
167 + fi
168 + if test x = x"$MPILIBS"; then
169 + AC_CHECK_LIB(mpichf90, MPI_Init, [MPILIBS="-lmpichf90"])
170 + fi
171 +])
172 +if test x = x"$MPILIBS"; then
173 + AC_CHECK_LIB(mpi, MPI_Init, [MPILIBS="-lmpi"])
174 +fi
175 +if test x = x"$MPILIBS"; then
176 + AC_CHECK_LIB(mpich, MPI_Init, [MPILIBS="-lmpich"])
177 +fi
178 +
179 +dnl We have to use AC_TRY_COMPILE and not AC_CHECK_HEADER because the
180 +dnl latter uses $CPP, not $CC (which may be mpicc).
181 +AC_LANG_CASE([C], [if test x != x"$MPILIBS"; then
182 + AC_MSG_CHECKING([for mpi.h])
183 + AC_TRY_COMPILE([#include <mpi.h>],[],[AC_MSG_RESULT(yes)], [MPILIBS=""
184 + AC_MSG_RESULT(no)])
185 +fi],
186 +[C++], [if test x != x"$MPILIBS"; then
187 + AC_MSG_CHECKING([for mpi.h])
188 + AC_TRY_COMPILE([#include <mpi.h>],[],[AC_MSG_RESULT(yes)], [MPILIBS=""
189 + AC_MSG_RESULT(no)])
190 +fi],
191 +[Fortran 77], [if test x != x"$MPILIBS"; then
192 + AC_MSG_CHECKING([for mpif.h])
193 + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[ include 'mpif.h'])],[AC_MSG_RESULT(yes)], [MPILIBS=""
194 + AC_MSG_RESULT(no)])
195 +fi],
196 +[Fortran], [if test x != x"$MPILIBS"; then
197 + AC_MSG_CHECKING([for mpif.h])
198 + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[ include 'mpif.h'])],[AC_MSG_RESULT(yes)], [MPILIBS=""
199 + AC_MSG_RESULT(no)])
200 +fi])
201 +
202 +AC_LANG_CASE([C], [CC="$acx_mpi_save_CC"],
203 + [C++], [CXX="$acx_mpi_save_CXX"],
204 + [Fortran 77], [F77="$acx_mpi_save_F77"],
205 + [Fortran], [FC="$acx_mpi_save_FC"])
206 +
207 +AC_SUBST(MPILIBS)
208 +
209 +# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
210 +if test x = x"$MPILIBS"; then
211 + $2
212 + :
213 +else
214 + ifelse([$1],,[AC_DEFINE(HAVE_MPI,1,[Define if you have the MPI library.])],[$1])
215 + :
216 +fi
217 +])dnl ACX_MPI
218 --- ParMGridGen-1.0-src/mgridgen.pc.in 1970-01-01 01:00:00.000000000 +0100
219 +++ ParMGridGen-1.0/mgridgen.pc.in 2008-07-20 15:34:06.000000000 +0200
220 @@ -0,0 +1,10 @@
221 +prefix=@prefix@
222 +exec_prefix=@exec_prefix@
223 +libdir=@libdir@
224 +includedir=@includedir@
225 +
226 +Name: MGridGen
227 +Description: Software for generating coarse grids
228 +Version: @VERSION@
229 +Libs: -L${libdir} -lIMlib -lMGridGen
230 +Cflags: -I${includedir}/mgridgen
231 --- ParMGridGen-1.0-src/parmgridgen.pc.in 1970-01-01 01:00:00.000000000 +0100
232 +++ ParMGridGen-1.0/parmgridgen.pc.in 2008-07-20 15:49:53.000000000 +0200
233 @@ -0,0 +1,10 @@
234 +prefix=@prefix@
235 +exec_prefix=@exec_prefix@
236 +libdir=@libdir@
237 +includedir=@includedir@
238 +
239 +Name: ParMGridGen
240 +Description: Software for parallel (mpi) generating coarse grids
241 +Version: @VERSION@
242 +Libs: -L${libdir} -lIMparmetis -lParMGridGen
243 +Cflags: -I${includedir}/imparmetis -I${includedir}/parmgridgen
244 --- ParMGridGen-1.0-src/configure.ac 1970-01-01 01:00:00.000000000 +0100
245 +++ ParMGridGen-1.0/configure.ac 2008-07-20 16:05:45.000000000 +0200
246 @@ -0,0 +1,24 @@
247 +# -*- Autoconf -*-
248 +AC_PREREQ(2.61)
249 +AC_INIT(parmgridgen, 1.0, moulitsa@××××××.edu)
250 +AM_INIT_AUTOMAKE([foreign])
251 +AC_CONFIG_HEADER([config.h])
252 +AC_PROG_INSTALL
253 +AC_PROG_LIBTOOL
254 +AC_CHECK_LIB(m, sqrt)
255 +sinclude(acx_mpi.m4)
256 +AC_LANG_PUSH([C])
257 +ACX_MPI([], AC_MSG_ERROR([could not compile an mpi test program]))
258 +AC_CONFIG_FILES([Makefile
259 + mgridgen.pc
260 + parmgridgen.pc
261 + MGridGen/Makefile
262 + MGridGen/IMlib/Makefile
263 + MGridGen/Lib/Makefile
264 + MGridGen/Programs/Makefile
265 + ParMGridGen/Makefile
266 + ParMGridGen/IMParMetis-2.0/Makefile
267 + ParMGridGen/IMParMetis-2.0/ParMETISLib/Makefile
268 + ParMGridGen/ParLib/Makefile
269 + ParMGridGen/Programs/Makefile])
270 +AC_OUTPUT
271 --- ParMGridGen-1.0-src/Makefile.am 1970-01-01 01:00:00.000000000 +0100
272 +++ ParMGridGen-1.0/Makefile.am 2008-07-20 15:55:52.000000000 +0200
273 @@ -0,0 +1,7 @@
274 +## top directory
275 +
276 +SUBDIRS = MGridGen ParMGridGen
277 +EXTRA_DIST = VERSION mgridgen.pc.in parmgridgen.pc.in
278 +
279 +pkgconfigdir = $(libdir)/pkgconfig
280 +pkgconfig_DATA = mgridgen.pc parmgridgen.pc
281 --- ParMGridGen-1.0-src/MGridGen/Makefile.am 1970-01-01 01:00:00.000000000 +0100
282 +++ ParMGridGen-1.0/MGridGen/Makefile.am 2008-07-19 22:53:47.000000000 +0200
283 @@ -0,0 +1,4 @@
284 +## middle directory
285 +
286 +#Build in these directories:
287 +SUBDIRS= IMlib Lib Programs
288 --- ParMGridGen-1.0-src/MGridGen/IMlib/Makefile.am 1970-01-01 01:00:00.000000000 +0100
289 +++ ParMGridGen-1.0/MGridGen/IMlib/Makefile.am 2008-07-19 22:48:10.000000000 +0200
290 @@ -0,0 +1,8 @@
291 +## Source directory
292 +
293 +pkginclude_HEADERS = IMlib.h
294 +pkgincludedir = $(includedir)/mgridgen
295 +
296 +lib_LTLIBRARIES = libIMlib.la
297 +libIMlib_la_SOURCES = blas.c dfkeysort.c dkeysort.c file.c ifkeysort.c ifloatsort.c iintsort.c ikeysort.c memory.c sort.c util.c
298 +libIMlib_la_LDFLAGS = -no-undefined -export-dynamic -version-info 1:0:0
299 --- ParMGridGen-1.0-src/MGridGen/Lib/Makefile.am 1970-01-01 01:00:00.000000000 +0100
300 +++ ParMGridGen-1.0/MGridGen/Lib/Makefile.am 2008-07-19 22:43:36.000000000 +0200
301 @@ -0,0 +1,10 @@
302 +## Source directory
303 +
304 +INCLUDES = -I../IMlib
305 +
306 +pkginclude_HEADERS = defs.h macros.h mgridgen.h proto.h struct.h
307 +pkgincludedir = $(includedir)/mgridgen
308 +
309 +lib_LTLIBRARIES = libMGridGen.la
310 +libMGridGen_la_SOURCES = aratio.c coarsen.c kwayfm.c match.c merge.c mgridgen.c refine.c setup.c
311 +libMGridGen_la_LDFLAGS = -no-undefined -export-dynamic -version-info 1:0:0
312 --- ParMGridGen-1.0-src/MGridGen/Programs/Makefile.am 1970-01-01 01:00:00.000000000 +0100
313 +++ ParMGridGen-1.0/MGridGen/Programs/Makefile.am 2008-07-19 23:38:41.000000000 +0200
314 @@ -0,0 +1,7 @@
315 +## Source directory
316 +
317 +INCLUDES = -I../IMlib -I../Lib
318 +
319 +bin_PROGRAMS = mgridgen
320 +mgridgen_SOURCES = io.c mgridgen.c
321 +mgridgen_LDADD = ../IMlib/libIMlib.la ../Lib/libMGridGen.la -lm
322 --- ParMGridGen-1.0-src/ParMGridGen/Makefile.am 1970-01-01 01:00:00.000000000 +0100
323 +++ ParMGridGen-1.0/ParMGridGen/Makefile.am 2008-07-20 16:04:31.000000000 +0200
324 @@ -0,0 +1,4 @@
325 +## middle directory
326 +
327 +#Build in these directories:
328 +SUBDIRS= IMParMetis-2.0 ParLib Programs
329 --- ParMGridGen-1.0-src/ParMGridGen/IMParMetis-2.0/Makefile.am 1970-01-01 01:00:00.000000000 +0100
330 +++ ParMGridGen-1.0/ParMGridGen/IMParMetis-2.0/Makefile.am 2008-07-20 15:24:55.000000000 +0200
331 @@ -0,0 +1,4 @@
332 +## middle directory
333 +
334 +#Build in these directories:
335 +SUBDIRS= ParMETISLib
336 --- ParMGridGen-1.0-src/ParMGridGen/IMParMetis-2.0/ParMETISLib/Makefile.am 1970-01-01 01:00:00.000000000 +0100
337 +++ ParMGridGen-1.0/ParMGridGen/IMParMetis-2.0/ParMETISLib/Makefile.am 2008-07-20 16:18:31.000000000 +0200
338 @@ -0,0 +1,8 @@
339 +## Source directory
340 +
341 +pkginclude_HEADERS = defs.h macros.h parmetis.h proto.h rename.h struct.h
342 +pkgincludedir = $(includedir)/imparmetis
343 +
344 +lib_LTLIBRARIES = libIMparmetis.la
345 +libIMparmetis_la_SOURCES = coarsen.c comm.c debug.c diffuse.c drivers.c edge_refine.c fused.c grsetup.c iidxsort.c ikeysort.c memory.c remap.c setup.c timer.c util.c var.c
346 +libIMparmetis_la_LDFLAGS = -no-undefined -export-dynamic -version-info 1:0:0
347 --- ParMGridGen-1.0-src/ParMGridGen/ParLib/Makefile.am 1970-01-01 01:00:00.000000000 +0100
348 +++ ParMGridGen-1.0/ParMGridGen/ParLib/Makefile.am 2008-07-20 15:53:06.000000000 +0200
349 @@ -0,0 +1,10 @@
350 +## Source directory
351 +
352 +INCLUDES = -I$(top_builddir)/MGridGen/IMlib
353 +
354 +pkginclude_HEADERS = defs.h macros.h parmgridgen.h proto.h rename.h struct.h
355 +pkgincludedir = $(includedir)/parmgridgen
356 +
357 +lib_LTLIBRARIES = libParMGridGen.la
358 +libParMGridGen_la_SOURCES = comm.c debug.c grsetup.c ikeysort.c memory.c move.c parmgridgen.c setup.c util.c
359 +libParMGridGen_la_LDFLAGS = -no-undefined -export-dynamic -version-info 1:0:0
360 --- ParMGridGen-1.0-src/ParMGridGen/Programs/Makefile.am 1970-01-01 01:00:00.000000000 +0100
361 +++ ParMGridGen-1.0/ParMGridGen/Programs/Makefile.am 2008-07-20 16:24:19.000000000 +0200
362 @@ -0,0 +1,21 @@
363 +## Source directory
364 +
365 +INCLUDES = -I../ParLib -I$(top_builddir)/MGridGen/IMlib
366 +
367 +bin_PROGRAMS = parmgridgen
368 +parmgridgen_SOURCES = io.c main.c parmgridgen.c
369 +parmgridgen_LDADD = ../IMParMetis-2.0/ParMETISLib/libIMparmetis.la ../ParLib/libParMGridGen.la \
370 + $(top_builddir)/MGridGen/IMlib/libIMlib.la $(top_builddir)/MGridGen/Lib/libMGridGen.la @MPILIBS@
371 +
372 +# AM_CPPFLAGS = -I$(top_srcdir)/ParMETISLib
373 +# LDADD = $(top_builddir)/METISLib/libmetis.la \
374 +# $(top_builddir)/ParMETISLib/libparmetis.la
375 +
376 +# check_PROGRAMS = parmgridgen
377 +# parmgridgen_SOURCES = io.c main.c parmgridgen.c
378 +
379 +MPIRUN = mpirun -np 4
380 +
381 +check-local: $(check_PROGRAMS)
382 + $(MPIRUN) parmgridgen $(top_builddir)/Graphs/M6.metis 3 4 6 1 4 128
383 +