New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Changeset 82718


Ignore:
Timestamp:
08/18/11 19:35:42 (4 years ago)
Author:
ryandesign@…
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
Location:
trunk/dports/games/digger
Files:
1 added
1 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/dports/games/digger/Portfile

    r65397 r82718  
    22 
    33PortSystem              1.0 
     4PortGroup               app 1.0 
    45 
    56name                    digger 
    67version                 20020314 
    7 revision                1 
     8revision                2 
    89categories              games 
    910platforms               darwin 
     
    2526depends_lib             path:lib/pkgconfig/sdl.pc:libsdl 
    2627 
    27 post-extract { 
    28     file copy ${filespath}/Makefile.darwin ${worksrcpath}/Makefile 
     28platform darwin { 
     29    patchfiles-append   patch-Makefile.sdl.diff 
    2930} 
    3031 
    3132use_configure           no 
     33 
     34variant universal {} 
     35 
     36build.args              -f Makefile.sdl \ 
     37                        CC="${configure.cc} [get_canonical_archflags]" 
    3238 
    3339destroot { 
     
    3844} 
    3945 
    40 platform darwin { 
    41     post-destroot { 
    42         xinstall -d ${destroot}${applications_dir}/Digger.app/Contents/MacOS 
    43         xinstall -m 755 ${filespath}/Digger.darwin \ 
    44             ${destroot}${applications_dir}/Digger.app/Contents/MacOS/Digger 
    45         reinplace "s|_PREFIX_|${prefix}|g" \ 
    46             ${destroot}${applications_dir}/Digger.app/Contents/MacOS/Digger 
     46app.executable          ${workpath}/${name} 
     47app.icon                ${filespath}/icon.png 
     48 
     49platform macosx { 
     50    post-extract { 
     51        xinstall ${filespath}/Digger.darwin ${workpath}/${name} 
     52    } 
     53    post-patch { 
     54        reinplace "s|_PREFIX_|${prefix}|g" ${workpath}/${name} 
    4755    } 
    4856} 
  • trunk/dports/games/digger/files/patch-Makefile.sdl.diff

    r82674 r82718  
    1 CC      ?= gcc 
    2 CFLAGS  += -O -g -pipe -Wall -D_SDL 
    3 OBJS    = main.o digger.o drawing.o sprite.o scores.o record.o sound.o \ 
    4                         newsnd.o ini.o input.o monster.o bags.o alpha.o vgagrafx.o \ 
    5                         title_gz.o icon.o sdl_kbd.o sdl_vid.o sdl_timer.o sdl_snd.o 
    6  
    7 ARCH    = "DARWIN" 
    8 #ARCH   = "LINUX" 
    9 #ARCH   = "MINGW" 
    10 #ARCH   = "FREEBSD" 
    11 #ARCH   = "FooOS" 
    12  
    13 ifeq ($(ARCH),"DARWIN") 
    14 CC     = gcc 
    15 OBJS   += fbsd_sup.o 
    16 CFLAGS += -DDARWIN `sdl-config --cflags`/SDL 
    17 LIBS   += `sdl-config --libs` -lz -lobjc 
    18 endif 
    19  
    20 ifeq ($(ARCH),"MINGW") 
    21 CFLAGS  += -mno-cygwin -DMINGW -Dmain=SDL_main -I../zlib -I../SDL-1.1.2/include/SDL 
    22 LIBS    += -mno-cygwin -mwindows -lmingw32 -L../SDL-1.1.2/lib -lSDLmain -lSDL -luser32 -lgdi32 -lwinmm -L../zlib -lz 
    23 ESUFFIX =  .exe 
    24 endif 
    25  
    26 ifeq ($(ARCH),"FREEBSD") 
    27 OBJS    += fbsd_sup.o   # strup() 
    28 CFLAGS  += -DFREEBSD `sdl-config --cflags` 
    29 LIBS    += `sdl-config --libs` -lz 
    30 ESUFFIX = 
    31 endif 
    32  
    33 ifeq ($(ARCH),"LINUX") 
    34 OBJS    += fbsd_sup.o   # strup() 
    35 CFLAGS  += -DLINUX `sdl-config --cflags` 
    36 LIBS    += `sdl-config --libs` -lz 
    37 ESUFFIX = 
    38 endif 
    39  
    40 ifeq ($(ARCH),"FooOS") 
    41 OBJS    +=              # insert here the names of the files which contains various missing functions like strup() on Linux and FreeBSD 
    42 CFLAGS  += -DFooOS      # insert here additional compiler flags which required to find include files, trigger os-specific compiler behaviour etc. 
    43 LIBS    +=              # insert here libs required to compile like zlib, SDL etc 
    44 ESUFFIX =               # insert here suffix of the executable on your platform if any (like ".exe" on Win32) 
    45 endif 
    46  
    47 all: digger$(ESUFFIX) 
    48  
    49 digger$(ESUFFIX): $(OBJS) 
    50         $(CC) -o digger$(ESUFFIX) $(OBJS) $(LIBS) 
    51  
    52 $(OBJS): %.o: %.c 
    53         $(CC) -c $(CFLAGS) $< -o $@ 
    54  
    55 clean: 
    56         rm -f $(OBJS) digger$(ESUFFIX) 
     1--- Makefile.sdl.orig   2000-04-07 02:04:52.000000000 -0500 
     2+++ Makefile.sdl        2011-08-18 16:58:06.000000000 -0500 
     3@@ -4,7 +4,8 @@ 
     4                        newsnd.o ini.o input.o monster.o bags.o alpha.o vgagrafx.o \ 
     5                        title_gz.o icon.o sdl_kbd.o sdl_vid.o sdl_timer.o sdl_snd.o 
     6  
     7-ARCH   = "LINUX" 
     8+ARCH   = "DARWIN" 
     9+#ARCH  = "LINUX" 
     10 #ARCH  = "MINGW" 
     11 #ARCH  = "FREEBSD" 
     12 #ARCH  = "FooOS" 
     13@@ -15,6 +16,12 @@ 
     14 ESUFFIX        =  .exe 
     15 endif 
     16  
     17+ifeq ($(ARCH),"DARWIN") 
     18+OBJS   += fbsd_sup.o 
     19+CFLAGS += -DDARWIN `sdl-config --cflags` 
     20+LIBS   += `sdl-config --libs` -lz -lobjc 
     21+endif 
     22+ 
     23 ifeq ($(ARCH),"FREEBSD") 
     24 OBJS   += fbsd_sup.o   # strup() 
     25 CFLAGS += -DFREEBSD `sdl-config --cflags` 
Note: See TracChangeset for help on using the changeset viewer.