[82718] trunk/dports/games/digger

ryandesign at macports.org ryandesign at macports.org
Thu Aug 18 19:35:43 PDT 2011


Revision: 82718
          http://trac.macports.org/changeset/82718
Author:   ryandesign at macports.org
Date:     2011-08-18 19:35:42 -0700 (Thu, 18 Aug 2011)
Log Message:
-----------
digger:

 * use app portgroup
 * ensure we're UsingTheRightCompiler and build arch
 * add universal variant
 * patch the existing Makefile.sdl rather than have our own separate copy

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

Added Paths:
-----------
    trunk/dports/games/digger/files/icon.png
    trunk/dports/games/digger/files/patch-Makefile.sdl.diff

Removed Paths:
-------------
    trunk/dports/games/digger/files/Makefile.darwin

Modified: trunk/dports/games/digger/Portfile
===================================================================
--- trunk/dports/games/digger/Portfile	2011-08-19 00:16:16 UTC (rev 82717)
+++ trunk/dports/games/digger/Portfile	2011-08-19 02:35:42 UTC (rev 82718)
@@ -1,10 +1,11 @@
 # $Id$
 
 PortSystem              1.0
+PortGroup               app 1.0
 
 name                    digger
 version                 20020314
-revision                1
+revision                2
 categories              games
 platforms               darwin
 maintainers             nomaintainer
@@ -24,12 +25,17 @@
 
 depends_lib             path:lib/pkgconfig/sdl.pc:libsdl
 
-post-extract {
-    file copy ${filespath}/Makefile.darwin ${worksrcpath}/Makefile
+platform darwin {
+    patchfiles-append   patch-Makefile.sdl.diff
 }
 
 use_configure           no
 
+variant universal {}
+
+build.args              -f Makefile.sdl \
+                        CC="${configure.cc} [get_canonical_archflags]"
+
 destroot {
     xinstall -d  ${destroot}${prefix}/share/doc/${name}
     xinstall -m 644 ${worksrcpath}/digger.txt \
@@ -37,14 +43,16 @@
     xinstall -m 755 -s ${worksrcpath}/digger ${destroot}${prefix}/bin
 }
 
-platform darwin {
-    post-destroot {
-        xinstall -d ${destroot}${applications_dir}/Digger.app/Contents/MacOS
-        xinstall -m 755 ${filespath}/Digger.darwin \
-            ${destroot}${applications_dir}/Digger.app/Contents/MacOS/Digger
-        reinplace "s|_PREFIX_|${prefix}|g" \
-            ${destroot}${applications_dir}/Digger.app/Contents/MacOS/Digger
+app.executable          ${workpath}/${name}
+app.icon                ${filespath}/icon.png
+
+platform macosx {
+    post-extract {
+        xinstall ${filespath}/Digger.darwin ${workpath}/${name}
     }
+    post-patch {
+        reinplace "s|_PREFIX_|${prefix}|g" ${workpath}/${name}
+    }
 }
 
 livecheck.type          regex

Deleted: trunk/dports/games/digger/files/Makefile.darwin
===================================================================
--- trunk/dports/games/digger/files/Makefile.darwin	2011-08-19 00:16:16 UTC (rev 82717)
+++ trunk/dports/games/digger/files/Makefile.darwin	2011-08-19 02:35:42 UTC (rev 82718)
@@ -1,56 +0,0 @@
-CC	?= gcc
-CFLAGS	+= -O -g -pipe -Wall -D_SDL
-OBJS	= main.o digger.o drawing.o sprite.o scores.o record.o sound.o \
-			newsnd.o ini.o input.o monster.o bags.o alpha.o vgagrafx.o \
-			title_gz.o icon.o sdl_kbd.o sdl_vid.o sdl_timer.o sdl_snd.o
-
-ARCH	= "DARWIN"
-#ARCH	= "LINUX"
-#ARCH	= "MINGW"
-#ARCH	= "FREEBSD"
-#ARCH	= "FooOS"
-
-ifeq ($(ARCH),"DARWIN")
-CC     = gcc
-OBJS   += fbsd_sup.o
-CFLAGS += -DDARWIN `sdl-config --cflags`/SDL
-LIBS   += `sdl-config --libs` -lz -lobjc
-endif
-
-ifeq ($(ARCH),"MINGW")
-CFLAGS	+= -mno-cygwin -DMINGW -Dmain=SDL_main -I../zlib -I../SDL-1.1.2/include/SDL
-LIBS	+= -mno-cygwin -mwindows -lmingw32 -L../SDL-1.1.2/lib -lSDLmain -lSDL -luser32 -lgdi32 -lwinmm -L../zlib -lz
-ESUFFIX	=  .exe
-endif
-
-ifeq ($(ARCH),"FREEBSD")
-OBJS	+= fbsd_sup.o	# strup()
-CFLAGS	+= -DFREEBSD `sdl-config --cflags`
-LIBS	+= `sdl-config --libs` -lz
-ESUFFIX	=
-endif
-
-ifeq ($(ARCH),"LINUX")
-OBJS	+= fbsd_sup.o	# strup()
-CFLAGS	+= -DLINUX `sdl-config --cflags`
-LIBS	+= `sdl-config --libs` -lz
-ESUFFIX	=
-endif
-
-ifeq ($(ARCH),"FooOS")
-OBJS	+=		# insert here the names of the files which contains various missing functions like strup() on Linux and FreeBSD
-CFLAGS	+= -DFooOS	# insert here additional compiler flags which required to find include files, trigger os-specific compiler behaviour etc.
-LIBS	+= 		# insert here libs required to compile like zlib, SDL etc
-ESUFFIX	=		# insert here suffix of the executable on your platform if any (like ".exe" on Win32)
-endif
-
-all: digger$(ESUFFIX)
-
-digger$(ESUFFIX): $(OBJS)
-	$(CC) -o digger$(ESUFFIX) $(OBJS) $(LIBS)
-
-$(OBJS): %.o: %.c
-	$(CC) -c $(CFLAGS) $< -o $@
-
-clean:
-	rm -f $(OBJS) digger$(ESUFFIX)

Added: trunk/dports/games/digger/files/icon.png
===================================================================
(Binary files differ)


Property changes on: trunk/dports/games/digger/files/icon.png
___________________________________________________________________
Added: svn:mime-type
   + image/png

Copied: trunk/dports/games/digger/files/patch-Makefile.sdl.diff (from rev 82674, trunk/dports/games/digger/files/Makefile.darwin)
===================================================================
--- trunk/dports/games/digger/files/patch-Makefile.sdl.diff	                        (rev 0)
+++ trunk/dports/games/digger/files/patch-Makefile.sdl.diff	2011-08-19 02:35:42 UTC (rev 82718)
@@ -0,0 +1,25 @@
+--- Makefile.sdl.orig	2000-04-07 02:04:52.000000000 -0500
++++ Makefile.sdl	2011-08-18 16:58:06.000000000 -0500
+@@ -4,7 +4,8 @@
+ 			newsnd.o ini.o input.o monster.o bags.o alpha.o vgagrafx.o \
+ 			title_gz.o icon.o sdl_kbd.o sdl_vid.o sdl_timer.o sdl_snd.o
+ 
+-ARCH	= "LINUX"
++ARCH	= "DARWIN"
++#ARCH	= "LINUX"
+ #ARCH	= "MINGW"
+ #ARCH	= "FREEBSD"
+ #ARCH	= "FooOS"
+@@ -15,6 +16,12 @@
+ ESUFFIX	=  .exe
+ endif
+ 
++ifeq ($(ARCH),"DARWIN")
++OBJS   += fbsd_sup.o
++CFLAGS += -DDARWIN `sdl-config --cflags`
++LIBS   += `sdl-config --libs` -lz -lobjc
++endif
++
+ ifeq ($(ARCH),"FREEBSD")
+ OBJS	+= fbsd_sup.o	# strup()
+ CFLAGS	+= -DFREEBSD `sdl-config --cflags`
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110818/0978cd06/attachment.html>


More information about the macports-changes mailing list