Bug 183110 - [PATCH] audio/mp3asm: fix build with clang
Summary: [PATCH] audio/mp3asm: 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: Dirk Meyer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-19 19:20 UTC by Po-Chuan Hsieh
Modified: 2013-11-08 06:00 UTC (History)
1 user (show)

See Also:


Attachments
mp3asm-0.1.3.1_1.patch (2.24 KB, patch)
2013-10-19 19:20 UTC, Po-Chuan Hsieh
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Po-Chuan Hsieh freebsd_committer freebsd_triage 2013-10-19 19:20:00 UTC
- Fix build with clang
- Convert to new options framework
- Support STAGEDIR
- Use PLIST_FILES and PORTDOCS instead of PLIST
- Use SED/REINPLACE_CMD instead of patch files

Port maintainer (dinoex@FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.99_8 (mode: change, diff: SVN)
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-10-19 19:20:08 UTC
Responsible Changed
From-To: freebsd-ports-bugs->dinoex

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Dirk Meyer freebsd_committer freebsd_triage 2013-10-20 06:22:55 UTC
State Changed
From-To: open->feedback


OPTIONS_DEFINE should not be neededf, why did you include it? 

what clang problem is fixed with your patch. 

why should errno be include global?
Comment 3 dfilter service freebsd_committer freebsd_triage 2013-11-08 05:59:12 UTC
Author: dinoex
Date: Fri Nov  8 05:59:05 2013
New Revision: 333182
URL: http://svnweb.freebsd.org/changeset/ports/333182

Log:
  - Fix build with clang
  - use STAGEDIR
  - use OPTIONS_DEFINE
  - Use PLIST_FILES and PORTDOCS instead of PLIST
  PR:		183110
  Submitted by:	sunpoet (Sunpoet Po-Chuan Hsieh)
  
  - rename patchfiles
  - merge REINPLACE_CMD

Added:
  head/audio/mp3asm/files/patch-utils.c
     - copied unchanged from r333181, head/audio/mp3asm/files/patch-src::utils.c
Deleted:
  head/audio/mp3asm/files/patch-src::mp3asm.h
  head/audio/mp3asm/files/patch-src::utils.c
  head/audio/mp3asm/pkg-plist
Modified:
  head/audio/mp3asm/Makefile

Modified: head/audio/mp3asm/Makefile
==============================================================================
--- head/audio/mp3asm/Makefile	Fri Nov  8 05:29:43 2013	(r333181)
+++ head/audio/mp3asm/Makefile	Fri Nov  8 05:59:05 2013	(r333182)
@@ -13,28 +13,29 @@ COMMENT=	MP3 frame level editor
 
 LICENSE=	GPLv2
 
-NO_STAGE=	yes
-
 USES=		gmake
 USE_BZIP2=	yes
 GNU_CONFIGURE=	yes
 WRKSRC=		${WRKDIR}/${PORTNAME}-0.1
+PLIST_FILES=	bin/mp3asm
+PORTDOCS=	Changelog README
+
+.include <bsd.port.options.mk>
 
 post-extract:
 	@${RM} ${WRKSRC}/config.cache
 
 post-patch:
-	@${REINPLACE_CMD} -e \
-		's|^CFLAGS=|#CFLAGS=|g' ${WRKSRC}/configure
-	@${REINPLACE_CMD} -e \
-		's|getprogname|_getprogname|g' ${WRKSRC}/src/mp3asm.c
+	${REINPLACE_CMD} -e 's|^CFLAGS=|#CFLAGS=|g' ${WRKSRC}/configure
+	${REINPLACE_CMD} -e 's|#include <argz.h>||' \
+		-e 's|getprogname|_getprogname|g' \
+		-e 's|\([ (!]\)\(log[\.;]\)|\1mp3asm\2|g' \
+		${WRKSRC}/src/mp3asm.h ${WRKSRC}/src/*.c
 
+.if ${PORT_OPTIONS:MDOCS}
 post-install:
-.if !defined(NOPORTDOCS)
-	@${MKDIR} ${DOCSDIR}
-.for i in Changelog README
-	${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR}
-.endfor
+	${MKDIR} ${STAGEDIR}${DOCSDIR}
+	cd ${WRKSRC}/ && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}/
 .endif
 
 .include <bsd.port.mk>

Copied: head/audio/mp3asm/files/patch-utils.c (from r333181, head/audio/mp3asm/files/patch-src::utils.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/audio/mp3asm/files/patch-utils.c	Fri Nov  8 05:59:05 2013	(r333182, copy of r333181, head/audio/mp3asm/files/patch-src::utils.c)
@@ -0,0 +1,10 @@
+--- src/utils.c.orig	Fri Jul 20 11:14:59 2001
++++ src/utils.c	Fri Jul 20 11:15:37 2001
+@@ -25,6 +25,7 @@
+ #include "utils.h"
+ #include <unistd.h>
+ #include <stdio.h>
++#include <errno.h>
+ 
+ /*
+  * tmalloc: mallocs cleanly
_______________________________________________
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 4 Dirk Meyer freebsd_committer freebsd_triage 2013-11-08 05:59:23 UTC
State Changed
From-To: feedback->closed

committed with changes, thanks.