Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Jan 2000 09:49:26 -0800 (PST)
From:      tkato@prontomail.ne.jp
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/16425: Update port: graphics/xdl
Message-ID:  <20000128174926.D032114D9D@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         16425
>Category:       ports
>Synopsis:       Update port: graphics/xdl
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jan 28 09:50:01 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     KATO Tsuguru
>Release:        3.4-RELEASE i386
>Organization:
>Environment:
>Description:
- Support CC/CFLAGS properly
- Support install macros

New file:
patches/patch-ab  patches/patch-ac

Remove file:
patches/patch-aa

>How-To-Repeat:

>Fix:
diff -urN /usr/ports/graphics/xdl/patches/patch-aa graphics/xdl/patches/patch-aa
--- /usr/ports/graphics/xdl/patches/patch-aa	Tue Jan  5 20:22:26 1999
+++ graphics/xdl/patches/patch-aa	Thu Jan  1 09:00:00 1970
@@ -1,95 +0,0 @@
---- ./xdl.c.org	Wed Feb  3 15:14:02 1993
-+++ ./xdl.c	Mon Jul 17 17:09:43 1995
-@@ -20,7 +20,11 @@
- 
- #include <stdio.h>
- #include <signal.h>
-+#ifdef __FreeBSD__
-+#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);
- 			}
- 		    }
- 		}
---- ./Makefile.org	Wed Feb  3 14:08:27 1993
-+++ ./Makefile	Mon Jul 17 16:42:43 1995
-@@ -24,14 +24,14 @@
- #
- # Modify these to fit the compiler setup on your system.
- CC = gcc
--CFLAGS = -O2
--LIBS = -lX11 $(IXLIBS)
-+CFLAGS = -O2 -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)
-+	install -c xdl $(BINDIR)
-+	install -c xdl.man $(MANDIR)/xdl.$(MANEXT)
- 
- clean:
- 	$(RM) xdl *.o *~ core
diff -urN /usr/ports/graphics/xdl/patches/patch-ab graphics/xdl/patches/patch-ab
--- /usr/ports/graphics/xdl/patches/patch-ab	Thu Jan  1 09:00:00 1970
+++ graphics/xdl/patches/patch-ab	Sat Jan 29 02:13:06 2000
@@ -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 -urN /usr/ports/graphics/xdl/patches/patch-ac graphics/xdl/patches/patch-ac
--- /usr/ports/graphics/xdl/patches/patch-ac	Thu Jan  1 09:00:00 1970
+++ graphics/xdl/patches/patch-ac	Sat Jan 29 02:13:40 2000
@@ -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);
+ 			}
+ 		    }
+ 		}


>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000128174926.D032114D9D>