mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
media-sound/mac: bump to 4.40. (#3390)
This commit is contained in:
@@ -1,69 +0,0 @@
|
||||
VERSION = 4
|
||||
|
||||
CXXOPTS = -I Source/Shared -I Source/MACLib -DPLATFORM_LINUX -c
|
||||
LDOPTS = -lstdc++
|
||||
|
||||
DLLLDOPTS = -shared
|
||||
CMDLDOPTS =
|
||||
|
||||
DLLNAME = libMAC.so.$(VERSION)
|
||||
CMDNAME = mac
|
||||
|
||||
#Set folders if not provided.
|
||||
ifndef prefix
|
||||
prefix = /usr/local
|
||||
endif
|
||||
|
||||
ifndef bindir
|
||||
bindir = $(prefix)/bin
|
||||
endif
|
||||
|
||||
ifndef libdir
|
||||
libdir = $(prefix)/lib
|
||||
endif
|
||||
|
||||
ifndef includedir
|
||||
includedir = $(prefix)/include
|
||||
endif
|
||||
|
||||
SHAREDOBJECTS = Source/Shared/CharacterHelper.o Source/Shared/CircleBuffer.o Source/Shared/GlobalFunctions.o Source/Shared/StdLibFileIO.o Source/Shared/WinFileIO.o
|
||||
LIBOBJECTS = Source/MACLib/APECompress.o Source/MACLib/APECompressCore.o Source/MACLib/APECompressCreate.o Source/MACLib/APEDecompress.o Source/MACLib/APEHeader.o Source/MACLib/APEInfo.o Source/MACLib/APELink.o Source/MACLib/APESimple.o Source/MACLib/APETag.o Source/MACLib/BitArray.o Source/MACLib/MACLib.o Source/MACLib/MACProgressHelper.o Source/MACLib/MD5.o Source/MACLib/NewPredictor.o Source/MACLib/NNFilter.o Source/MACLib/Prepare.o Source/MACLib/UnBitArray.o Source/MACLib/UnBitArrayBase.o Source/MACLib/WAVInputSource.o Source/MACLib/Old/Anti-Predictor.o Source/MACLib/Old/AntiPredictorExtraHigh.o Source/MACLib/Old/AntiPredictorFast.o Source/MACLib/Old/AntiPredictorHigh.o Source/MACLib/Old/AntiPredictorNormal.o Source/MACLib/Old/APEDecompressCore.o Source/MACLib/Old/APEDecompressOld.o Source/MACLib/Old/UnBitArrayOld.o Source/MACLib/Old/UnMAC.o
|
||||
DLLOBJECTS = Source/MACDll/MACDll.o
|
||||
CMDOBJECTS = Source/Console/Console.o
|
||||
|
||||
all: $(DLLNAME) $(CMDNAME)
|
||||
|
||||
clean:
|
||||
rm -f $(DLLNAME) $(SHAREDOBJECTS) $(LIBOBJECTS) $(DLLOBJECTS) $(CMDNAME) $(CMDOBJECTS)
|
||||
|
||||
install:
|
||||
mkdir -p $(bindir)
|
||||
cp $(CMDNAME) $(bindir)
|
||||
|
||||
mkdir -p $(libdir)
|
||||
cp $(DLLNAME) $(libdir)
|
||||
ln -sf $(DLLNAME) $(libdir)/libMAC.so
|
||||
|
||||
mkdir -p $(includedir)/MAC
|
||||
cp Shared/*.h $(includedir)/MAC
|
||||
|
||||
$(DLLNAME): $(SHAREDOBJECTS) $(LIBOBJECTS) $(DLLOBJECTS)
|
||||
$(CXX) $(SHAREDOBJECTS) $(LIBOBJECTS) $(DLLOBJECTS) $(LDOPTS) $(LDFLAGS) $(DLLLDOPTS) -o $@
|
||||
|
||||
$(CMDNAME): $(DLLNAME) $(CMDOBJECTS)
|
||||
$(CXX) $(CMDOBJECTS) $(DLLNAME) $(LDOPTS) $(LDFLAGS) $(CMDLDOPTS) -o $@
|
||||
|
||||
Source/Shared/%.o: Source/Shared/%.cpp
|
||||
$(CXX) $(CXXOPTS) $(CXXFLAGS) $< -o $@
|
||||
|
||||
Source/MACLib/%.o: Source/MACLib/%.cpp
|
||||
$(CXX) $(CXXOPTS) $(CXXFLAGS) $< -o $@
|
||||
|
||||
Source/MACLib/Old/%.o: Source/MACLib/Old/%.cpp
|
||||
$(CXX) $(CXXOPTS) $(CXXFLAGS) $< -o $@
|
||||
|
||||
Source/MACDll/%.o: Source/MACDll/%.cpp
|
||||
$(CXX) $(CXXOPTS) $(CXXFLAGS) $< -o $@
|
||||
|
||||
Source/Console/%.o: Source/Console/%.cpp
|
||||
$(CXX) $(CXXOPTS) $(CXXFLAGS) $< -o $@
|
||||
@@ -7,10 +7,8 @@ COPYRIGHT="2000-2018 Matthew T. Ashland"
|
||||
LICENSE="Monkey's Audio SDK and Source Code License Agreement"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://www.monkeysaudio.com/files/MAC_SDK_${portVersion/./}.zip"
|
||||
CHECKSUM_SHA256="5e66c438127f8a2a3345c25fa23c6097fd81b44251ad269f2fba9800425bcec3"
|
||||
CHECKSUM_SHA256="c04295ea905b504ea7f98f9aa1eeca4927b9fe4f9da221fea3e76ef6cc252441"
|
||||
SOURCE_DIR=""
|
||||
PATCHES="mac-$portVersion.patchset"
|
||||
ADDITIONAL_FILES="Makefile"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
@@ -53,15 +51,14 @@ BUILD_PREREQUIRES="
|
||||
|
||||
BUILD()
|
||||
{
|
||||
cp "$portDir"/additional-files/Makefile .
|
||||
|
||||
make $jobArgs
|
||||
make -f Source/Projects/NonWindows/Makefile $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make prefix="$prefix" bindir="$commandBinDir" libdir="$libDir" \
|
||||
includedir="$includeDir" install
|
||||
make -f Source/Projects/NonWindows/Makefile \
|
||||
prefix="$prefix" bindir="$commandBinDir" \
|
||||
libdir="$libDir" includedir="$includeDir" install
|
||||
|
||||
install -m 755 -d "$developDocDir"
|
||||
install -m 644 -t "$developDocDir" Readme.txt
|
||||
@@ -1,258 +0,0 @@
|
||||
From 05dd48adcca1be839f7099770e22109062a01de6 Mon Sep 17 00:00:00 2001
|
||||
From: Robert Kausch <robert.kausch@freac.org>
|
||||
Date: Sat, 3 Nov 2018 18:31:20 +0100
|
||||
Subject: Fixes for building on Haiku.
|
||||
|
||||
|
||||
diff --git a/Shared/All.h b/Shared/All.h
|
||||
index b34d3b1..12d7a89 100644
|
||||
--- a/Shared/All.h
|
||||
+++ b/Shared/All.h
|
||||
@@ -57,7 +57,9 @@ Global compiler settings (useful for porting)
|
||||
*****************************************************************************************/
|
||||
// assembly code (helps performance, but limits portability)
|
||||
#if !defined(PLATFORM_ARM) && !defined(PLATFORM_ANDROID)
|
||||
- #define ENABLE_SSE_ASSEMBLY
|
||||
+ #ifdef __SSE2__
|
||||
+ #define ENABLE_SSE_ASSEMBLY
|
||||
+ #endif
|
||||
#ifdef _MSC_VER // doesn't compile in gcc
|
||||
#ifndef PLATFORM_x64
|
||||
#define ENABLE_MMX_ASSEMBLY
|
||||
diff --git a/Shared/MACDll.h b/Shared/MACDll.h
|
||||
index e7eb619..487d5e8 100644
|
||||
--- a/Shared/MACDll.h
|
||||
+++ b/Shared/MACDll.h
|
||||
@@ -30,15 +30,19 @@ Helper functions
|
||||
extern "C"
|
||||
{
|
||||
DLLEXPORT int __stdcall GetVersionNumber();
|
||||
+#ifdef PLATFORM_WINDOWS
|
||||
DLLEXPORT int __stdcall GetInterfaceCompatibility(int nVersion, BOOL bDisplayWarningsOnFailure = TRUE, HWND hwndParent = NULL);
|
||||
DLLEXPORT int __stdcall ShowFileInfoDialog(const APE::str_ansi * pFilename, HWND hwndWindow);
|
||||
+#endif
|
||||
DLLEXPORT int __stdcall TagFileSimple(const APE::str_ansi * pFilename, const char * pArtist, const char * pAlbum, const char * pTitle, const char * pComment, const char * pGenre, const char * pYear, const char * pTrack, BOOL bClearFirst, BOOL bUseOldID3);
|
||||
DLLEXPORT int __stdcall GetID3Tag(const APE::str_ansi * pFilename, APE::ID3_TAG * pID3Tag);
|
||||
DLLEXPORT int __stdcall RemoveTag(const APE::str_ansi * pFilename);
|
||||
}
|
||||
|
||||
typedef int (__stdcall * proc_GetVersionNumber)();
|
||||
+#ifdef PLATFORM_WINDOWS
|
||||
typedef int (__stdcall * proc_GetInterfaceCompatibility)(int, BOOL, HWND);
|
||||
+#endif
|
||||
|
||||
/*****************************************************************************************
|
||||
IAPECompress wrapper(s)
|
||||
diff --git a/Shared/NoWindows.h b/Shared/NoWindows.h
|
||||
index d188ee0..a0f4116 100644
|
||||
--- a/Shared/NoWindows.h
|
||||
+++ b/Shared/NoWindows.h
|
||||
@@ -32,6 +32,9 @@ typedef long LRESULT;
|
||||
|
||||
#define ZeroMemory(POINTER, BYTES) memset(POINTER, 0, BYTES);
|
||||
|
||||
+#define TRUE true
|
||||
+#define FALSE false
|
||||
+
|
||||
#define CALLBACK
|
||||
|
||||
#define _T(x) L ## x
|
||||
diff --git a/Source/Console/Console.cpp b/Source/Console/Console.cpp
|
||||
index b990169..ee30b30 100644
|
||||
--- a/Source/Console/Console.cpp
|
||||
+++ b/Source/Console/Console.cpp
|
||||
@@ -20,6 +20,15 @@ using namespace APE;
|
||||
#define CONVERT_MODE 3
|
||||
#define UNDEFINED_MODE -1
|
||||
|
||||
+#define _tmain main
|
||||
+#define _tcscpy strcpy
|
||||
+#define _tcsncpy strncpy
|
||||
+#define _tcsnicmp strncasecmp
|
||||
+#define _ftprintf fprintf
|
||||
+#define _ttoi atoi
|
||||
+#define TCHAR char
|
||||
+#define _T(x) x
|
||||
+
|
||||
// global variables
|
||||
TICK_COUNT_TYPE g_nInitialTickCount = 0;
|
||||
|
||||
@@ -89,13 +98,8 @@ int _tmain(int argc, TCHAR * argv[])
|
||||
}
|
||||
|
||||
// store the filenames
|
||||
- #ifdef _UNICODE
|
||||
- spInputFilename.Assign(argv[1], TRUE, FALSE);
|
||||
- spOutputFilename.Assign(argv[2], TRUE, FALSE);
|
||||
- #else
|
||||
- spInputFilename.Assign(CAPECharacterHelper::GetUTF16FromANSI(argv[1]), TRUE);
|
||||
- spOutputFilename.Assign(CAPECharacterHelper::GetUTF16FromANSI(argv[2]), TRUE);
|
||||
- #endif
|
||||
+ spInputFilename.Assign(CAPECharacterHelper::GetUTF16FromUTF8((str_utf8*) argv[1]), TRUE);
|
||||
+ spOutputFilename.Assign(CAPECharacterHelper::GetUTF16FromUTF8((str_utf8*) argv[2]), TRUE);
|
||||
|
||||
// verify that the input file exists
|
||||
if (!FileExists(spInputFilename))
|
||||
diff --git a/Source/MACDll/MACDll.cpp b/Source/MACDll/MACDll.cpp
|
||||
index 0d74e64..cb5c4d5 100644
|
||||
--- a/Source/MACDll/MACDll.cpp
|
||||
+++ b/Source/MACDll/MACDll.cpp
|
||||
@@ -1,9 +1,16 @@
|
||||
-#include "stdafx.h"
|
||||
#include "resource.h"
|
||||
#include "MACDll.h"
|
||||
+
|
||||
+using namespace APE;
|
||||
+
|
||||
+#ifdef PLATFORM_WINDOWS
|
||||
#include "WinFileIO.h"
|
||||
#include "APEInfoDialog.h"
|
||||
#include "WAVInfoDialog.h"
|
||||
+#else
|
||||
+#include "StdLibFileIO.h"
|
||||
+#endif
|
||||
+
|
||||
#include "APEDecompress.h"
|
||||
#include "APECompressCreate.h"
|
||||
#include "APECompressCore.h"
|
||||
@@ -17,6 +24,7 @@ int __stdcall GetVersionNumber()
|
||||
return MAC_FILE_VERSION_NUMBER;
|
||||
}
|
||||
|
||||
+#ifdef PLATFORM_WINDOWS
|
||||
int __stdcall GetInterfaceCompatibility(int nVersion, BOOL bDisplayWarningsOnFailure, HWND hwndParent)
|
||||
{
|
||||
int nRetVal = 0;
|
||||
@@ -26,7 +34,7 @@ int __stdcall GetInterfaceCompatibility(int nVersion, BOOL bDisplayWarningsOnFai
|
||||
if (bDisplayWarningsOnFailure)
|
||||
{
|
||||
TCHAR cMessage[1024];
|
||||
- _stprintf_s(cMessage, 1024, _T("You system does not have a new enough version of Monkey's Audio installed.\n")
|
||||
+ _stprintf(cMessage, _T("You system does not have a new enough version of Monkey's Audio installed.\n")
|
||||
_T("Please visit www.monkeysaudio.com for the latest version.\n\n(version %.2f or later required)"),
|
||||
float(nVersion) / float(1000));
|
||||
MessageBox(hwndParent, cMessage, _T("Please Update Monkey's Audio"), MB_OK | MB_ICONINFORMATION);
|
||||
@@ -38,7 +46,7 @@ int __stdcall GetInterfaceCompatibility(int nVersion, BOOL bDisplayWarningsOnFai
|
||||
if (bDisplayWarningsOnFailure)
|
||||
{
|
||||
TCHAR cMessage[1024];
|
||||
- _stprintf_s(cMessage, 1024, _T("This program is trying to use an old version of Monkey's Audio.\n")
|
||||
+ _stprintf(cMessage, _T("This program is trying to use an old version of Monkey's Audio.\n")
|
||||
_T("Please contact the author about updating their support for Monkey's Audio.\n\n")
|
||||
_T("Monkey's Audio currently installed: %.2f\nProgram is searching for: %.2f"),
|
||||
float(MAC_FILE_VERSION_NUMBER) / float(1000), float(nVersion) / float(1000));
|
||||
@@ -48,7 +56,9 @@ int __stdcall GetInterfaceCompatibility(int nVersion, BOOL bDisplayWarningsOnFai
|
||||
|
||||
return nRetVal;
|
||||
}
|
||||
+#endif
|
||||
|
||||
+#ifdef _MSC_VER
|
||||
int __stdcall ShowFileInfoDialog(const str_ansi * pFilename, HWND hwndWindow)
|
||||
{
|
||||
// convert the filename
|
||||
@@ -87,6 +97,7 @@ int __stdcall ShowFileInfoDialog(const str_ansi * pFilename, HWND hwndWindow)
|
||||
return 0;
|
||||
};
|
||||
}
|
||||
+#endif
|
||||
|
||||
int __stdcall TagFileSimple(const str_ansi * pFilename, const char * pArtist, const char * pAlbum, const char * pTitle, const char * pComment, const char * pGenre, const char * pYear, const char * pTrack, BOOL bClearFirst, BOOL bUseOldID3)
|
||||
{
|
||||
diff --git a/Source/MACDll/MACDll.h b/Source/MACDll/MACDll.h
|
||||
index e7eb619..487d5e8 100644
|
||||
--- a/Source/MACDll/MACDll.h
|
||||
+++ b/Source/MACDll/MACDll.h
|
||||
@@ -30,15 +30,19 @@ Helper functions
|
||||
extern "C"
|
||||
{
|
||||
DLLEXPORT int __stdcall GetVersionNumber();
|
||||
+#ifdef PLATFORM_WINDOWS
|
||||
DLLEXPORT int __stdcall GetInterfaceCompatibility(int nVersion, BOOL bDisplayWarningsOnFailure = TRUE, HWND hwndParent = NULL);
|
||||
DLLEXPORT int __stdcall ShowFileInfoDialog(const APE::str_ansi * pFilename, HWND hwndWindow);
|
||||
+#endif
|
||||
DLLEXPORT int __stdcall TagFileSimple(const APE::str_ansi * pFilename, const char * pArtist, const char * pAlbum, const char * pTitle, const char * pComment, const char * pGenre, const char * pYear, const char * pTrack, BOOL bClearFirst, BOOL bUseOldID3);
|
||||
DLLEXPORT int __stdcall GetID3Tag(const APE::str_ansi * pFilename, APE::ID3_TAG * pID3Tag);
|
||||
DLLEXPORT int __stdcall RemoveTag(const APE::str_ansi * pFilename);
|
||||
}
|
||||
|
||||
typedef int (__stdcall * proc_GetVersionNumber)();
|
||||
+#ifdef PLATFORM_WINDOWS
|
||||
typedef int (__stdcall * proc_GetInterfaceCompatibility)(int, BOOL, HWND);
|
||||
+#endif
|
||||
|
||||
/*****************************************************************************************
|
||||
IAPECompress wrapper(s)
|
||||
diff --git a/Source/MACLib/WAVInputSource.cpp b/Source/MACLib/WAVInputSource.cpp
|
||||
index a4f2eef..acbce21 100644
|
||||
--- a/Source/MACLib/WAVInputSource.cpp
|
||||
+++ b/Source/MACLib/WAVInputSource.cpp
|
||||
@@ -9,8 +9,8 @@ namespace APE
|
||||
|
||||
struct RIFF_HEADER
|
||||
{
|
||||
- char cRIFF[4]; // the characters 'RIFF' indicating that it's a RIFF file
|
||||
- unsigned long nBytes; // the number of bytes following this header
|
||||
+ char cRIFF[4]; // the characters 'RIFF' indicating that it's a RIFF file
|
||||
+ uint32 nBytes; // the number of bytes following this header
|
||||
};
|
||||
|
||||
struct DATA_TYPE_ID_HEADER
|
||||
@@ -20,18 +20,18 @@ struct DATA_TYPE_ID_HEADER
|
||||
|
||||
struct WAV_FORMAT_HEADER
|
||||
{
|
||||
- unsigned short nFormatTag; // the format of the WAV...should equal 1 for a PCM file
|
||||
- unsigned short nChannels; // the number of channels
|
||||
- unsigned long nSamplesPerSecond; // the number of samples per second
|
||||
- unsigned long nBytesPerSecond; // the bytes per second
|
||||
- unsigned short nBlockAlign; // block alignment
|
||||
- unsigned short nBitsPerSample; // the number of bits per sample
|
||||
+ uint16 nFormatTag; // the format of the WAV...should equal 1 for a PCM file
|
||||
+ uint16 nChannels; // the number of channels
|
||||
+ uint32 nSamplesPerSecond; // the number of samples per second
|
||||
+ uint32 nBytesPerSecond; // the bytes per second
|
||||
+ uint16 nBlockAlign; // block alignment
|
||||
+ uint16 nBitsPerSample; // the number of bits per sample
|
||||
};
|
||||
|
||||
struct RIFF_CHUNK_HEADER
|
||||
{
|
||||
- char cChunkLabel[4]; // should equal "data" indicating the data chunk
|
||||
- unsigned long nChunkBytes; // the bytes of the chunk
|
||||
+ char cChunkLabel[4]; // should equal "data" indicating the data chunk
|
||||
+ uint32 nChunkBytes; // the bytes of the chunk
|
||||
};
|
||||
|
||||
|
||||
diff --git a/Source/Shared/All.h b/Source/Shared/All.h
|
||||
index b34d3b1..12d7a89 100644
|
||||
--- a/Source/Shared/All.h
|
||||
+++ b/Source/Shared/All.h
|
||||
@@ -57,7 +57,9 @@ Global compiler settings (useful for porting)
|
||||
*****************************************************************************************/
|
||||
// assembly code (helps performance, but limits portability)
|
||||
#if !defined(PLATFORM_ARM) && !defined(PLATFORM_ANDROID)
|
||||
- #define ENABLE_SSE_ASSEMBLY
|
||||
+ #ifdef __SSE2__
|
||||
+ #define ENABLE_SSE_ASSEMBLY
|
||||
+ #endif
|
||||
#ifdef _MSC_VER // doesn't compile in gcc
|
||||
#ifndef PLATFORM_x64
|
||||
#define ENABLE_MMX_ASSEMBLY
|
||||
diff --git a/Source/Shared/NoWindows.h b/Source/Shared/NoWindows.h
|
||||
index d188ee0..a0f4116 100644
|
||||
--- a/Source/Shared/NoWindows.h
|
||||
+++ b/Source/Shared/NoWindows.h
|
||||
@@ -32,6 +32,9 @@ typedef long LRESULT;
|
||||
|
||||
#define ZeroMemory(POINTER, BYTES) memset(POINTER, 0, BYTES);
|
||||
|
||||
+#define TRUE true
|
||||
+#define FALSE false
|
||||
+
|
||||
#define CALLBACK
|
||||
|
||||
#define _T(x) L ## x
|
||||
--
|
||||
2.19.1
|
||||
Reference in New Issue
Block a user