On Wed 2008.04.16 at 17:10 +0200, syl wrote:
> Hello ports.
>
> I've update the nasm package to version 2.02. I've
> update the Makefile and the patch-doc_Makefile.in
> I remove the two .c patches because they are corrected
> in the 2.02 version. I also add a new patch to remove
> three warning on signed unsigned comparaison.
>
> You can find the diff a this url :
>
> http://rathaxes.org/~syl/open/nasm.patch
>
> I ve try on current with a patch -E < nasm.patch in the
> /usr/ports/devel/nasm directory.
send a cvs diff next time (-uNp)
> Please be kind it's my first patch :)
hi - thanks for the first shot.
here's a cleaned up patch - i did things in a slightly different way;
plus also added rdoff stuff.
cheers,
okan
Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/nasm/Makefile,v
retrieving revision 1.22
diff -u -p -r1.22 Makefile
--- Makefile 4 Jan 2008 17:48:34 -0000 1.22
+++ Makefile 21 Apr 2008 21:22:54 -0000
@@ -4,8 +4,7 @@ COMMENT= general-purpose multi-platform
ONLY_FOR_ARCHS= i386
-DISTNAME= nasm-0.98.38
-PKGNAME= ${DISTNAME}p0
+DISTNAME= nasm-2.02
CATEGORIES= devel lang
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=nasm/}
@@ -19,17 +18,14 @@ PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
WANTLIB= c
-SEPARATE_BUILD= concurrent
-CONFIGURE_STYLE= gnu
+CONFIGURE_STYLE= gnu dest
-NO_REGRESS= Yes
+ALL_TARGET= everything
+INSTALL_TARGET= install_everything
-DESTDIRNAME= INSTALLROOT
+NO_REGRESS= Yes
post-install:
- ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/nasm
- ${INSTALL_MAN} ${WRKSRC}/doc/*.doc ${PREFIX}/share/doc/nasm
- ${INSTALL_DATA} ${WRKBUILD}/doc/html/*.html ${PREFIX}/share/doc/nasm
- ${INSTALL_DATA} ${WRKBUILD}/doc/info/* $(PREFIX)/info
+ ${INSTALL_DATA} ${WRKSRC}/doc/*.doc ${PREFIX}/share/doc/nasm
.include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/devel/nasm/distinfo,v
retrieving revision 1.5
diff -u -p -r1.5 distinfo
--- distinfo 5 Apr 2007 15:37:56 -0000 1.5
+++ distinfo 21 Apr 2008 21:22:54 -0000
@@ -1,5 +1,5 @@
-MD5 (nasm-0.98.38.tar.gz) = nB35FWBlHL+qc1lf5rq7hQ==
-RMD160 (nasm-0.98.38.tar.gz) = FZBw2bw5CYxWAHxQsMCY/uJbif8=
-SHA1 (nasm-0.98.38.tar.gz) = y1i6pGkA6M5JD9x8LK2jXCzEnOA=
-SHA256 (nasm-0.98.38.tar.gz) = Aqxbav8s20SoVo2dDdyq5DavVpCic3Rwt9NTQhdCA9Q=
-SIZE (nasm-0.98.38.tar.gz) = 641727
+MD5 (nasm-2.02.tar.gz) = JTq8SPB20+KTcP1PVSJwlA==
+RMD160 (nasm-2.02.tar.gz) = NOim+sZLJduyw1QDtpx1IUb0mME=
+SHA1 (nasm-2.02.tar.gz) = KyQHbuvr+F+ASNp42uHugBxPppM=
+SHA256 (nasm-2.02.tar.gz) = B9/+/3B+AIjTyVCYa71IrmHWU05HciTFVcoV/AfCgr4=
+SIZE (nasm-2.02.tar.gz) = 902568
Index: patches/patch-Makefile.in
===================================================================
RCS file: patches/patch-Makefile.in
diff -N patches/patch-Makefile.in
--- patches/patch-Makefile.in 21 Nov 2002 17:38:39 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
-$OpenBSD: patch-Makefile.in,v 1.2 2002/11/21 17:38:39 naddy Exp $
---- Makefile.in.orig Fri Sep 13 02:25:44 2002
-+++ Makefile.in Thu Nov 14 00:04:09 2002
-@@ -58,6 +58,7 @@ NDISASM = ndisasm.$(O) disasm.$(O) sync.
-
- all: nasm$(X) ndisasm$(X) nasm.man ndisasm.man
- cd rdoff && $(MAKE) all
-+ cd doc; $(MAKE) all
-
- nasm$(X): $(NASM)
- $(CC) $(LDFLAGS) -o nasm$(X) $(NASM) $(LIBS)
Index: patches/patch-doc_Makefile.in
===================================================================
RCS file: /cvs/ports/devel/nasm/patches/patch-doc_Makefile.in,v
retrieving revision 1.3
diff -u -p -r1.3 patch-doc_Makefile.in
--- patches/patch-doc_Makefile.in 27 Jan 2005 02:09:52 -0000 1.3
+++ patches/patch-doc_Makefile.in 21 Apr 2008 21:22:54 -0000
@@ -1,25 +1,38 @@
$OpenBSD: patch-doc_Makefile.in,v 1.3 2005/01/27 02:09:52 naddy Exp $
---- doc/Makefile.in.orig Sun May 19 00:17:28 2002
-+++ doc/Makefile.in Thu Jan 27 02:41:55 2005
-@@ -22,7 +22,7 @@ TEXI2DVI = texi2dvi
- PS2PDF = ps2pdf -dOptimize=true # Part of GhostScript
+--- doc/Makefile.in.orig Tue Feb 19 14:08:57 2008
++++ doc/Makefile.in Mon Apr 21 15:47:03 2008
+@@ -8,7 +8,7 @@ prefix = @prefix@
+ exec_prefix = @exec_prefix@
+ bindir = @bindir@
+ mandir = @mandir@
+-docdir = $(prefix)/doc/nasm
++docdir = $(prefix)/share/doc/nasm
+ infodir = @infodir@
+ datarootdir = @datarootdir@
+
+@@ -22,11 +22,8 @@ TEXI2DVI = texi2dvi
+ PS2PDF = ps2pdf # Part of GhostScript
SRCS = nasmdoc.src
-OUT = nasm.info nasmdoc.ps nasmdoc.pdf
+OUT = nasm.info # nasmdoc.ps nasmdoc.pdf # don't build ps and pdf
+-# exports
+-export srcdir
+-export PERL
+
all: $(OUT)
-@@ -31,7 +31,7 @@ os2: nasm.inf
+@@ -38,7 +35,7 @@ inslist.src: inslist.pl ../insns.dat
# Consider html, txt and ps output a side effect
- nasmdoc.dip: nasmdoc.src rdsrc.pl
+ nasmdoc.dip: nasmdoc.src rdsrc.pl inslist.src
mkdir -p html
- $(PERL) $(srcdir)/rdsrc.pl < $<
+ $(PERL) $(srcdir)/rdsrc.pl < $(srcdir)/nasmdoc.src
mv -f *.html html
nasmdoc.texi: nasmdoc.dip
-@@ -48,7 +48,7 @@ nasm.info: info/nasm.info
+@@ -55,7 +52,7 @@ nasm.info: info/nasm.info
info/nasm.info: nasmdoc.texi
mkdir -p info
@@ -28,7 +41,7 @@ $OpenBSD: patch-doc_Makefile.in,v 1.3 20
mv -f *.info *.info-* info
# DVI output from texinfo (optional)
-@@ -57,10 +57,10 @@ nasmdoc.dvi: nasmdoc.texi
+@@ -64,13 +61,12 @@ nasmdoc.dvi: nasmdoc.texi
# Rules for building an OS/2 book
nasmdoc.ipf: nasmdoc.texi
@@ -40,4 +53,13 @@ $OpenBSD: patch-doc_Makefile.in,v 1.3 20
+ ipfc -i -s $? $@
clean:
- -rm -f *.rtf *.hpj *.texi *.gid *.ipf *.dip
+- -rm -f *.rtf *.hpj *.texi *.gid *.ipf *.dip
+ -rm -f *.aux *.cp *.fn *.ky *.pg *.log *.toc *.tp *.vr
+
+ spotless: clean
+@@ -82,4 +78,4 @@ install: all
+ $(INSTALL_DATA) info/* $(INSTALLROOT)$(infodir)
+ mkdir -p $(INSTALLROOT)$(docdir)/html
+ $(INSTALL_DATA) html/* $(INSTALLROOT)$(docdir)/html
+- $(INSTALL_DATA) nasmdoc.ps nasmdoc.pdf nasmdoc.txt
$(INSTALLROOT)$(docdir)
++ $(INSTALL_DATA) nasmdoc.txt $(INSTALLROOT)$(docdir)
Index: patches/patch-output_outieee_c
===================================================================
RCS file: patches/patch-output_outieee_c
diff -N patches/patch-output_outieee_c
--- patches/patch-output_outieee_c 19 May 2005 13:04:17 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-output_outieee_c,v 1.1 2005/05/19 13:04:17 robert Exp $
---- output/outieee.c.orig Thu Sep 12 04:23:54 2002
-+++ output/outieee.c Thu May 19 14:52:19 2005
-@@ -1096,7 +1096,7 @@ static void ieee_putascii(char *format,
- va_list ap;
-
- va_start(ap, format);
-- vsprintf(buffer, format, ap);
-+ vsnprintf(buffer, sizeof(buffer), format, ap);
- l = strlen(buffer);
- for (i=0; i < l; i++)
- if ((buffer[i] & 0xff) > 31)
Index: patches/patch-preproc_c
===================================================================
RCS file: patches/patch-preproc_c
diff -N patches/patch-preproc_c
--- patches/patch-preproc_c 19 May 2005 13:04:17 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-preproc_c,v 1.1 2005/05/19 13:04:17 robert Exp $
---- preproc.c.orig Mon Sep 8 00:46:26 2003
-+++ preproc.c Thu May 19 14:52:19 2005
-@@ -4067,7 +4067,7 @@ error(int severity, const char *fmt, ...
- return;
-
- va_start(arg, fmt);
-- vsprintf(buff, fmt, arg);
-+ vsnprintf(buff, sizeof(buff), fmt, arg);
- va_end(arg);
-
- if (istk && istk->mstk && istk->mstk->name)
Index: patches/patch-rdf2bin.c
===================================================================
RCS file: patches/patch-rdf2bin.c
diff -N patches/patch-rdf2bin.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-rdf2bin.c 21 Apr 2008 21:22:54 -0000
@@ -0,0 +1,15 @@
+--- rdoff/rdf2bin.c.orig Tue Feb 19 14:08:57 2008
++++ rdoff/rdf2bin.c Mon Apr 21 15:18:26 2008
+@@ -119,9 +119,9 @@ int main(int argc, char **argv)
+ return 1;
+ }
+
+- if (fwrite(m->t, 1, m->f.seg[0].length, of) != m->f.seg[0].length ||
+- fwrite(padding, 1, codepad, of) != codepad ||
+- fwrite(m->d, 1, m->f.seg[1].length, of) != m->f.seg[1].length) {
++ if (fwrite(m->t, 1, m->f.seg[0].length, of) != (unsigned
int)m->f.seg[0].length ||
++ fwrite(padding, 1, codepad, of) != (unsigned int)codepad ||
++ fwrite(m->d, 1, m->f.seg[1].length, of) != (unsigned
int)m->f.seg[1].length) {
+ fprintf(stderr, "rdf2bin: error writing to %s\n", *argv);
+ return 1;
+ }
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/devel/nasm/pkg/PLIST,v
retrieving revision 1.8
diff -u -p -r1.8 PLIST
--- pkg/PLIST 9 Aug 2004 11:09:10 -0000 1.8
+++ pkg/PLIST 21 Apr 2008 21:22:54 -0000
@@ -1,22 +1,38 @@
@comment $OpenBSD: PLIST,v 1.8 2004/08/09 11:09:10 espie Exp $
+bin/ldrdf
bin/nasm
bin/ndisasm
+bin/rdf2bin
+bin/rdf2com
+bin/rdf2ihx
+bin/rdfdump
+bin/rdflib
+bin/rdx
@info info/nasm.info
[EMAIL PROTECTED] man/man1/ldrdf.1
@man man/man1/nasm.1
@man man/man1/ndisasm.1
[EMAIL PROTECTED] man/man1/rdf2bin.1
[EMAIL PROTECTED] man/man1/rdf2com.1
[EMAIL PROTECTED] man/man1/rdfdump.1
[EMAIL PROTECTED] man/man1/rdflib.1
[EMAIL PROTECTED] man/man1/rdx.1
share/doc/nasm/
+share/doc/nasm/html/
+share/doc/nasm/html/nasmdo10.html
+share/doc/nasm/html/nasmdo11.html
+share/doc/nasm/html/nasmdoc0.html
+share/doc/nasm/html/nasmdoc1.html
+share/doc/nasm/html/nasmdoc2.html
+share/doc/nasm/html/nasmdoc3.html
+share/doc/nasm/html/nasmdoc4.html
+share/doc/nasm/html/nasmdoc5.html
+share/doc/nasm/html/nasmdoc6.html
+share/doc/nasm/html/nasmdoc7.html
+share/doc/nasm/html/nasmdoc8.html
+share/doc/nasm/html/nasmdoc9.html
+share/doc/nasm/html/nasmdoca.html
+share/doc/nasm/html/nasmdocb.html
+share/doc/nasm/html/nasmdoci.html
share/doc/nasm/internal.doc
-share/doc/nasm/nasmdo10.html
-share/doc/nasm/nasmdoc0.html
-share/doc/nasm/nasmdoc1.html
-share/doc/nasm/nasmdoc2.html
-share/doc/nasm/nasmdoc3.html
-share/doc/nasm/nasmdoc4.html
-share/doc/nasm/nasmdoc5.html
-share/doc/nasm/nasmdoc6.html
-share/doc/nasm/nasmdoc7.html
-share/doc/nasm/nasmdoc8.html
-share/doc/nasm/nasmdoc9.html
-share/doc/nasm/nasmdoca.html
-share/doc/nasm/nasmdocb.html
-share/doc/nasm/nasmdoci.html
+share/doc/nasm/nasmdoc.txt