21105889 build python dnet module
authorRich Burridge <rich.burridge@oracle.com>
Fri, 22 May 2015 06:02:19 -0700
changeset 4342 ede611c77414
parent 4341 10335b2a1e5d
child 4344 071eb292dd02
21105889 build python dnet module
components/libdnet/Makefile
components/libdnet/libdnet.p5m
--- a/components/libdnet/Makefile	Thu May 21 16:35:22 2015 -0700
+++ b/components/libdnet/Makefile	Fri May 22 06:02:19 2015 -0700
@@ -22,6 +22,8 @@
 #
 include ../../make-rules/shared-macros.mk
 
+PATH=$(SPRO_VROOT)/bin:/usr/bin:/usr/gnu/bin
+
 COMPONENT_NAME=		libdnet
 COMPONENT_VERSION=	1.12
 COMPONENT_PROJECT_URL=	http://code.google.com/p/libdnet/
@@ -48,12 +50,21 @@
 
 # Set -m32 or -m64 correctly for 32 and 64 bit versions.
 CC +=	$(CC_BITS)
+LDFLAGS += $(CC_BITS)
 
 # Remove Linux specific functionality.
 CONFIGURE_OPTIONS += ac_cv_dnet_linux_pf_packet=no
 
 CONFIGURE_OPTIONS +=	--with-check=/usr
 
+# Currently only support for Python 2.7.
+CONFIGURE_OPTIONS +=	--with-python
+
+COMPONENT_BUILD_ARGS +=	CC="$(CC)"
+COMPONENT_BUILD_ARGS +=	LDFLAGS="$(LDFLAGS)"
+
+PKG_MACROS +=		MACHINE=$(shell uname -m)
+
 # Needed for "gmake test" to work successfully.
 # If SHELLOPTS is exported (as it is by the userland makefiles),
 # then all shell options get exported to child invocations of bash,
@@ -79,5 +90,6 @@
 system-test:    $(SYSTEM_TESTS_NOT_IMPLEMENTED)
 
 REQUIRED_PACKAGES += developer/test/check
+REQUIRED_PACKAGES += runtime/python-27
 REQUIRED_PACKAGES += shell/ksh93
 REQUIRED_PACKAGES += system/library
--- a/components/libdnet/libdnet.p5m	Thu May 21 16:35:22 2015 -0700
+++ b/components/libdnet/libdnet.p5m	Fri May 22 06:02:19 2015 -0700
@@ -58,6 +58,12 @@
 link path=usr/lib/libdnet.so target=libdnet.so.1.0.1
 link path=usr/lib/libdnet.so.1 target=libdnet.so.1.0.1
 file path=usr/lib/libdnet.so.1.0.1
+file $(MACH64)/python/build/lib.solaris-2.12-$(MACHINE).32bit-2.7/dnet.so \
+    path=usr/lib/python2.7/vendor-packages/64/dnet.so
+file usr/lib/python2.7/site-packages/dnet-$(COMPONENT_VERSION)-py2.7.egg-info \
+    path=usr/lib/python2.7/vendor-packages/dnet-$(COMPONENT_VERSION)-py2.7.egg-info
+file $(MACH32)/python/build/lib.solaris-2.12-$(MACHINE).32bit-2.7/dnet.so \
+    path=usr/lib/python2.7/vendor-packages/dnet.so
 file usr/sbin/$(MACH64)/dnet path=usr/sbin/dnet
 file usr/share/man/man8/dnet.8 path=usr/share/man/man1m/dnet.1m
 file path=usr/share/man/man3/dnet.3