CVS: cvs.openbsd.org: ports

2008-12-26 Thread Jacob Meuser
CVSROOT:/cvs
Module name:ports
Changes by: jake...@cvs.openbsd.org 2008/12/26 01:40:18

ports/audio/fluidsynth/files

Update of /cvs/ports/audio/fluidsynth/files
In directory cvs.openbsd.org:/tmp/cvs-serv4355/files

Log Message:
Directory /cvs/ports/audio/fluidsynth/files added to the repository



CVS: cvs.openbsd.org: ports

2008-12-26 Thread Jacob Meuser
CVSROOT:/cvs
Module name:ports
Changes by: jake...@cvs.openbsd.org 2008/12/26 01:45:12

Modified files:
audio/fluidsynth: Makefile 
audio/fluidsynth/patches: patch-fluidsynth_pc_in 
  patch-src_fluid_oss_c 
audio/fluidsynth/pkg: PLIST 
Added files:
audio/fluidsynth/files: fluid_libsndio.c 
audio/fluidsynth/patches: patch-configure_ac 
  patch-src_Makefile_am 
  patch-src_fluid_adriver_c 
  patch-src_fluid_mdriver_c 
Removed files:
audio/fluidsynth/patches: patch-configure patch-src_Makefile_in 
  patch-src_config_h_in 

Log message:
- add sndio backend
- drop OSS audio support but keep OSS midi support



CVS: cvs.openbsd.org: ports

2008-12-26 Thread Antoine Jacoutot
CVSROOT:/cvs
Module name:ports
Changes by: ajacou...@cvs.openbsd.org   2008/12/26 02:50:54

Modified files:
www/timetrex   : Makefile distinfo 
www/timetrex/pkg: PLIST 

Log message:
- update to timetrex-2.2.17
* several minor bugfixes
* additional cheque format



CVS: cvs.openbsd.org: ports

2008-12-26 Thread Steven Mestdagh
CVSROOT:/cvs
Module name:ports
Changes by: ste...@cvs.openbsd.org  2008/12/26 10:30:24

Modified files:
www/nginx  : Makefile 
Added files:
www/nginx/patches: patch-src_os_unix_ngx_posix_init_c 

Log message:
reliability fix:
Recently it was discovered that nginx workers exit abnormally if they
receive Expect header on all systems except FreeBSD, Linux, and
Solaris.

from upstream via maintainer Darrin Chandler



CVS: cvs.openbsd.org: ports

2008-12-26 Thread Steven Mestdagh
CVSROOT:/cvs
Module name:ports
Changes by: ste...@cvs.openbsd.org  2008/12/26 16:36:27

Modified files:
x11/tk/8.5 : Makefile distinfo 

Log message:
update to 8.5.6

from maintainer Stuart Cassoff



CVS: cvs.openbsd.org: ports

2008-12-26 Thread Steven Mestdagh
CVSROOT:/cvs
Module name:ports
Changes by: ste...@cvs.openbsd.org  2008/12/27 00:58:22

Modified files:
security/libnipper: Makefile distinfo 

Log message:
update to 0.12.5



Re: Get rid of warnings when YP is configured

2008-12-26 Thread Nikolay Sturm
* Ingo Schwarze [2008-12-26]:
 I'm not really sure the patch is correct and doesn't break anything
 else - though i currently don't see why any port build should be
 allowed to bind(2) inet(4) sockets.

We have two ports explicitly allowing binding to 0.0.0.0:0, devel/mico
and x11/gnustep/base. How do these cope with your proposed change? Does
denying bind(2) as suggested and removing their local filter break them?

Nikolay



sndio backend requests

2008-12-26 Thread Jacob Meuser

request lines are open.  what ports do y'all want sndio backends
for?

iirc, ajacoutot said something about libcanberra, and the ports
listed here: http://jakemsr.trancell.org/libsndio.html in the
works.

what else?

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: sndio backend requests

2008-12-26 Thread Andrés
On Fri, Dec 26, 2008 at 8:41 AM, Jacob Meuser jake...@sdf.lonestar.org wrote:

 request lines are open.  what ports do y'all want sndio backends
 for?

 iirc, ajacoutot said something about libcanberra, and the ports
 listed here: http://jakemsr.trancell.org/libsndio.html in the
 works.

 what else?

 --
 jake...@sdf.lonestar.org
 SDF Public Access UNIX System - http://sdf.lonestar.org



mpd/(mpc ?) please :D



Re: sndio backend requests

2008-12-26 Thread viq
On Fri, Dec 26, 2008 at 09:54:41AM -0200, Andrés wrote:
 On Fri, Dec 26, 2008 at 8:41 AM, Jacob Meuser jake...@sdf.lonestar.org 
 wrote:
 
  request lines are open.  what ports do y'all want sndio backends
  for?
 
  iirc, ajacoutot said something about libcanberra, and the ports
  listed here: http://jakemsr.trancell.org/libsndio.html in the
  works.
 
  what else?
 
  --
  jake...@sdf.lonestar.org
  SDF Public Access UNIX System - http://sdf.lonestar.org
 
 
 
 mpd/(mpc ?) please :D

It already works well with aucat ;) Or is that not what is meant here?
BTW, if starting aucat is required, maybe it would be a good idea to
create a dedicted user for it? Say, _audio
-- 
viq


pgpls3o4OGtfM.pgp
Description: PGP signature


graphics/gd: patch-gd_gif_in_c did not apply cleanly

2008-12-26 Thread Hannu Vuolasaho
Hello!

I tried install sysutils/nut and it requires installing graphics/gd which
fails.

My system is freshly upgraded to 4.4 i386 release. Nothing special. Mainly
firewall.

Is it problem with me or something else? I'm not very good with ports
yet...

I did as http://www.openbsd.org/ports.html suggested and first is pasted
portslogger and then .rej file.

Hannu Vuolasaho

+++ Fri Dec 26 20:20:09 EET 2008
===  Cleaning for gd-2.0.35
===  Checking files for gd-2.0.35
`/usr/ports/distfiles/gd-2.0.35.tar.gz' is up to date.
 (SHA256) gd-2.0.35.tar.gz: OK
===  gd-2.0.35 depends on: libtool-* - found
===  gd-2.0.35 depends on: jpeg-* - found
===  gd-2.0.35 depends on: png-* - found
===  gd-2.0.35 depends on: libiconv-* - found
===  Verifying specs: jpeg.=62 png.=2 iconv.=2 jpeg.=62 png.=2
iconv.=2 c
 expat fontconfig freetype m z c expat fontconfig freetype m z
===  found jpeg.62.0 png.7.0 iconv.5.0 c.48.0 expat.9.0 fontconfig.5.1
freetype.16.1 m.3.0 z.4.1
===  Extracting for gd-2.0.35
===  Patching for gd-2.0.35
3 out of 5 hunks failed--saving rejects to gd_gif_in.c.rej
***   patch-gd_gif_in_c did not apply cleanly
*** Error code 1

Stop in /usr/ports/graphics/gd (line 2066 of
/usr/ports/infrastructure/mk/bsd.port.mk).
*** Error code 1

Stop in /usr/ports/graphics/gd (line 1422 of
/usr/ports/infrastructure/mk/bsd.port.mk).
*** Error code 1

Stop in /usr/ports/graphics/gd (line 1962 of
/usr/ports/infrastructure/mk/bsd.port.mk).
*** Error code 1

Stop in /usr/ports/graphics/gd (line 1452 of
/usr/ports/infrastructure/mk/bsd.port.mk).
--- Fri Dec 26 20:20:34 EET 2008


@@ -118,6 +118,7 @@
charversion[4];
/* 2.0.28: threadsafe storage */
int ZeroDataBlock = FALSE;
+   int maxcount = 1024;

gdImagePtr im = 0;
if (! ReadOK(fd,buf,6)) {
@@ -269,6 +272,7 @@
 DoExtension(gdIOCtx *fd, int label, int *Transparent, int
*ZeroDataBlockP)
 {
static unsigned char buf[256];
+   int  maxcount = 1024;

switch (label) {
case 0xf9:  /* Graphic Control Extension */
@@ -281,13 +285,13 @@
if ((buf[0]  0x1) != 0)
*Transparent = buf[3];

-   while (GetDataBlock(fd, (unsigned char*) buf,
ZeroDataBlockP) != 0)
+   while (GetDataBlock(fd, (unsigned char*) buf,
ZeroDataBlockP) != 0  --maxcount = 0)
;
return FALSE;
default:
break;
}
-   while (GetDataBlock(fd, (unsigned char*) buf, ZeroDataBlockP) !=
0)
+   while (GetDataBlock(fd, (unsigned char*) buf, ZeroDataBlockP) != 0
 --maxcount = 0)
;

return FALSE;





Re: ff3

2008-12-26 Thread frantisek holop
hmm, on Sat, Dec 13, 2008 at 04:52:36PM -0600, Abel Camarillo said that
 I am trying opera and I am amazed by the performance, it's considerably faster
 than ff3, and I have no more those tremendous lags disturbing me.
 
 I was stucked with ff3 for the `vimperator' but I found a little plugin called
 `vimperopera' that helps a lot with the opera navigation.

i guess that would be just a keyboard layout .ini file :]
i have yet to find a thing that is not customisable in opera.

as soon as opera dragonfly catches up with firebug i am a happy camper.

-f
-- 
honesty: fear of being caught.



Re: sndio backend requests

2008-12-26 Thread Jacob Meuser
On Fri, Dec 26, 2008 at 02:01:04PM +0100, viq wrote:
 On Fri, Dec 26, 2008 at 09:54:41AM -0200, Andr?s wrote:
  On Fri, Dec 26, 2008 at 8:41 AM, Jacob Meuser jake...@sdf.lonestar.org 
  wrote:
  
   request lines are open.  what ports do y'all want sndio backends
   for?
  
   iirc, ajacoutot said something about libcanberra, and the ports
   listed here: http://jakemsr.trancell.org/libsndio.html in the
   works.
  
   what else?
  
   --
   jake...@sdf.lonestar.org
   SDF Public Access UNIX System - http://sdf.lonestar.org
  
  
  
  mpd/(mpc ?) please :D
 
 It already works well with aucat ;) Or is that not what is meant here?
 BTW, if starting aucat is required, maybe it would be a good idea to
 create a dedicted user for it? Say, _audio

sndio an audio API.  it works with the hardware directly OR with
aucat.

aucat doesn't need any special permissions.  run it as whoever.
no need to add more gunk.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: sndio backend requests

2008-12-26 Thread Matt Jibson
On Fri, Dec 26, 2008 at 3:41 AM, Jacob Meuser jake...@sdf.lonestar.org wrote:

 request lines are open.  what ports do y'all want sndio backends
 for?

 iirc, ajacoutot said something about libcanberra, and the ports
 listed here: http://jakemsr.trancell.org/libsndio.html in the
 works.

 what else?

 --
 jake...@sdf.lonestar.org
 SDF Public Access UNIX System - http://sdf.lonestar.org



I started working on ChucK (http://chuck.cs.princeton.edu/) a while
ago, with patches from Will Maier. The RtAudio
(http://www.music.mcgill.ca/~gary/rtaudio/) program is bundled with
ChucK to handle sound. I began porting it, but there is nothing worth
sharing now. sndio for RtAudio so ChucK works well with it would be
great. Will Maier did his port differently than mine. Attached is his
diff from my port to his.


chuck.tgz
Description: GNU Zip compressed data


chuck.diff
Description: Binary data


Re: sndio backend requests

2008-12-26 Thread Jacob Meuser
On Fri, Dec 26, 2008 at 12:48:16PM -0700, Matt Jibson wrote:
 On Fri, Dec 26, 2008 at 3:41 AM, Jacob Meuser jake...@sdf.lonestar.org 
 wrote:
 
  request lines are open.  what ports do y'all want sndio backends
  for?
 
  iirc, ajacoutot said something about libcanberra, and the ports
  listed here: http://jakemsr.trancell.org/libsndio.html in the
  works.
 
  what else?
 
  --
  jake...@sdf.lonestar.org
  SDF Public Access UNIX System - http://sdf.lonestar.org
 
 
 
 I started working on ChucK (http://chuck.cs.princeton.edu/) a while
 ago, with patches from Will Maier. The RtAudio
 (http://www.music.mcgill.ca/~gary/rtaudio/) program is bundled with
 ChucK to handle sound. I began porting it, but there is nothing worth
 sharing now. sndio for RtAudio so ChucK works well with it would be
 great. Will Maier did his port differently than mine. Attached is his
 diff from my port to his.

that looks interesting, but I'd rather work on stuff that's in the
ports tree.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: sndio backend requests

2008-12-26 Thread Jacob Meuser
On Fri, Dec 26, 2008 at 07:43:44PM +, Jacob Meuser wrote:
 On Fri, Dec 26, 2008 at 02:01:04PM +0100, viq wrote:
  On Fri, Dec 26, 2008 at 09:54:41AM -0200, Andr?s wrote:
   On Fri, Dec 26, 2008 at 8:41 AM, Jacob Meuser jake...@sdf.lonestar.org 
   wrote:
   
request lines are open.  what ports do y'all want sndio backends
for?
   
iirc, ajacoutot said something about libcanberra, and the ports
listed here: http://jakemsr.trancell.org/libsndio.html in the
works.
   
what else?
   
--
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org
   
   
   
   mpd/(mpc ?) please :D
  
  It already works well with aucat ;) Or is that not what is meant here?
  BTW, if starting aucat is required, maybe it would be a good idea to
  create a dedicted user for it? Say, _audio
 
 sndio an audio API.  it works with the hardware directly OR with
   ^
  is

 aucat.
 
 aucat doesn't need any special permissions.  run it as whoever.
 no need to add more gunk.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: graphics/gd: patch-gd_gif_in_c did not apply cleanly

2008-12-26 Thread Stuart Henderson
On 2008/12/26 21:06, Hannu Vuolasaho wrote:
 Hello!
 
 I tried install sysutils/nut and it requires installing graphics/gd which
 fails.
 
 My system is freshly upgraded to 4.4 i386 release. Nothing special. Mainly
 firewall.
 
 Is it problem with me or something else? I'm not very good with ports
 yet...

...
 3 out of 5 hunks failed--saving rejects to gd_gif_in.c.rej
 ***   patch-gd_gif_in_c did not apply cleanly
...

that file was removed in Feb 2007, your ports tree is somehow not
clean. maybe you need a fresh checkout.



Re: update gc all three maintained python ports

2008-12-26 Thread Damien Miller
On Sat, 27 Dec 2008, Damien Miller wrote:

 I'll commit this in a couple of days unless there are objections.
 There is a separate diff (coming shortly) to remove dependencies
 from other ports on python-expat, python-bz2 and python-sqlite

Here is the diff for the other ports (MAINTAINERs Cc'd):

Index: ./databases/py-axiom/Makefile
===
RCS file: /cvs/ports/databases/py-axiom/Makefile,v
retrieving revision 1.2
diff -u -p -r1.2 Makefile
--- ./databases/py-axiom/Makefile   1 Sep 2008 19:10:22 -   1.2
+++ ./databases/py-axiom/Makefile   26 Dec 2008 23:38:33 -
@@ -4,7 +4,7 @@ COMMENT=sqlite-based object persistence
 
 VERSION=   0.5.28
 DISTNAME=  Axiom-${VERSION}
-PKGNAME=   py-axiom-${VERSION}
+PKGNAME=   py-axiom-${VERSION}p0
 CATEGORIES=databases
 
 HOMEPAGE=  http://divmod.org/trac/wiki/DivmodAxiom
@@ -27,8 +27,7 @@ BUILD_DEPENDS+=   :py-epsilon-*:devel/py-e
 RUN_DEPENDS=   ${BUILD_DEPENDS} \
:py-twisted-conch-*:devel/py-twisted/conch
 
-REGRESS_DEPENDS=${BUILD_DEPENDS} \
-   :python-bz2-${MODPY_VERSION}.*:lang/python/${MODPY_VERSION},-bz2
+REGRESS_DEPENDS=${BUILD_DEPENDS}
 
 MODPY_DISTUTILS_BUILD= build --build-base=${WRKSRC}/.build
 MODPY_EGG_VERSION= ${VERSION}
Index: ./databases/py-sqlite2/Makefile
===
RCS file: /cvs/ports/databases/py-sqlite2/Makefile,v
retrieving revision 1.10
diff -u -p -r1.10 Makefile
--- ./databases/py-sqlite2/Makefile 30 Jan 2008 17:33:13 -  1.10
+++ ./databases/py-sqlite2/Makefile 26 Dec 2008 23:38:33 -
@@ -4,7 +4,7 @@ COMMENT=SQLite3 adapter for Python
 
 VERSION=   2.4.1
 DISTNAME=  pysqlite-${VERSION}
-PKGNAME=   py-sqlite2-${VERSION}
+PKGNAME=   py-sqlite2-${VERSION}p0
 CATEGORIES=databases devel
 
 MAINTAINER=Eric Faurot e...@openbsd.org
@@ -21,7 +21,6 @@ PERMIT_DISTFILES_FTP= Yes
 PERMIT_DISTFILES_CDROM=Yes
 
 LIB_DEPENDS=   sqlite3.=8.6::databases/sqlite3
-REGRESS_DEPENDS=   :python-bz2-*:lang/python/${MODPY_VERSION},-bz2
 
 SUBST_VARS=VERSION
 
Index: ./devel/bzr/Makefile
===
RCS file: /cvs/ports/devel/bzr/Makefile,v
retrieving revision 1.5
diff -u -p -r1.5 Makefile
--- ./devel/bzr/Makefile28 Oct 2008 09:28:24 -  1.5
+++ ./devel/bzr/Makefile26 Dec 2008 23:38:33 -
@@ -6,6 +6,7 @@ COMMENT=distributed version control sys
 
 MODPY_EGG_VERSION=1.3
 DISTNAME=  bzr-${MODPY_EGG_VERSION}
+PKGNAME=   ${DISTNAME}p0
 CATEGORIES=devel
 
 HOMEPAGE=  http://bazaar-vcs.org/
@@ -20,9 +21,7 @@ MASTER_SITES= ${HOMEPAGE}releases/src/
 
 MODULES=   lang/python
 
-RUN_DEPENDS+=  ::lang/python/${MODPY_VERSION},-bz2 \
-   ::lang/python/${MODPY_VERSION},-expat \
-   ::net/py-curl \
+RUN_DEPENDS+=  ::net/py-curl \
::security/py-paramiko \
::textproc/gdiff
 
Index: ./devel/iso-codes/Makefile
===
RCS file: /cvs/ports/devel/iso-codes/Makefile,v
retrieving revision 1.12
diff -u -p -r1.12 Makefile
--- ./devel/iso-codes/Makefile  9 Nov 2008 19:11:56 -   1.12
+++ ./devel/iso-codes/Makefile  26 Dec 2008 23:38:33 -
@@ -3,6 +3,7 @@
 COMMENT=   lists of the country, language and currency iso names
 
 DISTNAME=  iso-codes-3.3
+PKGNAME=   ${DISTNAME}p0
 
 CATEGORIES=devel
 
@@ -21,8 +22,7 @@ CONFIGURE_STYLE=gnu
 MODULES=   lang/python
 MODPY_RUNDEP=  No
 
-BUILD_DEPENDS= ::devel/gettext \
-   
:python-expat-${MODPY_VERSION}*:lang/python/${MODPY_VERSION},-expat
+BUILD_DEPENDS= ::devel/gettext
 
 FAKE_FLAGS=pkgconfigdir=${PREFIX}/lib/pkgconfig
 
Index: ./devel/mercurial/Makefile
===
RCS file: /cvs/ports/devel/mercurial/Makefile,v
retrieving revision 1.13
diff -u -p -r1.13 Makefile
--- ./devel/mercurial/Makefile  24 Aug 2008 11:24:24 -  1.13
+++ ./devel/mercurial/Makefile  26 Dec 2008 23:38:33 -
@@ -4,6 +4,7 @@ COMMENT=fast, lightweight source contr
 
 MODPY_EGG_VERSION= 1.0.2
 DISTNAME=  mercurial-${MODPY_EGG_VERSION}
+PKGNAME=   ${DISTNAME}p0
 CATEGORIES=devel
 HOMEPAGE=  http://www.selenic.com/mercurial/
 
@@ -19,8 +20,7 @@ MASTER_SITES= http://www.selenic.com/me
 
 MODULES=   lang/python
 
-REGRESS_DEPENDS=   :python-bz2-*:lang/python/${MODPY_VERSION},-bz2 \
-   ::archivers/unzip
+REGRESS_DEPENDS=   ::archivers/unzip
 
 FILES= hgeditor hgweb.cgi hgwebdir.cgi
 
Index: ./devel/py-twisted/core/Makefile
===
RCS file: /cvs/ports/devel/py-twisted/core/Makefile,v
retrieving revision 1.11
diff 

Re: Get rid of warnings when YP is configured

2008-12-26 Thread Ingo Schwarze
Hello Nikolay,

thanks for having a look.

Nikolay Sturm wrote on Fri, Dec 26, 2008 at 09:37:16AM +0100:

 We have two ports explicitly allowing binding to 0.0.0.0:0,
 devel/mico and x11/gnustep/base.

I first looked at devel/mico.

 How do these cope with your proposed change?
 Does denying bind(2) as suggested
 and removing their local filter break them?

Yes, removing the local filter breaks the mico build.
The mico idl insists on listening.

Full failing build log:
  http://www.studis.de/Software/mico-2.3.6p3-fail.log

If i understand correctly, local systrace.filter files override
the global systrace.filter in infrastructure/db.
Thus, if you apply my patch to infrastructure/db/systrace.filter,
but just leave devel/mico/systrace.filter as it is,
you can build mico as usual.

Full succeeding build log:
  http://www.studis.de/Software/mico-2.3.6p3-ok.log

Tested on i386 and sparc64 -current.
NB: It builds, installs and uninstalls;
i have no idea what to do with CORBA, i.e. how to run it.
(Uh, building mico _does_ take some time.)

The same *should* hold for x11/gnustep/base: The local filter
overrides my patch, so my patch should change nothing in this case.
On the other hand, *if* a port build needs bind(inet-[0.0.0.0]:0),
but it has no local filter, it will crash anyway; my patch just
disables the systrace log message explaining the crash and leaves
you with whatever the particular application prints as a reaction
to the failing bind.

Anyway, i just started building x11/gnustep/base,
just to make really sure.

Yours,
  Ingo



In case you are interested, here are the details of my analysis:

In a first phase, the miro build process builds some libraries,
then some programs, in particular the Interface Definition
Language (idl) compiler.  After that, it starts a second phase,
building more libraries.  This second phase already uses the
newly built idl compiler.

For example, the first thing built in the second phase
are the files CosNaming.h, CosNaming.cc and CosNaming_skel.cc,
built with the following commands:

  schwa...@athene $ pwd
  /usr/ports/devel/mico/w-mico-2.3.6p3/mico/coss/naming
  schwa...@athene $ export LD_LIBRARY_PATH=../../orb:../../ir
  schwa...@athene $ export PATH=../../cpp:/bin:/sbin:/usr/bin:/usr/sbin
  schwa...@athene $ export PATH=$PATH:/usr/local/bin:/usr/local/sbin
  schwa...@athene $ ../../idl/idl --c++-skel --name CosNaming \ 
   ../../include/mico/CosNaming.idl
  schwa...@athene $ ll CosNaming*
  -rw-r--r--  1 schwarze  wsrc  67246 Dec 26 22:16 CosNaming.cc
  -rw-r--r--  1 schwarze  wsrc  22129 Dec 26 22:16 CosNaming.h
  -rw-r--r--  1 schwarze  wsrc  22498 Dec 26 22:16 CosNaming_skel.cc

But if we enforce the systrace.policy in question,

  native-bind: sockaddr eq inet-[0.0.0.0]:0 then deny[eacces]

the idl compiler fails like this:

  schwa...@athene $ /bin/systrace -e -i -a -f ../../../systrace.policy \ 
   /bin/sh -c  \   
   ../../idl/idl --c++-skel --name CosNaming \  
   ../../include/mico/CosNaming.idl \   
   
  ../../include/mico/CosNaming.idl:101: internal error
  IDL:omg.org/CORBA/OBJECT_NOT_EXIST:1.0 (0, not-completed)

Let's have a closer look:

  schwa...@athene $ gdb ../../idl/idl
  GNU gdb 6.3
  [...]
  This GDB was configured as i386-unknown-openbsd4.4...
  (gdb) break bind
  Function bind not defined.
  Make breakpoint pending on future shared library load? (y or [n]) y
  Breakpoint 1 (bind) pending.
  (gdb) run --c++-skel --name CosNaming ../../include/mico/CosNaming.idl
  Starting program: /usr/ports/devel/mico/w-mico-2.3.6p3/mico/idl/idl \
--c++-skel --name CosNaming ../../include/mico/CosNaming.idl
  Breakpoint 2 at 0xbb44512
  Pending breakpoint bind resolved
  Breakpoint 2, 0x0bb44512 in bind () from /usr/lib/libc.so.50.0
  (gdb) where
  #0  0x0bb44512 in bind () from /usr/lib/libc.so.50.0
  #1  0x0c12c90d in MICO::TCPTransportServer::bind ()
 from ../../orb/libmico2.3.6.so.3.0
  #2  0x0c13f8ab in MICO::IIOPServer::listen ()
 from ../../orb/libmico2.3.6.so.3.0
  #3  0x0c13fd87 in MICO::IIOPServer::listen ()
 from ../../orb/libmico2.3.6.so.3.0
  #4  0x0c116279 in CORBA::ORB_init () from ../../orb/libmico2.3.6.so.3.0
  #5  0x1c00a6c4 in main ()

As far as i understand, the point is the following.
Each CORBA application is inherently a network application
and wants to listen - already during initialization.
Now, the idl compiler itself is a CORBA application.

If i understand correctly, just letting these beasts listen
as much as they like is the way to go.  Hopefully, nobody will
be talking to them during bulk builds, anyway.



Re: Get rid of warnings when YP is configured

2008-12-26 Thread Ingo Schwarze
Hi Nikolay, Sebastian, Antoine,

[ Cc:ing the secret maintainers ;-]

Nikolay Sturm wrote on Fri, Dec 26, 2008 at 09:37:16AM +0100:
 * Ingo Schwarze [2008-12-26]:

 I'm not really sure the patch is correct and doesn't break anything
 else - though i currently don't see why any port build should be
 allowed to bind(2) inet(4) sockets.

 We have two ports explicitly allowing binding to 0.0.0.0:0, devel/mico
 and x11/gnustep/base. How do these cope with your proposed change? Does
 denying bind(2) as suggested and removing their local filter break them?

Regarding devel/mico, see my last mail.

Regarding x11/gnustep/base, there have been many updates since
the systrace.filter was created in the ports tree.
I suspect the systrace.filter is no more needed now
and can simply be deleted?

At least on i386-current, x11/gnustep/base builds, installs and
uninstalls cleanly for me, even when i just remove systrace.filter.

Should i also try on sparc64?
There is no indication in the comment in systrace.filter
this has ever been platform dependent.

Comparing the buildlogs with and without systrace.filter
shows that they are exactly identical, see
  http://www.studis.de/Software/gnustep-base-1.18.0.log

Again, i did not test _running_ the software, no idea what
to do with that kind of stuff...  :)

Yours,
  Ingo



Re: RELIABILITY: www/nginx-0.6.34 - p0

2008-12-26 Thread Darrin Chandler
This is not a large diff, but it stops a DoS that is trivial to execute.
If someone can have a look at this I'd appreciate it.

On Thu, Dec 25, 2008 at 10:31:39AM -0700, Darrin Chandler wrote:
 This is a reliability fix from nginx author Igor Sysoev:
 
 Recently it was discovered that nginx workers exit abnormally if they
 receive Expect header on all systems except FreeBSD, Linux, and
 Solaris.
 
 Working in production on amd64. Light testing went fine on sparc64.
 
 Please commit.
 
 
 Index: Makefile
 ===
 RCS file: /cvs/ports/www/nginx/Makefile,v
 retrieving revision 1.10
 diff -u -p -r1.10 Makefile
 --- Makefile  7 Dec 2008 20:08:55 -   1.10
 +++ Makefile  25 Dec 2008 17:08:52 -
 @@ -3,6 +3,7 @@
  COMMENT= robust and small HTTP server and mail proxy server
  
  DISTNAME=nginx-0.6.34
 +PKGNAME= ${DISTNAME}p0
  CATEGORIES=  www
  
  HOMEPAGE=http://nginx.net/
 Index: patches/patch-src_os_unix_ngx_posix_init_c
 ===
 RCS file: patches/patch-src_os_unix_ngx_posix_init_c
 diff -N patches/patch-src_os_unix_ngx_posix_init_c
 --- /dev/null 1 Jan 1970 00:00:00 -
 +++ patches/patch-src_os_unix_ngx_posix_init_c25 Dec 2008 17:08:52 
 -
 @@ -0,0 +1,12 @@
 +$OpenBSD$
 +--- src/os/unix/ngx_posix_init.c.origMon Dec  3 09:46:46 2007
  src/os/unix/ngx_posix_init.c Thu Dec 25 09:57:05 2008
 +@@ -22,7 +22,7 @@ ngx_os_io_t ngx_os_io = {
 + ngx_unix_recv,
 + ngx_readv_chain,
 + ngx_udp_unix_recv,
 +-NULL,
 ++ngx_unix_send,
 + ngx_writev_chain,
 + 0
 + };
 
 
 -- 
 Darrin Chandler|  Phoenix BSD User Group  |  MetaBUG
 dwchand...@stilyagin.com   |  http://phxbug.org/  |  http://metabug.org/
 http://www.stilyagin.com/  |  Daemons in the Desert   |  Global BUG Federation



-- 
Darrin Chandler|  Phoenix BSD User Group  |  MetaBUG
dwchand...@stilyagin.com   |  http://phxbug.org/  |  http://metabug.org/
http://www.stilyagin.com/  |  Daemons in the Desert   |  Global BUG Federation


pgpBHUKpENoYc.pgp
Description: PGP signature


Re: RELIABILITY: www/nginx-0.6.34 - p0

2008-12-26 Thread Darrin Chandler
Ok, I seemed to have missed the commit by steven.

Thanks!

On Fri, Dec 26, 2008 at 07:32:42PM -0700, Darrin Chandler wrote:
 This is not a large diff, but it stops a DoS that is trivial to execute.
 If someone can have a look at this I'd appreciate it.


-- 
Darrin Chandler|  Phoenix BSD User Group  |  MetaBUG
dwchand...@stilyagin.com   |  http://phxbug.org/  |  http://metabug.org/
http://www.stilyagin.com/  |  Daemons in the Desert   |  Global BUG Federation


pgpusUWF7NVOV.pgp
Description: PGP signature


sndio for libcanberra

2008-12-26 Thread Jacob Meuser

lightly tested with canberra-gtk-play.  my preferred wm
doesn't do event sounds.

rant
it took at least as long to work out the autohell crap as it
did to do the rest, including testing.  an explicit
--disable-gtk-doc in CONFIGURE_ARGS would have saved me quite
some time.
/rant

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org

Index: Makefile
===
RCS file: /home2/cvs/OpenBSD/ports/audio/libcanberra/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- Makefile14 Dec 2008 15:10:15 -  1.4
+++ Makefile27 Dec 2008 03:03:21 -
@@ -3,7 +3,7 @@
 COMMENT=   implementation of the Freedesktop sound theme spec.
 
 DISTNAME=  libcanberra-0.10
-PKGNAME=   ${DISTNAME}p1
+PKGNAME=   ${DISTNAME}p2
 SHARED_LIBS +=  canberra 0.1  # .1.3
 SHARED_LIBS +=  canberra-gtk 0.0  # .0.4
 CATEGORIES=audio devel
@@ -22,11 +22,15 @@
Xi Xinerama Xrandr Xrender atk-1.0 c cairo expat fontconfig \
freetype gio-2.0 glib-2.0 glitz gmodule-2.0 gobject-2.0 \
gthread-2.0 m ogg pango-1.0 pangocairo-1.0 pangoft2-1.0 \
-   pcre pixman-1 png pthread xml2 z
+   pcre pixman-1 png pthread sndio xml2 z
 
 MODULES=   devel/gettext
 
-BUILD_DEPENDS= ${RUN_DEPENDS}
+AUTOCONF_VERSION=  2.62
+AUTOMAKE_VERSION=  1.9
+BUILD_DEPENDS= ${RUN_DEPENDS} \
+   ${MODGNU_AUTOCONF_DEPENDS} \
+   ${MODGNU_AUTOMAKE_DEPENDS}
 RUN_DEPENDS=   ::devel/gconf2
 LIB_DEPENDS=   vorbis,vorbisfile::audio/libvorbis \
ltdl::devel/libtool,-ltdl \
@@ -41,12 +45,24 @@
 CONFIGURE_ARGS+=   
--with-gconf-schema-file-dir=${LOCALBASE}/share/schemas/libcanberra \
--disable-schemas-install \
--localstatedir=/var \
+   --enable-sndio \
--enable-gstreamer \
-   --enable-oss \
+   --disable-oss \
--disable-alsa \
--disable-pulse \
--disable-tdb
 CONFIGURE_ENV+= LDFLAGS=-L${LOCALBASE}/lib \
 CPPFLAGS=-I${LOCALBASE}/include
+
+post-patch:
+   cp ${FILESDIR}/sndio.c ${WRKSRC}/src
+   cd ${WRKSRC}  env AUTOCONF_VERSION=${AUTOCONF_VERSION} \
+   AUTOMAKE_VERSION=${AUTOMAKE_VERSION} aclocal -I m4
+   cd ${WRKSRC}  env AUTOCONF_VERSION=${AUTOCONF_VERSION} \
+   AUTOMAKE_VERSION=${AUTOMAKE_VERSION} autoconf
+   cd ${WRKSRC}  env AUTOCONF_VERSION=${AUTOCONF_VERSION} \
+   AUTOMAKE_VERSION=${AUTOMAKE_VERSION} autoheader
+   cd ${WRKSRC}  env AUTOCONF_VERSION=${AUTOCONF_VERSION} \
+   AUTOMAKE_VERSION=${AUTOMAKE_VERSION} automake
 
 .include bsd.port.mk
Index: files/sndio.c
===
RCS file: files/sndio.c
diff -N files/sndio.c
--- /dev/null   1 Jan 1970 00:00:00 -
+++ files/sndio.c   27 Dec 2008 03:03:21 -
@@ -0,0 +1,460 @@
+/*
+ * Copyright (c) 2008 Jacob Meuser jake...@sdf.lonestar.org
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED AS IS AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include config.h
+#endif
+
+#include sndio.h
+#include math.h
+#include unistd.h
+
+#include stdlib.h
+#include poll.h
+#include pthread.h
+#include semaphore.h
+
+#include canberra.h
+#include common.h
+#include driver.h
+#include llist.h
+#include read-sound-file.h
+#include sound-theme-spec.h
+#include malloc.h
+
+#define BUFSIZE (4*1024)
+
+struct private;
+
+struct outstanding {
+CA_LLIST_FIELDS(struct outstanding);
+ca_bool_t dead;
+uint32_t id;
+ca_finish_callback_t callback;
+void *userdata;
+ca_sound_file *file;
+struct sio_hdl *hdl;
+struct sio_par par;
+int pipe_fd[2];
+ca_context *context;
+};
+
+struct private {
+ca_theme_data *theme;
+ca_mutex *outstanding_mutex;
+ca_bool_t signal_semaphore;
+sem_t semaphore;
+ca_bool_t semaphore_allocated;
+CA_LLIST_HEAD(struct outstanding, outstanding);
+};
+
+#define PRIVATE(c) 

PATCH: libsndio for audio/timidity

2008-12-26 Thread IWATA Ray
Hi,

This patch adds libsndio to audio/timidity.
libsndio is assigned sound output option to '-Os' and set default
output.

Thanks.

diff -aruN timidity/Makefile timidity-libsndio/Makefile
--- timidity/Makefile   Thu Nov 22 21:52:34 2007
+++ timidity-libsndio/Makefile  Sat Dec 27 11:51:59 2008
@@ -20,12 +20,15 @@
 PERMIT_DISTFILES_CDROM= copyrighted patches
 PERMIT_DISTFILES_FTP=   copyrighted patches
 
-WANTLIB=   c m ncurses 
+WANTLIB=   c m ncurses sndio
 
-CONFIGURE_STYLE=gnu
+CONFIGURE_STYLE=autoconf gnu
+AUTOCONF_VERSION = 2.59
+AUTOMAKE_VERSION = 1.9
 CONFIGURE_ENV+=CFLAGS=-I${LOCALBASE}/include \
LDFLAGS=-L${LOCALBASE}/lib
-CONFIGURE_ARGS= --enable-audio=sun \
+CONFIGURE_ARGS= --enable-audio=libsndio,sun \
+   --with-default-output=libsndio \
--enable-vt100 \
--enable-ncurses \
--enable-server \
@@ -61,6 +64,17 @@
 WRKDIST=   ${WRKDIR}
 WRKSRC=${WRKDIR}/${DISTNAME}
 DATA_DIRS= gsdrum00 gsdrum08 gsdrum40
+
+post-patch:
+   cp ${FILESDIR}/sndio_a.c \
+   ${WRKSRC}/timidity/sndio_a.c
+   cd ${WRKSRC}; AUTOCONF_VERSION=${AUTOCONF_VERSION} \
+   AUTOMAKE_VERSION=${AUTOMAKE_VERSION} aclocal -I autoconf
+
+pre-configure:
+   cd ${WRKSRC}; AUTOCONF_VERSION=${AUTOCONF_VERSION} \
+   AUTOMAKE_VERSION=${AUTOMAKE_VERSION} automake \
+   --foreign --add-missing --copy
 
 post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/timidity/goemon
diff -aruN timidity/files/sndio_a.c timidity-libsndio/files/sndio_a.c
--- timidity/files/sndio_a.cThu Jan  1 09:00:00 1970
+++ timidity-libsndio/files/sndio_a.c   Sat Dec 27 11:20:40 2008
@@ -0,0 +1,124 @@
+/*
+TiMidity++ -- MIDI to WAVE converter and player
+Copyright (C) 1999-2002 Masanao Izumo m...@goice.co.jp
+Copyright (C) 1995 Tuukka Toivonen t...@cgs.fi
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+sndio_a.c
+   Written by Iwata ira...@gmail.com
+*/
+
+#ifdef HAVE_CONFIG_H
+#include config.h
+#endif /* HAVE_CONFIG_H */
+#include sndio.h
+
+#include timidity.h
+#include output.h
+#include controls.h
+#include timer.h
+#include instrum.h
+#include playmidi.h
+#include miditrace.h
+
+static int open_output(void); /* 0=success, 1=warning, -1=fatal error */
+static void close_output(void);
+static int output_data(char *buf, int32 nbytes);
+static int acntl(int request, void *arg);
+
+/* export the playback mode */
+
+#define dpm sndio_play_mode
+
+PlayMode dpm = {
+  DEFAULT_RATE, PE_SIGNED|PE_16BIT, PF_PCM_STREAM,
+  -1,
+  {0}, /* default: get all the buffer fragments you can */
+  Libsndio mode, 's',
+  NULL,
+  open_output,
+  close_output,
+  output_data,
+  acntl
+};
+
+static struct sio_hdl *sndio_ctx;
+
+static int open_output(void)
+{
+  static struct sio_par par;
+
+  sndio_ctx = sio_open(NULL, SIO_PLAY, 0);
+  if (sndio_ctx == NULL) {
+ctl-cmsg(CMSG_ERROR, VERB_NORMAL, %s: %s,
+ dpm.name, strerror(errno));
+return -1;
+  }
+
+  sio_initpar(par);
+
+  par.sig = 1;
+  par.pchan = (dpm.encoding  PE_MONO) ? 1 : 2;
+  par.le = SIO_LE_NATIVE;
+  par.rate = dpm.rate;
+  par.bits = (dpm.encoding  PE_24BIT) ? 24 : 0;
+  par.bits = (dpm.encoding  PE_16BIT) ? 16 : 0;
+
+  if (par.bits == 0)
+par.bits = 8;
+
+  if (!sio_setpar(sndio_ctx, par)) {
+ctl-cmsg(CMSG_ERROR, VERB_NORMAL, %s: %s,
+ dpm.name, strerror(errno));
+return -1;
+  }
+
+  if (!sio_start(sndio_ctx)) {
+ctl-cmsg(CMSG_ERROR, VERB_NORMAL, %s: %s,
+ dpm.name, strerror(errno));
+return -1;
+  }
+  return 0;
+}
+
+static int output_data(char *buf, int32 nbytes)
+{
+  if (!sio_write(sndio_ctx, buf, nbytes)) {
+ctl-cmsg(CMSG_WARNING, VERB_VERBOSE, %s: %s,
+ dpm.name, strerror(errno));
+return -1;
+  }
+  return 0;
+}
+
+static void close_output(void)
+{
+  if (sndio_ctx != NULL) {
+sio_close(sndio_ctx);
+sndio_ctx = NULL;
+  }
+}
+
+static int acntl(int request, void *arg)
+{
+  switch(request) {
+  case PM_REQ_DISCARD:
+  case PM_REQ_PLAY_START: /* Called just before playing */
+  case PM_REQ_PLAY_END: /* Called just after playing */
+return 0;
+  }
+  return -1;
+}
diff -aruN 

Re: PATCH: libsndio for audio/timidity

2008-12-26 Thread Jacob Meuser
On Sat, Dec 27, 2008 at 01:49:51PM +0900, IWATA Ray wrote:
 Hi,
 
 This patch adds libsndio to audio/timidity.
 libsndio is assigned sound output option to '-Os' and set default
 output.
 
 Thanks.

thank you :)

 diff -aruN timidity/files/sndio_a.c timidity-libsndio/files/sndio_a.c
 --- timidity/files/sndio_a.c  Thu Jan  1 09:00:00 1970
 +++ timidity-libsndio/files/sndio_a.c Sat Dec 27 11:20:40 2008
 @@ -0,0 +1,124 @@
 +/*
 +TiMidity++ -- MIDI to WAVE converter and player
 +Copyright (C) 1999-2002 Masanao Izumo m...@goice.co.jp
 +Copyright (C) 1995 Tuukka Toivonen t...@cgs.fi

 +sndio_a.c
 + Written by Iwata ira...@gmail.com

upstream may require that license for inclusion, but as long as it's
distributed in the ports tree, it's best to use ISC license and assert
your own copyright.

 +  sndio_ctx = sio_open(NULL, SIO_PLAY, 0);
 +  if (sndio_ctx == NULL) {
 +ctl-cmsg(CMSG_ERROR, VERB_NORMAL, %s: %s,
 +   dpm.name, strerror(errno));
 +return -1;
 +  }

you can't really rely on sio_* to set errno.

 +static int acntl(int request, void *arg)
 +{
 +  switch(request) {
 +  case PM_REQ_DISCARD:
 +  case PM_REQ_PLAY_START: /* Called just before playing */
 +  case PM_REQ_PLAY_END: /* Called just after playing */
 +return 0;
 +  }

might it be better to use sio_start/sio_stop here?  I don't know,
just thinking aloud.

it's also good style to use sio_getpar and check that the parameters
that were asked for are the parameters that got set.

the rest looks good.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: update: audio/audacity

2008-12-26 Thread Jacob Meuser
On Sat, Nov 29, 2008 at 10:35:45PM +, Jacob Meuser wrote:
 
 update to 1.3.6.  bug fixes and new features.  see $HOMEPAGE for
 details.  ffmpeg support doesn't work in spite of my attempts;
 patches left in but disabled via configure.
 
 works for me but my ports/packages are not fully up-to-date.  I'm
 using the latest i386/amd64 snapshot packages.

no one uses audacity?

 -- 
 jake...@sdf.lonestar.org
 SDF Public Access UNIX System - http://sdf.lonestar.org
 
 Index: Makefile
 ===
 RCS file: /home2/cvs/OpenBSD/ports/audio/audacity/Makefile,v
 retrieving revision 1.18
 diff -u -r1.18 Makefile
 --- Makefile  24 Mar 2008 05:31:48 -  1.18
 +++ Makefile  29 Nov 2008 22:27:48 -
 @@ -2,9 +2,9 @@
  
  COMMENT= free audio editor
  
 -V=   1.3.4
 +V=   1.3.6
  DISTNAME=audacity-src-${V}
 -PKGNAME= audacity-${V}p3
 +PKGNAME= audacity-${V}
  CATEGORIES=  audio
  
  EXTRACT_SUFX=.tar.bz2
 @@ -21,7 +21,7 @@
  PERMIT_DISTFILES_CDROM= Yes
  PERMIT_DISTFILES_FTP=   Yes
  
 -WANTLIB= c m ossaudio pthread stdc++ ogg expat sndfile glib-2.0 \
 +WANTLIB= c m pthread stdc++ ogg expat sndfile glib-2.0 \
   gobject-2.0 gtk-x11-2.0
  
  BUILD_DEPENDS=   ::archivers/zip
 @@ -32,7 +32,8 @@
   id3tag.=2::audio/libid3tag \
   mad.=2::audio/libmad \
   portaudio::audio/portaudio-svn \
 - SoundTouch::audio/soundtouch
 + SoundTouch::audio/soundtouch \
 + vamp-hostsdk::audio/vamp-plugin-sdk
  RUN_DEPENDS= :desktop-file-utils-*:devel/desktop-file-utils \
   :shared-mime-info-*:misc/shared-mime-info
  
 @@ -40,32 +41,41 @@
  USE_GMAKE=   Yes
  USE_LIBTOOL= Yes
  
 -WRKDIST= ${WRKDIR}/${DISTNAME}-beta
 -
  CONFIGURE_STYLE= gnu
  CONFIGURE_ENV=   CPPFLAGS=-I${X11BASE}/include 
 -I${LOCALBASE}/include \
   CFLAGS=-I${X11BASE}/include -I${LOCALBASE}/include \
 - LDFLAGS=-L${X11BASE}/lib -L${LOCALBASE}/lib
 + LDFLAGS=-L${X11BASE}/lib -L${LOCALBASE}/lib \
 + gl_cv_cc_visibility=no
 +
 +MODGNU_CONFIG_GUESS_DIRS= ${WRKSRC} \
 + ${WRKSRC}/lib-src/lib-widget-extra \
 + ${WRKSRC}/lib-src/portsmf \
 + ${WRKSRC}/lib-src/FileDialog \
 + ${WRKSRC}/lib-src/portmixer
  
  CONFIGURE_ARGS=  ${CONFIGURE_SHARED} \
   --enable-unicode \
 - --enable-vamp \
   --enable-ladspa \
 - --with-id3=system \
 - --with-vorbis=system \
 - --with-libflac=system \
 - --with-libmad=system \
 + --enable-nyquist \
 + --with-lib-preferences=system \
   --with-libsndfile=system \
 - --with-libsamplerate=system \
   --with-expat=system \
 - --with-soundtouch=system \
 + --with-libsamplerate=system \
   --without-libresample \
 + --with-libvorbis=system \
 + --with-libmad=system \
 + --with-libflac=system \
 + --with-libid3tag=system \
 + --with-soundtouch=system \
 + --with-libvamp=system \
   --without-libtwolame \
 - --with-nyquist=local \
 - --with-portmixer \
 - --with-portaudio=v19 \
 - --with-pa-include=${LOCALBASE}/include \
 - --with-help
 + --without-ffmpeg \
 + --without-redland \
 + --without-slv2 \
 + --without-liblrdf \
 + --with-midi=local \
 + --with-portmixer=local \
 + --with-portaudio=system
  
  MAKE_FLAGS=  CC=${CC}
  
 @@ -74,16 +84,15 @@
  # the ongoing development, there's no point in running them 
  NO_REGRESS=  Yes
  
 -pre-configure:
 - @perl -pi -e 's,!!LOCALBASE!!,${LOCALBASE},g' \
 - ${WRKSRC}/src/export/ExportMP3.cpp
 - @perl -pi -e 's,!!CXXFLAGS!!,${CXXFLAGS},g' \
 - ${WRKSRC}/lib-src/libvamp/Makefile.in \
 - ${WRKSRC}/lib-src/allegro/Makefile.in
 -
  post-install:
   ${INSTALL_DATA_DIR} ${PREFIX}/share/pixmaps
   ${INSTALL_DATA} ${WRKSRC}/images/AudacityLogo.xpm \
   ${PREFIX}/share/pixmaps/audacity.xpm
 + ${INSTALL_DATA_DIR} ${PREFIX}/share/applications
 + ${INSTALL_DATA} ${WRKSRC}/src/audacity.desktop \
 + ${PREFIX}/share/applications/
 + ${INSTALL_DATA_DIR} ${PREFIX}/share/mime/packages
 + ${INSTALL_DATA} ${WRKSRC}/src/audacity.xml \
 +  

Re: PATCH: libsndio for audio/timidity

2008-12-26 Thread Iwata
Hi,

Jacob Meuser jake...@sdf.lonestar.org writes:

 upstream may require that license for inclusion, but as long as it's
 distributed in the ports tree, it's best to use ISC license and assert
 your own copyright.

OK, changed.

 +  sndio_ctx = sio_open(NULL, SIO_PLAY, 0);
 +  if (sndio_ctx == NULL) {
 +ctl-cmsg(CMSG_ERROR, VERB_NORMAL, %s: %s,
 +  dpm.name, strerror(errno));
 +return -1;
 +  }

 you can't really rely on sio_* to set errno.

Oops!

 +static int acntl(int request, void *arg)
 +{
 +  switch(request) {
 +  case PM_REQ_DISCARD:
 +  case PM_REQ_PLAY_START: /* Called just before playing */
 +  case PM_REQ_PLAY_END: /* Called just after playing */
 +return 0;
 +  }

 might it be better to use sio_start/sio_stop here?  I don't know,
 just thinking aloud.

Output function does not send messge when changing to stop state.
It stops to calling output_data(), merely.

Don't worry about to treat PM_REQ_START/END, because output_data() is
atomic.

 it's also good style to use sio_getpar and check that the parameters
 that were asked for are the parameters that got set.

Is it ok that calling sio_getpar() after sio_setpar()?
Or should be strict checking like devel/sdl?

Thanks,

rewritten version of files/sndio_a.c here,

/*
 * Copyright (c) 2008 IWATA Ray iw...@quasiquote.org
 *
 * Permission to use, copy, modify, and distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
 * THE SOFTWARE IS PROVIDED AS IS AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 */

#ifdef HAVE_CONFIG_H
#include config.h
#endif /* HAVE_CONFIG_H */
#include sndio.h

#include timidity.h
#include output.h
#include controls.h
#include timer.h
#include instrum.h
#include playmidi.h
#include miditrace.h

static int open_output(void); /* 0=success, 1=warning, -1=fatal error */
static void close_output(void);
static int output_data(char *buf, int32 nbytes);
static int acntl(int request, void *arg);

/* export the playback mode */

#define dpm sndio_play_mode

PlayMode dpm = {
  DEFAULT_RATE, PE_SIGNED|PE_16BIT, PF_PCM_STREAM,
  -1,
  {0}, /* default: get all the buffer fragments you can */
  libsndio mode, 's',
  NULL,
  open_output,
  close_output,
  output_data,
  acntl
};

static struct sio_hdl *sndio_ctx;

static int open_output(void)
{
  static struct sio_par par;

  sndio_ctx = sio_open(NULL, SIO_PLAY, 0);
  if (sndio_ctx == NULL) {
ctl-cmsg(CMSG_ERROR, VERB_NORMAL, sio_open() failed);
return -1;
  }

  sio_initpar(par);

  par.sig = 1;
  par.pchan = (dpm.encoding  PE_MONO) ? 1 : 2;
  par.le = SIO_LE_NATIVE;
  par.rate = dpm.rate;
  par.bits = (dpm.encoding  PE_24BIT) ? 24 : 0;
  par.bits = (dpm.encoding  PE_16BIT) ? 16 : 0;

  if (par.bits == 0)
par.bits = 8;

  if (!sio_setpar(sndio_ctx, par)) {
ctl-cmsg(CMSG_ERROR, VERB_NORMAL, sio_setpar() failed);
return -1;
  }

  if (sio_getpar(sndio_ctx, par) == 0) {
ctl-cmsg(CMSG_ERROR, VERB_NORMAL, sio_getpar() failed);
return -1;
  }

  if (!sio_start(sndio_ctx)) {
ctl-cmsg(CMSG_ERROR, VERB_NORMAL, sio_start() failed);
return -1;
  }
  return 0;
}

static int output_data(char *buf, int32 nbytes)
{
  if (!sio_write(sndio_ctx, buf, nbytes)) {
ctl-cmsg(CMSG_WARNING, VERB_VERBOSE, sio_write() failed);
return -1;
  }
  return 0;
}

static void close_output(void)
{
  if (sndio_ctx != NULL) {
sio_close(sndio_ctx);
sndio_ctx = NULL;
  }
}

static int acntl(int request, void *arg)
{
  switch(request) {
  case PM_REQ_DISCARD:
  case PM_REQ_PLAY_START: /* Called just before playing */
  case PM_REQ_PLAY_END:   /* Called just after playing */
return 0;
  }
  return -1;
}