libmusicbrainz: new major soversion and split C++ interface.

This commit is contained in:
uglyside
2024-11-23 12:12:55 +03:00
parent 2a7a232351
commit 1fb118fbea
6 changed files with 295 additions and 168 deletions
+6 -9
View File
@@ -2,20 +2,17 @@
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/licenses/gpl.txt
from pisi.actionsapi import cmaketools
from pisi.actionsapi import pisitools
from pisi.actionsapi import get
# See the file https://www.gnu.org/licenses/gpl-3.0.txt
from pisi.actionsapi import cmaketools, mesontools, pisitools
def setup():
cmaketools.configure()
cmaketools.configure("-Bbuild -G Ninja -L")
def build():
cmaketools.make()
mesontools.build()
def install():
cmaketools.rawInstall("DESTDIR=%s" % get.installDIR())
mesontools.install()
pisitools.dodoc("AUTHORS*", "COPYING*", "NEWS*", "README*")
pisitools.dodoc("AUTHORS.txt", "COPYING.txt", "NEWS.txt")
@@ -0,0 +1,204 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 384cb65..6181a06 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,7 +7,7 @@ SET(PROJECT_VERSION 5.1.0)
# 2. If any interfaces have been added, removed, or changed since the last update, increment current, and set revision to 0.
# 3. If any interfaces have been added since the last public release, then increment age.
# 4. If any interfaces have been removed since the last public release, then set age to 0.
-SET(musicbrainz5_SOVERSION_CURRENT 1)
+SET(musicbrainz5_SOVERSION_CURRENT 2)
SET(musicbrainz5_SOVERSION_REVISION 0)
SET(musicbrainz5_SOVERSION_AGE 0)
@@ -18,6 +18,17 @@ MATH(EXPR musicbrainz5_SOVERSION_PATCH "${musicbrainz5_SOVERSION_REVISION}")
SET(musicbrainz5_VERSION ${musicbrainz5_SOVERSION_MAJOR}.${musicbrainz5_SOVERSION_MINOR}.${musicbrainz5_SOVERSION_PATCH})
SET(musicbrainz5_SOVERSION ${musicbrainz5_SOVERSION_MAJOR})
+SET(musicbrainz5c_SOVERSION_CURRENT 2)
+SET(musicbrainz5c_SOVERSION_REVISION 0)
+SET(musicbrainz5c_SOVERSION_AGE 0)
+
+MATH(EXPR musicbrainz5c_SOVERSION_MAJOR "${musicbrainz5c_SOVERSION_CURRENT} - ${musicbrainz5c_SOVERSION_AGE}")
+MATH(EXPR musicbrainz5c_SOVERSION_MINOR "${musicbrainz5c_SOVERSION_AGE}")
+MATH(EXPR musicbrainz5c_SOVERSION_PATCH "${musicbrainz5c_SOVERSION_REVISION}")
+
+SET(musicbrainz5c_VERSION ${musicbrainz5c_SOVERSION_MAJOR}.${musicbrainz5c_SOVERSION_MINOR}.${musicbrainz5c_SOVERSION_PATCH})
+SET(musicbrainz5c_SOVERSION ${musicbrainz5c_SOVERSION_MAJOR})
+
SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
FIND_PACKAGE(Neon REQUIRED)
FIND_PACKAGE(LibXml2 REQUIRED)
@@ -29,12 +40,13 @@ SET(LIB_INSTALL_DIR ${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX} CACHE PATH "Install
SET(INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include CACHE PATH "Installation prefix for C header files" FORCE)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/libmusicbrainz5.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libmusicbrainz5.pc)
-CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.cmake ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile)
-CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_SOURCE_DIR}/config.h)
+CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/libmusicbrainz5cc.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libmusicbrainz5cc.pc)
+CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.cmake ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
+CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/include/config.h)
FILE(GLOB headers ${CMAKE_CURRENT_SOURCE_DIR}/include/musicbrainz5/*.h)
INSTALL(FILES ${headers} ${CMAKE_CURRENT_BINARY_DIR}/include/musicbrainz5/mb5_c.h DESTINATION ${INCLUDE_INSTALL_DIR}/musicbrainz5)
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libmusicbrainz5.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libmusicbrainz5.pc ${CMAKE_CURRENT_BINARY_DIR}/libmusicbrainz5cc.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(tests)
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index bdcc991..71ca411 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -3,7 +3,6 @@ INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_BINARY_DIR}/../include
${LIBXML2_INCLUDE_DIR}
)
-LINK_LIBRARIES(musicbrainz5 ${NEON_LIBRARIES} ${LIBXML2_LIBRARIES})
ADD_EXECUTABLE(cdlookup cdlookup.cc)
ADD_EXECUTABLE(cdlookup_c cdlookup_c.c)
@@ -11,6 +10,13 @@ ADD_EXECUTABLE(search search.cc)
ADD_EXECUTABLE(search_c search_c.c)
ADD_EXECUTABLE(collections collections.cc)
+TARGET_LINK_LIBRARIES(cdlookup musicbrainz5cc)
+TARGET_LINK_LIBRARIES(cdlookup_c musicbrainz5)
+TARGET_LINK_LIBRARIES(search musicbrainz5cc)
+TARGET_LINK_LIBRARIES(search_c musicbrainz5)
+TARGET_LINK_LIBRARIES(cdlookup musicbrainz5cc)
+TARGET_LINK_LIBRARIES(collections musicbrainz5)
+
IF(CMAKE_COMPILER_IS_GNUCXX)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic-errors")
IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../.git)
diff --git a/libmusicbrainz5.pc.cmake b/libmusicbrainz5.pc.cmake
index b9cb903..633e231 100644
--- a/libmusicbrainz5.pc.cmake
+++ b/libmusicbrainz5.pc.cmake
@@ -7,7 +7,7 @@ Name: ${PROJECT_NAME}
Description: The Musicbrainz Client Library.
URL: http://musicbrainz.org/doc/libmusicbrainz
Version: ${PROJECT_VERSION}
-Requires.private: neon >= 0.25 libxml-2.0
+Requires.private: ${PROJECT_NAME}cc
Libs: -L${LIB_INSTALL_DIR} -lmusicbrainz5
Cflags: -I${INCLUDE_INSTALL_DIR}
diff --git a/libmusicbrainz5cc.pc.cmake b/libmusicbrainz5cc.pc.cmake
new file mode 100644
index 0000000..224fa7a
--- /dev/null
+++ b/libmusicbrainz5cc.pc.cmake
@@ -0,0 +1,13 @@
+prefix=${CMAKE_INSTALL_PREFIX}
+exec_prefix=${EXEC_INSTALL_PREFIX}
+libdir=${LIB_INSTALL_DIR}
+includedir=${INCLUDE_INSTALL_DIR}
+
+Name: ${PROJECT_NAME}cc
+Description: The Musicbrainz Client Library.
+URL: http://musicbrainz.org/doc/libmusicbrainz
+Version: ${PROJECT_VERSION}
+Requires.private: neon >= 0.25 libxml-2.0
+Libs: -L${LIB_INSTALL_DIR} -lmusicbrainz5cc
+Cflags: -I${INCLUDE_INSTALL_DIR}
+
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index c91a565..9492920 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -7,12 +7,13 @@ INCLUDE_DIRECTORIES(
${LIBXML2_INCLUDE_DIR}
)
-SET(_sources Alias.cc Annotation.cc Artist.cc ArtistCredit.cc Attribute.cc CDStub.cc Collection.cc
+SET(_sources_cc Alias.cc Annotation.cc Artist.cc ArtistCredit.cc Attribute.cc CDStub.cc Collection.cc
Disc.cc Entity.cc FreeDBDisc.cc HTTPFetch.cc ISRC.cc Label.cc LabelInfo.cc Lifespan.cc List.cc
- mb5_c.cc Medium.cc MediumList.cc Message.cc Metadata.cc NameCredit.cc NonMBTrack.cc PUID.cc
+ Medium.cc MediumList.cc Message.cc Metadata.cc NameCredit.cc NonMBTrack.cc PUID.cc
Query.cc Rating.cc Recording.cc Relation.cc RelationList.cc Release.cc ReleaseGroup.cc Tag.cc
TextRepresentation.cc Track.cc UserRating.cc UserTag.cc Work.cc xmlParser.cc
RelationListList.cc ISWCList.cc ISWC.cc SecondaryType.cc SecondaryTypeList.cc IPI.cc)
+SET(_sources_c mb5_c.cc)
# when crosscompiling import the executable targets from a file
IF(CMAKE_CROSSCOMPILING)
@@ -41,14 +42,21 @@ ADD_CUSTOM_COMMAND(
ADD_CUSTOM_TARGET(src_gen DEPENDS mb5_c.h)
-ADD_LIBRARY(musicbrainz5 SHARED ${_sources})
+ADD_LIBRARY(musicbrainz5cc SHARED ${_sources_cc})
+ADD_LIBRARY(musicbrainz5 SHARED ${_sources_c})
-SET_TARGET_PROPERTIES(musicbrainz5 PROPERTIES
+SET_TARGET_PROPERTIES(musicbrainz5cc PROPERTIES
VERSION ${musicbrainz5_VERSION}
SOVERSION ${musicbrainz5_SOVERSION}
DEFINE_SYMBOL MB_API_EXPORTS
)
+SET_TARGET_PROPERTIES(musicbrainz5 PROPERTIES
+ VERSION ${musicbrainz5c_VERSION}
+ SOVERSION ${musicbrainz5c_SOVERSION}
+ DEFINE_SYMBOL MB_API_EXPORTS
+)
+
if(CMAKE_BUILD_TYPE STREQUAL Debug)
SET_TARGET_PROPERTIES(musicbrainz5 PROPERTIES
DEFINE_SYMBOL _MB5_DEBUG_
@@ -58,7 +66,8 @@ if(CMAKE_BUILD_TYPE STREQUAL Debug)
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
-TARGET_LINK_LIBRARIES(musicbrainz5 ${NEON_LIBRARIES} ${LIBXML2_LIBRARIES})
+TARGET_LINK_LIBRARIES(musicbrainz5cc ${NEON_LIBRARIES} ${LIBXML2_LIBRARIES})
+TARGET_LINK_LIBRARIES(musicbrainz5 musicbrainz5cc)
IF(WIN32)
TARGET_LINK_LIBRARIES(musicbrainz5 wsock32 winmm ws2_32)
@@ -72,4 +81,4 @@ IF(CMAKE_COMPILER_IS_GNUCXX)
#set_source_files_properties(mb5_c.cc PROPERTIES COMPILE_FLAGS "-Wno-deprecated-declarations")
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
-INSTALL(TARGETS musicbrainz5 DESTINATION ${LIB_INSTALL_DIR})
+INSTALL(TARGETS musicbrainz5cc musicbrainz5 DESTINATION ${LIB_INSTALL_DIR})
diff --git a/src/c-int-source-funcs.inc b/src/c-int-source-funcs.inc
index fdf2d56..2e3834a 100644
--- a/src/c-int-source-funcs.inc
+++ b/src/c-int-source-funcs.inc
@@ -90,7 +90,7 @@
#include "musicbrainz5/Work.h"
#include "musicbrainz5/WorkList.h"
-std::string GetMapName(std::map<std::string,std::string> Map, int Item)
+static std::string GetMapName(std::map<std::string,std::string> Map, int Item)
{
std::string Ret;
@@ -112,7 +112,7 @@ std::string GetMapName(std::map<std::string,std::string> Map, int Item)
return Ret;
}
-std::string GetMapValue(std::map<std::string,std::string> Map, int Item)
+static std::string GetMapValue(std::map<std::string,std::string> Map, int Item)
{
std::string Ret;
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 9d87908..3fba4e8 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -3,9 +3,10 @@ INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_BINARY_DIR}/../include
${LIBXML2_INCLUDE_DIR}
)
-LINK_LIBRARIES(musicbrainz5 ${NEON_LIBRARIES} ${LIBXML2_LIBRARIES})
ADD_EXECUTABLE(mbtest mbtest.cc)
ADD_EXECUTABLE(ctest ctest.c)
+TARGET_LINK_LIBRARIES(mbtest musicbrainz5cc)
+TARGET_LINK_LIBRARIES(ctest musicbrainz5)
IF(CMAKE_COMPILER_IS_GNUCXX)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic-errors")
@@ -1,125 +0,0 @@
Submitted By: Armin K. <krejzi at email dot com>
Date: 2012-09-01
Initial Package Version: 5.0.1
Upstream Status: Fixed upstream
Origin: Upstream
Description: Fixes out-of-source-tree build.
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 3e11469..000d4aa 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -1,4 +1,7 @@
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../include)
+INCLUDE_DIRECTORIES(
+ ${CMAKE_CURRENT_SOURCE_DIR}/../include
+ ${CMAKE_CURRENT_BINARY_DIR}/../include
+)
LINK_LIBRARIES(musicbrainz5 ${NEON_LIBRARIES})
ADD_EXECUTABLE(cdlookup cdlookup.cc)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 2ee102f..89ab63c 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,5 +1,10 @@
SET(CMAKE_INCLUDE_CURRENT_DIR ON)
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/../include ${NEON_INCLUDE_DIR})
+INCLUDE_DIRECTORIES(
+ ${CMAKE_CURRENT_SOURCE_DIR}/..
+ ${CMAKE_CURRENT_SOURCE_DIR}/../include
+ ${CMAKE_CURRENT_BINARY_DIR}/../include
+ ${NEON_INCLUDE_DIR}
+)
SET(_sources Alias.cc Annotation.cc Artist.cc ArtistCredit.cc Attribute.cc CDStub.cc Collection.cc
Disc.cc Entity.cc FreeDBDisc.cc HTTPFetch.cc ISRC.cc Label.cc LabelInfo.cc Lifespan.cc List.cc
@@ -13,7 +18,7 @@ ADD_EXECUTABLE(make-c-interface make-c-interface.cc xmlParser.cpp)
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/mb5_c.cc ${CMAKE_CURRENT_BINARY_DIR}/mb5_c.h ${CMAKE_CURRENT_BINARY_DIR}/../include/musicbrainz5/mb5_c.h
COMMAND make-c-interface ${CMAKE_CURRENT_SOURCE_DIR} cinterface.xml ${CMAKE_CURRENT_BINARY_DIR} mb5_c.cc mb5_c.h
- COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_BINARY_DIR}/mb5_c.h ${CMAKE_CURRENT_BINARY_DIR}/../include/musicbrainz5
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_BINARY_DIR}/mb5_c.h ${CMAKE_CURRENT_BINARY_DIR}/../include/musicbrainz5/mb5_c.h
DEPENDS make-c-interface cinterface.xml *.inc
)
diff --git a/src/make-c-interface.cc b/src/make-c-interface.cc
index 652a65b..70dd6d7 100644
--- a/src/make-c-interface.cc
+++ b/src/make-c-interface.cc
@@ -33,7 +33,7 @@
#include "musicbrainz5/xmlParser.h"
-void ProcessBoilerplate(const XMLNode& Node, std::ofstream& Source, std::ofstream& Include);
+void ProcessBoilerplate(const XMLNode& Node, std::ofstream& Source, std::ofstream& Include, const std::string& Path);
void ProcessHeader(const XMLNode& Node, std::ofstream& Source, std::ofstream& Include);
void ProcessEntity(const XMLNode& Node, std::ofstream& Source, std::ofstream& Include);
void ProcessClass(const XMLNode& Node, std::ofstream& Source, std::ofstream& Include);
@@ -80,7 +80,7 @@ int main(int argc, const char *argv[])
std::string Name=Node.getName();
if ("boilerplate"==Name)
- ProcessBoilerplate(Node,Source,Include);
+ ProcessBoilerplate(Node,Source,Include,argv[1]);
else if ("header"==Name)
ProcessHeader(Node,Source,Include);
else if ("declare"==Name)
@@ -156,13 +156,13 @@ void ProcessHeader(const XMLNode& /*Node*/, std::ofstream& Source, std::ofstream
Include << os.str() << std::endl;
}
-void ProcessBoilerplate(const XMLNode& Node, std::ofstream& Source, std::ofstream& Include)
+void ProcessBoilerplate(const XMLNode& Node, std::ofstream& Source, std::ofstream& Include, const std::string& Path)
{
std::ofstream *File=GetFile(Node,Source,Include);
if (Node.isAttributeSet("file"))
{
- std::string FileName=Node.getAttribute("file");
+ std::string FileName=Path+"/"+Node.getAttribute("file");
std::ifstream InFile(FileName.c_str());
if (InFile.is_open())
*File << InFile.rdbuf() << std::endl;
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 645f8ae..8a0b38b 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -1,4 +1,7 @@
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../include)
+INCLUDE_DIRECTORIES(
+ ${CMAKE_CURRENT_SOURCE_DIR}/../include
+ ${CMAKE_CURRENT_BINARY_DIR}/../include
+)
LINK_LIBRARIES(musicbrainz5 ${NEON_LIBRARIES})
ADD_EXECUTABLE(mbtest mbtest.cc)
ADD_EXECUTABLE(ctest ctest.c)
--
1.7.10
From b5d4f4ea32068e296326438c747faf665c311ddd Mon Sep 17 00:00:00 2001
From: Andy Hawkins <andy@gently.org.uk>
Date: Thu, 14 Jun 2012 09:12:27 +0000
Subject: [PATCH] Fix install when building out of tree
---
CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 16870b4..958461c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -32,7 +32,7 @@ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.cmake ${CMAKE_CURRENT_SOURCE
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_SOURCE_DIR}/config.h)
FILE(GLOB headers ${CMAKE_CURRENT_SOURCE_DIR}/include/musicbrainz5/*.h)
-INSTALL(FILES ${headers} include/musicbrainz5/mb5_c.h DESTINATION ${INCLUDE_INSTALL_DIR}/musicbrainz5)
+INSTALL(FILES ${headers} ${CMAKE_CURRENT_BINARY_DIR}/include/musicbrainz5/mb5_c.h DESTINATION ${INCLUDE_INSTALL_DIR}/musicbrainz5)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libmusicbrainz5.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
ADD_SUBDIRECTORY(src)
--
1.7.10
@@ -0,0 +1,64 @@
From 9ba00067a15479a52262a5126bcb6889da5884b7 Mon Sep 17 00:00:00 2001
From: Christopher Degawa <ccom@randomderp.com>
Date: Sun, 8 Oct 2023 11:41:30 -0500
Subject: [PATCH 1/2] libxml: include parser.h
libxml2 removed the inclusion of global.h in a few of its include files,
so we can no longer rely on transitive includes.
This applies to functions like xmlParseFile.
Signed-off-by: Christopher Degawa <ccom@randomderp.com>
---
src/xmlParser.cc | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/xmlParser.cc b/src/xmlParser.cc
index e63df55..53dec25 100644
--- a/src/xmlParser.cc
+++ b/src/xmlParser.cc
@@ -30,6 +30,7 @@
#include <cstring>
#include <libxml/tree.h>
+#include <libxml/parser.h>
XMLResults::XMLResults()
: line(0),
From 558c9ba0e6d702d5c877f75be98176f57abf1b02 Mon Sep 17 00:00:00 2001
From: Christopher Degawa <ccom@randomderp.com>
Date: Sun, 8 Oct 2023 11:42:55 -0500
Subject: [PATCH 2/2] libxml: constify the storage of xmlGetLastError()
libxml2 recently made it a const return.
Since nothing is being modified of it, this should have no real effect
past satisfying the compiler.
Signed-off-by: Christopher Degawa <ccom@randomderp.com>
---
src/xmlParser.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/xmlParser.cc b/src/xmlParser.cc
index 53dec25..fee684c 100644
--- a/src/xmlParser.cc
+++ b/src/xmlParser.cc
@@ -57,7 +57,7 @@ XMLNode *XMLRootNode::parseFile(const std::string &filename, XMLResults* results
doc = xmlParseFile(filename.c_str());
if ((doc == NULL) && (results != NULL)) {
- xmlErrorPtr error = xmlGetLastError();
+ const xmlError *error = xmlGetLastError();
results->message = error->message;
results->line = error->line;
results->code = error->code;
@@ -72,7 +72,7 @@ XMLNode *XMLRootNode::parseString(const std::string &xml, XMLResults* results)
doc = xmlParseMemory(xml.c_str(), xml.length());
if ((doc == NULL) && (results != NULL)) {
- xmlErrorPtr error = xmlGetLastError();
+ const xmlError *error = xmlGetLastError();
results->message = error->message;
results->line = error->line;
results->code = error->code;
+21 -11
View File
@@ -1,34 +1,37 @@
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<!DOCTYPE PISI SYSTEM "https://pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
<Source>
<Name>musicbrainz5</Name>
<Homepage>http://www.musicbrainz.org/</Homepage>
<Homepage>https://musicbrainz.org/doc/libmusicbrainz</Homepage>
<Packager>
<Name>PisiLinux Community</Name>
<Email>admins@pisilinux.org</Email>
</Packager>
<License>LGPLv2.1</License>
<IsA>library</IsA>
<Summary>Client library to access metadata of mp3/vorbis/CD media</Summary>
<Description>MusicBrainz is a project that aims to create an open content music encyclopedia. It is an online database of information about recorded music. MusicBrainz client library captures information about artists, the album title, track titles,the length of each track and many more.</Description>
<Archive sha1sum="1576b474c777bb9c4ff906853ef1d3bb14915f50" type="targz">ftp://ftp.parrot.org/.1/blfs/svn/l/libmusicbrainz-5.1.0.tar.gz</Archive>
<Summary>MusicBrainz Client Library.</Summary>
<Description>MusicBrainz client library captures information about artists, the album title, track titles,the length of each track and many more.</Description>
<Archive sha1sum="1576b474c777bb9c4ff906853ef1d3bb14915f50" type="targz">https://github.com/metabrainz/libmusicbrainz/releases/download/release-5.1.0/libmusicbrainz-5.1.0.tar.gz</Archive>
<BuildDependencies>
<Dependency>cmake</Dependency>
<Dependency>ninja</Dependency>
<Dependency>neon-devel</Dependency>
<Dependency>libxml2-devel</Dependency>
<Dependency>cmake</Dependency>
</BuildDependencies>
<!--Patches>
<Patch level="1">libmusicbrainz-5.0.1-build_system-1.patch</Patch>
</Patches-->
<Patches>
<!-- <Patch level="1"></Patch> -->
<Patch level="1">Split_C_interface.patch</Patch>
<Patch level="1">libxml_include_and_const_error.patch</Patch>
</Patches>
</Source>
<Package>
<Name>musicbrainz5</Name>
<RuntimeDependencies>
<Dependency>neon</Dependency>
<Dependency>libgcc</Dependency>
<Dependency>libxml2</Dependency>
<Dependency>neon</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="library">/usr/lib</Path>
@@ -40,9 +43,9 @@
<Name>musicbrainz5-devel</Name>
<Summary>Development files for musicbrainz5</Summary>
<RuntimeDependencies>
<Dependency release="current">musicbrainz5</Dependency>
<Dependency>neon-devel</Dependency>
<Dependency>libxml2-devel</Dependency>
<Dependency release="current">musicbrainz5</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="header">/usr/include</Path>
@@ -51,6 +54,13 @@
</Package>
<History>
<Update release="6">
<Date>2024-11-23</Date>
<Version>5.1.0</Version>
<Comment>Rebuild new SOVERSION.</Comment>
<Name>Mustafa Cinasal</Name>
<Email>muscnsl@gmail.com</Email>
</Update>
<Update release="5">
<Date>2020-03-07</Date>
<Version>5.1.0</Version>
@@ -1,23 +0,0 @@
From 4da7a9128f2c5eaf23ae2a5006d300dc4f21fc6a Mon Sep 17 00:00:00 2001
From: Craig Drummond <craig.p.drummond@gmail.com>
Date: Tue, 28 Nov 2017 22:37:01 +0000
Subject: [PATCH] Create QSqlQuery, then call prepare Issue #1130
---
db/librarydb.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/db/librarydb.cpp b/db/librarydb.cpp
index 603d8abc1..4f75dc28f 100644
--- a/db/librarydb.cpp
+++ b/db/librarydb.cpp
@@ -453,7 +453,8 @@ class SqlQuery
if (limit>0) {
sql+=" LIMIT "+QString::number(limit);
}
- query=QSqlQuery(sql, db);
+ query = QSqlQuery(db);
+ query.prepare(sql);
for (const QVariant &value: boundValues) {
query.addBindValue(value);