From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Dec 2 05:40:25 2006 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5857A16A416 for ; Sat, 2 Dec 2006 05:40:25 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7009643CA3 for ; Sat, 2 Dec 2006 05:40:06 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id kB25eO0U082407 for ; Sat, 2 Dec 2006 05:40:24 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id kB25eOk6082405; Sat, 2 Dec 2006 05:40:24 GMT (envelope-from gnats) Resent-Date: Sat, 2 Dec 2006 05:40:24 GMT Resent-Message-Id: <200612020540.kB25eOk6082405@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Peter Johnson Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 97B0A16A40F for ; Sat, 2 Dec 2006 05:34:16 +0000 (UTC) (envelope-from pete@tortall.net) Received: from cvs.tortall.net (cvs.tortall.net [69.55.238.110]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0935C43C9D for ; Sat, 2 Dec 2006 05:33:57 +0000 (GMT) (envelope-from pete@tortall.net) Received: from localhost (cvs [69.55.238.110]) by cvs.tortall.net (Postfix) with ESMTP id 2372518CBA for ; Fri, 1 Dec 2006 21:34:16 -0800 (PST) Received: from cvs.tortall.net ([69.55.238.110]) by localhost (cvs.tortall.net [69.55.238.110]) (amavisd-new, port 10024) with ESMTP id aKZVi+-4elIs for ; Fri, 1 Dec 2006 21:34:13 -0800 (PST) Received: by cvs.tortall.net (Postfix, from userid 1000) id CC7D218E0F; Fri, 1 Dec 2006 21:34:13 -0800 (PST) Message-Id: <20061202053413.CC7D218E0F@cvs.tortall.net> Date: Fri, 1 Dec 2006 21:34:13 -0800 (PST) From: Peter Johnson To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/106198: [PATCH] editors/xenon: Fix BROKENness X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Peter Johnson List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Dec 2006 05:40:25 -0000 >Number: 106198 >Category: ports >Synopsis: [PATCH] editors/xenon: Fix BROKENness >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Sat Dec 02 05:40:24 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Peter Johnson >Release: FreeBSD 6.1-RELEASE i386 >Organization: >Environment: System: FreeBSD 6.1-RELEASE >Description: Fix bad C++, which currently has the port marked as BROKEN on >= 5.x (>= gcc 3.4.2). >How-To-Repeat: Marked BROKEN on >= 5.x (due to bad C++). >Fix: Patch attached. --- unbreak-xenon.patch begins here --- Index: Makefile =================================================================== RCS file: /home/ncvs/ports/editors/xenon/Makefile,v retrieving revision 1.15 diff -u -r1.15 Makefile --- Makefile 7 May 2006 10:55:39 -0000 1.15 +++ Makefile 2 Dec 2006 05:30:51 -0000 @@ -7,7 +7,7 @@ PORTNAME= xenon PORTVERSION= 1.0.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= editors MASTER_SITES= http://sydney.proximity.com.au/~ben/xenon/dist/ \ ftp://yankee.proximitygroup.com/pub/xenon/ @@ -22,19 +22,22 @@ MAN1= xe.1 -FIX_FILES= Xe.h XeApp.h XeFontTable.C XeFontTable.h XeKeyTable.C \ - XeKeyTable.h XeObjectTable.h +FIX_FILES= Xe.h XeApp.C XeApp.h XeFontTable.C XeKeyTable.C \ + XeKeyTable.h XeObject.C XeObject.h XeObjectTable.h XeText.C \ + XeText.h .include -.if ${OSVERSION} >= 500113 -BROKEN= "Does not compile (bad C++ code)" -.endif - do-configure: .for file in ${FIX_FILES} @${REINPLACE_CMD} -e 's|#include |#include |' \ + -e 's|std::slist|std::list|g' \ + -e 's|#include |#include |' \ + -e 's|std::hash_map|__gnu_cxx::hash_map|g' \ + -e 's|std::hash|__gnu_cxx::hash|g' \ + ${WRKSRC}/${file} .endfor do-install: Index: files/patch-Makefile.common =================================================================== RCS file: files/patch-Makefile.common diff -N files/patch-Makefile.common --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/patch-Makefile.common 2 Dec 2006 05:30:51 -0000 @@ -0,0 +1,20 @@ +--- makefiles/Makefile.common.orig Sat Aug 4 16:59:06 2001 ++++ makefiles/Makefile.common Fri Dec 1 20:33:15 2006 +@@ -67,7 +67,7 @@ + MKDEPEND = ./mkdepend + DEPEND = .depend + +-_CCFLAGS = $(ARCH) $(CCFLAGS) $(INCLUDES) ++_CCFLAGS = $(CCFLAGS) $(INCLUDES) + _LDFLAGS = $(TARGETLIB) $(LIBS) + + #LDFLAGS = $(TARGETLIB) -lXpm -lX11 +@@ -94,7 +94,7 @@ + # $(CC) -shared -o $(TARGETSO) $(OBJECTS) + + $(TARGET): $(TARGETLIB) $(AUXTARGET).o +- $(CC) $(ARCH) $(LDFLAGS) $(AUXTARGET).o $(_LDFLAGS) -o $(TARGET) ++ $(CC) $(LDFLAGS) $(AUXTARGET).o $(_LDFLAGS) -o $(TARGET) + + #$(SHTARGET): $(TARGETSO) $(TARGET).o + # $(CC) -o $(TARGET) -g $(TARGET).o $(SHLDFLAGS) Index: files/patch-XeFontTable.h =================================================================== RCS file: files/patch-XeFontTable.h diff -N files/patch-XeFontTable.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/patch-XeFontTable.h 2 Dec 2006 05:30:51 -0000 @@ -0,0 +1,29 @@ +--- XeFontTable.h.orig Wed Aug 1 04:22:25 2001 ++++ XeFontTable.h Fri Dec 1 20:55:07 2006 +@@ -18,21 +18,21 @@ + // hash function object for std::string - maybe move this to Xe.h if it + // turns out that string keyed hash_maps are used elsewhere + +-namespace std ++namespace __gnu_cxx + { +-template<> struct hash ++template<> struct hash + { +- size_t operator()(const string& s) const ++ size_t operator()(const std::string& s) const + { + return __stl_hash_string(s.c_str()); + } + }; + } + +-class XeFontTable : public std::hash_map { ++class XeFontTable : public __gnu_cxx::hash_map { + public: + XeFontTable(void) +- : std::hash_map(64) {} ++ : __gnu_cxx::hash_map(64) {} + ~XeFontTable(); + + XFontStruct* getFont(const char* fontname); Index: files/patch-XeText.C =================================================================== RCS file: files/patch-XeText.C diff -N files/patch-XeText.C --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/patch-XeText.C 2 Dec 2006 05:30:51 -0000 @@ -0,0 +1,33 @@ +--- XeText.C.orig Sat Jan 5 20:39:39 2002 ++++ XeText.C Fri Dec 1 21:25:34 2006 +@@ -1612,26 +1612,19 @@ + + if(_numUndos >= _maxUndos) { + +- // $$$ calling previous() here assums _undoList is not empty +- // previous() is O(N) where N is the number of undo items in the list +- // if this turns out to be too much of a performance penalty, use +- // std::list instead of std::slist for _undoList +- +- std::slist::iterator pos = _undoList.previous(_undoList.end()); +- Undo* undo = *pos; ++ Undo* undo = _undoList.back(); + + _undoBuf.remove(KRBUF_END, _undoBuf.length() - undo->len); + delete undo; +- _undoList.erase(pos); ++ _undoList.pop_back(); + + if (!_undoList.empty()) { +- pos = _undoList.previous(_undoList.end()); +- undo = *pos; ++ undo = _undoList.back(); + + if (undo && undo->type == InsertSelection) { + _undoBuf.remove(KRBUF_END, _undoBuf.length() - undo->len); + delete undo; +- _undoList.erase(pos); ++ _undoList.pop_back(); + } + } + --- unbreak-xenon.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: