Date: Thu, 20 Mar 2014 03:26:53 +0900 From: KATO Tsuguru <tkato432@yahoo.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/187753: sysutils/toshctl: Fix build on -current Message-ID: <20140320032653.74d5f1ee49bd7ab80ad2c6c3@yahoo.com> Resent-Message-ID: <201403191840.s2JIe5qB002542@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 187753 >Category: ports >Synopsis: sysutils/toshctl: Fix build on -current >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: Wed Mar 19 18:40:05 UTC 2014 >Closed-Date: >Last-Modified: >Originator: KATO Tsuguru >Release: FreeBSD 8.4-RELEASE-p7 i386 >Organization: >Environment: >Description: - Fix build on -current - Add LICENSE New file: files/patch-tosh_bios.cpp files/patch-tosh_hci.cpp >How-To-Repeat: >Fix: diff -urN /usr/ports/sysutils/toshctl/Makefile sysutils/toshctl/Makefile --- /usr/ports/sysutils/toshctl/Makefile 2014-03-14 00:37:02.000000000 +0900 +++ sysutils/toshctl/Makefile 2014-03-20 00:00:00.000000000 +0900 @@ -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 -urN /usr/ports/sysutils/toshctl/files/patch-tosh_bios.cpp sysutils/toshctl/files/patch-tosh_bios.cpp --- /usr/ports/sysutils/toshctl/files/patch-tosh_bios.cpp 1970-01-01 09:00:00.000000000 +0900 +++ sysutils/toshctl/files/patch-tosh_bios.cpp 2014-03-20 00:00:00.000000000 +0900 @@ -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 -urN /usr/ports/sysutils/toshctl/files/patch-tosh_hci.cpp sysutils/toshctl/files/patch-tosh_hci.cpp --- /usr/ports/sysutils/toshctl/files/patch-tosh_hci.cpp 1970-01-01 09:00:00.000000000 +0900 +++ sysutils/toshctl/files/patch-tosh_hci.cpp 2014-03-20 00:00:00.000000000 +0900 @@ -0,0 +1,25 @@ +--- 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)); + >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140320032653.74d5f1ee49bd7ab80ad2c6c3>