ports/179214: audio/xcd: Fix build with clang
KATO Tsuguru
tkato432 at yahoo.com
Sun Jun 2 18:10:02 UTC 2013
>Number: 179214
>Category: ports
>Synopsis: audio/xcd: Fix build with clang
>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: Sun Jun 02 18:10:02 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator: KATO Tsuguru
>Release: FreeBSD 8.4-RELEASE i386
>Organization:
>Environment:
>Description:
- Fix build with clang
New file:
files/patch-aa
files/patch-ab
Remove file:
files/patch-cdplayer.cc
>How-To-Repeat:
>Fix:
diff -urN /usr/ports/audio/xcd/Makefile audio/xcd/Makefile
--- /usr/ports/audio/xcd/Makefile 2013-03-14 01:32:43.000000000 +0900
+++ audio/xcd/Makefile 2013-06-03 00:00:00.000000000 +0900
@@ -5,31 +5,45 @@
PORTVERSION= 1.7
PORTREVISION= 3
CATEGORIES= audio tk
-MASTER_SITES= ${MASTER_SITE_LOCAL}
-MASTER_SITE_SUBDIR= jmz
+MASTER_SITES= LOCAL/jmz
MAINTAINER= ports at FreeBSD.org
COMMENT= Tcl/Tk CD player
-USE_TK= yes
-WRKSRC= ${WRKDIR}/xcd
+WRKSRC= ${WRKDIR}/${PORTNAME}
+
+USE_TK_WRAPPER= yes
+
MAN1= xcd.1
.if !defined(WITH_CDROM_PLAYER)
-WITH_CDROM_PLAYER= acd0
+WITH_CDROM_PLAYER= cd0
.endif
pre-extract:
@${ECHO_CMD} ""
@${ECHO_CMD} "You can define WITH_CDROM_PLAYER to set the default CD/DVD player"
- @${ECHO_CMD} "Default: acd0"
+ @${ECHO_CMD} "Default: cd0"
@${ECHO_CMD} ""
@${ECHO_CMD} "Use the CDPLAYER environment variable to override it."
@${ECHO_CMD} ""
post-patch:
@${REINPLACE_CMD} 's|cd0c|${WITH_CDROM_PLAYER}|' ${WRKSRC}/cdplayer.cc
- @${REINPLACE_CMD} 's|/usr/local/bin/wish8.0|${WISH}|' ${WRKSRC}/xcd.in
- @${REINPLACE_CMD} 's|/usr/local|${PREFIX}|' ${WRKSRC}/Makefile
+ @(cd ${WRKSRC} && ${SED} -e \
+ 's|/usr/local/bin/wish8.0|${WISH}| ; \
+ s|CDPLAYER|${PREFIX}/lib/xcd/cdplayer| ; \
+ s|BITMAPDIR|${PREFIX}/lib/xcd|' \
+ < xcd.in > xcd)
+
+do-build:
+ (cd ${WRKSRC} && ${CXX} ${CXXFLAGS} -o cdplayer cdplayer.cc)
+
+do-install:
+ (cd ${WRKSRC} && ${INSTALL_SCRIPT} xcd ${PREFIX}/bin)
+ (cd ${WRKSRC} && ${INSTALL_MAN} xcd.1 ${MANPREFIX}/man/man1)
+ @${MKDIR} ${PREFIX}/lib/xcd
+ (cd ${WRKSRC} && ${INSTALL_PROGRAM} cdplayer ${PREFIX}/lib/xcd)
+ (cd ${WRKSRC}/bitmaps && ${INSTALL_DATA} *.xbm ${PREFIX}/lib/xcd)
.include <bsd.port.mk>
diff -urN /usr/ports/audio/xcd/files/patch-aa audio/xcd/files/patch-aa
--- /usr/ports/audio/xcd/files/patch-aa 2012-11-08 05:38:47.000000000 +0900
+++ audio/xcd/files/patch-aa 1970-01-01 09:00:00.000000000 +0900
@@ -1,11 +0,0 @@
---- cdplayer.cc.orig Sat Nov 27 16:20:49 1999
-+++ cdplayer.cc Sat Nov 27 16:24:02 1999
-@@ -29,7 +29,7 @@
- public:
- button (char *s) {state=0; strcpy (name, s);}
- ~button () {}
-- set (int i) {
-+ void set (int i) {
- if (state != i) {
- state = i;
- if (state == 0)
diff -urN /usr/ports/audio/xcd/files/patch-ab audio/xcd/files/patch-ab
--- /usr/ports/audio/xcd/files/patch-ab 2012-11-08 05:38:47.000000000 +0900
+++ audio/xcd/files/patch-ab 1970-01-01 09:00:00.000000000 +0900
@@ -1,11 +0,0 @@
---- Makefile.orig Mon Oct 26 16:14:26 1998
-+++ Makefile Sun Sep 8 13:14:02 2002
-@@ -8,7 +8,7 @@
- < xcd.in > $@
- chmod ugo+x xcd
- cdplayer: cdplayer.cc
-- $(CC) $(CFLAGS) -o $@ cdplayer.cc -lm
-+ $(CXX) $(CXXFLAGS) -o $@ cdplayer.cc -lm
-
- install: xcd cdplayer
- mkdir -p $(BINDIR)
diff -urN /usr/ports/audio/xcd/files/patch-cdplayer.cc audio/xcd/files/patch-cdplayer.cc
--- /usr/ports/audio/xcd/files/patch-cdplayer.cc 1970-01-01 09:00:00.000000000 +0900
+++ audio/xcd/files/patch-cdplayer.cc 2013-06-03 00:00:00.000000000 +0900
@@ -0,0 +1,20 @@
+--- cdplayer.cc.orig Sat Nov 27 16:20:49 1999
++++ cdplayer.cc Sat Nov 27 16:24:02 1999
+@@ -29,7 +29,7 @@
+ public:
+ button (char *s) {state=0; strcpy (name, s);}
+ ~button () {}
+- set (int i) {
++ void set (int i) {
+ if (state != i) {
+ state = i;
+ if (state == 0)
+@@ -90,7 +90,7 @@
+ #define S(t) toc_buffer[t].addr.msf.second
+ #define F(t) toc_buffer[t].addr.msf.frame
+
+-main (int argc, char **argv)
++int main (int argc, char **argv)
+ {
+ char dev[20], line[50];
+ int i;
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list