Bug 185316 - audio/mixxx: Fix build with clang
Summary: audio/mixxx: 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: Martin Wilke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-30 21:10 UTC by tkato432
Modified: 2014-02-27 14:10 UTC (History)
0 users

See Also:


Attachments
file.diff (7.75 KB, patch)
2013-12-30 21:10 UTC, tkato432
no flags Details | Diff
audio_mixxx.diff (7.46 KB, patch)
2014-01-20 17:58 UTC, tkato432
no flags Details | Diff
audio_mixxx.diff (7.53 KB, patch)
2014-01-26 17:57 UTC, tkato432
no flags Details | Diff
audio_mixxx.diff (7.40 KB, patch)
2014-02-06 09:58 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-30 21:10:02 UTC
- Fix build with clang
- Support scons USES macro

New file:
files/patch-src__defs.h
Comment 1 Martin Wilke freebsd_committer 2014-01-19 13:38:21 UTC
State Changed
From-To: open->feedback

build fails, http://pkgdev.miwibox.org/latest-per-pkg/mixxx/1.11.0_3/
Comment 2 tkato432 2014-01-20 17:58:01 UTC
Here is the corrected patch.
Comment 3 Martin Wilke freebsd_committer 2014-01-23 15:46:02 UTC
Responsible Changed
From-To: freebsd-ports-bugs->miwi

I'll take it.
Comment 4 Martin Wilke freebsd_committer 2014-01-25 15:42:30 UTC
State Changed
From-To: feedback->open

Submitter has fixed.
Comment 6 tkato432 2014-01-26 17:57:01 UTC
Here is the corrected patch.
Comment 7 tkato432 2014-02-06 09:58:19 UTC
Remake of the patch against current tree.
Comment 8 Martin Wilke freebsd_committer 2014-02-27 14:08:23 UTC
State Changed
From-To: feedback->closed

Committed. Thanks!
Comment 9 dfilter service freebsd_committer 2014-02-27 14:08:29 UTC
Author: miwi
Date: Thu Feb 27 14:08:14 2014
New Revision: 346340
URL: http://svnweb.freebsd.org/changeset/ports/346340
QAT: https://qat.redports.org/buildarchive/r346340/

Log:
  - Fix build with clang
  - Support scons USES macro
  - Stage support
  
  PR:		185316
  Submitted by:	ports fury

Added:
  head/audio/mixxx/files/patch-src__defs.h   (contents, props changed)
Modified:
  head/audio/mixxx/Makefile
  head/audio/mixxx/files/patch-build__depends.py
  head/audio/mixxx/pkg-plist

Modified: head/audio/mixxx/Makefile
==============================================================================
--- head/audio/mixxx/Makefile	Thu Feb 27 14:07:04 2014	(r346339)
+++ head/audio/mixxx/Makefile	Thu Feb 27 14:08:14 2014	(r346340)
@@ -4,17 +4,17 @@
 PORTNAME=	mixxx
 PORTVERSION=	1.11.0
 DISTVERSIONSUFFIX=	-src
-PORTREVISION=	3
+PORTREVISION=	4
 CATEGORIES=	audio
-MASTER_SITES=	http://downloads.mixxx.org/${PORTNAME}-${PORTVERSION}/
+MASTER_SITES=	http://downloads.mixxx.org/%SUBDIR%/
+MASTER_SITE_SUBDIR=	${PORTNAME}-${PORTVERSION}
 
 MAINTAINER=	ports@FreeBSD.org
 COMMENT=	DJ mixing application
 
 LICENSE=	GPLv2 # (or later)
 
-BUILD_DEPENDS=	portaudio2>=0:${PORTSDIR}/audio/portaudio2 \
-		bzr>=0:${PORTSDIR}/devel/bzr
+BUILD_DEPENDS=	portaudio2>=0:${PORTSDIR}/audio/portaudio2
 LIB_DEPENDS=	libFLAC.so:${PORTSDIR}/audio/flac \
 		libid3tag.so:${PORTSDIR}/audio/libid3tag \
 		libmad.so:${PORTSDIR}/audio/libmad \
@@ -26,56 +26,38 @@ RUN_DEPENDS=	portaudio2>=0:${PORTSDIR}/a
 
 WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
 
-NO_STAGE=	yes
+USES=		scons iconv
 USE_QT4=	corelib gui network opengl script sql svg xml \
 		linguist_build moc_build qmake_build rcc_build uic_build
 USE_GL=		glu
-USE_SCONS=	yes
-SCONS_BUILDENV=	${SCONS_ENV}
-SCONS_ARGS=	qtdir="${QT_PREFIX}" optimize=0
-USE_LDCONFIG=	yes
+MAKE_ARGS=	qtdir="${QT_PREFIX}" optimize=0
+LATE_INSTALL_ARGS=	--install-sandbox=${STAGEDIR}
 
-PORTDOCS=	*
-
-DOCSRCDIR1=	${WRKSRC}
-DOC_FILES1=	Mixxx-Manual.pdf README README.macro
-
-DOCSRCDIR2=	${WRKSRC}/doc/HID
-DOCSDIR2=	${DOCSDIR}/doc/HID
-DOC_FILES2=	*.odt *.pdf
-
-OPTIONS_DEFINE=	DOCS FAAD LAME SHOUTCAST TCMALLOC WAVPACK
-OPTIONS_DEFAULT=	FAAD SHOUTCAST TCMALLOC WAVPACK
-
-OPTIONS_SUB=	yes
-
-TCMALLOC_DESC=	Use Google's TCMalloc
+OPTIONS_DEFINE=		DOCS FAAD GPERFTOOLS LAME SHOUTCAST WAVPACK
+OPTIONS_DEFAULT=	FAAD SHOUTCAST WAVPACK
+OPTIONS_SUB=		yes
 
 FAAD_LIB_DEPENDS=	libfaad.so:${PORTSDIR}/audio/faad \
 			libmp4v2.so:${PORTSDIR}/multimedia/mp4v2
-FAAD_SCONS_ARGS_ON=	faad=1
-FAAD_SCONS_ARGS_OFF=	faad=0
-
+FAAD_MAKE_ARGS=		faad=1
+FAAD_MAKE_ARGS_OFF=	faad=0
+GPERFTOOLS_LIB_DEPENDS=	libtcmalloc.so:${PORTSDIR}/devel/google-perftools
+GPERFTOOLS_MAKE_ARGS=	perftools=1
+GPERFTOOLS_MAKE_ARGS_OFF=	perftools=0
 LAME_RUN_DEPENDS=	lame:${PORTSDIR}/audio/lame
-
-SHOUTCAST_LIB_DEPENDS=	libshout.so:${PORTSDIR}/audio/libshout
-SHOUTCAST_SCONS_ARGS_ON=	shoutcast=1
-SHOUTCAST_SCONS_ARGS_OFF=	shoutcast=0
-
-TCMALLOC_LIB_DEPENDS=	libtcmalloc.so:${PORTSDIR}/devel/google-perftools
-TCMALLOC_SCONS_ARGS_ON=	perftools=1
-TCMALLOC_SCONS_ARGS_OFF=	perftools=0
-
+SHOUTCAST_LIB_DEPENDS=	libshout.so:${PORTSDIR}/audio/libshout2
+SHOUTCAST_MAKE_ARGS=	shoutcast=1
+SHOUTCAST_MAKE_ARGS_OFF=	shoutcast=0
 WAVPACK_LIB_DEPENDS=	libwavpack.so:${PORTSDIR}/audio/wavpack
-WAVPACK_SCONS_ARGS_ON=	wv=1
-WAVPACK_SCONS_ARGS_OFF=	wv=0
-
-.include <bsd.port.options.mk>
+WAVPACK_MAKE_ARGS=	wv=1
+WAVPACK_MAKE_ARGS_OFF=	wv=0
 
 post-patch:
 	@${REINPLACE_CMD} -e "s|%%LOCALBASE%%|${LOCALBASE}|g ; \
 		 s|%%PREFIX%%|${PREFIX}|g" \
 		${WRKSRC}/build/depends.py
+	@${REINPLACE_CMD} -e "s|bzr |true |g" \
+		${WRKSRC}/build/util.py
 	@${REINPLACE_CMD} -e "/('install', docs)/d" \
 		${WRKSRC}/src/SConscript
 	@${REINPLACE_CMD} -e "s|^Exec=.*|Exec=mixxx| ; \
@@ -86,13 +68,17 @@ post-patch:
 .endfor
 
 post-install:
-	@${STRIP_CMD} ${PREFIX}/bin/mixxx
-
-.if ${PORT_OPTIONS:MDOCS}
-	@${MKDIR} ${DOCSDIR}
-	${INSTALL_DATA} ${DOC_FILES1:S|^|${DOCSRCDIR1}/|} ${DOCSDIR}
-	@${MKDIR} ${DOCSDIR2}
-	${INSTALL_DATA} ${DOC_FILES2:S|^|${DOCSRCDIR2}/|} ${DOCSDIR2}
-.endif
+	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/mixxx
+	@${MKDIR} ${STAGEDIR}${PREFIX}/lib/mixxx/plugins/soundsource
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+.for i in Mixxx-Manual.pdf README README.macro
+	(cd ${WRKSRC} && ${INSTALL_DATA} ${i} \
+		${STAGEDIR}${DOCSDIR})
+.endfor
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}/doc/HID
+.for i in *.odt *.pdf
+	(cd ${WRKSRC}/doc/HID && ${INSTALL_DATA} ${i} \
+		${STAGEDIR}${DOCSDIR}/doc/HID)
+.endfor
 
 .include <bsd.port.mk>

Modified: head/audio/mixxx/files/patch-build__depends.py
==============================================================================
--- head/audio/mixxx/files/patch-build__depends.py	Thu Feb 27 14:07:04 2014	(r346339)
+++ head/audio/mixxx/files/patch-build__depends.py	Thu Feb 27 14:08:14 2014	(r346340)
@@ -52,7 +52,7 @@
  
          if build.platform_is_windows and build.static_dependencies:
              build.env.Append(CPPDEFINES = 'TAGLIB_STATIC')
-@@ -782,10 +783,8 @@
+@@ -782,14 +783,9 @@
          if build.toolchain_is_gnu:
              # Default GNU Options
              # TODO(XXX) always generate debugging info?
@@ -61,9 +61,13 @@
              build.env.Append(CCFLAGS = '-Wextra')
 -            build.env.Append(CCFLAGS = '-g')
  
-             # Check that g++ is present (yeah, SCONS is a bit dumb here)
-             if os.system("which g++ > /dev/null"): #Checks for non-zero return code
-@@ -851,16 +850,19 @@
+-            # Check that g++ is present (yeah, SCONS is a bit dumb here)
+-            if os.system("which g++ > /dev/null"): #Checks for non-zero return code
+-                raise Exception("Did not find g++.")
+         elif build.toolchain_is_msvs:
+             # Validate the specified winlib directory exists
+             mixxx_lib_path = SCons.ARGUMENTS.get('winlib', '..\\..\\..\\mixxx-win32lib-msvc100-release')
+@@ -851,16 +847,19 @@
  
          elif build.platform_is_bsd:
              build.env.Append(CPPDEFINES='__BSD__')
@@ -91,7 +95,7 @@
  
          # Define for things that would like to special case UNIX (Linux or BSD)
          if build.platform_is_bsd or build.platform_is_linux:
-@@ -897,14 +899,14 @@
+@@ -897,14 +896,14 @@
          # Say where to find resources on Unix. TODO(XXX) replace this with a
          # RESOURCE_PATH that covers Win and OSX too:
          if build.platform_is_linux or build.platform_is_bsd:

Added: head/audio/mixxx/files/patch-src__defs.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/audio/mixxx/files/patch-src__defs.h	Thu Feb 27 14:08:14 2014	(r346340)
@@ -0,0 +1,17 @@
+--- src/defs.h.orig
++++ src/defs.h
+@@ -87,6 +87,8 @@
+ #define math_min(a,b)            (((a) < (b)) ? (a) : (b))
+ #endif
+ 
++#if !defined(__GNUC__)
++
+ // MSVC 2005/2008 needs these
+ #ifndef fmax
+ #define fmax math_max
+@@ -98,3 +100,5 @@
+ 
+ #endif
+ 
++#endif
++

Modified: head/audio/mixxx/pkg-plist
==============================================================================
--- head/audio/mixxx/pkg-plist	Thu Feb 27 14:07:04 2014	(r346339)
+++ head/audio/mixxx/pkg-plist	Thu Feb 27 14:08:14 2014	(r346340)
@@ -1,8 +1,14 @@
 bin/mixxx
+@exec mkdir -p %D/lib/mixxx/plugins/soundsource
 %%FAAD%%lib/mixxx/plugins/soundsource/libsoundsourcem4a.so
 %%WAVPACK%%lib/mixxx/plugins/soundsource/libsoundsourcewv.so
 lib/mixxx/plugins/vamp/libmixxxminimal.so
 share/applications/mixxx.desktop
+%%PORTDOCS%%%%DOCSDIR%%/Mixxx-Manual.pdf
+%%PORTDOCS%%%%DOCSDIR%%/README
+%%PORTDOCS%%%%DOCSDIR%%/README.macro
+%%PORTDOCS%%%%DOCSDIR%%/doc/HID/HID Packet Parser Documentation.odt
+%%PORTDOCS%%%%DOCSDIR%%/doc/HID/HID Packet Parser Documentation.pdf
 %%DATADIR%%/controllers/Akai MPD24.midi.xml
 %%DATADIR%%/controllers/Akai-LPD8-RK-scripts.js
 %%DATADIR%%/controllers/Akai-LPD8-RK.midi.xml
@@ -9950,7 +9956,10 @@ share/pixmaps/mixxx-icon.png
 @dirrm %%DATADIR%%/keyboard
 @dirrm %%DATADIR%%/controllers
 @dirrm %%DATADIR%%
+%%PORTDOCS%%@dirrm %%DOCSDIR%%/doc/HID
+%%PORTDOCS%%@dirrm %%DOCSDIR%%/doc
+%%PORTDOCS%%@dirrm %%DOCSDIR%%
 @dirrm lib/mixxx/plugins/vamp
-%%FAAD%%@dirrmtry lib/mixxx/plugins/soundsource
+@dirrmtry lib/mixxx/plugins/soundsource
 @dirrm lib/mixxx/plugins
 @dirrm lib/mixxx
_______________________________________________
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"