Date: Thu, 13 Jun 2002 23:00:08 -0700 (PDT) From: Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org> To: freebsd-ports@FreeBSD.org Subject: Re: ports/39219: ddd port not builds on -CURRENT Message-ID: <200206140600.g5E608E81404@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/39219; it has been noted by GNATS. From: Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org> To: "Vladimir B.Grebenschikov" <vova@vbook.express.ru> Cc: FreeBSD-gnats-submit@FreeBSD.ORG Subject: Re: ports/39219: ddd port not builds on -CURRENT Date: Fri, 14 Jun 2002 02:44:07 -0300 --bp/iNruPH9dso1Pn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Does the following patch fix it? --bp/iNruPH9dso1Pn Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=patch-ddd diff -ruN /usr/ports/devel/ddd/Makefile ddd/Makefile --- /usr/ports/devel/ddd/Makefile Wed May 15 04:32:04 2002 +++ ddd/Makefile Thu Jun 13 22:11:48 2002 @@ -14,6 +14,9 @@ MAINTAINER= lioux@FreeBSD.org +BUILD_DEPENDS= autoconf213:${PORTSDIR}/devel/autoconf213 \ + automake:${PORTSDIR}/devel/automake + GNU_CONFIGURE= yes CONFIGURE_TARGET= ${ARCH}-portbld-freebsd${OSREL} CONFIGURE_ARGS= --with-motif-libraries="${LIBXMDIR}" \ @@ -42,9 +45,17 @@ pre-configure: @${FIND} ${WRKSRC} -name configure | ${XARGS} \ ${PERL} -pi -e "s|-O2|-g|" + @${ECHO_CMD} '#undef HAVE_STD_STREAMPOS' >> \ + ${WRKSRC}/ddd/acconfig.h +.for commands in aclocal autoheader213 autoconf213 + @cd ${WRKSRC}/ddd && ${LOCALBASE}/bin/${commands} +.endfor post-configure: ${ECHO_CMD} "LIBXM = ${MOTIFLIB}" >> ${WRKSRC}/ddd/Makefile +# trick auto* tools into not running again and use byacc + @${PERL} -pi -e 's|^(YACC =).*|\1byacc|' ${WRKSRC}/ddd/Makefile + @cd ${WRKSRC}/ddd && ${TOUCH} Makefile* config* *.m4 *.in *.h post-install: @${RM} ${PREFIX}/lib/libiberty.a @@ -62,4 +73,18 @@ check: (cd ${WRKSRC} ; ${GMAKE} check) -.include <bsd.port.mk> +.include <bsd.port.pre.mk> + +post-patch: +# patch to work in FreeBSD 5.x-CURRENT post gcc 3.1 +.if ${OSVERSION} >= 500035 + @${PERL} -pi -e 's!^(#include <stdio.h>)!\1\n#include <string.h>\n!' \ + ${WRKSRC}/libiberty/strerror.c ${WRKSRC}/libiberty/strsignal.c + @${PERL} -pi -e 's!^extern int sys_nerr;!extern const int sys_nerr;!; \ + s!^extern char \*sys_errlist\[\];!extern const char *sys_errlist[];!' \ + ${WRKSRC}/libiberty/strerror.c + @${PERL} -pi -e 's!^static int sys_nsig = NSIG;!static const int sys_nsig = NSIG!' \ + ${WRKSRC}/libiberty/strsignal.c +.endif + +.include <bsd.port.post.mk> diff -ruN /usr/ports/devel/ddd/files/patch-ddd::acinclude.m4 ddd/files/patch-ddd::acinclude.m4 --- /usr/ports/devel/ddd/files/patch-ddd::acinclude.m4 Wed Dec 31 21:00:00 1969 +++ ddd/files/patch-ddd::acinclude.m4 Thu Jun 13 20:45:57 2002 @@ -0,0 +1,49 @@ +--- ddd/acinclude.m4.orig Thu Jun 13 20:37:30 2002 ++++ ddd/acinclude.m4 Thu Jun 13 20:44:42 2002 +@@ -956,8 +956,9 @@ + [ + AC_LANG_SAVE + AC_LANG_CPLUSPLUS +-AC_TRY_COMPILE([#include <iostream.h>], +-[streampos scan_start;], ++AC_TRY_COMPILE([#include <iostream.h> ++#include <fstream.h>], ++[streampos p;], + ice_cv_have_streampos=yes, + ice_cv_have_streampos=no) + AC_LANG_RESTORE +@@ -965,6 +966,34 @@ + AC_MSG_RESULT($ice_cv_have_streampos) + if test "$ice_cv_have_streampos" = yes; then + AC_DEFINE(HAVE_STREAMPOS) ++fi ++])dnl ++dnl ++dnl ++dnl If <iostream.h> or <fstream.h> define a `std::streampos' type ++dnl (as type of os.tellp(), etc.), define `HAVE_STD_STREAMPOS'. ++dnl (Background: In GCC 3.0, `streampos' does not work, but ++dnl `std::streampos' does...) ++dnl In DDD, see `streampos.h' for details. ++dnl ++AC_DEFUN(ICE_STD_STREAMPOS, ++[ ++AC_REQUIRE([AC_PROG_CXX]) ++AC_MSG_CHECKING([for std::streampos]) ++AC_CACHE_VAL(ice_cv_have_std_streampos, ++[ ++AC_LANG_SAVE ++AC_LANG_CPLUSPLUS ++AC_TRY_COMPILE([#include <iostream.h> ++#include <fstream.h>], ++[std::streampos p;], ++ice_cv_have_std_streampos=yes, ++ice_cv_have_std_streampos=no) ++AC_LANG_RESTORE ++]) ++AC_MSG_RESULT($ice_cv_have_std_streampos) ++if test "$ice_cv_have_std_streampos" = yes; then ++AC_DEFINE(HAVE_STD_STREAMPOS) + fi + ])dnl + dnl diff -ruN /usr/ports/devel/ddd/files/patch-ddd::configure.in ddd/files/patch-ddd::configure.in --- /usr/ports/devel/ddd/files/patch-ddd::configure.in Wed Dec 31 21:00:00 1969 +++ ddd/files/patch-ddd::configure.in Thu Jun 13 20:23:18 2002 @@ -0,0 +1,11 @@ +--- ddd/configure.in.orig Thu Jun 13 17:52:32 2002 ++++ ddd/configure.in Thu Jun 13 17:52:41 2002 +@@ -429,7 +429,7 @@ + dnl + dnl `streampos' and `iostate' types + ICE_STREAMPOS +-ICE_IOSTATE ++ICE_STD_STREAMPOS + dnl + dnl + dnl diff -ruN /usr/ports/devel/ddd/files/patch-ddd::strclass.C ddd/files/patch-ddd::strclass.C --- /usr/ports/devel/ddd/files/patch-ddd::strclass.C Wed Dec 31 21:00:00 1969 +++ ddd/files/patch-ddd::strclass.C Thu Jun 13 18:07:57 2002 @@ -0,0 +1,21 @@ +--- ddd/strclass.C.orig Thu Jun 13 18:06:56 2002 ++++ ddd/strclass.C Thu Jun 13 18:07:43 2002 +@@ -1431,16 +1431,10 @@ + } + x.rep->s[i] = 0; + x.rep->len = i; +-#if HAVE_IOSTATE +- ios::iostate new_state = s.rdstate(); +-#else +- int new_state = s.rdstate(); +-#endif + if (i == 0) +- new_state |= ios::failbit; ++ s.clear(ios::failbit|s.rdstate()); + if (ch == EOF) +- new_state |= ios::eofbit; +- s.clear(new_state); ++ s.clear(ios::eofbit|s.rdstate()); + return s; + } + diff -ruN /usr/ports/devel/ddd/files/patch-ddd::streampos.h ddd/files/patch-ddd::streampos.h --- /usr/ports/devel/ddd/files/patch-ddd::streampos.h Wed Dec 31 21:00:00 1969 +++ ddd/files/patch-ddd::streampos.h Thu Jun 13 18:05:57 2002 @@ -0,0 +1,22 @@ +--- ddd/streampos.h.orig Thu Jun 13 18:01:26 2002 ++++ ddd/streampos.h Thu Jun 13 18:04:20 2002 +@@ -38,9 +38,17 @@ + // a simple `long' as replacement. + + #include "config.h" ++#include <iostream.h> ++#include <fstream.h> + +-#if !HAVE_STREAMPOS +-typedef long streampos; ++#if HAVE_STREAMPOS ++#define STREAMPOS streampos ++#elif HAVE_STD_STREAMPOS ++// `streampos' is not visible, but `std::streampos' is. ++#define STREAMPOS std::streampos ++#else ++// Use a simple `long' as replacement. ++#define STREAMPOS long + #endif + + #endif // _DDD_streampos_h --bp/iNruPH9dso1Pn-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200206140600.g5E608E81404>