aboutsummaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authormiwi <miwi@FreeBSD.org>2014-02-27 22:08:14 +0800
committermiwi <miwi@FreeBSD.org>2014-02-27 22:08:14 +0800
commitf6150af4604202d76e1154e19ccccee7909c1fde (patch)
tree6cc075a317e0912af24aba934a373ec7f239beed /audio
parent6749492e83fbed209eba804db23907940b894350 (diff)
downloadfreebsd-ports-gnome-f6150af4604202d76e1154e19ccccee7909c1fde.tar.gz
freebsd-ports-gnome-f6150af4604202d76e1154e19ccccee7909c1fde.tar.zst
freebsd-ports-gnome-f6150af4604202d76e1154e19ccccee7909c1fde.zip
- Fix build with clang
- Support scons USES macro - Stage support PR: 185316 Submitted by: ports fury
Diffstat (limited to 'audio')
-rw-r--r--audio/mixxx/Makefile82
-rw-r--r--audio/mixxx/files/patch-build__depends.py14
-rw-r--r--audio/mixxx/files/patch-src__defs.h17
-rw-r--r--audio/mixxx/pkg-plist11
4 files changed, 70 insertions, 54 deletions
diff --git a/audio/mixxx/Makefile b/audio/mixxx/Makefile
index 308ccea2f21a..2b5220a6eb25 100644
--- a/audio/mixxx/Makefile
+++ b/audio/mixxx/Makefile
@@ -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}/audio/portaudio2
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>
diff --git a/audio/mixxx/files/patch-build__depends.py b/audio/mixxx/files/patch-build__depends.py
index 53d46ba93c9d..bdcdfb98cd15 100644
--- a/audio/mixxx/files/patch-build__depends.py
+++ b/audio/mixxx/files/patch-build__depends.py
@@ -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:
diff --git a/audio/mixxx/files/patch-src__defs.h b/audio/mixxx/files/patch-src__defs.h
new file mode 100644
index 000000000000..d15e24eabc9d
--- /dev/null
+++ b/audio/mixxx/files/patch-src__defs.h
@@ -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
++
diff --git a/audio/mixxx/pkg-plist b/audio/mixxx/pkg-plist
index 5a77a2319e9a..2f181f8f31d9 100644
--- a/audio/mixxx/pkg-plist
+++ b/audio/mixxx/pkg-plist
@@ -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