- use sndio for audio, kill esound flavor
- update HOMEPAGE and MASTER_SITES - more precise license marker - @bin marker ok ratchov, thanks ajacoutot for @pkgpath reminder
This commit is contained in:
parent
024531ef8d
commit
5bd3146e48
@ -1,22 +1,22 @@
|
||||
# $OpenBSD: Makefile,v 1.13 2009/03/07 15:37:38 jasper Exp $
|
||||
# $OpenBSD: Makefile,v 1.14 2009/12/20 00:35:23 jakemsr Exp $
|
||||
|
||||
COMMENT= Windows 95/98/NT like window manager
|
||||
|
||||
DISTNAME= qvwm-1.1.8
|
||||
PKGNAME= ${DISTNAME}p1
|
||||
PKGNAME= ${DISTNAME}p2
|
||||
CATEGORIES= x11
|
||||
MASTER_SITES= ftp://ftp.qvwm.org/pub/qvwm/
|
||||
MASTER_SITES= ${HOMEPAGE}archive/qvwm/
|
||||
|
||||
HOMEPAGE= http://www.qvwm.org/
|
||||
HOMEPAGE= http://www.csg.is.titech.ac.jp/~kourai/qvwm/
|
||||
|
||||
# GPL
|
||||
# GPLv2
|
||||
PERMIT_PACKAGE_CDROM= Yes
|
||||
PERMIT_PACKAGE_FTP= Yes
|
||||
PERMIT_DISTFILES_CDROM= Yes
|
||||
PERMIT_DISTFILES_FTP= Yes
|
||||
WANTLIB= ICE SM X11 Xext Xss c m stdc++
|
||||
WANTLIB= ICE SM X11 Xext Xss c m sndio stdc++
|
||||
|
||||
FLAVORS= esound imlib
|
||||
FLAVORS= imlib
|
||||
FLAVOR?=
|
||||
|
||||
USE_X11= Yes
|
||||
@ -24,17 +24,8 @@ USE_X11= Yes
|
||||
SEPARATE_BUILD= flavored
|
||||
CONFIGURE_STYLE= gnu
|
||||
|
||||
# the build-scheme will get confused otherwise
|
||||
post-patch:
|
||||
rm ${WRKDIST}/src/yaccsrc.{cc,h}
|
||||
|
||||
.if ${FLAVOR:L:Mesound}
|
||||
LIB_DEPENDS+= esd.>=2::audio/esound
|
||||
CONFIGURE_ARGS+= --with-esd-prefix=${LOCALBASE}
|
||||
WANTLIB+= audiofile sndio
|
||||
.else
|
||||
CONFIGURE_ARGS+= --without-esd
|
||||
.endif
|
||||
CONFIGURE_ENV= CPPFLAGS="-DUSE_SNDIO" LIBS="-lsndio"
|
||||
|
||||
.if ${FLAVOR:L:Mimlib}
|
||||
LIB_DEPENDS+= Imlib.>=19::graphics/imlib
|
||||
@ -45,4 +36,8 @@ CONFIGURE_ARGS+= --without-imlib
|
||||
WANTLIB+= Xpm
|
||||
.endif
|
||||
|
||||
# the build-scheme will get confused otherwise
|
||||
post-patch:
|
||||
rm ${WRKDIST}/src/yaccsrc.{cc,h}
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,7 +1,7 @@
|
||||
$OpenBSD: patch-src_Makefile_in,v 1.1 2000/07/03 00:39:09 espie Exp $
|
||||
--- src/Makefile.in.orig Mon Jul 3 02:22:01 2000
|
||||
+++ src/Makefile.in Mon Jul 3 02:22:11 2000
|
||||
@@ -86,7 +86,7 @@ qvwm_SOURCES = button.cc button.h callba
|
||||
$OpenBSD: patch-src_Makefile_in,v 1.2 2009/12/20 00:35:23 jakemsr Exp $
|
||||
--- src/Makefile.in.orig Wed May 31 00:39:47 2000
|
||||
+++ src/Makefile.in Wed Dec 16 20:53:13 2009
|
||||
@@ -86,7 +86,7 @@ qvwm_SOURCES = button.cc button.h callback.h colormap.
|
||||
|
||||
|
||||
# VPATH is not enough for lexsrc.ll and yaccsrc.yy
|
||||
|
@ -1,7 +1,62 @@
|
||||
$OpenBSD: patch-src_audio_cc,v 1.1 2004/01/15 18:25:36 espie Exp $
|
||||
--- src/audio.cc.orig 2004-01-15 19:20:05.000000000 +0100
|
||||
+++ src/audio.cc 2004-01-15 19:20:15.000000000 +0100
|
||||
@@ -232,7 +232,7 @@ int Audio::setFormat(int bits, int encod
|
||||
$OpenBSD: patch-src_audio_cc,v 1.2 2009/12/20 00:35:23 jakemsr Exp $
|
||||
--- src/audio.cc.orig Wed May 31 00:17:59 2000
|
||||
+++ src/audio.cc Thu Dec 17 01:55:40 2009
|
||||
@@ -32,6 +32,8 @@
|
||||
// sound playback type definition
|
||||
#if defined(USE_ESD)
|
||||
#define ESD
|
||||
+#elif defined(USE_SNDIO)
|
||||
+#define SNDIO
|
||||
#else
|
||||
|
||||
#if defined(__linux__) && defined(USE_ALSA)
|
||||
@@ -51,6 +53,8 @@
|
||||
// include header file
|
||||
#ifdef ESD
|
||||
#include <esd.h>
|
||||
+#elif defined(SNDIO)
|
||||
+#include <sndio.h>
|
||||
#else
|
||||
|
||||
#ifdef __linux__
|
||||
@@ -165,6 +169,11 @@ int Audio::openDevice()
|
||||
return 1;
|
||||
#elif defined(ESD)
|
||||
return 1;
|
||||
+#elif defined(SNDIO)
|
||||
+ if ((hdl = sio_open(NULL, SIO_PLAY, 0)) == NULL)
|
||||
+ return -1;
|
||||
+ started = 0;
|
||||
+ return 1;
|
||||
#else
|
||||
m_audiofd = open(m_audiodev, O_WRONLY);
|
||||
if (m_audiofd < 0)
|
||||
@@ -184,6 +193,8 @@ int Audio::closeDevice()
|
||||
if (!(m_audiofd < 0))
|
||||
if (esd_close(m_audiofd) < 0)
|
||||
return -1;
|
||||
+#elif defined(SNDIO)
|
||||
+ sio_close(hdl);
|
||||
#else
|
||||
if (close(m_audiofd) < 0)
|
||||
return -1;
|
||||
@@ -222,6 +233,15 @@ int Audio::setFormat(int bits, int encoding)
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
+#ifdef SNDIO
|
||||
+ if (encoding != EN_LINEAR && encoding != EN_NONE)
|
||||
+ return -1;
|
||||
+ sio_initpar(&par);
|
||||
+ par.bits = bits;
|
||||
+ par.sig = bits == 8 ? 0 : 1;
|
||||
+ par.le = SIO_LE_NATIVE;
|
||||
+#endif
|
||||
+
|
||||
#ifdef OSS
|
||||
if (encoding != EN_LINEAR && encoding != EN_NONE)
|
||||
return -1;
|
||||
@@ -232,7 +252,7 @@ int Audio::setFormat(int bits, int encoding)
|
||||
#endif
|
||||
|
||||
#ifdef SUN
|
||||
@ -10,21 +65,53 @@ $OpenBSD: patch-src_audio_cc,v 1.1 2004/01/15 18:25:36 espie Exp $
|
||||
|
||||
AUDIO_INITINFO(&ainfo);
|
||||
|
||||
@@ -271,7 +271,7 @@ int Audio::setChannels(int channels)
|
||||
@@ -270,8 +290,12 @@ int Audio::setChannels(int channels)
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
+#ifdef SNDIO
|
||||
+ par.pchan = channels;
|
||||
+#endif
|
||||
+
|
||||
#ifdef SUN
|
||||
- struct audio_info_t ainfo;
|
||||
+ audio_info_t ainfo;
|
||||
|
||||
AUDIO_INITINFO(&ainfo);
|
||||
ainfo.play.channels = channels;
|
||||
@@ -300,7 +300,7 @@ int Audio::setSamplingRate(int rate)
|
||||
@@ -299,8 +323,12 @@ int Audio::setSamplingRate(int rate)
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
+#ifdef SNDIO
|
||||
+ par.rate = rate;
|
||||
+#endif
|
||||
+
|
||||
#ifdef SUN
|
||||
- struct audio_info_t ainfo;
|
||||
+ audio_info_t ainfo;
|
||||
|
||||
AUDIO_INITINFO(&ainfo);
|
||||
ainfo.play.sample_rate = rate;
|
||||
@@ -336,9 +364,21 @@ int Audio::output(char* buf, int size)
|
||||
}
|
||||
#endif
|
||||
|
||||
+#ifdef SNDIO
|
||||
+ if (!started) {
|
||||
+ if (!sio_setpar(hdl, &par) || !sio_start(hdl)) {
|
||||
+ printf("could not start sndio\n");
|
||||
+ return -1;
|
||||
+ }
|
||||
+ started = 1;
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
while (size > 0) {
|
||||
#ifdef ALSA
|
||||
ret = snd_pcm_write(m_audiopcm, buf, size);
|
||||
+#elif defined(SNDIO)
|
||||
+ ret = sio_write(hdl, buf, size);
|
||||
#else
|
||||
ret = write(m_audiofd, buf, size);
|
||||
#endif
|
||||
|
26
x11/qvwm/patches/patch-src_audio_h
Normal file
26
x11/qvwm/patches/patch-src_audio_h
Normal file
@ -0,0 +1,26 @@
|
||||
$OpenBSD: patch-src_audio_h,v 1.1 2009/12/20 00:35:23 jakemsr Exp $
|
||||
--- src/audio.h.orig Wed Jan 5 22:47:55 2000
|
||||
+++ src/audio.h Thu Dec 17 01:54:37 2009
|
||||
@@ -33,6 +33,10 @@
|
||||
#include <esd.h>
|
||||
#endif
|
||||
|
||||
+#ifdef USE_SNDIO
|
||||
+#include <sndio.h>
|
||||
+#endif
|
||||
+
|
||||
#ifndef SEEK_CUR
|
||||
#define SEEK_CUR 1
|
||||
#endif
|
||||
@@ -55,6 +59,11 @@ class Audio { (private)
|
||||
#ifdef USE_ESD
|
||||
esd_format_t m_audioformat;
|
||||
int m_audiorate;
|
||||
+#endif
|
||||
+#ifdef USE_SNDIO
|
||||
+ struct sio_hdl *hdl;
|
||||
+ struct sio_par par;
|
||||
+ int started;
|
||||
#endif
|
||||
|
||||
protected:
|
@ -1,5 +1,7 @@
|
||||
@comment $OpenBSD: PLIST,v 1.2 2004/09/15 19:26:31 espie Exp $
|
||||
bin/qvwm
|
||||
@comment $OpenBSD: PLIST,v 1.3 2009/12/20 00:35:23 jakemsr Exp $
|
||||
@pkgpath x11/qvwm,esound,imlib
|
||||
@pkgpath x11/qvwm,esound
|
||||
@bin bin/qvwm
|
||||
@man man/man1/qvwm.1x
|
||||
share/qvwm/
|
||||
share/qvwm/clouds.qvwm-theme
|
||||
|
Loading…
Reference in New Issue
Block a user