Enable JPEG support.
Suggested by: knu Submitted by: Anders Nordby <anders@fix.no> (MAINTAINER)
This commit is contained in:
parent
accd2c3a52
commit
61ca41bdc4
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=45191
@ -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
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user