Files
haikuports/media-libs/libinstpatch/libinstpatch-1.1.7.recipe
2025-11-25 17:32:04 +01:00

85 lines
2.3 KiB
Bash

SUMMARY="A library to process MIDI patch files"
DESCRIPTION="libInstPatch stands for lib-Instrument-Patch and is a library for \
processing digital sample based MIDI instrument \"patch\" files. The types of \
files libInstPatch supports are used for creating instrument sounds for \
wavetable synthesis. libInstPatch provides an object framework (based on \
GObject) to load patch files into, which can then be edited, converted, \
compressed and saved."
HOMEPAGE="https://github.com/swami/libinstpatch"
COPYRIGHT="1999-2019 Element Green and others"
LICENSE="GNU LGPL v2.1"
REVISION="1"
SOURCE_URI="$HOMEPAGE/archive/v$portVersion.tar.gz"
SOURCE_FILENAME="libinstpatch-v$portVersion.tar.gz"
CHECKSUM_SHA256="b388ab6f843559fc2da94837c37dfd4cf5973cf7cc2a0ce3cb33260b81377e9f"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
libVersion="2.2.1"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
libinstpatch$secondaryArchSuffix = $portVersion
lib:libinstpatch_1.0$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libglib_2.0$secondaryArchSuffix
lib:libgobject_2.0$secondaryArchSuffix
lib:libgthread_2.0$secondaryArchSuffix
lib:libintl$secondaryArchSuffix
lib:libsndfile$secondaryArchSuffix
"
PROVIDES_devel="
libinstpatch${secondaryArchSuffix}_devel = $portVersion
devel:libinstpatch_1.0$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
libinstpatch$secondaryArchSuffix == $portVersion base
devel:libglib_2.0$secondaryArchSuffix
devel:libsndfile$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libglib_2.0$secondaryArchSuffix
devel:libsndfile$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
"
defineDebugInfoPackage libinstpatch$secondaryArchSuffix \
$libDir/libinstpatch-1.0.so.$libVersion
BUILD()
{
cmake -B build -S . -DCMAKE_BUILD_TYPE=RelWithDebInfo \
$cmakeDirArgs \
-Wno-dev
make -C build $jobArgs
}
INSTALL()
{
make -C build install
prepareInstalledDevelLib \
libinstpatch-1.0
fixPkgconfig
# fix fixPkgconfig
sed -i "s,\/headers$secondaryArchSubDir,\/headers$secondaryArchSubDir/libinstpatch-2,g" \
$developLibDir/pkgconfig/libinstpatch-1.0.pc
# devel package
packageEntries devel \
$developDir
}