summaryrefslogtreecommitdiff
path: root/x11
diff options
context:
space:
mode:
authorPawel Pekala <pawel@FreeBSD.org>2013-12-20 19:18:18 +0000
committerPawel Pekala <pawel@FreeBSD.org>2013-12-20 19:18:18 +0000
commit0a7dddb50027579f23326b34f974895c27b6259b (patch)
tree4dfa941e70ceedf9af7cd0e06061aa310c0f8d35 /x11
parentwww/py-formencode: switch from easy_install (diff)
- Fix build with clang
- Switch to PLIST_FILES - Support staging PR: ports/184880 Submitted by: KATO Tsuguru <tkato432@yahoo.com>
Notes
Notes: svn path=/head/; revision=337080
Diffstat (limited to 'x11')
-rw-r--r--x11/temperature.app/Makefile18
-rw-r--r--x11/temperature.app/files/patch-Makefile3
-rw-r--r--x11/temperature.app/files/patch-Temperature.cc41
-rw-r--r--x11/temperature.app/files/patch-Temperature.h15
-rw-r--r--x11/temperature.app/files/patch-Xpm.cc22
-rw-r--r--x11/temperature.app/pkg-plist3
6 files changed, 90 insertions, 12 deletions
diff --git a/x11/temperature.app/Makefile b/x11/temperature.app/Makefile
index 24773927851e..6b51bedc46ff 100644
--- a/x11/temperature.app/Makefile
+++ b/x11/temperature.app/Makefile
@@ -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>
diff --git a/x11/temperature.app/files/patch-Makefile b/x11/temperature.app/files/patch-Makefile
index 1a2df17c74ff..344c692e2d3b 100644
--- a/x11/temperature.app/files/patch-Makefile
+++ b/x11/temperature.app/files/patch-Makefile
@@ -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
diff --git a/x11/temperature.app/files/patch-Temperature.cc b/x11/temperature.app/files/patch-Temperature.cc
new file mode 100644
index 000000000000..284da6e92735
--- /dev/null
+++ b/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)
diff --git a/x11/temperature.app/files/patch-Temperature.h b/x11/temperature.app/files/patch-Temperature.h
new file mode 100644
index 000000000000..e42c0aff16df
--- /dev/null
+++ b/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"
diff --git a/x11/temperature.app/files/patch-Xpm.cc b/x11/temperature.app/files/patch-Xpm.cc
new file mode 100644
index 000000000000..6d687654fefb
--- /dev/null
+++ b/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;
diff --git a/x11/temperature.app/pkg-plist b/x11/temperature.app/pkg-plist
deleted file mode 100644
index 607e89760b06..000000000000
--- a/x11/temperature.app/pkg-plist
+++ /dev/null
@@ -1,3 +0,0 @@
-bin/Temperature.app
-%%PORTDOCS%%%%DOCSDIR%%/README
-%%PORTDOCS%%@dirrm %%DOCSDIR%%