1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-28 01:06:17 +00:00
freebsd-ports/audio/linux-c7-alsa-plugins-oss/Makefile
Jan Beich 1ad9c73b56 audio/linux-c7-alsa-plugins-oss: install vendor config after 077152a79a
linux-c7-alsa-lib uses default config from alsa-lib since 1aaf3941aa.

$ /compat/linux/usr/bin/aplay foo.wav
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM oss
aplay: main:828: audio open error: No such file or directory

PR:		245321
2024-02-03 06:09:13 +01:00

112 lines
3.8 KiB
Makefile

PORTNAME= alsa-plugins
PORTVERSION= 1.1.6
DISTVERSIONSUFFIX= -1.el7
PORTREVISION= 4
CATEGORIES= audio linux
MASTER_SITES= CENTOS_LINUX
MASTER_SITE_SUBDIR= centos/${LINUX_DIST_VER}/os/Source/SPackages/ \
centos/${LINUX_DIST_VER}/updates/Source/SPackages/
PKGNAMEPREFIX= linux-c7-
PKGNAMESUFFIX= -oss
EXTRACT_SUFX= .src.rpm
DIST_SUBDIR= centos
MAINTAINER= emulation@FreeBSD.org
COMMENT= OSS plugin for ALSA (Linux CentOS ${LINUX_DIST_VER})
WWW= https://www.alsa-project.org/
LICENSE= LGPL21+
USES= autoreconf:build gmake libtool:build linux:c7 pkgconfig
USE_LDCONFIG= yes
USE_LINUX= alsalib:build,run alsa-lib-devel:build base:build devtools:build
USE_LINUX_PREFIX=yes
RPM_PATCHES= alsa-plugins-1.1.6-post.patch \
alsa-plugins-1.1.6-speexdsp.patch
CONFIG_ARGS= --disable-static --disable-mix --disable-usbstream \
--disable-arcamav --disable-jack --disable-pulseaudio \
--disable-samplerate --disable-libav --disable-a52 \
--disable-lavrate --disable-speexdsp --with-speex=no
CPPFLAGS+= -DFREEBSD_OSS -DFREEBSD_OSS_USE_IO_PTR
CFLAGS+= --sysroot=${LINUXBASE}
COMPAT32_CFLAGS_amd64= -m32
LIBDIR_aarch64= /usr/lib64
LIBDIR_amd64= /usr/lib64
LIBDIR_i386= /usr/lib
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
WRKSRC32= ${WRKDIR}/32/${PORTNAME}-${PORTVERSION}
CONFLICTS= linux-c6-${PORTNAME}${PKGNAMESUFFIX}
DESCR= ${.CURDIR}/../${PORTNAME}/pkg-descr
PLIST= ${PKGDIR}/pkg-plist.${ARCH}
.include <bsd.port.options.mk>
post-extract:
.if !empty(COMPAT32_CFLAGS_${ARCH})
@${MKDIR} ${WRKDIR}/32
@(cd ${WRKDIR}/32 && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} \
../${PORTNAME}-${PORTVERSION}.tar.bz2 ${EXTRACT_AFTER_ARGS})
.endif
@(cd ${WRKDIR} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} \
${PORTNAME}-${PORTVERSION}.tar.bz2 ${EXTRACT_AFTER_ARGS})
do-patch:
@${REINPLACE_CMD} 's/mkdir -p/$$(MKDIR_P)/' \
${WRKDIR}/alsa-plugins-1.1.6-post.patch
.for p in ${RPM_PATCHES}
.if !empty(COMPAT32_CFLAGS_${ARCH})
@${PATCH} -d ${WRKSRC32} --forward --quiet -E -p1 < ${WRKDIR}/${p}
.endif
@${PATCH} -d ${WRKSRC} --forward --quiet -E -p1 < ${WRKDIR}/${p}
.endfor
.if !empty(COMPAT32_CFLAGS_${ARCH})
@${CAT} ${PATCHDIR}/patch-* | ${PATCH} -d ${WRKSRC32} --forward \
--quiet -E -p0
.endif
@${CAT} ${PATCHDIR}/patch-* | ${PATCH} -d ${WRKSRC} --forward \
--quiet -E -p0
do-configure:
.if !empty(COMPAT32_CFLAGS_${ARCH})
@(cd ${WRKSRC32} && ${AUTORECONF} -f -i && ${SETENV} \
PATH=${LINUXBASE}/usr/bin ./configure CPPFLAGS="${CPPFLAGS}" \
CFLAGS="${CFLAGS:N-march=*} ${COMPAT32_CFLAGS_${ARCH}}" \
LDFLAGS="${LDFLAGS}" MAKE="${LOCALBASE}/bin/gmake" \
MKDIR_P="${MKDIR}" PKG_CONFIG="${LOCALBASE}/bin/pkgconf" \
PKG_CONFIG_PATH=${LINUXBASE}/usr/lib/pkgconfig \
${CONFIG_ARGS})
.endif
@(cd ${WRKSRC} && ${AUTORECONF} -f -i && ${SETENV} \
PATH=${LINUXBASE}/usr/bin ./configure CPPFLAGS="${CPPFLAGS}" \
CFLAGS="${CFLAGS:N-march=*}" LDFLAGS="${LDFLAGS}" \
MAKE="${LOCALBASE}/bin/gmake" MKDIR_P="${MKDIR}" \
PKG_CONFIG="${LOCALBASE}/bin/pkgconf" \
PKG_CONFIG_PATH=${LINUXBASE}${LIBDIR_${ARCH}}/pkgconfig \
--libdir ${LIBDIR_${ARCH}} ${CONFIG_ARGS})
do-build:
.if !empty(COMPAT32_CFLAGS_${ARCH})
@(cd ${WRKSRC32} && ${SETENV} PATH=${LINUXBASE}/usr/bin \
${LOCALBASE}/bin/gmake)
.endif
@(cd ${WRKSRC} && ${SETENV} PATH=${LINUXBASE}/usr/bin \
${LOCALBASE}/bin/gmake)
do-install:
.if !empty(COMPAT32_CFLAGS_${ARCH})
@(cd ${WRKSRC32} && ${SETENV} PATH=${LINUXBASE}/usr/bin \
${LOCALBASE}/bin/gmake install-strip \
DESTDIR=${STAGEDIR}${LINUXBASE})
${RM} -r ${STAGEDIR}${LINUXBASE}/usr/lib/alsa-lib/*.la
.endif
@(cd ${WRKSRC} && ${SETENV} PATH=${LINUXBASE}/usr/bin \
${LOCALBASE}/bin/gmake install-strip \
DESTDIR=${STAGEDIR}${LINUXBASE})
${RM} -r ${STAGEDIR}${LINUXBASE}${LIBDIR_${ARCH}}/alsa-lib/*.la
${LN} -sf ../../../usr/share/alsa/alsa.conf.d/50-oss.conf \
${STAGEDIR}${LINUXBASE}/etc/alsa/conf.d
.include <bsd.port.mk>