libflac broke by upstream changes (update: lcms fixed upstream)
Closed this issue · 6 comments
hydra3333 commented
perhaps a variation of these works
{ # in ubuntu 18.04.3 : CMake Error at src/CMakeLists.txt:1 (cmake_minimum_required): CMake 3.11 or higher is required. You are running version 3.10.2
'repo_type' : 'git',
'url' : 'https://github.com/xiph/flac.git',
'conf_system' : 'cmake',
'source_subfolder' : '_build',
'configure_options' : '.. {cmake_prefix_options} -DCMAKE_INSTALL_PREFIX={target_prefix} -DENABLE_64_BIT_WORDS=ON -DBUILD_PROGRAMS=OFF -DINSTALL_MANPAGES=OFF -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF -DVERSION=1.3.3 -DCMAKE_BUILD_TYPE=Release',
'patches': [
('flac/0001-mingw-fix-2.patch', '-p1', '..'),
],
'regex_replace': {
'post_patch': [
{
0: r'add_subdirectory\("microbench"\)',
'in_file': '../CMakeLists.txt'
},
{
0: r'add_subdirectory\("utils"\)',
'in_file': '../src/CMakeLists.txt'
},
{
0: r' add_subdirectory\("metaflac"\)',
'in_file': '../src/CMakeLists.txt'
},
{
0: r' add_subdirectory\("flac"\)',
'in_file': '../src/CMakeLists.txt'
},
],
},
'depends_on' : [
'libogg',
],
'_info' : { 'version' : 'git (master)', 'fancy_name' : 'flac (library)' },
}
From ba887847510b9376d946892a2a91842227adc32a Mon Sep 17 00:00:00 2001
From: DeadSix27 <DeadSix27@users.noreply.github.com>
Date: Mon, 2 Dec 2019 01:16:22 +0100
Subject: [PATCH] mingw workarounds
---
include/FLAC++/export.h | 2 +-
include/FLAC/export.h | 2 +-
src/CMakeLists.txt | 3 ---
src/libFLAC++/flac++.pc.in | 2 +-
src/libFLAC/flac.pc.in | 2 +-
5 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/include/FLAC++/export.h b/include/FLAC++/export.h
index 6776b29c..16453621 100644
--- a/include/FLAC++/export.h
+++ b/include/FLAC++/export.h
@@ -59,7 +59,7 @@
#if defined(FLAC__NO_DLL)
#define FLACPP_API
-#elif defined(_WIN32)
+#elif defined(_MSC_VER)
#ifdef FLACPP_API_EXPORTS
#define FLACPP_API __declspec(dllexport)
#else
diff --git a/include/FLAC/export.h b/include/FLAC/export.h
index 628fe5fc..d52f0bbb 100644
--- a/include/FLAC/export.h
+++ b/include/FLAC/export.h
@@ -59,7 +59,7 @@
#if defined(FLAC__NO_DLL)
#define FLAC_API
-#elif defined(_WIN32)
+#elif defined(_MSC_VER)
#ifdef FLAC_API_EXPORTS
#define FLAC_API __declspec(dllexport)
#else
diff --git a/src/libFLAC++/flac++.pc.in b/src/libFLAC++/flac++.pc.in
index f09c251a..b1958307 100644
--- a/src/libFLAC++/flac++.pc.in
+++ b/src/libFLAC++/flac++.pc.in
@@ -7,5 +7,5 @@ Name: FLAC++
Description: Free Lossless Audio Codec Library (C++ API)
Version: @VERSION@
Requires: flac
-Libs: -L${libdir} -lFLAC++
+Libs: -L${libdir} -lFLAC++ -lssp
Cflags: -I${includedir}
diff --git a/src/libFLAC/flac.pc.in b/src/libFLAC/flac.pc.in
index 56e8594e..2a98ecf2 100644
--- a/src/libFLAC/flac.pc.in
+++ b/src/libFLAC/flac.pc.in
@@ -7,6 +7,6 @@ Name: FLAC
Description: Free Lossless Audio Codec Library
Version: @VERSION@
Requires.private: @OGG_PACKAGE@
-Libs: -L${libdir} -lFLAC
+Libs: -L${libdir} -lFLAC -lssp
Libs.private: -lm
Cflags: -I${includedir}
--
2.17.1
{
'repo_type' : 'git',
'url' : 'https://github.com/mm2/Little-CMS.git',
'depth_git' : 0,
'branch' : '981aac648ce214c5aac5c645b95a3c4e6f3d8174',
'configure_options' : '{autoconf_prefix_options} --disable-shared --enable-static',
'_info' : { 'version' : 'git (master)', 'fancy_name' : 'Little-CMS2' },
}
hydra3333 commented
Aarg !
The new FLAC upstream changes also caused its lib .pc files to go into the wrong place,
which then caused vamp_plugin to fail building because when it went to use sndfile it couldn't find the flac dependencies.
So, an updated .py and a couple of patches below, in case they're of any use to you.
hydra3333 commented
{ # in ubuntu 18.04.3 : CMake Error at src/CMakeLists.txt:1 (cmake_minimum_required): CMake 3.11 or higher is required. You are running version 3.10.2
'repo_type' : 'git',
'url' : 'https://github.com/xiph/flac.git',
'conf_system' : 'cmake',
'source_subfolder' : '_build',
#'configure_options' : '.. {cmake_prefix_options} -DCMAKE_INSTALL_PREFIX={target_prefix} -DENABLE_64_BIT_WORDS=ON -DBUILD_PROGRAMS=OFF -DINSTALL_MANPAGES=OFF -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF -DVERSION=1.3.3 -DCMAKE_BUILD_TYPE=Release',
'configure_options' : '.. {cmake_prefix_options} -DCMAKE_INSTALL_PREFIX={target_prefix} -DENABLE_64_BIT_WORDS=ON -DBUILD_PROGRAMS=OFF -DINSTALL_PKGCONFIG_MODULES=ON -DINSTALL_MANPAGES=OFF -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF -DVERSION=1.3.3 -DCMAKE_BUILD_TYPE=Release', # 2020.04.06 try to fix vamp error. this -> sndfile -> vamp
'patches': [
('flac/0001-mingw-fix-2.patch', '-p1', '..'),
('flac/libFLAC_CMakeLists.txt.patch', '-p1', '..'),
('flac/libFLAC++_CMakeLists.txt.patch', '-p1', '..'),
],
'regex_replace': {
'post_patch': [
{
0: r'add_subdirectory\("microbench"\)',
'in_file': '../CMakeLists.txt'
},
{
0: r'add_subdirectory\("utils"\)',
'in_file': '../src/CMakeLists.txt'
},
{
0: r' add_subdirectory\("metaflac"\)',
'in_file': '../src/CMakeLists.txt'
},
{
0: r' add_subdirectory\("flac"\)',
'in_file': '../src/CMakeLists.txt'
},
],
},
'depends_on' : [
'libogg',
],
'_info' : { 'version' : 'git (master)', 'fancy_name' : 'flac (library)' },
}
#
# src/libFLAC/CMakeLists.txt DESTINATION "${CMAKE_INSTALL_DATADIR}/pkgconfig" DESTINATION "${CMAKE_INSTALL_LIBDIR}/lib/pkgconfig")
# src/libFLAC++/CMakeLists.txt DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig" DESTINATION "${CMAKE_INSTALL_LIBDIR}/lib/pkgconfig")
diff --git a/src/libFLAC/CMakeLists.txt b/src/libFLAC/CMakeLists.txt
--- CMakeLists.txt 2020-04-06 15:29:12.000000000 +0930
+++ CMakeLists.txt 2020-04-06 15:29:12.000000000 +0930
@@ -121,5 +121,5 @@
set(includedir "${CMAKE_INSTALL_FULL_INCLUDEDIR}")
configure_file(flac.pc.in flac.pc @ONLY)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/flac.pc"
- DESTINATION "${CMAKE_INSTALL_DATADIR}/pkgconfig")
+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
endif()
diff --git a/src/libFLAC++/CMakeLists.txt b/src/libFLAC++/CMakeLists.txt
--- CMakeLists.txt 2020-04-06 15:25:57.000000000 +0930
+++ CMakeLists.txt 2020-04-06 15:25:57.000000000 +0930
@@ -47,5 +47,5 @@
set(includedir "${CMAKE_INSTALL_FULL_INCLUDEDIR}")
configure_file(flac++.pc.in flac++.pc @ONLY)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/flac++.pc"
- DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig")
+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
endif()
hydra3333 commented
lcms fixed upstream according to mm2/Little-CMS#201 (comment)
hydra3333 commented
thanks. it changed upstream again.
this is my latest which worked.
{ # in ubuntu 18.04.3 : CMake Error at src/CMakeLists.txt:1 (cmake_minimum_required): CMake 3.11 or higher is required. You are running version 3.10.2
'repo_type' : 'git',
'url' : 'https://github.com/xiph/flac.git',
'conf_system' : 'cmake',
'source_subfolder' : '_build',
#'configure_options' : '.. {cmake_prefix_options} -DCMAKE_INSTALL_PREFIX={target_prefix} -DENABLE_64_BIT_WORDS=ON -DBUILD_PROGRAMS=OFF -DINSTALL_MANPAGES=OFF -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF -DVERSION=1.3.3 -DCMAKE_BUILD_TYPE=Release',
'configure_options' : '.. {cmake_prefix_options} -DCMAKE_INSTALL_PREFIX={target_prefix} -DENABLE_64_BIT_WORDS=ON -DBUILD_PROGRAMS=OFF -DINSTALL_PKGCONFIG_MODULES=ON -DINSTALL_MANPAGES=OFF -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF -DVERSION=1.3.3 -DCMAKE_BUILD_TYPE=Release', # 2020.04.06 try to fix vamp error. this -> sndfile -> vamp
'patches': [
('flac/0001-mingw-fix-2.patch', '-p1', '..'),
#('flac/libFLAC_CMakeLists.txt.patch', '-p1', '..'),
#('flac/libFLAC++_CMakeLists.txt.patch', '-p1', '..'),
],
'regex_replace': {
'post_patch': [
{
0: r'add_subdirectory\("microbench"\)',
'in_file': '../CMakeLists.txt'
},
{
0: r'add_subdirectory\("utils"\)',
'in_file': '../src/CMakeLists.txt'
},
{
0: r' add_subdirectory\("metaflac"\)',
'in_file': '../src/CMakeLists.txt'
},
{
0: r' add_subdirectory\("flac"\)',
'in_file': '../src/CMakeLists.txt'
},
],
},
'depends_on' : [
'libogg',
],
'_info' : { 'version' : 'git (master)', 'fancy_name' : 'flac (library)' },
}
hydra3333 commented
Thanks, yes I just saw they posted a new fix and had to undo my patch.