From owner-freebsd-ports@FreeBSD.ORG Sat Feb 11 17:15:07 2006 Return-Path: X-Original-To: freebsd-ports@www.freebsd.org Delivered-To: freebsd-ports@www.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0BB5616A420 for ; Sat, 11 Feb 2006 17:15:07 +0000 (GMT) (envelope-from ggajic@afrodita.rcub.bg.ac.yu) Received: from afrodita.rcub.bg.ac.yu (afrodita.rcub.bg.ac.yu [147.91.1.120]) by mx1.FreeBSD.org (Postfix) with ESMTP id 51BD543D45 for ; Sat, 11 Feb 2006 17:15:06 +0000 (GMT) (envelope-from ggajic@afrodita.rcub.bg.ac.yu) Received: from afrodita.rcub.bg.ac.yu (localhost.localdomain [127.0.0.1]) by afrodita.rcub.bg.ac.yu (8.13.4/8.13.4) with ESMTP id k1BHEul7032269 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 11 Feb 2006 18:14:56 +0100 Received: from localhost (ggajic@localhost) by afrodita.rcub.bg.ac.yu (8.13.4/8.13.4/Submit) with ESMTP id k1BHEtwa032264 for ; Sat, 11 Feb 2006 18:14:56 +0100 Date: Sat, 11 Feb 2006 18:14:55 +0100 (CET) From: Goran Gajic To: freebsd-ports@www.freebsd.org Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-RCUB-MailScanner-Information: Please contact the RCUB if you have problem with mail X-RCUB-MailScanner: Found to be clean X-RCUB-MailScanner-From: ggajic@afrodita.rcub.bg.ac.yu Cc: Subject: Microwindows (nano-x) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Feb 2006 17:15:07 -0000 Hi, Microwindows (www.microwindows.org) are nice mini X system. They are not part of /usr/ports system but they can be usefull for some small FreeBSD distributions like picoBSD or nanoBSD. In order to cleanly compile (using src/Config/config.freebsd) and run on FreeBSD (6.0 and 7.0-CURRENT) this is what has to be changed to original microwindows-src-0.91 (I have contacted author of microwindows too) - but if someone needs it here it is. Regards, gg. diff -ur microwindows-0.91/src/demos/nanox/Makefile microwindows-0.91/src/demos/nanox/Makefile --- microwindows-0.91/src/demos/nanox/Makefile Thu Sep 25 04:15:01 2003 +++ microwindows-0.91/src/demos/nanox/Makefile Fri Feb 10 21:19:14 2006 @@ -26,6 +26,10 @@ LDFLAGS += LIBM = -lm +ifeq ($(ARCH),FREEBSD-X86) +LIBUTIL = -lutil +endif + ############################# targets section ################################ ifeq ($(NANOX), Y) @@ -70,7 +74,6 @@ $(MW_DIR_BIN)/nsaver \ $(MW_DIR_BIN)/nxcal \ $(MW_DIR_BIN)/grabdemo - ifneq ($(ARCH),CYGWIN) TARGETS += \ $(MW_DIR_BIN)/nxterm @@ -139,6 +142,12 @@ $(MW_DIR_BIN)/grabdemo \ $(MW_DIR_BIN)/nsaver +ifeq ($(ARCH),FREEBSD-X86) +# These demos need -lutil +NANOX_DEMOS_WITH_LIBUTIL_LINK := \ + $(MW_DIR_BIN)/nxterm +endif + # These demos use a hardcoded link line. NANOX_DEMOS_WITH_NONSTANDARD_LINK := \ $(NANOX_DEMOS_WITH_LIBM_LINK) \ @@ -160,6 +169,13 @@ @echo "Linking $(patsubst $(MW_DIR_BIN)/%,%,$@) ..." $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ $(LD_NANOXCLIENTLIBS) $(LIBM) +ifeq ($(ARCH), FREEBSD-X86) +# Link rule used for demos with libutil. +$(NANOX_DEMOS_WITH_LIBUTIL_LINK): $(MW_DIR_BIN)/%: $(MW_DIR_OBJ)/demos/nanox/%.o $(NANOXCLIENTLIBS) $(CONFIG) + @echo "Linking $(patsubst $(MW_DIR_BIN)/%,%,$@) ..." + $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ $(LD_NANOXCLIENTLIBS) $(LIBUTIL) +endif + $(MW_DIR_BIN)/snap_jpg: $(MW_DIR_OBJ)/demos/nanox/snap_jpg.o $(NANOXCLIENTLIBS) $(CONFIG) @echo "Linking $(patsubst $(MW_DIR_BIN)/%,%,$@) ..." $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ $(LD_NANOXCLIENTLIBS) $(LIBJPEG) diff -ur microwindows-0.91/src/demos/nxscribble/li_recognizer.c microwindows-0.91/src/demos/nxscribble/li_recognizer.c --- microwindows-0.91/src/demos/nxscribble/li_recognizer.c Sun Nov 16 23:34:12 2003 +++ microwindows-0.91/src/demos/nxscribble/li_recognizer.c Fri Feb 10 20:27:39 2006 @@ -938,7 +938,7 @@ ************************************************** */ /*#include */ -#if defined(__ECOS) || defined(__CYGWIN__) +#if defined(__ECOS) || defined(__CYGWIN__) || defined (__FreeBSD__) #define MAXINT 0x7FFFFFFF #else #include diff -ur microwindows-0.91/src/demos/tuxchess/Makefile microwindows-0.91/src/demos/tuxchess/Makefile --- microwindows-0.91/src/demos/tuxchess/Makefile Thu Sep 25 04:15:01 2003 +++ microwindows-0.91/src/demos/tuxchess/Makefile Fri Feb 10 20:44:09 2006 @@ -58,13 +58,19 @@ ######################## Tools targets section ############################### +ifeq ($(ARCH), FREEBSD-X86) +LCOMPAT= -lcompat +else +LCOMPAT = +endif + ifeq ($(SHAREDLIBS), Y) $(MW_DIR_BIN)/tuxchess: $(OBJS) $(NANOXCLIENTLIBS) $(CONFIG) @echo "Linking $(patsubst $(MW_DIR_BIN)/%,%,$@) ..." - $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $@ $(CCNANOXCLIENTLIBS) + $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $@ $(CCNANOXCLIENTLIBS) $(LCOMPAT) else $(MW_DIR_BIN)/tuxchess: $(OBJS) $(NANOXCLIENTLIBS) $(CONFIG) @echo "Linking $(patsubst $(MW_DIR_BIN)/%,%,$@) ..." - $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $@ $(NANOXCLIENTLIBS) + $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $@ $(NANOXCLIENTLIBS) $(LCOMPAT) endif diff -ur microwindows-0.91/src/demos/tuxchess/main.c microwindows-0.91/src/demos/tuxchess/main.c --- microwindows-0.91/src/demos/tuxchess/main.c Tue May 6 08:18:38 2003 +++ microwindows-0.91/src/demos/tuxchess/main.c Fri Feb 10 20:34:07 2006 @@ -7,6 +7,9 @@ #include #include #include +#if defined(__FreeBSD__) +#include +#endif #include #include "defs.h" #include "data.h" diff -ur microwindows-0.91/src/drivers/fb.c microwindows-0.91/src/drivers/fb.c --- microwindows-0.91/src/drivers/fb.c Fri Apr 11 08:32:06 2003 +++ microwindows-0.91/src/drivers/fb.c Fri Feb 10 19:59:11 2006 @@ -29,7 +29,9 @@ extern SUBDRIVER fblinear16; extern SUBDRIVER fblinear24; extern SUBDRIVER fblinear32; +#if !defined(__FreeBSD__) extern SUBDRIVER fblinear32alpha; +#endif #if FBVGA extern SUBDRIVER vgaplan4; extern SUBDRIVER memplan4; @@ -66,8 +68,10 @@ break; case 32: if (psd->pixtype == MWPF_TRUECOLOR8888) { +#if ! defined (__FreeBSD__) driver = &fblinear32alpha; } else { +#endif driver = &fblinear32; } break; diff -ur microwindows-0.91/src/drivers/mou_fbsd.c microwindows-0.91/src/drivers/mou_fbsd.c --- microwindows-0.91/src/drivers/mou_fbsd.c Thu Jun 21 08:32:41 2001 +++ microwindows-0.91/src/drivers/mou_fbsd.c Fri Feb 10 19:49:14 2006 @@ -5,8 +5,7 @@ #include #include -#include -#include +#include /* #include */ diff -ur microwindows-0.91/src/drivers/scr_fbsd.c microwindows-0.91/src/drivers/scr_fbsd.c --- microwindows-0.91/src/drivers/scr_fbsd.c Thu Jun 21 08:32:41 2001 +++ microwindows-0.91/src/drivers/scr_fbsd.c Fri Feb 10 19:48:40 2006 @@ -8,7 +8,9 @@ */ #include -#include +#include +#include +#include #include #include #include diff -ur microwindows-0.91/src/include/swap.h microwindows-0.91/src/include/swap.h --- microwindows-0.91/src/include/swap.h Sat Feb 28 18:07:36 2004 +++ microwindows-0.91/src/include/swap.h Fri Feb 10 19:46:46 2006 @@ -76,24 +76,6 @@ #elif defined(__FreeBSD__) # include -# if __BYTE_ORDER == __BIG_ENDIAN -# if !MW_CPU_BIG_ENDIAN -# error MW_CPU_BIG_ENDIAN and your OS disagree about your CPUs byte-order. Did you forget to set BIGENDIAN in the config file? -# endif -# ifndef __byte_swap_word -/* Either this isn't GCC or the implementation changed. */ -# warning __byte_swap_word not defined in endian.h on FreeBSD. -# else -# undef wswap -# undef dwswap -# define wswap(x) __byte_swap_word(x) -# define dwswap(x) __byte_swap_long(x) -# endif /* ifndef __byte_swap_word*/ -# else -# if MW_CPU_BIG_ENDIAN -# error MW_CPU_BIG_ENDIAN and your OS disagree about your CPUs byte-order. Did you accidentally set BIGENDIAN in the config file? -# endif -# endif /* !__BYTE_ORDER == __BIG_ENDIAN*/ /* ********************************************************************* */ /* ECOS */ Only in microwindows-0.91/src/lib: -lcompat diff -ur microwindows-0.91/src/mwin/winlib/caret.c microwindows-0.91/src/mwin/winlib/caret.c --- microwindows-0.91/src/mwin/winlib/caret.c Thu Nov 15 23:49:26 2001 +++ microwindows-0.91/src/mwin/winlib/caret.c Fri Feb 10 19:57:13 2006 @@ -8,7 +8,7 @@ #include #include #include -#ifndef __ECOS +#if ! (defined (__FreeBSD__) || defined (__ECOS)) #include #endif #include "windows.h"