From nobody Thu Mar 31 18:37:01 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 05F3E1A3DB28; Thu, 31 Mar 2022 18:37:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KTsTn6FnCz3NlD; Thu, 31 Mar 2022 18:37:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648751821; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ykb9WF8RS5TcM4ceLLdnBCpK10eAWhWA6KZyhoUU/lM=; b=DtvBW52rywABwtwE1p4EKwbufgnPMlOPFRSeUQySzl48rDMV4PPZ3JoLzpjGX2McEG5wwl xH+admLslC8fi+nPAVwuUp01DbRC50o42HETlvuE7i9TqY07v1eKVAFAUmGmIbCCKJq+Q8 jrTtNlVpvdoMXoO7wbSXDQd0HzzBgKbB8CLlbr9z19aBXfRmb4gw1STiYziD1bSatK+mNe 5S8lTzJ9t856L9r2GxtunEQZGh1VBrpwpBzchR66C2UQGl8dIxtzOwLAGDNT25SrevosF2 VTvyRwyi0qJgWYXAFveGtepphaOumtVWFlKoVx+Dp8R1OScZW4SFah5m4kT4Sg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ACF162CB53; Thu, 31 Mar 2022 18:37:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 22VIb1jT098708; Thu, 31 Mar 2022 18:37:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22VIb1He098707; Thu, 31 Mar 2022 18:37:01 GMT (envelope-from git) Date: Thu, 31 Mar 2022 18:37:01 GMT Message-Id: <202203311837.22VIb1He098707@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Dmitry Marakasov Subject: git: 7059a13adc92 - main - audio/sdl2_sound: add port: Abstract SDL soundfile decoder List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: amdmi3 X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7059a13adc92a19a89653671e065e9d2dd968a4c Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648751821; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ykb9WF8RS5TcM4ceLLdnBCpK10eAWhWA6KZyhoUU/lM=; b=iX0Vug/VQh51K6Nt+ewUzojaZAMIfa1MTgf6RBC7nOfsjJ1mtEC434msHsbUH9uZ6fosqM pxkz0fOGtrn2KFPHvSuii1ykq+LldeyJUk/P/wlT7Lsvy2XDE/YBDp/TKgsMFFiKGFz4do owLzwm0IE5gdgLsRHp/PIUGeIkBoteAGKiJ/5d5T4G4MH+NqS9t+3Z/wI6q5ug++f6HSlo BkGIvSonOE4+mxfFOCuDWiv2OlhypShUr9NjCABUsCw+uUAMwrB3oZPYGXm66gXUw1g3U3 fdeyz4zGGZ6Bn0I9vfCWBlWh0OdqVbUMt8DIuz2DsJ3i+bkj/hrXhQp/b46uvw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1648751821; a=rsa-sha256; cv=none; b=a4ZwyALS8Otd4LJqG3Z0/ZjCFqSJHoSecUc8vPsEO2prwARcqM4CyyYC7kzDePPH+OkSbk WAGZ8VYGRFrlDrjvvvyFeEs9g7OWIjMOdWRnnzz8OL9XZI4X4U85FW3NEcJNQyMPfsBnvO DrlEsgUki+YVsaeQRxvzm6LoinBfHfwQblpCfjcyfTuLjFO3d124KPKhjM3Zl3i25nBaYP 5D1NJSj5gGploRwYHldwnxuRzqeTZgJWpcJ4xcLWdISOcKwNUzpQ9pzh/uhagZAaOypRzP dFOPlQ7M9Mv9jZJS4igLpAP4BouhQl2WlQRsggSMhvNPW8lYr/B94h9v0WkdmA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by amdmi3: URL: https://cgit.FreeBSD.org/ports/commit/?id=7059a13adc92a19a89653671e065e9d2dd968a4c commit 7059a13adc92a19a89653671e065e9d2dd968a4c Author: Dmitry Marakasov AuthorDate: 2022-03-31 14:45:59 +0000 Commit: Dmitry Marakasov CommitDate: 2022-03-31 18:36:12 +0000 audio/sdl2_sound: add port: Abstract SDL soundfile decoder - Add the latest version of sdl_sound with support for USE_SDL=sound2. - Note that this is sdl2-only library, so audio/sdl_sound, which is sdl1-only library, remains in the tree and is not affected. I've had to rename playsound binary this port also installs to avoid the conflict. - The library now contains all the decoder code, so no external depends and options are needed any longer. I've added MIDI option though, since upstream has it disabled by default due to different license. --- Mk/Uses/sdl.mk | 7 +++++-- audio/Makefile | 1 + audio/sdl2_sound/Makefile | 43 +++++++++++++++++++++++++++++++++++++++++++ audio/sdl2_sound/distinfo | 3 +++ audio/sdl2_sound/pkg-descr | 14 ++++++++++++++ audio/sdl2_sound/pkg-plist | 6 ++++++ 6 files changed, 72 insertions(+), 2 deletions(-) diff --git a/Mk/Uses/sdl.mk b/Mk/Uses/sdl.mk index 14631bd8735b..76839cd5cc28 100644 --- a/Mk/Uses/sdl.mk +++ b/Mk/Uses/sdl.mk @@ -3,7 +3,7 @@ # Feature: sdl # Usage: USES=sdl # USE_SDL=sdl console gfx image mixer mm net pango sound ttf -# sdl2 gfx2 image2 mixer2 net2 ttf2 +# sdl2 gfx2 image2 mixer2 net2 sound2 ttf2 # # USE_SDL specifies which SDL components to add as dependencies. # Not specifying USE_SDL with USES=sdl is an error. @@ -47,7 +47,7 @@ _SDL_ttf_LIB_DEPENDS= libSDL_ttf.so:graphics/sdl_ttf _SDL_ttf_REQUIRES= sdl # These are the current supported SDL2 modules -_SDL_USE_ALL+= sdl2 gfx2 image2 mixer2 net2 ttf2 +_SDL_USE_ALL+= sdl2 gfx2 image2 mixer2 net2 sound2 ttf2 _SDL_sdl2_LIB_DEPENDS= libSDL2.so:devel/sdl20 @@ -63,6 +63,9 @@ _SDL_mixer2_REQUIRES= sdl2 _SDL_net2_LIB_DEPENDS= libSDL2_net.so:net/sdl2_net _SDL_net2_REQUIRES= sdl2 +_SDL_sound2_LIB_DEPENDS= libSDL2_sound.so:audio/sdl2_sound +_SDL_sound2_REQUIRES= sdl2 + _SDL_ttf2_LIB_DEPENDS= libSDL2_ttf.so:graphics/sdl2_ttf _SDL_ttf2_REQUIRES= sdl2 diff --git a/audio/Makefile b/audio/Makefile index e9bfa067701c..ddad344eed75 100644 --- a/audio/Makefile +++ b/audio/Makefile @@ -718,6 +718,7 @@ SUBDIR += schismtracker SUBDIR += screcord-lv2 SUBDIR += sdl2_mixer + SUBDIR += sdl2_sound SUBDIR += sdl_mixer SUBDIR += sdl_sound SUBDIR += sfizz diff --git a/audio/sdl2_sound/Makefile b/audio/sdl2_sound/Makefile new file mode 100644 index 000000000000..07e901e76e04 --- /dev/null +++ b/audio/sdl2_sound/Makefile @@ -0,0 +1,43 @@ +PORTNAME= sdl2_sound +DISTVERSIONPREFIX= v +DISTVERSION= 2.0.1 +CATEGORIES= audio + +MAINTAINER= amdmi3@FreeBSD.org +COMMENT= Abstract SDL soundfile decoder + +LICENSE= ZLIB +LICENSE_FILE_ZLIB=${WRKSRC}/LICENSE.txt + +USES= cmake sdl +USE_SDL= sdl2 +USE_GITHUB= yes +GH_ACCOUNT= icculus +GH_PROJECT= SDL_sound +USE_LDCONFIG= yes + +PORTDOCS= * +PORTEXAMPLES= * + +OPTIONS_DEFINE= MIDI DOCS EXAMPLES +OPTIONS_DEFAULT=MIDI + +MIDI_DESC= MIDI support +MIDI_CMAKE_BOOL=SDLSOUND_DECODER_MIDI +MIDI_VARS= LICENSE+=ART10 \ + LICENSE_COMB=multi \ + LICENSE_FILE_ART10=${WRKSRC}/src/timidity/COPYING + +post-install: + @cd ${STAGEDIR}${PREFIX}/bin && ${MV} playsound playsound2 + +post-install-DOCS-on: + @${MKDIR} ${STAGEDIR}${DOCSDIR} + cd ${WRKSRC}/docs && ${INSTALL_DATA} CHANGELOG.txt \ + CREDITS.txt README.txt ${STAGEDIR}${DOCSDIR} + +post-install-EXAMPLES-on: + @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} + ${INSTALL_DATA} ${WRKSRC}/examples/*.c ${STAGEDIR}${EXAMPLESDIR} + +.include diff --git a/audio/sdl2_sound/distinfo b/audio/sdl2_sound/distinfo new file mode 100644 index 000000000000..fe9a77ff4686 --- /dev/null +++ b/audio/sdl2_sound/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1648728983 +SHA256 (icculus-SDL_sound-v2.0.1_GH0.tar.gz) = 3527f05b7a3f00d8523cf25671598c85568b4e8b615ce7570113b44cbb7d555c +SIZE (icculus-SDL_sound-v2.0.1_GH0.tar.gz) = 443682 diff --git a/audio/sdl2_sound/pkg-descr b/audio/sdl2_sound/pkg-descr new file mode 100644 index 000000000000..5126766ed9f4 --- /dev/null +++ b/audio/sdl2_sound/pkg-descr @@ -0,0 +1,14 @@ +SDL_sound is a library that handles the decoding of several popular +sound file formats, such as .WAV and .MP3. It is meant to make the +programmer's sound playback tasks simpler. The programmer gives +SDL_sound a filename, or feeds it data directly from one of many +sources, and then reads the decoded waveform data back at her +leisure. If resource constraints are a concern, SDL_sound can process +sound data in programmer-specified blocks. Alternately, SDL_sound +can decode a whole sound file and hand back a single pointer to the +whole waveform. SDL_sound can also handle sample rate, audio format, +and channel conversion on-the-fly and behind-the-scenes, if the +programmer desires. + +WWW: https://icculus.org/SDL_sound/ +WWW: https://github.com/icculus/SDL_sound diff --git a/audio/sdl2_sound/pkg-plist b/audio/sdl2_sound/pkg-plist new file mode 100644 index 000000000000..51db3494f23c --- /dev/null +++ b/audio/sdl2_sound/pkg-plist @@ -0,0 +1,6 @@ +bin/playsound2 +include/SDL2/SDL_sound.h +lib/libSDL2_sound.a +lib/libSDL2_sound.so +lib/libSDL2_sound.so.2 +lib/libSDL2_sound.so.2.0.1