summaryrefslogtreecommitdiff
path: root/graphics/xfig/patches/patch-ab
blob: 65f749a195bf7db0dbda4febe8dabee784e6c0ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
$NetBSD: patch-ab,v 1.9 2003/04/01 04:50:47 jschauma Exp $

--- Imakefile.orig	Thu Dec 19 12:57:11 2002
+++ Imakefile	Mon Mar 31 23:19:46 2003
@@ -44,12 +44,13 @@
 XCOMM BINDIR = /usr/bin/X11
 XCOMM MKDIRHIER = /bin/sh /usr/bin/X11/mkdirhier
 XCOMM XAPPLOADDIR = /home/user/xfig
+      XAPPLOADDIR      = $(LIBDIR)/app-defaults
 
 XCOMM Redefine the following if your PNG library and/or include file
 XCOMM are in different places
 
-PNGLIBDIR = $(USRLIBDIR)
-PNGINC = -I/usr/local/include
+PNGLIBDIR = $(LOCALBASE)/lib
+PNGINC = -I$(LOCALBASE)/include
 
 XCOMM If don't want JPEG support, comment out the #define USEJPEG line
 XCOMM Uncomment the #define for USEJPEG if you want to be able to import
@@ -68,8 +69,8 @@
 
 #ifdef USEJPEG
 #ifdef USEINSTALLEDJPEG
-JPEGLIBDIR = /usr/local/lib
-JPEGINC = -I/usr/include/X11
+JPEGLIBDIR = $(LOCALBASE)/lib
+JPEGINC = -I$(LOCALBASE)/include
 #else
 JPEGLIBDIR = ../jpeg
 JPEGINC = -I$(JPEGLIBDIR)
@@ -87,12 +88,12 @@
 XCOMM Change XPMLIBDIR if necessary to point to the xpm library (libXpm)
 XCOMM Change XPMINC if necessary to point to the include file for xpm (xpm.h)
 
-XCOMM #define USEXPM
-XCOMM #define USEXPM_ICON
+#define USEXPM
+#define USEXPM_ICON
 
 #ifdef USEXPM
-XPMLIBDIR = $(USRLIBDIR)
-XPMINC = -I/usr/include/X11
+XPMLIBDIR = $(X11BASE)/lib
+XPMINC = -I$(X11BASE)/include/X11
 #endif
 
 XCOMM Uncomment the following definiton if you want to use the small icons
@@ -105,10 +106,10 @@
 XCOMM Then be sure to change the XAW3DINC to point to the directory where your
 XCOMM 3D Athena widget headers are located
 
-XCOMM #define XAW3D
+#define XAW3D
 
 #ifdef XAW3D
-XAW3DINC = -I/usr/include/X11/Xaw3d
+XAW3DINC = -I$(LOCALBASE)/include/X11/Xaw3d
 DUSEXAW3D = -DXAW3D
 XAWLIB = -lXaw3d
 #endif
@@ -154,7 +155,7 @@
 XCOMM inline functions. With the "INLINE" keyword, you should notice that
 XCOMM the display will be a bit faster in complex figures
 
-XCOMM USEINLINE = -DUSE_INLINE
+USEINLINE = -DUSE_INLINE
 
 XCOMM use (and change) the following if you want the multi-key data base file
 XCOMM somewhere other than the standard X11 library directory
@@ -166,7 +167,7 @@
 
 XCOMM XFIGDOCDIR tells where the html and pdf documentation should go
 XCOMM XFIGDOCDIR = $(DOCDIR)/xfig
-XFIGDOCDIR = /usr/share/doc/xfig
+XFIGDOCDIR = $(PREFIX)/share/doc/xfig
 
 XCOMM MANDIR tells where the standard man pages should go (no need to change it
 XCOMM if you want the man pages installed in the standard place on your system
@@ -224,7 +225,7 @@
 #ifdef USEJPEG
 
 #ifdef USEINSTALLEDJPEG
-JPEGLIB = -L$(JPEGLIBDIR) -ljpeg
+JPEGLIB = -Wl,-R$(LOCALBASE)/lib -L$(JPEGLIBDIR) -ljpeg
 #else
 JPEGCONF = configure
 JPEGLIB = $(JPEGLIBDIR)/libjpeg.a
@@ -261,7 +262,7 @@
 DUSESMALLICONS = -DUSE_SMALL_ICONS
 #endif /* USESMALLICONS */
 
-PNGLIBS = -L$(PNGLIBDIR) -lpng -lz
+PNGLIBS = -Wl,-R$(LOCALBASE)/lib -L$(PNGLIBDIR) -lpng -lz
 
 #ifdef USEJPEG
 DUSEJPEG = -DUSE_JPEG
@@ -271,7 +272,7 @@
 
 #ifdef USEXPM
 DUSEXPM = -DUSE_XPM
-XPMLIBS = -L$(XPMLIBDIR) -lXpm
+XPMLIBS = -Wl,-R$(XPMLIBDIR) -L$(XPMLIBDIR) -lXpm
 READXPMS = f_readxpm.c
 READXPMO = f_readxpm.o
 #ifdef USEXPM_ICON
@@ -407,6 +408,8 @@
 install.rhtml::
 	@(cd Doc ; \
 	echo Copying pdf and html files to $(DESTDIR)$(XFIGDOCDIR) ; \
+	if [ -d $(DESTDIR)$(XFIGDOCDIR) ]; then set +x; \
+	   else (set -x; $(MKDIRHIER) $(DESTDIR)$(XFIGDOCDIR) ); fi ; \
 	$(INSTALL) -m 644 -c xfig_man.html $(DESTDIR)$(XFIGDOCDIR) ; \
 	$(INSTALL) -m 644 -c xfig_ref_en.pdf $(DESTDIR)$(XFIGDOCDIR) ; \
 	$(INSTALL) -m 644 -c xfig-howto.pdf $(DESTDIR)$(XFIGDOCDIR) ; \