- Add workaround for gcc3

- Remove RUN_DEPENDS from PERL5 (used on building only)
- Bump PORTREVISION

Obtained from: SourceForge CVS
This commit is contained in:
Hye-Shik Chang 2002-06-25 12:57:24 +00:00
parent c25f0a7666
commit b5865331f2
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=61944
4 changed files with 176 additions and 1 deletions

View file

@ -7,6 +7,7 @@
PORTNAME= rhtvision PORTNAME= rhtvision
PORTVERSION= 1.1.4 PORTVERSION= 1.1.4
PORTREVISION= 1
CATEGORIES= devel CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= tvision MASTER_SITE_SUBDIR= tvision
@ -14,11 +15,21 @@ DISTNAME= rhtvision-${PORTVERSION}.src
MAINTAINER= perky@FreeBSD.org MAINTAINER= perky@FreeBSD.org
BUILD_DEPENDS= ${PERL5}:${PORTSDIR}/lang/perl5
WRKSRC= ${WRKDIR}/tvision WRKSRC= ${WRKDIR}/tvision
USE_GMAKE= yes USE_GMAKE= yes
USE_PERL5= yes USE_REINPLACE= yes
INSTALLS_SHLIB= yes INSTALLS_SHLIB= yes
HAS_CONFIGURE= yes HAS_CONFIGURE= yes
CONFIGURE_ARGS= --prefix=${PREFIX} CONFIGURE_ARGS= --prefix=${PREFIX}
PATCHPERL_FILES=config.pl confignt.pl conflib.pl linux/compress \
linuxso/makemak.in linuxso/makemak.pl
post-patch:
.for f in ${PATCHPERL_FILES}
@${REINPLACE_CMD} -e 's,/usr/bin/perl,${PERL5},g' ${WRKSRC}/${f}
.endfor
.include <bsd.port.mk> .include <bsd.port.mk>

View file

@ -0,0 +1,72 @@
--- classes/fpbase.cc.orig Wed Oct 10 02:05:52 2001
+++ classes/fpbase.cc Fri Jun 7 04:35:14 2002
@@ -22,7 +22,7 @@
fpbase::fpbase()
{
- buf=new filebuf();
+ buf=new CLY_filebuf();
pstream::init(buf);
}
@@ -34,7 +34,7 @@
fpbase::fpbase( const char *name, CLY_OpenModeT omode, int prot )
{
- buf=new filebuf();
+ buf=new CLY_filebuf();
open(name,omode,prot);
pstream::init(buf);
}
@@ -93,4 +93,51 @@
{
return buf;
}
+
+#ifdef CLY_DefineSpecialFileBuf
+// gcc 3.1 specific
+CLY_filebuf *CLY_filebuf::open(FILE *f, ios_base::openmode mode)
+{
+ CLY_filebuf *ret=NULL;
+ if (!this->is_open())
+ {
+ _M_file.sys_open(f,mode);
+ if (this->is_open())
+ {
+ _M_allocate_internal_buffer();
+ _M_mode=mode;
+
+ // For time being, set both (in/out) sets of pointers.
+ _M_set_indeterminate();
+ if ((mode & ios_base::ate) &&
+ this->seekoff(0,ios_base::end,mode)<0)
+ this->close();
+ ret=this;
+ }
+ }
+ return ret;
+}
+
+CLY_filebuf *CLY_filebuf::open(int h, ios_base::openmode mode)
+{
+ CLY_filebuf *ret=NULL;
+ if (!this->is_open())
+ {
+ _M_file.sys_open(h,mode,false);
+ if (this->is_open())
+ {
+ _M_allocate_internal_buffer();
+ _M_mode=mode;
+
+ // For time being, set both (in/out) sets of pointers.
+ _M_set_indeterminate();
+ if ((mode & ios_base::ate) &&
+ this->seekoff(0,ios_base::end,mode)<0)
+ this->close();
+ ret=this;
+ }
+ }
+ return ret;
+}
+#endif // CLY_DefineSpecialFileBuf

View file

@ -0,0 +1,57 @@
--- include/compatlayer.h.orig Wed Feb 6 22:35:38 2002
+++ include/compatlayer.h Fri Jun 7 04:35:14 2002
@@ -117,6 +117,7 @@
#undef DIRSEPARATOR
#undef DIRSEPARATOR_
#undef CLY_ISOCpp98
+#undef CLY_filebuf
#undef CLY_OpenModeT
#undef CLY_StreamPosT
#undef CLY_StreamOffT
@@ -225,13 +226,21 @@
library. GCC implemented it in version 3.0. BC++ implemented some
stuff in versions like BC++ 5.5. So that's a real mess. */
#if __GNUC__>=3
+ // gcc 3.1 needs a special filebuf
+ #if __GNUC_MINOR__<1
+ #define CLY_filebuf std::filebuf
+ #define CLY_NewFBFromFD(f) new CLY_filebuf(fdopen(f,"rb+"),ios::in|ios::out|ios::binary)
+ #else
+ #undef CLY_DefineSpecialFileBuf
+ #define CLY_DefineSpecialFileBuf 1
+ #define CLY_NewFBFromFD(f) new CLY_filebuf(f,ios::in|ios::out|ios::binary)
+ #endif
#define CLY_ISOCpp98 1
#define CLY_OpenModeT std::ios::openmode
#define CLY_StreamPosT std::streampos
#define CLY_StreamOffT std::streamoff
#define CLY_IOSSeekDir std::ios::seekdir
#define CLY_FBOpenProtDef 0
- #define CLY_NewFBFromFD(f) new filebuf(fdopen(f,"rb+"),ios::in|ios::out|ios::binary)
#define CLY_PubSetBuf(a,b) pubsetbuf(a,b)
#define CLY_FBOpen(a,b,c) open(a,b)
#define CLY_IOSBin std::ios::binary
@@ -252,6 +261,7 @@
#undef IOSTREAM_HEADER
#define IOSTREAM_HEADER <iostream>
#else
+ #define CLY_filebuf filebuf
#define CLY_OpenModeT int
#define CLY_StreamPosT streampos
#define CLY_StreamOffT streamoff
@@ -830,6 +840,7 @@
#define Uses_CLY_IfStreamGetLine 1
#endif
+ #define CLY_filebuf filebuf
#define CLY_OpenModeT int
#define CLY_StreamPosT streampos
#define CLY_StreamOffT streamoff
@@ -1040,6 +1051,7 @@
#define IfStreamGetLine(istream,buffer,size) \
istream.getline(buffer,size)
+ #define CLY_filebuf filebuf
#define CLY_OpenModeT int
#define CLY_StreamPosT streampos
#define CLY_StreamOffT streamoff

View file

@ -0,0 +1,35 @@
--- include/tv/fpbase.h.orig Wed Oct 10 02:06:00 2001
+++ include/tv/fpbase.h Fri Jun 7 04:35:14 2002
@@ -28,6 +33,23 @@
#if defined( Uses_fpbase ) && !defined( __fpbase )
#define __fpbase
+#ifdef CLY_DefineSpecialFileBuf
+class CLY_filebuf: public std::filebuf
+{
+public:
+ CLY_filebuf() : std::filebuf() {};
+ CLY_filebuf(FILE *f, std::ios_base::openmode mode)
+ { open(f,mode); };
+ CLY_filebuf(int h, std::ios_base::openmode mode)
+ { open(h,mode); };
+
+ CLY_filebuf *open(FILE *f, std::ios_base::openmode);
+ CLY_filebuf *open(int h, std::ios_base::openmode);
+ std::filebuf *open(const char *file, std::ios_base::openmode mode)
+ { return std::filebuf::open(file,mode); };
+};
+#endif
+
class fpbase : virtual public pstream
{
@@ -49,7 +71,7 @@
private:
- CLY_std(filebuf) *buf;
+ CLY_filebuf *buf;
};