Files
haikuports/sci-libs/nlopt/nlopt-2.7.1.recipe
Alexander von Gluck 47ea51f320 cmake/meson: Mass fix packages with broken debuginfo (#12822)
* cmake/debuginfo: Mass fix packages with broken debuginfo

* rtl_sdr: Fix trailing whitespace

* meson/debuginfo: Mass fix packages with broken debuginfo

* clean up conflicts

---------

Co-authored-by: Luc Schrijvers <begasus@gmail.com>
2026-01-07 17:36:21 +01:00

75 lines
1.7 KiB
Bash

SUMMARY="Non-linear optimization library"
DESCRIPTION="NLopt is a library for nonlinear local and global optimization, for functions with \
and without gradient information. It is designed as a simple, unified interface and packaging of \
several free/open-source nonlinear optimization libraries."
HOMEPAGE="https://github.com/stevengj/nlopt"
COPYRIGHT="2007-2011 Massachusetts Institute of Technology"
LICENSE="MIT
GNU LGPL v2.1"
REVISION="2"
SOURCE_URI="$HOMEPAGE/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="db88232fa5cef0ff6e39943fc63ab6074208831dc0031cf1545f6ecd31ae2a1a"
SOURCE_FILENAME="nlopt-v$portVersion.tar.gz"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
libVersion="0.11.1"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
nlopt$secondaryArchSuffix = $portVersion
lib:libnlopt$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
"
PROVIDES_devel="
nlopt${secondaryArchSuffix}_devel = $portVersion
devel:libnlopt$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
nlopt$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:liboctave$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:make
cmd:python3
cmd:swig
"
defineDebugInfoPackage nlopt$secondaryArchSuffix \
"$libDir"/libnlopt.so.$libVersion
BUILD()
{
cmake -Bbuild -S. \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
$cmakeDirArgs -Wno-dev
make -Cbuild $jobArgs
}
INSTALL()
{
make -Cbuild install
prepareInstalledDevelLib \
libnlopt
fixPkgconfig
packageEntries devel \
"$developDir"
}
TEST()
{
ctest --test-dir build --output-on-failure
}