Add initial mpg123 1.0.0 base package.

This commit is contained in:
Blair Sadewitz 2007-12-26 17:27:06 +00:00 committed by Thomas Klausner
parent 40b9f79143
commit 4c56a60d32
7 changed files with 339 additions and 80 deletions

42
mpg123/Makefile.common Normal file
View file

@ -0,0 +1,42 @@
# $NetBSD: Makefile.common,v 1.1 2007/12/26 17:27:06 bsadewitz Exp $
#
DISTNAME= mpg123-1.0.0
PKGNAME?= ${DISTNAME:C/[[:alnum:]]*/&-${MPG123_MODULE}/}
CATEGORIES= audio
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=mpg123/}
EXTRACT_SUFX= .tar.bz2
MAINTAINER= bjs@NetBSD.org
HOMEPAGE= http://www.mpg123.org/
COMMENT?= Contains the ${MPG123_MODULE} module for mpg123
PKG_DESTDIR_SUPPORT= user-destdir
GNU_CONFIGURE?= yes
USE_LIBTOOL?= yes
USE_TOOLS+= pkg-config gmake
CONFIGURE_ARGS+= --enable-modules=yes
MPG123_SUBDIRS?= src
MPG123_SUBDIRS.src?= output
CONFIGURE_ENV+= BUILD_${MPG123_MODULE:tu}=yes
CONFIGURE_ENV+= MPG123_MODULE=${MPG123_MODULE:Q}
MAKE_ENV+= MPG123_SUBDIRS=${MPG123_SUBDIRS:Q}
MAKE_ENV+= MPG123_SUBDIRS.src=${MPG123_SUBDIRS.src:Q}
.if !defined(MPG123_BUILDING_BASE)
LIBS+= -lmpg123
BUILD_DIRS= src/output
PATCHDIR= ${.CURDIR}/../../wip/mpg123/patches
do-install:
${RUN} ${INSTALL_LIB_DIR} ${DESTDIR}${PREFIX}/lib && \
${INSTALL_LIB_DIR} ${DESTDIR}${PREFIX}/lib/mpg123 && \
${LIBTOOL} --mode=install ${INSTALL_LIB} \
${WRKSRC}/src/output/output_${MPG123_MODULE}.la \
${DESTDIR}${PREFIX}/lib/mpg123
.endif
.include "../../devel/libltdl/convenience.mk"
.include "../../mk/dlopen.buildlink3.mk"

19
mpg123/buildlink3.mk Normal file
View file

@ -0,0 +1,19 @@
# $NetBSD: buildlink3.mk,v 1.1 2007/12/26 17:27:06 bsadewitz Exp $
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
MPG123_BASE_BUILDLINK3_MK:= ${MPG123_BASE_BUILDLINK3_MK}+
.if ${BUILDLINK_DEPTH} == "+"
BUILDLINK_DEPENDS+= mpg123-base
.endif
BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nmpg123-base}
BUILDLINK_PACKAGES+= mpg123-base
BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}mpg123-base
.if ${MPG123_BASE_BUILDLINK3_MK} == "+"
BUILDLINK_API_DEPENDS.mpg123-base+= mpg123-base>=1.0.0
BUILDLINK_PKGSRCDIR.mpg123-base?= ../../wip/mpg123
.endif # MPG123_BASE_BUILDLINK3_MK
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}

View file

@ -1,37 +1,212 @@
$NetBSD: patch-aa,v 1.4 2007/10/24 07:45:48 bsadewitz Exp $
$NetBSD: patch-aa,v 1.5 2007/12/26 17:27:07 bsadewitz Exp $
--- configure.ac.orig 2007-10-24 03:37:33.000000000 -0400
+++ configure.ac
@@ -485,27 +485,27 @@ case $target in
i386-*)
AC_MSG_WARN([Unknown target operating system])
cpu_type="i386"
- CFLAGS="-DGENERIC -DNOXFERMEM $CFLAGS"
+ CFLAGS="$CFLAGS"
;;
i486-*)
AC_MSG_WARN([Unknown target operating system])
cpu_type="i486"
- CFLAGS="-DGENERIC -DNOXFERMEM $CFLAGS"
+ CFLAGS="$CFLAGS"
;;
i586-*)
AC_MSG_WARN([Unknown target operating system])
cpu_type="i586"
- CFLAGS="-DGENERIC -DNOXFERMEM $CFLAGS"
+ CFLAGS="$CFLAGS"
;;
i686-*)
AC_MSG_WARN([Unknown target operating system])
cpu_type="x86"
- CFLAGS="-DGENERIC -DNOXFERMEM $CFLAGS"
+ CFLAGS="$CFLAGS"
;;
*)
AC_MSG_WARN([Unknown target operating system])
cpu_type="generic_fpu"
- CFLAGS="-DGENERIC -DNOXFERMEM $CFLAGS"
+ CFLAGS="$CFLAGS"
;;
esac
--- configure.orig 2007-12-23 06:05:59.000000000 -0500
+++ configure
@@ -16880,7 +16880,7 @@ done
# The full list of supported modules to check, first come, first serve.
-check_modules="alsa oss coreaudio sun win32 esd jack portaudio pulse sdl nas dummy"
+check_modules=${MPG123_MODULE}
# The final list.
output_modules=
@@ -17396,7 +17396,7 @@ fi
fi
- if test "x$HAVE_ALSA" != xyes; then
+ if test "x$BUILD_ALSA" != xyes; then
check_failed=yes
fi
;;
@@ -17560,7 +17560,7 @@ fi
case $target in
*-*-mingw32)
# We tested portaudio with MME
- if test "x$HAVE_PORTAUDIO" != "xyes"; then
+ if test "x$BUILD_PORTAUDIO" != "xyes"; then
{ echo "$as_me:$LINENO: checking for Pa_Initialize in -lportaudio" >&5
echo $ECHO_N "checking for Pa_Initialize in -lportaudio... $ECHO_C" >&6; }
if test "${ac_cv_lib_portaudio_Pa_Initialize+set}" = set; then
@@ -17977,7 +17977,7 @@ fi
;;
esac
- if test "x$HAVE_PORTAUDIO" != xyes; then
+ if test "x$BUILD_PORTAUDIO" != xyes; then
check_failed=yes
else
# See if we have v19 or v18
@@ -18311,7 +18311,7 @@ fi
fi
- if test "x$HAVE_NAS" != xyes; then
+ if test "x$BUILD_NAS" != xyes; then
check_failed=yes
fi
;;
@@ -19730,8 +19730,7 @@ fi
-
-if test "x$HAVE_ALSA" = xyes ; then
+if test "x$BUILD_ALSA" = xyes ; then
HAVE_ALSA_TRUE=
HAVE_ALSA_FALSE='#'
else
@@ -19744,7 +19743,7 @@ fi
-if test "x$HAVE_OSS" = xyes ; then
+if test "x$BUILD_OSS" = xyes ; then
HAVE_OSS_TRUE=
HAVE_OSS_FALSE='#'
else
@@ -19757,7 +19756,7 @@ fi
-if test "x$HAVE_COREAUDIO" = xyes ; then
+if test "x$BUILD_COREAUDIO" = xyes ; then
HAVE_COREAUDIO_TRUE=
HAVE_COREAUDIO_FALSE='#'
else
@@ -19770,7 +19769,7 @@ fi
-if test "x$HAVE_SUN" = xyes ; then
+if test "x$BUILD_SUN" = xyes ; then
HAVE_SUN_TRUE=
HAVE_SUN_FALSE='#'
else
@@ -19783,7 +19782,7 @@ fi
-if test "x$HAVE_WIN32" = xyes ; then
+if test "x$BUILD_WIN32" = xyes ; then
HAVE_WIN32_TRUE=
HAVE_WIN32_FALSE='#'
else
@@ -19796,7 +19795,7 @@ fi
-if test "x$HAVE_ESD" = xyes ; then
+if test "x$BUILD_ESD" = xyes ; then
HAVE_ESD_TRUE=
HAVE_ESD_FALSE='#'
else
@@ -19809,7 +19808,7 @@ fi
-if test "x$HAVE_JACK" = xyes ; then
+if test "x$BUILD_JACK" = xyes ; then
HAVE_JACK_TRUE=
HAVE_JACK_FALSE='#'
else
@@ -19822,7 +19821,7 @@ fi
-if test "x$HAVE_PORTAUDIO" = xyes ; then
+if test "x$BUILD_PORTAUDIO" = xyes ; then
HAVE_PORTAUDIO_TRUE=
HAVE_PORTAUDIO_FALSE='#'
else
@@ -19835,7 +19834,7 @@ fi
-if test "x$HAVE_PULSE" = xyes ; then
+if test "x$BUILD_PULSE" = xyes ; then
HAVE_PULSE_TRUE=
HAVE_PULSE_FALSE='#'
else
@@ -19848,7 +19847,7 @@ fi
-if test "x$HAVE_SDL" = xyes ; then
+if test "x$BUILD_SDL" = xyes ; then
HAVE_SDL_TRUE=
HAVE_SDL_FALSE='#'
else
@@ -19861,7 +19860,7 @@ fi
-if test "x$HAVE_NAS" = xyes ; then
+if test "x$BUILD_NAS" = xyes ; then
HAVE_NAS_TRUE=
HAVE_NAS_FALSE='#'
else
@@ -19874,7 +19873,7 @@ fi
-if test "x$HAVE_AIX" = xyes ; then
+if test "x$BUILD_AIX" = xyes ; then
HAVE_AIX_TRUE=
HAVE_AIX_FALSE='#'
else
@@ -19887,7 +19886,7 @@ fi
-if test "x$HAVE_ALIB" = xyes ; then
+if test "x$BUILD_ALIB" = xyes ; then
HAVE_ALIB_TRUE=
HAVE_ALIB_FALSE='#'
else
@@ -19900,7 +19899,7 @@ fi
-if test "x$HAVE_HP" = xyes ; then
+if test "x$BUILD_HP" = xyes ; then
HAVE_HP_TRUE=
HAVE_HP_FALSE='#'
else
@@ -19913,7 +19912,7 @@ fi
-if test "x$HAVE_OS2" = xyes ; then
+if test "x$BUILD_OS2" = xyes ; then
HAVE_OS2_TRUE=
HAVE_OS2_FALSE='#'
else
@@ -19926,7 +19925,7 @@ fi
-if test "x$HAVE_SGI" = xyes ; then
+if test "x$BUILD_SGI" = xyes ; then
HAVE_SGI_TRUE=
HAVE_SGI_FALSE='#'
else
@@ -19939,7 +19938,7 @@ fi
-if test "x$HAVE_MINT" = xyes ; then
+if test "x$BUILD_MINT" = xyes ; then
HAVE_MINT_TRUE=
HAVE_MINT_FALSE='#'
else
@@ -19952,7 +19951,7 @@ fi
-if test "x$HAVE_DUMMY" = xyes ; then
+if test "x$BUILD_DUMMY" = xyes ; then
HAVE_DUMMY_TRUE=
HAVE_DUMMY_FALSE='#'
else

View file

@ -1,22 +1,13 @@
$NetBSD: patch-ab,v 1.3 2007/10/24 07:31:42 bsadewitz Exp $
$NetBSD: patch-ab,v 1.4 2007/12/26 17:27:07 bsadewitz Exp $
--- src/output/oss.c.orig 2007-10-24 03:30:57.000000000 -0400
+++ src/output/oss.c
@@ -160,7 +160,7 @@ static int open_oss(audio_output_t *ao)
if(!ao) return -1;
if(!ao->device) {
- ao->device = "/dev/dsp";
+ ao->device = "/dev/audio";
usingdefdev = 1;
}
@@ -169,7 +169,7 @@ static int open_oss(audio_output_t *ao)
if(ao->fn < 0)
{
if(usingdefdev) {
- ao->device = "/dev/sound/dsp";
+ ao->device = "/dev/sound";
ao->fn = open(ao->device,O_WRONLY);
if(ao->fn < 0) {
error("Can't open default sound device!");
--- Makefile.in.orig 2007-12-23 06:05:57.000000000 -0500
+++ Makefile.in
@@ -300,7 +300,7 @@ dist_man_MANS = man1/mpg123.1
# libltdl first as this recursive make mess cannot resolve interdependencies
# Why is recursive make the standard procedure when MAKE DOES NOT WORK THAT WAY??!
-SUBDIRS = @LTDLDIR@ src doc
+SUBDIRS = @LTDLDIR@ ${MPG123_SUBDIRS}
DIST_SUBDIRS = libltdl src doc
# pkg-config file for the mpg123 library

22
mpg123/patches/patch-ac Normal file
View file

@ -0,0 +1,22 @@
$NetBSD: patch-ac,v 1.6 2007/12/26 17:27:07 bsadewitz Exp $
--- src/Makefile.in.orig 2007-12-23 06:34:47.000000000 -0500
+++ src/Makefile.in
@@ -36,7 +36,7 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
-bin_PROGRAMS = mpg123$(EXEEXT)
+bin_PROGRAMS = ${MPG123_PROGRAM}
subdir = src
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/config.h.in
@@ -299,7 +299,7 @@ mpg123_LDFLAGS = @LT_LDFLAGS@ @OUTPUT_LD
INCLUDES = $(LTDLINCL) -I$(top_builddir)/src/libmpg123 -I$(top_srcdir)/src/libmpg123
# libltdl is not mentioned here... it's not that trivial
mpg123_DEPENDENCIES = @OUTPUT_OBJ@ @MODULE_OBJ@ libmpg123/libmpg123.la
-SUBDIRS = output libmpg123
+SUBDIRS = ${MPG123_SUBDIRS.src}
EXTRA_DIST = Makefile.legacy config.h.legacy legacy_module.c module.c
CLEANFILES = *.a
mpg123_SOURCES = \

View file

@ -1,25 +1,22 @@
$NetBSD: patch-ad,v 1.4 2007/11/02 17:36:04 bsadewitz Exp $
$NetBSD: patch-ad,v 1.5 2007/12/26 17:27:07 bsadewitz Exp $
--- src/output/Makefile.am.orig 2007-11-02 13:30:11.000000000 -0400
+++ src/output/Makefile.am
@@ -140,13 +140,13 @@ output_sdl_la_CFLAGS = @SDL_CFLAGS@
output_sdl_la_LIBADD = @SDL_LIBS@
endif
-if HAVE_SUN
-pkglib_LTLIBRARIES += output_sun.la
-output_sun_la_SOURCES = sun.c
-output_sun_la_LDFLAGS = -module -avoid-version -export-dynamic @SUN_LDFLAGS@
-output_sun_la_CFLAGS = @SUN_CFLAGS@
-output_sun_la_LIBADD = @SUN_LIBS@
-endif
+@SUN@if HAVE_SUN
+@SUN@pkglib_LTLIBRARIES += output_sun.la
+@SUN@output_sun_la_SOURCES = sun.c
+@SUN@output_sun_la_LDFLAGS = -module -avoid-version -export-dynamic @SUN_LDFLAGS@
+@SUN@output_sun_la_CFLAGS = @SUN_CFLAGS@
+@SUN@output_sun_la_LIBADD = @SUN_LIBS@
+@SUN@endif
if HAVE_WIN32
pkglib_LTLIBRARIES += output_win32.la
--- src/output/oss.c.orig 2007-12-23 06:05:05.000000000 -0500
+++ src/output/oss.c
@@ -165,7 +165,7 @@ static int open_oss(audio_output_t *ao)
if(!ao) return -1;
if(!ao->device) {
- ao->device = "/dev/dsp";
+ ao->device = DEVOSSAUDIO;
usingdefdev = 1;
}
@@ -174,7 +174,7 @@ static int open_oss(audio_output_t *ao)
if(ao->fn < 0)
{
if(usingdefdev) {
- ao->device = "/dev/sound/dsp";
+ ao->device = DEVOSSSOUND;
ao->fn = open(ao->device,O_WRONLY);
if(ao->fn < 0) {
error("Can't open default sound device!");

13
mpg123/patches/patch-ae Normal file
View file

@ -0,0 +1,13 @@
$NetBSD: patch-ae,v 1.5 2007/12/26 17:27:07 bsadewitz Exp $
--- src/output/Makefile.in.orig 2007-12-23 06:34:50.000000000 -0500
+++ src/output/Makefile.in
@@ -919,7 +919,7 @@ install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+ @$(MAKE) $(AM_MAKEFLAGS) ${EXTRA_INSTALL_TARGETS}
installcheck: installcheck-am
install-strip: