From owner-freebsd-ports Tue Mar 20 7:40:23 2001 Delivered-To: freebsd-ports@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 77E3037B720 for ; Tue, 20 Mar 2001 07:40:01 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f2KFe1X58738; Tue, 20 Mar 2001 07:40:01 -0800 (PST) (envelope-from gnats) Received: from mail.inka.de (quechua.inka.de [212.227.14.2]) by hub.freebsd.org (Postfix) with ESMTP id 5B4CC37B71C for ; Tue, 20 Mar 2001 07:34:00 -0800 (PST) (envelope-from naddy@mips.inka.de) Received: from kemoauc.mips.inka.de (uucp@) by mail.inka.de with local-bsmtp id 14fO5a-0003eH-00; Tue, 20 Mar 2001 16:30:26 +0100 Received: (from naddy@localhost) by kemoauc.mips.inka.de (8.11.3/8.11.1) id f2KFMhi74624; Tue, 20 Mar 2001 16:22:43 +0100 (CET) (envelope-from naddy) Message-Id: <200103201522.f2KFMhi74624@kemoauc.mips.inka.de> Date: Tue, 20 Mar 2001 16:22:43 +0100 (CET) From: Christian Weisgerber Reply-To: naddy@mips.inka.de To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: ports/25942: audio/vorbis-tools cleanup and bugfix Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 25942 >Category: ports >Synopsis: audio/vorbis-tools cleanup and bugfix >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Tue Mar 20 07:40:01 PST 2001 >Closed-Date: >Last-Modified: >Originator: Christian Weisgerber >Release: FreeBSD 5.0-CURRENT alpha >Organization: >Environment: System: FreeBSD kemoauc.mips.inka.de 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Sun Mar 11 05:33:31 CET 2001 naddy@kemoauc.mips.inka.de:/home/obj/usr/src/sys/GENERIC alpha >Description: Theo van Klaveren asked me to take over maintainership of the Ogg Vorbis ports. The appended patch - changes MAINTAINER, - fixes a bug in shared memory handling where SYSVSHM segments wouldn't be destroyed on program exit, - prefers memory sharing by mmap() over SYSVSHM, - bumps PORTREVISION due to the fix above, - contains miscellaneous clean-ups and autoconf-related changes. >How-To-Repeat: >Fix: diff -uNr /usr/ports/audio/vorbis-tools/Makefile vorbis-tools/Makefile --- /usr/ports/audio/vorbis-tools/Makefile Sun Mar 4 13:43:31 2001 +++ vorbis-tools/Makefile Tue Mar 20 16:08:43 2001 @@ -7,36 +7,26 @@ PORTNAME= vorbis-tools PORTVERSION= 1.0b4 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= audio MASTER_SITES= http://www.vorbis.com/files/beta4/unix/ \ http://home.student.utwente.nl/t.vanklaveren/distfiles/ DISTNAME= ${PORTNAME}-${PORTVERSION:S/b/beta/} -MAINTAINER= t.vanklaveren@student.utwente.nl +MAINTAINER= naddy@mips.inka.de LIB_DEPENDS= ao.1:${PORTSDIR}/audio/libao \ ogg.1:${PORTSDIR}/audio/libogg \ vorbis.0:${PORTSDIR}/audio/libvorbis -GNU_CONFIGURE= yes -USE_GMAKE= yes +USE_AUTOCONF= yes USE_LIBTOOL= yes -CFLAGS+= -I${LOCALBASE}/include CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" LDFLAGS="-L${LOCALBASE}/lib" -CONFIGURE_ARGS= --with-ogg=${LOCALBASE} \ - --with-ao=${LOCALBASE} +CONFIGURE_ARGS= --with-ao=${LOCALBASE} \ + --with-ogg=${LOCALBASE} \ + --with-vorbis=${LOCALBASE} MAN1= ogg123.1 oggenc.1 - -#post-build: -# This is probably evil, and should be in a Makefile. -# cd ${WRKSRC}/oggenc && ${CC} ${CFLAGS} -c getopt1.c -# cd ${WRKSRC}/ogg123 && ${CC} ${CFLAGS} -c ogg123.c -I../oggenc -I${LOCALBASE}/include -# cd ${WRKSRC}/ogg123 && ${CC} ${LDFLAGS} -o ogg123 ogg123.o ../oggenc/getopt.o ../oggenc/getopt1.o -L${LOCALBASE}/lib -logg -lvorbis -lao -lvorbisfile -# -#post-install: -# ${INSTALL_PROGRAM} ${WRKSRC}/ogg123/ogg123 ${PREFIX}/bin/ -# ${INSTALL_MAN} ${WRKSRC}/ogg123/ogg123.1 ${PREFIX}/man/man1/ .include diff -uNr /usr/ports/audio/vorbis-tools/files/patch-aa vorbis-tools/files/patch-aa --- /usr/ports/audio/vorbis-tools/files/patch-aa Sun Mar 4 13:43:32 2001 +++ vorbis-tools/files/patch-aa Mon Mar 19 19:40:20 2001 @@ -1,11 +1,11 @@ ---- configure.old Tue Feb 27 14:55:50 2001 -+++ configure Tue Feb 27 14:55:57 2001 -@@ -1822,7 +1822,7 @@ - AO_LIBS="-L$ao_prefix/lib" - fi +--- configure.in.orig Mon Feb 26 06:51:00 2001 ++++ configure.in Sun Mar 18 23:21:51 2001 +@@ -67,7 +68,7 @@ dnl ------------------------------------ + dnl Check for library functions + dnl -------------------------------------------------- -- AO_LIBS="$AO_LIBS -lao -ldl" -+ AO_LIBS="$AO_LIBS -lao" +-dnl none ++AC_FUNC_SMMAP - echo $ac_n "checking for ao""... $ac_c" 1>&6 - echo "configure:1829: checking for ao" >&5 + dnl -------------------------------------------------- + dnl Work around FHS stupidity diff -uNr /usr/ports/audio/vorbis-tools/files/patch-ab vorbis-tools/files/patch-ab --- /usr/ports/audio/vorbis-tools/files/patch-ab Thu Mar 1 10:36:40 2001 +++ vorbis-tools/files/patch-ab Mon Mar 19 18:58:43 2001 @@ -1,14 +1,65 @@ ---- ogg123/buffer.c.orig Tue Feb 27 14:57:30 2001 -+++ ogg123/buffer.c Tue Feb 27 14:58:25 2001 -@@ -14,7 +14,11 @@ - #include +--- ogg123/buffer.c.orig Tue Jan 30 11:42:48 2001 ++++ ogg123/buffer.c Sat Mar 17 17:12:02 2001 +@@ -6,17 +6,16 @@ + */ - #ifndef DARWIN -+#ifdef __FreeBSD__ -+#include + #include ++#if HAVE_SMMAP ++#include +#else - #include + #include + #include +-#include +#endif - #endif + #include + #include /* for fork and pipe*/ + #include +-#ifndef DARWIN +-#include +-#endif +- #include "ogg123.h" + #include "buffer.h" + +@@ -73,10 +72,26 @@ buf_t *fork_writer (long size, devices_t + int childpid; + buf_t *buf; + ++#if HAVE_SMMAP ++ int fd; ++ ++ if ((fd = open("/dev/zero", O_RDWR)) < 0) ++ { ++ perror ("cannot open /dev/zero"); ++ exit (1); ++ } ++ if ((buf = (buf_t *) mmap (0, sizeof(buf_t) + sizeof (chunk_t) * (size - 1), ++ PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0)) < 0) ++ { ++ perror("mmap"); ++ exit(1); ++ } ++ close(fd); ++#else + /* Get the shared memory segment. */ + int shmid = shmget (IPC_PRIVATE, + sizeof(buf_t) + sizeof (chunk_t) * (size - 1), +- IPC_CREAT|S_IREAD|S_IWRITE); ++ IPC_CREAT|SHM_R|SHM_W); + + if (shmid == -1) + { +@@ -92,7 +107,11 @@ buf_t *fork_writer (long size, devices_t + perror ("shmat"); + exit (1); + } +- ++ ++ /* Remove segment after last process detaches it or terminates. */ ++ shmctl(shmid, IPC_RMID, 0); ++#endif /* HAVE_SMMAP */ ++ + buffer_init (buf, size); + + /* Create a pipe for communication between the two processes. Unlike diff -uNr /usr/ports/audio/vorbis-tools/files/patch-ae vorbis-tools/files/patch-ae --- /usr/ports/audio/vorbis-tools/files/patch-ae Thu Jan 1 01:00:00 1970 +++ vorbis-tools/files/patch-ae Mon Mar 19 18:55:46 2001 @@ -0,0 +1,80 @@ +--- aclocal.m4.orig Mon Feb 26 06:51:03 2001 ++++ aclocal.m4 Sat Mar 17 17:06:03 2001 +@@ -222,7 +222,7 @@ AC_ARG_ENABLE(aotest, [ --disable-aotes + AO_LIBS="-L$ao_prefix/lib" + fi + +- AO_LIBS="$AO_LIBS -lao -ldl" ++ AO_LIBS="$AO_LIBS -lao" + + AC_MSG_CHECKING(for ao) + no_ao="" +@@ -292,6 +292,68 @@ int main () + AC_SUBST(AO_LIBS) + rm -f conf.aotest + ]) ++ ++dnl Shamelessly stolen from Joerg Schilling's star. ++dnl Copyright 1998 J. Schilling ++ ++dnl Checks if mmap() works to get shared memory ++dnl Defines HAVE_SMMAP on success. ++AC_DEFUN(AC_FUNC_SMMAP, ++[AC_CACHE_CHECK([if mmap works to get shared memory], ac_cv_func_smmap, ++ [AC_TRY_RUN([ ++#include ++#include ++ ++char * ++mkshare() ++{ ++ int size = 8192; ++ int f; ++ char *addr; ++ ++ if ((f = open("/dev/zero", 2)) < 0) ++ exit(1); ++ addr = mmap(0, size, PROT_READ|PROT_WRITE, MAP_SHARED, f, 0); ++ if (addr == (char *)-1) ++ exit(1); ++ close(f); ++ ++ return (addr); ++} ++ ++main() ++{ ++ char *addr; ++ ++ addr = mkshare(8192); ++ *addr = 'I'; ++ ++ switch (fork()) { ++ ++ case -1: ++ printf("help\n"); exit(1); ++ ++ case 0: /* child */ ++ *addr = 'N'; ++ _exit(0); ++ break; ++ default: /* parent */ ++ wait(0); ++ sleep(1); ++ break; ++ } ++ ++ if (*addr != 'N') ++ exit(1); ++ exit(0); ++} ++], ++ [ac_cv_func_smmap=yes], ++ [ac_cv_func_smmap=no], ++ [ac_cv_func_smmap=no])]) ++if test $ac_cv_func_smmap = yes; then ++ AC_DEFINE(HAVE_SMMAP) ++fi]) + + # Do all the work for Automake. This macro actually does too much -- + # some checks are only needed if your package does certain things. diff -uNr /usr/ports/audio/vorbis-tools/files/patch-af vorbis-tools/files/patch-af --- /usr/ports/audio/vorbis-tools/files/patch-af Thu Jan 1 01:00:00 1970 +++ vorbis-tools/files/patch-af Mon Mar 19 19:30:34 2001 @@ -0,0 +1,10 @@ +--- ogg123/Makefile.am.orig Sat Mar 17 15:55:09 2001 ++++ ogg123/Makefile.am Sat Mar 17 15:55:13 2001 +@@ -5,7 +5,6 @@ AUTOMAKE_OPTIONS = foreign + bin_PROGRAMS = ogg123 + docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION) + doc_DATA = ogg123rc-example +-mandir = $(datadir)/man + man_MANS = ogg123.1 + + INCLUDES = @OGG_CFLAGS@ @VORBIS_CFLAGS@ @AO_CFLAGS@ diff -uNr /usr/ports/audio/vorbis-tools/pkg-descr vorbis-tools/pkg-descr --- /usr/ports/audio/vorbis-tools/pkg-descr Thu Nov 2 22:17:27 2000 +++ vorbis-tools/pkg-descr Tue Mar 20 15:05:39 2001 @@ -10,6 +10,3 @@ add comments to them. WWW: http://www.vorbis.com - -- Theo van Klaveren -t.vanklaveren@student.utwente.nl >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message