[csw-devel] SF.net SVN: gar:[7893] csw/mgar/pkg/watch/trunk

skayser at users.sourceforge.net skayser at users.sourceforge.net
Wed Jan 6 21:30:08 CET 2010


Revision: 7893
          http://gar.svn.sourceforge.net/gar/?rev=7893&view=rev
Author:   skayser
Date:     2010-01-06 20:30:08 +0000 (Wed, 06 Jan 2010)

Log Message:
-----------
watch: document character handling flaws/versioning, move back to ncurses

Modified Paths:
--------------
    csw/mgar/pkg/watch/trunk/Makefile
    csw/mgar/pkg/watch/trunk/files/changelog.CSW

Modified: csw/mgar/pkg/watch/trunk/Makefile
===================================================================
--- csw/mgar/pkg/watch/trunk/Makefile	2010-01-06 17:14:06 UTC (rev 7892)
+++ csw/mgar/pkg/watch/trunk/Makefile	2010-01-06 20:30:08 UTC (rev 7893)
@@ -1,8 +1,13 @@
-# TODO
-# - Although watch links against ncursesw, non-ASCII character handling
-#   is broken. German umlauts for example won't display at all. Try: 
-#   python -c 'print u"\u00E4"' vs. watch -d python -c 'print u"\u00E4"'
-#   Needs further investigation.
+# Known issues
+# - watch only handles characters on a byte-by-byte basis, as such it
+#   doesn't cope with wide characters like the ones encoded via UTF-8.
+#   LATIN SMALL LETTER A WITH DIAERESIS (U+00E4) encoded in UTF-8
+#   for example is simply skipped in the output. For the current 
+#   implementation of watch it depends on the result of isprint() 
+#   whether a one byte component of a character is printed.
+
+# watch doesn't follow the procps versioning. It has a hardcoded
+# version in watch.c which is emitted when calling watch -v
 GARNAME = watch
 GARVERSION = 0.2.0
 CATEGORIES = utils
@@ -14,11 +19,12 @@
 
 # Usually we would use $(SF_MIRROR), but the procps folks didn't upload
 # procps the usual way
-SF_PROJ 	= procps
-SF_PROJ_VER	= 3.2.8
-MASTER_SITES 	= http://$(SF_PROJ).sourceforge.net/
-DISTFILES  	= $(SF_PROJ)-$(SF_PROJ_VER).tar.gz
-DISTNAME   	= $(SF_PROJ)-$(SF_PROJ_VER)
+SF_PROJ        = procps
+SF_PROJ_VER    = 3.2.8
+MASTER_SITES   = http://$(SF_PROJ).sourceforge.net/
+DISTFILES      = $(SF_PROJ)-$(SF_PROJ_VER).tar.gz
+DISTNAME       = $(SF_PROJ)-$(SF_PROJ_VER)
+UFILES_REGEX   = $(SF_PROJ)-(\d+(?:\.\d+)*).tar.gz
 
 REQUIRED_PKGS = CSWncurses
 
@@ -35,7 +41,7 @@
 
 CONFIGURE_ARGS = $(DIRPATHS)
 
-EXTRA_INC = /opt/csw/include/ncursesw
+EXTRA_INC = /opt/csw/include/ncurses
 
 include gar/category.mk
 
@@ -62,17 +68,15 @@
 CFLAGS := $(CFLAGS) -DHAVE_INTTYPES_H -DHAVE_LOCALE_H -DHAVE_LOCALECONV
 CFLAGS := $(CFLAGS) -DHAVE_LOCALECONV -DHAVE_UINTMAX_T -DHAVE_VA_COPY
 
-# CURSES and BUILD_ARGS w/ ALL_?FLAGS req. for $(WORKSRC)/Makefile
-build-custom: CURSES=-lncursesw
+# BUILD_ARGS with ALL_?FLAGS req. for $(WORKSRC)/Makefile
 build-custom: BUILD_ARGS:=ALL_CFLAGS="$(CFLAGS)" ALL_LDFLAGS="$(LDFLAGS)"
 build-custom:
 	$(BUILD_ENV) gmake -C $(WORKSRC) $(BUILD_ARGS) snprintf.o
 	$(BUILD_ENV) gmake -C $(WORKSRC) $(BUILD_ARGS) getopt.o
 	$(BUILD_ENV) gmake -C $(WORKSRC) $(BUILD_ARGS) getopt1.o
 	$(BUILD_ENV) gmake -C $(WORKSRC) \
-		ALL_CFLAGS="$(CFLAGS) snprintf.o getopt.o getopt1.o" \
-	        ALL_LDFLAGS="$(LDFLAGS)" \
-		CURSES=$(CURSES) watch
+		ALL_CFLAGS="$(CPPFLAGS) $(CFLAGS) snprintf.o getopt.o getopt1.o" \
+	        ALL_LDFLAGS="$(LDFLAGS)" watch
 	@$(MAKECOOKIE)
 
 install-custom: DOCDEST=$(DESTDIR)$(docdir)/$(GARNAME)
@@ -83,4 +87,7 @@
 	ginstall -m 755 $(WORKSRC)/watch $(DESTDIR)$(bindir)
 	cp $(WORKSRC)/watch.1 $(DESTDIR)$(mandir)/man1
 	cp $(FILEDIR)/changelog.CSW $(DOCDEST)
+	printf "This watch version (%s) was taken from procps %s, %s\n" \
+		$(GARVERSION) $(SF_PROJ_VER) $(subst sourceforge,sf,$(MASTER_SITES)) \
+		>> $(DOCDEST)/README.CSW
 	@$(MAKECOOKIE)

Modified: csw/mgar/pkg/watch/trunk/files/changelog.CSW
===================================================================
--- csw/mgar/pkg/watch/trunk/files/changelog.CSW	2010-01-06 17:14:06 UTC (rev 7892)
+++ csw/mgar/pkg/watch/trunk/files/changelog.CSW	2010-01-06 20:30:08 UTC (rev 7893)
@@ -1,3 +1,10 @@
+watch (0.2.0,REV=2010.01.06)
+
+  * Updated upstream version. Fixes 8-bit character handling when using
+    the -d option. (Closes: #3952).
+
+ -- Sebastian Kayser <skayser at opencsw.org>  Wed,  6 Jan 2010 19:28:33 +0100
+
 watch (0.2.0,REV=2009.05.10)
 
   * Recompiled with adjusted GAR build system (Closes: #3603).


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list