Bug 184851 - devel/libmpcbdm: Fix build with clang
Summary: devel/libmpcbdm: Fix build with clang
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: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-16 18:10 UTC by tkato432
Modified: 2014-01-25 13:10 UTC (History)
0 users

See Also:


Attachments
file.diff (1.94 KB, patch)
2013-12-16 18:10 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 2013-12-16 18:10:13 UTC
- Fix build with clang
Comment 1 Martin Wilke freebsd_committer freebsd_triage 2014-01-19 10:02:15 UTC
State Changed
From-To: open->closed

Committed. Thanks!
Comment 2 dfilter service freebsd_committer freebsd_triage 2014-01-19 10:02:18 UTC
Author: miwi
Date: Sun Jan 19 10:02:10 2014
New Revision: 340258
URL: http://svnweb.freebsd.org/changeset/ports/340258
QAT: https://qat.redports.org/buildarchive/r340258/

Log:
  - Fix build with clang
  
  PR:		184851
  Submitted by:	ports fury

Modified:
  head/devel/libmpcbdm/Makefile   (contents, props changed)
  head/devel/libmpcbdm/files/patch-libmpc8xx_lptbdm.c   (contents, props changed)
  head/devel/libmpcbdm/pkg-plist   (contents, props changed)

Modified: head/devel/libmpcbdm/Makefile
==============================================================================
--- head/devel/libmpcbdm/Makefile	Sun Jan 19 09:28:21 2014	(r340257)
+++ head/devel/libmpcbdm/Makefile	Sun Jan 19 10:02:10 2014	(r340258)
@@ -13,19 +13,20 @@ MAINTAINER=	ports@FreeBSD.org
 COMMENT=	Standalone library to control various mpc8xx boards
 
 WRKSRC=		${WRKDIR}/libmpc8xx
-USE_GMAKE=	yes
-GNU_CONFIGURE=	yes
+
+USES=		gmake
+USE_AUTOTOOLS=	libtool
 USE_LDCONFIG=	yes
 
-ONLY_FOR_ARCHS=	i386
+ONLY_FOR_ARCHS=	amd64 i386
 
-NO_STAGE=	yes
 post-patch:
-	@${REINPLACE_CMD} -E -e 's,(objformat=).*,\1elf,' \
-		${WRKSRC}/configure
+	@${REINPLACE_CMD} -e \
+		's| $$(includedir)| $$(DESTDIR)$$(includedir)|' \
+		${WRKSRC}/libmpc8xx/Makefile.in
 
 post-install:
-	@${MKDIR} ${DATADIR}
-	${INSTALL_DATA} ${WRKSRC}/Flash.dev ${DATADIR}
+	@${MKDIR} ${STAGEDIR}${DATADIR}
+	(cd ${WRKSRC} && ${INSTALL_DATA} Flash.dev ${STAGEDIR}${DATADIR})
 
 .include <bsd.port.mk>

Modified: head/devel/libmpcbdm/files/patch-libmpc8xx_lptbdm.c
==============================================================================
--- head/devel/libmpcbdm/files/patch-libmpc8xx_lptbdm.c	Sun Jan 19 09:28:21 2014	(r340257)
+++ head/devel/libmpcbdm/files/patch-libmpc8xx_lptbdm.c	Sun Jan 19 10:02:10 2014	(r340258)
@@ -9,12 +9,24 @@
  #include <time.h>
  
  static int lptbdm_read( void );
-@@ -252,7 +252,7 @@
+@@ -52,8 +52,9 @@
+ 
+ static uid_t lptbdm_euid = -1;
+ 
+-#define INB(x,port)	asm volatile("inb %1, %0" : "=a" (x) : "d" (port))
+-#define OUTB(x,port)	asm volatile("outb %0, %1" : : "a" (x), "d" (port))
++#include <machine/cpufunc.h>
++#define INB(x,port)	x = inb(port)
++#define OUTB(x,port)	outb(port,x)
+ 
+ /* in case of asm trouble (red hat 7.0?) try the code below and compile with -O option */
+ /*#include <asm/io.h>
+@@ -252,7 +253,7 @@
  		}
  	}
  
 -	nResult = ioperm( lptbdm_port.DATAAddr, 3, 1 );
-+	nResult = i386_set_ioperm( lptbdm_port.DATAAddr, 3, 1 );
++	nResult = sysarch( I386_SET_IOPERM, (void *) ( lptbdm_port.DATAAddr, 3, 1 ) );
  
  	seteuid( getuid() );
  

Modified: head/devel/libmpcbdm/pkg-plist
==============================================================================
--- head/devel/libmpcbdm/pkg-plist	Sun Jan 19 09:28:21 2014	(r340257)
+++ head/devel/libmpcbdm/pkg-plist	Sun Jan 19 10:02:10 2014	(r340258)
@@ -7,6 +7,7 @@ include/mpc8xx/mpc8xxmem.h
 include/mpc8xx/mpc8xxmisc.h
 include/mpc8xx/mpc8xxspr.h
 include/mpc8xx/mpc8xxtarget.h
+lib/libmpc8xx.a
 lib/libmpc8xx.la
 lib/libmpc8xx.so
 lib/libmpc8xx.so.0
_______________________________________________
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 dfilter service freebsd_committer freebsd_triage 2014-01-25 13:01:08 UTC
Author: miwi
Date: Sat Jan 25 13:00:56 2014
New Revision: 341022
URL: http://svnweb.freebsd.org/changeset/ports/341022
QAT: https://qat.redports.org/buildarchive/r341022/

Log:
  MFH: r340258
  
  - Fix build with clang
  
  PR:		184851
  Submitted by:	ports fury

Modified:
  branches/2014Q1/devel/libmpcbdm/Makefile   (contents, props changed)
  branches/2014Q1/devel/libmpcbdm/files/patch-libmpc8xx_lptbdm.c   (contents, props changed)
  branches/2014Q1/devel/libmpcbdm/pkg-plist   (contents, props changed)
Directory Properties:
  branches/2014Q1/   (props changed)

Modified: branches/2014Q1/devel/libmpcbdm/Makefile
==============================================================================
--- branches/2014Q1/devel/libmpcbdm/Makefile	Sat Jan 25 12:59:35 2014	(r341021)
+++ branches/2014Q1/devel/libmpcbdm/Makefile	Sat Jan 25 13:00:56 2014	(r341022)
@@ -13,19 +13,20 @@ MAINTAINER=	ports@FreeBSD.org
 COMMENT=	Standalone library to control various mpc8xx boards
 
 WRKSRC=		${WRKDIR}/libmpc8xx
-USE_GMAKE=	yes
-GNU_CONFIGURE=	yes
+
+USES=		gmake
+USE_AUTOTOOLS=	libtool
 USE_LDCONFIG=	yes
 
-ONLY_FOR_ARCHS=	i386
+ONLY_FOR_ARCHS=	amd64 i386
 
-NO_STAGE=	yes
 post-patch:
-	@${REINPLACE_CMD} -E -e 's,(objformat=).*,\1elf,' \
-		${WRKSRC}/configure
+	@${REINPLACE_CMD} -e \
+		's| $$(includedir)| $$(DESTDIR)$$(includedir)|' \
+		${WRKSRC}/libmpc8xx/Makefile.in
 
 post-install:
-	@${MKDIR} ${DATADIR}
-	${INSTALL_DATA} ${WRKSRC}/Flash.dev ${DATADIR}
+	@${MKDIR} ${STAGEDIR}${DATADIR}
+	(cd ${WRKSRC} && ${INSTALL_DATA} Flash.dev ${STAGEDIR}${DATADIR})
 
 .include <bsd.port.mk>

Modified: branches/2014Q1/devel/libmpcbdm/files/patch-libmpc8xx_lptbdm.c
==============================================================================
--- branches/2014Q1/devel/libmpcbdm/files/patch-libmpc8xx_lptbdm.c	Sat Jan 25 12:59:35 2014	(r341021)
+++ branches/2014Q1/devel/libmpcbdm/files/patch-libmpc8xx_lptbdm.c	Sat Jan 25 13:00:56 2014	(r341022)
@@ -9,12 +9,24 @@
  #include <time.h>
  
  static int lptbdm_read( void );
-@@ -252,7 +252,7 @@
+@@ -52,8 +52,9 @@
+ 
+ static uid_t lptbdm_euid = -1;
+ 
+-#define INB(x,port)	asm volatile("inb %1, %0" : "=a" (x) : "d" (port))
+-#define OUTB(x,port)	asm volatile("outb %0, %1" : : "a" (x), "d" (port))
++#include <machine/cpufunc.h>
++#define INB(x,port)	x = inb(port)
++#define OUTB(x,port)	outb(port,x)
+ 
+ /* in case of asm trouble (red hat 7.0?) try the code below and compile with -O option */
+ /*#include <asm/io.h>
+@@ -252,7 +253,7 @@
  		}
  	}
  
 -	nResult = ioperm( lptbdm_port.DATAAddr, 3, 1 );
-+	nResult = i386_set_ioperm( lptbdm_port.DATAAddr, 3, 1 );
++	nResult = sysarch( I386_SET_IOPERM, (void *) ( lptbdm_port.DATAAddr, 3, 1 ) );
  
  	seteuid( getuid() );
  

Modified: branches/2014Q1/devel/libmpcbdm/pkg-plist
==============================================================================
--- branches/2014Q1/devel/libmpcbdm/pkg-plist	Sat Jan 25 12:59:35 2014	(r341021)
+++ branches/2014Q1/devel/libmpcbdm/pkg-plist	Sat Jan 25 13:00:56 2014	(r341022)
@@ -7,6 +7,7 @@ include/mpc8xx/mpc8xxmem.h
 include/mpc8xx/mpc8xxmisc.h
 include/mpc8xx/mpc8xxspr.h
 include/mpc8xx/mpc8xxtarget.h
+lib/libmpc8xx.a
 lib/libmpc8xx.la
 lib/libmpc8xx.so
 lib/libmpc8xx.so.0
_______________________________________________
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"