From: Roland Rosenfeld <roland@debian.org>
Subject: rgb.txt can not be located via FIG2DEV_RGBFILE environment variable.
 This allows one to run the test suite without the package being
 installed before.
Forwarded: Thomas Loimer <thomas.loimer@tuwien.ac.at> on Tue, 12 Jul 2016 22:14:28 +0200

--- a/fig2dev/colors.c
+++ b/fig2dev/colors.c
@@ -730,8 +730,13 @@ read_colordb(void)
 	FILE		*fp;
 #define MAX_LINE	100
 	char		s[MAX_LINE], s1[MAX_LINE];
+	char		*rgbfile;
 
-	fp = fopen(RGB_FILE, "r");
+	rgbfile = getenv("FIG2DEV_RGBFILE");
+	if (rgbfile == NULL) {
+		rgbfile = RGB_FILE;
+	}
+	fp = fopen(rgbfile, "r");
 	if (fp == NULL) {
 		Xcolors = defaultXcolors;
 		numXcolors = sizeof(defaultXcolors) / sizeof(struct color_db);
