summaryrefslogtreecommitdiffstats
path: root/packaging/macos/modulesets/patches/gtk-mac-bundler_configure.patch
blob: 10365cdd3adcd095c09262c04bf6a9b60b2b4dae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--- a/configure	2020-11-29 14:24:17.000000000 +0100
+++ b/configure	2020-11-29 14:21:40.000000000 +0100
@@ -0,0 +1,21 @@
+#!/usr/bin/env bash
+
+# This mocks a configure script to provide an interface for JHBuild.
+# We're only interested in the prefix so we can patch the Makefile.
+
+while [ "$#" -gt 0 ]; do
+  case $1 in
+    --prefix=*) PREFIX=${1:9}; break ;;
+    *) echo "ignoring parameter: $1" ;;
+  esac
+  shift
+done
+
+if [ -z $PREFIX ]; then
+  echo "--prefix=* argument not found"
+  exit 1
+else
+  sed -i "" "/bindir=/a\\
+    bindir=$PREFIX\/bin\\
+    " Makefile
+fi