Bug 187753 - sysutils/toshctl: Fix build on -current
Summary: sysutils/toshctl: Fix build on -current
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: Martin Wilke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-19 18:40 UTC by tkato432
Modified: 2014-05-17 09:40 UTC (History)
0 users

See Also:


Attachments
file.diff (2.69 KB, patch)
2014-03-19 18:40 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 2014-03-19 18:40:05 UTC
- Fix build on -current
- Add LICENSE

New file:
files/patch-tosh_bios.cpp
files/patch-tosh_hci.cpp
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2014-03-19 18:40:38 UTC
Responsible Changed
From-To: freebsd-ports-bugs->miwi

miwi@ wants this submitter's PRs (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer freebsd_triage 2014-05-17 09:38:06 UTC
Author: miwi
Date: Sat May 17 08:38:00 2014
New Revision: 354295
URL: http://svnweb.freebsd.org/changeset/ports/354295
QAT: https://qat.redports.org/buildarchive/r354295/

Log:
  - Fix build on -current
  - Add LICENSE
  
  PR:		187753
  Submitted by:	Ports Fury

Added:
  head/sysutils/toshctl/files/
  head/sysutils/toshctl/files/patch-tosh_bios.cpp   (contents, props changed)
  head/sysutils/toshctl/files/patch-tosh_hci.cpp   (contents, props changed)
Modified:
  head/sysutils/toshctl/Makefile

Modified: head/sysutils/toshctl/Makefile
==============================================================================
--- head/sysutils/toshctl/Makefile	Sat May 17 08:36:15 2014	(r354294)
+++ head/sysutils/toshctl/Makefile	Sat May 17 08:38:00 2014	(r354295)
@@ -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>

Added: head/sysutils/toshctl/files/patch-tosh_bios.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/toshctl/files/patch-tosh_bios.cpp	Sat May 17 08:38:00 2014	(r354295)
@@ -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"

Added: head/sysutils/toshctl/files/patch-tosh_hci.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/toshctl/files/patch-tosh_hci.cpp	Sat May 17 08:38:00 2014	(r354295)
@@ -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));
_______________________________________________
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 Martin Wilke freebsd_committer freebsd_triage 2014-05-17 09:38:08 UTC
State Changed
From-To: open->closed

Committed. Thanks!