diff options
author | pawel <pawel@FreeBSD.org> | 2013-12-21 03:18:18 +0800 |
---|---|---|
committer | pawel <pawel@FreeBSD.org> | 2013-12-21 03:18:18 +0800 |
commit | 253d408dd6abdaa2f80073cbdda9d876187b4447 (patch) | |
tree | 4dfa941e70ceedf9af7cd0e06061aa310c0f8d35 /x11/temperature.app | |
parent | 537e4435687180459b20fd6b41de4791f5bd1ca3 (diff) | |
download | freebsd-ports-graphics-253d408dd6abdaa2f80073cbdda9d876187b4447.tar.gz freebsd-ports-graphics-253d408dd6abdaa2f80073cbdda9d876187b4447.tar.zst freebsd-ports-graphics-253d408dd6abdaa2f80073cbdda9d876187b4447.zip |
- Fix build with clang
- Switch to PLIST_FILES
- Support staging
PR: ports/184880
Submitted by: KATO Tsuguru <tkato432@yahoo.com>
Diffstat (limited to 'x11/temperature.app')
-rw-r--r-- | x11/temperature.app/Makefile | 18 | ||||
-rw-r--r-- | x11/temperature.app/files/patch-Makefile | 3 | ||||
-rw-r--r-- | x11/temperature.app/files/patch-Temperature.cc | 41 | ||||
-rw-r--r-- | x11/temperature.app/files/patch-Temperature.h | 15 | ||||
-rw-r--r-- | x11/temperature.app/files/patch-Xpm.cc | 22 | ||||
-rw-r--r-- | x11/temperature.app/pkg-plist | 3 |
6 files changed, 90 insertions, 12 deletions
diff --git a/x11/temperature.app/Makefile b/x11/temperature.app/Makefile index 24773927851..6b51bedc46f 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 1a2df17c74f..344c692e2d3 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 00000000000..284da6e9273 --- /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 00000000000..e42c0aff16d --- /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 00000000000..6d687654fef --- /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 607e89760b0..00000000000 --- a/x11/temperature.app/pkg-plist +++ /dev/null @@ -1,3 +0,0 @@ -bin/Temperature.app -%%PORTDOCS%%%%DOCSDIR%%/README -%%PORTDOCS%%@dirrm %%DOCSDIR%% |