From 4e44d721d99baefc08e659a6c10292a391a9993e Mon Sep 17 00:00:00 2001
From: P. J. McDermott <pj@pehjota.net>
Date: Wed, 11 Jun 2014 12:38:29 -0400
Subject: Use LD_PRELOAD for tests in patch.

---
diff --git a/patches/01_properly-support-shared-library.patch b/patches/01_properly-support-shared-library.patch
index f7ec802..e583d8e 100644
--- a/patches/01_properly-support-shared-library.patch
+++ b/patches/01_properly-support-shared-library.patch
@@ -39,17 +39,17 @@ diff -Naur src.orig/Makefile src/Makefile
  check: test
  test: bzip2
  	@cat words1
-+	LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH \
++	LD_PRELOAD=./libbz2.so.$(VERSION) \
  	./bzip2 -1  < sample1.ref > sample1.rb2
-+	LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH \
++	LD_PRELOAD=./libbz2.so.$(VERSION) \
  	./bzip2 -2  < sample2.ref > sample2.rb2
-+	LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH \
++	LD_PRELOAD=./libbz2.so.$(VERSION) \
  	./bzip2 -3  < sample3.ref > sample3.rb2
-+	LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH \
++	LD_PRELOAD=./libbz2.so.$(VERSION) \
  	./bzip2 -d  < sample1.bz2 > sample1.tst
-+	LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH \
++	LD_PRELOAD=./libbz2.so.$(VERSION) \
  	./bzip2 -d  < sample2.bz2 > sample2.tst
-+	LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH \
++	LD_PRELOAD=./libbz2.so.$(VERSION) \
  	./bzip2 -ds < sample3.bz2 > sample3.tst
  	cmp sample1.bz2 sample1.rb2 
  	cmp sample2.bz2 sample2.rb2
--
cgit v0.9.1