Bug 184880 - x11/temperature.app: Fix build with clang
Summary: x11/temperature.app: Fix build with clang
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Pawel Pekala
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-16 18:10 UTC by tkato432
Modified: 2013-12-21 10:30 UTC (History)
0 users

See Also:


Attachments
file.diff (4.69 KB, patch)
2013-12-16 18:10 UTC, tkato432
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description tkato432 2013-12-16 18:10:22 UTC
- Fix build with clang
- Support PLIST_FILES

New file:
files/patch-Temperature.cc
files/patch-Temperature.h
files/patch-Xpm.cc
Comment 1 Pawel Pekala freebsd_committer freebsd_triage 2013-12-20 19:13:41 UTC
Responsible Changed
From-To: freebsd-ports-bugs->pawel

I'll take it.
Comment 2 dfilter service freebsd_committer freebsd_triage 2013-12-20 19:18:26 UTC
Author: pawel
Date: Fri Dec 20 19:18:18 2013
New Revision: 337080
URL: http://svnweb.freebsd.org/changeset/ports/337080

Log:
  - Fix build with clang
  - Switch to PLIST_FILES
  - Support staging
  
  PR:		ports/184880
  Submitted by:	KATO Tsuguru <tkato432@yahoo.com>

Added:
  head/x11/temperature.app/files/patch-Temperature.cc   (contents, props changed)
  head/x11/temperature.app/files/patch-Temperature.h   (contents, props changed)
  head/x11/temperature.app/files/patch-Xpm.cc   (contents, props changed)
Deleted:
  head/x11/temperature.app/pkg-plist
Modified:
  head/x11/temperature.app/Makefile   (contents, props changed)
  head/x11/temperature.app/files/patch-Makefile   (contents, props changed)

Modified: head/x11/temperature.app/Makefile
==============================================================================
--- head/x11/temperature.app/Makefile	Fri Dec 20 19:12:56 2013	(r337079)
+++ head/x11/temperature.app/Makefile	Fri Dec 20 19:18:18 2013	(r337080)
@@ -11,21 +11,23 @@ DISTNAME=	Temperature.app-${PORTVERSION}
 MAINTAINER=	ports@FreeBSD.org
 COMMENT=	Dockable WindowMaker applet which displays the local temperature
 
-LICENSE=	GPLv2
-LICENSE_FILE=	${WRKSRC}/COPYING
+LICENSE=	GPLv2 # (or later)
 
 RUN_DEPENDS=	wget:${PORTSDIR}/ftp/wget
 
+OPTIONS_DEFINE=	DOCS
+
 USE_XORG=	x11 xpm
 
-NO_STAGE=	yes
+PORTDOCS=	README
+PLIST_FILES=	bin/Temperature.app
+
 .include <bsd.port.options.mk>
 
 do-install:
-	@${INSTALL_PROGRAM} ${WRKSRC}/Temperature.app ${PREFIX}/bin
-.if ${PORT_OPTIONS:MDOCS}
-	@${MKDIR} ${DOCSDIR}
-	@${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
-.endif
+	(cd ${WRKSRC} && ${INSTALL_PROGRAM} Temperature.app \
+		${STAGEDIR}${PREFIX}/bin)
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+	(cd ${WRKSRC} && ${INSTALL_DATA} README ${STAGEDIR}${DOCSDIR})
 
 .include <bsd.port.mk>

Modified: head/x11/temperature.app/files/patch-Makefile
==============================================================================
--- head/x11/temperature.app/files/patch-Makefile	Fri Dec 20 19:12:56 2013	(r337079)
+++ head/x11/temperature.app/files/patch-Makefile	Fri Dec 20 19:18:18 2013	(r337080)
@@ -9,9 +9,10 @@
 +GNUSTEP_BINDIR = $(LOCALBASE)/GNUstep/Apps/Temperature.app
 +X11_BINDIR = $(LOCALBASE)/bin
  
- CXX=c++
+-CXX=c++
 -CXXFLAGS += -Wall -pedantic -fno-rtti -fno-exceptions -O2 -I/usr/X11R6/include
 -LDFLAGS += -L/usr/X11R6/lib -lXpm -lXext -lX11
++CXX ?= c++
 +CXXFLAGS += -Wall -pedantic -fno-rtti -fno-exceptions -I$(LOCALBASE)/include
 +LDFLAGS += -L$(LOCALBASE)/lib -lXpm -lXext -lX11
  

Added: head/x11/temperature.app/files/patch-Temperature.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11/temperature.app/files/patch-Temperature.cc	Fri Dec 20 19:18:18 2013	(r337080)
@@ -0,0 +1,41 @@
+--- Temperature.cc.bak	2002-04-06 08:44:09.000000000 +0900
++++ Temperature.cc	2013-12-07 17:25:30.000000000 +0900
+@@ -20,24 +20,29 @@
+ //
+ 
+ #include <X11/Xlib.h>
+-#include <iostream.h>
+-#include <fstream.h>
+-#include <stdlib.h>
+-#include <stdio.h>
+-#include <string.h>
++#include <iostream>
++#include <fstream>
++#include <cstdlib>
++#include <cstdio>
++#include <cstring>
+ #include <unistd.h>
+-#include <signal.h>
+-#include <errno.h>
++#include <csignal>
++#include <cerrno>
+ #include <sys/types.h>
+ #include <sys/wait.h>
+-#include <math.h>
+-#include <time.h>
++#include <cmath>
++#include <ctime>
+ #include "Xpm.h"
+ #include "Temperature.h"
+ 
+ #include "pixmaps/main.xpm"
+ #include "pixmaps/redlight.xpm"
+ 
++using std::cerr;
++using std::cout;
++using std::endl;
++using std::fstream;
++
+ volatile static ChildStatus childStatus;
+ 
+ static void catchBrokenPipe(int sig) 

Added: head/x11/temperature.app/files/patch-Temperature.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11/temperature.app/files/patch-Temperature.h	Fri Dec 20 19:18:18 2013	(r337080)
@@ -0,0 +1,15 @@
+--- Temperature.h.bak	2002-04-06 08:44:17.000000000 +0900
++++ Temperature.h	2013-12-07 17:24:28.000000000 +0900
+@@ -22,9 +22,11 @@
+ #ifndef _TEMPERATURE_H_
+ #define _TEMPERATURE_H_
+ 
+-#include <fstream.h>
++#include <fstream>
+ #include <X11/Xlib.h>
+ 
++using std::ifstream;
++
+ #define APPNAME                 "Temperature.app"
+ #define VERSION                 "1.4"
+ #define INSTANCENAME            "temperature_app"

Added: head/x11/temperature.app/files/patch-Xpm.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11/temperature.app/files/patch-Xpm.cc	Fri Dec 20 19:18:18 2013	(r337080)
@@ -0,0 +1,22 @@
+--- Xpm.cc.bak	2002-04-06 08:44:36.000000000 +0900
++++ Xpm.cc	2013-12-07 17:25:00.000000000 +0900
+@@ -22,12 +22,16 @@
+ #include <X11/Xlib.h>
+ #include <X11/xpm.h>
+ #include <X11/extensions/shape.h>
+-#include <iostream.h>
+-#include <stdlib.h>
+-#include <string.h>
++#include <iostream>
++#include <cstdlib>
++#include <cstring>
+ #include "Temperature.h"
+ #include "Xpm.h"
+ 
++using std::cerr;
++using std::cout;
++using std::endl;
++
+ Xpm::Xpm(Display* display, Window root, char** data) 
+ {
+    int error;
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 3 Pawel Pekala freebsd_committer freebsd_triage 2013-12-20 19:18:28 UTC
State Changed
From-To: open->closed

Committed. Thanks!
Comment 4 dfilter service freebsd_committer freebsd_triage 2013-12-21 10:22:22 UTC
Author: mat
Date: Sat Dec 21 10:22:13 2013
New Revision: 337122
URL: http://svnweb.freebsd.org/changeset/ports/337122

Log:
  MFH: r337080
  
  - Fix build with clang
  - Switch to PLIST_FILES
  - Support staging
  
  PR:		ports/184880
  Submitted by:	KATO Tsuguru <tkato432@yahoo.com>
  Approved by:	portmgr (implicit)

Added:
  branches/2014Q1/x11/temperature.app/files/patch-Temperature.cc
     - copied unchanged from r337080, head/x11/temperature.app/files/patch-Temperature.cc
  branches/2014Q1/x11/temperature.app/files/patch-Temperature.h
     - copied unchanged from r337080, head/x11/temperature.app/files/patch-Temperature.h
  branches/2014Q1/x11/temperature.app/files/patch-Xpm.cc
     - copied unchanged from r337080, head/x11/temperature.app/files/patch-Xpm.cc
Deleted:
  branches/2014Q1/x11/temperature.app/pkg-plist
Modified:
  branches/2014Q1/x11/temperature.app/Makefile   (contents, props changed)
  branches/2014Q1/x11/temperature.app/files/patch-Makefile   (contents, props changed)
Directory Properties:
  branches/2014Q1/   (props changed)

Modified: branches/2014Q1/x11/temperature.app/Makefile
==============================================================================
--- branches/2014Q1/x11/temperature.app/Makefile	Sat Dec 21 10:20:51 2013	(r337121)
+++ branches/2014Q1/x11/temperature.app/Makefile	Sat Dec 21 10:22:13 2013	(r337122)
@@ -11,21 +11,23 @@ DISTNAME=	Temperature.app-${PORTVERSION}
 MAINTAINER=	ports@FreeBSD.org
 COMMENT=	Dockable WindowMaker applet which displays the local temperature
 
-LICENSE=	GPLv2
-LICENSE_FILE=	${WRKSRC}/COPYING
+LICENSE=	GPLv2 # (or later)
 
 RUN_DEPENDS=	wget:${PORTSDIR}/ftp/wget
 
+OPTIONS_DEFINE=	DOCS
+
 USE_XORG=	x11 xpm
 
-NO_STAGE=	yes
+PORTDOCS=	README
+PLIST_FILES=	bin/Temperature.app
+
 .include <bsd.port.options.mk>
 
 do-install:
-	@${INSTALL_PROGRAM} ${WRKSRC}/Temperature.app ${PREFIX}/bin
-.if ${PORT_OPTIONS:MDOCS}
-	@${MKDIR} ${DOCSDIR}
-	@${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
-.endif
+	(cd ${WRKSRC} && ${INSTALL_PROGRAM} Temperature.app \
+		${STAGEDIR}${PREFIX}/bin)
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+	(cd ${WRKSRC} && ${INSTALL_DATA} README ${STAGEDIR}${DOCSDIR})
 
 .include <bsd.port.mk>

Modified: branches/2014Q1/x11/temperature.app/files/patch-Makefile
==============================================================================
--- branches/2014Q1/x11/temperature.app/files/patch-Makefile	Sat Dec 21 10:20:51 2013	(r337121)
+++ branches/2014Q1/x11/temperature.app/files/patch-Makefile	Sat Dec 21 10:22:13 2013	(r337122)
@@ -9,9 +9,10 @@
 +GNUSTEP_BINDIR = $(LOCALBASE)/GNUstep/Apps/Temperature.app
 +X11_BINDIR = $(LOCALBASE)/bin
  
- CXX=c++
+-CXX=c++
 -CXXFLAGS += -Wall -pedantic -fno-rtti -fno-exceptions -O2 -I/usr/X11R6/include
 -LDFLAGS += -L/usr/X11R6/lib -lXpm -lXext -lX11
++CXX ?= c++
 +CXXFLAGS += -Wall -pedantic -fno-rtti -fno-exceptions -I$(LOCALBASE)/include
 +LDFLAGS += -L$(LOCALBASE)/lib -lXpm -lXext -lX11
  

Copied: branches/2014Q1/x11/temperature.app/files/patch-Temperature.cc (from r337080, head/x11/temperature.app/files/patch-Temperature.cc)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/2014Q1/x11/temperature.app/files/patch-Temperature.cc	Sat Dec 21 10:22:13 2013	(r337122, copy of r337080, head/x11/temperature.app/files/patch-Temperature.cc)
@@ -0,0 +1,41 @@
+--- Temperature.cc.bak	2002-04-06 08:44:09.000000000 +0900
++++ Temperature.cc	2013-12-07 17:25:30.000000000 +0900
+@@ -20,24 +20,29 @@
+ //
+ 
+ #include <X11/Xlib.h>
+-#include <iostream.h>
+-#include <fstream.h>
+-#include <stdlib.h>
+-#include <stdio.h>
+-#include <string.h>
++#include <iostream>
++#include <fstream>
++#include <cstdlib>
++#include <cstdio>
++#include <cstring>
+ #include <unistd.h>
+-#include <signal.h>
+-#include <errno.h>
++#include <csignal>
++#include <cerrno>
+ #include <sys/types.h>
+ #include <sys/wait.h>
+-#include <math.h>
+-#include <time.h>
++#include <cmath>
++#include <ctime>
+ #include "Xpm.h"
+ #include "Temperature.h"
+ 
+ #include "pixmaps/main.xpm"
+ #include "pixmaps/redlight.xpm"
+ 
++using std::cerr;
++using std::cout;
++using std::endl;
++using std::fstream;
++
+ volatile static ChildStatus childStatus;
+ 
+ static void catchBrokenPipe(int sig) 

Copied: branches/2014Q1/x11/temperature.app/files/patch-Temperature.h (from r337080, head/x11/temperature.app/files/patch-Temperature.h)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/2014Q1/x11/temperature.app/files/patch-Temperature.h	Sat Dec 21 10:22:13 2013	(r337122, copy of r337080, head/x11/temperature.app/files/patch-Temperature.h)
@@ -0,0 +1,15 @@
+--- Temperature.h.bak	2002-04-06 08:44:17.000000000 +0900
++++ Temperature.h	2013-12-07 17:24:28.000000000 +0900
+@@ -22,9 +22,11 @@
+ #ifndef _TEMPERATURE_H_
+ #define _TEMPERATURE_H_
+ 
+-#include <fstream.h>
++#include <fstream>
+ #include <X11/Xlib.h>
+ 
++using std::ifstream;
++
+ #define APPNAME                 "Temperature.app"
+ #define VERSION                 "1.4"
+ #define INSTANCENAME            "temperature_app"

Copied: branches/2014Q1/x11/temperature.app/files/patch-Xpm.cc (from r337080, head/x11/temperature.app/files/patch-Xpm.cc)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/2014Q1/x11/temperature.app/files/patch-Xpm.cc	Sat Dec 21 10:22:13 2013	(r337122, copy of r337080, head/x11/temperature.app/files/patch-Xpm.cc)
@@ -0,0 +1,22 @@
+--- Xpm.cc.bak	2002-04-06 08:44:36.000000000 +0900
++++ Xpm.cc	2013-12-07 17:25:00.000000000 +0900
+@@ -22,12 +22,16 @@
+ #include <X11/Xlib.h>
+ #include <X11/xpm.h>
+ #include <X11/extensions/shape.h>
+-#include <iostream.h>
+-#include <stdlib.h>
+-#include <string.h>
++#include <iostream>
++#include <cstdlib>
++#include <cstring>
+ #include "Temperature.h"
+ #include "Xpm.h"
+ 
++using std::cerr;
++using std::cout;
++using std::endl;
++
+ Xpm::Xpm(Display* display, Window root, char** data) 
+ {
+    int error;
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"