tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: SunOS with no audio installed
On Fri, 20 Nov 2009 18:16:16 +0900, Filip Hajny <filip%joyent.com@localhost>
wrote:
Is a similar patch a valid way to fix things in pkgsrc? Solaris may
not have audio support installed (essentially sys/audioio.h), because
it makes little sense (on a server). A few packages sense that and do
not build related parts which is fine, but it breaks with PLIST checks
futher on.
By your suggested patch, PLIST.sunaudio != yes on other platforms.
It should be
+PLIST_VARS+= sunaudio
+.if ${OPSYS} != "SunOS" || exists(/usr/include/sys/audioio.h)
+PLIST.sunaudio= yes
+.endif
You may use "features" for the purpose.
In mk/features/features-vars.mk:
.if ${OPSYS} == "SunOS" && !exists(/usr/include/sys/audioio.h)
MISSING_FEATURES+= sunaudio
.endif
In mk/features/features.mk:
. if !empty(USE_FEATURES:Msunaudio)
. if !empty(MISSING_FEATURES:Msunaudio)
PKG_FAIL_REASON+= "${PKGNAME} requires sunaudio support"
. endif
. endif
Then, in pkg's Makefie,
If sys/audioio.h is required:
USE_FEATURES+= sunaudio
If conditionally:
.include "../../mk/bsd.prefs.mk"
.if empty(MISSING_FEATURES:Msunaudio)
# settings for sunaudio enabled
.else
# settings for sunaudio disabled
.endif
BTW, I can't find why libsndfile succeed to build without sys/audioio.h, it
seems that
sndfile_play is always built (and if no sys/audioio.h on Solaris, failed to
build).
--
"Of course I love NetBSD":-)
OBATA Akio / obache%NetBSD.org@localhost
Home |
Main Index |
Thread Index |
Old Index