Skip to contentSkip to conversation

package/reactcpp: new package

PATCH New Marcin Niestroj 2 participants 8 messages Dec 6, 2016 – Dec 9, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/reactcpp: new package

---
 package/Config.in                                  |  1 +
 ...akefile-Cleanup-compiler-and-linker-flags.patch | 82 ++++++++++++++++++++++
 package/reactcpp/Config.in                         | 14 ++++
 package/reactcpp/reactcpp.hash                     |  2 +
 package/reactcpp/reactcpp.mk                       | 34 +++++++++
 5 files changed, 133 insertions(+)
 create mode 100644 package/reactcpp/0001-Makefile-Cleanup-compiler-and-linker-flags.patch
 create mode 100644 package/reactcpp/Config.in
 create mode 100644 package/reactcpp/reactcpp.hash
 create mode 100644 package/reactcpp/reactcpp.mk
package/Config.in +1 -0
index 664d0d9..27debdc 100644
@@ -1355,6 +1355,7 @@ endif
 	source "package/protobuf-c/Config.in"
 	source "package/qhull/Config.in"
 	source "package/qlibc/Config.in"
+	source "package/reactcpp/Config.in"
 	source "package/shapelib/Config.in"
 	source "package/sphinxbase/Config.in"
 	source "package/startup-notification/Config.in"
package/reactcpp/0001-Makefile-Cleanup-compiler-and-linker-flags.patch new file +82 -0

82 lines not on this page · raw message

package/reactcpp/Config.in new file +14 -0
new file mode 100644
index 0000000..f6989e5
@@ -0,0 +1,14 @@
+config BR2_PACKAGE_REACTCPP
+	bool "reactcpp"
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	select BR2_PACKAGE_C_ARES
+	select BR2_PACKAGE_LIBEV
+	help
+	  REACT-CPP is an event loop library that utilizes the new
+	  C++11 lambda functions to notify you when there is activity
+	  on a filedescriptor or on a timer. Internally, it is a wrapper
+	  around the libev library, and does therefore also depend on
+	  that library.
+
+	  https://github.com/CopernicaMarketingSoftware/REACT-CPP
package/reactcpp/reactcpp.hash new file +2 -0
new file mode 100644
index 0000000..c30dab6
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256 4af5d6a535ff7d8835d05db3490f2b62d6d791a4968ab45f479023868d7acdc8  reactcpp-v1.0.3.tar.gz
package/reactcpp/reactcpp.mk new file +34 -0
new file mode 100644
index 0000000..e198c3d
@@ -0,0 +1,34 @@
+################################################################################
+#
+# reactcpp
+#
+################################################################################
+
+REACTCPP_VERSION_MAJOR = 1.0
+REACTCPP_VERSION_RAW = $(REACTCPP_VERSION_MAJOR).3
+REACTCPP_VERSION = v$(REACTCPP_VERSION_RAW)
+REACTCPP_SITE = $(call github,CopernicaMarketingSoftware,REACT-CPP,$(REACTCPP_VERSION))
+REACTCPP_LICENSE = Apache-2.0
+REACTCPP_LICENSE_FILES = LICENSE
+REACTCPP_DEPENDENCIES = c-ares libev
+REACTCPP_INSTALL_STAGING = YES
+
+define REACTCPP_BUILD_CMDS
+	$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)
+endef
+
+define REACTCPP_INSTALL_STAGING_CMDS
+	$(MAKE) $(TARGET_CONFIGURE_OPTS) PREFIX=$(STAGING_DIR)/usr -C $(@D) install
+endef
+
+REACTCPP_SO = libreactcpp.so.$(REACTCPP_VERSION_RAW)
+
+ifeq ($(BR2_STATIC_LIBS),)
+define REACTCPP_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/src/$(REACTCPP_SO) $(TARGET_DIR)/usr/lib/$(REACTCPP_SO)
+	ln -sf $(REACTCPP_SO) $(TARGET_DIR)/usr/lib/libreactcpp.so.$(REACTCPP_VERSION_MAJOR)
+	ln -sf $(REACTCPP_SO) $(TARGET_DIR)/usr/lib/libreactcpp.so
+endef
+endif
+
+$(eval $(generic-package))
Signature · 1 line
2.10.2
#1 lore raw

PATCH 1/1 package/reactcpp: new package

Hello,

Thanks for this contribution! See some comments below.

Quoted 29 lines · Marcin Niestroj
package/reactcpp/0001-Makefile-Cleanup-compiler-and-linker-flags.patch new file +23 -0
new file mode 100644
index 0000000..a0b065a
@@ -0,0 +1,82 @@
+From 583b934dbd712e661e7c4eb994174bf71d88690c Mon Sep 17 00:00:00 2001
+From: Marcin Niestroj <[email protected]>
+Date: Tue, 15 Nov 2016 14:51:47 +0100
+Subject: [PATCH] Makefile: Cleanup compiler and linker flags
+
+Cleanup compiler and linker flags, so the library can be easily
+cross-compiled by overwriting CPPFLAGS, CXXFLAGS and LDFLAGS:
+
+* Rename CPP into CXX, as we use this command for compiling, not
+  preprocessing.
+* Remove separate LD usage, use CXX instead. This is to still launch
+  compiler command when user overrides CXX and LD commands.
+* Define MY_CXXFLAGS and MY_LDFLAGS, which should always take place and
+  not get overridden by user.
+* Define AR command, which can be overidden by user.
+---
+ src/Makefile | 26 +++++++++++++-------------
+ 1 file changed, 13 insertions(+), 13 deletions(-)
+
+diff --git a/src/Makefile b/src/Makefile
+index 54e938a..5fb9763 100644
+--- a/src/Makefile
++++ b/src/Makefile

package/reactcpp/0001-Makefile-Cleanup-compiler-and-linker-flags.patch line 33

Quoted 10 lines
package/reactcpp/0001-Makefile-Cleanup-compiler-and-linker-flags.patch new file +10 -0
+@@ -1,8 +1,8 @@
+-CPP		= g++
++AR		= ar
++CXX		= g++
+ RM		= rm -f
+-CPPFLAGS	= -Wall -MMD -c -I. -std=c++11
+-LD		= g++
+-LD_FLAGS	= -Wall -shared
++MY_CXXFLAGS	= -Wall -MMD -c -I. -std=c++11
++MY_LDFLAGS	= -Wall -shared

You can also do:

override CXXFLAGS += ...
override LDFLAGS += ...

package/reactcpp/Config.in line 4

Quoted 10 lines
package/reactcpp/Config.in new file +4 -0
new file mode 100644
index 0000000..f6989e5
@@ -0,0 +1,14 @@
+config BR2_PACKAGE_REACTCPP
+	bool "reactcpp"
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_TOOLCHAIN_HAS_THREADS

You have two dependencies here.

package/reactcpp/Config.in line 14

Quoted 10 lines
package/reactcpp/Config.in new file +10 -0
+	select BR2_PACKAGE_C_ARES
+	select BR2_PACKAGE_LIBEV
+	help
+	  REACT-CPP is an event loop library that utilizes the new
+	  C++11 lambda functions to notify you when there is activity
+	  on a filedescriptor or on a timer. Internally, it is a wrapper
+	  around the libev library, and does therefore also depend on
+	  that library.
+
+	  https://github.com/CopernicaMarketingSoftware/REACT-CPP

So you need a Config.in comment here about those dependencies. Check other packages and the Buildroot manual for details.

Quoted 14 lines
package/reactcpp/reactcpp.hash new file +2 -0
new file mode 100644
index 0000000..c30dab6
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256 4af5d6a535ff7d8835d05db3490f2b62d6d791a4968ab45f479023868d7acdc8  reactcpp-v1.0.3.tar.gz
package/reactcpp/reactcpp.mk new file +0 -0
new file mode 100644
index 0000000..e198c3d

package/reactcpp/reactcpp.mk line 9

Quoted 9 lines
package/reactcpp/reactcpp.mk new file +9 -0
@@ -0,0 +1,34 @@
+################################################################################
+#
+# reactcpp
+#
+################################################################################
+
+REACTCPP_VERSION_MAJOR = 1.0
+REACTCPP_VERSION_RAW = $(REACTCPP_VERSION_MAJOR).3
+REACTCPP_VERSION = v$(REACTCPP_VERSION_RAW)

Just define the version as v$(REACTCPP_VERSION_MAJOR).3

package/reactcpp/reactcpp.mk line 17

Quoted 8 lines
package/reactcpp/reactcpp.mk new file +8 -0
+REACTCPP_SITE = $(call github,CopernicaMarketingSoftware,REACT-CPP,$(REACTCPP_VERSION))
+REACTCPP_LICENSE = Apache-2.0
+REACTCPP_LICENSE_FILES = LICENSE
+REACTCPP_DEPENDENCIES = c-ares libev
+REACTCPP_INSTALL_STAGING = YES
+
+define REACTCPP_BUILD_CMDS
+	$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)

Please pass $(TARGET_MAKE_ENV) in the environment.

package/reactcpp/reactcpp.mk line 21

Quoted 4 lines
package/reactcpp/reactcpp.mk new file +4 -0
+endef
+
+define REACTCPP_INSTALL_STAGING_CMDS
+	$(MAKE) $(TARGET_CONFIGURE_OPTS) PREFIX=$(STAGING_DIR)/usr -C $(@D) install

Ditto.

package/reactcpp/reactcpp.mk line 32

Quoted 11 lines
package/reactcpp/reactcpp.mk new file +11 -0
+endef
+
+REACTCPP_SO = libreactcpp.so.$(REACTCPP_VERSION_RAW)
+
+ifeq ($(BR2_STATIC_LIBS),)
+define REACTCPP_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/src/$(REACTCPP_SO) $(TARGET_DIR)/usr/lib/$(REACTCPP_SO)
+	ln -sf $(REACTCPP_SO) $(TARGET_DIR)/usr/lib/libreactcpp.so.$(REACTCPP_VERSION_MAJOR)
+	ln -sf $(REACTCPP_SO) $(TARGET_DIR)/usr/lib/libreactcpp.so
+endef
+endif

Why are you doing this instead of calling "make install" for $(TARGET_DIR) ?

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#2 lore raw

PATCH 1/1 package/reactcpp: new package

Hi,

Thanks for fast review!

Quoted 48 lines · Thomas Petazzoni

Hello,

Thanks for this contribution! See some comments below.

Quoted 29 lines · Marcin Niestroj
package/reactcpp/0001-Makefile-Cleanup-compiler-and-linker-flags.patch new file +23 -0
new file mode 100644
index 0000000..a0b065a
@@ -0,0 +1,82 @@
+From 583b934dbd712e661e7c4eb994174bf71d88690c Mon Sep 17 00:00:00 2001
+From: Marcin Niestroj <[email protected]>
+Date: Tue, 15 Nov 2016 14:51:47 +0100
+Subject: [PATCH] Makefile: Cleanup compiler and linker flags
+
+Cleanup compiler and linker flags, so the library can be easily
+cross-compiled by overwriting CPPFLAGS, CXXFLAGS and LDFLAGS:
+
+* Rename CPP into CXX, as we use this command for compiling, not
+  preprocessing.
+* Remove separate LD usage, use CXX instead. This is to still launch
+  compiler command when user overrides CXX and LD commands.
+* Define MY_CXXFLAGS and MY_LDFLAGS, which should always take place and
+  not get overridden by user.
+* Define AR command, which can be overidden by user.
+---
+ src/Makefile | 26 +++++++++++++-------------
+ 1 file changed, 13 insertions(+), 13 deletions(-)
+
+diff --git a/src/Makefile b/src/Makefile
+index 54e938a..5fb9763 100644
+--- a/src/Makefile
++++ b/src/Makefile

package/reactcpp/0001-Makefile-Cleanup-compiler-and-linker-flags.patch line 33

Quoted 10 lines
package/reactcpp/0001-Makefile-Cleanup-compiler-and-linker-flags.patch new file +10 -0
+@@ -1,8 +1,8 @@
+-CPP		= g++
++AR		= ar
++CXX		= g++
+ RM		= rm -f
+-CPPFLAGS	= -Wall -MMD -c -I. -std=c++11
+-LD		= g++
+-LD_FLAGS	= -Wall -shared
++MY_CXXFLAGS	= -Wall -MMD -c -I. -std=c++11
++MY_LDFLAGS	= -Wall -shared

You can also do:

Quoted 2 lines

override CXXFLAGS += ...
override LDFLAGS += ...

Thanks for pointing it. Didn't know that :)

Quoted 45 lines

package/reactcpp/Config.in line 4

Quoted 11 lines
package/reactcpp/Config.in new file +4 -0
new file mode 100644
index 0000000..f6989e5
@@ -0,0 +1,14 @@
+config BR2_PACKAGE_REACTCPP
+	bool "reactcpp"
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_TOOLCHAIN_HAS_THREADS

You have two dependencies here.

package/reactcpp/Config.in line 14

Quoted 10 lines
package/reactcpp/Config.in new file +10 -0
+	select BR2_PACKAGE_C_ARES
+	select BR2_PACKAGE_LIBEV
+	help
+	  REACT-CPP is an event loop library that utilizes the new
+	  C++11 lambda functions to notify you when there is activity
+	  on a filedescriptor or on a timer. Internally, it is a wrapper
+	  around the libev library, and does therefore also depend on
+	  that library.
+
+	  https://github.com/CopernicaMarketingSoftware/REACT-CPP

So you need a Config.in comment here about those dependencies. Check other packages and the Buildroot manual for details.

Quoted 17 lines
package/reactcpp/reactcpp.hash new file +2 -0
new file mode 100644
index 0000000..c30dab6
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256 4af5d6a535ff7d8835d05db3490f2b62d6d791a4968ab45f479023868d7acdc8  reactcpp-v1.0.3.tar.gz
package/reactcpp/reactcpp.mk new file +3 -0
new file mode 100644
index 0000000..e198c3d
@@ -0,0 +1,34 @@
+################################################################################
+#
+# reactcpp
Quoted 8 lines

package/reactcpp/reactcpp.mk line 9

Quoted 6 lines
package/reactcpp/reactcpp.mk new file +6 -0
+#
+################################################################################
+
+REACTCPP_VERSION_MAJOR = 1.0
+REACTCPP_VERSION_RAW = $(REACTCPP_VERSION_MAJOR).3
+REACTCPP_VERSION = v$(REACTCPP_VERSION_RAW)

Just define the version as v$(REACTCPP_VERSION_MAJOR).3

I am using $(REACTCPP_VERSION_RAW) below to define $(REACTCPP_SO).

Quoted 19 lines

package/reactcpp/reactcpp.mk line 17

Quoted 9 lines
package/reactcpp/reactcpp.mk new file +8 -0
+REACTCPP_SITE = $(call github,CopernicaMarketingSoftware,REACT-CPP,$(REACTCPP_VERSION))
+REACTCPP_LICENSE = Apache-2.0
+REACTCPP_LICENSE_FILES = LICENSE
+REACTCPP_DEPENDENCIES = c-ares libev
+REACTCPP_INSTALL_STAGING = YES
+
+define REACTCPP_BUILD_CMDS
+	$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)

Please pass $(TARGET_MAKE_ENV) in the environment.

package/reactcpp/reactcpp.mk line 21

Quoted 4 lines
package/reactcpp/reactcpp.mk new file +4 -0
+endef
+
+define REACTCPP_INSTALL_STAGING_CMDS
+	$(MAKE) $(TARGET_CONFIGURE_OPTS) PREFIX=$(STAGING_DIR)/usr -C $(@D) install

Ditto.

Quoted 14 lines

package/reactcpp/reactcpp.mk line 32

Quoted 11 lines
package/reactcpp/reactcpp.mk new file +11 -0
+endef
+
+REACTCPP_SO = libreactcpp.so.$(REACTCPP_VERSION_RAW)
+
+ifeq ($(BR2_STATIC_LIBS),)
+define REACTCPP_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/src/$(REACTCPP_SO) $(TARGET_DIR)/usr/lib/$(REACTCPP_SO)
+	ln -sf $(REACTCPP_SO) $(TARGET_DIR)/usr/lib/libreactcpp.so.$(REACTCPP_VERSION_MAJOR)
+	ln -sf $(REACTCPP_SO) $(TARGET_DIR)/usr/lib/libreactcpp.so
+endef
+endif

Why are you doing this instead of calling "make install" for $(TARGET_DIR) ?

Because make install also copies header files and static library.

Quoted 5 lines

Thanks,

Thomas

Signature · 1 line
Marcin Niestroj
#3 lore raw

PATCH 1/1 package/reactcpp: new package

Hello,

Quoted 3 lines · Marcin Niestroj
Quoted 1 line

Just define the version as v$(REACTCPP_VERSION_MAJOR).3

I am using $(REACTCPP_VERSION_RAW) below to define $(REACTCPP_SO).

Yes, but REACTCPP_SO is useless, see below.

Quoted 11 lines
Quoted 10 lines

package/reactcpp/reactcpp.mk line 32

Quoted 7 lines
package/reactcpp/reactcpp.mk new file +7 -0
+ifeq ($(BR2_STATIC_LIBS),)
+define REACTCPP_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/src/$(REACTCPP_SO) $(TARGET_DIR)/usr/lib/$(REACTCPP_SO)
+	ln -sf $(REACTCPP_SO) $(TARGET_DIR)/usr/lib/libreactcpp.so.$(REACTCPP_VERSION_MAJOR)
+	ln -sf $(REACTCPP_SO) $(TARGET_DIR)/usr/lib/libreactcpp.so
+endef
+endif  

Why are you doing this instead of calling "make install" for $(TARGET_DIR) ?

Quoted 1 line

Because make install also copies header files and static library.

And that's perfectly fine. Just let "make install" install header files and static library. Buildroot will clean them up at the end of the build, in the "target-finalize" step.

It's much, much better (and future proof) to use the build system of the package itself when possible, and rely on target-finalize to clean things up at the end of the build.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#4 lore raw

PATCH 1/1 package/reactcpp: new package

Quoted 21 lines · Thomas Petazzoni

Hello,

Quoted 3 lines · Marcin Niestroj
Quoted 1 line

Just define the version as v$(REACTCPP_VERSION_MAJOR).3

I am using $(REACTCPP_VERSION_RAW) below to define $(REACTCPP_SO).

Yes, but REACTCPP_SO is useless, see below.

Quoted 11 lines
Quoted 10 lines

package/reactcpp/reactcpp.mk line 32

Quoted 7 lines
package/reactcpp/reactcpp.mk new file +7 -0
+ifeq ($(BR2_STATIC_LIBS),)
+define REACTCPP_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/src/$(REACTCPP_SO) $(TARGET_DIR)/usr/lib/$(REACTCPP_SO)
+	ln -sf $(REACTCPP_SO) $(TARGET_DIR)/usr/lib/libreactcpp.so.$(REACTCPP_VERSION_MAJOR)
+	ln -sf $(REACTCPP_SO) $(TARGET_DIR)/usr/lib/libreactcpp.so
+endef
+endif

Why are you doing this instead of calling "make install" for $(TARGET_DIR) ?

Quoted 5 lines
Quoted 1 line

Because make install also copies header files and static library.

And that's perfectly fine. Just let "make install" install header files and static library. Buildroot will clean them up at the end of the build, in the "target-finalize" step.

Ok, I was not aware cleaning header and *.a files in target-finalize.

I have used 'make install' and checked the target directory before and after target-finalize. There was *.a symlink pointing to *.a.1.0.3. After target-finalize only the symlink was removed. How should we fix that?

Quoted 9 lines

It's much, much better (and future proof) to use the build system of the package itself when possible, and rely on target-finalize to clean things up at the end of the build.

Thanks,

Thomas

Signature · 1 line
Marcin Niestroj
#5 lore raw

PATCH 1/1 package/reactcpp: new package

Hello,

Quoted 10 lines · Marcin Niestroj
Quoted 3 lines

And that's perfectly fine. Just let "make install" install header files and static library. Buildroot will clean them up at the end of the build, in the "target-finalize" step.

Ok, I was not aware cleaning header and *.a files in target-finalize.

I have used 'make install' and checked the target directory before and after target-finalize. There was *.a symlink pointing to *.a.1.0.3. After target-finalize only the symlink was removed. How should we fix that?

Then you can do a POST_INSTALL_TARGET_HOOKS to remove this additional file.

It is very weird to create a static library file name with a version number. Normally, static libraries are directly installed as lib<foo>.a.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#6 lore raw

PATCH 1/1 package/reactcpp: new package

In reply to Thomas Petazzoni
Quoted 4 lines · Thomas Petazzoni

Hello,

Thanks for this contribution! See some comments below.

<snip>

Quoted 18 lines
Quoted 6 lines
package/reactcpp/reactcpp.mk new file +0 -0
new file mode 100644
index 0000000..e198c3d

package/reactcpp/reactcpp.mk line 9

Quoted 9 lines
package/reactcpp/reactcpp.mk new file +9 -0
@@ -0,0 +1,34 @@
+################################################################################
+#
+# reactcpp
+#
+################################################################################
+
+REACTCPP_VERSION_MAJOR = 1.0
+REACTCPP_VERSION_RAW = $(REACTCPP_VERSION_MAJOR).3
+REACTCPP_VERSION = v$(REACTCPP_VERSION_RAW)

Just define the version as v$(REACTCPP_VERSION_MAJOR).3

Quoted 10 lines

package/reactcpp/reactcpp.mk line 17

Quoted 8 lines
package/reactcpp/reactcpp.mk new file +8 -0
+REACTCPP_SITE = $(call github,CopernicaMarketingSoftware,REACT-CPP,$(REACTCPP_VERSION))
+REACTCPP_LICENSE = Apache-2.0
+REACTCPP_LICENSE_FILES = LICENSE
+REACTCPP_DEPENDENCIES = c-ares libev
+REACTCPP_INSTALL_STAGING = YES
+
+define REACTCPP_BUILD_CMDS
+	$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)

Please pass $(TARGET_MAKE_ENV) in the environment.

Should I simply add $(TARGET_MAKE_ENV) before $(MAKE)?

Can you explain a little when I should use $(TARGET_MAKE_ENV), when $(TARGET_CONFIGURE_OPTS) and when both? In Buildroot manual examples they never exist together. And what I see in package/Makefile.in $(TARGET_CONFIGURE_OPTS) contains $(TARGET_MAKE_ENV).

Quoted 27 lines

package/reactcpp/reactcpp.mk line 21

Quoted 5 lines
package/reactcpp/reactcpp.mk new file +4 -0
+endef
+
+define REACTCPP_INSTALL_STAGING_CMDS
+	$(MAKE) $(TARGET_CONFIGURE_OPTS) PREFIX=$(STAGING_DIR)/usr -C $(@D) install

Ditto.

package/reactcpp/reactcpp.mk line 32

Quoted 11 lines
package/reactcpp/reactcpp.mk new file +11 -0
+endef
+
+REACTCPP_SO = libreactcpp.so.$(REACTCPP_VERSION_RAW)
+
+ifeq ($(BR2_STATIC_LIBS),)
+define REACTCPP_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/src/$(REACTCPP_SO) $(TARGET_DIR)/usr/lib/$(REACTCPP_SO)
+	ln -sf $(REACTCPP_SO) $(TARGET_DIR)/usr/lib/libreactcpp.so.$(REACTCPP_VERSION_MAJOR)
+	ln -sf $(REACTCPP_SO) $(TARGET_DIR)/usr/lib/libreactcpp.so
+endef
+endif

Why are you doing this instead of calling "make install" for $(TARGET_DIR) ?

Thanks,

Thomas

Signature · 1 line
Marcin Niestroj
#7 lore raw

PATCH 1/1 package/reactcpp: new package

Hi Thomas,

Quoted 41 lines · Marcin Niestroj
Quoted 4 lines · Thomas Petazzoni

Hello,

Thanks for this contribution! See some comments below.

<snip>

Quoted 20 lines
Quoted 7 lines
package/reactcpp/reactcpp.mk new file +1 -0
new file mode 100644
index 0000000..e198c3d
@@ -0,0 +1,34 @@
+################################################################################

package/reactcpp/reactcpp.mk line 9

Quoted 10 lines
package/reactcpp/reactcpp.mk new file +8 -0
 
+#
+# reactcpp
+#
+################################################################################
 
+
+REACTCPP_VERSION_MAJOR = 1.0
+REACTCPP_VERSION_RAW = $(REACTCPP_VERSION_MAJOR).3
+REACTCPP_VERSION = v$(REACTCPP_VERSION_RAW)

Just define the version as v$(REACTCPP_VERSION_MAJOR).3

Quoted 11 lines

package/reactcpp/reactcpp.mk line 17

Quoted 9 lines

+REACTCPP_SITE = $(call github,CopernicaMarketingSoftware,REACT-CPP,$(REACTCPP_VERSION))

package/reactcpp/reactcpp.mk new file +7 -0
+REACTCPP_LICENSE = Apache-2.0
+REACTCPP_LICENSE_FILES = LICENSE
+REACTCPP_DEPENDENCIES = c-ares libev
+REACTCPP_INSTALL_STAGING = YES
+
+define REACTCPP_BUILD_CMDS
+    $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)

Please pass $(TARGET_MAKE_ENV) in the environment.

Quoted 7 lines

Should I simply add $(TARGET_MAKE_ENV) before $(MAKE)?

Can you explain a little when I should use $(TARGET_MAKE_ENV), when $(TARGET_CONFIGURE_OPTS) and when both? In Buildroot manual examples they never exist together. And what I see in package/Makefile.in $(TARGET_CONFIGURE_OPTS) contains $(TARGET_MAKE_ENV).

Propably you missed my question above.

Regards,
Marcin

Quoted 31 lines
Quoted 30 lines
Quoted 6 lines
package/reactcpp/reactcpp.mk new file +4 -0
+endef
+
+define REACTCPP_INSTALL_STAGING_CMDS
+    $(MAKE) $(TARGET_CONFIGURE_OPTS) PREFIX=$(STAGING_DIR)/usr -C

$(@D) install

Ditto.

package/reactcpp/reactcpp.mk line 32

Quoted 13 lines
package/reactcpp/reactcpp.mk new file +7 -0
+endef
+
+REACTCPP_SO = libreactcpp.so.$(REACTCPP_VERSION_RAW)
+
+ifeq ($(BR2_STATIC_LIBS),)
+define REACTCPP_INSTALL_TARGET_CMDS
+    $(INSTALL) -D -m 0755 $(@D)/src/$(REACTCPP_SO)

$(TARGET_DIR)/usr/lib/$(REACTCPP_SO)
+ ln -sf $(REACTCPP_SO)
$(TARGET_DIR)/usr/lib/libreactcpp.so.$(REACTCPP_VERSION_MAJOR)

package/reactcpp/reactcpp.mk new file +3 -0
+    ln -sf $(REACTCPP_SO) $(TARGET_DIR)/usr/lib/libreactcpp.so
+endef
+endif

Why are you doing this instead of calling "make install" for $(TARGET_DIR) ?

Thanks,

Thomas

Signature · 1 line
Marcin Niestroj