Subject: wm-icons: comments and a patch

From: "Paul D. Smith" <[email-masked]>
Date: Mon, 19 Jul 1999 11:32:04 -0400 (EDT)

First, the configure/install method in wm-icons is in dire need of
improvement.  Requiring perl, first of all, seems like huge overkill for
the extremely trivial task of installing some icons!  I would prefer
autoconf.  Sure, autoconf is probably _also_ overkill, but it's overkill
from the maintainer's point of view not the users (who only needs
/bin/sh).  And the reason I recommend it is that you can then use the
GNU conventions for command line options like --prefix, etc. and make
the installation much simpler.

Second, speaking of autoconf, I think the installation directories
should be different.  The icons, docs, and config, for example, should
go into ${prefix}/share since they're not system-specific.

Third, the current makefile uses things that simply aren't portable.
"mkdir -p" is relatively common, but "cp -rpd" is _really_ non-portable.
Even my Solaris system doesn't grok cp -d.  I enclose a patch below that
changes this to use tar.  It doesn't change mkdir -p, but that too
should be changed.  I didn't do it 'cause I'm hoping you'll rewrite all
of this 100% :).  If you switch to autoconf/automake, then you get
things like mkinstalldirs for free.

Fourth, does anyone have replacements for the window-{iconify,maximize,
lower,raise,move}.xpm icons in the "general" window set (the 14x14 and
16x16 ones)?  I think those neon colors are horrid and extremely
unprofessional looking, and they don't coordinate with any of the other
icons in the set.  It seems to me that the "general" sets should be (a)
simple but decent-looking and (b) not color-intensive so they can be
used on 8-bit systems.

--- configure-dist	Tue Jun  1 07:27:17 1999
+++ configure	Fri Jul 16 15:30:31 1999
@@ -80,20 +80,19 @@
 my $uninstallStr = "";
 
 if ($INST_ICONS_DIR !~ /^!/) {
-	$installStr   .= "\t# icons\n";
-	$uninstallStr .= "\t# icons\n";
+	$installStr   .= "  # icons\n";
+	$uninstallStr .= "  # icons\n";
 	$installStr   .= "\tmkdir -p $INST_ICONS_DIR\n";
 
 	foreach $iconSet (@INST_ICON_SETS) {
-		my $srcDir = "$SRC_ICONS_DIR/$iconSet";
 		my $dstDir = "$INST_ICONS_DIR/$iconSet";
-		$installStr   .= "\trm -rf '$dstDir'\n";
-		$installStr   .= "\tcp -rpd '$srcDir' '$dstDir'\n";
+		$installStr   .= "\trm -rf '$dstDir'; \\\n";
+		$installStr   .= "\t  (cd '$SRC_ICONS_DIR' && tar cf - '$iconSet') | (cd '$INST_ICONS_DIR' && tar xfBp -)\n";
 		$uninstallStr .= "\trm -rf '$dstDir'\n";
 	}
 } else {
-	$installStr   .= "\t# icons not installed\n";
-	$uninstallStr .= "\t# icons not installed\n";
+	$installStr   .= "  # icons not installed\n";
+	$uninstallStr .= "  # icons not installed\n";
 }
 
 if ($INST_EXEC_DIR !~ /^!/) {
@@ -109,8 +108,8 @@
 		system("chmod a+x '$exec'");
 	}
 
-	$installStr   .= "\t# executables\n";
-	$uninstallStr .= "\t# executables\n";
+	$installStr   .= "  # executables\n";
+	$uninstallStr .= "  # executables\n";
 	$installStr   .= "\tmkdir -p $INST_EXEC_DIR\n";
 
 	foreach $file (glob("$SRC_EXEC_DIR/*")) {
@@ -123,13 +122,13 @@
 	}
 	$installStr .= "\t'$INST_EXEC_DIR/wm-icons-set-links' -g -d\n"
 } else {
-	$installStr   .= "\t# executables not installed\n";
-	$uninstallStr .= "\t# executables not installed\n";
+	$installStr   .= "  # executables not installed\n";
+	$uninstallStr .= "  # executables not installed\n";
 }
 
 if ($INST_CONF_DIR !~ /^!/) {
-	$installStr   .= "\t# configurations\n";
-	$uninstallStr .= "\t# configurations\n";
+	$installStr   .= "  # configurations\n";
+	$uninstallStr .= "  # configurations\n";
 	$installStr   .= "\tmkdir -p $INST_CONF_DIR\n";
 
 	foreach $file (glob("$SRC_CONF_DIR/*")) {
@@ -140,13 +139,13 @@
 		$uninstallStr .= "\trm -f '$dstFile'\n";
 	}
 } else {
-	$installStr   .= "\t# configurations not installed\n";
-	$uninstallStr .= "\t# configurations not installed\n";
+	$installStr   .= "  # configurations not installed\n";
+	$uninstallStr .= "  # configurations not installed\n";
 }
 
 if ($INST_DOC_DIR !~ /^!/) {
-	$installStr   .= "\t# documentation\n";
-	$uninstallStr .= "\t# documentation\n";
+	$installStr   .= "  # documentation\n";
+	$uninstallStr .= "  # documentation\n";
 	$installStr   .= "\tmkdir -p $INST_DOC_DIR\n";
 
 	foreach $file (glob("$SRC_DOC_DIR/*")) {
@@ -157,8 +156,8 @@
 		$uninstallStr .= "\trm -f '$dstFile'\n";
 	}
 } else {
-	$installStr   .= "\t# documentation not installed\n";
-	$uninstallStr .= "\t# documentation not installed\n";
+	$installStr   .= "  # documentation not installed\n";
+	$uninstallStr .= "  # documentation not installed\n";
 }
 
 ###

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[email-masked]>         Network Management Development
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
   These are my opinions---Nortel Networks takes no responsibility for them.
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Mikhael Goikhman <[email-masked]>
Date: Fri, 23 Jul 1999 18:28:06 +0300 (IDT)

On Mon, 19 Jul 1999, Paul D. Smith wrote:

> the extremely trivial task of installing some icons!

Hmm, 840 icons are some?.. :-) Sometimes I am afraid of this number.
If the only thing that the user wants is to install some icons, he can
simply copy them using cp or mv. If the user has no perl, he can't run
wm-icons scripts wm-icons-config and wm-icons-set-links, which are an
esential part of the package, he also probably would not need supplied
configurations which use these scripts. So I don't see why mv is
harder to type than ./confugure --prefix ... && make install. :-)

Also, I think, these days perl is not less standard than awk or sed.

> I would prefer autoconf.

I would too, but until someone volunteers to convert the existing
configure to use autoconf, I stay with perl. I was planning on
implementing --prefix etc., just did not have time.

> go into ${prefix}/share since they're not system-specific.

I have planed that rpm-s/deb-s would install them to $prefix/share, and
the default make install - to $prefix/local. I am not sure here.

> changes this to use tar.

Yes, cp on Solaris is just useless. Ok, Solaris is useless too... :)
Your patch doesn't work (I think, missing "&&" before "\\\" or similar).
Ok, changed "cp -rpd" to "tar", but not "\t#" to "  #". I think TABs are
more appropriated for makefiles and I just like to see comments about what
is installed.

> icons in the set.

I will replace these "neon" colors with something more general
(black/navy/red?) if noone complains.

> It seems to me that the "general" sets should be (a) simple but decent-
> looking and (b) not color-intensive so they can be used on 8-bit systems.

The same with me. Now, where do we get such an icon set? :)

Regards,
Mikhael.

---

From: [email-masked] (Paul D. Smith)
Date: 23 Jul 1999 13:01:20 -0400

%% Mikhael Goikhman <[email-masked]> writes:

  mg> Also, I think, these days perl is not less standard than awk or sed.

Certainly it is less standard.  Solaris doesn't have it.  AIX doesn't
have it.  HP-UX doesn't have it.

Etc. etc.

  >> I would prefer autoconf.

  mg> I would too, but until someone volunteers to convert the existing
  mg> configure to use autoconf, I stay with perl. I was planning on
  mg> implementing --prefix etc., just did not have time.

We'll see :)

  >> Third, the current makefile uses things that simply aren't
  >> portable.  "mkdir -p" is relatively common, but "cp -rpd" is
  >> _really_ non-portable.  Even my Solaris system doesn't grok cp
  >> -d. I enclose a patch below that changes this to use tar.

  mg> Yes, cp on Solaris is just useless. Ok, Solaris is useless
  mg> too... :) Your patch doesn't work (I think, missing "&&" before
  mg> "\\\" or similar).

It worked for me, as-is.  What exactly was the problem?

  mg> Ok, changed "cp -rpd" to "tar", but not "\t#" to " #". I think
  mg> TABs are more appropriated for makefiles and I just like to see
  mg> comments about what is installed.

Oh, you wanted them to print out during the run?  OK, then, you
definitely need the TAB.  I changed them from shell script lines
prefixed by a TAB that happened to be shell comments (but a shell is
still invoked for them) to make comments, which are stripped during the
processing of the makefile.

I usually use something like "@echo this or that" myself, but whatever :)

---

From: Mikhael Goikhman <[email-masked]>
Date: Sat, 24 Jul 1999 08:39:03 +0300 (IDT)

> have it. HP-UX doesn't have it.

By default, I think.  perl is not so hard to install, in user home even.
Solaris does not have gcc or even its own cc by default, you must buy it
separately, so what. Even windos has 98% compatible perl for free.

At least perl is usually more standardized than sed and awk, try to do
regular expressions with different versions of sed.

> mg> Your patch doesn't work (I think, missing "&&" before
> mg> "\\\" or similar).
> 

It produces:

rm ... \
  (cp ...

Either a backslash must be removed or "&&" before it added. Forget it.
And thanks for comments and a patch.

Regards,
Mikhael.