[36690] trunk/dports/games/jnethack

takanori at macports.org takanori at macports.org
Sun May 11 18:38:27 PDT 2008


Revision: 36690
          http://trac.macosforge.org/projects/macports/changeset/36690
Author:   takanori at macports.org
Date:     2008-05-11 18:38:26 -0700 (Sun, 11 May 2008)

Log Message:
-----------
jnethack: version 3.4.3-0.10

Modified Paths:
--------------
    trunk/dports/games/jnethack/Portfile
    trunk/dports/games/jnethack/files/x11/patch-sys_unix_Makefile.src.diff

Added Paths:
-----------
    trunk/dports/games/jnethack/files/patch-sys_unix_Makefile.src.diff
    trunk/dports/games/jnethack/files/patch-sys_unix_Makefile.utl.diff

Modified: trunk/dports/games/jnethack/Portfile
===================================================================
--- trunk/dports/games/jnethack/Portfile	2008-05-12 00:11:54 UTC (rev 36689)
+++ trunk/dports/games/jnethack/Portfile	2008-05-12 01:38:26 UTC (rev 36690)
@@ -3,7 +3,7 @@
 PortSystem      1.0
 
 name            jnethack
-version         3.4.3-0.9
+version         3.4.3-0.10
 categories      games japanese
 maintainers     rutiler.net:kyut takanori
 description     Classic dungeon adventure game, translated in Japanese.
@@ -11,32 +11,25 @@
                 ${description}
 platforms       darwin
 homepage        http://jnethack.sourceforge.jp/
-#master_sites   sourceforge_jp:${name}/9091/:nh \
-#		sourceforge_jp:${name}/25190/:jnh
-set sfjpid_nh   9091
-set sfjpid_jnh  25190
-master_sites    http://keihanna.dl.sourceforge.jp/${name}/${sfjpid_nh}/:nh \
-                http://osdn.dl.sourceforge.jp/${name}/${sfjpid_nh}/:nh \
-                http://globalbase.dl.sourceforge.jp/${name}/${sfjpid_nh}/:nh \
-                http://jaist.dl.sourceforge.jp/${name}/${sfjpid_nh}/:nh \
-                http://keihanna.dl.sourceforge.jp/${name}/${sfjpid_jnh}/:jnh \
-                http://osdn.dl.sourceforge.jp/${name}/${sfjpid_jnh}/:jnh \
-                http://globalbase.dl.sourceforge.jp/${name}/${sfjpid_jnh}/:jnh \
-                http://jaist.dl.sourceforge.jp/${name}/${sfjpid_jnh}/:jnh
+master_sites    sourceforge_jp:${name}/9091/:nh \
+                sourceforge_jp:${name}/25190/:jnh
 set nethacksrc      "nethack-343-src.tgz"
 set jnethackpatch   "${name}-${version}.diff.gz"
 distfiles       ${nethacksrc}:nh \
                 ${jnethackpatch}:jnh
 patchfiles      patch-sys_unix_Makefile.doc.diff \
+                patch-sys_unix_Makefile.src.diff \
                 patch-sys_unix_Makefile.top.diff \
+                patch-sys_unix_Makefile.utl.diff \
                 patch-sys_unix_nethack.sh.diff \
                 patch-win_tty_termcap.c.diff \
                 patch-src_options.c.diff
 checksums       ${nethacksrc} sha1 c26537093c38152bc0fbcec20468d975b35f59fd \
-                ${jnethackpatch}  sha1 547acd967c75a6bc8d464821b41ed026c1c2bb3a
+                ${jnethackpatch}  sha1 68c6f118d7cef4776a9283b37f15c5c3a60873e8
 
 depends_build   port:bison \
-                port:flex
+                port:flex \
+                port:ncurses
 depends_run     port:cocot
 
 ## extract ##
@@ -57,14 +50,33 @@
                           x11/patch-win_X11_JNetHack.ad.diff
     }
 }
-post-patch {
-    reinplace "s|__PREFIX__|${prefix}|" "${worksrcpath}/sys/unix/Makefile.doc" \
-                                        "${worksrcpath}/sys/unix/Makefile.top" \
-                                        "${worksrcpath}/sys/unix/nethack.sh"
-}
 
 ## configure ##
 
+pre-configure {
+    set jn_cflags "${configure.cflags} ${configure.cppflags}"
+    set jn_ldflags ${configure.ldflags}
+
+    if {[variant_isset universal]} {
+        set jn_cflags "${jn_cflags} ${configure.universal_cflags}"
+    }
+
+    if {[variant_isset x11]} {
+        set jn_cflags "${jn_cflags} -I${x11prefix}/include"
+        set jn_ldflags "${jn_ldflags} -L${x11prefix}/lib"
+    }
+
+    foreach f {sys/unix/Makefile.doc
+               sys/unix/Makefile.src
+               sys/unix/Makefile.top
+               sys/unix/Makefile.utl
+               sys/unix/nethack.sh} {
+        reinplace "s|__PREFIX__|${prefix}|" ${worksrcpath}/${f}
+        reinplace "s|__CFLAGS__|${jn_cflags}|" ${worksrcpath}/${f}
+        reinplace "s|__LDFLAGS__|${jn_ldflags}|" ${worksrcpath}/${f}
+    }
+}
+
 configure.dir       ${worksrcpath}/sys/unix
 configure.cmd       /bin/sh
 configure.pre_args  setup.sh
@@ -100,14 +112,7 @@
 
 variant x11 {}
 
-variant universal {
-    post-patch {
-        reinplace "s|^CFLAGS = -W -g -O -I../include$|CFLAGS = ${configure.cflags} ${configure.universal_cflags} -I../include|" ${worksrcpath}/sys/unix/Makefile.src
-        reinplace "s|\$(LINK) \$(LFLAGS)|\$(LINK) \$(CFLAGS) \$(LFLAGS)|" ${worksrcpath}/sys/unix/Makefile.src
-        reinplace "s|^CFLAGS = -O -I../include$|CFLAGS = ${configure.cflags} ${configure.universal_cflags} -I../include|" ${worksrcpath}/sys/unix/Makefile.utl
-        reinplace "s|\$(CC) \$(LFLAGS)|\$(CC) \$(CFLAGS) \$(LFLAGS)|" ${worksrcpath}/sys/unix/Makefile.utl
-    }
-}
+variant universal {}
 
 livecheck.check regex
 livecheck.url   ${homepage}

Added: trunk/dports/games/jnethack/files/patch-sys_unix_Makefile.src.diff
===================================================================
--- trunk/dports/games/jnethack/files/patch-sys_unix_Makefile.src.diff	                        (rev 0)
+++ trunk/dports/games/jnethack/files/patch-sys_unix_Makefile.src.diff	2008-05-12 01:38:26 UTC (rev 36690)
@@ -0,0 +1,22 @@
+--- sys/unix/Makefile.src.orig	2008-05-12 09:35:18.000000000 +0900
++++ sys/unix/Makefile.src	2008-05-12 09:36:38.000000000 +0900
+@@ -36,7 +36,7 @@
+ # SHELL=E:/GEMINI2/MUPFEL.TTP
+ 
+ # Normally, the C compiler driver is used for linking:
+-LINK=$(CC)
++LINK=$(CC) __CFLAGS__
+ 
+ # Pick the SYSSRC and SYSOBJ lines corresponding to your desired operating
+ # system.
+@@ -154,8 +154,8 @@
+ # flags for debugging:
+ # CFLAGS = -g -I../include
+ 
+-CFLAGS = -W -g -O -I../include
+-LFLAGS = 
++CFLAGS = __CFLAGS__ -I../include
++LFLAGS = __LDFLAGS__
+ 
+ # The Qt and Be window systems are written in C++, while the rest of
+ # NetHack is standard C.  If using Qt, uncomment the LINK line here to get

Added: trunk/dports/games/jnethack/files/patch-sys_unix_Makefile.utl.diff
===================================================================
--- trunk/dports/games/jnethack/files/patch-sys_unix_Makefile.utl.diff	                        (rev 0)
+++ trunk/dports/games/jnethack/files/patch-sys_unix_Makefile.utl.diff	2008-05-12 01:38:26 UTC (rev 36690)
@@ -0,0 +1,22 @@
+--- sys/unix/Makefile.utl.orig	2008-05-12 10:17:59.000000000 +0900
++++ sys/unix/Makefile.utl	2008-05-12 10:19:33.000000000 +0900
+@@ -89,8 +89,8 @@
+ # flags for debugging:
+ # CFLAGS = -g -I../include
+ 
+-CFLAGS = -O -I../include
+-LFLAGS =
++CFLAGS = __CFLAGS__ -I../include
++LFLAGS = __LDFLAGS__
+ 
+ LIBS =
+  
+@@ -276,7 +276,7 @@
+ #	dependencies for recover
+ #
+ recover: $(RECOVOBJS)
+-	$(CC) $(LFLAGS) -o recover $(RECOVOBJS) $(LIBS)
++	$(CC) $(CFLAGS) $(LFLAGS) -o recover $(RECOVOBJS) $(LIBS)
+ 
+ recover.o: recover.c $(CONFIG_H) ../include/date.h
+ 

Modified: trunk/dports/games/jnethack/files/x11/patch-sys_unix_Makefile.src.diff
===================================================================
--- trunk/dports/games/jnethack/files/x11/patch-sys_unix_Makefile.src.diff	2008-05-12 00:11:54 UTC (rev 36689)
+++ trunk/dports/games/jnethack/files/x11/patch-sys_unix_Makefile.src.diff	2008-05-12 01:38:26 UTC (rev 36690)
@@ -1,16 +1,5 @@
 --- sys/unix/Makefile.src	2006-08-05 16:00:44.000000000 +0900
 +++ sys/unix/Makefile.src	2006-08-05 16:06:00.000000000 +0900
-@@ -154,8 +154,8 @@
- # flags for debugging:
- # CFLAGS = -g -I../include
- 
--CFLAGS = -W -g -O -I../include
--LFLAGS = 
-+CFLAGS = -O -I../include -I/usr/X11R6/include
-+LFLAGS = -L/usr/X11R6/lib
- 
- # The Qt and Be window systems are written in C++, while the rest of
- # NetHack is standard C.  If using Qt, uncomment the LINK line here to get
 @@ -227,8 +227,8 @@
  
  #

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080511/6ac8717e/attachment-0001.html


More information about the macports-changes mailing list