mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
flac13, revive untill qmmp is resolved (#10916)
This commit is contained in:
66
media-libs/flac/flac13-1.3.4.recipe
Normal file
66
media-libs/flac/flac13-1.3.4.recipe
Normal file
@@ -0,0 +1,66 @@
|
||||
SUMMARY="The free lossless audio codec"
|
||||
DESCRIPTION="FLAC stands for Free Lossless Audio Codec, an audio format \
|
||||
similar to MP3, but lossless, meaning that audio is compressed in FLAC \
|
||||
without any loss in quality. This is similar to how Zip works, except with \
|
||||
FLAC you will get much better compression because it is designed specifically \
|
||||
for audio, and you can play back compressed FLAC files in your favorite player \
|
||||
(or your car or home stereo) just like you would an MP3 file."
|
||||
HOMEPAGE="http://flac.sourceforge.net/"
|
||||
COPYRIGHT="2000-2007 Josh Coalson"
|
||||
LICENSE="GNU LGPL v2.1
|
||||
GNU GPL v2
|
||||
BSD (3-clause)"
|
||||
REVISION="2"
|
||||
SOURCE_URI="http://downloads.xiph.org/releases/flac/flac-$portVersion.tar.xz"
|
||||
CHECKSUM_SHA256="8ff0607e75a322dd7cd6ec48f4f225471404ae2730d0ea945127b1355155e737"
|
||||
SOURCE_DIR="flac-$portVersion"
|
||||
PATCHES="flac-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="?all x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
flac13$secondaryArchSuffix = $portVersion compat >= 1
|
||||
lib:libFLAC$secondaryArchSuffix = 8.3.0 compat >= 8
|
||||
lib:libFLAC++$secondaryArchSuffix = 6.3.0 compat >= 6
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libogg$secondaryArchSuffix
|
||||
lib:libstdc++$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libogg$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:nasm
|
||||
cmd:ninja
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
cmake -S. -Bbuilddir -GNinja \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DBUILD_SHARED_LIBS=ON \
|
||||
-DBUILD_PROGRAMS=OFF \
|
||||
-DINSTALL_MANPAGES=OFF \
|
||||
-DWITH_STACK_PROTECTOR=OFF \
|
||||
$cmakeDirArgs
|
||||
ninja -C builddir $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
ninja -C builddir install
|
||||
|
||||
prepareInstalledDevelLibs libFLAC libFLAC++
|
||||
fixPkgconfig
|
||||
|
||||
rm -rf $dataDir $developDir
|
||||
}
|
||||
80
media-libs/flac/patches/flac-1.3.4.patchset
Normal file
80
media-libs/flac/patches/flac-1.3.4.patchset
Normal file
@@ -0,0 +1,80 @@
|
||||
From fe1b49262960882694b9da55d7b2054c4d4d4fdb Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Sat, 26 Aug 2017 11:50:31 +0200
|
||||
Subject: gcc2 fixes
|
||||
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 9bcb107..d20871a 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -33,11 +33,11 @@ find_package(Iconv)
|
||||
set(HAVE_ICONV ${Iconv_FOUND})
|
||||
|
||||
if(CMAKE_C_COMPILER_ID MATCHES "GNU|Clang")
|
||||
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Waggregate-return -Wcast-align -Wnested-externs -Wshadow -Wundef -Wmissing-declarations -Winline")
|
||||
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wstrict-prototypes -Wmissing-prototypes -Waggregate-return -Wcast-align -Wnested-externs -Wshadow -Wundef -Wmissing-declarations -Winline")
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3 -funroll-loops")
|
||||
endif()
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
|
||||
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wcast-align -Wshadow -Wwrite-strings -Wctor-dtor-privacy -Wnon-virtual-dtor -Wreorder -Wsign-promo -Wundef")
|
||||
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wcast-align -Wshadow -Wwrite-strings -Wctor-dtor-privacy -Wnon-virtual-dtor -Wreorder -Wsign-promo -Wundef")
|
||||
endif()
|
||||
|
||||
include(CMakePackageConfigHelpers)
|
||||
diff --git a/include/FLAC++/decoder.h b/include/FLAC++/decoder.h
|
||||
index 6a2d901..56dd1c8 100644
|
||||
--- a/include/FLAC++/decoder.h
|
||||
+++ b/include/FLAC++/decoder.h
|
||||
@@ -225,11 +225,15 @@ namespace FLAC {
|
||||
File();
|
||||
virtual ~File();
|
||||
|
||||
+#if __GNUC__ > 2
|
||||
using Stream::init;
|
||||
+#endif
|
||||
virtual ::FLAC__StreamDecoderInitStatus init(FILE *file); ///< See FLAC__stream_decoder_init_FILE()
|
||||
virtual ::FLAC__StreamDecoderInitStatus init(const char *filename); ///< See FLAC__stream_decoder_init_file()
|
||||
virtual ::FLAC__StreamDecoderInitStatus init(const std::string &filename); ///< See FLAC__stream_decoder_init_file()
|
||||
+#if __GNUC__ > 2
|
||||
using Stream::init_ogg;
|
||||
+#endif
|
||||
virtual ::FLAC__StreamDecoderInitStatus init_ogg(FILE *file); ///< See FLAC__stream_decoder_init_ogg_FILE()
|
||||
virtual ::FLAC__StreamDecoderInitStatus init_ogg(const char *filename); ///< See FLAC__stream_decoder_init_ogg_file()
|
||||
virtual ::FLAC__StreamDecoderInitStatus init_ogg(const std::string &filename); ///< See FLAC__stream_decoder_init_ogg_file()
|
||||
diff --git a/include/FLAC++/encoder.h b/include/FLAC++/encoder.h
|
||||
index ce8d80a..fd40f0b 100644
|
||||
--- a/include/FLAC++/encoder.h
|
||||
+++ b/include/FLAC++/encoder.h
|
||||
@@ -235,11 +235,15 @@ namespace FLAC {
|
||||
File();
|
||||
virtual ~File();
|
||||
|
||||
+#if __GNUC__ > 2
|
||||
using Stream::init;
|
||||
+#endif
|
||||
virtual ::FLAC__StreamEncoderInitStatus init(FILE *file); ///< See FLAC__stream_encoder_init_FILE()
|
||||
virtual ::FLAC__StreamEncoderInitStatus init(const char *filename); ///< See FLAC__stream_encoder_init_file()
|
||||
virtual ::FLAC__StreamEncoderInitStatus init(const std::string &filename); ///< See FLAC__stream_encoder_init_file()
|
||||
+#if __GNUC__ > 2
|
||||
using Stream::init_ogg;
|
||||
+#endif
|
||||
virtual ::FLAC__StreamEncoderInitStatus init_ogg(FILE *file); ///< See FLAC__stream_encoder_init_ogg_FILE()
|
||||
virtual ::FLAC__StreamEncoderInitStatus init_ogg(const char *filename); ///< See FLAC__stream_encoder_init_ogg_file()
|
||||
virtual ::FLAC__StreamEncoderInitStatus init_ogg(const std::string &filename); ///< See FLAC__stream_encoder_init_ogg_file()
|
||||
diff --git a/src/libFLAC++/metadata.cpp b/src/libFLAC++/metadata.cpp
|
||||
index 374e5b3..169f5b8 100644
|
||||
--- a/src/libFLAC++/metadata.cpp
|
||||
+++ b/src/libFLAC++/metadata.cpp
|
||||
@@ -827,7 +827,7 @@ namespace FLAC {
|
||||
clear_field_name();
|
||||
clear_field_value();
|
||||
|
||||
- const char *p = static_cast<const char *>(std::memchr(entry_.entry, '=', entry_.length));
|
||||
+ const char *p = (const char *)(std::memchr(entry_.entry, '=', entry_.length));
|
||||
|
||||
if(0 == p)
|
||||
p = reinterpret_cast<const char *>(entry_.entry) + entry_.length;
|
||||
--
|
||||
2.30.2
|
||||
|
||||
Reference in New Issue
Block a user