Fix build for gcc4.

Add some cleanups from Antti Harri <iku@openbsd.fi>.

This does not include the patch that reorders recently
used files for now.
This commit is contained in:
kili 2010-06-07 20:08:09 +00:00
parent 43c83759da
commit 16aa7c1282
14 changed files with 74 additions and 51 deletions

View File

@ -1,20 +1,20 @@
# $OpenBSD: Makefile,v 1.17 2009/08/10 06:30:30 kili Exp $
# $OpenBSD: Makefile,v 1.18 2010/06/07 20:08:09 kili Exp $
COMMENT= Qt-based 2D CAD system
V= 2.0.5.0
DISTNAME= qcad-${V}-1-community.src
PKGNAME= qcad-${V}p0
PKGNAME= qcad-${V}p1
CATEGORIES= cad graphics
HOMEPAGE= http://www.ribbonsoft.com/qcad.html
# GPL
# GPLv2
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
WANTLIB= X11 Xext c m pthread pthread-stubs stdc++ xcb
WANTLIB= X11 Xext c m pthread stdc++
MASTER_SITES= http://www.ribbonsoft.com/archives/qcad/
@ -30,13 +30,12 @@ PORTHOME= ${WRKDIR}
MAKE_ENV+= QTDIR=${MODQT_LIBDIR} \
MAKE=${MAKE_PROGRAM}
SUBST_VARS= CXXFLAGS LOCALBASE MODQT_LIBDIR
pre-configure:
@perl -pi -e 's,!!CXXFLAGS!!,${CXXFLAGS},' ${WRKSRC}/mkspecs/defs.pro
@perl -pi -e 's,!!DOCDIR!!,${PREFIX}/share/doc/qcad,' \
${WRKSRC}/qcadlib/src/engine/rs_system.h
@perl -pi -e 's,!!LOCALBASE!!,${LOCALBASE},' \
${WRKSRC}/qcadlib/src/engine/rs_system.cpp
@perl -pi -e 's,!!QTDIR!!,${MODQT_LIBDIR},' \
${SUBST_CMD} ${WRKSRC}/mkspecs/defs.pro \
${WRKSRC}/qcadlib/src/engine/rs_system.h \
${WRKSRC}/qcadlib/src/engine/rs_system.cpp \
${WRKSRC}/qcad/src/qc_applicationwindow.cpp
do-build:

View File

@ -1,12 +1,12 @@
$OpenBSD: patch-mkspecs_defs_pro,v 1.1 2007/01/09 16:30:37 steven Exp $
$OpenBSD: patch-mkspecs_defs_pro,v 1.2 2010/06/07 20:08:09 kili Exp $
--- mkspecs/defs.pro.orig Tue Nov 22 12:47:28 2005
+++ mkspecs/defs.pro Tue Jan 9 16:38:47 2007
+++ mkspecs/defs.pro Mon Jun 7 21:46:07 2010
@@ -1,6 +1,7 @@
# $Id: patch-mkspecs_defs_pro,v 1.1 2007/01/09 16:30:37 steven Exp $
# $Id: patch-mkspecs_defs_pro,v 1.2 2010/06/07 20:08:09 kili Exp $
-QMAKE_CXXFLAGS_DEBUG += -pedantic
-QMAKE_CXXFLAGS += -pedantic
+QMAKE_CXXFLAGS_DEBUG += !!CXXFLAGS!!
+QMAKE_CXXFLAGS += !!CXXFLAGS!!
+QMAKE_CXXFLAGS_DEBUG += ${CXXFLAGS}
+QMAKE_CXXFLAGS += ${CXXFLAGS}
+QMAKE_CXXFLAGS_RELEASE =
win32 {

View File

@ -1,12 +1,12 @@
$OpenBSD: patch-qcad_src_qc_applicationwindow_cpp,v 1.1 2007/01/09 16:30:37 steven Exp $
--- qcad/src/qc_applicationwindow.cpp.orig Sat Jan 6 16:31:24 2007
+++ qcad/src/qc_applicationwindow.cpp Sat Jan 6 16:54:10 2007
@@ -2943,7 +2943,7 @@ void QC_ApplicationWindow::slotHelpManua
$OpenBSD: patch-qcad_src_qc_applicationwindow_cpp,v 1.2 2010/06/07 20:08:09 kili Exp $
--- qcad/src/qc_applicationwindow.cpp.orig Tue Nov 22 12:49:33 2005
+++ qcad/src/qc_applicationwindow.cpp Sun Jun 6 14:14:48 2010
@@ -2943,7 +2943,7 @@ void QC_ApplicationWindow::slotHelpManual() {
RS_SYSTEM->getAppDir().latin1());
RS_DEBUG->print("QC_ApplicationWindow::slotHelpManual(): appdir: %s",
RS_SYSTEM->getAppDir().latin1());
- assistant = new QAssistantClient(RS_SYSTEM->getAppDir()+"/bin", this);
+ assistant = new QAssistantClient("!!QTDIR!!/bin", this);
+ assistant = new QAssistantClient("${MODQT_LIBDIR}/bin", this);
connect(assistant, SIGNAL(error(const QString&)),
this, SLOT(slotError(const QString&)));
QStringList args;

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-qcadlib_src_engine_rs_arc_cpp,v 1.1 2007/01/09 16:30:37 steven Exp $
$OpenBSD: patch-qcadlib_src_engine_rs_arc_cpp,v 1.2 2010/06/07 20:08:09 kili Exp $
--- qcadlib/src/engine/rs_arc.cpp.orig Tue Nov 22 12:52:35 2005
+++ qcadlib/src/engine/rs_arc.cpp Thu Jan 4 00:40:05 2007
@@ -647,6 +647,7 @@ void RS_Arc::draw(RS_Painter* painter, R
+++ qcadlib/src/engine/rs_arc.cpp Mon Jun 7 21:46:08 2010
@@ -647,6 +647,7 @@ void RS_Arc::draw(RS_Painter* painter, RS_GraphicView*
// Pattern:
RS_LineTypePattern* pat;
if (isSelected()) {

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-qcadlib_src_engine_rs_circle_cpp,v 1.1 2007/01/09 16:30:37 steven Exp $
$OpenBSD: patch-qcadlib_src_engine_rs_circle_cpp,v 1.2 2010/06/07 20:08:09 kili Exp $
--- qcadlib/src/engine/rs_circle.cpp.orig Tue Nov 22 12:52:38 2005
+++ qcadlib/src/engine/rs_circle.cpp Thu Jan 4 00:39:42 2007
@@ -317,6 +317,7 @@ void RS_Circle::draw(RS_Painter* painter
+++ qcadlib/src/engine/rs_circle.cpp Mon Jun 7 21:46:08 2010
@@ -317,6 +317,7 @@ void RS_Circle::draw(RS_Painter* painter, RS_GraphicVi
// Pattern:
RS_LineTypePattern* pat;
if (isSelected()) {

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-qcadlib_src_engine_rs_ellipse_cpp,v 1.1 2007/01/09 16:30:38 steven Exp $
$OpenBSD: patch-qcadlib_src_engine_rs_ellipse_cpp,v 1.2 2010/06/07 20:08:09 kili Exp $
--- qcadlib/src/engine/rs_ellipse.cpp.orig Tue Nov 22 12:52:30 2005
+++ qcadlib/src/engine/rs_ellipse.cpp Thu Jan 4 00:39:20 2007
@@ -481,6 +481,7 @@ void RS_Ellipse::draw(RS_Painter* painte
+++ qcadlib/src/engine/rs_ellipse.cpp Mon Jun 7 21:46:08 2010
@@ -481,6 +481,7 @@ void RS_Ellipse::draw(RS_Painter* painter, RS_GraphicV
// Pattern:
RS_LineTypePattern* pat;
if (isSelected()) {

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-qcadlib_src_engine_rs_entity_cpp,v 1.1 2010/06/07 20:08:09 kili Exp $
--- qcadlib/src/engine/rs_entity.cpp.orig Tue Nov 22 12:52:32 2005
+++ qcadlib/src/engine/rs_entity.cpp Sat Jun 5 19:00:52 2010
@@ -861,7 +861,7 @@ std::ostream& operator << (std::ostream& os, RS_Entity
os << " layer: NULL ";
} else {
os << " layer: " << e.layer->getName().latin1() << " ";
- os << " layer address: " << (int)(e.layer) << " ";
+ os << " layer address: " << (long)(e.layer) << " ";
}
os << e.pen << "\n";

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-qcadlib_src_engine_rs_layer_cpp,v 1.1 2010/06/07 20:08:09 kili Exp $
--- qcadlib/src/engine/rs_layer.cpp.orig Tue Nov 22 12:52:38 2005
+++ qcadlib/src/engine/rs_layer.cpp Sat Jun 5 19:10:20 2010
@@ -55,7 +55,7 @@ std::ostream& operator << (std::ostream& os, const RS_
os << " name: " << l.getName().latin1()
<< " pen: " << l.getPen()
<< " frozen: " << (int)l.isFrozen()
- << " address: " << (int)(&l)
+ << " address: " << (long)(&l)
<< std::endl;
return os;
}

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-qcadlib_src_engine_rs_line_cpp,v 1.1 2007/01/09 16:30:38 steven Exp $
$OpenBSD: patch-qcadlib_src_engine_rs_line_cpp,v 1.2 2010/06/07 20:08:09 kili Exp $
--- qcadlib/src/engine/rs_line.cpp.orig Tue Nov 22 12:52:35 2005
+++ qcadlib/src/engine/rs_line.cpp Thu Jan 4 00:38:03 2007
@@ -457,6 +457,7 @@ void RS_Line::draw(RS_Painter* painter,
+++ qcadlib/src/engine/rs_line.cpp Mon Jun 7 21:46:08 2010
@@ -457,6 +457,7 @@ void RS_Line::draw(RS_Painter* painter, RS_GraphicView
// Pattern:
RS_LineTypePattern* pat;
if (isSelected()) {

View File

@ -1,14 +1,14 @@
$OpenBSD: patch-qcadlib_src_engine_rs_system_cpp,v 1.1 2007/01/09 16:30:38 steven Exp $
--- qcadlib/src/engine/rs_system.cpp.orig Sat Jan 6 17:11:57 2007
+++ qcadlib/src/engine/rs_system.cpp Sat Jan 6 17:13:05 2007
@@ -270,15 +270,9 @@ RS_StringList RS_System::getFileList(con
$OpenBSD: patch-qcadlib_src_engine_rs_system_cpp,v 1.2 2010/06/07 20:08:09 kili Exp $
--- qcadlib/src/engine/rs_system.cpp.orig Tue Nov 22 12:52:36 2005
+++ qcadlib/src/engine/rs_system.cpp Sun Jun 6 14:14:48 2010
@@ -270,15 +270,9 @@ RS_StringList RS_System::getFileList(const RS_String&
/*RS_StringList dirList;
- // Redhat style:
- dirList.append("/usr/share/" + appDirName);
+ // OpenBSD style:
+ dirList.append("!!LOCALBASE!!/share/" + appDirName);
+ dirList.append("${LOCALBASE}/share/" + appDirName);
- // SuSE style:
- dirList.append("/usr/X11R6/" + appDirName);
@ -19,7 +19,7 @@ $OpenBSD: patch-qcadlib_src_engine_rs_system_cpp,v 1.1 2007/01/09 16:30:38 steve
// Local directory:
dirList.append(".");
//dirList.append(getCurrentDir());
@@ -333,13 +327,8 @@ RS_StringList RS_System::getDirectoryLis
@@ -333,13 +327,8 @@ RS_StringList RS_System::getDirectoryList(const RS_Str
dirList.append(appDir + "/" + subDirectory);
}
@ -31,7 +31,7 @@ $OpenBSD: patch-qcadlib_src_engine_rs_system_cpp,v 1.1 2007/01/09 16:30:38 steve
-
- dirList.append("/usr/X11R6/share/" + appDirName + "/" + subDirectory);
+ // OpenBSD style:
+ dirList.append("!!LOCALBASE!!/share/" + appDirName + "/" + subDirectory);
+ dirList.append("${LOCALBASE}/share/" + appDirName + "/" + subDirectory);
dirList.append(getHomeDir() + "/." + appDirName + "/" + subDirectory);
#ifdef __APPLE__

View File

@ -1,13 +1,13 @@
$OpenBSD: patch-qcadlib_src_engine_rs_system_h,v 1.1 2007/01/09 16:30:38 steven Exp $
$OpenBSD: patch-qcadlib_src_engine_rs_system_h,v 1.2 2010/06/07 20:08:09 kili Exp $
--- qcadlib/src/engine/rs_system.h.orig Tue Nov 22 12:52:38 2005
+++ qcadlib/src/engine/rs_system.h Sat Jan 6 19:49:01 2007
@@ -125,8 +125,7 @@ public:
+++ qcadlib/src/engine/rs_system.h Sun Jun 6 14:14:48 2010
@@ -125,8 +125,7 @@ class RS_System { (public)
* @return Absolute path to the documentation.
*/
RS_String getDocPath() {
- RS_StringList lst = getDirectoryList("doc");
- return lst.first();
+ return "!!DOCDIR!!";
+ return "${LOCALBASE}/share/doc/qcad";
}
/**

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-qcadlib_src_gui_rs_graphicview_cpp,v 1.1 2007/01/09 16:30:38 steven Exp $
$OpenBSD: patch-qcadlib_src_gui_rs_graphicview_cpp,v 1.2 2010/06/07 20:08:09 kili Exp $
--- qcadlib/src/gui/rs_graphicview.cpp.orig Tue Nov 22 12:52:28 2005
+++ qcadlib/src/gui/rs_graphicview.cpp Thu Jan 4 01:01:38 2007
@@ -1740,75 +1740,117 @@ void RS_GraphicView::drawArcSmooth(const
+++ qcadlib/src/gui/rs_graphicview.cpp Mon Jun 7 21:46:08 2010
@@ -1740,75 +1740,117 @@ void RS_GraphicView::drawArcSmooth(const RS_Vector& ce
*/
RS_LineTypePattern* RS_GraphicView::getPattern(RS2::LineType t) {
switch (t) {

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-qcadlib_src_gui_rs_linetypepattern_h,v 1.1 2007/01/09 16:30:38 steven Exp $
$OpenBSD: patch-qcadlib_src_gui_rs_linetypepattern_h,v 1.2 2010/06/07 20:08:09 kili Exp $
--- qcadlib/src/gui/rs_linetypepattern.h.orig Tue Nov 22 12:52:27 2005
+++ qcadlib/src/gui/rs_linetypepattern.h Wed Jan 3 23:10:17 2007
@@ -57,40 +57,4 @@ public:
+++ qcadlib/src/gui/rs_linetypepattern.h Mon Jun 7 21:46:08 2010
@@ -57,40 +57,4 @@ class RS_LineTypePattern { (public)
int num;
};

View File

@ -1,5 +1,5 @@
@comment $OpenBSD: PLIST,v 1.5 2007/01/09 16:30:38 steven Exp $
bin/qcad
@comment $OpenBSD: PLIST,v 1.6 2010/06/07 20:08:09 kili Exp $
@bin bin/qcad
share/doc/qcad/
share/doc/qcad/appendix.html
share/doc/qcad/appendix_bib.html