Since ports builds everything from ports it should be able to build lib32 versions of packages with the correct flags. However with the wait ports Mk/* files are, there are a lot of hardcoded dependencies to libraries in ${LOCALBASE}/lib.
I wanted to use some i386 applications such as emulators/gens so I started creating lib32- version of the ports.
Here is the current work. I have worked up to mesa-dri. Lib32 Ports. These do not conflict with the existing ports and set some specific locations and environment variables.
LOCATIONS:
For now the Makefiles only install files to ${LOCALBASE}/lib32 and ${LOCALBASE}/libdata32/pkgconfig. Everything else from the ports such as man pages, docs, binaries and include files are removed. As we remove include files the lib32- package depends directly on the regular 64bit version. For examples lib32-libgcrypt depends on libgcrypt of the exact same version. This keeps the lib32 versions in sync and also ensures that header files are provided by the normal package.
ISSUES:
Can't make use of specific USES that set hardcoded dependencies. USES_XORG=x11 hardcodes x11/libX11. So these had to be removed.
Using GNU_CONFIGURE also forces --host, --target and --build to be set.
Another issue is with USES=pkgconfig as this set the PKG_CONFIG enviroment variable to pkgconf.
VARIABLES:
PKGNAMEPREFIX= lib32-
PKG_CONFIG= pkgconf32
PKG_CONFIG_DIR=${LOCALBASE}/lib32
TODO:
I need to add FOR_ARCHES_ONLY=amd64 to all the ports
usr/local/lib32 isn't included by ldconfig by default. Using:
will fix this. I could create this in a PORT but it's figuring out which port should create it.
I wanted to use some i386 applications such as emulators/gens so I started creating lib32- version of the ports.
Here is the current work. I have worked up to mesa-dri. Lib32 Ports. These do not conflict with the existing ports and set some specific locations and environment variables.
LOCATIONS:
For now the Makefiles only install files to ${LOCALBASE}/lib32 and ${LOCALBASE}/libdata32/pkgconfig. Everything else from the ports such as man pages, docs, binaries and include files are removed. As we remove include files the lib32- package depends directly on the regular 64bit version. For examples lib32-libgcrypt depends on libgcrypt of the exact same version. This keeps the lib32 versions in sync and also ensures that header files are provided by the normal package.
ISSUES:
Can't make use of specific USES that set hardcoded dependencies. USES_XORG=x11 hardcodes x11/libX11. So these had to be removed.
Using GNU_CONFIGURE also forces --host, --target and --build to be set.
Another issue is with USES=pkgconfig as this set the PKG_CONFIG enviroment variable to pkgconf.
VARIABLES:
PKGNAMEPREFIX= lib32-
PKG_CONFIG= pkgconf32
PKG_CONFIG_DIR=${LOCALBASE}/lib32
TODO:
I need to add FOR_ARCHES_ONLY=amd64 to all the ports
usr/local/lib32 isn't included by ldconfig by default. Using:
Bash:
echo /usr/loca/lib32 >> /usr/local/libdata/ldconfig/lib32
will fix this. I could create this in a PORT but it's figuring out which port should create it.