Gentoo Archives: gentoo-commits

From: "Sebastien Fabbro (bicatali)" <bicatali@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sci-libs/cfitsio/files: cfitsio-3.080-autotools.patch
Date: Mon, 02 Jun 2008 08:26:58
Message-Id: E1K35NU-0002oR-Fu@stork.gentoo.org
1 bicatali 08/06/02 08:26:52
2
3 Added: cfitsio-3.080-autotools.patch
4 Log:
5 Version bump with similar autotools changes and license fix as for 2.510-r2 version
6 (Portage version: 2.1.5.2)
7
8 Revision Changes Path
9 1.1 sci-libs/cfitsio/files/cfitsio-3.080-autotools.patch
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/cfitsio/files/cfitsio-3.080-autotools.patch?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/cfitsio/files/cfitsio-3.080-autotools.patch?rev=1.1&content-type=text/plain
13
14 Index: cfitsio-3.080-autotools.patch
15 ===================================================================
16 --- configure.ac.absent 1970-01-01 01:00:00.000000000 +0100
17 +++ configure.ac 2008-06-02 01:08:32.000000000 +0100
18 @@ -0,0 +1,158 @@
19 +AC_PREREQ(2.59)
20 +AC_INIT([cfitsio], [3.080], [pence@×××××××××××××××.gov])
21 +AC_CONFIG_SRCDIR([fitscore.c])
22 +AM_INIT_AUTOMAKE([foreign])
23 +
24 +
25 +AC_PROG_LIBTOOL
26 +dnl no api version info, so simply copy package version
27 +SHARED_VERSION_INFO="3:0:0"
28 +AC_SUBST(SHARED_VERSION_INFO)
29 +
30 +AC_PROG_YACC
31 +AC_PROG_LEX
32 +
33 +AC_MSG_CHECKING([whether to enable fortran interface])
34 +AC_ARG_ENABLE([fortran],
35 + AS_HELP_STRING([--enable-fortran], [Build the fortran interface]),
36 + [ENABLE_FORTRAN=$enableval
37 + AC_MSG_RESULT([$enableval])],
38 + [ENABLE_FORTRAN=no
39 + AC_MSG_RESULT([no])]
40 +)
41 +
42 +if test x"$ENABLE_FORTRAN" = x"yes" ; then
43 + AC_PROG_F77
44 + if test x$F77 = xg77; then
45 + cfortran_def=g77Fortran
46 + elif test x$F77 = xifort ; then
47 + cfortran_def=INTEL_COMPILER
48 + elif test x$F77 = xgfortran ; then
49 + cfortran_def=gFortran
50 + elif test x$F77 = xpgf77 ; then
51 + cfortran_def=pgiFortran
52 + else
53 + cfortran_def=f2cFortran
54 + fi
55 + CPPFLAGS_FORTRAN="-D$cfortran_def"
56 + AC_SUBST(CPPFLAGS_FORTRAN)
57 +fi
58 +AC_SUBST([ENABLE_FORTRAN])
59 +AM_CONDITIONAL([ENABLE_FORTRAN], test "x$ENABLE_FORTRAN" = "xyes")
60 +
61 +AC_CANONICAL_HOST
62 +case $host in
63 + *apple*darwin*)
64 + dnl may break Absoft compilers
65 + AC_DEFINE(_LARGEFILE_SOURCE, [1],
66 + [Define to 1 if you have large file support])
67 + AC_DEFINE(_FILE_OFFSET_BITS, [64],
68 + [Offsets bits in files])
69 + ;;
70 + *hppa*)
71 + CPPFLAGS_EXTRA="-DPG_PPU"
72 + ;;
73 + *sunos5*)
74 + AC_DEFINE(_LARGEFILE_SOURCE, [1],
75 + [Define to 1 if you have large file support])
76 + AC_DEFINE(_FILE_OFFSET_BITS, [64],
77 + [Offsets bits in files])
78 + CPPFLAGS_EXTRA="-DHAVE_ALLOCA_H -DHAVE_POSIX_SIGNALS"
79 + ;;
80 + *irix*)
81 + CPPFLAGS_EXTRA="-DHAVE_POSIX_SIGNALS"
82 + ;;
83 + *linux*)
84 + AC_DEFINE(_LARGEFILE_SOURCE, [1],
85 + [Define to 1 if you have large file support])
86 + AC_DEFINE(_FILE_OFFSET_BITS, [64],
87 + [Offsets bits in files])
88 + ;;
89 + *cygwin*)
90 + CPPFLAGS_EXTRA="-DHAVE_POSIX_SIGNALS"
91 + ;;
92 + *)
93 + ;;
94 +esac
95 +AC_SUBST(CPPFLAGS_EXTRA)
96 +
97 +AC_CHECK_FUNCS([ftruncate])
98 +AC_CHECK_FUNCS([shmat shmdt shmget],
99 + AC_DEFINE(HAVE_SHMEM_SERVICES, [1],
100 + [Define to yes if you have shared memory functions])
101 +)
102 +AC_CHECK_FUNCS([gethostbyname connect],
103 + [AC_DEFINE(HAVE_NET_SERVICES, [1],
104 + [Define to 1 if you have network functions])]
105 +)
106 +AC_CHECK_TYPE(long long,
107 + [AC_DEFINE(HAVE_LONGLONG, [1],
108 + [Define to 1 if your compiler supports long long])]
109 +)
110 +dnl check for flock_t
111 +AC_COMPILE_IFELSE(
112 + [AC_LANG_PROGRAM([[
113 +#include <sys/fcntl.h>
114 + ]], [[
115 +flock_t filler;
116 + ]])],
117 + [AC_DEFINE(HAVE_FLOCK_T, 1, [if you have flock_t])
118 + AC_MSG_RESULT("yes")],
119 + [AC_MSG_RESULT("no") ])
120 +
121 +if test "$HAVE_FLOCK_T" != 1; then
122 + AC_COMPILE_IFELSE([
123 + AC_LANG_PROGRAM([[
124 +#include <sys/flock.h>
125 + ]], [[
126 +flock_t filler;
127 + ]])],
128 + [AC_DEFINE(HAVE_FLOCK_T, 1, [if you have flock_t])
129 + AC_MSG_RESULT("yes")],
130 + [AC_MSG_RESULT("no") ])
131 +fi
132 +
133 +# check for union semun type
134 +AC_CHECK_TYPE(union semun,
135 + AC_DEFINE(HAVE_UNION_SEMUN, [1],
136 + [Define to 1 if you have semun in sys/sem.h]),,[
137 +#include <sys/types.h>
138 +#include <sys/ipc.h>
139 +#include <sys/sem.h>
140 + ]
141 +)
142 +
143 +dnl this quick check will add -lm to LIBS
144 +AC_CHECK_LIB(m, cos)
145 +
146 +AC_ARG_WITH(gsiftp-flavour,
147 + [ --with-gsiftp-flavour[[=PATH]] Enable Globus Toolkit gsiftp protocol support ],
148 + [ if test "x$withval" != "xno"; then
149 +
150 + if test "x$withval" != "xyes" ; then
151 + GSIFTP_FLAVOUR=${withval}
152 + fi
153 + AC_DEFINE(GSIFTP_FLAVOUR, [1],
154 + [Define to 1 if you want Globus Toolkit architecture])
155 + fi
156 + ]
157 +)
158 +
159 +AC_ARG_WITH(gsiftp,
160 + [ --with-gsiftp[[=PATH]] Enable Globus Toolkit gsiftp protocol support ],
161 + [ if test "x$withval" != "xno"; then
162 + if test "x$withval" != "xyes" ; then
163 + CPPFLAGS_GLOBUS="-I${withval}/include/${GSIFTP_FLAVOUR}"
164 + LIBS_GLOBUS="-L${withval}/lib -lglobus_ftp_client_${GSIFTP_FLAVOUR}"
165 + HAVE_GSIFTP=yes
166 + fi
167 + AC_DEFINE(HAVE_GSIFTP, [1],
168 + [Define if you want Globus Toolkit gsiftp protocol support])
169 + fi
170 + ]
171 +)
172 +
173 +AC_SUBST(CPPFLAGS_GLOBUS)
174 +AC_SUBST(LIBS_GLOBUS)
175 +AC_CONFIG_FILES([Makefile cfitsio.pc])
176 +AC_OUTPUT
177 --- Makefile.am.absent 1970-01-01 01:00:00.000000000 +0100
178 +++ Makefile.am 2008-06-02 01:07:45.000000000 +0100
179 @@ -0,0 +1,79 @@
180 +lib_LTLIBRARIES = libcfitsio.la
181 +
182 +C_SOURCES = \
183 + buffers.c cfileio.c checksum.c compress.c drvrfile.c drvrmem.c \
184 + drvrnet.c drvrsmem.c drvrgsiftp.c editcol.c edithdu.c eval_l.c \
185 + eval_y.c eval_f.c fitscore.c getcol.c getcolb.c getcold.c getcole.c \
186 + getcoli.c getcolj.c getcolk.c getcoll.c getcols.c getcolsb.c \
187 + getcoluk.c getcolui.c getcoluj.c getkey.c group.c grparser.c \
188 + histo.c iraffits.c \
189 + modkey.c putcol.c putcolb.c putcold.c putcole.c putcoli.c \
190 + putcolj.c putcolk.c putcoluk.c putcoll.c putcols.c putcolsb.c \
191 + putcolu.c putcolui.c putcoluj.c putkey.c region.c scalnull.c \
192 + swapproc.c wcssub.c wcsutil.c imcompress.c quantize.c ricecomp.c \
193 + pliocomp.c fits_hcompress.c fits_hdecompress.c
194 +
195 +F77_SOURCES=
196 +if ENABLE_FORTRAN
197 +F77_SOURCES += f77_wrap1.c f77_wrap2.c f77_wrap3.c f77_wrap4.c f77_wrap.h
198 +endif
199 +AM_YFLAGS = -d -v
200 +
201 +include_HEADERS = fitsio.h fitsio2.h longnam.h drvrsmem.h
202 +libcfitsio_la_SOURCES = $(C_SOURCES) $(F77_SOURCES) $(include_HEADERS)
203 +libcfitsio_la_LDFLAGS = -no-undefined -version-info @SHARED_VERSION_INFO@
204 +libcfitsio_la_CPPFLAGS = @CPPFLAGS_FORTRAN@ @CPPFLAGS_EXTRA@ @CPPFLAGS_GLOBUS@
205 +libcfitsio_la_LIBADD = @LIBS_GLOBUS@
206 +
207 +
208 +pkgconfigdir = $(libdir)/pkgconfig
209 +pkgconfig_DATA = cfitsio.pc
210 +
211 +LDADD = libcfitsio.la
212 +bin_PROGRAMS = fitscopy imcopy listhead
213 +fitscopy_SOURCES = fitscopy.c
214 +listhead_SOURCES = listhead.c
215 +imcopy_SOURCES = imcopy.c
216 +
217 +# tests
218 +check_PROGRAMS = testprog
219 +noinst_PROGRAMS = speed cookbook smem
220 +testprog_SOURCES = testprog.c
221 +speed_SOURCES = speed.c
222 +cookbook_SOURCES = cookbook.c
223 +smem_SOURCES = smem.c
224 +
225 +if ENABLE_FORTRAN
226 +check_PROGRAMS += testf77
227 +testf77_SOURCES = testf77.f
228 +endif
229 +
230 +check-local: $(check_PROGRAMS)
231 + @total=0; failed=0; \
232 + for i in $(check_PROGRAMS); do \
233 + echo "--- Testing $$i ---"; \
234 + ./$$i${EXEEXT} > my_$$i.out; \
235 + diff $$i.out my_$$i.out; \
236 + cmp $$i.fit $$i.std; \
237 + if [ "x$$?" = "x0" ]; then \
238 + echo "Test \`$$i' PASSED."; \
239 + else \
240 + echo "Test \`$$i' FAILED!!!"; \
241 + failed=$$(($$failed + 1)); \
242 + fi; \
243 + total=$$(($$total + 1)); \
244 + done; \
245 + if [ $$failed -gt 0 ]; then \
246 + echo "*** ERROR: $$failed/$$total tests failed!!!"; \
247 + echo ""; \
248 + exit 1; \
249 + fi
250 +
251 +eval:
252 + @$(LEX) -t eval.l > eval_l.c1; \
253 + sed -e 's/yy/ff/g' -e 's/YY/FF/g' eval_l.c1 > eval_l.c; \
254 + rm -f eval_l.c1; \
255 + $(YACC) -d -v -y eval.y; \
256 + sed -e 's/yy/ff/g' -e 's/YY/FF/g' y.tab.c > eval_y.c; \
257 + sed -e 's/yy/ff/g' -e 's/YY/FF/g' y.tab.h > eval_tab.h; \
258 + rm -f y.tab.c y.tab.h
259 --- cfitsio.pc.in.orig 2008-06-02 01:20:50.000000000 +0100
260 +++ cfitsio.pc.in 2008-06-02 01:22:14.000000000 +0100
261 @@ -1,10 +1,10 @@
262 prefix=@prefix@
263 exec_prefix=@exec_prefix@
264 -libdir=${exec_prefix}/lib
265 -includedir=${prefix}/include
266 +libdir=@libdir@
267 +includedir=@includedir@
268
269 -Name: cfitsio
270 +Name: @PACKAGE_NAME@
271 Description: FITS File Subroutine Library
272 -Version: 3.006
273 -Libs: -L${libdir} -lcfitsio @LIBS@ -lm
274 +Version: @PACKAGE_VERSION@
275 +Libs: -L${libdir} -lcfitsio @LIBS@
276 Cflags: -I${includedir}
277
278
279
280 --
281 gentoo-commits@l.g.o mailing list