pkgsrc/print/transfig/patches/patch-aa
is effc4b90a7 Workaround for my own PR 39379:
Don't -DUSE_INLINE - this creates "static inline", and the imake setup
at least on NetBSD-4/arm calls "cc -ansi", which, as being a c89 compiler,
refuses this c99 code (or so I've been told by C language lawyers).
(Maybe somebody can come up with a patch that does the right thing
wrt. this stuff for all our environments.)
2008-08-20 10:25:12 +00:00

119 lines
3.6 KiB
Text

$NetBSD: patch-aa,v 1.11 2008/08/20 10:25:12 is Exp $
--- fig2dev/Imakefile.orig Fri Oct 28 01:56:02 2005
+++ fig2dev/Imakefile Wed Nov 9 22:49:57 2005
@@ -34,7 +34,7 @@
XCOMM You should point XFIGLIBDIR to the same directory you did when you compiled
XCOMM and installed xfig.
-XFIGLIBDIR = /usr/local/lib/X11/xfig
+XFIGLIBDIR = $(PROJECTROOT)/lib/X11/xfig
XCOMM ******
XCOMM If your system doesn't have the strerror() function (has sys_errlist) then
@@ -53,7 +53,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 =
XCOMM ****************
XCOMM Change RGB if necessary, to point to your rgb.txt color database
@@ -76,7 +76,7 @@
#ifdef USEPNG
PNGLIBDIR = $(USRLIBDIR)
ZLIBDIR = $(USRLIBDIR)
-PNGINC = -I/usr/include/X11
+PNGINC = -I$(LOCALBASE)/include
#endif
XCOMM ****************
@@ -92,7 +92,19 @@
#ifdef USEXPM
XPMLIBDIR = $(USRLIBDIR)
-XPMINC = -I/usr/include/X11
+XPMINC = -I$(LOCALBASE)/include/X11
+#endif
+
+XCOMM ****************
+XCOMM Uncomment the #define for USEICONV if you want to use the iconv(3). If the
+XCOMM iconv(3) is in separate library (-liconv), define USELIBICONV too.
+
+#define USEICONV
+XCOMM #define USELIBICONV
+
+#ifdef USEICONV
+ICONVLIBDIR = $(USRLIBDIR)
+ICONVINC = -I$(LOCALBASE)/include
#endif
XCOMM ****************
@@ -141,8 +153,8 @@
#ifdef I18N
I18N_DEFS = -DI18N
-FIG2DEV_LIBDIR = /usr/local/lib/fig2dev
-I18N_DEV_DEFS = $(I18N_DEFS) -DFIG2DEV_LIBDIR=$(FIG2DEV_LIBDIR) -DFIG2DEV_LIBDIR_STR=\\\"$(FIG2DEV_LIBDIR)\\\"
+FIG2DEV_LIBDIR = $(PROJECTROOT)/lib/fig2dev
+I18N_DEV_DEFS = $(I18N_DEFS) -DFIG2DEV_LIBDIR=$(FIG2DEV_LIBDIR)
#endif /* I18N */
@@ -150,30 +162,37 @@
XCOMM *** You shouldn't have to change anything below this point ***
XCOMM **************************************************************
-DIR_DEFS= -DBITMAPDIR=\\\"$(DESTDIR)$(XFIGLIBDIR)/bitmaps\\\"
+DIR_DEFS= -DBITMAPDIR=\\\"$(DESTDIR)$(XFIGLIBDIR)/bitmaps\\\" -DFIG2DEV_LIBDIR_STR=\\\"$(FIG2DEV_LIBDIR)\\\"
#ifdef USEPNG
DUSEPNG = -DUSE_PNG
-PNGLIBS = -L$(PNGLIBDIR) -lpng -L$(ZLIBDIR) -lz
+PNGLIBS = -Wl,-R$(LOCALBASE)/lib -L$(PNGLIBDIR) -lpng -lz
#endif /* USEPNG */
#ifdef USEXPM
DUSEXPM = -DUSE_XPM
-XPMLIBS = -L$(XPMLIBDIR) -lXpm -lX11
+XPMLIBS = -Wl,-R$(XPMLIBDIR) -L$(XPMLIBDIR) -lXpm -lX11
#endif /* USEXPM */
+#ifdef USEICONV
+DUSEICONV = -DUSE_ICONV
+#ifdef USELIBICONV
+ICONVLIBS = -L$(ICONVLIBDIR) -liconv
+#endif /* USELIBICONV */
+#endif /* USEICONV */
+
#if defined(NOSTRSTR)
STRSTRC= strstr.c
STRSTRO= strstr.o
#endif /* defined(NOSTRSTR) */
DEFINES = $(NEED_STRERROR) $(HAVE_NO_STRCASECMP) $(HAVE_NO_STRNCASECMP) $(DDNFSS) $(USEINLINE) \
- $(I18N_DEFS) $(HAVE_SETMODE) $(DUSEPNG) $(DUSEXPM) $(PNGINC) $(XPMINC)
+ $(I18N_DEFS) $(HAVE_SETMODE) $(DUSEPNG) $(DUSEXPM) $(DUSEICONV) $(PNGINC) $(XPMINC) $(ICONVINC)
-IMAKE_DEFINES = $(DUSEPNG) $(DUSEXPM) $(I18N_DEV_DEFS)
+IMAKE_DEFINES = $(DUSEPNG) $(DUSEXPM) $(I18N_DEV_DEFS) $(DUSEICONV)
-DEVDEFINES = $(DUSEPNG) $(DUSEXPM) $(PNGINC) $(XPMINC) $(DDNFSS) $(DDA4) \
+DEVDEFINES = $(DUSEPNG) $(DUSEXPM) $(DUSEICONV) $(PNGINC) $(XPMINC) $(ICONVINC) $(DDNFSS) $(DDA4) \
$(DDLATEX2E_GRAPHICS) $(DDEPSFIG) $(DDIBMGEC) $(DDDVIPS) $(I18N_DEV_DEFS)
#define IHaveSubdirs
@@ -189,9 +208,9 @@
LOCAL_LIBRARIES = $(LIBTRANSFIG)
#if defined(NetBSDArchitecture) || defined(FreeBSDArchitecture)
-SYS_LIBRARIES = $(PNGLIBS) $(XPMLIBS) -lm -lcompat
+SYS_LIBRARIES = $(PNGLIBS) $(XPMLIBS) $(ICONVLIBS) -lm -lcompat
#else
-SYS_LIBRARIES = $(PNGLIBS) $(XPMLIBS) -lm
+SYS_LIBRARIES = $(PNGLIBS) $(XPMLIBS) $(ICONVLIBS) -lm
#endif
DEPLIBS = $(LIBTRANSFIG)