new package: libmusicbrainz

This commit is contained in:
Tee KOBAYASHI 2021-12-24 10:12:03 +09:00 committed by Leonid Pliushch
parent 66c20864f0
commit 8b5a1cda58
2 changed files with 81 additions and 0 deletions

View File

@ -0,0 +1,54 @@
TERMUX_PKG_HOMEPAGE=https://musicbrainz.org/doc/libmusicbrainz
TERMUX_PKG_DESCRIPTION="The MusicBrainz Client Library"
TERMUX_PKG_LICENSE="LGPL-2.1"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=()
TERMUX_PKG_VERSION+=(5.1.0)
TERMUX_PKG_VERSION+=(2.9.12) # libxml2 version
TERMUX_PKG_VERSION+=(0.32.1) # libneon version
TERMUX_PKG_SRCURL=(https://github.com/metabrainz/libmusicbrainz/releases/download/release-${TERMUX_PKG_VERSION}/libmusicbrainz-${TERMUX_PKG_VERSION}.tar.gz
ftp://xmlsoft.org/libxml2/libxml2-${TERMUX_PKG_VERSION[1]}.tar.gz
https://notroj.github.io/neon/neon-${TERMUX_PKG_VERSION[2]}.tar.gz)
TERMUX_PKG_SHA256=(6749259e89bbb273f3f5ad7acdffb7c47a2cf8fcaeab4c4695484cef5f4c6b46
c8d6681e38c56f172892c85ddc0852e1fd4b53b4209e7f4ebf17f7e2eae71d92
05c54bc115030c89e463a4fb28d3a3f8215879528ba5ca70d676d3d21bf3af52)
TERMUX_PKG_DEPENDS="libc++, libneon, libxml2"
TERMUX_PKG_HOSTBUILD=true
termux_step_post_get_source() {
mv libxml2-${TERMUX_PKG_VERSION[1]} libxml2
mv neon-${TERMUX_PKG_VERSION[2]} neon
}
termux_step_host_build() {
_PREFIX_FOR_BUILD=$TERMUX_PKG_HOSTBUILD_DIR/prefix
mkdir -p $_PREFIX_FOR_BUILD
export PKG_CONFIG_PATH=$_PREFIX_FOR_BUILD/lib/pkgconfig
mkdir libxml2
pushd libxml2
$TERMUX_PKG_SRCDIR/libxml2/configure --prefix=$_PREFIX_FOR_BUILD \
--without-python
make -j $TERMUX_MAKE_PROCESSES
make install
popd
mkdir neon
pushd neon
$TERMUX_PKG_SRCDIR/neon/configure --prefix=$_PREFIX_FOR_BUILD \
--with-libxml2
make -j $TERMUX_MAKE_PROCESSES
make install
popd
termux_setup_cmake
cmake $TERMUX_PKG_SRCDIR
make -j $TERMUX_MAKE_PROCESSES
unset PKG_CONFIG_PATH
}
termux_step_pre_configure() {
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" -DIMPORT_EXECUTABLES=$TERMUX_PKG_HOSTBUILD_DIR/ImportExecutables.cmake"
}

View File

@ -0,0 +1,27 @@
From 36262d60fe92fe7a2c9bfb40e736bfcd29a6c3bd Mon Sep 17 00:00:00 2001
From: Abderrahim Kitouni <a.kitouni@gmail.com>
Date: Fri, 13 Apr 2018 09:56:57 +0100
Subject: [PATCH 2/2] src/CMakelists.txt: do not use wildcards for dependencies
This is discouraged by cmake's documentation and doesn't work with the ninja generator.
---
src/CMakeLists.txt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 68c04e3..f7439d3 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -37,7 +37,8 @@ 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/mb5_c.h
- DEPENDS make-c-interface cinterface.xml *.inc
+ DEPENDS make-c-interface cinterface.xml c-int-medium-defines.inc c-int-query-source.inc c-int-source-funcs.inc
+ c-int-medium-source.inc c-int-release-defines.inc c-int-query-defines.inc c-int-release-source.inc
)
ADD_CUSTOM_TARGET(src_gen DEPENDS mb5_c.h)
--
2.26.2