Bug#465723: Patch to use f2c

2008-02-14 Thread Kumar Appaiah
tags 465723 patch
thanks

Hi!

I managed to use f2c to come over the issues and build the package
successfully. While I am unsure if you want that, it works and builds
without a libg2c dependency.

HTH.

Thanks.

Kumar
-- 
Kumar Appaiah,
458, Jamuna Hostel,
Indian Institute of Technology Madras,
Chennai - 600 036
diff -u mopac7-1.13/debian/patches/01_undefined_symbol_in_so.dpatch mopac7-1.13/debian/patches/01_undefined_symbol_in_so.dpatch
--- mopac7-1.13/debian/patches/01_undefined_symbol_in_so.dpatch
+++ mopac7-1.13/debian/patches/01_undefined_symbol_in_so.dpatch
@@ -14,7 +14,7 @@
  lib_LTLIBRARIES = libmopac7.la
  
 -libmopac7_la_LDFLAGS = -version-info 1:13:0
-+libmopac7_la_LDFLAGS = -version-info 1:13:0 -lg2c
++libmopac7_la_LDFLAGS = -version-info 1:13:0 -lf2c
  
  libmopac7_la_SOURCES =  		aababc.c addfck.c addhcr.c addnuc.c analyt.c 		anavib.c axis.c block.c bonds.c brlzon.c 		btoc.c calpar.c capcor.c cdiag.c chrge.c 		cnvg.c compfg.c consts.c cqden.c datin.c 		dcart.c delmol.c delri.c denrot.c densit.c 		depvar.c deri0.c deri1.c deri2.c deri21.c 		deri22.c deri23.c deritr.c deriv.c dernvo.c 		ders.c dfock2.c dfpsav.c dgemm.c dgemv.c 		dger.c dgetf2.c dgetrf.c dgetri.c diag.c 		diat.c diat2.c diegrd.c dielen.c diis.c 		dijkl1.c dijkl2.c dipind.c dipole.c dlaswp.c 		dofs.c dot.c drc.c drcout.c dtrmm.c 		dtrmv.c dtrsm.c dtrti2.c dtrtri.c dvfill.c 		ef.c enpart.c esp.c etime.c exchng.c 		fdate.c ffhpol.c flepo.c fmat.c fock1.c 		fock2.c force.c formxy.c forsav.c frame.c 		freqcy.c geout.c geoutg.c getgeg.c getgeo.c 		getsym.c gettxt.c gmetry.c gover.c  greenf.c 		grid.c h1elec.c haddon.c hcore.c helect.c 		hqrii.c ijkl.c ilaenv.c initsv.c interp.c 		iter.c jcarin.c linmin.c local.c locmin.c 		lsame.c makpol.c mamult.c matou1.c matout.c 		matpak.c meci.c mecid.c mecih.c mecip.c 		moldat.c molval.c mullik.c mult.c nllsq.c 		nuchar.c parsav.c partxy.c pathk.c paths.c 		perm.c polar.c powsav.c powsq.c prtdrc.c 		quadr.c react1.c reada.c readmo.c refer.c 		repp.c rotat.c rotate.c rsp.c search.c 		second.c setupg.c solrot.c swap.c sympro.c 		symtry.c symtrz.c thermo.c timer.c timout.c 		update.c upsurf.c vecprt.c writmo.c wrtkey.c 		wrttxt.c xerbla.c xyzint.c 		mopac7lib.c libmopac7.c
  
diff -u mopac7-1.13/debian/control mopac7-1.13/debian/control
--- mopac7-1.13/debian/control
+++ mopac7-1.13/debian/control
@@ -3,7 +3,7 @@
 Section: science
 Maintainer: Debichem Team [EMAIL PROTECTED]
 Uploaders: LI Daobing [EMAIL PROTECTED], Daniel Leidert (dale) [EMAIL PROTECTED], Michael Banck [EMAIL PROTECTED]
-Build-Depends: debhelper (= 4.0.0), cdbs, libg2c0-dev, f2c, dpatch
+Build-Depends: debhelper (= 4.0.0), cdbs, dpatch, gfortran, libf2c2-dev
 Standards-Version: 3.7.2
 Homepage: http://sourceforge.net/projects/mopac7
 Vcs-Browser: http://svn.debian.org/wsvn/debichem/
@@ -12,7 +12,7 @@
 Package: libmopac7-dev
 Section: libdevel
 Architecture: any
-Depends: libmopac7-1 (= ${binary:Version}), libg2c0-dev
+Depends: libmopac7-1 (= ${binary:Version}), libf2c2-dev
 Description: Semi-empirical Quantum Chemistry Library (Development files)
  MOPAC provides routines to solve the electronic structure of molecules 
  on a semi-empirical level. Available methods include MNDO, MINDO/3, AM1
diff -u mopac7-1.13/debian/rules mopac7-1.13/debian/rules
--- mopac7-1.13/debian/rules
+++ mopac7-1.13/debian/rules
@@ -1,12 +1,14 @@
 #!/usr/bin/make -f
 
+export G77=gfortran
+
 include /usr/share/cdbs/1/rules/buildcore.mk
 include /usr/share/cdbs/1/class/autotools.mk
 include /usr/share/cdbs/1/rules/debhelper.mk
 include /usr/share/cdbs/1/rules/dpatch.mk
 
 ifeq (ia64,$(DEB_HOST_ARCH))
-CFLAGS=-g -Wall -ffunction-sections
+CFLAGS=-g -Wall -ffunction-sections -lgfortran
 endif
 
 LDFLAGS=-Wl,-z,defs


signature.asc
Description: Digital signature


Bug#465723: Patch to use f2c

2008-02-14 Thread Kumar Appaiah
On Thu, Feb 14, 2008 at 04:10:39PM +0530, Kumar Appaiah wrote:
 I managed to use f2c to come over the issues and build the package
 successfully. While I am unsure if you want that, it works and builds
 without a libg2c dependency.

In addition to the previous patch, the following is necesary for the rdepends:

--- mopac7-1.13.orig/libmopac7.pc.in
+++ mopac7-1.13/libmopac7.pc.in
@@ -4,4 +4,4 @@
 Name: libmopac7
 Description: A library for semi-empirical QM calculations.
 Version: @VERSION@
-Libs: -L${libdir} -lmopac7 -lg2c
+Libs: -L${libdir} -lmopac7 -lf2c

Also, please check #442018 if you do decide to use f2c.

Thanks.

Kumar
-- 
Kumar Appaiah,
458, Jamuna Hostel,
Indian Institute of Technology Madras,
Chennai - 600 036


signature.asc
Description: Digital signature