From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Dec 30 21:10:11 2013 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A05E5F86 for ; Mon, 30 Dec 2013 21:10:11 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7DD2C106B for ; Mon, 30 Dec 2013 21:10:11 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id rBULABDg098920 for ; Mon, 30 Dec 2013 21:10:11 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id rBULABJI098919; Mon, 30 Dec 2013 21:10:11 GMT (envelope-from gnats) Resent-Date: Mon, 30 Dec 2013 21:10:11 GMT Resent-Message-Id: <201312302110.rBULABJI098919@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, KATO Tsuguru Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 784C0A43 for ; Mon, 30 Dec 2013 21:02:06 +0000 (UTC) Received: from omta03.auone-net.jp (mail-or1-f17.auone-net.jp [106.187.231.17]) by mx1.freebsd.org (Postfix) with ESMTP id 3C5911F86 for ; Mon, 30 Dec 2013 21:02:06 +0000 (UTC) Received: from coppermine.my.domain (ZT028061.ppp.dion.ne.jp [59.128.28.61]) by omta03.auone-net.jp (au one net mail) with ESMTP id EE34E188000C for ; Tue, 31 Dec 2013 06:02:02 +0900 (JST) Message-Id: <20131231054742.20b486bcee79e43fb9897d5e@yahoo.com> Date: Tue, 31 Dec 2013 05:47:42 +0900 From: KATO Tsuguru To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/185345: graphics/xmms-dancingparticles: Fix build with clang X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 21:10:11 -0000 >Number: 185345 >Category: ports >Synopsis: graphics/xmms-dancingparticles: 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: Mon Dec 30 21:10:11 UTC 2013 >Closed-Date: >Last-Modified: >Originator: KATO Tsuguru >Release: FreeBSD 8.4-RELEASE-p4 i386 >Organization: >Environment: >Description: - Fix build with clang - Support PLIST_FILES New file: files/patch-plugin.cc files/patch-signal.cc Remove file: pkg-plist >How-To-Repeat: >Fix: diff -urN /usr/ports/graphics/xmms-dancingparticles/Makefile graphics/xmms-dancingparticles/Makefile --- /usr/ports/graphics/xmms-dancingparticles/Makefile 2013-11-06 22:01:26.000000000 +0900 +++ graphics/xmms-dancingparticles/Makefile 2013-12-31 00:00:00.000000000 +0900 @@ -13,17 +13,33 @@ MAINTAINER= ports@FreeBSD.org COMMENT= Makes particles dance with pretty neon colors -LIB_DEPENDS= t1.5:${PORTSDIR}/devel/t1lib \ - xmms.4:${PORTSDIR}/multimedia/xmms +LIB_DEPENDS= libt1.so:${PORTSDIR}/devel/t1lib \ + libxmms.so:${PORTSDIR}/multimedia/xmms USE_GL= glut USE_GNOME= gtk12 USE_SDL= sdl -CFLAGS+= -I${PREFIX}/include -NO_STAGE= yes +PLIST_FILES= lib/xmms/Visualization/libdancingparticles2.so \ + %%DATADIR%%/dance.epic \ + %%DATADIR%%/dancingparticles.conf \ + %%DATADIR%%/font.pfb \ + %%DATADIR%%/xmms.epic +PLIST_DIRS= %%DATADIR%% + post-patch: - @${REINPLACE_CMD} -e 's|\(#include.*\)SDL/\(SDL.*\)|\1\2| ; \ - s|/usr/local|${PREFIX}|' ${WRKSRC}/*.cc ${WRKSRC}/*.h + @${FIND} ${WRKSRC} -name "*.cc" -or -name "*.h" -print0 | ${XARGS} -0 \ + ${REINPLACE_CMD} -e \ + 's|\(#include.*\)SDL/\(SDL.*\)|\1\2| ; \ + s|/usr/local|${PREFIX}|' + +do-install: + @${MKDIR} ${STAGEDIR}${PREFIX}/lib/xmms/Visualization + (cd ${WRKSRC} && ${INSTALL_LIB} libdancingparticles2.so \ + ${STAGEDIR}${PREFIX}/lib/xmms/Visualization) + @${MKDIR} ${STAGEDIR}${DATADIR} +.for i in dance.epic dancingparticles.conf font.pfb xmms.epic + (cd ${WRKSRC} && ${INSTALL_DATA} ${i} ${STAGEDIR}${DATADIR}) +.endfor .include diff -urN /usr/ports/graphics/xmms-dancingparticles/files/patch-Makefile graphics/xmms-dancingparticles/files/patch-Makefile --- /usr/ports/graphics/xmms-dancingparticles/files/patch-Makefile 2013-11-06 22:01:26.000000000 +0900 +++ graphics/xmms-dancingparticles/files/patch-Makefile 2013-12-31 00:00:00.000000000 +0900 @@ -1,5 +1,5 @@ ---- Makefile.orig Sat Jan 31 08:05:51 2004 -+++ Makefile Fri Oct 14 20:53:22 2005 +--- Makefile.orig 2004-01-31 20:05:51.000000000 +0900 ++++ Makefile 2013-12-12 06:44:52.000000000 +0900 @@ -1,14 +1,13 @@ -CC = gcc #OPT = -m486 -O2 @@ -8,9 +8,9 @@ -CFLAGS = $(OPT) -Wall -fPIC `gtk-config --cflags gthread` -LFLAGS = -shared -fPIC -L/usr/local/lib -lm -lstdc++ -lGL -lGLU -L/usr/X11R6/lib -lt1 -lSDL -LFLAGS2 = -L/usr/local/lib -lm -lstdc++ -lGL -lGLU -L/usr/X11R6/lib -lpthread -lgtk -lgdk -lglut -lt1 -+CFLAGS += -fPIC `gtk-config --cflags gthread` `${SDL_CONFIG} --cflags` -+LFLAGS = -shared -fPIC -L${LOCALBASE}/lib -lm -lstdc++ -lGL -lGLU -lt1 `${SDL_CONFIG} --libs` -+LFLAGS2 = -L${LOCALBASE}/lib -lm -lstdc++ -lGL -lGLU -lgtk -lgdk -lglut -lt1 ++CPPFLAGS += -fPIC `${GTK_CONFIG} --cflags gthread` `${SDL_CONFIG} --cflags` ++LFLAGS = -shared -fPIC -lm -lGL -lGLU -lt1 `${SDL_CONFIG} --libs` ++LFLAGS2 = -lm -lGL -lGLU -lglut -lt1 `${GTK_CONFIG} --libs gdk` OBJ = plugin.o gl.o etoile.o readme.o parameters.o epic.o config.o signal.o t1font.o INSTALL-DIR=`xmms-config --visualization-plugin-dir` @@ -19,24 +19,18 @@ BIN=libdancingparticles2.so all: $(BIN) -@@ -33,14 +32,12 @@ - rm -f *.o core *~ +@@ -20,11 +19,11 @@ + $(CC) -o test $(OBJ) main.o $(LFLAGS2) - install: $(BIN) -- strip $(BIN) -- install $(BIN) $(INSTALL-DIR) -- rm -Rf /usr/local/share/dancingparticles -- mkdir /usr/local/share/dancingparticles -- install dance.epic /usr/local/share/dancingparticles/ -- install dancingparticles.conf /usr/local/share/dancingparticles/ -- install xmms.epic /usr/local/share/dancingparticles/ -- install font.pfb /usr/local/share/dancingparticles/ -+ $(BSD_INSTALL_PROGRAM) $(BIN) $(INSTALL-DIR) -+ mkdir $(DATADIR) -+ $(BSD_INSTALL_DATA) dance.epic $(DATADIR) -+ $(BSD_INSTALL_DATA) dancingparticles.conf $(DATADIR) -+ $(BSD_INSTALL_DATA) xmms.epic $(DATADIR) -+ $(BSD_INSTALL_DATA) font.pfb $(DATADIR) + .cpp.o: +- $(CC) $(CFLAGS) $(XMMS_DATADIR_FLAGS) -c $< ++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(XMMS_DATADIR_FLAGS) -c $< + .cc.o: +- $(CC) $(CFLAGS) $(XMMS_DATADIR_FLAGS) -c $< ++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(XMMS_DATADIR_FLAGS) -c $< + .c.o: +- $(CC) $(CFLAGS) $(XMMS_DATADIR_FLAGS) -c $< ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(XMMS_DATADIR_FLAGS) -c $< - - plugin.o: plugin.cc etoile.h + clean: + rm -f *.o core *.so* test *~ *\# readme.c diff -urN /usr/ports/graphics/xmms-dancingparticles/files/patch-plugin.cc graphics/xmms-dancingparticles/files/patch-plugin.cc --- /usr/ports/graphics/xmms-dancingparticles/files/patch-plugin.cc 1970-01-01 09:00:00.000000000 +0900 +++ graphics/xmms-dancingparticles/files/patch-plugin.cc 2013-12-31 00:00:00.000000000 +0900 @@ -0,0 +1,45 @@ +--- plugin.cc.orig ++++ plugin.cc +@@ -109,7 +109,7 @@ + + static SDL_Surface *opengl_screen = NULL; + static SDL_Thread *draw_thread = NULL; +-SDL_mutex *mutex = NULL; ++SDL_mutex *sdlmutex = NULL; + + VisPlugin dp_vplugin = { + NULL, /* internal */ +@@ -158,14 +158,14 @@ + void + init_mutexes (void) + { +- mutex = SDL_CreateMutex(); ++ sdlmutex = SDL_CreateMutex(); + } + + + void + destroy_mutexes (void) + { +- SDL_DestroyMutex(mutex); ++ SDL_DestroyMutex(sdlmutex); + } + + void +@@ -456,14 +456,14 @@ + + while (!point_general->finished) { + if (!point_general->paused) { +- SDL_mutexP(mutex); ++ SDL_mutexP(sdlmutex); + + update_playlist_info(); + look_conf_file(); + etoileLoop(); + draw_gl(); + +- SDL_mutexV(mutex); ++ SDL_mutexV(sdlmutex); + calc_fps(); + calc_max_fps(); + printf("\rFPS: %3.2f", framerate); printf(" "); diff -urN /usr/ports/graphics/xmms-dancingparticles/files/patch-signal.cc graphics/xmms-dancingparticles/files/patch-signal.cc --- /usr/ports/graphics/xmms-dancingparticles/files/patch-signal.cc 1970-01-01 09:00:00.000000000 +0900 +++ graphics/xmms-dancingparticles/files/patch-signal.cc 2013-12-31 00:00:00.000000000 +0900 @@ -0,0 +1,29 @@ +--- signal.cc.orig ++++ signal.cc +@@ -24,7 +24,7 @@ + #include + + beatdetector detector; +-extern SDL_mutex *mutex; ++extern SDL_mutex *sdlmutex; + + beatdetector::beatdetector() + { +@@ -93,7 +93,7 @@ + { + int i; + +- SDL_mutexP(mutex); ++ SDL_mutexP(sdlmutex); + + for(i = 0; i < 32; i++) + heights[i] = (heights[i] + spectrum[0][i]) / 2; +@@ -126,7 +126,7 @@ + + curloudness = (curloudness + 1)%200; + +- SDL_mutexV(mutex); ++ SDL_mutexV(sdlmutex); + + } + diff -urN /usr/ports/graphics/xmms-dancingparticles/pkg-plist graphics/xmms-dancingparticles/pkg-plist --- /usr/ports/graphics/xmms-dancingparticles/pkg-plist 2013-11-06 22:01:26.000000000 +0900 +++ graphics/xmms-dancingparticles/pkg-plist 1970-01-01 09:00:00.000000000 +0900 @@ -1,6 +0,0 @@ -lib/xmms/Visualization/libdancingparticles2.so -%%DATADIR%%/dance.epic -%%DATADIR%%/dancingparticles.conf -%%DATADIR%%/font.pfb -%%DATADIR%%/xmms.epic -@dirrm %%DATADIR%% >Release-Note: >Audit-Trail: >Unformatted: