1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-23 00:43:28 +00:00

Initial import of intel2gas version 1.2.

Converts Intel assembly language (nasm) to AT&T syntax (gas).

PR:		11672
Submitted by:	G. Adam Stanislav <adam@whizkidtech.net>
This commit is contained in:
Steve Price 1999-06-11 00:13:26 +00:00
parent 440181f76f
commit 5532507d34
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=19416
9 changed files with 317 additions and 0 deletions

64
lang/intel2gas/Makefile Normal file
View File

@ -0,0 +1,64 @@
# New ports collection makefile for: intel2gas
# Version required: 1.2
# Date created: 12 May 1999
# Whom: G. Adam Stanislav
#
# $Id:$
#
DISTNAME= intel2gas-1.2
CATEGORIES= lang
MASTER_SITES= http://hermes.terminal.at/intel2gas/
MAINTAINER= adam@whizkidtech.net
GNU_CONFIGURE= yes
I2G= +-.01.list +-.02.list address.syntax data.01.list data.02.list \
data.04.list discard.01.list main.syntax mathnum.syntax num.syntax \
op.01.list op.02.list op.04.list op.08.list op.10.list op.20.list \
reg.01.list reg.02.list reg.04.list reg.08.list reg.10.list \
reg.20.list section.01.list size.01.list size.02.list size.04.list \
size.08.list
G2I= addr.syntax address.syntax data.01.list data.02.list data.04.list \
main.syntax mathnum.syntax num.syntax section.01.list size.01.list \
size.02.list size.04.list
I2G2I= +-.01.list +-.02.list op.01.list op.02.list op.04.list op.08.list \
op.10.list op.20.list reg.01.list reg.02.list reg.04.list \
reg.08.list reg.10.list reg.20.list
DOCFILES= BUGS CHANGES DATAFILES DATAFILES.html README README.html TODO
pre-patch:
${CP} ${WRKSRC}/README ${WRKSRC}/README.html
${CP} ${WRKSRC}/DATAFILES ${WRKSRC}/DATAFILES.html
pre-install:
${MKDIR} ${PREFIX}/share/intel2gas
${MKDIR} ${PREFIX}/share/intel2gas/i2g
${MKDIR} ${PREFIX}/share/intel2gas/g2i
${INSTALL_PROGRAM} ${WRKSRC}/intel2gas ${PREFIX}/bin
do-install:
.for f in ${I2G}
${INSTALL_DATA} ${WRKSRC}/i2g/${f} ${PREFIX}/share/intel2gas/i2g
.endfor
.for f in ${G2I}
${INSTALL_DATA} ${WRKSRC}/g2i/${f} ${PREFIX}/share/intel2gas/g2i
.endfor
.for f in ${I2G2I}
ln -fs ${PREFIX}/share/intel2gas/i2g/${f} \
${PREFIX}/share/intel2gas/g2i/${f}
.endfor
post-install:
.if !defined(NOPORTDOCS)
${MKDIR} ${PREFIX}/share/doc/intel2gas
.for f in ${DOCFILES}
${INSTALL_MAN} ${WRKSRC}/${f} ${PREFIX}/share/doc/intel2gas
.endfor
.endif
.include <bsd.port.mk>

1
lang/intel2gas/distinfo Normal file
View File

@ -0,0 +1 @@
MD5 (intel2gas-1.2.tar.gz) = 4346c1dd19daac94221c0d984e2b1c67

View File

@ -0,0 +1,39 @@
--- Makefile.in.orig Tue May 4 11:56:19 1999
+++ Makefile.in Wed May 12 10:03:30 1999
@@ -9,11 +9,6 @@
CXXFLAGS = @CXXFLAGS@
OFILES = strhandle.o loaddata.o intel2gas.o
HFILES = strhandle.h loaddata.h intel2gas.h
-DATADIRS = i2g g2i
-
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-data_prefix = $(prefix)/share/intel2gas
all: warning intel2gas
@@ -30,24 +25,3 @@
.cc.o:
$(CXX) -c $(CXXFLAGS) $<
-clean:
- rm -f *.o *~ core
-
-distclean: clean
- rm -f intel2gas config.status config.log config.cache Makefile i2gconf.h
-
-
-install:
- install -m 755 -d $(data_prefix)
- for datadir in $(DATADIRS); do \
- install -m 755 -d $(data_prefix)/$$datadir; \
- install -m 0644 $$datadir/* $(data_prefix)/$$datadir; \
- done
- install -m 755 intel2gas $(exec_prefix)/bin
-
-uninstall:
- for datadir in $(DATADIRS); do \
- rm -rf $(data_prefix)/$$datadir; \
- done
- rm -f $(exec_prefix)/bin/intel2gas
- rmdir $(data_prefix)

View File

@ -0,0 +1,41 @@
--- README.html.orig Wed May 5 11:23:12 1999
+++ README.html Wed May 12 11:03:47 1999
@@ -1,13 +1,12 @@
+<html><head><title>
intel2gas 1.2 (c)1999 Mikko Tiihonen (mikko.tiihonen@hut.fi)
-
+</title></head><body bgcolor="#FFFFFF"><pre>
This program converts assembler source from intel (NASM), to AT&T (gas)
syntax. It is FREE SOFTWARE under the terms of the GNU General Public
License (GPL), enclosed in the file 'COPYING'.
-----------------------------------------------------------------------------
-
+</pre><h2>
1. What's this?
----------------
-
+</h2><pre>
Intel2gas is a small text parser that can convert assembler source
written in intel syntax to at&t syntax. And nowadays more often also
the other way.
@@ -15,15 +14,14 @@
The program does minimal error checking and does not understand the
text it's converting. It's just tries to find matches from its syntax
database.
-
-
+</pre><h2>
2. Bug reports:
----------------
+</h2><pre>
You are encouraged to send any bug reports, suggestions and comments to
the author.
-
-
+</pre><h2>
3. Thanks:
-----------
+</h2><pre>
brn for creating a need for this tool
G. Adam Stanislav for helpping with the commandline
+</pre></body></html>

View File

@ -0,0 +1,78 @@
--- DATAFILES.html.orig Wed May 5 11:24:59 1999
+++ DATAFILES.html Wed May 12 11:18:51 1999
@@ -1,9 +1,10 @@
+<html><head><title>Intel2gas data files</title></head><body bgcolor="#FFFFFF"><pre>
This document tries to explain how the syntax matching works. You propably
don't want to know, but it's became so complex that I keep forgetting how
it works.
-
+</pre><h1>
1. How it Works(tm)
---------------------
+</h1><pre>
Before parsing the program reads all .syntax files for parsing
information, and .list files for list of registers etc. There
is no limit for number of files, or syntaxes in them.
@@ -16,7 +17,7 @@
Parsing rules:
- Normal characters are matched exactly.
- Space in parse description matches any amount of space in input line.
-- `text´ inside '<>' is considered a special tag and parsed accordingly,
+- `text´ inside '&lt;&gt;' is considered a special tag and parsed accordingly,
after successfull match it's value is stored into a variable of the
same name (`text´).
@@ -25,12 +26,10 @@
Output rules:
- Normal characters (including space) are copied to output.
-- `text´ inside '<>' is replaced with value of a variable called `text´.
-
-
-
+- `text´ inside '&lt;&gt;' is replaced with value of a variable called `text´.
+</pre><h1>
2. Files
---------
+</h1><pre>
.syntax file syntax:
-
parse rule
@@ -44,12 +43,10 @@
val1
val2
...
-
-
-
+</pre><h1>
4. Tags
--------
-Format of a tag is following: <tagnameN:hh>c, where
+</h1><pre>
+Format of a tag is following: &lt;tagnameN:hh&gt;c, where
- tagname is the name of the tag and the variable where the result is stored.
- N an optional number (0-9) to store the result in different variable.
- hh an optional hex bitmask (00-ff) for list matches, defaults to ff.
@@ -66,12 +63,11 @@
* the output of amatching rule is stored in the variable.
Special tags:
-<nl> output a new line character
-<cm> matches a '#'
-
-
+&lt;nl&gt; output a new line character
+&lt;cm&gt; matches a '#'
+</pre><h1>
5. Current set of files
------------------------
+</h1><pre>
Syntax files:
main.syntax the basic syntax file
num.syntax converts hex,dec,oct,bin numbers
@@ -85,3 +81,4 @@
size.nn.list byte,dword... memory sizes, sets 'm' to match the proper b/w/l
data.nn.list dd, db... sizes used in variable creation
discard.nn.list short... discarded
+</pre></body></html>

View File

@ -0,0 +1,11 @@
--- intel2gas.cc.orig Wed May 5 10:53:34 1999
+++ intel2gas.cc Wed May 12 12:26:47 1999
@@ -428,7 +428,7 @@
static void printHelp(char const *infostr)
{
fprintf(stderr,"%s\n"\
- "usage: intel2gas [options] [infile] [-o outfile]\n"\
+ "usage: intel2gas [options] [-o outfile] [infile]\n"\
"where options include:\n"\
"\t-h\t\tthis help\n"\
"\t-i\t\tconvert from intel to at&t format (default)\n"\

View File

@ -0,0 +1 @@
Converts Intel assembly language (nasm) to AT&T syntax (gas).

17
lang/intel2gas/pkg-descr Normal file
View File

@ -0,0 +1,17 @@
intel2gas 1.2 (c)1999 Mikko Tiihonen (mikko.tiihonen@hut.fi)
This program converts assembler source from intel (NASM), to AT&T (gas)
syntax. It is FREE SOFTWARE under the terms of the GNU General Public
License (GPL), enclosed in the file 'COPYING'.
----------------------------------------------------------------------------
Intel2gas is a small text parser that can convert assembler source
written in intel syntax to at&t syntax. And nowadays more often also
the other way.
The program does minimal error checking and does not understand the
text it's converting. It just tries to find matches from its syntax
database.
You are encouraged to send any bug reports, suggestions and comments to
the author.
FreeBSD port by G. Adam Stanislav <adam@whizkidtech.net>

65
lang/intel2gas/pkg-plist Normal file
View File

@ -0,0 +1,65 @@
bin/intel2gas
share/doc/intel2gas/BUGS
share/doc/intel2gas/CHANGES
share/doc/intel2gas/DATAFILES
share/doc/intel2gas/DATAFILES.html
share/doc/intel2gas/README
share/doc/intel2gas/README.html
share/doc/intel2gas/TODO
share/intel2gas/g2i/+-.01.list
share/intel2gas/g2i/+-.02.list
share/intel2gas/g2i/addr.syntax
share/intel2gas/g2i/address.syntax
share/intel2gas/g2i/data.01.list
share/intel2gas/g2i/data.02.list
share/intel2gas/g2i/data.04.list
share/intel2gas/g2i/main.syntax
share/intel2gas/g2i/mathnum.syntax
share/intel2gas/g2i/num.syntax
share/intel2gas/g2i/op.01.list
share/intel2gas/g2i/op.02.list
share/intel2gas/g2i/op.04.list
share/intel2gas/g2i/op.08.list
share/intel2gas/g2i/op.10.list
share/intel2gas/g2i/op.20.list
share/intel2gas/g2i/reg.01.list
share/intel2gas/g2i/reg.02.list
share/intel2gas/g2i/reg.04.list
share/intel2gas/g2i/reg.08.list
share/intel2gas/g2i/reg.10.list
share/intel2gas/g2i/reg.20.list
share/intel2gas/g2i/section.01.list
share/intel2gas/g2i/size.01.list
share/intel2gas/g2i/size.02.list
share/intel2gas/g2i/size.04.list
share/intel2gas/i2g/+-.01.list
share/intel2gas/i2g/+-.02.list
share/intel2gas/i2g/address.syntax
share/intel2gas/i2g/data.01.list
share/intel2gas/i2g/data.02.list
share/intel2gas/i2g/data.04.list
share/intel2gas/i2g/discard.01.list
share/intel2gas/i2g/main.syntax
share/intel2gas/i2g/mathnum.syntax
share/intel2gas/i2g/num.syntax
share/intel2gas/i2g/op.01.list
share/intel2gas/i2g/op.02.list
share/intel2gas/i2g/op.04.list
share/intel2gas/i2g/op.08.list
share/intel2gas/i2g/op.10.list
share/intel2gas/i2g/op.20.list
share/intel2gas/i2g/reg.01.list
share/intel2gas/i2g/reg.02.list
share/intel2gas/i2g/reg.04.list
share/intel2gas/i2g/reg.08.list
share/intel2gas/i2g/reg.10.list
share/intel2gas/i2g/reg.20.list
share/intel2gas/i2g/section.01.list
share/intel2gas/i2g/size.01.list
share/intel2gas/i2g/size.02.list
share/intel2gas/i2g/size.04.list
share/intel2gas/i2g/size.08.list
@dirrm share/doc/intel2gas
@dirrm share/intel2gas/g2i
@dirrm share/intel2gas/i2g
@dirrm share/intel2gas