From 14f108d6814ed744ab570655c3dc7a075e4b38b0 Mon Sep 17 00:00:00 2001 From: dmcmahill Date: Tue, 18 Mar 2008 11:48:25 +0000 Subject: Repair the build when using f2c-f77 as the fortran compiler. Also, do not install calcCAP or calcRL. These two tools seem to give results of questionable accuracy (see the sourceforge bug tracker for the upstream sources) and also don't build with gcc-4 anyway. Bump pkgrevision. --- cad/tnt-mmtl/Makefile | 9 ++++++--- cad/tnt-mmtl/PLIST | 24 ++++++++++++------------ cad/tnt-mmtl/distinfo | 10 ++++++---- cad/tnt-mmtl/patches/patch-aa | 12 +++++++----- cad/tnt-mmtl/patches/patch-ae | 30 +++++++++++++++++++++--------- cad/tnt-mmtl/patches/patch-af | 22 +++++++++++++--------- cad/tnt-mmtl/patches/patch-al | 26 ++++++++++++++++++++++++++ cad/tnt-mmtl/patches/patch-am | 20 ++++++++++++++++++++ 8 files changed, 111 insertions(+), 42 deletions(-) create mode 100644 cad/tnt-mmtl/patches/patch-al create mode 100644 cad/tnt-mmtl/patches/patch-am (limited to 'cad/tnt-mmtl') diff --git a/cad/tnt-mmtl/Makefile b/cad/tnt-mmtl/Makefile index f4834503161..fa78fd0d7b4 100644 --- a/cad/tnt-mmtl/Makefile +++ b/cad/tnt-mmtl/Makefile @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.11 2006/08/10 03:21:39 minskim Exp $ +# $NetBSD: Makefile,v 1.12 2008/03/18 11:48:25 dmcmahill Exp $ # DISTNAME= tnt-1.2.2 PKGNAME= ${DISTNAME:S/tnt/tnt-mmtl/} -PKGREVISION= 2 +PKGREVISION= 3 CATEGORIES= cad MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=mmtl/} @@ -16,13 +16,16 @@ BUILD_DEPENDS+= latex2html-[0-9]*:../../textproc/latex2html PKG_INSTALLATION_TYPES= overwrite pkgviews GNU_CONFIGURE= YES -USE_TOOLS+= gmake +USE_TOOLS+= autoconf automake gmake USE_LANGUAGES= c c++ fortran TEX_DEPMOD= build TEX_ACCEPTED= teTeX3 post-patch: ${MV} ${WRKSRC}/tnt ${WRKSRC}/tnt-mmtl + cd ${WRKSRC}/bem && aclocal + cd ${WRKSRC}/bem && automake + cd ${WRKSRC}/bem && autoconf .include "../../lang/tcl/buildlink3.mk" .include "../../lang/tcl-itcl-current/buildlink3.mk" diff --git a/cad/tnt-mmtl/PLIST b/cad/tnt-mmtl/PLIST index f079475d3a7..c7d7ef51419 100644 --- a/cad/tnt-mmtl/PLIST +++ b/cad/tnt-mmtl/PLIST @@ -1,7 +1,7 @@ -@comment $NetBSD: PLIST,v 1.1 2004/10/01 22:56:10 dmcmahill Exp $ +@comment $NetBSD: PLIST,v 1.2 2008/03/18 11:48:25 dmcmahill Exp $ bin/bem -bin/calcCAP -bin/calcRL +@comment bin/calcCAP +@comment bin/calcRL bin/tnt-mmtl bin/tnt.tcl lib/bem1.0/bem.tcl @@ -13,13 +13,13 @@ lib/bem1.0/bem_sweep.tcl lib/bem1.0/bem_view.tcl lib/bem1.0/bem_welement.itcl lib/bem1.0/pkgIndex.tcl -lib/calccap/calcCAP.tcl -lib/calccap/calcCAP_exe.tcl -lib/calccap/epl.bit -lib/calccap/pkgIndex.tcl -lib/calcrl/calcRL.tcl -lib/calcrl/calcRL_exe.tcl -lib/calcrl/pkgIndex.tcl +@comment lib/calccap/calcCAP.tcl +@comment lib/calccap/calcCAP_exe.tcl +@comment lib/calccap/epl.bit +@comment lib/calccap/pkgIndex.tcl +@comment lib/calcrl/calcRL.tcl +@comment lib/calcrl/calcRL_exe.tcl +@comment lib/calcrl/pkgIndex.tcl lib/csdl1.0.1/csdl.tcl lib/csdl1.0.1/csdl_hlcsdl.itcl lib/csdl1.0.1/csdl_llcsdl.itcl @@ -131,6 +131,6 @@ share/tnt-mmtl/user-guide/user-guide.html @dirrm lib/sppdgTcllib1.0 @dirrm lib/gui2.0 @dirrm lib/csdl1.0.1 -@dirrm lib/calcrl -@dirrm lib/calccap +@comment @dirrm lib/calcrl +@comment @dirrm lib/calccap @dirrm lib/bem1.0 diff --git a/cad/tnt-mmtl/distinfo b/cad/tnt-mmtl/distinfo index 1f1a13755d2..0d6e619bba6 100644 --- a/cad/tnt-mmtl/distinfo +++ b/cad/tnt-mmtl/distinfo @@ -1,16 +1,18 @@ -$NetBSD: distinfo,v 1.3 2005/03/02 00:56:19 dmcmahill Exp $ +$NetBSD: distinfo,v 1.4 2008/03/18 11:48:25 dmcmahill Exp $ SHA1 (tnt-1.2.2.tar.gz) = bd089863ca2cd939009253e83f4ab75317191047 RMD160 (tnt-1.2.2.tar.gz) = 1a2ba68a93ee21590bb25a3eacf85d3773c3e77d Size (tnt-1.2.2.tar.gz) = 2020099 bytes -SHA1 (patch-aa) = 779955877d1cec32b441c16d615a1e400888c0b1 +SHA1 (patch-aa) = f8fbcafc4631abef3a7e77398363c9685d28b5f9 SHA1 (patch-ab) = 6a57255b994f0ea4063a2c256fe0ba689a210ba7 SHA1 (patch-ac) = 32b2a6721a3c1790366c278816c2f188dfa38214 SHA1 (patch-ad) = 8084532ba3a3387fddfbbfeee019c21e4e139be7 -SHA1 (patch-ae) = d2815e91be878cffbff0a124b1d33d48397c064c -SHA1 (patch-af) = 084d830808a9394d646981f882a368b49a5c5441 +SHA1 (patch-ae) = 5fabada892e8c82af60ba41c27ae5cafa0520654 +SHA1 (patch-af) = a68a9b2a77450006361cfb9647424be0bd65533a SHA1 (patch-ag) = a9afe4562b51b01b912ec72a70953820abb19467 SHA1 (patch-ah) = ec3cb9822e8dd168e6b6d74bb14cd631717187c7 SHA1 (patch-ai) = 2ab6aa6bd4cd0883725c66bb7d4fa59e9e3172a4 SHA1 (patch-aj) = 7ec0c75d0e29c2adce2eea442e4b3309455965e7 SHA1 (patch-ak) = d17baa2b591126cda87c79768136a3d6086d229e +SHA1 (patch-al) = b7c2bf78d0d92bd51fb8de86d78d7a51a5b640d4 +SHA1 (patch-am) = d81174386963777cae26019183a73fed74f62970 diff --git a/cad/tnt-mmtl/patches/patch-aa b/cad/tnt-mmtl/patches/patch-aa index f033c8eeb3b..30ec50cbb73 100644 --- a/cad/tnt-mmtl/patches/patch-aa +++ b/cad/tnt-mmtl/patches/patch-aa @@ -1,9 +1,8 @@ -$NetBSD: patch-aa,v 1.1 2004/10/01 22:56:11 dmcmahill Exp $ +$NetBSD: patch-aa,v 1.2 2008/03/18 11:48:25 dmcmahill Exp $ ---- bem/configure.ac.orig Thu Apr 22 20:07:12 2004 -+++ bem/configure.ac -@@ -116,6 +116,8 @@ AC_TYPE_MODE_T - AC_TYPE_SIZE_T +--- bem/configure.ac.orig 2004-04-22 20:07:12.000000000 +0000 ++++ bem/configure.ac 2008-03-10 02:29:48.000000000 +0000 +@@ -117,7 +117,10 @@ AC_STRUCT_TM +AC_F77_WRAPPERS @@ -11,3 +10,6 @@ $NetBSD: patch-aa,v 1.1 2004/10/01 22:56:11 dmcmahill Exp $ #---------------------------------------------------------------- # Checks for library functions. #---------------------------------------------------------------- ++AC_F77_LIBRARY_LDFLAGS + AC_FUNC_GETGROUPS + AC_FUNC_MALLOC diff --git a/cad/tnt-mmtl/patches/patch-ae b/cad/tnt-mmtl/patches/patch-ae index b992346fd39..2dafaea0b21 100644 --- a/cad/tnt-mmtl/patches/patch-ae +++ b/cad/tnt-mmtl/patches/patch-ae @@ -1,9 +1,16 @@ -$NetBSD: patch-ae,v 1.1 2004/10/01 22:56:11 dmcmahill Exp $ +$NetBSD: patch-ae,v 1.2 2008/03/18 11:48:25 dmcmahill Exp $ ---- Makefile.am.orig Thu Jul 22 14:23:32 2004 -+++ Makefile.am -@@ -27,12 +27,12 @@ - #--------------------------------------------------------------- +- Rename tnt to tnt-mmtl to avoid conflicts with another pacakge. + +- Put the examples and docs in the right place + +- Do not install calcCAP or calcRL. These two tools seem to give +results of questionable accuracy (see the sourceforge bug tracker +for the upstream sources) and also don't build with gcc-4. + +--- Makefile.am.orig 2004-07-22 14:23:32.000000000 +0000 ++++ Makefile.am 2008-03-17 13:19:02.000000000 +0000 +@@ -28,10 +28,10 @@ # tcl/tk scripts that need to be installed. #--------------------------------------------------------------- -bin_SCRIPTS = tnt.tcl tnt @@ -16,13 +23,18 @@ $NetBSD: patch-ae,v 1.1 2004/10/01 22:56:11 dmcmahill Exp $ +examplesdir = $(pkgdatadir)/examples examples_DATA = \ examples/9-7-00.xsctn \ - examples/coplanar.xsctn \ -@@ -51,7 +51,7 @@ examples_DATA = \ - # a prefix. If not, then I suppose README will go into +@@ -52,5 +52,5 @@ # /usr. #--------------------------------------------------------------- -appdocsdir = $(prefix) +appdocsdir = $(pkgdatadir) appdocs_DATA = \ AUTHORS$(TXTEXT) \ - COPYING$(TXTEXT) \ +@@ -84,5 +84,6 @@ + # Subdirectories for automake and make + #--------------------------------------------------------------- +-SUBDIRS = bem calcCAP calcRL doc csdl gui units sppdgTcllib ++#SUBDIRS = bem calcCAP calcRL doc csdl gui units sppdgTcllib ++SUBDIRS = bem doc csdl gui units sppdgTcllib + + EXTRA_DIST = $(bin_SCRIPTS) $(printfile_DATA) $(examples_DATA) diff --git a/cad/tnt-mmtl/patches/patch-af b/cad/tnt-mmtl/patches/patch-af index 1897d202d0a..f398bfaaf4c 100644 --- a/cad/tnt-mmtl/patches/patch-af +++ b/cad/tnt-mmtl/patches/patch-af @@ -1,9 +1,8 @@ -$NetBSD: patch-af,v 1.1 2004/10/01 22:56:11 dmcmahill Exp $ +$NetBSD: patch-af,v 1.2 2008/03/18 11:48:25 dmcmahill Exp $ ---- Makefile.in.orig Fri Sep 10 22:15:33 2004 -+++ Makefile.in -@@ -126,12 +126,12 @@ target_alias = @target_alias@ - #--------------------------------------------------------------- +--- Makefile.in.orig 2004-09-10 22:15:33.000000000 +0000 ++++ Makefile.in 2008-03-17 13:22:14.000000000 +0000 +@@ -127,10 +127,10 @@ # tcl/tk scripts that need to be installed. #--------------------------------------------------------------- -bin_SCRIPTS = tnt.tcl tnt @@ -16,13 +15,18 @@ $NetBSD: patch-af,v 1.1 2004/10/01 22:56:11 dmcmahill Exp $ +examplesdir = $(pkgdatadir)/examples examples_DATA = \ examples/9-7-00.xsctn \ - examples/coplanar.xsctn \ -@@ -151,7 +151,7 @@ examples_DATA = \ - # a prefix. If not, then I suppose README will go into +@@ -152,5 +152,5 @@ # /usr. #--------------------------------------------------------------- -appdocsdir = $(prefix) +appdocsdir = $(pkgdatadir) appdocs_DATA = \ AUTHORS$(TXTEXT) \ - COPYING$(TXTEXT) \ +@@ -178,5 +178,6 @@ + # Subdirectories for automake and make + #--------------------------------------------------------------- +-SUBDIRS = bem calcCAP calcRL doc csdl gui units sppdgTcllib ++#SUBDIRS = bem calcCAP calcRL doc csdl gui units sppdgTcllib ++SUBDIRS = bem doc csdl gui units sppdgTcllib + + EXTRA_DIST = $(bin_SCRIPTS) $(printfile_DATA) $(examples_DATA) diff --git a/cad/tnt-mmtl/patches/patch-al b/cad/tnt-mmtl/patches/patch-al new file mode 100644 index 00000000000..fb708e6cf8d --- /dev/null +++ b/cad/tnt-mmtl/patches/patch-al @@ -0,0 +1,26 @@ +$NetBSD: patch-al,v 1.1 2008/03/18 11:48:25 dmcmahill Exp $ + +The automake manual clearly specifies that if we mix fortran sources +in with c or c++ sources then we need to use the AC_F77_LIBRARY_LDFLAGS +autoconf macro and then add $(FLIBS) to either LDADD for a program or +LIBADD for a library. + +--- bem/Makefile.am.orig 2004-04-22 20:07:12.000000000 +0000 ++++ bem/Makefile.am 2008-03-16 03:44:18.000000000 +0000 +@@ -27,5 +27,5 @@ + # supply command line switches --add-missing --copy. + #---------------------------------------------------------------- +-AUTOMAKE_OPTIONS = foreign subdir-objects ++AUTOMAKE_OPTIONS = foreign + + #--------------------------------------------------------------- +@@ -72,7 +72,9 @@ + bem_SOURCES = $(cpp_SOURCES) $(fortran_SOURCES) \ + src/nmmtl_parse_xsctn.cpp ++bem_LDADD = $(FLIBS) + + nmmtl_SOURCES = $(cpp_SOURCES) $(fortran_SOURCES) \ + src/nmmtl_parse_graphic.cpp ++nmmtl_LDADD = $(FLIBS) + + diff --git a/cad/tnt-mmtl/patches/patch-am b/cad/tnt-mmtl/patches/patch-am new file mode 100644 index 00000000000..e63e3932798 --- /dev/null +++ b/cad/tnt-mmtl/patches/patch-am @@ -0,0 +1,20 @@ +$NetBSD: patch-am,v 1.1 2008/03/18 11:48:25 dmcmahill Exp $ + +when building with f2c we need to define a dummy main. This is typically +something like MAIN__. This is not needed if f2c-f77 were used for linking +or if we'd used a different fortran compiler. + +--- bem/src/nmmtl.cpp.orig 2004-07-28 13:50:22.000000000 +0000 ++++ bem/src/nmmtl.cpp 2008-03-16 17:00:11.000000000 +0000 +@@ -130,5 +130,10 @@ + + +- ++#ifdef F77_DUMMY_MAIN ++extern "C" int F77_DUMMY_MAIN() ++{ ++ return 0; ++} ++#endif + + int main (int argc, char **argv) -- cgit v1.2.3