Add support for NetBSD powerpc.

Requires splitting up PLIST as x86 is the only platform that supports the
win32 loader and the debugger libraries.

Not extensively tested but appears to run basic 16 bit windows apps
This commit is contained in:
jmc 2003-03-08 03:15:49 +00:00
parent bcf598b1a6
commit 0fcdab00b6
10 changed files with 102 additions and 19 deletions

View file

@ -1,9 +1,12 @@
===========================================================================
$NetBSD: MESSAGE,v 1.2 2001/11/11 06:17:27 hubertf Exp $
$NetBSD: MESSAGE,v 1.3 2003/03/08 03:15:49 jmc Exp $
TWIN gotchas:
* Only tested on NetBSD i386 and requires USER_LDT kernel option
* Platforms other than NetBSD i386 can only run 16 bit binaries and
this hasn't been extensively tested.
* Some w32 functions are implemented but not prototyped in the
TWIN headers. Many functions are not implemented and the TWIN
headers are out of date. devel/w32api may be a useful reference

View file

@ -1,8 +1,9 @@
# $NetBSD: Makefile,v 1.4 2002/12/24 18:55:38 wiz Exp $
# $NetBSD: Makefile,v 1.5 2003/03/08 03:15:49 jmc Exp $
#
DISTNAME= twin-src-3.1.14
PKGNAME= twin-3.1.14
PKGREVISION= 1
CATEGORIES= emulators
MASTER_SITES= ftp://ftp.willows.com/pub/twin/
@ -16,6 +17,8 @@ USE_X11= yes
WRKSRC= ${WRKDIR}/twin
ALL_TARGET= depend world
AUTOCONF_REQD= 2.13
CONFIGURE_ARGS= --enable-debugger
PLIST_SRC= ${WRKDIR}/PLIST
pre-configure:
cd ${WRKSRC} && ${AUTORECONF} --force
@ -23,6 +26,12 @@ pre-configure:
pre-build:
${CP} ${WRKSRC}/windows/Execfreebsd.c ${WRKSRC}/windows/Execnetbsd.c
pre-install:
@${CP} ${PKGDIR}/PLIST ${PLIST_SRC}
.if exists(${PKGDIR}/PLIST.${MACHINE_ARCH})
@${CAT} ${PKGDIR}/PLIST.${MACHINE_ARCH} >> ${PLIST_SRC}
.endif
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/twin
${INSTALL_DATA} ${WRKSRC}/documentation/* ${PREFIX}/share/doc/twin/

View file

@ -1,4 +1,4 @@
@comment $NetBSD: PLIST,v 1.1 2001/10/31 23:53:58 zuntum Exp $
@comment $NetBSD: PLIST,v 1.2 2003/03/08 03:15:49 jmc Exp $
bin/xwin32
bin/rc
man/man1/rc.1
@ -23,9 +23,6 @@ lib/libadvapi32.so
lib/libmsvcrt.so
lib/libolesvr.so
lib/libolecli.so
lib/libreadline.a
lib/libdebug.so
lib/libpe32.so
lib/libmmsystem.so
lib/libtwin32.so
include/LZExpand.h

View file

@ -0,0 +1,3 @@
lib/libreadline.a
lib/libdebug.so
lib/libpe32.so

View file

@ -1,11 +1,14 @@
$NetBSD: distinfo,v 1.1.1.1 2001/05/15 09:46:37 agc Exp $
$NetBSD: distinfo,v 1.2 2003/03/08 03:15:50 jmc Exp $
SHA1 (twin-src-3.1.14.tar.gz) = b1652f07adcc2c98948a4458480b2d8436cc893f
Size (twin-src-3.1.14.tar.gz) = 2216218 bytes
SHA1 (patch-aa) = da04ff7d0e7b2644b6bed81817189dcd9192dae1
SHA1 (patch-ab) = f54fb80ba0c45e11e446aa652596768304b1f580
SHA1 (patch-aa) = 7fe45414b89610b25015f814983c59003c35018d
SHA1 (patch-ab) = 7e7b4d3da2afb119a4222a953ae44251b0c253f2
SHA1 (patch-ac) = ead087b78674b30c076f132d71c3d372c77f0e1f
SHA1 (patch-ad) = baf4144bf251e5eef3613fc7b2a4cc9168fa7292
SHA1 (patch-ae) = 284da616e3e55716b2eb1faa0e86c16c3643d230
SHA1 (patch-af) = 818f91cce6010145756221b90bd3461557c53d9a
SHA1 (patch-ag) = 2f6f51e9f837920c7d0db11686071a6de2d66887
SHA1 (patch-ah) = 82deae0df4dd9f695b6a402fe9be8f4b9a9bc4f4
SHA1 (patch-ai) = 30c18f5770b839fbae7143ce2e0b435eb90cfc76
SHA1 (patch-aj) = 904103343dec345480b7566f9fe980fb027faade

View file

@ -1,12 +1,12 @@
$NetBSD: patch-aa,v 1.1.1.1 2001/05/15 09:46:37 agc Exp $
$NetBSD: patch-aa,v 1.2 2003/03/08 03:15:51 jmc Exp $
--- configure.in.orig Sun Jan 14 00:23:50 2001
+++ configure.in Sun May 13 09:37:19 2001
--- configure.in.orig Sun Jan 14 08:23:50 2001
+++ configure.in Fri Apr 5 22:31:14 2002
@@ -147,6 +147,10 @@
TARGET=freebsd
;;
+ i*86-*-netbsd* )
+ *netbsd* )
+ TARGET=netbsd
+ ;;
+
@ -19,7 +19,7 @@ $NetBSD: patch-aa,v 1.1.1.1 2001/05/15 09:46:37 agc Exp $
TWIN_CFLAGS=-g
+ ;;
+
+ i*86-*-netbsd* )
+ *netbsd* )
+ LIBTWIN_LDFLAGS="$LDFLAGS $LIBTWIN_LDFLAGS"
+ DLL_LDFLAGS="$LDFLAGS $DLL_LDFLAGS"
;;

View file

@ -1,18 +1,41 @@
$NetBSD: patch-ab,v 1.1.1.1 2001/05/15 09:46:37 agc Exp $
$NetBSD: patch-ab,v 1.2 2003/03/08 03:15:51 jmc Exp $
--- osdll/Makefile.in.orig Sun May 13 00:21:55 2001
+++ osdll/Makefile.in Sun May 13 00:23:18 2001
@@ -18,6 +18,7 @@
--- osdll/Makefile.in.orig Sun Aug 22 05:55:20 1999
+++ osdll/Makefile.in Fri Apr 5 20:42:06 2002
@@ -8,16 +8,22 @@
THREAD_alpha_linux = DrvThreads_nothreads.c
THREAD_alpha_freebsd = DrvThreads_nothreads.c
+THREAD_alpha_netbsd = DrvThreads_generic.c
THREAD_alpha_osf = DrvThreads_nothreads.c
+THREAD_arm_netbsd = DrvThreads_generic.c
THREAD_arm_linux = DrvThreads_nothreads.c
#THREAD_hppa_hpux = DrvThreads_generic.c FIXME: temporary fix.
THREAD_hppa_hpux = DrvThreads_nothreads.c
+THREAD_mips_netbsd = DrvThreads_generic.c
THREAD_mips_irix = DrvThreads_generic.c
THREAD_ppc_aix = DrvThreads_nothreads.c
THREAD_ppc_linux = DrvThreads_generic.c
+THREAD_ppc_netbsd = DrvThreads_generic.c
THREAD_sparc_solaris = DrvThreads_generic.c
+THREAD_sparc_netbsd = DrvThreads_generic.c
THREAD_sparc_sunos = DrvThreads_generic.c
THREAD_X386_freebsd = DrvThreads_X386.c
+THREAD_X386_netbsd = DrvThreads_X386.c
THREAD_X386_linux = DrvThreads_X386.c
THREAD_X386_sco = DrvThreads_X386.c
THREAD_X386_solaris = DrvThreads_X386.c
@@ -35,6 +36,7 @@
@@ -30,11 +36,15 @@
#SYSTEM_hppa_hpux = DrvSystem_hppa.s FIXME: bad assembly code.
SYSTEM_hppa_hpux =
SYSTEM_mips_irix = DrvSystem_mips.s
+SYSTEM_mips_netbsd = DrvSystem_mips.s
SYSTEM_ppc_aix = DrvSystem_ppc.s
SYSTEM_ppc_linux = DrvSystem_ppc-gcc.s
+SYSTEM_ppc_netbsd = DrvSystem_ppc-gcc.s
SYSTEM_sparc_solaris = DrvSystem_sparc.s
SYSTEM_sparc_sunos = DrvSystem_sparc.s
+SYSTEM_sparc_netbsd = DrvSystem_sparc.s
SYSTEM_X386_freebsd =
+SYSTEM_X386_netbsd =
SYSTEM_X386_linux =

View file

@ -0,0 +1,19 @@
$NetBSD: patch-ah,v 1.1 2003/03/08 03:15:51 jmc Exp $
--- windows/WSprintf.c.orig Fri Apr 5 20:42:48 2002
+++ windows/WSprintf.c Fri Apr 5 20:43:47 2002
@@ -56,6 +56,14 @@
int WINAPI
wvsprintf(LPSTR buf, LPCSTR fmt, void *args)
{
+#ifdef __NetBSD__
+#ifdef __powerpc__
+ va_list *ap = args;
+
+ vsprintf(buf,fmt,*ap);
+#endif
+#else
vsprintf(buf,fmt,args);
+#endif
return strlen(buf);
}

View file

@ -0,0 +1,13 @@
$NetBSD: patch-ai,v 1.1 2003/03/08 03:15:52 jmc Exp $
--- osdll/DrvSystem_ppc-gcc.s.orig Fri Apr 5 21:29:15 2002
+++ osdll/DrvSystem_ppc-gcc.s Fri Apr 5 21:29:27 2002
@@ -61,7 +61,7 @@
mr SP,r3
# gcc/gas breaks on this
# bl .TWIN_InitStackEnd{PR}
- bl TWIN_InitStackEnd
+ bl TWIN_InitStackEnd@plt
nop
nop
nop

View file

@ -0,0 +1,13 @@
$NetBSD: patch-aj,v 1.1 2003/03/08 03:15:52 jmc Exp $
--- windows/Makefile.in.orig Fri Apr 5 21:33:13 2002
+++ windows/Makefile.in Fri Apr 5 20:46:17 2002
@@ -17,7 +17,7 @@
target = $(LIBTWIN)
-LIBTWIN_LDFLAGS = @LIBTWIN_LDFLAGS@
+LIBTWIN_LDFLAGS = @LIBTWIN_LDFLAGS@ ${LDFLAGS}
############################################################################
#