#1 Build patch for Cygwin

open
nobody
None
5
2003-06-28
2003-06-28
No

From Ullal Devappa Kini (wmbfqj AT vsnl.net):

I managed to build xpaint-2.7.0 under i686-pc-cygwin:
Cygwin version 1.3.22
XFree86 Version 4.2
gcc version 3.2
Windows 98 2nd Edition
Pentium III Processor.

Building with default xaw.
--------------------------

Edir Local.config as follows: ( only relevant lines )

------Local.config-----------
#ifndef XCOMM
#define XCOMM #
#endif

DESTDIR =
SHAREDIR = /usr/local/share/xpaint

PRINT_COMMAND = lpr -Plp
EDITOR = emacs -fn 9x15 -cr green -ms red -bg
lightyellow -fg black
POSTSCRIPT_VIEWER = gs.exe
EXTERN_VIEWER = /usr/local/xv/bin/xv.exe

TOOLFLAGS = -DBIGTOOLICONS

EXTRA_DEFINES = -DERRORBEEP -DFEATURE_FRACTAL
$(TOOLFLAGS)

#ifdef NetBSDArchitecture
ARCH_DEFINES = -DHAVE_PARAM_H
#endif

#ifdef OS2Architecture
ARCH_DEFINES = -DMISSING_STRCASECMP
#endif

CC = gcc
XCOMM CC = acc

#define HaveTIFF

#ifdef HaveTIFF
TIFF_LIB = -L/usr/local/lib -ltiff
TIFF_INCLUDE = -I/usr/local/include
#endif

#define HaveJPEG

#ifdef HaveJPEG
JPEG_LIB = -L/usr/local/lib -ljpeg
JPEG_INCLUDE = -I/usr/local/include
#endif

#define HavePNG

#ifdef HavePNG
PNG_LIB = -L/usr/local/lib -lpng -lz
PNG_INCLUDE = -I/usr/local/lib
#endif

XPM_LIB = -L/usr/X11R6/lib -lXpm

XPM_INCLUDE = -I/usr/X11R6/include/X11

DEPENDFLAGS = -I./bitmaps

BINDIR = /usr/local/bin
MANDIR = /usr/local/man/man1
#undef ManSuffix
#define ManSuffix 1

XCOMM CDEBUGFLAGS =
#define PassCDebugFlags
CDEBUGFLAGS='$(CDEBUGFLAGS)'

#if defined(NetBSDArchitecture) ||
defined(BSD386Architecture)
ARCH_DEFINES = -DHAVE_PARAM_H
TIFF_INCLUDE = -I/usr/local/include
TIFF_LIB = -L/usr/local/lib -ltiff
JPEG_INCLUDE = -I/usr/local/include
JPEG_LIB = -L/usr/local/lib -ljpeg
XPM_INCLUDE = -I/usr/X11R6/include/X11
#endif

#if defined(FreeBSDArchitecture)
ARCH_DEFINES = -DHAVE_PARAM_H
TIFF_INCLUDE = -I/usr/local/include/tiff34
TIFF_LIB = -L/usr/local/lib -ltiff34
JPEG_INCLUDE = -I/usr/local/include
JPEG_LIB = -L/usr/local/lib -ljpeg
XPM_INCLUDE = -I/usr/X11R6/include/X11
#endif

-------End of Local.config-------

xmkmf -a

Complaint that stddef.h and stdarg.h are not being found
but they are there
in /usr/lib/gcc-lib/i686-pc-cygwin/3.2/include. For the
moment, copy these
into /usr/include.

xmkmf -a
make
make install
make install.man

startxwin.sh # Start XFree86
xpaint

Building with xaw95.
-------------------
make clean
xmkmf -a
make xaw95static

Error. Because the libraries are not taken into account
properly:

gcc -o xpaint.exe -O2 -fno-strength-reduce -Wall
-Wpointer-arith \ -L/usr/X11R6/lib chroma.o color.o colorEdit.o dialog.o
fatBitsEdit.o \ fileName.o fontSelect.o grab.o graphic.o hash.o help.o
image.o \ imageComp.o iprocess.o main.o menu.o misc.o operation.
o palette.o \ pattern.o print.o protocol.o readRC.o size.o snapshot.o
text.o \ texture.o typeConvert.o arcOp.o blobOp.o boxOp.o
brushOp.o circleOp.o \ fillOp.o fontOp.o lineOp.o pencilOp.o polyOp.o splineOp.o
selectOp.o \ sprayOp.o dynPenOp.o Colormap.o Paint.o PaintEvent.o
PaintRegion.o \ PaintUndo.o -Lrw -lrw -L/usr/X11R6/lib -lXpm
-L/usr/local/lib -ltiff \ -L/usr/local/lib -ljpeg -L/usr/local/lib -lpng -lz -ldl
-rdynamic \ ./libXaw95.a -lm -lX11 -lXt -lXmu -Wl,
--enable-auto-import

From the earlier experience, use a script:

gcc -o xpaint.exe -O2 -fno-strength-reduce -Wall
-Wpointer-arith \ -L/usr/X11R6/lib chroma.o color.o colorEdit.o dialog.o
fatBitsEdit.o \ fileName.o fontSelect.o grab.o graphic.o hash.o help.o
image.o \ imageComp.o iprocess.o main.o menu.o misc.o operation.
o palette.o \ pattern.o print.o protocol.o readRC.o size.o snapshot.o
text.o \ texture.o typeConvert.o arcOp.o blobOp.o boxOp.o
brushOp.o circleOp.o \ fillOp.o fontOp.o lineOp.o pencilOp.o polyOp.o splineOp.o
selectOp.o \ sprayOp.o dynPenOp.o Colormap.o Paint.o PaintEvent.o
PaintRegion.o \ PaintUndo.o -Lrw -lrw -L/usr/X11R6/lib -lXpm
-L/usr/local/lib -ltiff \ -L/usr/local/lib -ljpeg -L/usr/local/lib -lpng -lz -ldl
-rdynamic \ ./xaw95-1.1.4/libXaw95.a -lXmu -lXt -lSM -lICE -lXpm
-lXext -lX11 -lm \ -Wl,--enable-auto-import

This compiles xpaint.exe.

make install

Error as xpaint.exe recompiled. Do

Make -i install

This installs everything except xpaint.exe. Rebuild xpaint.
exe manually
as above and copy it to the BINDIR. Now,

startxwin.sh
xpaint

Discussion


Log in to post a comment.