Skip to contentSkip to conversation

libsocketcan: Add PACKAGECONFIG options

PATCH In review Mark Jonas 2 participants 3 messages Nov 13, 2020 – Nov 14, 2020

lore
Share & tools
lore

Mark Jonas

author
#0 lore raw

PATCH 1/1 libsocketcan: Add PACKAGECONFIG options

libsocketcan offers two configuration options.

debug: Compile for debugging. Off by default.
error-log: Logging of error events to stderr. On by default.

Because error-log is on by default the package config option is no-error-log to retain existing recipe behavior.

---
 meta-oe/recipes-extended/socketcan/libsocketcan_0.0.11.bb | 4 ++++
 1 file changed, 4 insertions(+)
meta-oe/recipes-extended/socketcan/libsocketcan_0.0.11.bb +4 -0
index 0debe47e0..917f5e684 100644
@@ -12,3 +12,7 @@ SRC_URI = "git://git.pengutronix.de/git/tools/libsocketcan.git;protocol=git"
 S = "${WORKDIR}/git"
 
 inherit autotools pkgconfig
+
+PACKAGECONFIG ?= ""
+PACKAGECONFIG[debug] = "--enable-debug,--disable-debug"
+PACKAGECONFIG[no-error-log] = "--disable-error-log,--enable-error-log"
Signature · 1 line
2.25.1
#1 lore raw
Quoted 19 lines · Mark Jonas

libsocketcan offers two configuration options.

debug: Compile for debugging. Off by default.
error-log: Logging of error events to stderr. On by default.

Because error-log is on by default the package config option is no-error-log to retain existing recipe behavior.

---
 meta-oe/recipes-extended/socketcan/libsocketcan_0.0.11.bb | 4 ++++
 1 file changed, 4 insertions(+)
meta-oe/recipes-extended/socketcan/libsocketcan_0.0.11.bb +0 -0
index 0debe47e0..917f5e684 100644

meta-oe/recipes-extended/socketcan/libsocketcan_0.0.11.bb SRC_URI = "git://git.pengutronix.de/git/tools/libsocketcan.git;protocol=git" · line 18

Quoted 7 lines
meta-oe/recipes-extended/socketcan/libsocketcan_0.0.11.bb +4 -0
@@ -12,3 +12,7 @@ SRC_URI = "git://git.pengutronix.de/git/tools/libsocketcan.git;protocol=git"
 S = "${WORKDIR}/git"
 
 inherit autotools pkgconfig
+
+PACKAGECONFIG ?= ""
+PACKAGECONFIG[debug] = "--enable-debug,--disable-debug"
+PACKAGECONFIG[no-error-log] = "--disable-error-log,--enable-error-log"

what are defaults for configure ?
perhaps its more readable if its
PACKAGECONFIG ?= "error-log"
PACKAGECONFIG[error-log] = "--enable-error-log,--disable-error-log"

Quoted 6 lines

--
2.25.1

author
#2 lore raw

Hi Khem,

Quoted 8 lines

meta-oe/recipes-extended/socketcan/libsocketcan_0.0.11.bb SRC_URI = "git://git.pengutronix.de/git/tools/libsocketcan.git;protocol=git" · line 18

Quoted 3 lines
meta-oe/recipes-extended/socketcan/libsocketcan_0.0.11.bb +3 -0
+PACKAGECONFIG ?= ""
+PACKAGECONFIG[debug] = "--enable-debug,--disable-debug"
+PACKAGECONFIG[no-error-log] = "--disable-error-log,--enable-error-log"

what are defaults for configure ?
perhaps its more readable if its
PACKAGECONFIG ?= "error-log"
PACKAGECONFIG[error-log] = "--enable-error-log,--disable-error-log"

For ./configure itself the default is --enable-error-log=yes. So right now everybody using the defaults has error-log enabled.

https://git.pengutronix.de/cgit/tools/libsocketcan/tree/configure.ac#n107

I also thought about adding "error-log" as the default into PACKAGECONFIG but wasn't sure whether there would be an undesired side-effect if someone already used PACKAGECONFIG in a personal
bbappend: In this case error-log would be suddenly gone.

I have no problem changing it according to your proposal. Please tell me, I will update the patch accordingly.

Greetings,
Mark