diff options
author | Akinori MUSHA <knu@FreeBSD.org> | 2001-07-17 07:25:51 +0000 |
---|---|---|
committer | Akinori MUSHA <knu@FreeBSD.org> | 2001-07-17 07:25:51 +0000 |
commit | 61ca41bdc4a4a5596cf9ef96862cba8225972f54 (patch) | |
tree | 7bf197a6beffd3ea661f75006044149f1db6613c | |
parent | Enable JPEG support. (diff) |
Enable JPEG support.
Suggested by: knu
Submitted by: Anders Nordby <anders@fix.no> (MAINTAINER)
Notes
Notes:
svn path=/head/; revision=45191
-rw-r--r-- | graphics/gdchart/Makefile | 3 | ||||
-rw-r--r-- | graphics/gdchart/files/patch-makefile | 90 |
2 files changed, 62 insertions, 31 deletions
diff --git a/graphics/gdchart/Makefile b/graphics/gdchart/Makefile index 54b7223f317c..599afa09da3b 100644 --- a/graphics/gdchart/Makefile +++ b/graphics/gdchart/Makefile @@ -20,6 +20,9 @@ LIB_DEPENDS= gd.2:${PORTSDIR}/graphics/gd MAKEFILE= makefile WRKSRC= ${WRKDIR}/${DISTNAME} +post-patch: + ${PERL} -i -pe 's/^#ifdef HAVE_JPEG/#ifndef NO_JPEG/' ${WRKSRC}/*.[ch] + do-install: ${INSTALL_DATA} ${WRKSRC}/libgdchart.a ${PREFIX}/lib ${INSTALL_DATA} ${WRKSRC}/gdchart.h ${PREFIX}/include diff --git a/graphics/gdchart/files/patch-makefile b/graphics/gdchart/files/patch-makefile index 696ad4f13d42..5386685462af 100644 --- a/graphics/gdchart/files/patch-makefile +++ b/graphics/gdchart/files/patch-makefile @@ -1,5 +1,5 @@ --- makefile.orig Sat Nov 4 02:49:46 2000 -+++ makefile Mon Jun 18 01:15:50 2001 ++++ makefile Tue Jul 17 01:42:30 2001 @@ -2,8 +2,8 @@ GDC_LIB = . @@ -11,7 +11,16 @@ # libgd requires libpng # PNG_INCL = ../libpng-1.0.8 -@@ -30,37 +30,35 @@ +@@ -23,6 +23,8 @@ + # if not installed in standard paths (/lib, /usr/lib), or LD_LIBRARY_PATH + # LIB_PATHS = -L$(GD_LIB) -L$(PNG_LIB) -L$(ZLIB_LIB) -L$(JPEG_LIB) + ++LIB_OBJS = gdc.o gdc_pie.o gdchart.o price_conv.o gifencode.o ++ + # NOTE: + # libpng, libz, etc. are usually linked in as dynamic libs + # either use a link line similar to one of these, or set environment LD_LIBRARY_PATH +@@ -30,62 +32,66 @@ # LIB_PATHS = $(LIB_PATHS) -R$(PNG_LIB) -R$(ZLIB_LIB) # LIB_PATHS = $(LIB_PATHS) -Xlinker -rpath -Xlinker $(PNG_LIB) -Xlinker -rpath -Xlinker $(ZLIB_LIB) @@ -21,42 +30,62 @@ +all: libgdchart.a # --- compile the samples --- - gdc_pie_samp.o: $(GDC_INCL)/gdc.h $(GDC_INCL)/gdcpie.h gdc_pie_samp.c +-gdc_pie_samp.o: $(GDC_INCL)/gdc.h $(GDC_INCL)/gdcpie.h gdc_pie_samp.c - $(CC) -I$(GDC_INCL) -c gdc_pie_samp.c -+ $(CC) $(CFLAGS) -I$(GDC_INCL) -c gdc_pie_samp.c ++#gdc_pie_samp.o: $(GDC_INCL)/gdc.h $(GDC_INCL)/gdcpie.h gdc_pie_samp.c ++# $(CC) $(CFLAGS) -I$(GDC_INCL) -c gdc_pie_samp.c - gdc_samp1.o: $(GDC_INCL)/gdc.h $(GDC_INCL)/gdchart.h gdc_samp1.c +-gdc_samp1.o: $(GDC_INCL)/gdc.h $(GDC_INCL)/gdchart.h gdc_samp1.c - $(CC) -I$(GDC_INCL) $(JPEG_DEF) -c gdc_samp1.c -+ $(CC) $(CFLAGS) -I$(GDC_INCL) $(JPEG_DEF) -c gdc_samp1.c ++#gdc_samp1.o: $(GDC_INCL)/gdc.h $(GDC_INCL)/gdchart.h gdc_samp1.c ++# $(CC) $(CFLAGS) -I$(GDC_INCL) $(JPEG_DEF) -c gdc_samp1.c - gdc_samp2.o: $(GDC_INCL)/gdc.h $(GDC_INCL)/gdchart.h gdc_samp2.c +-gdc_samp2.o: $(GDC_INCL)/gdc.h $(GDC_INCL)/gdchart.h gdc_samp2.c - $(CC) -I$(GDC_INCL) $(JPEG_DEF) -c gdc_samp2.c -+ $(CC) $(CFLAGS) -I$(GDC_INCL) $(JPEG_DEF) -c gdc_samp2.c ++#gdc_samp2.o: $(GDC_INCL)/gdc.h $(GDC_INCL)/gdchart.h gdc_samp2.c ++# $(CC) $(CFLAGS) -I$(GDC_INCL) $(JPEG_DEF) -c gdc_samp2.c # --- link the samples --- - gdc_samp1: gdc.o gdchart.o price_conv.o gdc_samp1.o gifencode.o $(GD_LIB)/libgd.a +-gdc_samp1: gdc.o gdchart.o price_conv.o gdc_samp1.o gifencode.o $(GD_LIB)/libgd.a - $(CC) -o gdc_samp1 \ -+ $(CC) $(CFLAGS) -o gdc_samp1 \ - gdc.o gdchart.o price_conv.o gifencode.o \ - gdc_samp1.o \ - $(LIB_PATHS) \ - -lgd -lz -lpng $(JPEG_LK) -lm - - gdc_samp2: gdc.o gdchart.o price_conv.o gdc_samp2.o gifencode.o $(GD_LIB)/libgd.a +- gdc.o gdchart.o price_conv.o gifencode.o \ +- gdc_samp1.o \ +- $(LIB_PATHS) \ +- -lgd -lz -lpng $(JPEG_LK) -lm +- +-gdc_samp2: gdc.o gdchart.o price_conv.o gdc_samp2.o gifencode.o $(GD_LIB)/libgd.a - $(CC) -o gdc_samp2 \ -+ $(CC) $(CFLAGS) -o gdc_samp2 \ - gdc.o gdchart.o price_conv.o gifencode.o \ - gdc_samp2.o \ - $(LIB_PATHS) \ - -lgd -lz -lpng $(JPEG_LK) -lm - - gdc_pie_samp: gdc.o gdc_pie.o price_conv.o gdc_pie_samp.o gifencode.o $(GD_LIB)/libgd.a +- gdc.o gdchart.o price_conv.o gifencode.o \ +- gdc_samp2.o \ +- $(LIB_PATHS) \ +- -lgd -lz -lpng $(JPEG_LK) -lm +- +-gdc_pie_samp: gdc.o gdc_pie.o price_conv.o gdc_pie_samp.o gifencode.o $(GD_LIB)/libgd.a - $(CC) -o gdc_pie_samp \ -+ $(CC) $(CFLAGS) -o gdc_pie_samp \ - gdc.o gdc_pie.o price_conv.o gifencode.o \ - gdc_pie_samp.o \ - $(LIB_PATHS) \ -@@ -68,24 +66,31 @@ +- gdc.o gdc_pie.o price_conv.o gifencode.o \ +- gdc_pie_samp.o \ +- $(LIB_PATHS) \ +- -lgd -lz -lpng $(JPEG_LK) -lm ++#gdc_samp1: gdc.o gdchart.o price_conv.o gdc_samp1.o gifencode.o $(GD_LIB)/libgd.a ++# $(CC) $(CFLAGS) -o gdc_samp1 \ ++# gdc.o gdchart.o price_conv.o gifencode.o \ ++# gdc_samp1.o \ ++# $(LIB_PATHS) \ ++# -lgd -lz -lpng $(JPEG_LK) -lm ++ ++#gdc_samp2: gdc.o gdchart.o price_conv.o gdc_samp2.o gifencode.o $(GD_LIB)/libgd.a ++# $(CC) $(CFLAGS) -o gdc_samp2 \ ++# gdc.o gdchart.o price_conv.o gifencode.o \ ++# gdc_samp2.o \ ++# $(LIB_PATHS) \ ++# -lgd -lz -lpng $(JPEG_LK) -lm ++ ++#gdc_pie_samp: gdc.o gdc_pie.o price_conv.o gdc_pie_samp.o gifencode.o $(GD_LIB)/libgd.a ++# $(CC) $(CFLAGS) -o gdc_pie_samp \ ++# gdc.o gdc_pie.o price_conv.o gifencode.o \ ++# gdc_pie_samp.o \ ++# $(LIB_PATHS) \ ++# -lgd -lz -lpng $(JPEG_LK) -lm # --- compile the lib --- gifencode.o: gifencode.c gifencode.h @@ -84,9 +113,8 @@ # $(GD_LIB)/libgd.a: # cd $(GD_LIB) ; make -f Makefile libgd.a + -+libgdchart.a: gdc.o gdc_pie.o gdchart.o price_conv.o gifencode.o -+ $(AR) rc libgdchart.a gdc.o gdc_pie.o gdchart.o price_conv.o \ -+ gifencode.o ++libgdchart.a: $(LIB_OBJS) ++ $(AR) rc libgdchart.a $(LIB_OBJS) + @if [ -x $(RANLIB) ] ; then \ + $(RANLIB) libgdchart.a; \ + fi; |