dev-libs/libmodbus: respect users cflags

Closes: https://bugs.gentoo.org/941995
Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
This commit is contained in:
Conrad Kostecki
2024-11-09 02:40:25 +01:00
parent a41a2be177
commit b2659623e7
2 changed files with 26 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
--- a/configure.ac
+++ b/configure.ac
@@ -178,14 +178,6 @@
[enable_debug=$enableval],
[enable_debug=no])
-AS_IF([test "x$enable_debug" = "xyes"], [
- CFLAGS="-g -O0"
- CXXFLAGS="-g -O0"
-], [
- CFLAGS="-O2"
- CXXFLAGS="-O2"
-])
-
AC_OUTPUT
AC_MSG_RESULT([
$PACKAGE $VERSION

View File

@@ -3,6 +3,8 @@
EAPI=8
inherit autotools
DESCRIPTION="Modbus library which supports RTU communication over a serial line or a TCP link"
HOMEPAGE="https://libmodbus.org/"
SRC_URI="https://github.com/stephane/${PN}/releases/download/v${PV}/${P}.tar.gz"
@@ -13,6 +15,13 @@ KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86"
IUSE="static-libs test"
RESTRICT="!test? ( test )"
PATCHES=( "${FILESDIR}/${PN}-3.1.11-cflags.patch" )
src_prepare() {
default
eautoreconf
}
src_configure() {
local myeconfargs=(
$(use_enable test tests)