[92650] trunk/dports/games/dominion

ryandesign at macports.org ryandesign at macports.org
Wed May 2 17:10:53 PDT 2012


Revision: 92650
          https://trac.macports.org/changeset/92650
Author:   ryandesign at macports.org
Date:     2012-05-02 17:10:52 -0700 (Wed, 02 May 2012)
Log Message:
-----------
dominion: fix build error on Lion and later due to getline function; see #34278

Modified Paths:
--------------
    trunk/dports/games/dominion/Portfile

Added Paths:
-----------
    trunk/dports/games/dominion/files/patch-getline_conflict_fix.diff

Modified: trunk/dports/games/dominion/Portfile
===================================================================
--- trunk/dports/games/dominion/Portfile	2012-05-03 00:08:23 UTC (rev 92649)
+++ trunk/dports/games/dominion/Portfile	2012-05-03 00:10:52 UTC (rev 92650)
@@ -23,7 +23,10 @@
 
 depends_lib      port:ncurses
 
-patchfiles       patch-Makefile.am patch-Makefile.in
+patchfiles       patch-Makefile.am \
+                 patch-Makefile.in \
+                 patch-getline_conflict_fix.diff
+
 configure.args   --infodir=${prefix}/share/info \
                  --mandir=${prefix}/share/man
 destroot.keepdirs \

Added: trunk/dports/games/dominion/files/patch-getline_conflict_fix.diff
===================================================================
--- trunk/dports/games/dominion/files/patch-getline_conflict_fix.diff	                        (rev 0)
+++ trunk/dports/games/dominion/files/patch-getline_conflict_fix.diff	2012-05-03 00:10:52 UTC (rev 92650)
@@ -0,0 +1,53 @@
+--- misc.c.orig	2005-02-01 23:12:29.000000000 -0500
++++ misc.c	2012-04-30 20:24:08.000000000 -0400
+@@ -26,7 +26,7 @@
+ /* int interrupt() - handles interupts                             */
+ /* show_nation(np) - displays a nation's characteristics           */
+ /* free_nation_mark(wp,c) - tell us if the symbol is available     */
+-/* getline(s,n) - read a line from stdin, remove \n                */
++/* getline_internal(s,n) - read a line from stdin, remove \n       */
+ /* get_crypt_pass(prompt,s,w) - get password and encrypt           */
+ /* critical() - while writing, don't bug me!!                      */
+ /* noncritical() - normal operation                                */
+@@ -161,7 +161,7 @@
+   return 1;
+ }
+ 
+-void getline(char s[], int n)	/* read a line from stdin, remove \n */
++void getline_internal(char s[], int n)	/* read a line from stdin, remove \n */
+ {
+   fgets(s, n, stdin);
+   if (s[strlen(s)-1] == '\n') {	/* remove \n if it is there */
+--- printmap.c.orig	2005-02-02 00:03:29.000000000 -0500
++++ printmap.c	2012-04-30 20:24:08.000000000 -0400
+@@ -470,7 +470,7 @@
+ 
+   read_world(&world, WORLD_FILE);
+   fprintf(stderr, "Enter nation name: ");
+-  getline(nation, NAMELEN);
++  getline_internal(nation, NAMELEN);
+   user.id = get_nation_id(nation);
+   get_crypt_pass("Your password: ", passwd, NULL, NULL);
+   if (strcmp(world.nations[user.id].passwd, passwd)) {
+--- proto.h.orig	1997-05-22 15:39:19.000000000 -0400
++++ proto.h	2012-04-30 20:24:08.000000000 -0400
+@@ -100,7 +100,7 @@
+ int get_n_civil(Snation *np);
+ int free_nation_mark(Sworld *wp, Symbol c);
+ int get_n_soldiers(Snation *np);
+-void getline(char s[], int n);
++void getline_internal(char s[], int n);
+ void get_crypt_pass(char prompt[], char pass[], WINDOW *w, char def_pass[]);
+ void cpass(Snation *np, char pass[]);
+ int which_mark(int x, int y, Suser *up);
+--- user.c.orig	2005-02-01 23:11:58.000000000 -0500
++++ user.c	2012-04-30 20:24:08.000000000 -0400
+@@ -61,7 +61,7 @@
+   if (!innation)
+     {
+       printf("which nation would you like to play? ");
+-      getline(nation, NAMELEN);
++      getline_internal(nation, NAMELEN);
+     }
+   if ((user.id = get_nation_id(nation)) == -1) {
+     printf ("\r\nnation does not exist, sorry\r\n");
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120502/f2cd036b/attachment.html>


More information about the macports-changes mailing list