Skip to contentSkip to conversation

package/tinycbor: override prefix at build time as well

PATCH In review Peter Korsgaard 1 participant 3 messages Apr 17, 2024 – May 7, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/tinycbor: override prefix at build time as well

To ensure the correct prefix is used in the generated tinycbor.pc instead of /usr/local:

Quoted 1 line
Quoted 1 line
Quoted 1 line

tinycbor 0.6.0 Building

..

sed > tinycbor.pc < tinycbor.pc.in \
        -e 's,@prefix@,/usr/local,' \
        -e 's,@exec_prefix@,/usr/local,' \
        -e 's,@libdir@,/usr/local/lib,' \
        -e 's,@includedir@,/usr/local/include,' \
        -e 's,@version@,0.6.0,'
Quoted 1 line
Quoted 1 line
Quoted 1 line

tinycbor 0.6.0 Installing to staging directory

..
install -m 644 tinycbor.pc /path/to/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/pkgconfig/tinycbor.pc

---
 package/tinycbor/tinycbor.mk | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
package/tinycbor/tinycbor.mk +3 -3
index cad50e633b..d2fb583e67 100644
@@ -16,7 +16,7 @@ ifeq ($(BR2_PACKAGE_CJSON),y)
 TINYCBOR_DEPENDENCIES += cjson
 endif
 
-TINYCBOR_MAKE_OPTS = $(TARGET_CONFIGURE_OPTS) DISABLE_WERROR=1 V=1
+TINYCBOR_MAKE_OPTS = $(TARGET_CONFIGURE_OPTS) DISABLE_WERROR=1 V=1 prefix=/usr
 
 ifeq ($(BR2_STATIC_LIBS),y)
 TINYCBOR_MAKE_OPTS += BUILD_STATIC=1 BUILD_SHARED=0
@@ -34,12 +34,12 @@ endef
 
 define TINYCBOR_INSTALL_STAGING_CMDS
 	$(TARGET_MAKE_ENV) $(MAKE) $(TINYCBOR_MAKE_OPTS) -C $(@D) \
-		DESTDIR=$(STAGING_DIR) prefix=/usr install
+		DESTDIR=$(STAGING_DIR) install
 endef
 
 define TINYCBOR_INSTALL_TARGET_CMDS
 	$(TARGET_MAKE_ENV) $(MAKE) $(TINYCBOR_MAKE_OPTS) -C $(@D) \
-		DESTDIR=$(TARGET_DIR) prefix=/usr install
+		DESTDIR=$(TARGET_DIR) install
 endef
 
 $(eval $(generic-package))
Signature · 6 lines
2.39.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 13 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Peter" == Peter Korsgaard <[email protected]> writes:

To ensure the correct prefix is used in the generated tinycbor.pc instead of /usr/local:

Quoted 1 line
Quoted 1 line
Quoted 1 line

tinycbor 0.6.0 Building

..

sed > tinycbor.pc < tinycbor.pc.in \
        -e 's,@prefix@,/usr/local,' \
        -e 's,@exec_prefix@,/usr/local,' \
        -e 's,@libdir@,/usr/local/lib,' \
        -e 's,@includedir@,/usr/local/include,' \
        -e 's,@version@,0.6.0,'
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

tinycbor 0.6.0 Installing to staging directory

..
install -m 644 tinycbor.pc /path/to/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/pkgconfig/tinycbor.pc

Committed, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw
Quoted 14 lines
Quoted 14 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

"Peter" == Peter Korsgaard <[email protected]> writes:

"Peter" == Peter Korsgaard <[email protected]> writes:

To ensure the correct prefix is used in the generated tinycbor.pc instead of /usr/local:

Quoted 1 line
Quoted 1 line
Quoted 1 line

tinycbor 0.6.0 Building

..
sed > tinycbor.pc < tinycbor.pc.in \

(quoted diff) +0 -5
-e 's,@prefix@,/usr/local,' \
-e 's,@exec_prefix@,/usr/local,' \
-e 's,@libdir@,/usr/local/lib,' \
-e 's,@includedir@,/usr/local/include,' \
-e 's,@version@,0.6.0,'
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

tinycbor 0.6.0 Installing to staging directory

..
install -m 644 tinycbor.pc /path/to/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/pkgconfig/tinycbor.pc

Committed, thanks.

Committed to 2024.02.x, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot