Subject: fix for databases/rrdtool
To: None <tech-pkg@netbsd.org>
From: Chris Jones <chris@cjones.org>
List: tech-pkg
Date: 02/18/2000 14:32:43
--=-=-=

Is there any reason I shouldn't commit this as patch-ah for rrdtool?
It changes many occurrences of "/usr/pkg" to "${PREFIX}".

(If I do commit it, should I just "make makepatchsum ; cvs commit"?)


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment; filename=patch-new
Content-Description: /usr/pkg -> ${PREFIX} fix

$NetBSD$

--- src/Makefile.in.orig	Fri Aug 27 13:20:25 1999
+++ src/Makefile.in	Fri Feb 18 14:21:20 2000
@@ -76,12 +76,7 @@
 PERL = @PERL@
 RANLIB = @RANLIB@
 
-CGI_LIB_DIR = $(top_srcdir)/@CGI_LIB_DIR@
-GD_LIB_DIR = $(top_srcdir)/@GD_LIB_DIR@
-PNG_LIB_DIR = $(top_srcdir)/@PNG_LIB_DIR@
-ZLIB_LIB_DIR = $(top_srcdir)/@ZLIB_LIB_DIR@
-
-INCLUDES = -I$(CGI_LIB_DIR) -I$(GD_LIB_DIR) -I$(PNG_LIB_DIR) -I$(ZLIB_LIB_DIR)
+INCLUDES = -I${PREFIX}/include
 
 #COMPILE   = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $(CFLAGS_EXTRA)
 #LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $(CFLAGS_EXTRA)
@@ -97,7 +92,7 @@
 # creates a ./.lib/*.al file that contains the PIC compiled object
 # files.
 
-RRD_LIBS =  	$(CGI_LIB_DIR)/librrd_cgi.la		$(GD_LIB_DIR)/librrd_gd.la		$(PNG_LIB_DIR)/librrd_png.la		$(ZLIB_LIB_DIR)/librrd_z.la
+RRD_LIBS = -lz -lgd -lcgi -lpng
 
 
 lib_LTLIBRARIES = librrd.la
@@ -128,18 +123,12 @@
 DEFS = @DEFS@ -I. -I$(srcdir) -I../config
 CPPFLAGS = @CPPFLAGS@
 LDFLAGS = @LDFLAGS@
-LIBS = @LIBS@
-librrd_la_DEPENDENCIES =  $(CGI_LIB_DIR)/librrd_cgi.la \
-$(GD_LIB_DIR)/librrd_gd.la $(PNG_LIB_DIR)/librrd_png.la \
-$(ZLIB_LIB_DIR)/librrd_z.la
+LIBS = @LIBS@ -lgd -lpng -lcgi -lz
 librrd_la_OBJECTS =  gdpng.lo getopt.lo getopt1.lo gifsize.lo \
 parsetime.lo pngsize.lo rrd_create.lo rrd_diff.lo rrd_dump.lo \
 rrd_error.lo rrd_fetch.lo rrd_format.lo rrd_graph.lo rrd_last.lo \
 rrd_open.lo rrd_resize.lo rrd_restore.lo rrd_tune.lo rrd_update.lo
 librrd_private_la_LDFLAGS = 
-librrd_private_la_DEPENDENCIES =  $(CGI_LIB_DIR)/librrd_cgi.la \
-$(GD_LIB_DIR)/librrd_gd.la $(PNG_LIB_DIR)/librrd_png.la \
-$(ZLIB_LIB_DIR)/librrd_z.la
 librrd_private_la_OBJECTS =  gdpng.lo getopt.lo getopt1.lo gifsize.lo \
 parsetime.lo pngsize.lo rrd_create.lo rrd_diff.lo rrd_dump.lo \
 rrd_error.lo rrd_fetch.lo rrd_format.lo rrd_graph.lo rrd_last.lo \
@@ -255,7 +244,7 @@
 librrd.la: $(librrd_la_OBJECTS) $(librrd_la_DEPENDENCIES)
 	$(LINK) -rpath $(libdir) $(librrd_la_LDFLAGS) $(librrd_la_OBJECTS) $(librrd_la_LIBADD) $(LIBS)
 
-librrd_private.la: $(librrd_private_la_OBJECTS) $(librrd_private_la_DEPENDENCIES)
+librrd_private.la: $(librrd_private_la_OBJECTS)
 	$(LINK)  $(librrd_private_la_LDFLAGS) $(librrd_private_la_OBJECTS) $(librrd_private_la_LIBADD) $(LIBS)
 
 mostlyclean-binPROGRAMS:
@@ -283,7 +272,7 @@
 	  rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
 	done
 
-rrdcgi: $(rrdcgi_OBJECTS) $(rrdcgi_DEPENDENCIES)
+rrdcgi: $(rrdcgi_OBJECTS)
 	@rm -f rrdcgi
 	$(LINK) $(rrdcgi_LDFLAGS) $(rrdcgi_OBJECTS) $(rrdcgi_LDADD) $(LIBS)
 
@@ -335,48 +324,48 @@
 	    || cp -p $$d/$$file $(distdir)/$$file || :; \
 	  fi; \
 	done
-gdpng.lo gdpng.o : gdpng.c ../libpng-1.0.3/png.h ../zlib-1.1.3/zlib.h \
-	../zlib-1.1.3/zconf.h ../libpng-1.0.3/pngconf.h ../gd1.3/gd.h
+gdpng.lo gdpng.o : gdpng.c ${PREFIX}/include/png.h /usr/include/zlib.h \
+	/usr/include/zconf.h ${PREFIX}/include/pngconf.h ${PREFIX}/include/gd.h
 getopt.lo getopt.o : getopt.c ../config/config.h
 getopt1.lo getopt1.o : getopt1.c ../config/config.h getopt.h
 gifsize.lo gifsize.o : gifsize.c
 parsetime.lo parsetime.o : parsetime.c rrd_tool.h ../config/config.h \
-	parsetime.h getopt.h rrd_format.h ../gd1.3/gd.h
-pngsize.lo pngsize.o : pngsize.c ../libpng-1.0.3/png.h \
-	../zlib-1.1.3/zlib.h ../zlib-1.1.3/zconf.h \
-	../libpng-1.0.3/pngconf.h
+	parsetime.h getopt.h rrd_format.h ${PREFIX}/include/gd.h
+pngsize.lo pngsize.o : pngsize.c ${PREFIX}/include/png.h \
+	/usr/include/zlib.h /usr/include/zconf.h \
+	${PREFIX}/include/pngconf.h
 rrd_cgi.o: rrd_cgi.c rrd_tool.h ../config/config.h parsetime.h getopt.h \
-	rrd_format.h ../gd1.3/gd.h ../cgilib-0.4/cgi.h
+	rrd_format.h ${PREFIX}/include/gd.h ${PREFIX}/include/cgi.h
 rrd_create.lo rrd_create.o : rrd_create.c rrd_tool.h ../config/config.h \
-	parsetime.h getopt.h rrd_format.h ../gd1.3/gd.h
+	parsetime.h getopt.h rrd_format.h ${PREFIX}/include/gd.h
 rrd_diff.lo rrd_diff.o : rrd_diff.c rrd_tool.h ../config/config.h \
-	parsetime.h getopt.h rrd_format.h ../gd1.3/gd.h
+	parsetime.h getopt.h rrd_format.h ${PREFIX}/include/gd.h
 rrd_dump.lo rrd_dump.o : rrd_dump.c rrd_tool.h ../config/config.h \
-	parsetime.h getopt.h rrd_format.h ../gd1.3/gd.h
+	parsetime.h getopt.h rrd_format.h ${PREFIX}/include/gd.h
 rrd_error.lo rrd_error.o : rrd_error.c rrd_tool.h ../config/config.h \
-	parsetime.h getopt.h rrd_format.h ../gd1.3/gd.h
+	parsetime.h getopt.h rrd_format.h ${PREFIX}/include/gd.h
 rrd_fetch.lo rrd_fetch.o : rrd_fetch.c rrd_tool.h ../config/config.h \
-	parsetime.h getopt.h rrd_format.h ../gd1.3/gd.h
+	parsetime.h getopt.h rrd_format.h ${PREFIX}/include/gd.h
 rrd_format.lo rrd_format.o : rrd_format.c rrd_tool.h ../config/config.h \
-	parsetime.h getopt.h rrd_format.h ../gd1.3/gd.h
+	parsetime.h getopt.h rrd_format.h ${PREFIX}/include/gd.h
 rrd_graph.lo rrd_graph.o : rrd_graph.c rrd_tool.h ../config/config.h \
-	parsetime.h getopt.h rrd_format.h ../gd1.3/gd.h \
-	../gd1.3/gdlucidan10.h ../gd1.3/gdlucidab12.h
+	parsetime.h getopt.h rrd_format.h ${PREFIX}/include/gd.h \
+	${PREFIX}/include/gdfontt.h ${PREFIX}/include/gdfonts.h
 rrd_last.lo rrd_last.o : rrd_last.c rrd_tool.h ../config/config.h \
-	parsetime.h getopt.h rrd_format.h ../gd1.3/gd.h
+	parsetime.h getopt.h rrd_format.h ${PREFIX}/include/gd.h
 rrd_open.lo rrd_open.o : rrd_open.c rrd_tool.h ../config/config.h \
-	parsetime.h getopt.h rrd_format.h ../gd1.3/gd.h
+	parsetime.h getopt.h rrd_format.h ${PREFIX}/include/gd.h
 rrd_resize.lo rrd_resize.o : rrd_resize.c rrd_tool.h ../config/config.h \
-	parsetime.h getopt.h rrd_format.h ../gd1.3/gd.h
+	parsetime.h getopt.h rrd_format.h ${PREFIX}/include/gd.h
 rrd_restore.lo rrd_restore.o : rrd_restore.c rrd_tool.h \
 	../config/config.h parsetime.h getopt.h rrd_format.h \
-	../gd1.3/gd.h
+	${PREFIX}/include/gd.h
 rrd_tool.o: rrd_tool.c rrd_tool.h ../config/config.h parsetime.h \
-	getopt.h rrd_format.h ../gd1.3/gd.h
+	getopt.h rrd_format.h ${PREFIX}/include/gd.h
 rrd_tune.lo rrd_tune.o : rrd_tune.c rrd_tool.h ../config/config.h \
-	parsetime.h getopt.h rrd_format.h ../gd1.3/gd.h
+	parsetime.h getopt.h rrd_format.h ${PREFIX}/include/gd.h
 rrd_update.lo rrd_update.o : rrd_update.c rrd_tool.h ../config/config.h \
-	parsetime.h getopt.h rrd_format.h ../gd1.3/gd.h
+	parsetime.h getopt.h rrd_format.h ${PREFIX}/include/gd.h
 
 info-am:
 info: info-am

--=-=-=


Chris

-- 
-----------------------------------------------------chris@cjones.org
Chris Jones                                          cjones@honors.montana.edu
           Mad scientist at large
"Is this going to be a stand-up programming session, sir, or another bug hunt?"

--=-=-=--