Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Aug 2014 20:02:20 +0000 (UTC)
From:      David Naylor <dbn@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r366144 - in head/emulators: i386-wine i386-wine-devel
Message-ID:  <201408252002.s7PK2KwM005672@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dbn
Date: Mon Aug 25 20:02:20 2014
New Revision: 366144
URL: http://svnweb.freebsd.org/changeset/ports/366144
QAT: https://qat.redports.org/buildarchive/r366144/

Log:
  IGNORE emulators/i386-wine(-devel)? on ARCH=i386, fix lib bundling.
  
  Due to the hackery things these ports do to properly work under amd64, it
  results in issues for pkg.  This port - although it needs to build under
  i386 - is not intended to be consumed under i386.  The normal wine(-devel)?
  ports should be consumed on an i386 system and these ports should be
  consumed on an amd64 system. [1]
  
  Reorder the library detection to pick up soft dependencies first, then the
  linked to libraries.  Prior to this change any libraries required by a soft
  dependency wasn't bundled, for example libgnutls.so.28 did not have its
  dependencies bundled. [2][3]
  
  Requested by:	bdrewery [1]
  Reported by:	Joseph Mingrone <jrm@ftfl.ca> [2]
  		Beeblebrox <zaphod@berentweb.com> [3]

Modified:
  head/emulators/i386-wine-devel/Makefile.i386
  head/emulators/i386-wine-devel/Makefile.inc
  head/emulators/i386-wine/Makefile.i386

Modified: head/emulators/i386-wine-devel/Makefile.i386
==============================================================================
--- head/emulators/i386-wine-devel/Makefile.i386	Mon Aug 25 20:01:13 2014	(r366143)
+++ head/emulators/i386-wine-devel/Makefile.i386	Mon Aug 25 20:02:20 2014	(r366144)
@@ -24,6 +24,10 @@ PLIST_REINPLACE_WINELIB=	s!lib/!lib32/!g
 WINE_SLAVE_BUILD=	yes
 USE_LDCONFIG32=	${WINELIBDIR} ${WINELIBDIR}/wine
 
+.if !defined(WINE_CROSS_BUILD)
+IGNORE=		This port is not for consumption on FreeBSD/i386.  To cross-build for FreeBSD/amd64: make -DWINE_CROSS_BUILD
+.endif
+
 # Hook into post-install and do some adapting to make i386 binaries work nicely
 # under FreeBSD/amd64
 post-install-script:
@@ -33,12 +37,25 @@ post-install-script:
 		[ "$${i}" = "wine" ] || ${LN} -f ${STAGEDIR}${PREFIX}/bin/wine ${STAGEDIR}${PREFIX}/bin/$${i} ; \
 		echo bin32/$${i} >> ${TMPPLIST} ; \
 	done
+	# Install libGL
+	${INSTALL_DATA} ${LOCALBASE}/lib/libGL.so.1 ${STAGEDIR}${PREFIX}/lib32/.libGL/	
+	echo lib32/.libGL/libGL.so.1 >> ${TMPPLIST}
 	# Install dri libraries (internal libGL requirements)
 	${MKDIR} ${STAGEDIR}${PREFIX}/lib32/.libGL/dri
 	for i in ${LOCALBASE}/lib/dri/*.so; do \
 		${INSTALL_DATA} $${i} ${STAGEDIR}${PREFIX}/lib32/.libGL/dri/ ; \
 		echo lib32/.libGL/dri/$${i##*/} >> ${TMPPLIST} ; \
 	done
+	# Find all soft dependencies (via strings(1))
+	grep -v '[@%]' ${TMPPLIST} | sed "s!^!${STAGEDIR}${PREFIX}/!g" | \
+	xargs -n1 file -F' ' | grep ELF | cut -f1 -d' ' | xargs strings | \
+	grep '^lib.*\.so' | sort -u > ${WRKDIR}/winesoftlibs
+	for i in `cat ${WRKDIR}/winesoftlibs` ; do \
+		if [ -e ${LOCALBASE}/lib/$${i} ] && [ -z "`grep $${i} ${TMPPLIST}`" ]; then \
+			${INSTALL_DATA} ${LOCALBASE}/lib/$${i} ${STAGEDIR}${PREFIX}/lib32/ ; \
+			echo lib32/$${i} >> ${TMPPLIST} ; \
+		fi ; \
+	done
 	# Find all libraries that are linked too (via ldd(1))
 	grep -v '[@%]' ${TMPPLIST} | sed "s!^!${STAGEDIR}${PREFIX}/!g" | \
 	xargs -n1 file -F' ' | grep ELF | cut -f1 -d' ' | \
@@ -46,22 +63,9 @@ post-install-script:
 	| sort -u | grep -v '^\(/usr\)\?/lib' | grep -v "^${STAGEDIR}${PREFIX}/lib32/libwine.so" \
 	| grep -v "^${STAGEDIR}${PREFIX}/lib32/wine" > ${WRKDIR}/winelibs
 	for i in `cat ${WRKDIR}/winelibs` ; do \
-		if [ `basename $${i}` != libGL.so.1 ]; then \
+		if [ -z "`grep $${i##*/} ${TMPPLIST}`" ]; then \
 			${INSTALL_DATA} $${i} ${STAGEDIR}${PREFIX}/lib32/ ; \
 			echo lib32/$${i##*/} >> ${TMPPLIST} ; \
-		else \
-			${INSTALL_DATA} $${i} ${STAGEDIR}${PREFIX}/lib32/.libGL/ ; \
-			echo lib32/.libGL/libGL.so.1 >> ${TMPPLIST} ; \
-		fi ; \
-	done
-	# Find all soft dependancies (via strings(1))
-	grep -v '[@%]' ${TMPPLIST} | sed "s!^!${STAGEDIR}${PREFIX}/!g" | \
-	xargs -n1 file -F' ' | grep ELF | cut -f1 -d' ' | xargs strings | \
-	grep '^lib.*\.so' | sort -u > ${WRKDIR}/winesoftlibs
-	for i in `cat ${WRKDIR}/winesoftlibs` ; do \
-		if [ -e ${LOCALBASE}/lib/$${i} ] && [ -z "`grep $${i} ${TMPPLIST}`" ] ; then \
-			${INSTALL_DATA} ${LOCALBASE}/lib/$${i} ${STAGEDIR}${PREFIX}/lib32/ ; \
-			echo lib32/$${i} >> ${TMPPLIST} ; \
 		fi ; \
 	done
 	echo '@dirrm lib32/.libGL/dri' >> ${TMPPLIST}

Modified: head/emulators/i386-wine-devel/Makefile.inc
==============================================================================
--- head/emulators/i386-wine-devel/Makefile.inc	Mon Aug 25 20:01:13 2014	(r366143)
+++ head/emulators/i386-wine-devel/Makefile.inc	Mon Aug 25 20:02:20 2014	(r366144)
@@ -32,7 +32,8 @@ EXTRACT_AFTER_ARGS=	-C / --exclude +COMP
 NO_BUILD=	yes
 ONLY_FOR_ARCHS=	i386 amd64
 ONLY_FOR_ARCHS_REASON=	wine only runs on x86 architecture
-PKGINSTALL=	${.CURDIR}/files/pkg-install
+SLAVEDIR?=	${.CURDIR}
+PKGINSTALL=	${SLAVEDIR}/files/pkg-install
 PKGDEINSTALL=	${PKGINSTALL}
 PKGMESSAGE=	${WRKDIR}/pkg-message
 SUB_FILES=	pkg-message
@@ -71,18 +72,18 @@ ${PLIST}: fetch
 	${TAR} -tf ${_DISTDIR}/${EXTRACT_ONLY} ${EXTRACT_AFTER_ARGS} | ${GREP} '/$$' | ${SED} -e 's|/usr/local/\(.*\)/$$|@dirrm \1|g' -e 's|/$$||g' -e 's|@dirrm man|@dirrmtry man|g' | sort -r >> ${PLIST}
 
 port-update:
-	${RM} -f ${.CURDIR}/distinfo ${.CURDIR}/distinfo~ ${.CURDIR}/pkg-plist.*
+	${RM} -f ${SLAVEDIR}/distinfo ${SLAVEDIR}/distinfo~ ${SLAVEDIR}/pkg-plist.*
 .for osrel in 8 9 10 11
 .for suffix in -devel -compholio
 	${MAKE} fetch OSREL=${osrel} PKGNAMESUFFIX=${suffix}
 	${MAKE} makesum OSREL=${osrel} PKGNAMESUFFIX=${suffix}
-	${CAT} ${.CURDIR}/distinfo >> ${.CURDIR}/distinfo~
-	${RM} ${.CURDIR}/distinfo
+	${CAT} ${SLAVEDIR}/distinfo >> ${SLAVEDIR}/distinfo~
+	${RM} ${SLAVEDIR}/distinfo
 	[ "${suffix}" != "-devel" ] || ${MAKE} pkg-plist.${osrel} PLIST=pkg-plist.${osrel} OSREL=${osrel}
 .endfor
 .endfor
-	${MV} ${.CURDIR}/distinfo~ ${.CURDIR}/distinfo
-	python ${FILESDIR}/mergeplist.py ${.CURDIR}/pkg-plist.* > ${PLIST}
-	${RM} ${.CURDIR}/pkg-plist.*
+	${MV} ${SLAVEDIR}/distinfo~ ${SLAVEDIR}/distinfo
+	python ${FILESDIR}/mergeplist.py ${SLAVEDIR}/pkg-plist.* > ${PLIST}
+	${RM} ${SLAVEDIR}/pkg-plist.*
 
 .include <bsd.port.post.mk>

Modified: head/emulators/i386-wine/Makefile.i386
==============================================================================
--- head/emulators/i386-wine/Makefile.i386	Mon Aug 25 20:01:13 2014	(r366143)
+++ head/emulators/i386-wine/Makefile.i386	Mon Aug 25 20:02:20 2014	(r366144)
@@ -23,6 +23,10 @@ PLIST_REINPLACE_WINELIB=	s!lib/!lib32/!g
 WINE_SLAVE_BUILD=	yes
 USE_LDCONFIG32=	${WINELIBDIR} ${WINELIBDIR}/wine
 
+.if !defined(WINE_CROSS_BUILD)
+IGNORE=		This port is not for consumption on FreeBSD/i386.  To cross-build for FreeBSD/amd64: make -DWINE_CROSS_BUILD
+.endif
+
 # Hook into post-install and do some adapting to make i386 binaries work nicely
 # under FreeBSD/amd64
 post-install-script:



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