flac: update to 1.3.4
Switch to build with cmake for speed and simplicity. Remove now pointless patches. Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
849f524c62
commit
be7424a840
4 changed files with 18 additions and 179 deletions
|
@ -8,24 +8,20 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=flac
|
PKG_NAME:=flac
|
||||||
PKG_VERSION:=1.3.3
|
PKG_VERSION:=1.3.4
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=$(AUTORELEASE)
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||||
PKG_SOURCE_URL:=https://downloads.xiph.org/releases/flac/
|
PKG_SOURCE_URL:=https://downloads.xiph.org/releases/flac/
|
||||||
PKG_HASH:=213e82bd716c9de6db2f98bcadbc4c24c7e2efe8c75939a1a84e28539c4e1748
|
PKG_HASH:=8ff0607e75a322dd7cd6ec48f4f225471404ae2730d0ea945127b1355155e737
|
||||||
|
|
||||||
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
|
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
|
||||||
PKG_LICENSE:=GFDL-1.2 GPL-2 LGPL-2.1 BSD-3-Clause
|
PKG_LICENSE:=GFDL-1.2 GPL-2 LGPL-2.1 BSD-3-Clause
|
||||||
PKG_LICENSE_FILES:=README COPYING.FDL COPYING.GPL COPYING.LGPL COPYING.Xiph
|
PKG_LICENSE_FILES:=README COPYING.FDL COPYING.GPL COPYING.LGPL COPYING.Xiph
|
||||||
PKG_CPE_ID:=cpe:/a:flac_project:flac
|
PKG_CPE_ID:=cpe:/a:flac_project:flac
|
||||||
|
|
||||||
PKG_FIXUP:=autoreconf
|
|
||||||
PKG_INSTALL:=1
|
|
||||||
PKG_BUILD_PARALLEL:=1
|
|
||||||
PKG_REMOVE_FILES:=autogen.sh aclocal.m4
|
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
include $(INCLUDE_DIR)/cmake.mk
|
||||||
|
|
||||||
define Package/libflac
|
define Package/libflac
|
||||||
SECTION:=libs
|
SECTION:=libs
|
||||||
|
@ -34,24 +30,17 @@ define Package/libflac
|
||||||
URL:=https://xiph.org/flac
|
URL:=https://xiph.org/flac
|
||||||
endef
|
endef
|
||||||
|
|
||||||
CONFIGURE_ARGS += \
|
CMAKE_OPTIONS += \
|
||||||
--disable-cpplibs \
|
-DBUILD_SHARED_LIBS=ON \
|
||||||
--disable-sse \
|
-DBUILD_CXXLIBS=OFF \
|
||||||
--disable-altivec \
|
-DBUILD_PROGRAMS=OFF \
|
||||||
--disable-vsx \
|
-DBUILD_EXAMPLES=OFF \
|
||||||
--disable-doxgen-docs \
|
-DBUILD_DOCS=OFF \
|
||||||
--disable-local-xmms-plugin \
|
-DINSTALL_MANPAGES=OFF \
|
||||||
--disable-xmms-plugin \
|
-DINSTALL_CMAKE_CONFIG_MODULE=OFF \
|
||||||
--disable-ogg \
|
-DINSTALL_PKGCONFIG_MODULES=ON \
|
||||||
--disable-oggtest \
|
-DWITH_OGG=OFF \
|
||||||
--disable-thorough-tests \
|
-DWITH_STACK_PROTECTOR=OFF
|
||||||
--disable-examples \
|
|
||||||
--disable-rpath \
|
|
||||||
$(if $(CONFIG_DEBUG),--enable-debug) \
|
|
||||||
--enable-static \
|
|
||||||
--without-pic
|
|
||||||
|
|
||||||
TARGET_CFLAGS += $(FPIC)
|
|
||||||
|
|
||||||
define Build/InstallDev
|
define Build/InstallDev
|
||||||
$(INSTALL_DIR) $(1)/usr/include
|
$(INSTALL_DIR) $(1)/usr/include
|
||||||
|
@ -60,16 +49,13 @@ define Build/InstallDev
|
||||||
$(1)/usr/include/
|
$(1)/usr/include/
|
||||||
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
||||||
$(CP) \
|
$(CP) \
|
||||||
$(PKG_INSTALL_DIR)/usr/lib/libFLAC.{a,so*,la} \
|
$(PKG_INSTALL_DIR)/usr/lib/libFLAC.so* \
|
||||||
$(1)/usr/lib/
|
$(1)/usr/lib/
|
||||||
$(INSTALL_DATA) \
|
$(INSTALL_DATA) \
|
||||||
$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
|
$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
|
||||||
$(1)/usr/lib/pkgconfig/
|
$(1)/usr/lib/pkgconfig/
|
||||||
|
$(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/flac.pc
|
||||||
$(INSTALL_DIR) $(1)/usr/share/aclocal/
|
$(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/flac.pc
|
||||||
$(INSTALL_DATA) \
|
|
||||||
$(PKG_INSTALL_DIR)/usr/share/aclocal/* \
|
|
||||||
$(1)/usr/share/aclocal/
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/libflac/install
|
define Package/libflac/install
|
||||||
|
|
|
@ -1,25 +0,0 @@
|
||||||
--- a/Makefile.am
|
|
||||||
+++ b/Makefile.am
|
|
||||||
@@ -31,7 +31,7 @@
|
|
||||||
|
|
||||||
ACLOCAL_AMFLAGS = -I m4
|
|
||||||
|
|
||||||
-SUBDIRS = doc include m4 man src test build objs microbench
|
|
||||||
+SUBDIRS = include m4 src build objs
|
|
||||||
|
|
||||||
if EXAMPLES
|
|
||||||
SUBDIRS += examples
|
|
||||||
--- a/src/Makefile.am
|
|
||||||
+++ b/src/Makefile.am
|
|
||||||
@@ -30,11 +30,6 @@ SUBDIRS = \
|
|
||||||
flac \
|
|
||||||
metaflac \
|
|
||||||
$(XMMS_DIRS) \
|
|
||||||
- test_grabbag \
|
|
||||||
- test_libs_common \
|
|
||||||
- test_libFLAC \
|
|
||||||
- test_seeking \
|
|
||||||
- test_streams \
|
|
||||||
utils \
|
|
||||||
$(CPPLIBS_DIRS)
|
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
--- a/src/Makefile.am
|
|
||||||
+++ b/src/Makefile.am
|
|
||||||
@@ -27,10 +27,7 @@ endif
|
|
||||||
SUBDIRS = \
|
|
||||||
libFLAC \
|
|
||||||
share \
|
|
||||||
- flac \
|
|
||||||
- metaflac \
|
|
||||||
$(XMMS_DIRS) \
|
|
||||||
- utils \
|
|
||||||
$(CPPLIBS_DIRS)
|
|
||||||
|
|
||||||
EXTRA_DIST = \
|
|
|
@ -1,109 +0,0 @@
|
||||||
Return-Path: <rosenp@gmail.com>
|
|
||||||
Received: from localhost.localdomain (76-14-106-55.rk.wavecable.com. [76.14.106.55])
|
|
||||||
by smtp.gmail.com with ESMTPSA id f19sm148509170pfk.180.2019.08.09.13.01.06
|
|
||||||
for <flac-dev@xiph.org>
|
|
||||||
(version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256);
|
|
||||||
Fri, 09 Aug 2019 13:01:06 -0700 (PDT)
|
|
||||||
From: Rosen Penev <rosenp@gmail.com>
|
|
||||||
To: flac-dev@xiph.org
|
|
||||||
Subject: [PATCH] Switch to utimensat for newer POSIX versions
|
|
||||||
Date: Fri, 9 Aug 2019 13:01:05 -0700
|
|
||||||
Message-Id: <20190809200105.1443-1-rosenp@gmail.com>
|
|
||||||
X-Mailer: git-send-email 2.17.1
|
|
||||||
|
|
||||||
Some libcs like uClibc-ng can optionally disable deprecated functions.
|
|
||||||
utime is one of them. When done so, both the header and the function go
|
|
||||||
missing.
|
|
||||||
|
|
||||||
This fixes flac_utime to work in such a situation.
|
|
||||||
---
|
|
||||||
include/share/compat.h | 10 +++++++++-
|
|
||||||
src/libFLAC/metadata_iterators.c | 9 +++++++--
|
|
||||||
src/share/grabbag/file.c | 9 +++++++--
|
|
||||||
3 files changed, 23 insertions(+), 5 deletions(-)
|
|
||||||
|
|
||||||
--- a/include/share/compat.h
|
|
||||||
+++ b/include/share/compat.h
|
|
||||||
@@ -112,9 +112,13 @@
|
|
||||||
#include <sys/utime.h> /* for utime() */
|
|
||||||
#endif
|
|
||||||
#else
|
|
||||||
+#if _POSIX_C_SOURCE >= 200809L
|
|
||||||
+#include <fcntl.h>
|
|
||||||
+#else
|
|
||||||
#include <sys/types.h> /* some flavors of BSD (like OS X) require this to get time_t */
|
|
||||||
#include <utime.h> /* for utime() */
|
|
||||||
#endif
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
#if defined _MSC_VER
|
|
||||||
# if _MSC_VER >= 1800
|
|
||||||
@@ -160,11 +164,15 @@
|
|
||||||
|
|
||||||
#define flac_fopen fopen
|
|
||||||
#define flac_chmod chmod
|
|
||||||
-#define flac_utime utime
|
|
||||||
#define flac_unlink unlink
|
|
||||||
#define flac_rename rename
|
|
||||||
#define flac_stat stat
|
|
||||||
|
|
||||||
+#if _POSIX_C_SOURCE >= 200809L
|
|
||||||
+#define flac_utime(a, b) utimensat (AT_FDCWD, a, *b, 0)
|
|
||||||
+#else
|
|
||||||
+#define flac_utime utime
|
|
||||||
+#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
--- a/src/libFLAC/metadata_iterators.c
|
|
||||||
+++ b/src/libFLAC/metadata_iterators.c
|
|
||||||
@@ -3422,13 +3422,18 @@ FLAC__bool get_file_stats_(const char *f
|
|
||||||
|
|
||||||
void set_file_stats_(const char *filename, struct flac_stat_s *stats)
|
|
||||||
{
|
|
||||||
- struct utimbuf srctime;
|
|
||||||
-
|
|
||||||
FLAC__ASSERT(0 != filename);
|
|
||||||
FLAC__ASSERT(0 != stats);
|
|
||||||
|
|
||||||
+#if _POSIX_C_SOURCE >= 200809L
|
|
||||||
+ struct timespec srctime[2] = {};
|
|
||||||
+ srctime[0].tv_sec = stats->st_atime;
|
|
||||||
+ srctime[1].tv_sec = stats->st_mtime;
|
|
||||||
+#else
|
|
||||||
+ struct utimbuf srctime;
|
|
||||||
srctime.actime = stats->st_atime;
|
|
||||||
srctime.modtime = stats->st_mtime;
|
|
||||||
+#endif
|
|
||||||
(void)flac_chmod(filename, stats->st_mode);
|
|
||||||
(void)flac_utime(filename, &srctime);
|
|
||||||
#if !defined _MSC_VER && !defined __BORLANDC__ && !defined __MINGW32__
|
|
||||||
--- a/src/share/grabbag/file.c
|
|
||||||
+++ b/src/share/grabbag/file.c
|
|
||||||
@@ -27,7 +27,6 @@
|
|
||||||
#include <fcntl.h> /* for _O_BINARY */
|
|
||||||
#else
|
|
||||||
#include <sys/types.h> /* some flavors of BSD (like OS X) require this to get time_t */
|
|
||||||
-#include <utime.h> /* for utime() */
|
|
||||||
#endif
|
|
||||||
#if defined __EMX__
|
|
||||||
#include <io.h> /* for setmode(), O_BINARY */
|
|
||||||
@@ -53,11 +52,17 @@
|
|
||||||
void grabbag__file_copy_metadata(const char *srcpath, const char *destpath)
|
|
||||||
{
|
|
||||||
struct flac_stat_s srcstat;
|
|
||||||
- struct utimbuf srctime;
|
|
||||||
|
|
||||||
if(0 == flac_stat(srcpath, &srcstat)) {
|
|
||||||
+#if _POSIX_C_SOURCE >= 200809L
|
|
||||||
+ struct timespec srctime[2] = {};
|
|
||||||
+ srctime[0].tv_sec = srcstat.st_atime;
|
|
||||||
+ srctime[1].tv_sec = srcstat.st_mtime;
|
|
||||||
+#else
|
|
||||||
+ struct utimbuf srctime;
|
|
||||||
srctime.actime = srcstat.st_atime;
|
|
||||||
srctime.modtime = srcstat.st_mtime;
|
|
||||||
+#endif
|
|
||||||
(void)flac_chmod(destpath, srcstat.st_mode);
|
|
||||||
(void)flac_utime(destpath, &srctime);
|
|
||||||
}
|
|
Loading…
Reference in a new issue