mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-05 06:27:37 +00:00
43ce40675e
- Reorder variables. - Remove tools for updating pkg-plist: they were broken by precedent commits and based on the python 2 script files/mergeplist.py, but python 2 is now EOL. - Move port-update target from Makefile.amd64 to Makefile and rename it distinfo-update as it does not update pkg-plist anymore. - Remove EXTRACT_SUFX and use properly USES=tar:txz instead. - Remove references to removed wine staging ports in CONFLICTS_INSTALL. Approved by: tcberner (co-mentor) Differential Revision: https://reviews.freebsd.org/D24550
69 lines
3.0 KiB
Makefile
69 lines
3.0 KiB
Makefile
# Created by: David Naylor <dbn@FreeBSD.org>
|
|
# $FreeBSD$
|
|
|
|
# Use the wine port to do most of the heavy lifting
|
|
MASTERDIR= ${.CURDIR}/../wine-devel
|
|
|
|
RUN_DEPENDS= mesa-dri>0:graphics/mesa-dri
|
|
|
|
ACTUAL-PACKAGE-DEPENDS= ${DO_NADA}
|
|
WINELIBDIR= ${PREFIX}/lib32
|
|
CONFIGURE_ARGS+= --bindir=${PREFIX}/bin32 --libdir=${WINELIBDIR}
|
|
PLIST_REINPLACE+= winelib
|
|
PLIST_REINPLACE_WINELIB= s!lib/!lib32/!g
|
|
WINE_SLAVE_BUILD= yes
|
|
USE_LDCONFIG32= ${WINELIBDIR} ${WINELIBDIR}/wine
|
|
BUNDLE_LIBS= yes
|
|
|
|
.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:
|
|
# Fix pkg-plist references
|
|
${REINPLACE_CMD} -e 's!lib/!lib32/!g' ${TMPPLIST}
|
|
# Install bounce script to access the 32-bit executables
|
|
${INSTALL_SCRIPT} ${.CURDIR}/files/binbounce ${STAGEDIR}${PREFIX}/bin/wine
|
|
for i in `${GREP} ^bin ${TMPPLIST} | ${XARGS} -n1 basename` ; do \
|
|
[ "$${i}" = "wine" ] || ${LN} -f ${STAGEDIR}${PREFIX}/bin/wine ${STAGEDIR}${PREFIX}/bin/$${i} ; \
|
|
${ECHO_CMD} bin32/$${i} >> ${TMPPLIST} ; \
|
|
done
|
|
# Install libGL
|
|
${MKDIR} ${STAGEDIR}${PREFIX}/lib32/.libGL/dri
|
|
${INSTALL_DATA} ${LOCALBASE}/lib/libGL.so.1 ${STAGEDIR}${PREFIX}/lib32/.libGL/
|
|
${ECHO_CMD} lib32/.libGL/libGL.so.1 >> ${TMPPLIST}
|
|
# Install dri libraries (internal libGL requirements)
|
|
for i in ${LOCALBASE}/lib/dri/*.so; do \
|
|
${INSTALL_DATA} $${i} ${STAGEDIR}${PREFIX}/lib32/.libGL/dri/ ; \
|
|
${ECHO_CMD} 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_CMD} 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' ' | \
|
|
env LD_LIBRARY_PATH=${STAGEDIR}${PREFIX}/lib32:${LD_LIBRARY_PATH} ${XARGS} ldd -f '%p\n' \
|
|
| ${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 [ -z "`${GREP} $${i##*/} ${TMPPLIST}`" ]; then \
|
|
${INSTALL_DATA} $${i} ${STAGEDIR}${PREFIX}/lib32/ ; \
|
|
${ECHO_CMD} lib32/$${i##*/} >> ${TMPPLIST} ; \
|
|
fi ; \
|
|
done
|
|
# Install nvidia patching script
|
|
${INSTALL_SCRIPT} ${.CURDIR}/files/nvidia.sh ${STAGEDIR}${DATADIR}/patch-nvidia.sh
|
|
${ECHO_CMD} ${DATADIR:S|$(PREFIX)/||}/patch-nvidia.sh >> ${TMPPLIST}
|
|
|
|
.include "${MASTERDIR}/Makefile"
|