NetBSD Problem Report #44894

From rhialto@falu.nl  Fri Apr 22 14:26:41 2011
Return-Path: <rhialto@falu.nl>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id F04C463C1FC
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 22 Apr 2011 14:26:40 +0000 (UTC)
Message-Id: <201104221426.p3MEQVA0007732@radl.falu.nl>
Date: Fri, 22 Apr 2011 16:26:31 +0200 (CEST)
From: rhialto@falu.nl
Reply-To: rhialto@falu.nl
To: gnats-bugs@gnats.NetBSD.org
Cc: rhialto@falu.nl
Subject: update emulators/hercules to 3.07
X-Send-Pr-Version: 3.95

>Number:         44894
>Category:       pkg
>Synopsis:       update emulators/hercules to 3.07
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Apr 22 14:30:00 +0000 2011
>Closed-Date:    Mon May 02 04:52:22 +0000 2011
>Last-Modified:  Fri May 06 13:15:02 +0000 2011
>Originator:     Rhialto
>Release:        NetBSD 5.1
>Organization:

>Environment:


System: NetBSD radl.falu.nl 5.1 NetBSD 5.1 (Radl-s_Pervasion_of_the_Incorrect_Chord) #0: Mon Jan 24 20:25:13 CET 2011 root@vargaz.falu.nl:/usr/src/sys/arch/amd64/compile/RADL5.1 amd64
Architecture: x86_64
Machine: amd64
>Description:
	emulators/hercules is outdated. Here is a diff for Makefile,
	plus a shar file with replacement patch-?? files.

	I tried to carry over the patches related to tape handling,
	but I can't test it.

	TUN or TAP related code probably doesn't work, like before.
	I don't know how to test it either.
>How-To-Repeat:
	Want to use the latest hercules.
>Fix:
	Diff, then shar file:

? patches/patch-ba
? patches/patch-bb
? patches/patch-bc
? patches/patch-bd
? patches/patch-be
? patches/patch-bf
cvs server: Diffing .
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/emulators/hercules/Makefile,v
retrieving revision 1.24
diff -u -r1.24 Makefile
--- Makefile	17 Jan 2010 08:02:49 -0000	1.24
+++ Makefile	22 Apr 2011 14:19:33 -0000
@@ -1,32 +1,31 @@
 # $NetBSD: Makefile,v 1.24 2010/01/17 08:02:49 dholland Exp $

-DISTNAME=		hercules-2.11
-PKGREVISION=		4
+DISTNAME=		hercules-3.07
 CATEGORIES=		emulators
 MASTER_SITES=		http://www.hercules-390.org/

 MAINTAINER=		pkgsrc-users@NetBSD.org
 HOMEPAGE=		http://www.hercules-390.org/
 COMMENT=		S370 emulator
+LICENSE=		qpl-v1.0

 PKG_DESTDIR_SUPPORT=	user-destdir

 DEPENDS+=		hercules-images-[0-9]*:../../emulators/hercules-images

 USE_TOOLS+=		gmake bash:run
-MAKE_FILE=		makefile
-MAKE_ENV+=		HOST_ARCH=${MACHINE_ARCH:Q}
-
-REPLACE_BASH+=		dasdlist
+GNU_CONFIGURE=		YES
+#MAKE_ENV+=		HOST_ARCH=${MACHINE_ARCH:Q}

 PTHREAD_OPTS+=		require

 INSTALLATION_DIRS+=	bin share/examples/hercules
-SPECIAL_PERMS+=		${PREFIX}/bin/hercifc ${SETUID_ROOT_PERMS}
+#CONFIGURE_ARGS+=	--enable-setuid-hercifc=hercules
+#SPECIAL_PERMS+=		${PREFIX}/bin/hercifc ${SETUID_ROOT_PERMS}

 pre-install:
 	${INSTALL_DATA} ${WRKSRC}/hercules.cnf ${DESTDIR}${PREFIX}/share/examples/hercules/
-	${INSTALL_DATA} ${WRKSRC}/zzsa.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"
Index: PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/emulators/hercules/PLIST,v
retrieving revision 1.2
diff -u -r1.2 PLIST
--- PLIST	14 Jun 2009 17:51:05 -0000	1.2
+++ PLIST	22 Apr 2011 14:19:33 -0000
@@ -1,23 +1,162 @@
 @comment $NetBSD: PLIST,v 1.2 2009/06/14 17:51:05 joerg Exp $
-bin/hercules
-bin/hercifc
+bin/cckdcdsk
+bin/cckdcomp
+bin/cckddiag
+bin/cckdswap
+bin/cvslvlck
+bin/dasdcat
+bin/dasdconv
+bin/dasdcopy
 bin/dasdinit
 bin/dasdisup
+bin/dasdlist
 bin/dasdload
 bin/dasdls
 bin/dasdpdsu
-bin/tapecopy
-bin/tapelist
-bin/tapemap
-bin/tapesplit
-bin/cckd2ckd
-bin/cckdcdsk
-bin/ckd2cckd
-bin/cckdcomp
+bin/dasdseq
+bin/dmap2hrc
+bin/hercifc
+bin/herclin
+bin/hercules
 bin/hetget
 bin/hetinit
 bin/hetmap
 bin/hetupd
-bin/dasdlist
+bin/tapecopy
+bin/tapemap
+bin/tapesplt
+lib/hercules/dyncrypt.la
+lib/hercules/dyngui.la
+lib/hercules/dyninst.la
+lib/hercules/hdt1052c.la
+lib/hercules/hdt1403.la
+lib/hercules/hdt2703.la
+lib/hercules/hdt2880.la
+lib/hercules/hdt3088.la
+lib/hercules/hdt3270.la
+lib/hercules/hdt3420.la
+lib/hercules/hdt3505.la
+lib/hercules/hdt3525.la
+lib/hercules/hdt3705.la
+lib/hercules/hdteq.la
+lib/hercules/hdtqeth.la
+lib/libdecNumber.la
+lib/libherc.la
+lib/libhercd.la
+lib/libhercs.la
+lib/libherct.la
+lib/libhercu.la
+man/man1/cckddiag.1
+man/man1/dasdseq.1
+man/man4/cckd.4
 share/examples/hercules/hercules.cnf
-share/examples/hercules/zzsa.cnf
+share/hercules/TMOUNT.txt
+share/hercules/awssl-v19g
+share/hercules/awswrite.jcl
+share/hercules/cckddasd.html
+share/hercules/cckddump.hla
+share/hercules/cckdload.hla
+share/hercules/fishgui.html
+share/hercules/hercconf.html
+share/hercules/hercfaq.html
+share/hercules/hercinst.html
+share/hercules/herclic.html
+share/hercules/hercload.html
+share/hercules/hercmsca.html
+share/hercules/hercmscf.html
+share/hercules/hercmscp.html
+share/hercules/hercmsct.html
+share/hercules/hercmscu.html
+share/hercules/hercmsda.html
+share/hercules/hercmsdc.html
+share/hercules/hercmsdg.html
+share/hercules/hercmsdi.html
+share/hercules/hercmsdl.html
+share/hercules/hercmsds.html
+share/hercules/hercmsdt.html
+share/hercules/hercmsdu.html
+share/hercules/hercmsg.html
+share/hercules/hercmshd.html
+share/hercules/hercmshe.html
+share/hercules/hercmshg.html
+share/hercules/hercmshm.html
+share/hercules/hercmsht.html
+share/hercules/hercmshu.html
+share/hercules/hercmsif.html
+share/hercules/hercmsin.html
+share/hercules/hercmslc.html
+share/hercules/hercmslg.html
+share/hercules/hercmspn.html
+share/hercules/hercmspr.html
+share/hercules/hercmspu.html
+share/hercules/hercmsrd.html
+share/hercules/hercmssd.html
+share/hercules/hercmsta.html
+share/hercules/hercmstc.html
+share/hercules/hercmste.html
+share/hercules/hercmstm.html
+share/hercules/hercmsts.html
+share/hercules/hercmstt.html
+share/hercules/hercmstu.html
+share/hercules/hercmsvm.html
+share/hercules/hercnew.html
+share/hercules/hercrdr.html
+share/hercules/hercrnot.html
+share/hercules/hercsupp.html
+share/hercules/herctcp.html
+share/hercules/hercules.css
+share/hercules/hercules.html
+share/hercules/images/back.gif
+share/hercules/images/bkued.gif
+share/hercules/images/blueu.gif
+share/hercules/images/dial1.gif
+share/hercules/images/dial2.gif
+share/hercules/images/dial3.gif
+share/hercules/images/dial4.gif
+share/hercules/images/favicon.ico
+share/hercules/images/greend.gif
+share/hercules/images/greenu.gif
+share/hercules/images/hercpic-rblk-256.gif
+share/hercules/images/hercpic-rblk-80.gif
+share/hercules/images/interruptd.gif
+share/hercules/images/interruptu.gif
+share/hercules/images/loadd.gif
+share/hercules/images/loadoffu.gif
+share/hercules/images/loadonu.gif
+share/hercules/images/loadu.gif
+share/hercules/images/manoffu.gif
+share/hercules/images/manonu.gif
+share/hercules/images/note.gif
+share/hercules/images/osi-certified-60x50.jpg
+share/hercules/images/poweroffd.gif
+share/hercules/images/poweroffu.gif
+share/hercules/images/poweronoffd.gif
+share/hercules/images/poweronoffu.gif
+share/hercules/images/poweronond.gif
+share/hercules/images/powerononu.gif
+share/hercules/images/redd.gif
+share/hercules/images/redu.gif
+share/hercules/images/restartd.gif
+share/hercules/images/restartu.gif
+share/hercules/images/startd.gif
+share/hercules/images/startu.gif
+share/hercules/images/stopd.gif
+share/hercules/images/stopu.gif
+share/hercules/images/stored.gif
+share/hercules/images/storeu.gif
+share/hercules/images/sysoffu.gif
+share/hercules/images/sysonu.gif
+share/hercules/images/translucentoffd.gif
+share/hercules/images/translucentoffu.gif
+share/hercules/images/translucentond.gif
+share/hercules/images/translucentonu.gif
+share/hercules/images/waitoffu.gif
+share/hercules/images/waitonu.gif
+share/hercules/include/footer.htmlpart
+share/hercules/include/header.htmlpart
+share/hercules/index.html
+share/hercules/rawstape.jcl
+share/hercules/shared.html
+share/hercules/tapeconv.jcl
+share/hercules/tasks.html
+share/hercules/zzsacard.bin
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/emulators/hercules/distinfo,v
retrieving revision 1.10
diff -u -r1.10 distinfo
--- distinfo	17 Jan 2010 08:00:47 -0000	1.10
+++ distinfo	22 Apr 2011 14:19:33 -0000
@@ -1,27 +1,11 @@
 $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) = 639ccc667a415fc427996be1972f7b0b67efca2c
-SHA1 (patch-ab) = ea2802d8752411e964ba150d3a54f64a40fc2e70
-SHA1 (patch-ac) = 454ac972ad54f19f139033abe8ccabdbb0c3f88b
-SHA1 (patch-ad) = 51fa93cb9fbc8382de1da52748dffa4ec2bcbf9c
-SHA1 (patch-ae) = 14aafa5462a858e44c00ea6d43efd0f1cfef190e
-SHA1 (patch-af) = 759ad1ee2737ed8021b5a5fd956851677e99879a
-SHA1 (patch-ag) = 6dcec345641bdde0c617da10f57b6f2dd6b702ac
-SHA1 (patch-ah) = 06e03dc32c91ab5d3125a3b5489d15ef5c1e144c
-SHA1 (patch-aj) = 8584ff1c318e72a52ae597457368114998a89cb6
-SHA1 (patch-ak) = 5b594849074ac410f2b8c93f2df0dca874b4533a
-SHA1 (patch-al) = 60d90ed9c1476b8fcf0a905a8316f3aec9108169
-SHA1 (patch-am) = 4626f39156ac2beccd9911f795aff6f9fe7b997b
-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
+SHA1 (hercules-3.07.tar.gz) = d0b2e543dd66ee43576e5a5faff8f4cc061cffb4
+RMD160 (hercules-3.07.tar.gz) = 241344a3242a1dacc5276dd61b7fa4c92a270f71
+Size (hercules-3.07.tar.gz) = 2701835 bytes
+SHA1 (patch-ba) = 771da13cc09be4db4efe35d66946b1677912539d
+SHA1 (patch-bb) = 01dcebaf619d6fc04eeba8f03d9f2f72c348f6a1
+SHA1 (patch-bc) = 0f053af2f865e002fcbdd86c2305c9fa96670721
+SHA1 (patch-bd) = 80c09200c3454be6bb3ee53661878968dd099919
+SHA1 (patch-be) = 89206d041a47c06882239117d28904f4b80eddc2
+SHA1 (patch-bf) = 3b6d535facd2bf9c3cd7eb1a6a788c7e1dfff07b
cvs server: Diffing patches
cvs server: cannot find patches/patch-aa
cvs server: cannot find patches/patch-ab
cvs server: cannot find patches/patch-ac
cvs server: cannot find patches/patch-ad
cvs server: cannot find patches/patch-ae
cvs server: cannot find patches/patch-af
cvs server: cannot find patches/patch-ag
cvs server: cannot find patches/patch-ah
cvs server: cannot find patches/patch-aj
cvs server: cannot find patches/patch-ak
cvs server: cannot find patches/patch-al
cvs server: cannot find patches/patch-am
cvs server: cannot find patches/patch-an
cvs server: cannot find patches/patch-ao
cvs server: cannot find patches/patch-ap
cvs server: cannot find patches/patch-aq
cvs server: cannot find patches/patch-ar
cvs server: cannot find patches/patch-as
cvs server: cannot find patches/patch-at
cvs server: cannot find patches/patch-au
cvs server: cannot find patches/patch-av
cvs server: cannot find patches/patch-aw


# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	patches/patch-ba
#	patches/patch-bb
#	patches/patch-bc
#	patches/patch-bd
#	patches/patch-be
#	patches/patch-bf
#
echo x - patches/patch-ba
sed 's/^X//' >patches/patch-ba << 'END-of-patches/patch-ba'
X$NetBSD$
X
XThis patch doesn't mean tun or tap support actually works...
Xit is more a bit of a placeholder.
X
X--- hercifc.h.orig	2011-04-19 15:49:30.000000000 +0000
X+++ hercifc.h
X@@ -90,7 +90,11 @@
X // --------------------------------------------------------------------
X 
X #define  HERCIFC_CMD  "hercifc"           // Interface config command
X+#if defined(__FreeBSD__) || defined(__NetBSD__)
X+#define  HERCTUN_DEV  "/dev/tun"          // Default TUN/TAP char dev
X+#else
X #define  HERCTUN_DEV  "/dev/net/tun"      // Default TUN/TAP char dev
X+#endif
X 
X typedef struct _CTLREQ
X {
END-of-patches/patch-ba
echo x - patches/patch-bb
sed 's/^X//' >patches/patch-bb << 'END-of-patches/patch-bb'
X$NetBSD$
X
X--- hostopts.h.orig	2011-04-19 15:49:45.000000000 +0000
X+++ hostopts.h
X@@ -272,7 +272,7 @@
X /*-------------------------------------------------------------------*/
X /* Hard-coded FreeBSD-specific features and options...               */
X /*-------------------------------------------------------------------*/
X-#elif defined(__FreeBSD__)              /* "FreeBSD" options         */
X+#elif defined(__FreeBSD__) || defined(__NetBSD__)/* "BSD" options    */
X 
X #define DLL_IMPORT   extern
X #define DLL_EXPORT
X@@ -295,6 +295,14 @@
X #undef  OPTION_EXTCURS                  /* Normal cursor handling    */
X 
X 
X+/* These should become configure checks */
X+# if defined(__NetBSD__)
X+#  define OPTION_SCSI_TAPE                /* SCSI tape support         */
X+# endif
X+# if !defined(SOL_TCP)
X+#  define SOL_TCP	IPPROTO_TCP
X+# endif
X+
X /*-------------------------------------------------------------------*/
X /* GNU Linux options...                                              */
X /*-------------------------------------------------------------------*/
END-of-patches/patch-bb
echo x - patches/patch-bc
sed 's/^X//' >patches/patch-bc << 'END-of-patches/patch-bc'
X$NetBSD$
X
XLinux tape handling.
X
X--- hstructs.h.orig	2011-04-19 15:49:59.000000000 +0000
X+++ hstructs.h
X@@ -1025,9 +1025,13 @@ struct DEVBLK {                         
X         U32     msgid;                  /* Message Id of async. i/o  */
X #if defined(OPTION_SCSI_TAPE)
X         struct mtget mtget;             /* SCSI tape status struct   */
X+#if (defined(BSD) && BSD >= 199306)
X+#define sstat  mtget.mt_erreg
X+#else
X #define sstat  mtget.mt_gstat           /* Generic SCSI tape device-
X                                            independent status field;
X                                            (struct mtget->mt_gstat)  */
X+#endif
X         TID     stape_mountmon_tid;     /* Tape-mount monitor thread */
X         u_int   stape_close_rewinds:1;  /* 1=Rewind at close         */
X         u_int   stape_blkid_32:1;       /* 1=block-ids are 32 bits   */
X@@ -1039,7 +1043,11 @@ struct DEVBLK {                         
X         COND    stape_getstat_cond;     /* COND for status wrkr thrd */
X         COND    stape_exit_cond;        /* thread wait for exit COND */
X         struct mtget stape_getstat_mtget;/* status wrkr thrd status  */
X+#if (defined(BSD) && BSD >= 199306)
X+#define stape_getstat_sstat  stape_getstat_mtget.mt_erreg
X+#else
X #define stape_getstat_sstat stape_getstat_mtget.mt_gstat /* (gstat)  */
X+#endif
X         struct timeval
X                 stape_getstat_query_tod;/* TOD of actual drive query */
X #endif
END-of-patches/patch-bc
echo x - patches/patch-bd
sed 's/^X//' >patches/patch-bd << 'END-of-patches/patch-bd'
X$NetBSD$
X
XLinux tape handling.
X
X--- tapecopy.c.orig	2011-04-19 15:50:10.000000000 +0000
X+++ tapecopy.c
X@@ -242,15 +242,21 @@ static void print_usage (void)
X static int obtain_status (char *devname, int devfd, struct mtget* mtget)
X {
X int rc;                                 /* Return code               */
X+long gstat;
X 
X     rc = ioctl_tape (devfd, MTIOCGET, (char*)mtget);
X     if (rc < 0)
X     {
X+#if (defined(BSD) && BSD >= 199306)
X+	gstat = (mtget->mt_dsreg << 16) | mtget->mt_erreg;
X+#else
X+	gtat = mtget->mt_gstat;
X+#endif
X         if (1
X             && EIO == errno
X             && (0
X-                || GMT_EOD( mtget->mt_gstat )
X-                || GMT_EOT( mtget->mt_gstat )
X+                || GMT_EOD( gstat )
X+                || GMT_EOT( gstat )
X             )
X         )
X             return +1;
X@@ -260,8 +266,8 @@ int rc;                                 
X         return -1;
X     }
X 
X-    if (GMT_EOD( mtget->mt_gstat ) ||
X-        GMT_EOT( mtget->mt_gstat ))
X+    if (GMT_EOD( gstat ) ||
X+        GMT_EOT( gstat ))
X         return +1;
X 
X     return 0;
X@@ -499,6 +505,7 @@ struct mtget    mtget;                  
X struct mtpos    mtpos;                  /* Area for MTIOCPOS ioctl   */
X int             is3590 = 0;             /* 1 == 3590, 0 == 3480/3490 */
X #endif /*defined(EXTERNALGUI)*/
X+long		gstat;
X 
X     INITIALIZE_UTILITY("tapecopy");
X 
X@@ -636,8 +643,13 @@ int             is3590 = 0;             
X         printf (_("HHCTC004I %s tape density code: 0x%lX\n"),
X             (devnamein ? devnamein : devnameout), density);
X 
X-    if (mtget.mt_gstat != 0)
X-        print_status ((devnamein ? devnamein : devnameout), mtget.mt_gstat);
X+#if (defined(BSD) && BSD >= 199306)
X+    gstat = (mtget.mt_dsreg << 16) | mtget.mt_erreg;
X+#else
X+    gstat = mtget.mt_gstat;
X+#endif
X+    if (gstat != 0)
X+        print_status ((devnamein ? devnamein : devnameout), gstat);
X 
X     /* Open the disk file */
X     if (filenamein)
END-of-patches/patch-bd
echo x - patches/patch-be
sed 's/^X//' >patches/patch-be << 'END-of-patches/patch-be'
X$NetBSD$
X
XLinux tape handling.
X
X--- tapedev.h.orig	2011-04-19 15:50:25.000000000 +0000
X+++ tapedev.h
X@@ -535,4 +535,61 @@ extern int  readhdr_omaheaders (DEVBLK *
X /*-------------------------------------------------------------------*/
X // (see SCSITAPE.H)
X 
X+#if defined(BSD) && BSD >= 199306
X+/*-------------------------------------------------------------------*/
X+/* Support for BSD tape                                              */
X+/*-------------------------------------------------------------------*/
X+struct mt_tape_info {
X+	BYTE	t_type;
X+	const char *t_name;
X+};
X+
X+#define MT_TAPE_INFO							\
X+{									\
X+	{MT_ISUNKNOWN,          "Unknown type of tape device"},		\
X+	{MT_ISQIC02,            "Generic QIC-02 tape streamer"}		\
X+}
X+
X+/* Generic Mag Tape (device independent) status macros for examining
X+ * mt_gstat -- HP-UX compatible.
X+ * There is room for more generic status bits here, but I don't
X+ * know which of them are reserved. At least three or so should
X+ * be added to make this really useful.
X+ */
X+#define GMT_EOF(x)              ((x) & 0x80000000)
X+#define GMT_BOT(x)              ((x) & 0x40000000)
X+#define GMT_EOT(x)              ((x) & 0x20000000)
X+#define GMT_SM(x)               ((x) & 0x10000000)  /* DDS setmark */
X+#define GMT_EOD(x)              ((x) & 0x08000000)  /* DDS EOD */
X+#define GMT_WR_PROT(x)          ((x) & 0x04000000)
X+/* #define GMT_ ? ((x) & 0x02000000) */
X+#define GMT_ONLINE(x)           ((x) & 0x01000000)
X+#define GMT_D_6250(x)           ((x) & 0x00800000)
X+#define GMT_D_1600(x)           ((x) & 0x00400000)
X+#define GMT_D_800(x)            ((x) & 0x00200000)
X+/* #define GMT_ ? ((x) & 0x00100000) */
X+/* #define GMT_ ? ((x) & 0x00080000) */
X+#define GMT_DR_OPEN(x)          ((x) & 0x00040000)  /* door open (no tape) */
X+/* #define GMT_ ? ((x) & 0x00020000) */
X+#define GMT_IM_REP_EN(x)        ((x) & 0x00010000)  /* immediate report mode */
X+/* 16 generic status bits unused */
X+/* SCSI-tape specific definitions */
X+
X+/* Bitfield shifts in the status */
X+#define MT_ST_BLKSIZE_SHIFT 0
X+#define MT_ST_BLKSIZE_MASK 0xffffff
X+#define MT_ST_DENSITY_SHIFT 24
X+#define MT_ST_DENSITY_MASK 0xff000000
X+
X+#define MTSETBLK 20     /* set block length (SCSI) */
X+
X+#define MT_ISUNKNOWN 0x01
X+#define MT_ISQIC02 0x02 
X+
X+#define MTIOCPOS	MTNOP	/* do nothing, status only */
X+#define mtpos		mtget	/* generic status struct, including mt_blkno */
X+#define MTSEEK		MTFSR	/* forward seek record; probably wrong */
X+
X+#endif /* BSD */
X+
X #endif // __TAPEDEV_H__
END-of-patches/patch-be
echo x - patches/patch-bf
sed 's/^X//' >patches/patch-bf << 'END-of-patches/patch-bf'
X$NetBSD$
X
XLinux tape handling.
X
X--- scsitape.c.orig	2010-01-08 22:56:27.000000000 +0000
X+++ scsitape.c
X@@ -1334,6 +1334,19 @@ int locateblk_scsitape ( DEVBLK* dev, U3
X     mtop.mt_count = CSWAP32( mtop.mt_count );   // (host <- guest)
X     mtop.mt_op    = MTSEEK;
X 
X+#if defined(BSD) && BSD >= 199306
X+    /* Find out where we are so we can do a relative seek */
X+    {
X+	struct mtget here;
X+
X+	rc = ioctl_tape( dev->fd, MTIOCGET, (char*)&here );
X+	if (rc >= 0) {
X+	    mtop.mt_count -= here.mt_blkno;
X+	    mtop.mt_op = MTFSR;
X+	}
X+    }
X+#endif /* BSD */
X+
X     // Ask the actual hardware to do an actual physical locate...
X 
X     if ((rc = ioctl_tape( dev->fd, MTIOCTOP, (char*)&mtop )) < 0)
END-of-patches/patch-bf
exit

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert  -- There's no point being grown-up if you 
\X/ rhialto/at/xs4all.nl    -- can't be childish sometimes. -The 4th Doctor

>Release-Note:

>Audit-Trail:
From: Ryo ONODERA <ryo_on@yk.rim.or.jp>
To: gnats-bugs@NetBSD.org, rhialto@falu.nl
Cc: 
Subject: Re: pkg/44894: update emulators/hercules to 3.07
Date: Sun, 01 May 2011 21:11:06 +0900 (JST)

 Hi,

 I think hercules-3.07 requires USE_LIBTOOL=yes line in Makefile.
 And this line breaks build with following messages.
 Could you investigate it?

 libtool: link: cc -O2 -W -Wall -O3 -march=i386 -fomit-frame-pointer -Wl,-R/usr/pkg/lib -Wl,--warn-common -o .libs/hercules .libs/herculesS.o bootstrap.o hdlmain.o -pthread -pthread -Wl,--export-dynamic  -L/usr/tmp/emulators/hercules.ryoon2/work/hercules-3.07/.libs -L/usr/tmp/emulators/hercules.ryoon2/work/hercules-3.07/decNumber/.libs ./.libs/libherc.so -L/usr/tmp/emulators/hercules.ryoon2/work/.buildlink/lib /usr/tmp/emulators/hercules.ryoon2/work/hercules-3.07/.libs/libherct.so /usr/tmp/emulators/hercules.ryoon2/work/hercules-3.07/.libs/libhercd.so /usr/tmp/emulators/hercules.ryoon2/work/hercules-3.07/.libs/libhercu.so /usr/tmp/emulators/hercules.ryoon2/work/hercules-3.07/.libs/libhercs.so /usr/tmp/emulators/hercules.ryoon2/work/hercules-3.07/decNumber/.libs/libdecNumber.so ./.libs/libhercs.so -lpthread -lrt -lz -lresolv -lm -lbz2 -pthread -Wl,-rpath -Wl,/usr/pkg/lib
 bootstrap.o: In function `main':
 bootstrap.c:(.text+0x16): undefined reference to `lt_preloaded_symbols'
 gmake[2]: *** [hercules] Error 1
 gmake[2]: Leaving directory `/usr/tmp/emulators/hercules.ryoon2/work/hercules-3.07'
 gmake[1]: *** [all-recursive] Error 1
 gmake[1]: Leaving directory `/usr/tmp/emulators/hercules.ryoon2/work/hercules-3.07'
 gmake: *** [all] Error 2
 *** Error code 2

 Stop.
 make: stopped in /usr/pkgsrc/emulators/hercules.ryoon2
 *** Error code 1

 Stop.
 make: stopped in /usr/pkgsrc/emulators/hercules.ryoon2


From: Rhialto <rhialto@falu.nl>
To: Ryo ONODERA <ryo_on@yk.rim.or.jp>
Cc: gnats-bugs@NetBSD.org, rhialto@falu.nl
Subject: Re: pkg/44894: update emulators/hercules to 3.07
Date: Mon, 2 May 2011 00:25:42 +0200

 Hello!

 On Sun 01 May 2011 at 21:11:06 +0900, Ryo ONODERA wrote:
 > Hi,
 >=20
 > I think hercules-3.07 requires USE_LIBTOOL=3Dyes line in Makefile.
 > And this line breaks build with following messages.
 > Could you investigate it?

 I added that line and I got the same error as you did.
 I tried in two contexts, both amd64 and pkgsrc-2011Q1, but one in a
 pkg_comp chroot with 5.0 userland, and one just normally under 5.1.

 I do seem to remember a similar error in another package, and it had to
 do with library ltdl (libtool dynamic loader), some confusion whether to
 use the version from pkgsrc or the one included with the package.

 I don't recall which way around it was there, but here the included
 ltdl.c is built and included in libhercu(.a).

 The FreeBSD port has a patch to remove the use of the included ltdl.c
 file.  I ported that over, and I added the pkgsrc version to the
 Makefile:

 =2Einclude "../../devel/libltdl/buildlink3.mk"

 but that seemed to make the problem *worse*...

 /bin/sh ./libtool --tag=3DCC --mode=3Dlink cc  -O2 -I/usr/pkg/include -I/us=
 r/include -W -Wall -O3 -march=3Dk8 -fomit-frame-pointer  -L/usr/pkg/lib -Wl=
 ,-R/usr/pkg/lib -L/usr/lib -Wl,-R/usr/lib -Wl,--warn-common -o hercules -dl=
 open self bootstrap.o hdlmain.o libherc.la libhercs.la -lpthread -lrt -lz -=
 lresolv -lm  -pthread -lbz2 -lpthread -lrt -lz -lresolv -lm  -pthread -lbz2
 libtool: link: rm -f .libs/hercules.nm .libs/hercules.nmS .libs/hercules.nmT
 libtool: link: (cd .libs && cc -O2 -I/usr/include -c -fno-builtin "hercules=
 S.c")
 libtool: link: rm -f ".libs/herculesS.c" ".libs/hercules.nm" ".libs/hercule=
 s.nmS" ".libs/hercules.nmT"
 libtool: link: cc -O2 -I/home/rhialto/tmp/emulators/hercules/work.x86_64/.b=
 uildlink/include -W -Wall -O3 -march=3Dk8 -fomit-frame-pointer -Wl,-R/usr/p=
 kg/lib -Wl,--warn-common -o .libs/hercules .libs/herculesS.o bootstrap.o hd=
 lmain.o -pthread -pthread -Wl,--export-dynamic  -L/home/rhialto/tmp/emulato=
 rs/hercules/work.x86_64/hercules-3.07/.libs -L/home/rhialto/tmp/emulators/h=
 ercules/work.x86_64/hercules-3.07/decNumber/.libs -L/home/rhialto/tmp/emula=
 tors/hercules/work.x86_64/.buildlink/lib ./.libs/libherc.so /home/rhialto/t=
 mp/emulators/hercules/work.x86_64/hercules-3.07/.libs/libherct.so /home/rhi=
 alto/tmp/emulators/hercules/work.x86_64/hercules-3.07/.libs/libhercd.so /ho=
 me/rhialto/tmp/emulators/hercules/work.x86_64/hercules-3.07/.libs/libhercu.=
 so /home/rhialto/tmp/emulators/hercules/work.x86_64/hercules-3.07/.libs/lib=
 hercs.so /home/rhialto/tmp/emulators/hercules/work.x86_64/hercules-3.07/dec=
 Number/.libs/libdecNumber.so ./.libs/libhercs.so -lpthread -lrt -lz -lresol=
 v -lm -lbz2 -pthread -Wl,-rpath -Wl,/usr/pkg/lib
 bootstrap.o: In function `main':
 bootstrap.c:(.text+0x15): undefined reference to `lt_preloaded_symbols'
 bootstrap.c:(.text+0x1a): undefined reference to `lt_dlpreload_default'
 /home/rhialto/tmp/emulators/hercules/work.x86_64/hercules-3.07/.libs/libher=
 cu.so: undefined reference to `lt_dlerror'
 /home/rhialto/tmp/emulators/hercules/work.x86_64/hercules-3.07/.libs/libher=
 cu.so: undefined reference to `lt_dlclose'
 /home/rhialto/tmp/emulators/hercules/work.x86_64/hercules-3.07/.libs/libher=
 cu.so: undefined reference to `lt_dlopen'
 /home/rhialto/tmp/emulators/hercules/work.x86_64/hercules-3.07/.libs/libher=
 cu.so: undefined reference to `lt_dlsym'
 /home/rhialto/tmp/emulators/hercules/work.x86_64/hercules-3.07/.libs/libher=
 cu.so: undefined reference to `lt_dlinit'
 gmake[2]: *** [hercules] Error 1

 I realised there was no "-lltdl" in there, and adding that brought the
 errors back to what you already saw.

 This lt_preloaded_symbols symbol is a strange one, since it gets
 redefined in the pkgsrc version of ltdl.h:

 #define lt_preloaded_symbols    lt__PROGRAM__LTX_preloaded_symbols

 so when lt_preloaded_symbols is undefined, the #define has not been seen
 in some location, which seems to indicate that the wrong "ltdl.h" file
 has been used somewhere. Since hercules also has its own version of this
 file, I removed it from consideration by adding this to the Makefile:

 pre-configure:
         rm ${WRKSRC}/ltdl.h

 That seemed to work! So I'll include the new patches needed so that
 ltdl.o is replaced by -lltdl in appropriate places. As mentioned, the
 Makefile also needs this:

 pre-configure:
         rm ${WRKSRC}/ltdl.h

 =2Einclude "../../devel/libltdl/buildlink3.mk"


 Alternatively, by looking at configure.ac, it seems to be possible to
 have OPTION_DYNAMIC_LOAD without HDL_USE_LIBTOOL, so that it used
 dlopen() directly. However, as so many packages, it checks for dlopen()
 in -ldl only. For NetBSD it is in libc, so it won't find that. I have
 not yet tried to force things in that direction.


 # This is a shell archive.  Save it in a file, remove anything before
 # this line, and then unpack it by entering "sh file".  Note, it may
 # create directories; files and directories will be owned by you and
 # have default permissions.
 #
 # This archive contains:
 #
 #	patches/patch-Makefile.in
 #	patches/patch-crypto_Makefile.in
 #	patches/patch-decNumber_Makefile.in
 #
 echo x - patches/patch-Makefile.in
 sed 's/^X//' >patches/patch-Makefile.in << 'END-of-patches/patch-Makefile.i=
 n'
 X$NetBSD$
 X
 X--- Makefile.in.orig	2010-03-07 12:04:49.000000000 +0000
 X+++ Makefile.in
 X@@ -304,13 +304,13 @@ libherct_la_OBJECTS =3D $(am_libherct_la_O
 X libhercu_la_DEPENDENCIES =3D $(am__DEPENDENCIES_1) libhercs.la
 X am__libhercu_la_SOURCES_DIST =3D version.c hscutl.c hscutl2.c codepage.c \
 X 	logger.c logmsg.c hdl.c hostinfo.c hsocket.c memrchr.c \
 X-	parser.c pttrace.c fthreads.c fishhang.c ltdl.c
 X+	parser.c pttrace.c fthreads.c fishhang.c=20
 X am__objects_5 =3D fthreads.lo
 X @BUILD_FTHREADS_TRUE@am__objects_8 =3D $(am__objects_5)
 X am__objects_6 =3D fishhang.lo
 X @BUILD_FISHHANG_TRUE@@BUILD_FTHREADS_TRUE@am__objects_9 =3D  \
 X @BUILD_FISHHANG_TRUE@@BUILD_FTHREADS_TRUE@	$(am__objects_6)
 X-@OPTION_DYNAMIC_LOAD_TRUE@am__objects_10 =3D ltdl.lo
 X+@OPTION_DYNAMIC_LOAD_TRUE@am__objects_10 =3D=20
 X am_libhercu_la_OBJECTS =3D version.lo hscutl.lo hscutl2.lo codepage.lo \
 X 	logger.lo logmsg.lo hdl.lo hostinfo.lo hsocket.lo memrchr.lo \
 X 	parser.lo pttrace.lo $(am__objects_8) $(am__objects_9) \
 X@@ -687,7 +687,7 @@ dyndev_SRC =3D commadpt.c  \
 X @OPTION_DYNAMIC_LOAD_FALSE@DYNSRC =3D $(dyndev_SRC)
 X @OPTION_DYNAMIC_LOAD_TRUE@DYNSRC =3D=20
 X @OPTION_DYNAMIC_LOAD_FALSE@LTDL =3D=20
 X-@OPTION_DYNAMIC_LOAD_TRUE@LTDL =3D ltdl.c
 X+@OPTION_DYNAMIC_LOAD_TRUE@LTDL =3D=20
 X @OPTION_DYNAMIC_LOAD_FALSE@DYNMOD_LD_FLAGS =3D=20
 X @OPTION_DYNAMIC_LOAD_TRUE@DYNMOD_LD_FLAGS =3D -module         \
 X @OPTION_DYNAMIC_LOAD_TRUE@                   -no-undefined    \
 X@@ -913,8 +913,7 @@ EXTRA_libherc_la_SOURCES =3D $(fthreads_SR
 X                              memrchr.c        \
 X                              $(dynamic_SRC)   \
 X                              $(extra_SRC)     \
 X-                             $(dyndev_SRC)    \
 X-                             ltdl.c
 X+                             $(dyndev_SRC)
 X=20
 X libherc_la_LDFLAGS =3D $(LIB_LD_FLAGS)
 X libherc_la_LIBADD =3D libhercs.la     \
 X@@ -969,11 +968,11 @@ libherc_la_LIBADD =3D libhercs.la     \
 X hercules_SOURCES =3D bootstrap.c  \
 X                           hdlmain.c
 X=20
 X-hercules_LDADD =3D libherc.la libhercs.la $(LDADD)
 X+hercules_LDADD =3D libherc.la libhercs.la $(LDADD) -lltdl
 X hercules_LDFLAGS =3D $(HLDFLAGS)
 X hercules_DEPENDENCIES =3D libherc.la libhercs.la $(HDEPS)
 X @BUILD_SHARED_TRUE@herclin_SOURCES =3D herclin.c hdlmain.c
 X-@BUILD_SHARED_TRUE@herclin_LDADD =3D libherc.la libhercs.la $(LDADD)
 X+@BUILD_SHARED_TRUE@herclin_LDADD =3D libherc.la libhercs.la $(LDADD) -llt=
 dl
 X @BUILD_SHARED_TRUE@herclin_LDFLAGS =3D $(HLDFLAGS)
 X @BUILD_SHARED_TRUE@herclin_DEPENDENCIES =3D libherc.la libhercs.la $(HDEP=
 S)
 X=20
 X@@ -981,7 +980,7 @@ hercules_DEPENDENCIES =3D libherc.la libhe
 X # side binaries
 X #
 X tools_LD_FLAGS =3D=20
 X-tools_ADDLIBS =3D $(HERCLIBS2) $(LDADD)
 X+tools_ADDLIBS =3D $(HERCLIBS2) $(LDADD) -lltdl
 X @BUILD_HERCIFC_TRUE@hercifc_SOURCES =3D hercifc.c
 X @BUILD_HERCIFC_TRUE@hercifc_LDADD =3D $(tools_ADDLIBS)
 X @BUILD_HERCIFC_TRUE@hercifc_LDFLAGS =3D $(tools_LD_FLAGS)
 X@@ -1166,7 +1165,6 @@ noinst_HEADERS =3D fishhang.h     \
 X                  hdl.h          \
 X                  crypto.h       \
 X                  sockdev.h      \
 X-                 ltdl.h         \
 X                  herc_getopt.h  \
 X                  service.h      \
 X                  chsc.h         \
 X@@ -1552,7 +1550,6 @@ distclean-compile:
 X @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/logger.Plo@am__quote@
 X @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/logmsg.Plo@am__quote@
 X @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/losc.Plo@am__quote@
 X-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ltdl.Plo@am__quote@
 X @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/machchk.Plo@am__quote@
 X @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memrchr.Plo@am__quote@
 X @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/omatape.Plo@am__quote@
 END-of-patches/patch-Makefile.in
 echo x - patches/patch-crypto_Makefile.in
 sed 's/^X//' >patches/patch-crypto_Makefile.in << 'END-of-patches/patch-cry=
 pto_Makefile.in'
 X$NetBSD$
 X
 X--- crypto/Makefile.in.orig	2010-03-07 12:04:48.000000000 +0000
 X+++ crypto/Makefile.in
 X@@ -246,7 +246,7 @@ dyndev_SRC =3D dyncrypt.c sha1.c sha256.c=20
 X @OPTION_DYNAMIC_LOAD_FALSE@DYNSRC =3D $(dyndev_SRC)
 X @OPTION_DYNAMIC_LOAD_TRUE@DYNSRC =3D=20
 X @OPTION_DYNAMIC_LOAD_FALSE@LTDL =3D=20
 X-@OPTION_DYNAMIC_LOAD_TRUE@LTDL =3D ../ltdl.c
 X+@OPTION_DYNAMIC_LOAD_TRUE@LTDL =3D=20
 X @OPTION_DYNAMIC_LOAD_FALSE@DYNMOD_LD_FLAGS =3D=20
 X @OPTION_DYNAMIC_LOAD_TRUE@DYNMOD_LD_FLAGS =3D -module         \
 X @OPTION_DYNAMIC_LOAD_TRUE@                   -no-undefined   \
 END-of-patches/patch-crypto_Makefile.in
 echo x - patches/patch-decNumber_Makefile.in
 sed 's/^X//' >patches/patch-decNumber_Makefile.in << 'END-of-patches/patch-=
 decNumber_Makefile.in'
 X$NetBSD$
 X
 X--- decNumber/Makefile.in.orig	2010-03-07 12:04:48.000000000 +0000
 X+++ decNumber/Makefile.in
 X@@ -260,7 +260,7 @@ decNumber_SRC =3D decContext.c \
 X @BUILD_SHARED_FALSE@XSTATIC =3D -static
 X @BUILD_SHARED_TRUE@XSTATIC =3D=20
 X @OPTION_DYNAMIC_LOAD_FALSE@LTDL =3D=20
 X-@OPTION_DYNAMIC_LOAD_TRUE@LTDL =3D ../ltdl.c
 X+@OPTION_DYNAMIC_LOAD_TRUE@LTDL =3D=20
 X @OPTION_DYNAMIC_LOAD_FALSE@LIB_LD_FLAGS =3D $(XSTATIC)    \
 X @OPTION_DYNAMIC_LOAD_FALSE@		   -no-undefined \
 X @OPTION_DYNAMIC_LOAD_FALSE@		   -avoid-version
 END-of-patches/patch-decNumber_Makefile.in
 exit

 Regards,
 -Olaf.
 --=20
 ___ Olaf 'Rhialto' Seibert  -- There's no point being grown-up if you=20
 \X/ rhialto/at/xs4all.nl    -- can't be childish sometimes. -The 4th Doctor

From: Rhialto <rhialto@falu.nl>
To: Ryo ONODERA <ryo_on@yk.rim.or.jp>
Cc: gnats-bugs@NetBSD.org, rhialto@falu.nl
Subject: Re: pkg/44894: update emulators/hercules to 3.07
Date: Mon, 2 May 2011 00:45:01 +0200

 I didn't try to do a "make package" before sending the previous mail.
 Somehow, the use of libtool doesn't make the .a files that it now
 expects. There are a whole bunch of errors like

 pkg_create: can't stat
 `/home/rhialto/tmp/emulators/hercules/work.x86_64/.destdir/usr/pkg/lib/hercules/dyngui.a'
 pkg_create: can't stat
 `/home/rhialto/tmp/emulators/hercules/work.x86_64/.destdir/usr/pkg/lib/hercules/dyninst.a'
 pkg_create: can't stat
 `/home/rhialto/tmp/emulators/hercules/work.x86_64/.destdir/usr/pkg/lib/hercules/hdt1052c.a'
 ...

 I'm not sure why they are expected now, since they were also not there
 with the package as I submitted it, and there it was ok...

 I'll have to look more at that later, not right now (sorry).

 -Olaf.
 -- 
 ___ Olaf 'Rhialto' Seibert  -- There's no point being grown-up if you 
 \X/ rhialto/at/xs4all.nl    -- can't be childish sometimes. -The 4th Doctor

From: Ryo ONODERA <ryo_on@yk.rim.or.jp>
To: gnats-bugs@NetBSD.org, rhialto@falu.nl
Cc: 
Subject: Re: pkg/44894: update emulators/hercules to 3.07
Date: Mon, 02 May 2011 07:49:13 +0900 (JST)

 Hi,

 Thanks for your investigation.
 I will try your patches.

 Thank you very much.

 --
 Ryo ONODERA // ryo_on@yk.rim.or.jp
 PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


From: Ryo ONODERA <ryo_on@yk.rim.or.jp>
To: gnats-bugs@NetBSD.org, rhialto@falu.nl
Cc: 
Subject: Re: pkg/44894: update emulators/hercules to 3.07
Date: Mon, 02 May 2011 07:57:43 +0900 (JST)

 Hi,

 For me, this patch for Makefile.in fixes 'make package'.
 Probably, for solution, editing configure.ac is needed.
 But, if this patch is O.K., I will commit hercules-3.07.

  install-exec-hook:
 -@BUILD_SHARED_TRUE@    rm -f $(DESTDIR)$(libdir)/libherc*.a
 -@BUILD_SHARED_TRUE@    rm -f $(DESTDIR)$(modexecdir)/dyn*.a
 -@BUILD_SHARED_TRUE@    rm -f $(DESTDIR)$(modexecdir)/hdt*.a
 +#@BUILD_SHARED_TRUE@   rm -f $(DESTDIR)$(libdir)/libherc*.a
 +#@BUILD_SHARED_TRUE@   rm -f $(DESTDIR)$(modexecdir)/dyn*.a
 +#@BUILD_SHARED_TRUE@   rm -f $(DESTDIR)$(modexecdir)/hdt*.a
  @BUILD_SHARED_FALSE@   rm -f $(DESTDIR)$(libdir)/libherc*

 --
 Ryo ONODERA // ryo_on@yk.rim.or.jp
 PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


From: Rhialto <rhialto@falu.nl>
To: Ryo ONODERA <ryo_on@yk.rim.or.jp>
Cc: gnats-bugs@NetBSD.org, rhialto@falu.nl
Subject: Re: pkg/44894: update emulators/hercules to 3.07
Date: Mon, 2 May 2011 01:00:10 +0200

 Hello,

 On Mon 02 May 2011 at 07:57:43 +0900, Ryo ONODERA wrote:
 > For me, this patch for Makefile.in fixes 'make package'.
 > Probably, for solution, editing configure.ac is needed.
 > But, if this patch is O.K., I will commit hercules-3.07.

 I think that looks good enough. If I have time, I'll have another look
 and see if it can be improved further.

 Thanks!
 -Olaf.
 -- 
 ___ Olaf 'Rhialto' Seibert  -- There's no point being grown-up if you 
 \X/ rhialto/at/xs4all.nl    -- can't be childish sometimes. -The 4th Doctor

From: "Ryo ONODERA" <ryoon@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/44894 CVS commit: pkgsrc/emulators/hercules
Date: Sun, 1 May 2011 23:28:59 +0000

 Module Name:	pkgsrc
 Committed By:	ryoon
 Date:		Sun May  1 23:28:59 UTC 2011

 Modified Files:
 	pkgsrc/emulators/hercules: Makefile PLIST distinfo
 Added Files:
 	pkgsrc/emulators/hercules/patches: patch-Makefile.in patch-configure
 	    patch-crypto_Makefile.in patch-decNumber_Makefile.in
 	    patch-hercifc.h patch-hostopts.h patch-hstructs.h patch-scsitape.c
 	    patch-tapecopy.c patch-tapedev.h
 Removed Files:
 	pkgsrc/emulators/hercules/patches: patch-aa patch-ab patch-ac patch-ad
 	    patch-ae patch-af patch-ag patch-ah patch-aj patch-ak patch-al
 	    patch-am patch-an patch-ao patch-ap patch-aq patch-ar patch-as
 	    patch-at patch-au patch-av patch-aw

 Log Message:
 Update to 3.07

 Fix PR pkg/44894

 Changelog is to long.
 See CHANGES file in tar ball.


 To generate a diff of this commit:
 cvs rdiff -u -r1.24 -r1.25 pkgsrc/emulators/hercules/Makefile
 cvs rdiff -u -r1.2 -r1.3 pkgsrc/emulators/hercules/PLIST
 cvs rdiff -u -r1.10 -r1.11 pkgsrc/emulators/hercules/distinfo
 cvs rdiff -u -r0 -r1.1 pkgsrc/emulators/hercules/patches/patch-Makefile.in \
     pkgsrc/emulators/hercules/patches/patch-configure \
     pkgsrc/emulators/hercules/patches/patch-crypto_Makefile.in \
     pkgsrc/emulators/hercules/patches/patch-decNumber_Makefile.in \
     pkgsrc/emulators/hercules/patches/patch-hercifc.h \
     pkgsrc/emulators/hercules/patches/patch-hostopts.h \
     pkgsrc/emulators/hercules/patches/patch-hstructs.h \
     pkgsrc/emulators/hercules/patches/patch-scsitape.c \
     pkgsrc/emulators/hercules/patches/patch-tapecopy.c \
     pkgsrc/emulators/hercules/patches/patch-tapedev.h
 cvs rdiff -u -r1.8 -r0 pkgsrc/emulators/hercules/patches/patch-aa
 cvs rdiff -u -r1.1.1.1 -r0 pkgsrc/emulators/hercules/patches/patch-ab \
     pkgsrc/emulators/hercules/patches/patch-ae
 cvs rdiff -u -r1.2 -r0 pkgsrc/emulators/hercules/patches/patch-ac \
     pkgsrc/emulators/hercules/patches/patch-ad \
     pkgsrc/emulators/hercules/patches/patch-ag \
     pkgsrc/emulators/hercules/patches/patch-ah \
     pkgsrc/emulators/hercules/patches/patch-aj \
     pkgsrc/emulators/hercules/patches/patch-ak \
     pkgsrc/emulators/hercules/patches/patch-an
 cvs rdiff -u -r1.1 -r0 pkgsrc/emulators/hercules/patches/patch-af \
     pkgsrc/emulators/hercules/patches/patch-al \
     pkgsrc/emulators/hercules/patches/patch-am \
     pkgsrc/emulators/hercules/patches/patch-ao \
     pkgsrc/emulators/hercules/patches/patch-ap \
     pkgsrc/emulators/hercules/patches/patch-aq \
     pkgsrc/emulators/hercules/patches/patch-ar \
     pkgsrc/emulators/hercules/patches/patch-as \
     pkgsrc/emulators/hercules/patches/patch-at \
     pkgsrc/emulators/hercules/patches/patch-au \
     pkgsrc/emulators/hercules/patches/patch-av \
     pkgsrc/emulators/hercules/patches/patch-aw

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-By: ryoon@NetBSD.org
State-Changed-When: Mon, 02 May 2011 04:52:22 +0000
State-Changed-Why:
Updated. Thank you.


From: Rhialto <rhialto@falu.nl>
To: Ryo ONODERA <ryo_on@yk.rim.or.jp>
Cc: gnats-bugs@NetBSD.org, rhialto@falu.nl
Subject: Re: pkg/44894: update emulators/hercules to 3.07
Date: Mon, 2 May 2011 20:31:34 +0200

 Hi again,

 On Mon 02 May 2011 at 07:57:43 +0900, Ryo ONODERA wrote:
 > For me, this patch for Makefile.in fixes 'make package'.
 > Probably, for solution, editing configure.ac is needed.
 > But, if this patch is O.K., I will commit hercules-3.07.
 > 
 >  install-exec-hook:
 > -@BUILD_SHARED_TRUE@    rm -f $(DESTDIR)$(libdir)/libherc*.a
 > -@BUILD_SHARED_TRUE@    rm -f $(DESTDIR)$(modexecdir)/dyn*.a
 > -@BUILD_SHARED_TRUE@    rm -f $(DESTDIR)$(modexecdir)/hdt*.a
 > +#@BUILD_SHARED_TRUE@   rm -f $(DESTDIR)$(libdir)/libherc*.a
 > +#@BUILD_SHARED_TRUE@   rm -f $(DESTDIR)$(modexecdir)/dyn*.a
 > +#@BUILD_SHARED_TRUE@   rm -f $(DESTDIR)$(modexecdir)/hdt*.a
 >  @BUILD_SHARED_FALSE@   rm -f $(DESTDIR)$(libdir)/libherc*

 I think I have found an even better solution now. There is a Makefile
 (.in, .am) variable named XSTATIC which can be patched to "-shared",
 and it will be included in the link command line for libraries and
 modules:

 Makefile.in:
 @@ -683,11 +683,11 @@
  # -avoid-version  : needed.. Otherwise libtool gives crazy names to Windows
  #                   DLLs
  #
 -@BUILD_SHARED_TRUE@XSTATIC = 
 +@BUILD_SHARED_TRUE@XSTATIC = -shared
  @OPTION_DYNAMIC_LOAD_FALSE@DYNSRC = $(dyndev_SRC)

 If set on the linker command line, the .a files are not built at all,
 and also not mentioned in the .la files. That was why the "make package"
 was complaining: it checked that all library files mentioned in the .la
 file were present.

 The way Hercules builds the .a files and then not installs them seems
 unportable to me.

 I have built a package, it took a while, and testing with the "VM/370
 sixpack", it works!

 I'll see if I can report some of these patches upstream.

 The full version of patch-Makefile.in is then:


 $NetBSD: patch-Makefile.in,v 1.1 2011/05/01 23:28:58 ryoon Exp $

 * Fix build. Use devel/libltdl instead of internal libltdl.

 --- Makefile.in.orig	2010-03-07 12:04:49.000000000 +0000
 +++ Makefile.in
 @@ -304,13 +304,13 @@ libherct_la_OBJECTS = $(am_libherct_la_O
  libhercu_la_DEPENDENCIES = $(am__DEPENDENCIES_1) libhercs.la
  am__libhercu_la_SOURCES_DIST = version.c hscutl.c hscutl2.c codepage.c \
  	logger.c logmsg.c hdl.c hostinfo.c hsocket.c memrchr.c \
 -	parser.c pttrace.c fthreads.c fishhang.c ltdl.c
 +	parser.c pttrace.c fthreads.c fishhang.c
  am__objects_5 = fthreads.lo
  @BUILD_FTHREADS_TRUE@am__objects_8 = $(am__objects_5)
  am__objects_6 = fishhang.lo
  @BUILD_FISHHANG_TRUE@@BUILD_FTHREADS_TRUE@am__objects_9 =  \
  @BUILD_FISHHANG_TRUE@@BUILD_FTHREADS_TRUE@	$(am__objects_6)
 -@OPTION_DYNAMIC_LOAD_TRUE@am__objects_10 = ltdl.lo
 +@OPTION_DYNAMIC_LOAD_TRUE@am__objects_10 =
  am_libhercu_la_OBJECTS = version.lo hscutl.lo hscutl2.lo codepage.lo \
  	logger.lo logmsg.lo hdl.lo hostinfo.lo hsocket.lo memrchr.lo \
  	parser.lo pttrace.lo $(am__objects_8) $(am__objects_9) \
 @@ -614,7 +614,7 @@ AUTOMAKE_OPTIONS = foreign 1.5
  ACLOCAL_AMFLAGS = -I m4
  lns = @LN_S@
  SUBDIRS = decNumber m4 po util html man . crypto
 -LDADD = @LTLIBICONV@ @LTLIBINTL@ @LIBS@
 +LDADD = @LTLIBICONV@ @LTLIBINTL@ @LIBS@ -lltdl
  AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/decNumber
  @BUILD_HERCIFC_FALSE@HERCIFC = 
  @BUILD_HERCIFC_TRUE@HERCIFC = hercifc
 @@ -683,11 +683,11 @@ dyndev_SRC = commadpt.c  \
  # -avoid-version  : needed.. Otherwise libtool gives crazy names to Windows
  #                   DLLs
  #
 -@BUILD_SHARED_TRUE@XSTATIC = 
 +@BUILD_SHARED_TRUE@XSTATIC = -shared
  @OPTION_DYNAMIC_LOAD_FALSE@DYNSRC = $(dyndev_SRC)
  @OPTION_DYNAMIC_LOAD_TRUE@DYNSRC = 
  @OPTION_DYNAMIC_LOAD_FALSE@LTDL = 
 -@OPTION_DYNAMIC_LOAD_TRUE@LTDL = ltdl.c
 +@OPTION_DYNAMIC_LOAD_TRUE@LTDL =
  @OPTION_DYNAMIC_LOAD_FALSE@DYNMOD_LD_FLAGS = 
  @OPTION_DYNAMIC_LOAD_TRUE@DYNMOD_LD_FLAGS = -module         \
  @OPTION_DYNAMIC_LOAD_TRUE@                   -no-undefined    \
 @@ -914,7 +914,6 @@ EXTRA_libherc_la_SOURCES = $(fthreads_SR
                               $(dynamic_SRC)   \
                               $(extra_SRC)     \
                               $(dyndev_SRC)    \
 -                             ltdl.c

  libherc_la_LDFLAGS = $(LIB_LD_FLAGS)
  libherc_la_LIBADD = libhercs.la     \
 @@ -1166,7 +1165,6 @@ noinst_HEADERS = fishhang.h     \
                   hdl.h          \
                   crypto.h       \
                   sockdev.h      \
 -                 ltdl.h         \
                   herc_getopt.h  \
                   service.h      \
                   chsc.h         \

 Cheers,
 -Olaf.
 -- 
 ___ Olaf 'Rhialto' Seibert  -- There's no point being grown-up if you 
 \X/ rhialto/at/xs4all.nl    -- can't be childish sometimes. -The 4th Doctor

From: "Ryo ONODERA" <ryoon@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/44894 CVS commit: pkgsrc/emulators/hercules
Date: Fri, 6 May 2011 13:12:48 +0000

 Module Name:	pkgsrc
 Committed By:	ryoon
 Date:		Fri May  6 13:12:48 UTC 2011

 Modified Files:
 	pkgsrc/emulators/hercules: distinfo
 	pkgsrc/emulators/hercules/patches: patch-Makefile.in

 Log Message:
 PR pkg/44894

 * Improve patch for Makefile.in. No functional change.

 Thank you, Rhialto.


 To generate a diff of this commit:
 cvs rdiff -u -r1.11 -r1.12 pkgsrc/emulators/hercules/distinfo
 cvs rdiff -u -r1.1 -r1.2 pkgsrc/emulators/hercules/patches/patch-Makefile.in

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.