aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authormiwi <miwi@FreeBSD.org>2014-05-17 16:38:00 +0800
committermiwi <miwi@FreeBSD.org>2014-05-17 16:38:00 +0800
commit3a2fb086154a87fef8ee154b25999070ae487fe1 (patch)
tree1d41b39ab91d38610b186fb888f15166a471786e /sysutils
parent4f8560271521bd2ee1f4d4ac59ff53f137342829 (diff)
downloadfreebsd-ports-gnome-3a2fb086154a87fef8ee154b25999070ae487fe1.tar.gz
freebsd-ports-gnome-3a2fb086154a87fef8ee154b25999070ae487fe1.tar.zst
freebsd-ports-gnome-3a2fb086154a87fef8ee154b25999070ae487fe1.zip
- Fix build on -current
- Add LICENSE PR: 187753 Submitted by: Ports Fury
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/toshctl/Makefile20
-rw-r--r--sysutils/toshctl/files/patch-tosh_bios.cpp18
-rw-r--r--sysutils/toshctl/files/patch-tosh_hci.cpp24
3 files changed, 57 insertions, 5 deletions
diff --git a/sysutils/toshctl/Makefile b/sysutils/toshctl/Makefile
index 04110e0f2e04..01a078c643ab 100644
--- a/sysutils/toshctl/Makefile
+++ b/sysutils/toshctl/Makefile
@@ -3,19 +3,29 @@
PORTNAME= toshctl
PORTVERSION= 0.0.0p3
+PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= http://freebie.miraclenet.co.th/notebook/toshctl/
-EXTRACT_SUFX= .tgz
MAINTAINER= ports@FreeBSD.org
-COMMENT= A command-line tool to access parts of the Toshiba hardware interface
+COMMENT= Command-line tool to access parts of the Toshiba hardware interface
-ONLY_FOR_ARCHS= i386
-PLIST_FILES= bin/toshctl
+LICENSE= GPLv2 # (or later)
WRKSRC= ${WRKDIR}/toshctl
+USES= tar:tgz
+
+PLIST_FILES= bin/toshctl
+
+ONLY_FOR_ARCHS= i386
+
+post-patch:
+ @${REINPLACE_CMD} -e \
+ 's|$$(CC)|$$(CXX)| ; \
+ s|$$(CFLAGS)|$$(CXXFLAGS)|' ${WRKSRC}/Makefile
+
do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
+ (cd ${WRKSRC} && ${INSTALL_PROGRAM} toshctl ${STAGEDIR}${PREFIX}/bin)
.include <bsd.port.mk>
diff --git a/sysutils/toshctl/files/patch-tosh_bios.cpp b/sysutils/toshctl/files/patch-tosh_bios.cpp
new file mode 100644
index 000000000000..297084b1f377
--- /dev/null
+++ b/sysutils/toshctl/files/patch-tosh_bios.cpp
@@ -0,0 +1,18 @@
+--- tosh_bios.cpp.orig
++++ tosh_bios.cpp
+@@ -23,11 +23,12 @@
+ static const char PROGRAM_ID[]="$Id: tosh_bios.cpp,v 1.4 2003/07/29 01:43:38 cws Exp $";
+
+ #include "tosh_utils.h"
+-#include <ctype.h>
+-#include <stdio.h>
++#include <cctype>
++#include <cstdio>
++#include <cstring>
+ #include <sys/types.h>
+ #include <sys/mman.h>
+-#include <time.h>
++#include <ctime>
+
+ #include "toshibaIDs.hh"
+ #include "tosh_vars.h"
diff --git a/sysutils/toshctl/files/patch-tosh_hci.cpp b/sysutils/toshctl/files/patch-tosh_hci.cpp
new file mode 100644
index 000000000000..276c0e92028b
--- /dev/null
+++ b/sysutils/toshctl/files/patch-tosh_hci.cpp
@@ -0,0 +1,24 @@
+--- tosh_hci.cpp.orig
++++ tosh_hci.cpp
+@@ -22,7 +22,8 @@
+ static const char PROGRAM_ID[]="$Id: tosh_hci.cpp,v 1.5 2003/07/29 01:43:38 cws Exp $";
+
+ #include "tosh_hci.h"
+-#include <stdio.h>
++#include <cstdio>
++#include <cstdlib>
+
+ CToshVar* initToshHCI()
+ {
+@@ -159,10 +160,10 @@
+ unsigned result_a,result_c;
+
+ asm ("inb $0xb2,%%al\n\t"
+- "jc hci_call_error\n\t"
++ "jc 0f\n\t"
+ "movl %%ecx,%%eax\n\t"
+ "xor %%eax,%%eax\n"
+- "hci_call_error:"
++ "0:"
+ : "=a" (result_a) ,"=c" (result_c)
+ : "a" (eax), "b" (ebx), "c" (ecx), "d" (edx));