[DebianGIS-dev] Bug#456297: libhdf4: please use gfortran instead of g77 to compile tests/examples
Colin Tuckley
colint at debian.org
Fri Dec 14 12:23:38 UTC 2007
Package: libhdf4
Severity: important
Tags: patch
libhdf4 build-depends on g77, which has been dropped from gcc suite
after gcc 3.4. As libhdf4 uses g77 merely to compile example/test files,
migration is painless and doesn't affect other packages depending
on libhdf4. See http://wiki.debian.org/GfortranTransition for
more details on the transition, although it doesn't really affect
libhdf4.
Patch attached. But note also that the file debian/README.arm-fortran
is no longer applicable.
-------------- next part --------------
diff -ur libhdf4-old/config/mh-linux libhdf4-4.1r4/config/mh-linux
--- libhdf4-old/config/mh-linux 2007-12-13 17:21:12.000000000 +0000
+++ libhdf4-4.1r4/config/mh-linux 2007-12-13 16:13:17.000000000 +0000
@@ -26,7 +26,7 @@
# Fortran compilier
#FC = f77
#FC = NONE
-FC = g77
+FC = gfortran
FFLAGS =
# Name of achive randomizer, usually ranlib (use 'true' if non-existant)
diff -ur libhdf4-old/debian/changelog libhdf4-4.1r4/debian/changelog
--- libhdf4-old/debian/changelog 2007-12-13 17:21:12.000000000 +0000
+++ libhdf4-4.1r4/debian/changelog 2007-12-14 11:31:01.000000000 +0000
@@ -1,3 +1,13 @@
+libhdf4 (4.1r4-21.1) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * Move from g77 to gfortran.
+ * Remove the fix for bug #90363 which is no longer relevant
+ including the NOFORTRANINSOLIB hack.
+ * Char string fix in fortestF.f to overcome gfortran compiler problem.
+
+ -- Colin Tuckley <colint at debian.org> Fri, 14 Dec 2007 11:30:39 +0000
+
libhdf4 (4.1r4-21) unstable; urgency=low
* Introducing versioning in conflicts for libhdf4g-run.
diff -ur libhdf4-old/debian/control libhdf4-4.1r4/debian/control
--- libhdf4-old/debian/control 2007-12-13 17:21:12.000000000 +0000
+++ libhdf4-4.1r4/debian/control 2007-12-13 12:28:58.000000000 +0000
@@ -3,7 +3,7 @@
Priority: optional
Maintainer: Debian GIS Project <pkg-grass-devel at lists.alioth.debian.org>
Uploaders: Francesco Paolo Lovergine <frankie at debian.org>
-Build-depends: g77, sharutils, libjpeg62-dev, zlib1g-dev, bison, flex, groff, autotools-dev
+Build-depends: gfortran, sharutils, libjpeg62-dev, zlib1g-dev, bison, flex, groff, autotools-dev
Standards-Version: 3.7.2
Package: libhdf4g
diff -ur libhdf4-old/debian/rules libhdf4-4.1r4/debian/rules
--- libhdf4-old/debian/rules 2007-12-13 17:21:12.000000000 +0000
+++ libhdf4-4.1r4/debian/rules 2007-12-13 17:28:55.000000000 +0000
@@ -33,12 +33,6 @@
somajor:=$(shell echo $(UPVERSION) | sed -e 's/^\([0-9]*\)\..*$$/\1/')
export somajor sominor
-# Temporary arm hack: g77 PIC is broken, so don't put fortran objects
-# in the solib, but put them in the .a.
-ifeq ($(shell dpkg --print-architecture),arm)
-export NOFORTRANINSOLIB=yes
-endif
-
build:
$(checkdir)
cat debian/copyright.in COPYING > debian/copyright
@@ -166,9 +160,8 @@
gzip -v9 debian/tmp-lib/usr/share/man/man5/*
# Docs
cp debian/copyright debian/tmp-lib/usr/share/doc/$(package)/
- cp debian/README.arm-fortran debian/tmp-lib/usr/share/doc/$(package)
cp debian/changelog debian/tmp-lib/usr/share/doc/$(package)/changelog.Debian
- gzip -9v debian/tmp-lib/usr/share/doc/$(package)/{changelog.Debian,README.arm-fortran}
+ gzip -9v debian/tmp-lib/usr/share/doc/$(package)/changelog.Debian
dpkg-shlibdeps debian/tmp-lib/usr/lib/*.so*
dpkg-gencontrol -isp -Pdebian/tmp-lib -p$(package)
chown -R root.root debian/tmp-lib
diff -ur libhdf4-old/hdf/src/Makefile.in libhdf4-4.1r4/hdf/src/Makefile.in
--- libhdf4-old/hdf/src/Makefile.in 2007-12-13 17:21:12.000000000 +0000
+++ libhdf4-4.1r4/hdf/src/Makefile.in 2007-12-13 17:27:19.000000000 +0000
@@ -263,12 +263,7 @@
libdf.so.$(somajor): libdf.so.$(sominor)
ln -sf $^ $@
-ifeq ($(NOFORTRANINSOLIB),)
libdf.so.$(sominor): $(COBJS:%.o=%.sho) $(FOBJS:%.o=%.sho)
-else
-libdf.so.$(sominor): $(COBJS:%.o=%.sho)
- @echo "### Temporary Debian hack: build solib without fortran"
-endif
$(CC) -shared -Wl,-soname,libdf.so.$(somajor) -o $@ $^ -lz -ljpeg -lc
nofort-libdf-inst.a: $(COBJS) $(PCOBJS)
diff -ur libhdf4-old/hdf/test/fortestF.f libhdf4-4.1r4/hdf/test/fortestF.f
--- libhdf4-old/hdf/test/fortestF.f 1999-05-04 18:36:31.000000000 +0100
+++ libhdf4-4.1r4/hdf/test/fortestF.f 2007-12-13 18:27:19.000000000 +0000
@@ -190,7 +190,8 @@
if (cmd .NE. 'Test' .AND. cmd .NE. 'test') then
print *, 'Unknown Command: ', cmd, param
- print *, 'Try one of "Skip", "Test", "Verbosity" or "Cleanup"'
+C print *, 'Try one of "Skip", "Test", "Verbosity" or "Cleanup"'
+ print *, 'Try one of Skip, Test, Verbosity or Cleanup'
retcode = -1
return
endif
diff -ur libhdf4-old/hdf/test/Makefile.in libhdf4-4.1r4/hdf/test/Makefile.in
--- libhdf4-old/hdf/test/Makefile.in 2007-12-13 17:21:12.000000000 +0000
+++ libhdf4-4.1r4/hdf/test/Makefile.in 2007-12-13 17:28:13.000000000 +0000
@@ -357,11 +357,7 @@
test -d $(TESTDIR) || mkdir $(TESTDIR)
fortestF: $(FOBJS) $(HDFLIB)/libdf.so
-ifeq ($(NOFORTRANINSOLIB),)
$(FC) $(FFLAGS) -o $@ $(FOBJS) -L$(HDFSRC) -ldf -ljpeg -lz -lm
-else
- $(FC) $(FFLAGS) -o $@ $(FOBJS) -static -L$(HDFSRC) -ldf -dynamic -ljpeg -lz -lm
-endif
fortest: $(HDFLIB)/libdf.so fortest.c $(CHDRS)
$(CC) $(ALL_CFLAGS) -o fortest fortest.c -L$(HDFSRC) -ldf -ljpeg -lz -lm
diff -ur libhdf4-old/INSTALL libhdf4-4.1r4/INSTALL
--- libhdf4-old/INSTALL 2000-10-20 17:22:42.000000000 +0100
+++ libhdf4-4.1r4/INSTALL 2007-12-13 15:15:44.000000000 +0000
@@ -100,7 +100,7 @@
DEC Alpha/OpenVMS AXP v7.1 DEC C v5.6-003 Digital Fortran 77 X7.1-156
IBM PC - Intel Pentium
Solarisx86 (2.5.1) GCC 2.7.2 -
- Linux (2.2.16) GCC 2.95.2 g77 0.5.25
+ Linux (2.2.16) GCC 2.95.2 gFortran 4.2.3
FreeBSD (4.1.1) GCC 2.95.2 GNU f77 V0.5.25
Windows NT/98/2000 MSVC++ 6.0 DEC Visual Fortran 6.0
T3E (sn6711 2.0.539b) Cray CC 6.3.0.2 Cray Fortran 3.4.0.1.0
diff -ur libhdf4-old/mfhdf/fortran/Makefile.in libhdf4-4.1r4/mfhdf/fortran/Makefile.in
--- libhdf4-old/mfhdf/fortran/Makefile.in 2007-12-13 17:21:12.000000000 +0000
+++ libhdf4-4.1r4/mfhdf/fortran/Makefile.in 2007-12-13 17:25:43.000000000 +0000
@@ -76,11 +76,7 @@
# ------------ General Macros for NETCDF --------------------
INCDIR = $(prefix)/include
-ifeq ($(NOFORTRANINSOLIB),)
HDF_LIB = -L$(TOP_SRCDIR)/hdf/src -ldf
-else
-HDF_LIB = -static -L$(TOP_SRCDIR)/hdf/src -ldf -dynamic
-endif
HDF_INC = $(TOP_SRCDIR)/hdf/src/
PABLO_HINC = $(TOP_SRCDIR)/hdf/pablo
FMPOOL_INC = $(TOP_SRCDIR)/hdf/fmpool
diff -ur libhdf4-old/release_notes/compile.txt libhdf4-4.1r4/release_notes/compile.txt
--- libhdf4-old/release_notes/compile.txt 2000-10-20 19:51:26.000000000 +0100
+++ libhdf4-4.1r4/release_notes/compile.txt 2007-12-13 17:01:43.000000000 +0000
@@ -158,7 +158,7 @@
-L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
FORTRAN:
- g77 -o <your program> <your program>.f \
+ gfortran -o <your program> <your program>.f \
-L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
Solaris:
More information about the Pkg-grass-devel
mailing list