On Sat, Oct 08, 2016 at 04:16:47PM +0200, Matthieu Herrb wrote:
>
> I would prefer to swith them to use the bsd.xorg.mk support for
> pkg-config files like that:
Yeah, that's much nicer. OK. See two comments below.
>
> Index: lib/libGLw/Makefile
> ===================================================================
> RCS file: /cvs/OpenBSD/xenocara/lib/libGLw/Makefile,v
> retrieving revision 1.15
> diff -u -r1.15 Makefile
> --- lib/libGLw/Makefile 17 Aug 2012 15:16:44 -0000 1.15
> +++ lib/libGLw/Makefile 8 Oct 2016 14:15:07 -0000
> @@ -35,15 +35,12 @@
>
> beforeinstall: includes
>
> -afterinstall: glw.pc
> - $(INSTALL) -c -m 644 -o root -g wheel glw.pc \
> - ${DESTDIR}${LIBDIR}/pkgconfig
> -
> -glw.pc: glw.pc.in
> - sed -e 's,@INSTALL_DIR@,$(X11BASE),' \
> - -e 's,@LIB_DIR@,lib,' \
> - -e 's,@VERSION@,$(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY),' \
> - < ${.CURDIR}/glw.pc.in > glw.pc
> +PKGCONFIG= glw.pc
> +PACKAGE_VERSION=
> +EXTRA_PKGCONFIG_SUBST= \
> + -e 's,@INSTALL_DIR@,$(X11BASE),' \
> + -e 's,@LIB_DIR@,lib,' \
> + -e 's,@VERSION@,$(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY),' \
I think it would be cleaner to do
PACKAGE_VERSION= $(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY)
and use ${PACKAGE_VERSION} for the substitution here. We have to define
PACKAGE_VERSION anyway, so we might as well use it.
>
> NOPROFILE=
>
> Index: lib/libepoxy/Makefile
> ===================================================================
> RCS file: /cvs/OpenBSD/xenocara/lib/libepoxy/Makefile,v
> retrieving revision 1.4
> diff -u -r1.4 Makefile
> --- lib/libepoxy/Makefile 1 Sep 2016 10:37:40 -0000 1.4
> +++ lib/libepoxy/Makefile 8 Oct 2016 14:15:07 -0000
> @@ -52,25 +52,15 @@
>
> NOPROFILE=
>
> +PKGCONFIG= epoxy.pc
> +PACKAGE_VERSION= $(EPOXY_MAJOR).$(EPOXY_MINOR)
Why no .${EPOXY_TINY} here?
> +EXTRA_PKGCONFIG_SUBST= '-e s,@DLOPEN_LIBS@,,'
> +
> obj: _xenocara_obj
>
> .include <bsd.lib.mk>
> .include <bsd.xorg.mk>
>
> -epoxy.pc: ${EPOXY}/epoxy.pc.in Makefile
> - sed -e 's,@prefix@,$(X11BASE),' \
> - -e 's,@exec_prefix@,$(X11BASE),' \
> - -e 's,@libdir@,${LIBDIR},' \
> - -e 's,@includedir@,${INCSDIR},' \
> - -e 's,@DLOPEN_LIBS@,,' \
> - -e 's,@PACKAGE_VERSION@,$(EPOXY_MAJOR).$(EPOXY_MINOR),' \
> - < ${EPOXY}/epoxy.pc.in > epoxy.pc
> -
> -afterinstall: epoxy.pc
> - $(INSTALL) -c -m 644 -o root -g wheel epoxy.pc \
> - ${DESTDIR}${LIBDIR}/pkgconfig
> -
> -CLEANFILES+= epoxy.pc
> -
> +.PATH: ${EPOXY}
> .PATH: ${EPOXY}/src
> .PATH: ${.CURDIR}/generated/src
>
> --
> Matthieu Herrb