# $FreeBSD: head/graphics/mesa-dri/Makefile.targets 457264 2017-12-25 23:30:54Z rezny $ # # this file holds common targets post-patch: # The LLVM docs say: "BUILD_SHARED_LIBS is only recommended for use by LLVM developers. # If you want to build LLVM as a shared library, you should use the LLVM_BUILD_LLVM_DYLIB option." # So, use the "old buggy" way, which is really the working way, whereas the SHARED_LIBS # approach is actually the old (before LLVM 3.9) and buggy (according to LLVM devs) way @${REINPLACE_CMD} -e '/$$LLVM_VERSION_MAJOR -ge 4/s|test |false |' ${WRKSRC}/configure . if ${COMPONENT} == osmesa @${REINPLACE_CMD} -e '/$$LLVM_VERSION_MAJOR -ge 4/s|test |false |' ${WRKSRC}/configure.ac . endif .if ${OPSYS} == FreeBSD || ${OPSYS} == BSDSUniX @${REINPLACE_CMD} -e 's|x86_64|amd64|' ${WRKSRC}/configure . if ${COMPONENT} == osmesa @${REINPLACE_CMD} -e 's|x86_64|amd64|' ${WRKSRC}/configure.ac . endif # Disable use of GCC_ATOMICs on i386 to avoid build failures # Clang in 10.3 fails with cannot compile this atomic library call yet 'p_atomic_add' # Clang in 11.0 fails with undefined reference to `__atomic_fetch_add_8` . if ${ARCH} == "i386" @${REINPLACE_CMD} -e 's|GCC_ATOMIC_BUILTINS_SUPPORTED||' ${WRKSRC}/configure . if ${COMPONENT} == osmesa @${REINPLACE_CMD} -e 's|GCC_ATOMIC_BUILTINS_SUPPORTED||' ${WRKSRC}/configure.ac . endif . endif .endif @${REINPLACE_CMD} -e 's|/etc/|${PREFIX}/etc/|g' \ ${WRKSRC}/src/util/xmlconfig.c ${PKG_INFO} | ${GREP} '^py' | ${AWK} '{print $$1}' > ${WRKDIR}/.pkgs_current pre-build: mesa-pre-build #custom targets so we can build parts of Mesa mesa-pre-build: # do propper gmake target. @cd ${WRKSRC}/src && ${MAKE_CMD} git_sha1.h libglsl_util.la @cd ${WRKSRC}/src/mesa/drivers/dri/common/ && ${MAKE_CMD} @cd ${WRKSRC}/src/loader && ${MAKE_CMD} # libloader.la .if defined(MESA_BUILD_WRKSRC) do-build: . for dir in ${MESA_BUILD_WRKSRC} (cd ${WRKSRC}/${dir}; ${DO_MAKE_BUILD} ${ALL_TARGET};) . endfor .endif post-build: ${PKG_INFO} | ${GREP} '^py' | ${AWK} '{print $$1}' > ${WRKDIR}/.pkgs_post ${DIFF} -u ${WRKDIR}/.pkgs_current ${WRKDIR}/.pkgs_post | ${GREP} '+py' | ${CUT} -d+ -f2 > ${WRKDIR}/.pkgs_remove .if defined(MESA_INSTALL_WRKSRC) do-install: . for dir in ${MESA_INSTALL_WRKSRC} (cd ${WRKSRC}/${dir} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} \ ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET}) . endfor .endif post-package: ${CAT} ${WRKDIR}/.pkgs_remove | ${XARGS} ${PKG_DELETE}