mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-08 21:00:05 +02:00
qmmp: fix build for x86
* fix skin paths * fix build archive input plugin * use taglib 2.x version * use ffmpeg 6.x vesrion * fix pkgconfig
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From d8b8bfadf860e6139c1759a56eb17399b091de8e Mon Sep 17 00:00:00 2001
|
||||
From 8fb34a199e131b0466c80d8a02921a6a8ecfb833 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Sat, 8 Mar 2025 23:09:49 +1000
|
||||
Subject: Fix for Haiku
|
||||
@@ -468,16 +468,6 @@ index 0000000..ec26dc7
|
||||
+};
|
||||
+
|
||||
+#endif
|
||||
diff --git a/src/plugins/Output/mediakit/translations/mediakit_plugin_en.qm b/src/plugins/Output/mediakit/translations/mediakit_plugin_en.qm
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..937ea3e78662d66ef3264d8fa715599d03e338ed
|
||||
GIT binary patch
|
||||
literal 33
|
||||
ocmcE7ks@*G{hX<16=n7(EZlo{IRgU&YieG6XmAIR#l*-60Q^r2(EtDd
|
||||
|
||||
literal 0
|
||||
HcmV?d00001
|
||||
|
||||
diff --git a/src/plugins/Output/mediakit/translations/mediakit_plugin_en.ts b/src/plugins/Output/mediakit/translations/mediakit_plugin_en.ts
|
||||
new file mode 100644
|
||||
index 0000000..48f6632
|
||||
@@ -554,3 +544,101 @@ index 90c85bb..ce45d7f 100644
|
||||
--
|
||||
2.48.1
|
||||
|
||||
|
||||
From d56844cf6b4d04820978cdc745c1a8fa2d1e101f Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Sun, 9 Mar 2025 07:03:03 +0000
|
||||
Subject: Fix build archive input plugin
|
||||
|
||||
|
||||
diff --git a/src/plugins/Input/archive/archivetagreader.cpp b/src/plugins/Input/archive/archivetagreader.cpp
|
||||
index 285b573..51777c6 100644
|
||||
--- a/src/plugins/Input/archive/archivetagreader.cpp
|
||||
+++ b/src/plugins/Input/archive/archivetagreader.cpp
|
||||
@@ -79,7 +79,7 @@ public:
|
||||
{
|
||||
return m_input->isOpen();
|
||||
}
|
||||
- virtual void seek(long offset, Position p = Beginning) override
|
||||
+ virtual void seek(TagLib::offset_t offset, Position p = Beginning)
|
||||
{
|
||||
switch (p)
|
||||
{
|
||||
@@ -99,15 +99,15 @@ public:
|
||||
m_input->seek(0);
|
||||
TagLib::IOStream::clear();
|
||||
}
|
||||
- virtual long tell() const override
|
||||
+ virtual TagLib::offset_t tell() const
|
||||
{
|
||||
return m_input->pos();
|
||||
}
|
||||
- virtual long length() override
|
||||
+ virtual TagLib::offset_t length()
|
||||
{
|
||||
return m_input->size();
|
||||
}
|
||||
- virtual void truncate(long) override
|
||||
+ virtual void truncate(TagLib::offset_t)
|
||||
{}
|
||||
|
||||
private:
|
||||
--
|
||||
2.48.1
|
||||
|
||||
|
||||
From 03bc9e1d8ff1a9bd410fa6cd898ac1ea13aab01e Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Sun, 9 Mar 2025 19:02:39 +1000
|
||||
Subject: Fix skins paths
|
||||
|
||||
|
||||
diff --git a/src/plugins/Ui/skinned/skinnedsettings.cpp b/src/plugins/Ui/skinned/skinnedsettings.cpp
|
||||
index a8f3061..96b38b3 100644
|
||||
--- a/src/plugins/Ui/skinned/skinnedsettings.cpp
|
||||
+++ b/src/plugins/Ui/skinned/skinnedsettings.cpp
|
||||
@@ -83,7 +83,7 @@ void SkinnedSettings::on_skinInstallButton_clicked()
|
||||
for(const QString &path : std::as_const(files))
|
||||
{
|
||||
QFile file(path);
|
||||
- file.copy(Qmmp::userDataPath() + u"/skins"_s + QFileInfo(path).fileName());
|
||||
+ file.copy(Qmmp::userDataPath() + u"/skins/"_s + QFileInfo(path).fileName());
|
||||
}
|
||||
loadSkins();
|
||||
}
|
||||
@@ -144,6 +144,10 @@ void SkinnedSettings::loadSkins()
|
||||
Qmmp::configDir() + QStringLiteral("/skins"),
|
||||
#if defined(Q_OS_WIN) && !defined(Q_OS_CYGWIN)
|
||||
qApp->applicationDirPath() + QStringLiteral("/skins")
|
||||
+#elif defined(Q_OS_HAIKU)
|
||||
+ qApp->applicationDirPath() + QStringLiteral("/skins"),
|
||||
+ Qmmp::userDataPath() + QStringLiteral("/skins"),
|
||||
+ Qmmp::dataPath() + QStringLiteral("/skins")
|
||||
#else
|
||||
Qmmp::userDataPath() + QStringLiteral("/skins"),
|
||||
Qmmp::dataPath() + QStringLiteral("/skins"),
|
||||
diff --git a/src/qmmp/qmmp.cpp b/src/qmmp/qmmp.cpp
|
||||
index ce45d7f..251310b 100644
|
||||
--- a/src/qmmp/qmmp.cpp
|
||||
+++ b/src/qmmp/qmmp.cpp
|
||||
@@ -167,7 +167,7 @@ void Qmmp::setUiLanguageID(const QString &code)
|
||||
|
||||
QString Qmmp::dataPath()
|
||||
{
|
||||
-#if defined(Q_OS_WIN) && !defined(Q_OS_CYGWIN)
|
||||
+#if (defined(Q_OS_WIN) && !defined(Q_OS_CYGWIN)) || defined(__HAIKU__)
|
||||
return qApp->applicationDirPath();
|
||||
#else
|
||||
return QDir(QStringLiteral("%1/../share/qmmp" APP_NAME_SUFFIX).arg(qApp->applicationDirPath())).absolutePath();
|
||||
@@ -176,7 +176,7 @@ QString Qmmp::dataPath()
|
||||
|
||||
QString Qmmp::userDataPath()
|
||||
{
|
||||
-#if defined(Q_OS_WIN) && !defined(Q_OS_CYGWIN)
|
||||
+#if (defined(Q_OS_WIN) && !defined(Q_OS_CYGWIN)) || defined(__HAIKU__)
|
||||
return configDir();
|
||||
#else
|
||||
if(m_configDir.isEmpty())
|
||||
--
|
||||
2.48.1
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ PROVIDES="
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
# lib:libarchive$secondaryArchSuffix
|
||||
lib:libarchive$secondaryArchSuffix
|
||||
lib:libavcodec$secondaryArchSuffix
|
||||
lib:libavformat$secondaryArchSuffix
|
||||
lib:libavutil$secondaryArchSuffix
|
||||
@@ -35,6 +35,7 @@ REQUIRES="
|
||||
lib:libcdio$secondaryArchSuffix
|
||||
lib:libcdio_cdda$secondaryArchSuffix
|
||||
lib:libcdio_paranoia$secondaryArchSuffix
|
||||
lib:libcrypto$secondaryArchSuffix
|
||||
lib:libcurl$secondaryArchSuffix
|
||||
lib:libenca$secondaryArchSuffix
|
||||
lib:libfaad$secondaryArchSuffix
|
||||
@@ -58,10 +59,12 @@ REQUIRES="
|
||||
lib:libsidplayfp$secondaryArchSuffix
|
||||
lib:libsndfile$secondaryArchSuffix
|
||||
lib:libsoxr$secondaryArchSuffix
|
||||
lib:libssl$secondaryArchSuffix
|
||||
lib:libtag$secondaryArchSuffix
|
||||
lib:libvorbis$secondaryArchSuffix
|
||||
lib:libwavpack$secondaryArchSuffix
|
||||
lib:libwildmidi$secondaryArchSuffix
|
||||
lib:libxml2$secondaryArchSuffix
|
||||
lib:libxmp$secondaryArchSuffix
|
||||
"
|
||||
|
||||
@@ -77,9 +80,9 @@ REQUIRES_devel="
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
qt6_tools${secondaryArchSuffix}_devel
|
||||
# devel:libarchive$secondaryArchSuffix
|
||||
devel:libavcodec$secondaryArchSuffix > 60
|
||||
devel:libavformat$secondaryArchSuffix > 60
|
||||
devel:libarchive$secondaryArchSuffix
|
||||
devel:libavcodec$secondaryArchSuffix >= 60
|
||||
devel:libavformat$secondaryArchSuffix >= 60
|
||||
devel:libbs2b$secondaryArchSuffix
|
||||
devel:libcddb$secondaryArchSuffix
|
||||
devel:libcdio$secondaryArchSuffix >= 19
|
||||
@@ -109,10 +112,12 @@ BUILD_REQUIRES="
|
||||
devel:libsidplayfp$secondaryArchSuffix
|
||||
devel:libsndfile$secondaryArchSuffix
|
||||
devel:libsoxr$secondaryArchSuffix
|
||||
devel:libtag$secondaryArchSuffix
|
||||
devel:libssl$secondaryArchSuffix >= 3
|
||||
devel:libtag$secondaryArchSuffix >= 2
|
||||
devel:libvorbis$secondaryArchSuffix
|
||||
devel:libwavpack$secondaryArchSuffix
|
||||
devel:libwildmidi$secondaryArchSuffix
|
||||
devel:libxml2$secondaryArchSuffix
|
||||
devel:libxmp$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
@@ -134,13 +139,14 @@ PATCH()
|
||||
|
||||
BUILD()
|
||||
{
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake .. $cmakeDirArgs \
|
||||
cmake -S . -B build \ \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=$appsDir/Qmmp \
|
||||
-DCMAKE_INSTALL_BINDIR=$appsDir/Qmmp \
|
||||
-DCMAKE_INSTALL_INCLUDEDIR=$includeDir \
|
||||
-DCMAKE_INSTALL_LIBDIR=$libDir \
|
||||
-DCMAKE_INSTALL_DATADIR=$dataDir \
|
||||
-DPLUGIN_DIR=$appsDir/Qmmp/plugins \
|
||||
-DCMAKE_BUILD_TYPE=RELEASE \
|
||||
-DUSE_GNOMEHOTKEY=OFF \
|
||||
-DUSE_HAL=OFF \
|
||||
-DUSE_HOTKEY=OFF \
|
||||
@@ -152,20 +158,26 @@ BUILD()
|
||||
-DUSE_SKINNED=ON \
|
||||
-DUSE_UDISKS2=OFF
|
||||
|
||||
make $jobArgs
|
||||
cmake --build build $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd build
|
||||
make install
|
||||
mkdir -p $appsDir/Qmmp/skins $libDir
|
||||
mv $appsDir/Qmmp/lib/* $libDir
|
||||
make -C build install
|
||||
|
||||
mkdir -p $appsDir/Qmmp/skins
|
||||
cp -f $portDir/additional-files/*.wsz $appsDir/Qmmp/skins
|
||||
mv $appsDir/Qmmp/qmmp $appsDir/Qmmp/Qmmp
|
||||
rm -rf $dataDir
|
||||
|
||||
fixPkgconfig
|
||||
|
||||
sed -i "s|libdir=.*|libdir=$developLibDir|" $developLibDir/pkgconfig/qmmp.pc
|
||||
sed -i "s|includedir=.*|includedir=$includeDir|" $developLibDir/pkgconfig/qmmp.pc
|
||||
sed -i "s|plugindir=.*|plugindir=\${prefix}/plugins|" $developLibDir/pkgconfig/qmmp.pc
|
||||
sed -i "s|libdir=.*|libdir=$developLibDir|" $developLibDir/pkgconfig/qmmpui.pc
|
||||
sed -i "s|includedir=.*|includedir=$includeDir|" $developLibDir/pkgconfig/qmmpui.pc
|
||||
|
||||
prepareInstalledDevelLibs libqmmp libqmmpui
|
||||
packageEntries devel $developDir
|
||||
|
||||
|
||||
Reference in New Issue
Block a user