#! /bin/sh /usr/share/dpatch/dpatch-run
## 02_cecil_flowanalysis_location.dpatch by Iain Lane <laney@ubuntu.com>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Copy mono-cecil, using pcfile to discover where the dll is located.

@DPATCH@
diff -urNad cecil-flowanalysis-0.1~svn.128879~/Makefile cecil-flowanalysis-0.1~svn.128879/Makefile
--- cecil-flowanalysis-0.1~svn.128879~/Makefile	2010-01-19 19:04:21.504734613 +0000
+++ cecil-flowanalysis-0.1~svn.128879/Makefile	2010-01-19 19:05:13.053476182 +0000
@@ -2,7 +2,7 @@
 KEY_FILE = ../../mcs/class/mono.snk
 MCS_FLAGS = -keyfile:$(KEY_FILE)
 BUILD.DIR = bin
-MONO.CECIL.DLL = ../../mcs/class/Mono.Cecil/Mono.Cecil.dll
+MONO.CECIL.DLL = $(shell pkg-config --variable=Libraries mono-cecil)
 
 all: init
 	$(MCS) $(MCS_FLAGS) @Cecil.FlowAnalysis.sources /target:library /out:$(BUILD.DIR)/Cecil.FlowAnalysis.dll /r:$(BUILD.DIR)/Mono.Cecil.dll
