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 <> 

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

You may use "features" for the purpose.

In mk/features/

.if ${OPSYS} == "SunOS" && !exists(/usr/include/sys/audioio.h)
MISSING_FEATURES+=      sunaudio

In mk/features/

.  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/"
.if empty(MISSING_FEATURES:Msunaudio)
# settings for sunaudio enabled
# settings for sunaudio disabled

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 

"Of course I love NetBSD":-)
OBATA Akio /

Home | Main Index | Thread Index | Old Index