From 08ba2bc63c472ddb815b5a980f3a9ccb72d2e079 Mon Sep 17 00:00:00 2001 From: Alejandro Pulver Date: Sat, 17 Feb 2007 03:31:07 +0000 Subject: This is Native XDS-x86 for Linux, it is setup to produce native FreeBSD binaries. WWW: http://www.excelsior-usa.com/ PR: ports/108498 Submitted by: coumarin at gmail.com --- lang/xds/Makefile | 62 +++++ lang/xds/distinfo | 3 + lang/xds/files/patch-C__X2C.c | 11 + lang/xds/files/patch-C__xosBalls.c | 14 + lang/xds/files/patch-C__xosTime.c | 11 + lang/xds/files/patch-apisyms-x86 | 9 + lang/xds/files/patch-bin__xc.tem | 17 ++ lang/xds/files/patch-bin__xcwork | 100 +++++++ lang/xds/files/patch-include__xrnMman.h | 14 + lang/xds/files/patch-lib__x86__lib.mkf | 15 ++ lang/xds/files/patch-samples__buildx86 | 20 ++ lang/xds/files/pkg-message.in | 10 + lang/xds/files/plist | 333 +++++++++++++++++++++++ lang/xds/files/plist-doc | 121 +++++++++ lang/xds/pkg-descr | 4 + lang/xds/pkg-plist | 457 ++++++++++++++++++++++++++++++++ 16 files changed, 1201 insertions(+) create mode 100644 lang/xds/Makefile create mode 100644 lang/xds/distinfo create mode 100644 lang/xds/files/patch-C__X2C.c create mode 100644 lang/xds/files/patch-C__xosBalls.c create mode 100644 lang/xds/files/patch-C__xosTime.c create mode 100644 lang/xds/files/patch-apisyms-x86 create mode 100644 lang/xds/files/patch-bin__xc.tem create mode 100644 lang/xds/files/patch-bin__xcwork create mode 100644 lang/xds/files/patch-include__xrnMman.h create mode 100644 lang/xds/files/patch-lib__x86__lib.mkf create mode 100644 lang/xds/files/patch-samples__buildx86 create mode 100644 lang/xds/files/pkg-message.in create mode 100644 lang/xds/files/plist create mode 100644 lang/xds/files/plist-doc create mode 100644 lang/xds/pkg-descr create mode 100644 lang/xds/pkg-plist (limited to 'lang/xds') diff --git a/lang/xds/Makefile b/lang/xds/Makefile new file mode 100644 index 000000000000..7933bb29007b --- /dev/null +++ b/lang/xds/Makefile @@ -0,0 +1,62 @@ +# New ports collection makefile for: xds +# Date created: 29 January 2007 +# Whom: coumarin@gmail.com +# +# $FreeBSD$ +# + +PORTNAME= xds +PORTVERSION= 2.51 +CATEGORIES= lang linux devel +MASTER_SITES= http://www.excelsior-usa.com/download/xds25x/ +DISTNAME= ${PORTNAME}-x86-${PORTVERSION:S/.//}-enduser-linux +EXTRACT_SUFX= .tgz + +MAINTAINER= coumarin@gmail.com +COMMENT= Excelsior Oberon-2/Modula-2 compiler, set up to produce native FreeBSD binaries + +RESTRICTED= Excelsior forbids any redistribution + +ONLY_FOR_ARCHS= i386 +ONLY_FOR_ARCHS_REASON= uses assembly code +USE_LINUX= yes +USE_GMAKE= yes +WRKSRC= ${WRKDIR}/${PORTNAME} +BUILD_WRKSRC= ${WRKSRC}/lib/x86 + +MAKEFILE= lib.mkf +ALL_TARGET= # + +SUB_FILES= pkg-message + +pre-patch: + @${BRANDELF} -t Linux ${WRKSRC}/bin/xc ${WRKSRC}/bin/h2d + +post-patch: + @${REINPLACE_CMD} -e "s|%%XDSDIR%%|${PREFIX}/${PORTNAME}|g" \ + ${WRKSRC}/bin/xcwork + +post-build: + cd ${WRKSRC} && ${SETENV} PATH=${WRKSRC}/bin ./apisyms-x86 + +do-install: + @${FIND} ${WRKSRC} -type d -exec ${CHMOD} 755 {} \; + @${FIND} ${WRKSRC} -type f -exec ${CHMOD} 644 {} \; + @cd ${WRKSRC} && ${CHMOD} 755 bin/xc bin/h2d bin/xcwork samples/buildx86 + @cd ${WRKDIR} && ${CAT} ${FILESDIR}/plist | \ + ${CPIO} -pdu -R ${BINOWN}:${BINGRP} --quiet ${PREFIX} +.if !defined(NOPORTDOCS) + @cd ${WRKDIR} && ${CAT} ${FILESDIR}/plist-doc | \ + ${CPIO} -pdu -R ${BINOWN}:${BINGRP} --quiet ${PREFIX} +.endif +.for f in xc xcwork + @${LN} -s ${PREFIX}/${PORTNAME}/bin/${f} ${PREFIX}/bin +.endfor + @${LN} -s ${PREFIX}/${PORTNAME}/bin/h2d ${PREFIX}/bin/${PORTNAME}-h2d + +post-install: + @${ECHO_CMD} + @${CAT} ${PKGMESSAGE} + @${ECHO_CMD} + +.include diff --git a/lang/xds/distinfo b/lang/xds/distinfo new file mode 100644 index 000000000000..1ba93e76d06d --- /dev/null +++ b/lang/xds/distinfo @@ -0,0 +1,3 @@ +MD5 (xds-x86-251-enduser-linux.tgz) = 5fc1da840228bb2958869d786f610746 +SHA256 (xds-x86-251-enduser-linux.tgz) = 5d38a634e031b4144e3ff1dc7548f3a2da4cdcebf11b26f8c2eb73cee54f68b9 +SIZE (xds-x86-251-enduser-linux.tgz) = 3838457 diff --git a/lang/xds/files/patch-C__X2C.c b/lang/xds/files/patch-C__X2C.c new file mode 100644 index 000000000000..6afc60bcfd8e --- /dev/null +++ b/lang/xds/files/patch-C__X2C.c @@ -0,0 +1,11 @@ +--- C/X2C.c.orig 2001-09-25 07:56:48.000000000 +0000 ++++ C/X2C.c 2007-01-24 15:12:15.000000000 +0000 +@@ -700,7 +700,7 @@ + iprocs[3]=iproc3; + iprocs_cnt=4; + +-#if defined(__linux__) && defined(__i386__) && defined(X2C_native_library) ++#if (defined(__linux__) || defined (__FreeBSD__) || defined(__DragonFly__)) && defined(__i386__) && defined(X2C_native_library) + stk_up = 0; + ss_offs = -1; + sp_offs = (int) &((*(X2C_jmp_buf*)(0))[0].esp) / 4; diff --git a/lang/xds/files/patch-C__xosBalls.c b/lang/xds/files/patch-C__xosBalls.c new file mode 100644 index 000000000000..332c3b600cdc --- /dev/null +++ b/lang/xds/files/patch-C__xosBalls.c @@ -0,0 +1,14 @@ +--- C/xosBalls.c.orig 2005-05-10 08:18:13.000000000 +0000 ++++ C/xosBalls.c 2007-01-24 15:12:15.000000000 +0000 +@@ -17,7 +17,11 @@ + extern X2C_ADDRESS X2C_initBalls(X2C_CARD32 nBlocks, X2C_CARD32 blockSize) + { + bSize = blockSize; ++#if defined(__FreeBSD__) || defined(__DragonFly__) ++ heapBase = mmap(0, nBlocks*bSize, 0ul, 0x1000|0x2, -1l, 0ul); ++#else + heapBase = mmap(0, nBlocks*bSize, 0ul, 34ul, -1l, 0ul); ++#endif + if (heapBase==(X2C_ADDRESS)-1u) heapBase = 0; + return heapBase; + } /* end X2C_initBalls() */ diff --git a/lang/xds/files/patch-C__xosTime.c b/lang/xds/files/patch-C__xosTime.c new file mode 100644 index 000000000000..281d51d61a92 --- /dev/null +++ b/lang/xds/files/patch-C__xosTime.c @@ -0,0 +1,11 @@ +--- C/xosTime.c.orig 2003-04-10 09:05:09.000000000 +0000 ++++ C/xosTime.c 2007-01-24 15:12:15.000000000 +0000 +@@ -78,7 +78,7 @@ + tzset(); + #endif + +-#if defined(__FreeBSD__) || \ ++#if (defined(__FreeBSD__) || defined(__DragonFly__)) || \ + (defined(__ultrix) && !defined(SYSTEM_FIVE)) || \ + defined(DJGPP) + res->zone = p->tm_gmtoff / 60; diff --git a/lang/xds/files/patch-apisyms-x86 b/lang/xds/files/patch-apisyms-x86 new file mode 100644 index 000000000000..9f0d418dc743 --- /dev/null +++ b/lang/xds/files/patch-apisyms-x86 @@ -0,0 +1,9 @@ +--- apisyms-x86.orig Sun Jan 28 11:31:08 2007 ++++ apisyms-x86 Sun Jan 28 11:31:14 2007 +@@ -3,6 +3,3 @@ + SYM_PLACE=sym/x86 + + xc =p =a def/POSIX/posix.prj -sym_place:=$SYM_PLACE -decor=rt +-xc =p X11.prj -sym_place:=$SYM_PLACE -decor=rt +-xc =p Xm.prj -sym_place:=$SYM_PLACE -decor=rt +-xc =p XmP.prj -sym_place:=$SYM_PLACE -decor=rt diff --git a/lang/xds/files/patch-bin__xc.tem b/lang/xds/files/patch-bin__xc.tem new file mode 100644 index 000000000000..7ad49d0023c3 --- /dev/null +++ b/lang/xds/files/patch-bin__xc.tem @@ -0,0 +1,17 @@ +--- bin/xc.tem.orig 2003-02-18 07:41:00.000000000 +0000 ++++ bin/xc.tem 2007-01-24 15:21:55.000000000 +0000 +@@ -1,4 +1,4 @@ +-!set link = "make -f %s", mkfname#mkfext ++!set link = "gmake -f %s", mkfname#mkfext + ! "M\t= %s\n",mkfname#>mkfext + + !if defined topspeed then +@@ -58,7 +58,7 @@ + ! "CC\t= cc\n" + !new ccomp = $$(CC) $$(CDEFS) $$(CF) -o %s %s + !elsif (env_target="linux") or (env_target="x86linux") then +- ! "CDEFS\t= -D_unix -D_linux -DX2C_no_spawn -DX2C_strcmp\n" ++ ! "CDEFS\t= -D_unix -DX2C_no_spawn -DX2C_strcmp\n" + ! "CF\t= -O2 -g -I$(INCL) -c\n" + ! "CC\t= gcc\n" + !if defined linuxaout_support and linuxaout_support then diff --git a/lang/xds/files/patch-bin__xcwork b/lang/xds/files/patch-bin__xcwork new file mode 100644 index 000000000000..5361992a0e07 --- /dev/null +++ b/lang/xds/files/patch-bin__xcwork @@ -0,0 +1,100 @@ +--- bin/xcwork.orig Tue Nov 16 02:46:28 1999 ++++ bin/xcwork Sun Jan 28 22:36:27 2007 +@@ -1,34 +1,5 @@ + #!/bin/sh + +-DoCreate() { +- echo "creating directory structure..." +- for DIR in def obj src sym; do +- if ! test -d $DIR +- then +- if ! mkdir $DIR +- then +- echo "Error making $DIR subdirectory" +- exit 1 +- fi +- fi +- done +- echo "creating appropriate redirection file..." +- cat >xc.red <xc.red <