diff options
author | steve <steve@FreeBSD.org> | 2000-01-30 05:46:33 +0800 |
---|---|---|
committer | steve <steve@FreeBSD.org> | 2000-01-30 05:46:33 +0800 |
commit | 77955226c11aa69d5a0dfa703803b4ffa000f4c5 (patch) | |
tree | 824b0bf9d45141d22e9cffdb9c9fb5b3abc200f4 | |
parent | fa6d0ce25ea990fe08d103d4b15d5eb2c2783c7d (diff) | |
download | freebsd-ports-gnome-77955226c11aa69d5a0dfa703803b4ffa000f4c5.tar.gz freebsd-ports-gnome-77955226c11aa69d5a0dfa703803b4ffa000f4c5.tar.zst freebsd-ports-gnome-77955226c11aa69d5a0dfa703803b4ffa000f4c5.zip |
- Support CC/CFLAGS properly
- Support install macros
PR: 16425
Submitted by: KATO Tsuguru <tkato@prontomail.ne.jp>
-rw-r--r-- | graphics/xdl/files/patch-ab | 34 | ||||
-rw-r--r-- | graphics/xdl/files/patch-ac | 63 |
2 files changed, 97 insertions, 0 deletions
diff --git a/graphics/xdl/files/patch-ab b/graphics/xdl/files/patch-ab new file mode 100644 index 000000000000..f2f6a40f2216 --- /dev/null +++ b/graphics/xdl/files/patch-ab @@ -0,0 +1,34 @@ +--- Makefile.orig Thu Feb 4 07:08:27 1993 ++++ Makefile Sat Jan 29 02:12:57 2000 +@@ -23,15 +23,15 @@ + + # + # Modify these to fit the compiler setup on your system. +-CC = gcc +-CFLAGS = -O2 +-LIBS = -lX11 $(IXLIBS) ++CC ?= gcc ++CFLAGS += -I${X11BASE}/include ++LIBS += -L${X11BASE}/lib -lX11 $(IXLIBS) + + # + # These specify where to install the binary + # and the manual. +-BINDIR = /usr/local/bin +-MANDIR = /usr/local/man/man1 ++BINDIR = ${PREFIX}/bin ++MANDIR = ${PREFIX}/man/man1 + MANEXT = 1 + + all: xdl +@@ -40,8 +40,8 @@ + $(CC) $(CFLAGS) $(TIMER) $(BSDT) -o xdl xdl.c $(LIBS) + + install: xdl xdl.man +- cp xdl $(BINDIR) +- cp xdl.man $(MANDIR)/xdl.$(MANEXT) ++ ${BSD_INSTALL_PROGRAM} xdl $(BINDIR) ++ ${BSD_INSTALL_MAN} xdl.man $(MANDIR)/xdl.$(MANEXT) + + clean: + $(RM) xdl *.o *~ core diff --git a/graphics/xdl/files/patch-ac b/graphics/xdl/files/patch-ac new file mode 100644 index 000000000000..1d6d055574bc --- /dev/null +++ b/graphics/xdl/files/patch-ac @@ -0,0 +1,63 @@ +--- xdl.c.orig Thu Feb 4 08:14:02 1993 ++++ xdl.c Sat Jan 29 02:13:28 2000 +@@ -20,7 +20,11 @@ + + #include <stdio.h> + #include <signal.h> ++#ifdef __STDC__ ++#include <stdlib.h> ++#else + #include <malloc.h> ++#endif + #include <sys/types.h> + #ifdef BSDTYPES + #include <sys/bsdtypes.h> +@@ -215,6 +219,16 @@ + } + + ++void ++freepixmaps(dlinfo) ++ DL_info dlinfo; ++{ ++ int i, j; ++ for (j = 0; j < dlinfo.num_screen; j++) ++ for (i = 0; i < dlinfo.images_per_screen; i++) ++ XFreePixmap(x_display, pixmap[j * (dlinfo.format * 3 + 1) + i]); ++} ++ + static void die(s)char*s;{fprintf(stderr,"%s\n",s);exit(1);} + static void dummy(){}; + +@@ -468,6 +482,18 @@ + } else if (x_depth == 8) { + x_image->data[pixelcount++] = (u_char)pixels[*src]; + ++ } else if (x_depth == 16) { ++ if (x_image->byte_order == MSBFirst) { ++ x_image->data[pixelcount++] ++ = (pixels[*src]>>8) & 0xff; ++ x_image->data[pixelcount++] ++ = pixels[*src] & 0xff; ++ } else { ++ x_image->data[pixelcount++] ++ = pixels[*src] & 0xff; ++ x_image->data[pixelcount++] ++ = (pixels[*src]>>8) & 0xff; ++ } + } else { /* 24 or 32 bits */ + if (x_image->byte_order == MSBFirst) { + x_image->data[pixelcount++] = 0; +@@ -607,8 +633,11 @@ + #endif + if (x_depth == 8) + XFreeColormap(x_display, cmap); ++ freepixmaps(dlinfo); + return; +- case 3: exit(0); ++ case 3: ++ freepixmaps(dlinfo); ++ exit(0); + } + } + } |