On -current, net/tinyfugue doesn't build any longer because the
configure script is confused by the new linker warnings about rand(3)
etc.
* Use arc4random(), simply because it's easier than trying to make
tfconfig deal with linker warnings.
While here:
* Unobfuscate the symlink list.
* Drop groff dependency.
* Regen PLIST.
OK?
Index: Makefile
===================================================================
RCS file: /cvs/ports/net/tinyfugue/Makefile,v
retrieving revision 1.26
diff -u -p -r1.26 Makefile
--- Makefile 11 Mar 2013 11:35:57 -0000 1.26
+++ Makefile 11 Aug 2013 21:09:59 -0000
@@ -3,7 +3,7 @@
COMMENT= programmable MUD client, with macro support and more
PKGNAME= tinyfugue-4.0s1
-REVISION= 3
+REVISION= 4
DISTNAME= tf-40s1
CATEGORIES= net games
@@ -27,23 +27,27 @@ MAKE_ENV= TFVER="${DISTNAME:S/^tf-//}" \
MAKE_FILE= ${WRKSRC}/unix/Makefile
-USE_GROFF = Yes
NO_TEST= Yes
-SYMLINKS= kb-bash.tf,bind-bash.tf kb-emacs.tf,bind-emacs.tf \
- complete.tf,completion.tf factoral.tf,factorial.tf \
- filexfer.tf,file-xfer.tf local-eg.tf,local.tf.sample \
- psh.tf,pref-shell.tf spc-page.tf,space_page.tf \
- spedwalk.tf,speedwalk.tf stack-q.tf,stack_queue.tf \
- world-q.tf,worldqueue.tf
+SYMLINKS= kb-bash.tf bind-bash.tf \
+ kb-emacs.tf bind-emacs.tf \
+ complete.tf completion.tf \
+ factoral.tf factorial.tf \
+ filexfer.tf file-xfer.tf \
+ local-eg.tf local.tf.sample \
+ psh.tf pref-shell.tf \
+ spc-page.tf space_page.tf \
+ spedwalk.tf speedwalk.tf \
+ stack-q.tf stack_queue.tf \
+ world-q.tf worldqueue.tf
do-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/tinyfugue
${INSTALL_PROGRAM} ${WRKBUILD}/src/tf ${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/src/tf.1.nroffman ${PREFIX}/man/man1/tf.1
${INSTALL_DATA} ${WRKSRC}/tf-lib/* ${PREFIX}/share/tinyfugue
-.for i in ${SYMLINKS}
- ln -s ${i:C/,.*//} ${PREFIX}/share/tinyfugue/${i:C/.*,//}
+.for source target in ${SYMLINKS}
+ ln -s ${source} ${PREFIX}/share/tinyfugue/${target}
.endfor
.include <bsd.port.mk>
Index: patches/patch-src_port_h
===================================================================
RCS file: patches/patch-src_port_h
diff -N patches/patch-src_port_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_port_h 11 Aug 2013 21:09:59 -0000
@@ -0,0 +1,25 @@
+$OpenBSD$
+--- src/port.h.orig Sun Aug 11 22:56:24 2013
++++ src/port.h Sun Aug 11 23:00:53 2013
+@@ -246,7 +246,11 @@ extern char *sys_errlist[];
+ * not agree with RAND_MAX. We must not link with -lucb.
+ */
+
+-#ifdef HAVE_srandom
++#if defined(HAVE_arc4random) && defined(HAVE_arc4random_uniform)
++# define RAND() arc4random()
++# define SRAND(seed) /* empty */
++# define RRAND(lo,hi) (arc4random_uniform((hi)-(lo)) + (lo))
++#elif defined(HAVE_srandom)
+ # include <math.h>
+ # define RAND() (int)random()
+ # define SRAND(seed) srandom(seed)
+@@ -262,7 +266,7 @@ extern char *sys_errlist[];
+ # define RRAND(lo,hi) (RAND() % ((hi)-(lo)+1) + (lo))
+ # endif
+ # else
+- error "Don't have srand() or srandom()."
++# error "Don't have srand() or srandom()."
+ # endif
+ #endif
+
Index: patches/patch-unix_tfconfig
===================================================================
RCS file: /cvs/ports/net/tinyfugue/patches/patch-unix_tfconfig,v
retrieving revision 1.1
diff -u -p -r1.1 patch-unix_tfconfig
--- patches/patch-unix_tfconfig 20 Sep 2000 22:42:12 -0000 1.1
+++ patches/patch-unix_tfconfig 11 Aug 2013 21:09:59 -0000
@@ -1,7 +1,7 @@
$OpenBSD: patch-unix_tfconfig,v 1.1 2000/09/20 22:42:12 avsm Exp $
---- unix/tfconfig.orig Fri Apr 4 11:51:58 1997
-+++ unix/tfconfig Mon Jun 16 18:00:45 1997
-@@ -211,17 +211,17 @@
+--- unix/tfconfig.orig Sun Aug 11 22:53:07 2013
++++ unix/tfconfig Sun Aug 11 22:55:49 2013
+@@ -223,17 +223,17 @@ fi
echo
echo 'To change these locations type "n" now and edit the unix/Config file.'
@@ -29,4 +29,23 @@ $OpenBSD: patch-unix_tfconfig,v 1.1 2000
+# done
echo; echo
- echo "#define LIBDIR \"${LIBDIR}\"" >&4
+ rm -f ../src/Makefile ${AOUT}
+@@ -561,6 +561,8 @@ int main() {
+ raise(0);
+ setlocale(0, "C");
+ sigaction(0, NULL, NULL);
++ arc4random();
++ arc4random_uniform(0);
+ srand(0);
+ srandom(0);
+ strcasecmp(NULL, NULL);
+@@ -613,7 +615,8 @@ fi
+ for sym in \
+ bcopy bsearch bzero connect fileno getcwd gethostbyname getpwnam \
+ gettimeofday getwd h_errno hstrerror index kill memcpy memset raise \
+- setlocale sigaction srand srandom strcasecmp strchr strcmpi strcspn \
++ setlocale sigaction arc4random arc4random_uniform srand srandom \
++ strcasecmp strchr strcmpi strcspn \
+ strerror strftime stricmp strstr strtod strtol tzset waitpid
+ do
+ if egrep "(^|[^a-z_])_?_?${sym}([^a-z]|\$)" symtest.out >/dev/null; then
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/net/tinyfugue/pkg/PLIST,v
retrieving revision 1.8
diff -u -p -r1.8 PLIST
--- pkg/PLIST 15 Sep 2004 18:17:46 -0000 1.8
+++ pkg/PLIST 11 Aug 2013 21:09:59 -0000
@@ -1,5 +1,5 @@
@comment $OpenBSD: PLIST,v 1.8 2004/09/15 18:17:46 espie Exp $
-bin/tf
+@bin bin/tf
@man man/man1/tf.1
share/tinyfugue/
share/tinyfugue/README
--
Christian "naddy" Weisgerber [email protected]