Hi,
In reference to the message of Andrew S. Halper on Fri, 7 Sep 2001, I was
able to build dia-0.88.1 on a RedHat 7.1 system.
The information he provided to diagnose the problem helped me to propose a
workaround. The solution I provide here allows to create an RPM in RH 7.1
system with the additional gnome-doc-tools-2-1 from
http://people/redhat.com/dcm/software.html
I modified two files: dia.spec and doc/en/Makefile.am. The tar.gz file
that contain the fixes along with my i386 (S)RPMs are available
temporarily at http://ailabpc01.cacs.louisiana.edu/dia/
If you want to patch your own sources, here's how I proceeded:
First patch involves fixing the wrong version number in dia.spec that's
used by RPM:
[root@ailabpc01 /root]# diff dia-0.88.1/dia.spec dia-0.88.1-new/dia.spec
2c2
< %define ver 0.88
---
> %define ver 0.88.1
Second patch to doc/en/Makefile.am consists of two fixes:
- First it "steals the trick" (as put by Greg quoted in the reference
message) from the sgmldocs.make file in the gnome-core HEAD (from
http://cvs.gnome.org/bonsai/cvsblame.cgi?file=gnome-core/sgmldocs.make&rev=&root=/cvs/gnome).
The trick is to use the -c option of jw (therefore db2html) to point to
the correct catalog (/etc/sgml/catalog). WARNING: I don't know if this
breaks down compatibility with other platforms.
- Second was little confusing, apparently my system does a number of
things unexpected by the makefile. That is, db2html doesn't
create any css files, and moreover it moves the existing dia-manual/
subdir in doc/en/ to become dia-manual.junk/. This confuses the makefile
because it has a directory called stylesheet-images/ under the
distributed dia-manual/ directory. Fixes:
- I test for existence of *.css files and then execute two different
versions of the install command.
- I've added a '*' at the end of dia-manual/ so that it will find the
stylesheet-images/ even if it's under original or the *.junk/
directory.
These fixes shouldn't cause any problems with other platforms since they
are compatible with the existing code (emphasize on *shouldn't*).
Once you modify the doc/en/Makefile.am, you need to go to the root and do
'automake'. Otherwise the existing doc/en/Makefile.in will be intact. I
don't know why RPM doesn't automatically do this everytime. You guys
should have a valid reason, I suppose.
The diff follows:
[root@ailabpc01 /root]# diff dia-0.88.1/doc/en/Makefile.am
dia-0.88.1-new/doc/en/Makefile.am
37c37
< cd $(srcdir) && $(DB2HTML) dia-manual.sgml && touch stamp-doc
---
> cd $(srcdir) && $(DB2HTML) -c /etc/sgml/catalog dia-manual.sgml &&
touch stamp-doc
46,47c46,51
< -cp $(srcdir)/dia-manual/*.html $(srcdir)/dia-manual/*.css
$(distdir)/dia-manual
< mkdir $(distdir)/dia-manual/stylesheet-images
---
> if test -f $(srcdir)/dia-manual/*.css; then \
> -cp $(srcdir)/dia-manual/*.{html,css} $(distdir)/dia-manual \
> else \
> -cp $(srcdir)/dia-manual/*.html $(distdir)/dia-manual \
> fi
> mkdir $(distdir)/dia-manual*/stylesheet-images
52,54c56,64
< for file in $(srcdir)/dia-manual/*.html
$(srcdir)/dia-manual/*.css; do\
< $(INSTALL_DATA) $$file $(DESTDIR)$(helpdir)/`basename $$file`; \
< done
---
> if test -f $(srcdir)/dia-manual/*.css; then \
> for file in $(srcdir)/dia-manual/*.{html,css}; do\
> $(INSTALL_DATA) $$file $(DESTDIR)$(helpdir)/`basename
$$file`; \
> done \
> else \
> for file in $(srcdir)/dia-manual/*.html; do\
> $(INSTALL_DATA) $$file $(DESTDIR)$(helpdir)/`basename
$$file`; \
> done \
> fi
56c66
< for file in $(srcdir)/dia-manual/stylesheet-images/*.gif; do \
---
> for file in $(srcdir)/dia-manual*/stylesheet-images/*.gif; do \
DISCLAIMER: This is the first time I play with automake syntax or change
RPM specs. I hope I didn't mess anything up..
Cheers,
Cengiz Gunay
--
cengiz@ull.edu
Home: (337)482-7570 Office: (337)482-5079
http://www.cacs.usl.edu/~cxg9789
ICQ# 21104923
--