From 2c9effed2113df2929fd0b85830030ce4bd64f87 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 20 Feb 2017 12:54:14 +0100 Subject: Mesa subtree: Add quilt based patch system for bundled Mesa. --- Makefile | 3 +++ mesa-quilt | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100755 mesa-quilt diff --git a/Makefile b/Makefile index 4784f6d65..eb53f1ed2 100644 --- a/Makefile +++ b/Makefile @@ -36,6 +36,8 @@ SHELL:=/bin/bash # clean auto-generated nxversion.def file \ if [ "x$@" == "xclean" ] || [ "x$@" = "xdistclean" ]; then \ + ./mesa-quilt pop -a; \ + rm -Rf nx-X11/extras/Mesa/.pc/; \ rm -f nx-X11/config/cf/nxversion.def; \ rm -f bin/nxagent; \ rm -f bin/nxproxy; \ @@ -72,6 +74,7 @@ build-full: cd nxcompshad && autoconf && (${CONFIGURE}) && ${MAKE} + ./mesa-quilt push -a cd nx-X11 && ${MAKE} World USRLIBDIR=$(USRLIBDIR) SHLIBDIR=$(SHLIBDIR) cd nxproxy && autoconf && (${CONFIGURE}) && ${MAKE} diff --git a/mesa-quilt b/mesa-quilt new file mode 100755 index 000000000..1aaeae1e4 --- /dev/null +++ b/mesa-quilt @@ -0,0 +1,34 @@ +#!/bin/bash + +# Copyright (C) 2017 by Mike Gabriel +# +# This is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the +# Free Software Foundation, Inc., +# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. + +d=. ; while [ ! -d "$d/nx-X11/extras" ] && [ "$(readlink -e "$d")" != "/" ]; do d="$d/.."; done +if [ -d "$d/nx-X11/extras" ] && [ -z "$QUILT_PATCHES" ]; then + # if in nx-libs tree with unset $QUILT_PATCHES + export QUILT_PATCHES="../Mesa.patches" + export QUILT_PATCH_OPTS="--reject-format=unified" + export QUILT_DIFF_ARGS="-p ab --no-timestamps --no-index --color=auto" + export QUILT_REFRESH_ARGS="-p ab --no-timestamps --no-index" + export QUILT_COLORS="diff_hdr=1;32:diff_add=1;34:diff_rem=1;31:diff_hunk=1;33:diff_ctx=35:diff_cctx=33" + if ! [ -d "$d/nx-X11/extras/Mesa.patches" ]; then mkdir "$d/nx-X11/extras/Mesa.patches"; fi + cd "$d/nx-X11/extras/Mesa/" +fi + +quilt "$@" + +cd - 1> /dev/null -- cgit v1.2.3