I actually like the program xcal, but not only is it not in FreeBSD ports, the only place I can find a copy of the source is in Debian's source pools.

And the source won't build because clang doesn't translate ancient imake rules/macros right: X11.rules exists, but it's trying to include ' X11 .rules' (spurious spaces).

I got past this error, at least.
$ su -
# pkg install gcc46
# exit
$ export IMAKECPP=/usr/local/bin/cpp46
$ xmkmf

I don't know if I need a version of gcc so old, but I'm wearing out.

I don't. Using cpp6 installed by the gcc package works.

Follow

Oh, duh. The Debian package page has a diff file downloaded separately, and some of them are patches to the C files fixing the compiler error I'm getting. Guess I should read it, edit the source, and re-diff them.

The latest date in xcal's CHANGES file is 1995-09-13.

xcalpr.c:89:21: error: initializer element is not constant
static FILE *fout = stdout;

Everything I'm reading says that hasn't been valid C since before ANSI standardization way back in the '80s.

The patch file is a unified diff that contains at least one unified diff nested within.

I sure hope patch processes files in lines from first to last, because that's how I'm making and skipping the hand-editing. :/

After hand-patching and creating a new diff comes getting it to compile in clang.

Because absolutely NOTHING I do to the Imakefile is creating Makefiles with "CC = gcc" in them. No matter what, they're all "CC = cc", which is clang's C compiler.

Wow, it's been ages since I used diff and patch. Anyway, I'm making progress.

And finding that GCC is apparently happy with non-void C functions using `return;` without a value, while clang (rightly, IMO) throws an error.

So I installed it into a staging directory and ran it, and it ran exactly as expected. But attempting to install it into the staging directory revealed another Makefile showstopper: an extra space between $(DESTDIR) and $(XAPPLOADDIR) in the install:: XCal.help make target. So close yet so far.

(Also, no, because I set DESTDIR to my staging directory name, I didn't run `make install` as root.)

It built, it installed, and it works exactly on my new FreeBSD 11.1-RELEASE PC like it did on my old Debian Jessie PC!

Have the fruits of my labor: files.thornton2.com/packages/u

Inside is the unpatched xcal 4.1 source tarball from Debian Sid (as of last week), my patch file, and my notes for applying the patch.

(Packages screenies & desc: screenshots.debian.net/package )

I don't expect it matters to too many other people, but I'm excited and happy. Anyway, a screenie (croppped) of xcal running and partly customized on my PC: computerfairi.es/media/W40bNZd

(My window manager is x11-wm/wmx.)

Oops. xcal's today pane is the upper-left square. The other two squares are xclock and xload.

Sign in to participate in the conversation
Computer Fairies

Computer Fairies is a Mastodon instance that aims to be as queer, friendly and furry as possible. We welcome all kinds of computer fairies!