Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Jul 2014 19:23:31 +0000 (UTC)
From:      Mikhail Teterin <mi@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r361704 - in head/math/wingz3: . files
Message-ID:  <201407131923.s6DJNV6P051097@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mi
Date: Sun Jul 13 19:23:31 2014
New Revision: 361704
URL: http://svnweb.freebsd.org/changeset/ports/361704
QAT: https://qat.redports.org/buildarchive/r361704/

Log:
  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.

Added:
  head/math/wingz3/files/Wingz3.in
     - copied, changed from r361703, head/math/wingz3/files/Wingz3
Deleted:
  head/math/wingz3/files/Wingz3
Modified:
  head/math/wingz3/Makefile
  head/math/wingz3/distinfo
  head/math/wingz3/pkg-plist

Modified: head/math/wingz3/Makefile
==============================================================================
--- head/math/wingz3/Makefile	Sun Jul 13 19:12:05 2014	(r361703)
+++ head/math/wingz3/Makefile	Sun Jul 13 19:23:31 2014	(r361704)
@@ -3,31 +3,47 @@
 
 PORTNAME=	wingzpro
 PORTVERSION=	311
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	math linux
-MASTER_SITES=	${MASTER_SITE_SUNSITE}
-MASTER_SITE_SUBDIR=apps/financial/spreadsheet
+MASTER_SITES=	${MASTER_SITE_SUNSITE}:wingz	\
+		${MASTER_SITE_FEDORA_LINUX:M*rpmfind.net/*:S|/fedora/core||}:l
+MASTER_SITE_SUBDIR=apps/financial/spreadsheet:wingz	\
+		redhat-archive/6.2/en/os/i386/RedHat/RPMS/:l
+DISTFILES=	${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX}:wingz \
+		ld.so-1.9.5-13.i386.rpm:l	\
+		libc-5.3.12-31.i386.rpm:l
 EXTRACT_ONLY=
 
 MAINTAINER=	mi@aldan.algebra.com
 COMMENT=	Commercial Spreadsheet
 
-NO_PACKAGE=	"nothing to build. commercial software"
+NO_PACKAGE=	Commercial software with nothing to build - install from port
 
 ONLY_FOR_ARCHS=	i386 amd64
 USE_LINUX=	yes
 USE_LINUX_APPS=	xorglibs
+SUB_FILES=	Wingz3
+PLIST_SUB+=	LINUXBASE=${LINUXBASE}
+OLDLIBS=	libm.so.5 libg++.so.27 libstdc++.so.27 libc.so.5 \
+		libXpm.so.4 libXmu.so.6 libXext.so.6 libXt.so.6 \
+		libX11.so.6 libICE.so.6 libSM.so.6
 
 NO_BUILD=	yes
 
-# XXX: this is missing "${BRANDELF} -t Linux <executables>"
-
-NO_STAGE=	yes
 do-install:
-	${TAR} -xzp -C ${LOCALBASE} -f ${DISTDIR}/${DISTFILES}
-	${SED} 's%_LOCALBASE_%${LOCALBASE}%' \
-		< ${FILESDIR}/Wingz3 \
-		> ${LOCALBASE}/bin/Wingz3
-	${CHMOD} 755 ${LOCALBASE}/bin/Wingz3
+	${TAR} -xzp -C ${STAGEDIR}${PREFIX}	\
+		-f ${DISTDIR}/${_DISTFILES:Mwing*}
+	${MKDIR} ${STAGEDIR}${LINUXBASE} ${STAGEDIR}${PREFIX}/Wingz3/lib/libc5
+	${TAR} -xp -C ${STAGEDIR}${LINUXBASE}	\
+		-f ${DISTDIR}/${_DISTFILES:Mld.so-*} lib/
+	${TAR} -xp -C ${STAGEDIR}${PREFIX}/Wingz3/lib/libc5	\
+		--strip-components 3 \
+		--exclude libXext.so.6.1	\
+		-f ${DISTDIR}/${_DISTFILES:Mlibc-*}	\
+		${OLDLIBS:S|^|usr/i486-linux-libc5/lib/|:S|$|*|}
+.for l in ${OLDLIBS}
+	cd ${STAGEDIR}${PREFIX}/Wingz3/lib/libc5 && ${LN} -s $l.* $l
+.endfor
+	${INSTALL_SCRIPT} ${WRKDIR}/Wingz3 ${STAGEDIR}${PREFIX}/bin/Wingz3
 
 .include <bsd.port.mk>

Modified: head/math/wingz3/distinfo
==============================================================================
--- head/math/wingz3/distinfo	Sun Jul 13 19:12:05 2014	(r361703)
+++ head/math/wingz3/distinfo	Sun Jul 13 19:23:31 2014	(r361704)
@@ -1,2 +1,6 @@
 SHA256 (wingzpro-311.tar.gz) = b0a0d622e58aa066b9cb602f03155fcf6c538c56adc9037bcf69079e5158ab83
 SIZE (wingzpro-311.tar.gz) = 6011889
+SHA256 (ld.so-1.9.5-13.i386.rpm) = e2095cf5c5aa7ae0b2121282177381f0edb18c01239e28c6669a455787842a07
+SIZE (ld.so-1.9.5-13.i386.rpm) = 72567
+SHA256 (libc-5.3.12-31.i386.rpm) = 5f5c322f0e716c78b22f0b901ee08c84747f5a94622adf032a021e074dd74b4b
+SIZE (libc-5.3.12-31.i386.rpm) = 2028683

Copied and modified: head/math/wingz3/files/Wingz3.in (from r361703, head/math/wingz3/files/Wingz3)
==============================================================================
--- head/math/wingz3/files/Wingz3	Sun Jul 13 19:12:05 2014	(r361703, copy source)
+++ head/math/wingz3/files/Wingz3.in	Sun Jul 13 19:23:31 2014	(r361704)
@@ -3,13 +3,21 @@
 # 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=_X11BASE_/Wingz3
+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:

Modified: head/math/wingz3/pkg-plist
==============================================================================
--- head/math/wingz3/pkg-plist	Sun Jul 13 19:12:05 2014	(r361703)
+++ head/math/wingz3/pkg-plist	Sun Jul 13 19:23:31 2014	(r361704)
@@ -12,6 +12,28 @@ Wingz3/pkginfo/LINUX/AP.list
 Wingz3/license/LINUX/lmutil
 Wingz3/license/LINUX/lmgrd
 Wingz3/license/LINUX/iisclmd
+Wingz3/lib/libc5/libstdc++.so.27.1.4
+Wingz3/lib/libc5/libstdc++.so.27
+Wingz3/lib/libc5/libm.so.5.0.6
+Wingz3/lib/libc5/libm.so.5
+Wingz3/lib/libc5/libg++.so.27.1.4
+Wingz3/lib/libc5/libg++.so.27
+Wingz3/lib/libc5/libc.so.5.3.12
+Wingz3/lib/libc5/libc.so.5
+Wingz3/lib/libc5/libXt.so.6.0
+Wingz3/lib/libc5/libXt.so.6
+Wingz3/lib/libc5/libXpm.so.4.9
+Wingz3/lib/libc5/libXpm.so.4
+Wingz3/lib/libc5/libXmu.so.6.0
+Wingz3/lib/libc5/libXmu.so.6
+Wingz3/lib/libc5/libXext.so.6.3
+Wingz3/lib/libc5/libXext.so.6
+Wingz3/lib/libc5/libX11.so.6.1
+Wingz3/lib/libc5/libX11.so.6
+Wingz3/lib/libc5/libSM.so.6.0
+Wingz3/lib/libc5/libSM.so.6
+Wingz3/lib/libc5/libICE.so.6.3
+Wingz3/lib/libc5/libICE.so.6
 Wingz3/lib/fonts/3034a___.pfb
 Wingz3/lib/fonts/3034a___.afm
 Wingz3/lib/fonts/3033a___.pfb
@@ -284,6 +306,7 @@ Wingz3/Boundins/array/LINUX/array
 @dirrm Wingz3/lib/fonts
 @dirrm Wingz3/lib/LINUX
 @dirrm Wingz3/lib/.hpfonts
+@dirrm Wingz3/lib/libc5
 @dirrm Wingz3/lib
 @dirrm Wingz3/incl
 @dirrm Wingz3/etc
@@ -318,3 +341,9 @@ Wingz3/Boundins/array/LINUX/array
 @dirrm Wingz3/Boundins/array
 @dirrm Wingz3/Boundins
 @dirrm Wingz3
+@cwd %%LINUXBASE%%
+lib/ld-linux.so.1
+lib/ld-linux.so.1.9.5
+lib/ld.so
+lib/ld.so.1.9.5
+lib/libdl.so.1.9.5



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201407131923.s6DJNV6P051097>