aboutsummaryrefslogtreecommitdiffstats
path: root/emulators
diff options
context:
space:
mode:
authordbn <dbn@FreeBSD.org>2014-08-26 04:02:20 +0800
committerdbn <dbn@FreeBSD.org>2014-08-26 04:02:20 +0800
commitafb5fafb10e3cc84dec0724afd0fb6d5adaacc67 (patch)
tree8872f6895a4c170031a82e2bad2093b59c88ccb6 /emulators
parentfe432600d3b2939b6514f9fa25da796ab97742cf (diff)
downloadfreebsd-ports-gnome-afb5fafb10e3cc84dec0724afd0fb6d5adaacc67.tar.gz
freebsd-ports-gnome-afb5fafb10e3cc84dec0724afd0fb6d5adaacc67.tar.zst
freebsd-ports-gnome-afb5fafb10e3cc84dec0724afd0fb6d5adaacc67.zip
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]
Diffstat (limited to 'emulators')
-rw-r--r--emulators/i386-wine-devel/Makefile.i38632
-rw-r--r--emulators/i386-wine-devel/Makefile.inc15
-rw-r--r--emulators/i386-wine/Makefile.i3864
3 files changed, 30 insertions, 21 deletions
diff --git a/emulators/i386-wine-devel/Makefile.i386 b/emulators/i386-wine-devel/Makefile.i386
index 619c3ff29936..a53aa4303cc3 100644
--- a/emulators/i386-wine-devel/Makefile.i386
+++ b/emulators/i386-wine-devel/Makefile.i386
@@ -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}
diff --git a/emulators/i386-wine-devel/Makefile.inc b/emulators/i386-wine-devel/Makefile.inc
index c496c55e6661..9bcd6ef951fa 100644
--- a/emulators/i386-wine-devel/Makefile.inc
+++ b/emulators/i386-wine-devel/Makefile.inc
@@ -32,7 +32,8 @@ EXTRACT_AFTER_ARGS= -C / --exclude +COMPACT_MANIFEST --exclude +MANIFEST \
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>
diff --git a/emulators/i386-wine/Makefile.i386 b/emulators/i386-wine/Makefile.i386
index 9ed9af4392fd..b8fc2628fb90 100644
--- a/emulators/i386-wine/Makefile.i386
+++ b/emulators/i386-wine/Makefile.i386
@@ -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: