switch lame to multi packages, avoiding some long standing headaches with

the normal vs. no_x11 flavors.  with input from espie@ and ajacoutot@
ok ajacoutot@ (maintainer).
This commit is contained in:
fgsch 2008-03-25 17:27:27 +00:00
parent 7b7a8e28ae
commit 5904118839
8 changed files with 47 additions and 21 deletions

View File

@ -1,12 +1,17 @@
# $OpenBSD: Makefile,v 1.35 2008/03/15 10:10:15 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.36 2008/03/25 17:27:27 fgsch Exp $
COMMENT= lame ain't an MP3 encoder
COMMENT-main= lame ain't an MP3 encoder
COMMENT-mp3x= gtk frame analyzer
DISTNAME= lame-3.97
CATEGORIES= audio
V= 3.97
DISTNAME= lame-${V}
PKGNAME-main= lame-${V}p0
PKGNAME-mp3x= lame-mp3x-${V}
SHARED_LIBS= mp3lame 1.0 # .0.1
CATEGORIES= audio
HOMEPAGE= http://lame.sourceforge.net/
MAINTAINER= Antoine Jacoutot <ajacoutot@openbsd.org>
@ -18,34 +23,50 @@ PERMIT_DISTFILES_CDROM= MP3 patent, http://mp3licensing.com/royalty/
PERMIT_DISTFILES_FTP= Yes
WANTLIB= c m ncurses
WANTLIB-main= ${WANTLIB}
WANTLIB-mp3x= ${WANTLIB} X11 Xau Xdmcp Xext Xi glib gmodule
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=lame/}
FLAVORS= no_x11
PSEUDO_FLAVORS= no_x11
FLAVOR?=
MULTI_PACKAGES= -main
.if !${FLAVOR:Mno_x11}
MULTI_PACKAGES+= -mp3x
.endif
.if ${MULTI_PACKAGES:M-mp3x}
MODULES= devel/gettext
.endif
LIB_DEPENDS-main=
RUN_DEPENDS-main=
LIB_DEPENDS-mp3x= ${MODGETTEXT_LIB_DEPENDS} \
gtk.>=1.2,gdk.>=1.2::x11/gtk+ \
mp3lame::audio/lame
RUN_DEPENDS-mp3x= ${MODGETTEXT_RUN_DEPENDS}
USE_GMAKE= Yes
USE_LIBTOOL= Yes
CONFIGURE_STYLE=gnu
CONFIGURE_ARGS= --enable-mp3rtp
MAKE_FLAGS= pkghtmldir=${TRUEPREFIX}/share/doc/lame
.if ${MULTI_PACKAGES:M-mp3x}
USE_X11= Yes
CONFIGURE_ARGS+= --enable-mp3x --with-gtk-prefix=${LOCALBASE}
.endif
.if ${MACHINE_ARCH} == "i386"
BUILD_DEPENDS= ::devel/nasm
BUILD_DEPENDS+= ::devel/nasm
CONFIGURE_ARGS+= --enable-nasm
.else
CONFIGURE_ARGS+= --disable-nasm
.endif
.if ${FLAVOR:L} != "no_x11"
USE_X11= Yes
CONFIGURE_ARGS+=--enable-mp3x \
--with-gtk-prefix=${LOCALBASE}
LIB_DEPENDS+= gtk.>=1.2,gdk.>=1.2::x11/gtk+
MODULES+= devel/gettext
WANTLIB+= X11 Xau Xdmcp Xext Xi glib gmodule
.endif
MAKE_FLAGS= pkghtmldir=${TRUEPREFIX}/share/doc/lame
.include <bsd.port.mk>

View File

@ -0,0 +1,4 @@
mp3x is an graphical frame analyzer for both MP3 and unencoded audio
files. It displays frame header information, original and decoded
pcm data, MDCT spectrum, distortion, allowable distortion and other
psycho-acoustic information.

View File

@ -1,2 +0,0 @@
@comment $OpenBSD: PFRAG.no-no_x11,v 1.4 2002/04/07 01:54:47 naddy Exp $
bin/mp3x

View File

@ -1,2 +0,0 @@
@comment $OpenBSD: PFRAG.shared,v 1.3 2005/12/23 15:03:07 espie Exp $
@lib lib/libmp3lame.so.${LIBmp3lame_VERSION}

View File

@ -0,0 +1,2 @@
@comment $OpenBSD: PFRAG.shared-main,v 1.1 2008/03/25 17:27:27 fgsch Exp $
@lib lib/libmp3lame.so.${LIBmp3lame_VERSION}

View File

@ -1,4 +1,6 @@
@comment $OpenBSD: PLIST,v 1.8 2004/08/05 03:28:12 espie Exp $
@comment $OpenBSD: PLIST-main,v 1.1 2008/03/25 17:27:27 fgsch Exp $
@pkgpath audio/lame
@pkgpath audio/lame,no_x11
bin/lame
bin/mp3rtp
include/lame/
@ -18,5 +20,4 @@ share/doc/lame/modes.html
share/doc/lame/node6.html
share/doc/lame/presets.html
share/doc/lame/switchs.html
!%%no_x11%%
%%SHARED%%

View File

@ -0,0 +1,2 @@
@comment $OpenBSD: PLIST-mp3x,v 1.1 2008/03/25 17:27:27 fgsch Exp $
bin/mp3x