Accepting request 743867 from multimedia:libs

OBS-URL: https://build.opensuse.org/request/show/743867
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libinstpatch?expand=0&rev=3
This commit is contained in:
Dominique Leuenberger 2019-12-05 16:33:26 +00:00 committed by Git OBS Bridge
commit 5fb0f5694d
10 changed files with 91 additions and 236 deletions

View File

@ -1,72 +0,0 @@
From 4a73f7125c11b38bd86d23297263f603cfa7ee35 Mon Sep 17 00:00:00 2001
From: Element Green <element@elementsofsound.org>
Date: Fri, 15 Jul 2016 17:00:10 -0600
Subject: [PATCH 01/13] Fix improper GValue type assignments in
ipatch_dls2_sample_info_notify_changes().
---
libinstpatch/libinstpatch/IpatchDLS2Sample.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/libinstpatch/libinstpatch/IpatchDLS2Sample.c b/libinstpatch/libinstpatch/IpatchDLS2Sample.c
index c01662d..ef0217a 100644
--- a/libinstpatch/libinstpatch/IpatchDLS2Sample.c
+++ b/libinstpatch/libinstpatch/IpatchDLS2Sample.c
@@ -802,8 +802,8 @@ ipatch_dls2_sample_info_notify_changes (IpatchItem *item,
{
g_value_init (&newval, G_TYPE_INT);
g_value_init (&oldval, G_TYPE_INT);
- g_value_set_flags (&newval, newinfo->root_note);
- g_value_set_flags (&oldval, oldinfo->root_note);
+ g_value_set_int (&newval, newinfo->root_note);
+ g_value_set_int (&oldval, oldinfo->root_note);
ipatch_item_prop_notify (item, found_pspec_cache[2], &newval, &oldval);
g_value_unset (&newval);
g_value_unset (&oldval);
@@ -813,8 +813,8 @@ ipatch_dls2_sample_info_notify_changes (IpatchItem *item,
{
g_value_init (&newval, G_TYPE_INT);
g_value_init (&oldval, G_TYPE_INT);
- g_value_set_flags (&newval, newinfo->fine_tune);
- g_value_set_flags (&oldval, oldinfo->fine_tune);
+ g_value_set_int (&newval, newinfo->fine_tune);
+ g_value_set_int (&oldval, oldinfo->fine_tune);
ipatch_item_prop_notify (item, found_pspec_cache[3], &newval, &oldval);
g_value_unset (&newval);
g_value_unset (&oldval);
@@ -824,8 +824,8 @@ ipatch_dls2_sample_info_notify_changes (IpatchItem *item,
{
g_value_init (&newval, G_TYPE_INT);
g_value_init (&oldval, G_TYPE_INT);
- g_value_set_flags (&newval, newinfo->gain);
- g_value_set_flags (&oldval, oldinfo->gain);
+ g_value_set_int (&newval, newinfo->gain);
+ g_value_set_int (&oldval, oldinfo->gain);
ipatch_item_prop_notify (item, found_pspec_cache[4], &newval, &oldval);
g_value_unset (&newval);
g_value_unset (&oldval);
@@ -835,8 +835,8 @@ ipatch_dls2_sample_info_notify_changes (IpatchItem *item,
{
g_value_init (&newval, G_TYPE_UINT);
g_value_init (&oldval, G_TYPE_UINT);
- g_value_set_flags (&newval, newinfo->loop_start);
- g_value_set_flags (&oldval, oldinfo->loop_start);
+ g_value_set_uint (&newval, newinfo->loop_start);
+ g_value_set_uint (&oldval, oldinfo->loop_start);
ipatch_item_prop_notify (item, found_pspec_cache[5], &newval, &oldval);
g_value_unset (&newval);
g_value_unset (&oldval);
@@ -846,8 +846,8 @@ ipatch_dls2_sample_info_notify_changes (IpatchItem *item,
{
g_value_init (&newval, G_TYPE_UINT);
g_value_init (&oldval, G_TYPE_UINT);
- g_value_set_flags (&newval, newinfo->loop_end);
- g_value_set_flags (&oldval, oldinfo->loop_end);
+ g_value_set_uint (&newval, newinfo->loop_end);
+ g_value_set_uint (&oldval, oldinfo->loop_end);
ipatch_item_prop_notify (item, found_pspec_cache[6], &newval, &oldval);
g_value_unset (&newval);
g_value_unset (&oldval);
--
2.16.4

View File

@ -1,27 +0,0 @@
From 45647bbf07b3a1ee2d8b44b836e445dea3e5cea1 Mon Sep 17 00:00:00 2001
From: derselbst <tom.mbrt@googlemail.com>
Date: Fri, 28 Dec 2018 16:26:48 +0100
Subject: [PATCH 13/13] fix incorrect usage of g_value_set_flags()
---
libinstpatch/libinstpatch/IpatchDLS2Sample.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libinstpatch/libinstpatch/IpatchDLS2Sample.c b/libinstpatch/libinstpatch/IpatchDLS2Sample.c
index ef0217a..0bf8743 100644
--- a/libinstpatch/libinstpatch/IpatchDLS2Sample.c
+++ b/libinstpatch/libinstpatch/IpatchDLS2Sample.c
@@ -779,8 +779,8 @@ ipatch_dls2_sample_info_notify_changes (IpatchItem *item,
{
g_value_init (&newval, IPATCH_TYPE_SAMPLE_LOOP_TYPE);
g_value_init (&oldval, IPATCH_TYPE_SAMPLE_LOOP_TYPE);
- g_value_set_flags (&newval, newinfo->options & IPATCH_DLS2_SAMPLE_LOOP_MASK);
- g_value_set_flags (&oldval, oldinfo->options & IPATCH_DLS2_SAMPLE_LOOP_MASK);
+ g_value_set_enum (&newval, newinfo->options & IPATCH_DLS2_SAMPLE_LOOP_MASK);
+ g_value_set_enum (&oldval, oldinfo->options & IPATCH_DLS2_SAMPLE_LOOP_MASK);
ipatch_item_prop_notify (item, found_pspec_cache[0], &newval, &oldval);
g_value_unset (&newval);
g_value_unset (&oldval);
--
2.16.4

View File

@ -1,24 +0,0 @@
From 0b2c5ce218495fb1695e9b79d133cb32dc5d6e76 Mon Sep 17 00:00:00 2001
From: derselbst <tom.mbrt@googlemail.com>
Date: Sat, 29 Dec 2018 22:12:39 +0100
Subject: [PATCH 1/2] missing mutex unlock
---
libinstpatch/libinstpatch/IpatchDLS2.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libinstpatch/libinstpatch/IpatchDLS2.c b/libinstpatch/libinstpatch/IpatchDLS2.c
index 402d6d1..5a79028 100644
--- a/libinstpatch/libinstpatch/IpatchDLS2.c
+++ b/libinstpatch/libinstpatch/IpatchDLS2.c
@@ -407,6 +407,7 @@ ipatch_dls2_container_make_unique (IpatchContainer *container,
{
g_critical ("Invalid child type '%s' for IpatchDLS2 object",
g_type_name (G_TYPE_FROM_INSTANCE (item)));
+ IPATCH_ITEM_WUNLOCK (dls);
return;
}
--
2.16.4

View File

@ -1,34 +0,0 @@
From 187fa661a347894b933be0c71c71ec7fc0e26059 Mon Sep 17 00:00:00 2001
From: derselbst <tom.mbrt@googlemail.com>
Date: Sat, 29 Dec 2018 22:27:43 +0100
Subject: [PATCH 2/2] more locking issues
---
libinstpatch/libinstpatch/IpatchBase.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libinstpatch/libinstpatch/IpatchBase.c b/libinstpatch/libinstpatch/IpatchBase.c
index d81c76b..9e6ae5e 100644
--- a/libinstpatch/libinstpatch/IpatchBase.c
+++ b/libinstpatch/libinstpatch/IpatchBase.c
@@ -293,7 +293,7 @@ ipatch_base_get_file (IpatchBase *base)
IPATCH_ITEM_RLOCK (base);
file = base->file;
if (file) g_object_ref (file);
- IPATCH_ITEM_RLOCK (base);
+ IPATCH_ITEM_RUNLOCK (base);
return (file);
}
@@ -337,7 +337,7 @@ ipatch_base_real_set_file_name (IpatchBase *base, const char *file_name)
return;
}
ipatch_file_set_name (base->file, file_name);
- IPATCH_ITEM_WUNLOCK (base);
+ IPATCH_ITEM_RUNLOCK (base);
}
/**
--
2.16.4

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ad2c0ef22d52bc07b0282aba9f49b2e4ccaefc5f9398bb4870ef9beb593eb760
size 477378

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1f74ffe286fd527df788205abe7568575ff42f1b8a50b05ab3ce84111e96fb3f
size 513398

View File

@ -1,21 +1,53 @@
diff -rupN libinstpatch-1.0.0.old/CMakeLists.txt libinstpatch-1.0.0/CMakeLists.txt Index: libinstpatch-1.1.0/CMakeLists.txt
--- libinstpatch-1.0.0.old/CMakeLists.txt 2010-11-08 18:12:26.000000000 -0500 ===================================================================
+++ libinstpatch-1.0.0/CMakeLists.txt 2011-08-06 14:40:44.000000000 -0400 --- libinstpatch-1.1.0.orig/CMakeLists.txt
@@ -144,14 +144,14 @@ configure_file ( ${CMAKE_SOURCE_DIR}/lib +++ libinstpatch-1.1.0/CMakeLists.txt
if ( UNIX OR MINGW ) @@ -176,19 +176,19 @@ set (INSTPATCH_INSTALL_TARGET "libinstpa
# pkg-config support # pkg-config support
if ( UNIX OR MINGW OR WIN32)
set ( prefix "${CMAKE_INSTALL_PREFIX}" ) set ( prefix "${CMAKE_INSTALL_PREFIX}" )
- set ( exec_prefix "\${prefix}" ) - set ( exec_prefix "\${prefix}" )
- set ( libdir "\${exec_prefix}/${LIB_INSTALL_DIR}${LIB_SUFFIX}" )
- set ( includedir "\${prefix}/${INCLUDE_INSTALL_DIR}/${INSTPATCH_INSTALL_TARGET}" )
+ set ( exec_prefix "${CMAKE_INSTALL_PREFIX}" ) + set ( exec_prefix "${CMAKE_INSTALL_PREFIX}" )
if (LIB_INSTALL_DIR STREQUAL ${CMAKE_INSTALL_PREFIX}/lib) + set ( libdir "${LIB_INSTALL_DIR}" )
set(LIBINSTPATCH_INSTALL_DIR ${LIB_INSTALL_DIR}${LIB_SUFFIX}) + set ( includedir "${INCLUDE_INSTALL_DIR}/${INSTPATCH_INSTALL_TARGET}" )
else (LIB_INSTALL_DIR STREQUAL ${CMAKE_INSTALL_PREFIX}/lib) # stamp library name with version current value (for Windows only)
set(LIBINSTPATCH_INSTALL_DIR ${LIB_INSTALL_DIR}) if(MINGW OR WIN32)
endif (LIB_INSTALL_DIR STREQUAL ${CMAKE_INSTALL_PREFIX}/lib) set ( lib_output_name ${INSTPATCH_INSTALL_TARGET} )
- set ( libdir "\${exec_prefix}/${LIBINSTPATCH_INSTALL_DIR}" ) else(MINGW OR WIN32)
- set ( includedir "\${prefix}/${INCLUDE_INSTALL_DIR}" ) - set ( lib_output_name instpatch )
+ set ( libdir "${LIBINSTPATCH_INSTALL_DIR}" ) + set ( lib_output_name instpatch-1.0 )
+ set ( includedir "${INCLUDE_INSTALL_DIR}" ) endif(MINGW OR WIN32)
configure_file ( libinstpatch-1.0.pc.in configure_file ( libinstpatch-1.0.pc.in
${CMAKE_BINARY_DIR}/libinstpatch-1.0.pc IMMEDIATE @ONLY ) ${CMAKE_BINARY_DIR}/libinstpatch-1.0.pc IMMEDIATE @ONLY )
install ( FILES ${CMAKE_BINARY_DIR}/libinstpatch-1.0.pc install ( FILES ${CMAKE_BINARY_DIR}/libinstpatch-1.0.pc
- DESTINATION ${LIB_INSTALL_DIR}${LIB_SUFFIX}/pkgconfig )
+ DESTINATION ${LIB_INSTALL_DIR}/pkgconfig )
endif ( UNIX OR MINGW OR WIN32)
# Extra targets for Unix build environments
Index: libinstpatch-1.1.0/libinstpatch/CMakeLists.txt
===================================================================
--- libinstpatch-1.1.0.orig/libinstpatch/CMakeLists.txt
+++ libinstpatch-1.1.0/libinstpatch/CMakeLists.txt
@@ -353,7 +353,7 @@ else( MINGW OR WIN32 )
set_target_properties ( libinstpatch
PROPERTIES
PREFIX ""
- OUTPUT_NAME "libinstpatch"
+ OUTPUT_NAME "libinstpatch-1.0"
VERSION ${LIB_VERSION_INFO}
SOVERSION ${LIB_VERSION_CURRENT}
)
@@ -366,8 +366,8 @@ endif ( IPATCH_CPPFLAGS )
install ( TARGETS libinstpatch
RUNTIME DESTINATION ${BIN_INSTALL_DIR}
- LIBRARY DESTINATION ${LIB_INSTALL_DIR}${LIB_SUFFIX}
- ARCHIVE DESTINATION ${LIB_INSTALL_DIR}${LIB_SUFFIX}
+ LIBRARY DESTINATION ${LIB_INSTALL_DIR}
+ ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
FRAMEWORK DESTINATION ${FRAMEWORK_INSTALL_DIR}
BUNDLE DESTINATION ${BUNDLE_INSTALL_DIR}
)

View File

@ -1,37 +0,0 @@
#!/bin/bash
# $1 - revision number to checkout.
: ${1?"You must either provide desired revision number \"X\" to checkout: `basename $0` X
or fetch the latest revision by: `basename $0` latest"}
set -e
tmp=$(mktemp -d)
trap cleanup EXIT
cleanup() {
set +e
[ -z "$tmp" -o ! -d "$tmp" ] || rm -rf "$tmp"
}
unset CDPATH
pwd=$(pwd)
name=libinstpatch
version=1.0.0
if [[ $1 == "latest" ]] ; then
revision=HEAD
else
revision=$1
fi
pushd "$tmp" >/dev/null
echo "Fetching SVN revision: $1"
svn export -r$revision https://swami.svn.sourceforge.net/svnroot/swami/trunk/$name $name-$version |tee $name.stdout
revision=$(cat $name.stdout|grep "Exported revision"|sed 's|[^0-9]*||g')
echo "Fetched SVN revision: $revision"
rm -f $name.stdout
tar jcf "$pwd"/$name-$version-svn$revision.tar.bz2 $name-$version
echo "Written: $name-$version-svn$revision.tar.bz2"
popd >/dev/null

View File

@ -1,3 +1,30 @@
-------------------------------------------------------------------
Tue Oct 29 15:23:50 UTC 2019 - Joël Krähemann <jkraehemann@gmail.com>
- update libinstpatch-cmake-fixes.patch to fix soname in
libinstpatch-1.0.pc
-------------------------------------------------------------------
Sat Oct 19 13:13:12 UTC 2019 - Tom Mbrt <tom.mbrt@googlemail.com>
- Update to 1.1.0:
* SOVERSION was bumped
* libinstpatch's license was changed from GPL-2.0 to LGPL-2.1
* the AutoTools build system has been replaced by CMake
* preliminary support for Spectralis (SLI) soundbanks was added
* libsndfile is now required
* an incorrect mutex unlock caused a deadlock when entering
ipatch_base_get_file() with different threads
* incorrect copying DLS2 objects was fixed
* build issues on Windows were fixed
* various other minor bugs were addressed
- Update libinstpatch-cmake-fixes.patch to the current code base
- Remove the following patches, because they were fixed upstream:
* 0001-Fix-improper-GValue-type-assignments-in-ipatch_dls2_.patch
* 0002-fix-incorrect-usage-of-g_value_set_flags.patch
* 0003-missing-mutex-unlock.patch
* 0004-more-locking-issues.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Sat Dec 29 11:43:30 UTC 2018 - Tom Mbrt <tom.mbrt@googlemail.com> Sat Dec 29 11:43:30 UTC 2018 - Tom Mbrt <tom.mbrt@googlemail.com>

View File

@ -1,7 +1,7 @@
# #
# spec file for package libinstpatch # spec file for package libinstpatch
# #
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -12,28 +12,22 @@
# license that conforms to the Open Source Definition (Version 1.9) # license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative. # published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via https://bugs.opensuse.org/
# #
Name: libinstpatch Name: libinstpatch
Version: 1.0.0 Version: 1.1.0
Release: 0 Release: 0
Summary: MIDI instrument patch library Summary: MIDI instrument patch library
License: LGPL-2.1 AND GPL-2.0 AND GPL-2.0+ License: LGPL-2.1-only
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
Url: http://www.swamiproject.org/ Url: http://www.swamiproject.org/
# Fetch source via # Fetch source via
# sh libinstpatch-snapshot.sh latest # sh libinstpatch-snapshot.sh latest
Source0: libinstpatch-%{version}+svn386.tar.bz2 Source0: libinstpatch-%{version}.tar.gz
# script to download sources and make tarball from svn
Source1: libinstpatch-snapshot.sh
# .pc file fixes. Patch sent upstream via their mailing list # .pc file fixes. Patch sent upstream via their mailing list
Patch0: libinstpatch-cmake-fixes.patch Patch0: libinstpatch-cmake-fixes.patch
Patch1: 0001-Fix-improper-GValue-type-assignments-in-ipatch_dls2_.patch
Patch2: 0002-fix-incorrect-usage-of-g_value_set_flags.patch
Patch3: 0003-missing-mutex-unlock.patch
Patch4: 0004-more-locking-issues.patch
BuildRequires: cmake BuildRequires: cmake
BuildRequires: pkgconfig BuildRequires: pkgconfig
BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(glib-2.0)
@ -43,11 +37,11 @@ BuildRequires: pkgconfig(sndfile)
libInstPatch is a library for processing digital sample based MIDI libInstPatch is a library for processing digital sample based MIDI
instrument "patch" files. instrument "patch" files.
%package -n libinstpatch-1_0-0 %package -n libinstpatch-1_0-1
Summary: Libinstpatch library Summary: Libinstpatch library
Group: System/Libraries Group: System/Libraries
%description -n libinstpatch-1_0-0 %description -n libinstpatch-1_0-1
libInstPatch stands for lib-Instrument-Patch and is a library for processing libInstPatch stands for lib-Instrument-Patch and is a library for processing
digital sample based MIDI instrument "patch" files. The types of files digital sample based MIDI instrument "patch" files. The types of files
libInstPatch supports are used for creating instrument sounds for wavetable libInstPatch supports are used for creating instrument sounds for wavetable
@ -59,18 +53,14 @@ This package contains the library of %{name}.
%package devel %package devel
Summary: Development package for %{name} Summary: Development package for %{name}
Group: Development/Languages/C and C++ Group: Development/Languages/C and C++
Requires: libinstpatch-1_0-0 = %{version} Requires: libinstpatch-1_0-1 = %{version}
%description devel %description devel
This package includes the header files for %{name}. This package includes the header files for %{name}.
%prep %prep
%setup -q %setup -q
%patch0 -p1 -b .pkgconfig %patch0 -p1 -b .pkgconfig -F24
%patch1 -p2
%patch2 -p2
%patch3 -p2
%patch4 -p2
%build %build
%cmake %cmake
@ -79,17 +69,17 @@ make %{?_smp_mflags}
%install %install
%cmake_install %cmake_install
%post -n libinstpatch-1_0-0 -p /sbin/ldconfig %post -n libinstpatch-1_0-1 -p /sbin/ldconfig
%postun -n libinstpatch-1_0-0 -p /sbin/ldconfig %postun -n libinstpatch-1_0-1 -p /sbin/ldconfig
%files -n libinstpatch-1_0-0 %files -n libinstpatch-1_0-1
%defattr(-,root,root) %defattr(-,root,root)
%doc COPYING %doc COPYING
%{_libdir}/%{name}*.so.* %{_libdir}/%{name}*.so.*
%files devel %files devel
%defattr(-,root,root) %defattr(-,root,root)
%doc AUTHORS ChangeLog NEWS README %doc AUTHORS ChangeLog README.md
%doc examples/create_sf2.c %doc examples/create_sf2.c
%{_includedir}/%{name}* %{_includedir}/%{name}*
%{_libdir}/%{name}*.so %{_libdir}/%{name}*.so