pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/emulators/hercules Patch out no-longer-supported gcc l...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/b63faa332064
branches:  trunk
changeset: 569733:b63faa332064
user:      dholland <dholland%pkgsrc.org@localhost>
date:      Sun Jan 17 08:00:47 2010 +0000

description:
Patch out no-longer-supported gcc language extensions, mostly lvalue
casts and lvalue ternary operators. Also make static/non-static decls
consistent. Fixes broken build. While here, add DESTDIR support.

diffstat:

 emulators/hercules/Makefile         |   12 +-
 emulators/hercules/distinfo         |   16 +-
 emulators/hercules/patches/patch-aa |   19 +-
 emulators/hercules/patches/patch-aj |   30 ++-
 emulators/hercules/patches/patch-an |   65 +++++-
 emulators/hercules/patches/patch-ap |  378 ++++++++++++++++++++++++++++++++++++
 emulators/hercules/patches/patch-aq |   15 +
 emulators/hercules/patches/patch-ar |   17 +
 emulators/hercules/patches/patch-as |  224 +++++++++++++++++++++
 emulators/hercules/patches/patch-at |   15 +
 emulators/hercules/patches/patch-au |   15 +
 emulators/hercules/patches/patch-av |   15 +
 emulators/hercules/patches/patch-aw |   15 +
 13 files changed, 813 insertions(+), 23 deletions(-)

diffs (truncated from 982 to 300 lines):

diff -r 7d4900fb39fc -r b63faa332064 emulators/hercules/Makefile
--- a/emulators/hercules/Makefile       Sun Jan 17 05:48:24 2010 +0000
+++ b/emulators/hercules/Makefile       Sun Jan 17 08:00:47 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.22 2007/09/02 11:54:08 joerg Exp $
+# $NetBSD: Makefile,v 1.23 2010/01/17 08:00:47 dholland Exp $
 
 DISTNAME=              hercules-2.11
 PKGREVISION=           4
@@ -9,6 +9,8 @@
 HOMEPAGE=              http://www.conmicro.cx/hercules/
 COMMENT=               S370 emulator
 
+PKG_DESTDIR_SUPPORT=   user-destdir
+
 DEPENDS+=              hercules-images-[0-9]*:../../emulators/hercules-images
 
 USE_TOOLS+=            gmake bash:run
@@ -19,10 +21,12 @@
 
 PTHREAD_OPTS+=         require
 
+INSTALLATION_DIRS+=    bin share/examples/hercules
+SPECIAL_PERMS+=                ${PREFIX}/bin/hercifc ${SETUID_ROOT_PERMS}
+
 pre-install:
-       ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/hercules
-       ${INSTALL_DATA} ${WRKSRC}/hercules.cnf ${PREFIX}/share/examples/hercules/
-       ${INSTALL_DATA} ${WRKSRC}/zzsa.cnf ${PREFIX}/share/examples/hercules/
+       ${INSTALL_DATA} ${WRKSRC}/hercules.cnf ${DESTDIR}${PREFIX}/share/examples/hercules/
+       ${INSTALL_DATA} ${WRKSRC}/zzsa.cnf ${DESTDIR}${PREFIX}/share/examples/hercules/
 
 .include "../../mk/pthread.buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r 7d4900fb39fc -r b63faa332064 emulators/hercules/distinfo
--- a/emulators/hercules/distinfo       Sun Jan 17 05:48:24 2010 +0000
+++ b/emulators/hercules/distinfo       Sun Jan 17 08:00:47 2010 +0000
@@ -1,9 +1,9 @@
-$NetBSD: distinfo,v 1.9 2005/12/09 10:46:43 joerg Exp $
+$NetBSD: distinfo,v 1.10 2010/01/17 08:00:47 dholland Exp $
 
 SHA1 (hercules-2.11.tar.gz) = ec84388e29cfd070055afa5fc11a33c896f2333a
 RMD160 (hercules-2.11.tar.gz) = 113647be0bd80ecc52331319902a1140a81b56aa
 Size (hercules-2.11.tar.gz) = 616554 bytes
-SHA1 (patch-aa) = 8e9aa1bf76fabf80af76dec0686892d20f2becba
+SHA1 (patch-aa) = 639ccc667a415fc427996be1972f7b0b67efca2c
 SHA1 (patch-ab) = ea2802d8752411e964ba150d3a54f64a40fc2e70
 SHA1 (patch-ac) = 454ac972ad54f19f139033abe8ccabdbb0c3f88b
 SHA1 (patch-ad) = 51fa93cb9fbc8382de1da52748dffa4ec2bcbf9c
@@ -11,9 +11,17 @@
 SHA1 (patch-af) = 759ad1ee2737ed8021b5a5fd956851677e99879a
 SHA1 (patch-ag) = 6dcec345641bdde0c617da10f57b6f2dd6b702ac
 SHA1 (patch-ah) = 06e03dc32c91ab5d3125a3b5489d15ef5c1e144c
-SHA1 (patch-aj) = b4beda52ced42d6d58f02b24c0eaf56109eab092
+SHA1 (patch-aj) = 8584ff1c318e72a52ae597457368114998a89cb6
 SHA1 (patch-ak) = 5b594849074ac410f2b8c93f2df0dca874b4533a
 SHA1 (patch-al) = 60d90ed9c1476b8fcf0a905a8316f3aec9108169
 SHA1 (patch-am) = 4626f39156ac2beccd9911f795aff6f9fe7b997b
-SHA1 (patch-an) = 3c36e9745316ef84caf60ba66b541b7cc3007377
+SHA1 (patch-an) = 207bff27722867a7a934863451152df2ba8aa2c6
 SHA1 (patch-ao) = 4d389c21d36ab44565f8e90f90dad8acff24e747
+SHA1 (patch-ap) = 7edbd0f8ec738cf1ed6be0d14f7f6882ba0d225b
+SHA1 (patch-aq) = 7b54514b1833da0875f98794e06dcd2e43f0ad4a
+SHA1 (patch-ar) = 37892292e02ba5be83e76bb2d4134bea875ca73a
+SHA1 (patch-as) = 281d81485186f4aa44938e4152050796d564629a
+SHA1 (patch-at) = 75cbca5dcf21df9af227ac49825986217f4491f8
+SHA1 (patch-au) = d1761b4845fdee6633e728d4cf86b8f00ce9b5d4
+SHA1 (patch-av) = ec670511d4aeef9bba08cd6edf16f64a624d10b9
+SHA1 (patch-aw) = cb0f64d81d4c20d237a108cc3baac12f3d4923b1
diff -r 7d4900fb39fc -r b63faa332064 emulators/hercules/patches/patch-aa
--- a/emulators/hercules/patches/patch-aa       Sun Jan 17 05:48:24 2010 +0000
+++ b/emulators/hercules/patches/patch-aa       Sun Jan 17 08:00:47 2010 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-aa,v 1.7 2005/12/09 10:46:43 joerg Exp $
+$NetBSD: patch-aa,v 1.8 2010/01/17 08:00:47 dholland Exp $
 
 --- makefile.orig      2001-02-11 03:21:58.000000000 +0000
 +++ makefile
@@ -7,7 +7,7 @@
  #   overridden in the make command line, as in "PREFIX=/foo make install"
  #   (the directory is only used when installing).
 -DESTDIR  = $(PREFIX)/usr/bin
-+DESTDIR  = $(PREFIX)/bin
++INSTALLDIR  = $(DESTDIR)$(PREFIX)/bin
  
  # Standard flags for all architectures
  CFLAGS         = -Wall -fomit-frame-pointer -DVERSION=$(VERSION) -DNO_BYTESWAP_H
@@ -57,3 +57,18 @@
  
  # Reverse the comments below to disable Compressed CKD Dasd support
  #CFLAGS  += -DNO_CCKD
+@@ -224,9 +226,9 @@ tar:       clean
+       (cd ..; tar cvzf hercules-$(VERSION).tar.gz hercules-$(VERSION))
+ 
+ install:  $(EXEFILES)
+-      cp $(EXEFILES) $(DESTDIR)
+-      cp dasdlist $(DESTDIR)
+-      chown root $(DESTDIR)/hercifc
+-      chmod 0751 $(DESTDIR)/hercifc
+-      chmod +s $(DESTDIR)/hercifc
++      cp $(EXEFILES) $(INSTALLDIR)
++      cp dasdlist $(INSTALLDIR)
++      #chown root $(INSTALLDIR)/hercifc
++      #chmod 0751 $(INSTALLDIR)/hercifc
++      #chmod +s $(INSTALLDIR)/hercifc
+       rm hercifc
diff -r 7d4900fb39fc -r b63faa332064 emulators/hercules/patches/patch-aj
--- a/emulators/hercules/patches/patch-aj       Sun Jan 17 05:48:24 2010 +0000
+++ b/emulators/hercules/patches/patch-aj       Sun Jan 17 08:00:47 2010 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-aj,v 1.1 2001/03/23 16:20:56 agc Exp $
+$NetBSD: patch-aj,v 1.2 2010/01/17 08:00:47 dholland Exp $
 
 Patch from Wofgang Solfrank:
 
@@ -7,9 +7,29 @@
 when stating that a 1 usec timeout would be stretched to the next
 system clock tick."
 
---- timer.c.orig       Thu Feb  8 20:02:41 2001
-+++ timer.c    Fri Mar 23 16:01:53 2001
-@@ -319,7 +319,7 @@
+Also, patch out no-longer-supported gcc language extensions.
+
+--- timer.c.orig       2001-02-08 20:02:41.000000000 +0000
++++ timer.c
+@@ -190,7 +190,7 @@ struct  timeval tv;                     
+ 
+             /* Decrement the CPU timer if the CPU is running */
+             if(regs->cpustate == CPUSTATE_STARTED && (S64)diff > 0)
+-                (S64)regs->ptimer -= (S64)diff;
++                regs->ptimer = (S64)regs->ptimer - (S64)diff;
+ 
+             /* Set interrupt flag if the CPU timer is negative */
+             if ((S64)regs->ptimer < 0)
+@@ -207,7 +207,7 @@ struct  timeval tv;                     
+             {
+                 /* Decrement the CPU timer if the CPU is running */
+                 if( (S64)diff > 0)
+-                    (S64)regs->guestregs->ptimer -= (S64)diff;
++                    regs->guestregs->ptimer = (S64)regs->guestregs->ptimer - (S64)diff;
+ 
+                 /* Set interrupt flag if the CPU timer is negative */
+                 if ((S64)regs->guestregs->ptimer < 0)
+@@ -319,7 +319,7 @@ struct  timeval tv;                     
                  /* Calculate instructions/millisecond for this CPU */
                  regs->mipsrate =
                      (regs->instcount - regs->prevcount) / msecctr;
@@ -18,7 +38,7 @@
  
                  /* Save the instruction counter */
                  regs->prevcount = regs->instcount;
-@@ -336,7 +336,7 @@
+@@ -336,7 +336,7 @@ struct  timeval tv;                     
          /* Sleep for one system clock tick by specifying a one-microsecond
             delay, which will get stretched out to the next clock tick */
          tv.tv_sec = 0;
diff -r 7d4900fb39fc -r b63faa332064 emulators/hercules/patches/patch-an
--- a/emulators/hercules/patches/patch-an       Sun Jan 17 05:48:24 2010 +0000
+++ b/emulators/hercules/patches/patch-an       Sun Jan 17 08:00:47 2010 +0000
@@ -1,10 +1,20 @@
-$NetBSD: patch-an,v 1.1 2001/05/11 11:17:39 dmcmahill Exp $
+$NetBSD: patch-an,v 1.2 2010/01/17 08:00:47 dholland Exp $
 
-regparm is only for i386
+ - regparm is only for i386
+ - patch out gcc language extensions that are no longer supported
 
---- features.h.orig    Thu Feb  1 17:56:32 2001
-+++ features.h Tue May  8 18:47:14 2001
-@@ -71,6 +71,11 @@
+--- features.h.orig    2001-02-01 22:56:32.000000000 +0000
++++ features.h
+@@ -48,6 +48,7 @@
+ #undef ET 
+ #undef RADR
+ #undef GR_A
++#undef GR_Ax
+ #undef VADR
+ #undef GREG
+ #undef CREG
+@@ -70,8 +71,13 @@
+ 
  #define ARCH_MODE     ARCH_370
  
 +#ifdef __i386__
@@ -16,7 +26,17 @@
 +#endif
  
  #define ARCH_DEP(_name) \
-@@ -130,6 +135,11 @@
+ s370_ ## _name
+@@ -104,6 +110,7 @@ s370_ ## _name
+ #define CR(_r)        CR_L(_r)
+ #define GR(_r)        GR_L(_r)
+ #define GR_A(_r, _regs) ((_regs)->GR_L((_r)))
++#define GR_Ax(_r, _regs, _val) (((_regs)->GR_L((_r))) = (_val))
+ #define MONCODE MC_L
+ #define TEA   EA_L
+ #define ET    ET_L
+@@ -129,8 +136,13 @@ s370_ ## _name
+ 
  #define ARCH_MODE     ARCH_390
  
 +#ifdef __i386__
@@ -28,7 +48,17 @@
 +#endif
  
  #define ARCH_DEP(_name) \
-@@ -212,6 +222,11 @@
+ s390_ ## _name
+@@ -163,6 +175,7 @@ s390_ ## _name
+ #define CR(_r)        CR_L(_r)
+ #define GR(_r)        GR_L(_r)
+ #define GR_A(_r, _regs) ((_regs)->GR_L((_r)))
++#define GR_Ax(_r, _regs, _val) (((_regs)->GR_L((_r))) = (_val))
+ #define MONCODE MC_L
+ #define TEA   EA_L
+ #define ET    ET_L
+@@ -211,8 +224,13 @@ s390_ ## _name
+ #define SSEVENT_BIT   ASCE_X
  #define SSGROUP_BIT   ASCE_G
  
 +#ifdef __i386__
@@ -40,7 +70,17 @@
 +#endif
  
  #define ARCH_DEP(_name) \
-@@ -268,6 +283,11 @@
+ z900_ ## _name
+@@ -223,6 +241,7 @@ z900_ ## _name
+ #define CR(_r)        CR_G(_r)
+ #define GR(_r)        GR_G(_r)
+ #define GR_A(_r, _regs) ((_regs)->psw.amode64 ? (_regs)->GR_G((_r)) : (_regs)->GR_L((_r)))
++#define GR_Ax(_r, _regs, _val) ((_regs)->psw.amode64 ? ((_regs)->GR_G((_r)) = (_val)) : ((_regs)->GR_L((_r)) = (_val)))
+ #define MONCODE MC_G
+ #define TEA   EA_G
+ #define ET    ET_G
+@@ -267,8 +286,13 @@ z900_ ## _name
+ #define SSEVENT_BIT   ASCE_X
  #define SSGROUP_BIT   ASCE_G
  
 +#ifdef __i386__
@@ -52,3 +92,12 @@
 +#endif
  
  #define ARCH_DEP(_name) \
+ z964_ ## _name
+@@ -279,6 +303,7 @@ z964_ ## _name
+ #define CR(_r)        CR_G(_r)
+ #define GR(_r)        GR_G(_r)
+ #define GR_A(_r, _regs) ((_regs)->psw.amode64 ? (_regs)->GR_G((_r)) : (_regs)->GR_L((_r)))
++#define GR_Ax(_r, _regs, _val) ((_regs)->psw.amode64 ? ((_regs)->GR_G((_r)) = (_val)) : ((_regs)->GR_L((_r)) = (_val)))
+ #define MONCODE MC_G
+ #define TEA   EA_G
+ #define ET    ET_G
diff -r 7d4900fb39fc -r b63faa332064 emulators/hercules/patches/patch-ap
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/hercules/patches/patch-ap       Sun Jan 17 08:00:47 2010 +0000
@@ -0,0 +1,378 @@
+$NetBSD: patch-ap,v 1.1 2010/01/17 08:00:47 dholland Exp $
+
+Patch out gcc language extensions that are no longer supported.
+
+--- general.c.orig     2001-02-08 20:02:40.000000000 +0000
++++ general.c
+@@ -96,7 +96,7 @@ U32     n;                              
+     RX(inst, execflag, regs, r1, b2, effective_addr2);
+ 
+     /* Load 2 bytes from operand address */
+-    (S32)n = (S16)ARCH_DEP(vfetch2) ( effective_addr2, b2, regs );
++    n = (S32)(S16)ARCH_DEP(vfetch2) ( effective_addr2, b2, regs );
+ 
+     /* Add signed operands and set condition code */
+     regs->psw.cc =
+@@ -124,7 +124,7 @@ U32     n;                              
+ 
+     RI(inst, execflag, regs, r1, opcd, n2);
+ 
+-    (S32)n = (S16)n2;
++    n = (S32)(S16)n2;
+ 
+     /* Add signed operands and set condition code */
+     regs->psw.cc =
+@@ -682,7 +682,7 @@ S32     i, j;                           
+     j = (r3 & 1) ? (S32)regs->GR_L(r3) : (S32)regs->GR_L(r3+1);
+ 
+     /* Add the increment value to the R1 register */
+-    (S32)regs->GR_L(r1) += i;
++    regs->GR_L(r1) = (S32)regs->GR_L(r1) + i;
+ 
+     /* Branch if result compares high */
+     if ( (S32)regs->GR_L(r1) > j )
+@@ -710,7 +710,7 @@ S32     i, j;                           
+     j = (r3 & 1) ? (S32)regs->GR_L(r3) : (S32)regs->GR_L(r3+1);
+ 
+     /* Add the increment value to the R1 register */
+-    (S32)regs->GR_L(r1) += i;
++    regs->GR_L(r1) = (S32)regs->GR_L(r1) + i;
+ 



Home | Main Index | Thread Index | Old Index