From 0167b90cd0c783e46bf8f5a2b907bc96b0ff358e Mon Sep 17 00:00:00 2001 From: jsg Date: Fri, 28 Aug 2020 16:07:18 +0000 Subject: [PATCH] explicitly remove *.la files from old Mesa builds While we no longer install .la files for Mesa naddy@ pointed out that using libtool to build something like libGLU could result in .la files which reference old Mesa .la files. Remove Mesa .la files found in DESTDIR on install as suggested by millert@ ok millert@ matthieu@ deraadt@ --- lib/mesa/mk/libEGL/Makefile | 5 ++++- lib/mesa/mk/libGL/Makefile | 5 ++++- lib/mesa/mk/libGLESv1_CM/Makefile | 5 ++++- lib/mesa/mk/libGLESv2/Makefile | 5 ++++- lib/mesa/mk/libOSMesa/Makefile | 5 ++++- lib/mesa/mk/libgbm/Makefile | 5 ++++- lib/mesa/mk/libglapi/Makefile | 5 ++++- lib/mesa/mk/libvulkan_intel/Makefile | 7 +++++-- lib/mesa/mk/libvulkan_radeon/Makefile | 7 +++++-- 9 files changed, 38 insertions(+), 11 deletions(-) diff --git a/lib/mesa/mk/libEGL/Makefile b/lib/mesa/mk/libEGL/Makefile index a72dcbf72..8654f307b 100644 --- a/lib/mesa/mk/libEGL/Makefile +++ b/lib/mesa/mk/libEGL/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.1 2020/08/26 06:02:36 jsg Exp $ +# $OpenBSD: Makefile,v 1.2 2020/08/28 16:07:18 jsg Exp $ .include @@ -59,6 +59,9 @@ LDADD+= -L${.CURDIR}/../libgbm/${__objdir} -lgbm \ obj: _xenocara_obj +beforeinstall: + rm -f ${DESTDIR}${LIBDIR}/lib${LIB}.la + .include .include diff --git a/lib/mesa/mk/libGL/Makefile b/lib/mesa/mk/libGL/Makefile index c5f6deee6..f1cc54b8b 100644 --- a/lib/mesa/mk/libGL/Makefile +++ b/lib/mesa/mk/libGL/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.1 2020/08/26 06:02:36 jsg Exp $ +# $OpenBSD: Makefile,v 1.2 2020/08/28 16:07:18 jsg Exp $ .include @@ -82,6 +82,9 @@ LDADD+= ${.CURDIR}/../libloader_dri3_helper/${__objdir}/libloader_dri3_helper.a obj: _xenocara_obj +beforeinstall: + rm -f ${DESTDIR}${LIBDIR}/lib${LIB}.la + .include .include diff --git a/lib/mesa/mk/libGLESv1_CM/Makefile b/lib/mesa/mk/libGLESv1_CM/Makefile index d85586b22..f9151a34b 100644 --- a/lib/mesa/mk/libGLESv1_CM/Makefile +++ b/lib/mesa/mk/libGLESv1_CM/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.1 2020/08/26 06:02:36 jsg Exp $ +# $OpenBSD: Makefile,v 1.2 2020/08/28 16:07:18 jsg Exp $ LIB= GLESv1_CM @@ -15,6 +15,9 @@ LDADD+= -L${.CURDIR}/../libglapi/${__objdir} -lglapi \ obj: _xenocara_obj +beforeinstall: + rm -f ${DESTDIR}${LIBDIR}/lib${LIB}.la + .include .include diff --git a/lib/mesa/mk/libGLESv2/Makefile b/lib/mesa/mk/libGLESv2/Makefile index 407b5122d..5c010056c 100644 --- a/lib/mesa/mk/libGLESv2/Makefile +++ b/lib/mesa/mk/libGLESv2/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.1 2020/08/26 06:02:36 jsg Exp $ +# $OpenBSD: Makefile,v 1.2 2020/08/28 16:07:19 jsg Exp $ LIB= GLESv2 @@ -15,6 +15,9 @@ LDADD+= -L${.CURDIR}/../libglapi/${__objdir} -lglapi \ obj: _xenocara_obj +beforeinstall: + rm -f ${DESTDIR}${LIBDIR}/lib${LIB}.la + .include .include diff --git a/lib/mesa/mk/libOSMesa/Makefile b/lib/mesa/mk/libOSMesa/Makefile index 971002918..c8580f75e 100644 --- a/lib/mesa/mk/libOSMesa/Makefile +++ b/lib/mesa/mk/libOSMesa/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.1 2020/08/26 06:02:36 jsg Exp $ +# $OpenBSD: Makefile,v 1.2 2020/08/28 16:07:19 jsg Exp $ LIB= OSMesa @@ -20,6 +20,9 @@ CPPFLAGS+= -I${MESA_SRC}/src/mesa \ obj: _xenocara_obj +beforeinstall: + rm -f ${DESTDIR}${LIBDIR}/lib${LIB}.la + .include .include diff --git a/lib/mesa/mk/libgbm/Makefile b/lib/mesa/mk/libgbm/Makefile index 417af8ebb..e14d41fcd 100644 --- a/lib/mesa/mk/libgbm/Makefile +++ b/lib/mesa/mk/libgbm/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.1 2020/08/26 06:02:37 jsg Exp $ +# $OpenBSD: Makefile,v 1.2 2020/08/28 16:07:19 jsg Exp $ .include @@ -29,6 +29,9 @@ LDADD+= -L${X11BASE}/lib -ldrm obj: _xenocara_obj +beforeinstall: + rm -f ${DESTDIR}${LIBDIR}/lib${LIB}.la + .include .include diff --git a/lib/mesa/mk/libglapi/Makefile b/lib/mesa/mk/libglapi/Makefile index 0fa0e1d3f..c7bbf1e6c 100644 --- a/lib/mesa/mk/libglapi/Makefile +++ b/lib/mesa/mk/libglapi/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.1 2020/08/26 06:02:37 jsg Exp $ +# $OpenBSD: Makefile,v 1.2 2020/08/28 16:07:19 jsg Exp $ LIB= glapi @@ -18,6 +18,9 @@ CPPFLAGS+= -DMAPI_MODE_GLAPI \ obj: _xenocara_obj +beforeinstall: + rm -f ${DESTDIR}${LIBDIR}/lib${LIB}.la + .include .include diff --git a/lib/mesa/mk/libvulkan_intel/Makefile b/lib/mesa/mk/libvulkan_intel/Makefile index 96b84881e..842d1a268 100644 --- a/lib/mesa/mk/libvulkan_intel/Makefile +++ b/lib/mesa/mk/libvulkan_intel/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.1 2020/08/26 06:02:41 jsg Exp $ +# $OpenBSD: Makefile,v 1.2 2020/08/28 16:07:19 jsg Exp $ LIB= vulkan_intel @@ -30,7 +30,7 @@ VKARCH=x86_64 VKARCH=${MACHINE_ARCH} .endif -install: +install: beforeinstall ${INSTALL} ${INSTALL_COPY} ${INSTALL_STRIP} \ -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ lib${LIB}.so ${DESTDIR}${X11BASE}/lib @@ -40,6 +40,9 @@ install: obj: _xenocara_obj +beforeinstall: + rm -f ${DESTDIR}${LIBDIR}/lib${LIB}.la + .include .include diff --git a/lib/mesa/mk/libvulkan_radeon/Makefile b/lib/mesa/mk/libvulkan_radeon/Makefile index 63807edae..0b636d135 100644 --- a/lib/mesa/mk/libvulkan_radeon/Makefile +++ b/lib/mesa/mk/libvulkan_radeon/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.1 2020/08/26 06:02:41 jsg Exp $ +# $OpenBSD: Makefile,v 1.2 2020/08/28 16:07:19 jsg Exp $ LIB= vulkan_radeon @@ -88,7 +88,7 @@ VKARCH=x86_64 VKARCH=${MACHINE_ARCH} .endif -install: +install: beforeinstall ${INSTALL} ${INSTALL_COPY} ${INSTALL_STRIP} \ -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ lib${LIB}.so ${DESTDIR}${X11BASE}/lib @@ -98,6 +98,9 @@ install: obj: _xenocara_obj +beforeinstall: + rm -f ${DESTDIR}${LIBDIR}/lib${LIB}.la + .include .include