libXaw3d port update

The current Xaw3d in ports is an older and unmaintained version from a Slackware repository. I was able to get the official version from X.org which is newer.
Code:
# Created:

PORTNAME=       libXaw3d
PORTVERSION=    1.6.3
CATEGORIES=     x11-toolkits

MAINTAINER=
COMMENT=        X Athena Widgets 3D library

LICENSE=        MIT
LICENSE_FILE=   ${WRKSRC}/COPYING

USES=           gmake xorg xorg-cat:lib
USE_XORG=       x11 xau xext xmu xpm xorgproto xt xau sm ice
CONFIGURE_ARGS= --without-xmlto

post-install:
        @${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libXaw3d.so

.include <bsd.port.mk>
This is all I was able to get so far. It downloads and builds from the Xorg repositories in /usr/ports/Mk/. They have the same contents as https://gitlab.freedesktop.org/xorg/lib/libxaw3d/-/tree/libXaw3d-1.6.3/src. The Makefile gets the zipped file automatically by the PORTNAME, so it doesn't need MASTER_SITES=.

After some basic porting steps, make stage and make stage-qa don't produce errors. make didn't produce errors either. make package or make install produce errors.
Code:
j-x11:/opt/libXaw3d # make package
===>  Building package for libXaw3d-1.6.3
[: =: unexpected operator
pkg-static: Invalid package: object has missing property prefix
pkg-static: the package is not valid
pkg-static: package creation failed
*** Error code 1

Stop.
make: stopped in /opt/libXaw3d
After this, I need to add a CONFLICTS= argument for the other xaw3d in ports. When enough works with this port, hopefully remove the obsolete or unofficial port. Without the post-install part, it causes more errors from make stage-qa and make install. I'm unsure if this installs to the correct location.

x11-toolkits/Xaw3d is the old port, and it uses http://slackware.cs.utah.edu/pub/slackware/slackware64-13.1/source/x/xaw3d/. The port description is out of date too, as maintenance of the official project has passed on to someone else, then it was maintained since 2012 by X.org. That could be fixed, but the port is more outdated than that.
 
Having a very quick look you probably want to pull in add these as local patches either by using make makepatch or pulled patch files from gitlab (I would recommend the latter if multiple patch files patches the same source file(s)).
You can grab patches directly but gitlab instances tends to change metadata which causes the port to fail due to checksum mismatch.


Example:
If multiple upstream patches modifies the same file
https://cgit.freebsd.org/ports/tree/graphics/exiv2/files?id=0317bd0d24c06dd611c764b237462c62c4b92e95 (this makes it's much easier to keep track of patches)
patch-git-02-fullhash etc

I would also advice you to use poudriere to test ports
 
It's in a Bastille jail. make fetch and make makesum worked. The distfile went into /usr/ports/distfiles/xorg/lib/. I made other small required steps between this for it to be able to build.

The port built, but it failed when make install was run, which suggests it has to do with something else needed in one of post- sections. I need to solve this first.

Those patches need to be copied to files/, then I'll make patch based on that? That has to be done manually from copying the files from there, and it's not done in an automatic way?
 
make patch will apply patches that are in files dir. You're looking for make makepatch which will generate "ports friendly" patch files based on your current workdir usually ./work/<portname>-<version>, keep in mind that it tracks using .orig files so make sure you don't overwrite the original one if you apply multiple patches that touches the same file. If you grab the gitlab generated patch files you need to change paths so they apply using patch -p0 .

I would also recommend you do join #bsdports on EFNet which would make this process much easier :)
Keep in mind that people live in different parts of the world etc so you might not get an instant reply but you'll usually get a reply within a reasonable amount of time.
 

Patch is likely to reach the portstree soon. The updated Makefile uses components from the libXaw Makefile. Renamed from Xaw3d to libXaw3d as the filename is in the mirror, and to match the naming convention of libXaw. Version updated from 1.5E to 1.6.3. Patch includes references in dependent ports to the updated libraries.

The source file from the Slackware repository was correct as it mirrored the official repository. It was an older version.
 
Can someone test this patch, and give feedback for it to be applied?

I tested it before. It compiled every time. The applications worked on CTWM, but the borders didn't show up on a from scratch install of JWM and Xorg-minimal. Perhaps a dependency was needed for the border to show up. It was the same case for other Xaw implementations as well. They worked on a full Xorg install. I was unable to finish testing. CTWM or a full Xorg install may have had what was needed for the borders to show up on libXaw3d.

For those who are interested in seeing this applied. Thank you.
 
Back
Top