Subject: Re: Compiling XMCD
To: Stephen Eastman <seastman@uswest.net>
From: Frederick Bruckman <fb@enteract.com>
List: port-mac68k
Date: 06/25/1999 11:11:10
On Fri, 25 Jun 1999, Stephen Eastman wrote:

> Actually it is Version 2.5- 
> > 
> > I am attempting to compile xmcd 1.5 and am configuring the make.inc
> > file.  One line reads as follows: SOCKETLIB= -lsocket -lnsl
> > and another: CURSESLIB= -lcurses

You never need -lsocket on NetBSD, don't know what -lnsl is...

> > As I don't have sources for these (or I assume they are not included in
> > the comp.tgz package), I am wondering if I need to get these (and
> > where). I tried just leaving these blank and I got a bunch of errors:
> > visual.o: Undefined symbol '_wrefresh' referenced from text segment.

xmcd needs newcurses. The package system installs that as ncurses, to
distinguish it from our curses (old curses). Try building the
audio/xmcd package. It's only at 2.4. For general info on the package
system, see
<http://www.netbsd.org/Documentation/software/packages.html>.

If you still want 2.5, you might have an easier time updating the old
package than starting from scratch. The way I usually do that, is 

1) Tar up the old pkg, and make a copy to work on

	cd /usr/pkgsrc/audio
	tar czvf audio.tar.gz audio
	mv audio my-audio-current
	tar xzvpf audio.tar.gz
	cd my-audio-current

2) Now edit the Makefile. Verify the HOMEPAGE and MASTER_SITES, as
they change frequently. While you're at the master ftp site, note the
current version and change it in the Makefile, too. Now...

	rm files/md5
	make makesum

What should happen is that the current version is automatically
downloaded into /usr/pkgsrc/distfiles, and files/md5 is recreated with
the new file name.

4) Build and install the package.

	make

In this case, it will sidestep and install ncurses first, if you don't
have it already. Chances are some of the patches will be obsolete. In
the case of xmcd-2.4, the only patches are to the Makefile and
Imakefile, so maybe you'll get lucky. If it works, follow the
directions in /usr/pkgsrc/Packages.txt for verifying the PLIST.
Typically, I would expect a few assorted files to be added to
/usr/X11R6/share/lib/X11/xmcd. Then, when you type "make install &&
make deinstall", it will complain that "...directory can't be removed,
not empty". So you add the files in X11/xmcd to pkg/PLIST (ape-ing the
existing format), until you can "make reinstall && make deinstall &&
make reinstall" without complaint.

5) Fine points. a) You could build and install pkgtools/pkglint to
check for common errors. Even if you changed very little, and you've
gotten this far, you might still have left the trailing slash off of
the home page: pkglint would catch that. b) Make sure it actually
works! You might have add new patches. At the very least report to the
developers that you tried to run on NetBSD, describing the bug.

6) Submit the diffs to the old package as a pr...
	
	make clean
	cd ..
	mv xmcd old/xmcd
	mv my-current-xmcd xmcd
	diff -u -r old-xmcd xmcd >patch-xmcd-2.5
	send-pr

I kind of got carried away there... I hope xmcd-2.4 just works for
you. Maybe someone else will find all this useful, or at least
entertaining. :)