1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-15 03:43:53 +02:00
openwrt-packages/libs/alsa-lib/Makefile
Sebastian Kemper dc7f2ccad2 alsa-lib: fix uClibc builds
Currently alsa-lib fails to build on uClibc:

parser.c: In function 'snd_tplg_build_file':
parser.c:262:35: error: 'S_IRUSR' undeclared (first use in this function)
   open(outfile, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
                                   ^
parser.c:262:35: note: each undeclared identifier is reported only once for each function it appears in
parser.c:262:45: error: 'S_IWUSR' undeclared (first use in this function)
   open(outfile, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
                                             ^
parser.c: In function 'snd_tplg_build':
parser.c:330:35: error: 'S_IRUSR' undeclared (first use in this function)
   open(outfile, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
                                   ^
parser.c:330:45: error: 'S_IWUSR' undeclared (first use in this function)
   open(outfile, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
                                             ^
Makefile:390: recipe for target 'parser.lo' failed

Fix this by adding an upstream fix as a backport.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2018-01-27 11:49:02 +01:00

92 lines
2.2 KiB
Makefile

#
# Copyright (C) 2006-2018 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=alsa-lib
PKG_VERSION:=1.1.0
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=ftp://ftp.alsa-project.org/pub/lib/ \
http://alsa.cybermirror.org/lib/
PKG_MD5SUM:=69515ca73c3c4a212ef45160dea846c1
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>, \
Peter Wagner <tripolar@gmx.at>
PKG_LICENSE:=LGPLv2.1 GPLv2
PKG_LICENSE_FILES:=COPYING aserver/COPYING
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
PKG_USE_MIPS16:=0
PKG_CHECK_FORMAT_SECURITY:=0
include $(INCLUDE_DIR)/package.mk
define Package/alsa-lib
SECTION:=libs
CATEGORY:=Libraries
TITLE:=ALSA (Advanced Linux Sound Architecture) library
URL:=http://www.alsa-project.org/
DEPENDS:=@AUDIO_SUPPORT +kmod-sound-core +libpthread +librt
endef
define Package/alsa-lib/description
This is the library package for alsa, needed by some userspace programs.
You must have enabled the ALSA support in the kernel.
endef
TARGET_CFLAGS += $(FPIC)
CONFIGURE_ARGS+= \
--disable-python \
--disable-debug \
--without-debug \
$(SOFT_FLOAT_CONFIG_OPTION) \
--with-versioned=no
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/
$(CP) \
$(PKG_INSTALL_DIR)/usr/include/alsa \
$(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(CP) \
$(PKG_INSTALL_DIR)/usr/lib/libasound.{la,so*} \
$(1)/usr/lib/
$(INSTALL_DATA) \
$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/alsa.pc \
$(1)/usr/lib/pkgconfig/
$(INSTALL_DIR) $(1)/usr/share/aclocal
$(INSTALL_DATA) \
$(PKG_INSTALL_DIR)/usr/share/aclocal/alsa.m4 \
$(1)/usr/share/aclocal/
endef
define Package/alsa-lib/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) \
$(PKG_INSTALL_DIR)/usr/lib/libasound.so.* \
$(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/share/alsa/{cards,pcm}
$(INSTALL_DATA) \
$(PKG_INSTALL_DIR)/usr/share/alsa/alsa.conf \
$(1)/usr/share/alsa/
$(INSTALL_DATA) \
$(PKG_INSTALL_DIR)/usr/share/alsa/pcm/* \
$(1)/usr/share/alsa/pcm/
$(CP) \
$(PKG_INSTALL_DIR)/usr/share/alsa/cards/* \
$(1)/usr/share/alsa/cards/
endef
$(eval $(call BuildPackage,alsa-lib))