Skip to contentSkip to conversation

omniorb: new package

PATCH Superseded Matt Weber 2 participants 2 messages Sep 11, 2013 – Sep 12, 2013

v2 of 5 Superseded Latest is v5 →

lore
Share & tools
lore

Matt Weber

author
#0 lore raw

PATCH v2 1/1 omniorb: new package

---
Changes v1 -> v2:
* Fixed formatting of help and added select of python in package/omniorb/Config.in (suggested by Thomas)
* Removed extra open ended config option as it isn't used package/omniorb/Config.in (suggested by Thomas)
* Cleaned up use of brackets and replaced with braces package/omniorb/Config.in (suggested by Thomas)
* Updated licenses to be GPL and LGPL with a + package/omniorb/omniorb.mk (suggested by Thomas)
* Removed redundant conf opt and target install sets package/omniorb/omniorb.mk (suggested by Thomas)
* Added a post install step to replace overloading the default staging installs package/omniorb/omniorb.mk (suggested by Thomas)
* Broke out tools(host) build into seperate post conf step package/omniorb/omniorb.mk (suggested by Thomas)
* Removed clean and uninstall package/omniorb/omniorb.mk (suggested by Thomas)

 package/Config.in          |    1 +
 package/omniorb/Config.in  |    9 ++++++++
 package/omniorb/omniorb.mk |   50 ++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 60 insertions(+), 0 deletions(-)
 create mode 100644 package/omniorb/Config.in
 create mode 100644 package/omniorb/omniorb.mk
package/Config.in +1 -0
index a94cb62..b4cc869 100644
@@ -600,6 +600,7 @@ source "package/libupnp/Config.in"
 source "package/libvncserver/Config.in"
 source "package/libwebsockets/Config.in"
 source "package/nss-mdns/Config.in"
+source "package/omniorb/Config.in"
 source "package/openpgm/Config.in"
 source "package/ortp/Config.in"
 source "package/slirp/Config.in"
package/omniorb/Config.in new file +9 -0
new file mode 100644
index 0000000..eaa1585
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_OMNIORB
+	bool "omniorb"
+	select BR2_PACKAGE_PYTHON
+	help
+	  omniORB is a robust high performance CORBA ORB for C++ and Python.
+	  omniORB is largely CORBA 2.6 compliant. omniORB is one of only 
+	  three ORBs to have been awarded the Open Group's Open Brand for 
+	  CORBA. This means that omniORB has been tested and certified 
+	  CORBA compliant, to version 2.1 of the CORBA specification. 
package/omniorb/omniorb.mk new file +50 -0

50 lines not on this page · raw message

Signature · 1 line
1.7.1
#1 lore raw

PATCH v2 1/1 omniorb: new package

Dear Matt Weber,

Thanks for this updated version. There are still a few things to fix, but we're definitely approaching something that can be applied. See below.

Quoted 18 lines · Matt Weber
package/Config.in +1 -0
index a94cb62..b4cc869 100644
@@ -600,6 +600,7 @@ source "package/libupnp/Config.in"
 source "package/libvncserver/Config.in"
 source "package/libwebsockets/Config.in"
 source "package/nss-mdns/Config.in"
+source "package/omniorb/Config.in"
 source "package/openpgm/Config.in"
 source "package/ortp/Config.in"
 source "package/slirp/Config.in"
package/omniorb/Config.in new file +0 -0
new file mode 100644
index 0000000..eaa1585

package/omniorb/Config.in line 3

Quoted 3 lines
package/omniorb/Config.in new file +3 -0
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_OMNIORB
+	bool "omniorb"
+	select BR2_PACKAGE_PYTHON

You shouldn't select BR2_PACKAGE_PYTHON here: it is not a mandatory dependency, and your package automatically enables Python bindings when the target Python package is enabled.

package/omniorb/Config.in line 9

Quoted 6 lines
package/omniorb/Config.in new file +6 -0
+	help
+	  omniORB is a robust high performance CORBA ORB for C++ and Python.
+	  omniORB is largely CORBA 2.6 compliant. omniORB is one of only 
+	  three ORBs to have been awarded the Open Group's Open Brand for 
+	  CORBA. This means that omniORB has been tested and certified 
+	  CORBA compliant, to version 2.1 of the CORBA specification. 

Please add an empty line here, and then the upstream URL of the project
(http://omniorb.sourceforge.net/). See
http://buildroot.org/downloads/manual/manual.html#writing-rules-config-in.

Quoted 9 lines
package/omniorb/omniorb.mk new file +3 -0
new file mode 100644
index 0000000..15f7ced
@@ -0,0 +1,50 @@
+################################################################################
+#
+# omniorb

package/omniorb/omniorb.mk line 13

Quoted 10 lines
package/omniorb/omniorb.mk new file +10 -0
+#
+################################################################################
+
+OMNIORB_VERSION = 4.1.6
+OMNIORB_SITE = http://downloads.sourceforge.net/project/omniorb/omniORB/omniORB-$(OMNIORB_VERSION)
+OMNIORB_SOURCE = omniORB-$(OMNIORB_VERSION).tar.bz2
+OMNIORB_INSTALL_STAGING = YES
+OMNIORB_LICENSE = GPL2+ LGPLv2.1+
+OMNIORB_LICENSE_FILES = COPYING COPYING.LIB
+OMNIORB_DEPENDENCIES += host-python

Is Python really needed to *build* omniorb? Note that Python is already a core dependency of Buildroot, so normally there's no need to depend on host-python, but I agree that this is not a rule that is consistently applied across Buildroot today.

(Also, note that the += is unnecessary, we usually use a normal = here).

package/omniorb/omniorb.mk line 20

Quoted 6 lines
package/omniorb/omniorb.mk new file +6 -0
+ifeq ($(BR2_PACKAGE_PYTHON),y)
+	OMNIORB_DEPENDENCIES += python
+	OMNIORB_CONF_OPT += --enable-python-bindings
+else
+	OMNIORB_CONF_OPT += --disable-python-bindings
+endif

This looks good, provided you remove the "select BR2_PACKAGE_PYTHON" in the Config.in file.

package/omniorb/omniorb.mk line 33

Quoted 11 lines
package/omniorb/omniorb.mk new file +11 -0
+# The following is a space-separated list of files that need to have directory fixups
+OMNIORB_FIXUP_FILES = ${STAGING_DIR}/usr/bin/omniidl
+
+# Should be able to create a patch that cleans this up.........
+define OMNIORB_FIXUP_FILE_PATHS_HOOK
+	echo "Fixing file paths..."
+	for i in $(OMNIORB_FIXUP_FILES); do \
+	$(SED) "s:$(HOST_DIR)/usr:/usr:g" $$i; \
+	done
+endef
+OMNIORB_POST_INSTALL_STAGING_HOOKS += OMNIORB_FIXUP_FILE_PATHS_HOOK 

It seems a bit too much to have a loop when a single file needs to be fixed. I believe the fixup you're doing here is the right solution, so no need for a comment that explains it should be turned into a patch.

Also, something that is incorrect in various places in your .mk file:
you should *always* use $(...) to reference make variables, and not ${...}.

So, you can do something like:

define OMNIORB_FIXUP_FILE_PATHS

	$(SED) "s:$(HOST_DIR)/usr:/usr:g" $(STAGING_DIR)/usr/bin/omniidl

endef
OMNIORB_POST_INSTALL_STAGING_HOOKS += OMNIORB_FIXUP_FILE_PATHS

package/omniorb/omniorb.mk line 40

Quoted 6 lines
package/omniorb/omniorb.mk new file +6 -0
+# OMNIORB is currently not cross-compile friendly and has some assumptions where
+# a couple host tools are built in place and then used during the build.  The tools
+# generate code from the IDL description language, which is then built into the 
+# cross compiled OMNIORB application.
+# So this hook first builds the couple tools required for the host side generation of code.
+# It then leaves/places them in the locations where the existing build infrastructure expects.

Excellent comment. Can you just wrap the lines at a slightly smaller length?

package/omniorb/omniorb.mk line 45

Quoted 5 lines
package/omniorb/omniorb.mk new file +5 -0
+define OMNIORB_TOOLS_HOOK
+	${HOST_MAKE_ENV} ${MAKE} CXX=${HOSTCXX} CC=${HOSTCC} -C $(@D)/src/tool/omkdepend
+	cp $(@D)/src/tool/omkdepend/omkdepend $(@D)/bin/
+	${HOST_MAKE_ENV} ${MAKE} CXX=${HOSTCXX} CC=${HOSTCC} -C $(@D)/src/tool/omniidl/cxx/cccp
+	${HOST_MAKE_ENV} ${MAKE} CXX=${HOSTCXX} CC=${HOSTCC} -C $(@D)/src/tool/omniidl/cxx

Please use $(...) instead of ${...} for all variables. Also, you should use quotes when passing CC or CXX, or you'll break the ccache support that adds a space within the value of $(HOSTCXX) and $(HOSTCC). And in fact, instead of passing HOSTCXX and HOSTCC manually, we can just use $(HOST_CONFIGURE_OPTS) :

	$(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D)/src/tool/omkdepend
	cp $(@D)/src/tool/omkdepend/omkdepend $(@D)/bin/
	$(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D)/src/tool/omniidl/cxx/cccp
	$(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D)/src/tool/omniidl/cxx

Thanks!

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com