Edit

IABSD.fr/xenocara/lib/libpng/Makefile.bsd-wrapper

Branch :

  • Show log

    Commit

  • Author : matthieu
    Date : 2026-05-08 09:02:11
    Hash : 6ddd87d7
    Message : Fix the build system changes that handle the autoconf cache patches. The beforeconfigure target doesn't work as expected and causes extra configure script executions and sometimes full rebuilds. replace it by more ad-hoc code to generate a local autoconf cache for the packages that need it (currently libpng and libXfont2) ok miod@

  • lib/libpng/Makefile.bsd-wrapper
  • # $OpenBSD: Makefile.bsd-wrapper,v 1.4 2026/05/08 09:02:11 matthieu Exp $
    
    CONFIGURE_ARGS=	--disable-shared \
    		--disable-tests \
    		--disable-tools
    
    .if ${MACHINE_ARCH} == "aarch64" || ${MACHINE_ARCH} == "amd64" || \
        ${MACHINE_ARCH} == "powerpc64"
    CONFIGURE_ARGS +=	--enable-hardware-optimizations
    .else
    CONFIGURE_ARGS +=	--disable-hardware-optimizations
    .endif
    
    # Enable VSX to prevent #error "This code requires VSX..." in
    # powerpc/filter_vsx_intrinsics.c
    .if ${MACHINE_ARCH} == "powerpc64"
    CFLAGS +=	-mvsx
    .endif
    
    # This PICFLAG override should match lib/freetype/Makefile
    PICFLAG=	-fPIC
    
    CFLAGS +=	${PICFLAG}
    
    # Because we change CFLAGS, we can not use the regular autoconf cache;
    # build a local copy without the modified settings
    
    LOCAL_AC_CACHE = ${.OBJDIR}/xorg-config.cache.${MACHINE}
    
    $(LOCAL_AC_CACHE):
    	@echo "Generating local autoconf cache."
    	@if test -f ${XOBJDIR}/xorg-config.cache.${MACHINE}; then \
    		grep -v ac_cv_env_CFLAGS \
    		    ${XOBJDIR}/xorg-config.cache.${MACHINE} > \
    		    $(LOCAL_AC_CACHE); \
    	fi
    
    _cache= --cache-file=$(LOCAL_AC_CACHE)
    
    # libpng is in ports; for xenocara it is bundled as part of libfreetype and
    # other components, so don't install anything
    realinstall:
    
    .include <bsd.xorg.mk>