--- a/components/gamin/Makefile Mon Oct 19 15:36:51 2015 -0700
+++ b/components/gamin/Makefile Mon Oct 12 09:25:27 2015 -0700
@@ -68,13 +68,36 @@
COMPONENT_TEST_TRANSFORMS += '-e "/^\*/d"'
COMPONENT_TEST_TRANSFORMS += '-e "/^!/d"'
-configure: $(CONFIGURE_32)
+# Where the gam_server will be located
+CONFIGURE_OPTIONS += --libexecdir="$(USRLIBDIR)"
+
+# Needed for 64 bit build - adds -m64
+CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
-build: $(BUILD_32)
+# Direct the python packages to vendor-packages dir instead of site-packages
+COMPONENT_BUILD_ARGS += PYTHON_SITE_PACKAGES=$(PYTHON_VENDOR_PACKAGES)
+
+# Use 64 bit python for 64 bit build
+CONFIGURE_OPTIONS += --with-python=$(PYTHON)
+
+# Use 64 bit install path for 64 bit python
+COMPONENT_INSTALL_ARGS += pythondir=$(PYTHON_VENDOR_PACKAGES)
-install: $(INSTALL_32)
+# The 64 bit compilation puts the .so module into .libs directory, but python
+# expects it in .libs/64
+$(BUILD_DIR_64)/.built: COMPONENT_POST_BUILD_ACTION = ( \
+ cd $(@D)/python/.libs ; \
+ mkdir -p 64 ; \
+ cp _gamin.so 64 \
+)
-test: $(TEST_32)
+configure: $(CONFIGURE_32_and_64)
+
+build: $(BUILD_32_and_64)
+
+install: $(INSTALL_32_and_64)
+
+test: $(TEST_32_and_64)
REQUIRED_PACKAGES += library/glib2
REQUIRED_PACKAGES += runtime/python-27
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/gamin/TESTING Mon Oct 12 09:25:27 2015 -0700
@@ -0,0 +1,68 @@
+Use the 'testgam' binary from workspace which is not shipped
+in gamin package.
+
+on terminal 1:
+==============
+mkdir /tmp/aha
+GAM_DEBUG= /usr/lib/gam_server --notimeout test
+
+on terminal 2:
+==============
+testgam -
+> connect test
+...
+> mondir /tmp/aha
+
+on terminal 3:
+==============
+mkdir /tmp/aha/x
+touch /tmp/aha/y
+rmdir /tmp/aha/x
+rm /tmp/aha/y
+
+On terminal 2 observe notifications about created and deleted entities.
+
+
+Verify that both 32 bit and 64 bit testgam binary works with
+64 bit gam_server.
+
+
+
+
+Python bindings are tested by this program:
+
+------------------------------------->8----
+#!/usr/bin/env python
+
+import gamin
+import time
+
+def callback(path, event):
+ print "Got callback: %s, %s" % (path, event)
+
+mon = gamin.WatchMonitor()
+mon.watch_directory("/tmp/aha", callback)
+while True:
+ time.sleep(1)
+ ret = mon.event_pending()
+ if ret > 0:
+ ret = mon.handle_one_event()
+ ret = mon.handle_events()
+mon.stop_watch("/tmp/aha")
+del mon
+------------------------------------->8----
+
+$ pkill -9 -f gam_server # this will also test that gam_server is
+ # spawned from the library when needed
+$ export GAM_CLIENT_ID=test
+$ /usr/bin/python2.7 /tmp/test.py
+
+# on second terminal create and delete files in /tmp/aha
+# and observe the test.py output
+
+$ pkill -9 -f gam_server
+$ /usr/bin/amd64/python2.7 /tmp/test.py # or sparcv9
+
+# on second terminal create and delete files in /tmp/aha
+# and observe the test.py output
+
--- a/components/gamin/gamin.p5m Mon Oct 19 15:36:51 2015 -0700
+++ b/components/gamin/gamin.p5m Mon Oct 12 09:25:27 2015 -0700
@@ -36,7 +36,14 @@
set name=org.opensolaris.arc-caseid value=PSARC/2010/143
set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
file path=usr/include/fam.h
-file usr/libexec/gam_server path=usr/lib/gam_server
+link path=usr/lib/$(MACH64)/libfam.so target=libfam.so.0.0.0
+link path=usr/lib/$(MACH64)/libfam.so.0 target=libfam.so.0.0.0
+file path=usr/lib/$(MACH64)/libfam.so.0.0.0
+link path=usr/lib/$(MACH64)/libgamin-1.so target=libgamin-1.so.0.1.10
+link path=usr/lib/$(MACH64)/libgamin-1.so.0 target=libgamin-1.so.0.1.10
+file path=usr/lib/$(MACH64)/libgamin-1.so.0.1.10
+file path=usr/lib/$(MACH64)/pkgconfig/gamin.pc
+file $(MACH64)/server/gam_server path=usr/lib/gam_server mode=0555
link path=usr/lib/libfam.so target=libfam.so.0.0.0
link path=usr/lib/libfam.so.0 target=libfam.so.0.0.0
file path=usr/lib/libfam.so.0.0.0
@@ -44,8 +51,9 @@
link path=usr/lib/libgamin-1.so.0 target=libgamin-1.so.0.1.10
file path=usr/lib/libgamin-1.so.0.1.10
file path=usr/lib/pkgconfig/gamin.pc
-file path=usr/lib/python2.7/site-packages/_gamin.so
-file path=usr/lib/python2.7/site-packages/gamin.py
+file path=usr/lib/python2.7/vendor-packages/64/_gamin.so
+file path=usr/lib/python2.7/vendor-packages/_gamin.so
+file path=usr/lib/python2.7/vendor-packages/gamin.py
file AUTHORS path=usr/share/doc/SUNWgamin/AUTHORS
file COPYING.bz2 path=usr/share/doc/SUNWgamin/COPYING.bz2
file ChangeLog.bz2 path=usr/share/doc/SUNWgamin/ChangeLog.bz2
--- a/components/gamin/patches/gamin-01-all.patch Mon Oct 19 15:36:51 2015 -0700
+++ b/components/gamin/patches/gamin-01-all.patch Mon Oct 12 09:25:27 2015 -0700
@@ -65,7 +65,7 @@
dnl pthread support for reentrance of the client library.
AC_ARG_WITH(threads,
[ --with-threads add multithread support(on)])
[email protected]@ -387,6 +430,14 @@ if test x$dbus_have_struct_cmsgcred = xyes; then
[email protected]@ -385,6 +428,14 @@ if test x$dbus_have_struct_cmsgcred = xyes; then
AC_DEFINE(HAVE_CMSGCRED,1,[Have cmsgcred structure])
fi
@@ -80,7 +80,7 @@
#### Abstract sockets
AC_MSG_CHECKING(abstract socket namespace)
[email protected]@ -531,6 +582,16 @@ AC_SUBST(PYTHON_VERSION)
[email protected]@ -529,6 +580,16 @@ AC_SUBST(PYTHON_VERSION)
AC_SUBST(PYTHON_INCLUDES)
AC_SUBST(PYTHON_SITE_PACKAGES)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/gamin/test/results-64.master Mon Oct 12 09:25:27 2015 -0700
@@ -0,0 +1,88 @@
+make[1]: Entering directory `$(@D)'
+Making check in lib
+make[2]: Entering directory `$(@D)/lib'
+make[2]: Nothing to be done for `check'.
+make[2]: Leaving directory `$(@D)/lib'
+Making check in doc
+make[2]: Entering directory `$(@D)/doc'
+make[2]: Nothing to be done for `check'.
+make[2]: Leaving directory `$(@D)/doc'
+Making check in libgamin
+make[2]: Entering directory `$(@D)/libgamin'
+make[2]: Nothing to be done for `check'.
+make[2]: Leaving directory `$(@D)/libgamin'
+Making check in python
+make[2]: Entering directory `$(@D)/python'
+Making check in tests
+make[3]: Entering directory `$(@D)/python/tests'
+/usr/gnu/bin/make check-local
+make[4]: Entering directory `$(@D)/python/tests'
+basic.py
+basic2.py
+basic3.py
+basic4.py
+basic5.py
+basic6.py
+bigfile.py
+noexists.py
+dnotify.py
+dnotify2.py
+dnotify3.py
+dnotify4.py
+dnotify5.py
+dnotify6.py
+dnotify7.py
+dnotify8.py
+dnotify9.py
+dnotify10.py
+dnotify11.py
+dnotify12.py
+dnotify13.py
+dnotify15.py
+flood.py
+flood2.py
+flood3.py
+flood4.py
+level.py
+multiple.py
+multiple2.py
+multiple3.py
+nokernel.py
+readonly.py
+make[4]: Leaving directory `$(@D)/python/tests'
+make[3]: Leaving directory `$(@D)/python/tests'
+make[3]: Entering directory `$(@D)/python'
+make[3]: Nothing to be done for `check-am'.
+make[3]: Leaving directory `$(@D)/python'
+make[2]: Leaving directory `$(@D)/python'
+Making check in lib
+make[2]: Entering directory `$(@D)/lib'
+make[2]: Nothing to be done for `check'.
+make[2]: Leaving directory `$(@D)/lib'
+Making check in server
+make[2]: Entering directory `$(@D)/server'
+/usr/gnu/bin/make check-am
+make[3]: Entering directory `$(@D)/server'
+make[3]: Nothing to be done for `check-am'.
+make[3]: Leaving directory `$(@D)/server'
+make[2]: Leaving directory `$(@D)/server'
+Making check in tests
+make[2]: Entering directory `$(@D)/tests'
+/usr/gnu/bin/make check-local
+make[3]: Entering directory `$(@D)/tests'
+running test 1
+running test 10
+running test 11
+running test 2
+running test 3
+running test 4
+running test 5
+running test 6
+running test 7
+running test 8
+running test 9
+make[3]: Leaving directory `$(@D)/tests'
+make[2]: Leaving directory `$(@D)/tests'
+make[2]: Entering directory `$(@D)'
+make[2]: Leaving directory `$(@D)'
+make[1]: Leaving directory `$(@D)'