freebsd-ports/math/wingz3/files/Wingz3.in
Mikhail Teterin 337da496ce Fix this long-neglected port, which kept bit-rotting over years of
sweeping changes to the tree:

	* Use the SUB_FILES mechanism instead of modifying the
	  wrapper ourselves;
	* Support staging
	* Use PREFIX as appropriate instead of LOCALBASE.
	* Clarify the NO_PACKAGE message and stop using quotes with it.

These old binaries require last century's ld-linux.so.1 and libc5
versions of certain libraries. Because no port remains under
emulation/ that provides them, fetch and use the old RedHat's RPMs
for ld.so-1 and libc-5. The needed bits from the former are stuck
into ${LINUXBASE}/compat/lib (despite portlint's encouragements to
the contrary). The latter's pieces are unpacked into the new
subdirectory under the package's own install tree (Wingz3/lib/libc5).

Modify the wrapper script to set LD_LIBRARY_PATH to include the above
directory and to set XLOCALEDIR to the modern location of locale-files
(the old libraries still look for them under /usr/X11R6/lib/X11/locale).

Should another port ever need these old Linux libraries, I'd be happy to
cooperate on placing them into a port of their own.

Bump PORTREVISION.
2014-07-13 19:23:31 +00:00

24 lines
640 B
Bash

#!/bin/sh
# The following combines the effects of ${WINGZ3}/bin/WingzPro
# and the ${WINGZ3}/bin/wzenv (yes, it does set the LD_RUN_PATH,
# while exporting the SHLIB_PATH).
WINGZ3=%%PREFIX%%/Wingz3
WZUSER="IISC"
WZCOMPANY="IISC"
WZPLATFORM=LINUX
LD_RUN_PATH=$WINGZ3/lib/$WZPLATFORM:$LD_RUN_PATH
if [ -z "$LD_LIBRARY_PATH" ]
then
export LD_LIBRARY_PATH=$WINGZ3/lib/libc5
else
LD_LIBRARY_PATH=$WINGZ3/lib/libc5:$LD_LIBRARY_PATH
fi
WZBSDECHO=TRUE
export XLOCALEDIR=/usr/share/X11/locale # Under LINUXBASE
export WINGZ3 WZCOMPANY WZUSER WZPLATFORM SHLIB_PATH WZBSDECHO
# Invoke the binary directly:
exec ${WINGZ3}/bin/LINUX/WingzPro "$@"