Date: Wed, 28 Aug 2013 15:59:56 GMT From: Boris Samorodov <bsam@FreeBSD.org> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/181622: [patch] misc/digitemp: fix build with clang and some more Message-ID: <201308281559.r7SFxuqt077308@oldred.freebsd.org> Resent-Message-ID: <201308281610.r7SGA0l6054782@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 181622 >Category: ports >Synopsis: [patch] misc/digitemp: fix build with clang and some more >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Wed Aug 28 16:10:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Boris Samorodov >Release: FreeBSD 10.0-CURRENT >Organization: BSDprint >Environment: FreeBSD bsam.int.wart.ru 10.0-CURRENT FreeBSD 10.0-CURRENT #36 r254961: Wed Aug 28 02:04:00 SAMT 2013 bsam@bsam.int.wart.ru:/usr/obj/usr/src/sys/BB64X amd64 >Description: The port does not build with clang: ----- ===> Building for digitemp-3.6.0 gcc -I./src -I./userial -O2 -Wall -DFREEBSD -c -o src/digitemp.o src/digitemp.c gmake: gcc: Command not found gmake: *** [src/digitemp.o] Error 127 ----- >How-To-Repeat: >Fix: . fix build with clang (CC=gcc -> CC?=gcc); . trim makefile headers; . remove LICENSE_FILE for well-known license (GPLv2, anyway it get installed by the ports infrastructure); . optionify port docs (NOPORTDOCS -> PORT_OPTIONS:MDOCS); . use standard mkdir to create directories instead of "install -d"; . some other tiny refinements. Patch attached with submission follows: Index: Makefile =================================================================== --- Makefile (revision 325431) +++ Makefile (working copy) @@ -1,9 +1,5 @@ -# New ports collection makefile for: digitemp -# Date created: 25 June 2011 -# Whom: Evaldas Auryla <ea@zaib.as> -# +# Created by: Evaldas Auryla <ea@zaib.as> # $FreeBSD$ -# PORTNAME= digitemp PORTVERSION= 3.6.0 @@ -14,19 +10,25 @@ COMMENT= Dallas Semiconductor 1-wire device reading console application LICENSE= GPLv2 -LICENSE_FILE= ${WRKSRC}/COPYRIGHT -USE_GMAKE= yes +USES= gmake MAN1= digitemp.1 PLIST_FILES= bin/digitemp_DS9097 bin/digitemp_DS9097U \ etc/digitemp.conf.sample -PORTDOCS= ChangeLog COPYING COPYRIGHT CREDITS FAQ README TODO \ - dthowto.txt DS9097_Schematic.gif perl python rrdb +DOCFILES= ChangeLog COPYRIGHT CREDITS FAQ README TODO \ + dthowto.txt DS9097_Schematic.gif +DOCDIRS= perl python rrdb +PORTDOCS= ${DOCFILES} ${DOCDIRS} ALL_TARGET= ds9097 ds9097u +OPTIONS_DEFINE= DOCS + +post-patch: + @${REINPLACE_CMD} -e 's:= gcc:?= gcc:' ${WRKSRC}/Makefile + pre-install: ${CP} ${WRKSRC}/${MAN1} ${WRKSRC}/digitemp.1.M ${CAT} ${WRKSRC}/digitemp.1.M | ${SED} -e "s/dev\/ttyS/dev\/cuau/g" > ${WRKSRC}/${MAN1} @@ -36,13 +38,14 @@ ${INSTALL_PROGRAM} ${WRKSRC}/digitemp_DS9097U ${PREFIX}/bin ${INSTALL_MAN} ${WRKSRC}/${MAN1} ${PREFIX}/man/man1 +.include <bsd.port.options.mk> + post-install: -.if !defined(NOPORTDOCS) - ${INSTALL} -d ${DOCSDIR} - @${INSTALL_DATA} ${WRKSRC}/ChangeLog ${WRKSRC}/COPYING ${WRKSRC}/COPYRIGHT ${WRKSRC}/CREDITS ${WRKSRC}/FAQ \ - ${WRKSRC}/README ${WRKSRC}/TODO ${WRKSRC}/dthowto.txt ${WRKSRC}/DS9097_Schematic.gif ${DOCSDIR} +.if ${PORT_OPTIONS:MDOCS} + @${MKDIR} ${DOCSDIR} + ${INSTALL_DATA} ${DOCFILES:S,^,${WRKSRC}/,} ${DOCSDIR} .for dir in perl python/gui python/mysql rrdb - ${INSTALL} -d ${DOCSDIR}/${dir} + @${MKDIR} ${DOCSDIR}/${dir} ${FIND} ${WRKSRC}/${dir}/ -maxdepth 1 -type f -exec ${INSTALL_DATA} \{\} ${DOCSDIR}/${dir} \; .endfor .endif >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308281559.r7SFxuqt077308>