From 009734ad9fa68810a10a3e9dd6bda562d570fdc5 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Mon, 17 Aug 2020 13:48:52 -0700 Subject: [PATCH] mpg123: revert back to using autotools CMake build seems to be experimental and not ready for primetime. Added altivec support. Fixed installing static output libraries to the target. Signed-off-by: Rosen Penev --- sound/mpg123/Makefile | 68 ++++++++++--------------- sound/mpg123/patches/010-no-pulse.patch | 11 ---- 2 files changed, 28 insertions(+), 51 deletions(-) delete mode 100644 sound/mpg123/patches/010-no-pulse.patch diff --git a/sound/mpg123/Makefile b/sound/mpg123/Makefile index e62bab9913..460f7beb8f 100644 --- a/sound/mpg123/Makefile +++ b/sound/mpg123/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mpg123 PKG_VERSION:=1.26.3 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=@SF/mpg123 @@ -19,11 +19,10 @@ PKG_MAINTAINER:=Zoltan HERPAI PKG_LICENSE_FILES:=COPYING PKG_CPE_ID:=cpe:/a:mpg123:mpg123 +PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 -CMAKE_SOURCE_SUBDIR:=ports/cmake include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/cmake.mk define Package/mpg123/Default URL:=http://www.mpg123.de @@ -65,31 +64,34 @@ define Package/mpg123 DEPENDS+=+libmpg123 +alsa-lib +libout123 +libsyn123 endef -CMAKE_OPTIONS += \ - -DBUILD_SHARED_LIBS=ON \ - -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ - -DNO_FEATURE_REPORT=ON \ - -DNO_LFS_ALIAS=ON +CONFIGURE_ARGS += \ + --enable-shared \ + --enable-static \ + --with-audio=alsa \ + --with-default-audio=alsa ifeq ($(CONFIG_SOFT_FLOAT),y) - CMAKE_OPTIONS += \ - -DPLATFORM_DEFINITIONS="OPT_GENERIC" \ - -DACCURATE_ROUNDING=OFF + CONFIGURE_ARGS += \ + --with-cpu=generic_nofpu \ + --enable-int-quality=yes +else ifneq ($(findstring 464fp,$(CONFIG_CPU_TYPE)),) + CONFIGURE_ARGS += \ + --with-cpu=altivec else ifneq ($(findstring neon,$(CONFIG_CPU_TYPE)),) - CMAKE_OPTIONS += \ - -DPLATFORM_DEFINITIONS="OPT_MULTI OPT_GENERIC OPT_GENERIC_DITHER OPT_NEON" + CONFIGURE_ARGS += \ + --with-cpu=arm_fpu else ifneq ($(findstring aarch64,$(CONFIG_ARCH)),) - CMAKE_OPTIONS += \ - -DPLATFORM_DEFINITIONS="OPT_MULTI OPT_GENERIC OPT_GENERIC_DITHER OPT_NEON64" + CONFIGURE_ARGS += \ + --with-cpu=aarch64 else - CMAKE_OPTIONS += \ - -DPLATFORM_DEFINITIONS="OPT_GENERIC" + CONFIGURE_ARGS += \ + --with-cpu=generic_fpu endif define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include $(INSTALL_DATA) \ - $(PKG_BUILD_DIR)/src/libmpg123/fmt123.h \ + $(PKG_INSTALL_DIR)/usr/include/fmt123.h \ $(PKG_INSTALL_DIR)/usr/include/mpg123.h \ $(PKG_INSTALL_DIR)/usr/include/out123.h \ $(PKG_INSTALL_DIR)/usr/include/syn123.h \ @@ -97,22 +99,14 @@ define Build/InstallDev $(INSTALL_DIR) $(1)/usr/lib $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/libmpg123.so \ - $(PKG_INSTALL_DIR)/usr/lib/libout123.so \ - $(PKG_INSTALL_DIR)/usr/lib/libsyn123.so \ + $(PKG_INSTALL_DIR)/usr/lib/libmpg123.{la,a,so*} \ + $(PKG_INSTALL_DIR)/usr/lib/libout123.{la,a,so*} \ + $(PKG_INSTALL_DIR)/usr/lib/libsyn123.{la,a,so*} \ $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/lib/cmake/mpg123 - $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/cmake/mpg123/mpg123-config.cmake \ - $(PKG_INSTALL_DIR)/usr/lib/cmake/mpg123/mpg123-config-version.cmake \ - $(PKG_INSTALL_DIR)/usr/lib/cmake/mpg123/targets.cmake \ - $(PKG_INSTALL_DIR)/usr/lib/cmake/mpg123/targets-release.cmake \ - $(1)/usr/lib/cmake/mpg123 - $(INSTALL_DIR) $(1)/usr/lib/mpg123 $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/mpg123/output_alsa.so \ + $(PKG_INSTALL_DIR)/usr/lib/mpg123/output* \ $(1)/usr/lib/mpg123 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig @@ -121,32 +115,26 @@ define Build/InstallDev $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libout123.pc \ $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libsyn123.pc \ $(1)/usr/lib/pkgconfig - $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/libmpg123.pc - $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/libmpg123.pc - $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/libout123.pc - $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/libout123.pc - $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/libsyn123.pc - $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/libsyn123.pc endef define Package/libmpg123/install $(INSTALL_DIR) $(1)/usr/lib $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/libmpg123.so* \ + $(PKG_INSTALL_DIR)/usr/lib/libmpg123.so.* \ $(1)/usr/lib/ endef define Package/libout123/install $(INSTALL_DIR) $(1)/usr/lib $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/libout123.so* \ + $(PKG_INSTALL_DIR)/usr/lib/libout123.so.* \ $(1)/usr/lib/ endef define Package/libsyn123/install $(INSTALL_DIR) $(1)/usr/lib $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/libsyn123.so* \ + $(PKG_INSTALL_DIR)/usr/lib/libsyn123.so.* \ $(1)/usr/lib/ endef @@ -159,7 +147,7 @@ define Package/mpg123/install $(INSTALL_DIR) $(1)/usr/lib/mpg123 $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/mpg123/* \ + $(PKG_INSTALL_DIR)/usr/lib/mpg123/output_*.so \ $(1)/usr/lib/mpg123 endef diff --git a/sound/mpg123/patches/010-no-pulse.patch b/sound/mpg123/patches/010-no-pulse.patch deleted file mode 100644 index c9adeb0b3d..0000000000 --- a/sound/mpg123/patches/010-no-pulse.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/ports/cmake/src/CMakeLists.txt -+++ b/ports/cmake/src/CMakeLists.txt -@@ -199,7 +199,7 @@ if(NOT CHECK_MODULES OR NOT COREAUDIO_REQUIRED EQUAL -1) - endif() - endif() - --find_package(PkgConfig) -+#find_package(PkgConfig) - if(PKG_CONFIG_FOUND) - if(NOT CHECK_MODULES OR NOT PULSE_REQUIRED EQUAL -1) - pkg_search_module(PULSE libpulse-simple) -- 2.30.2