Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Dec 2013 02:49:27 +0900
From:      KATO Tsuguru <tkato432@yahoo.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/184815: graphics/graphopt: Fix build with clang
Message-ID:  <20131217024927.4d2e4425c36e8cc56228f99b@yahoo.com>
Resent-Message-ID: <201312161810.rBGIA2W7015814@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         184815
>Category:       ports
>Synopsis:       graphics/graphopt: Fix build with clang
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 16 18:10:02 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     KATO Tsuguru
>Release:        FreeBSD 8.4-RELEASE-p4 i386
>Organization:
>Environment:
>Description:
- Fix build with clang
- Add LICENSE
- Add DESKTOP_ENTRIES

New file:
files/patch-src__classes__dotImporter.cc
files/patch-src__classes__nodes.cc
files/patch-src__classes__optFileReader.cc
files/patch-src__classes__optFileWriter.cc
files/patch-src__classes__visioExporter.cc

>How-To-Repeat:
>Fix:

diff -urN /usr/ports/graphics/graphopt/Makefile graphics/graphopt/Makefile
--- /usr/ports/graphics/graphopt/Makefile	2013-11-06 22:02:25.000000000 +0900
+++ graphics/graphopt/Makefile	2013-12-17 00:00:00.000000000 +0900
@@ -3,7 +3,7 @@
 
 PORTNAME=	graphopt
 PORTVERSION=	0.4.1
-PORTREVISION=	5
+PORTREVISION=	6
 CATEGORIES=	graphics
 MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/v${PORTVERSION}
 EXTRACT_SUFX=	.tgz
@@ -11,8 +11,11 @@
 MAINTAINER=	ports@FreeBSD.org
 COMMENT=	Graph Layout Optimizer
 
+LICENSE=	GPLv2 # (or later)
+
 USE_GNOME=	gtk12
 GNU_CONFIGURE=	yes
 
-NO_STAGE=	yes
+DESKTOP_ENTRIES="GraphOpt" "" "" "${PORTNAME}" "Graphics;GTK;" ""
+
 .include <bsd.port.mk>
diff -urN /usr/ports/graphics/graphopt/files/patch-src:classes:psExporter.cc graphics/graphopt/files/patch-src:classes:psExporter.cc
--- /usr/ports/graphics/graphopt/files/patch-src:classes:psExporter.cc	2013-11-06 22:02:25.000000000 +0900
+++ graphics/graphopt/files/patch-src:classes:psExporter.cc	2013-12-17 00:00:00.000000000 +0900
@@ -1,10 +1,13 @@
 --- src/classes/psExporter.cc.orig	Mon Aug  9 09:31:11 2004
 +++ src/classes/psExporter.cc	Mon Aug  9 09:31:38 2004
-@@ -23,13 +23,13 @@ void psExporter::do_export() {
-    fclose(outfile);
- }
+@@ -1,4 +1,5 @@
+ #include "psExporter.h"
++#include <cstdlib>
  
  
+ psExporter::psExporter(char *what_file, nodes *what_nodes) {
+@@ -26,7 +27,7 @@
+ 
  void psExporter::write_headers(FILE *outfile) {
     char *line = new char[200];
 -   sprintf(line, "\%!PS-Adobe-1.0\n%%%%BoundingBox: 0 0 %d %d\n%%%%DocumentFonts: Helvetica\n%%%%Pages: 1\n",
@@ -12,6 +15,3 @@
             translatexcoord((double) biggest_x) + 2 * margin,
             translateycoord((double) biggest_y) + 2 * margin);
     fwrite(line, strlen(line), 1, outfile);
-    delete line;
- }
- 
diff -urN /usr/ports/graphics/graphopt/files/patch-src__classes__dotImporter.cc graphics/graphopt/files/patch-src__classes__dotImporter.cc
--- /usr/ports/graphics/graphopt/files/patch-src__classes__dotImporter.cc	1970-01-01 09:00:00.000000000 +0900
+++ graphics/graphopt/files/patch-src__classes__dotImporter.cc	2013-12-17 00:00:00.000000000 +0900
@@ -0,0 +1,10 @@
+--- src/classes/dotImporter.cc.orig
++++ src/classes/dotImporter.cc
+@@ -1,5 +1,6 @@
+ #include "dotImporter.h"
+-#include <string.h>
++#include <cstdlib>
++#include <cstring>
+ #include <gtk/gtk.h>
+ #include "../interface.h"
+ 
diff -urN /usr/ports/graphics/graphopt/files/patch-src__classes__nodes.cc graphics/graphopt/files/patch-src__classes__nodes.cc
--- /usr/ports/graphics/graphopt/files/patch-src__classes__nodes.cc	1970-01-01 09:00:00.000000000 +0900
+++ graphics/graphopt/files/patch-src__classes__nodes.cc	2013-12-17 00:00:00.000000000 +0900
@@ -0,0 +1,9 @@
+--- src/classes/nodes.cc.orig	2013-12-10 00:22:15.000000000 +0900
++++ src/classes/nodes.cc	2013-12-10 00:22:39.000000000 +0900
+@@ -1,4 +1,5 @@
+-#include <stdio.h>
++#include <cstdio>
++#include <cstdlib>
+ #include "nodes.h"
+ 
+ 
diff -urN /usr/ports/graphics/graphopt/files/patch-src__classes__optFileReader.cc graphics/graphopt/files/patch-src__classes__optFileReader.cc
--- /usr/ports/graphics/graphopt/files/patch-src__classes__optFileReader.cc	1970-01-01 09:00:00.000000000 +0900
+++ graphics/graphopt/files/patch-src__classes__optFileReader.cc	2013-12-17 00:00:00.000000000 +0900
@@ -0,0 +1,10 @@
+--- src/classes/optFileReader.cc.orig
++++ src/classes/optFileReader.cc
+@@ -1,5 +1,6 @@
+ #include "optFileReader.h"
+-#include <string.h>
++#include <cstdlib>
++#include <cstring>
+ #include <gtk/gtk.h>
+ #include "../interface.h"
+ 
diff -urN /usr/ports/graphics/graphopt/files/patch-src__classes__optFileWriter.cc graphics/graphopt/files/patch-src__classes__optFileWriter.cc
--- /usr/ports/graphics/graphopt/files/patch-src__classes__optFileWriter.cc	1970-01-01 09:00:00.000000000 +0900
+++ graphics/graphopt/files/patch-src__classes__optFileWriter.cc	2013-12-17 00:00:00.000000000 +0900
@@ -0,0 +1,8 @@
+--- src/classes/optFileWriter.cc.orig
++++ src/classes/optFileWriter.cc
+@@ -1,4 +1,5 @@
+ #include "optFileWriter.h"
++#include <cstdlib>
+ 
+ 
+ optFileWriter::optFileWriter(char *what_file, nodes *what_nodes) {
diff -urN /usr/ports/graphics/graphopt/files/patch-src__classes__visioExporter.cc graphics/graphopt/files/patch-src__classes__visioExporter.cc
--- /usr/ports/graphics/graphopt/files/patch-src__classes__visioExporter.cc	1970-01-01 09:00:00.000000000 +0900
+++ graphics/graphopt/files/patch-src__classes__visioExporter.cc	2013-12-17 00:00:00.000000000 +0900
@@ -0,0 +1,8 @@
+--- src/classes/visioExporter.cc.orig
++++ src/classes/visioExporter.cc
+@@ -1,4 +1,5 @@
+ #include "visioExporter.h"
++#include <cstdlib>
+ 
+ 
+ visioExporter::visioExporter(char *what_file, nodes *what_nodes) {
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131217024927.4d2e4425c36e8cc56228f99b>