[arch-commits] Commit in foobillard/trunk (7 files)

Eric Bélanger eric at archlinux.org
Mon Jan 18 19:02:12 EST 2010


    Date: Monday, January 18, 2010 @ 19:02:11
  Author: eric
Revision: 63883

upgpkg: foobillard 3.0a-4
    Reuilt against libpng 1.4/libjpeg 8, Added bug fix and improvement patches, Fixed license, Updated url, Added man page, Added desktop file and icon, Added ChangeLog

Added:
  foobillard/trunk/03_bugfixes
  foobillard/trunk/05_foul_explanation
  foobillard/trunk/06_show_ball_to_hit
  foobillard/trunk/ChangeLog
  foobillard/trunk/foobillard.desktop
  foobillard/trunk/foobillard.png
Modified:
  foobillard/trunk/PKGBUILD

---------------------+
 03_bugfixes         |   36 ++++++
 05_foul_explanation |  262 ++++++++++++++++++++++++++++++++++++++++++++++++++
 06_show_ball_to_hit |  255 ++++++++++++++++++++++++++++++++++++++++++++++++
 ChangeLog           |   10 +
 PKGBUILD            |   29 ++++-
 foobillard.desktop  |    9 +
 6 files changed, 593 insertions(+), 8 deletions(-)

Added: 03_bugfixes
===================================================================
--- 03_bugfixes	                        (rev 0)
+++ 03_bugfixes	2010-01-19 00:02:11 UTC (rev 63883)
@@ -0,0 +1,36 @@
+Index: foobillard-3.0a/src/ball.c
+===================================================================
+--- foobillard-3.0a.orig/src/ball.c	2006-10-12 16:42:39.000000000 +0200
++++ foobillard-3.0a/src/ball.c	2006-10-12 16:42:48.000000000 +0200
+@@ -1821,6 +1821,7 @@
+             } else if( options_cuberef && cuberef_binds!=0 ){
+                 glBindTexture(GL_TEXTURE_CUBE_MAP_ARB, cuberef_binds[i]);
+ #ifdef GL_VERTEX_PROGRAM_NV
++#ifdef USE_BALL_FRESNEL
+                 {
+                     myvec cam_pos2;
+ //                    cam_pos2=vec_scale(vec_unit(vec_diff(cam_pos,balls.ball[i].r)),BALL_D/2.5);
+@@ -1829,6 +1830,7 @@
+                                            BALL_D/2.0,BALL_D/2.5,0,0 );
+                 }
+ #endif
++#endif
+                 draw_ball(&balls.ball[i],cam_pos,cam_FOV,win_width,0);
+             }else{
+                 draw_ball(&balls.ball[i],cam_pos,cam_FOV,win_width,0);
+Index: foobillard-3.0a/src/evaluate_move.c
+===================================================================
+--- foobillard-3.0a.orig/src/evaluate_move.c	2006-10-12 16:42:43.000000000 +0200
++++ foobillard-3.0a/src/evaluate_move.c	2006-10-12 16:42:48.000000000 +0200
+@@ -385,6 +385,11 @@
+     int ball_out;
+     int other_player=(act_player==1)?0:1;
+     int b1hit = BM_get_1st_ball_hit();  if (b1hit>=8) b1hit=1;
++    if(st.to_play==SN_DONE)
++    {
++        BM_reset_move_info();
++        return;
++    }
+ 
+     if( player[act_player].place_cue_ball ) player[act_player].place_cue_ball=0;
+     printf("EVAL start\n");

Added: 05_foul_explanation
===================================================================
--- 05_foul_explanation	                        (rev 0)
+++ 05_foul_explanation	2010-01-19 00:02:11 UTC (rev 63883)
@@ -0,0 +1,262 @@
+Index: foobillard-3.0a/src/billard3d.c
+===================================================================
+--- foobillard-3.0a.orig/src/billard3d.c	2006-10-12 16:44:17.000000000 +0200
++++ foobillard-3.0a/src/billard3d.c	2006-10-12 16:44:31.000000000 +0200
+@@ -331,6 +331,8 @@
+ static textObj * winner_name_text_obj;
+ static textObj * winner_text_obj;
+ 
++textObj * last_fault_text;
++
+ #ifndef _WIN32
+ 
+ enum optionType
+@@ -3322,6 +3324,13 @@
+        if( player[act_player].text != 0 ){
+            textObj_draw( player[act_player].text );
+        }
++       /* last fault */
++       if (strcmp("x", last_fault_text->str)!=0) {
++             glTranslatef(0.0, 70.0, 0.0);
++             textObj_draw(last_fault_text);
++             glTranslatef(0.0,-70.0,0.0);
++       }
++
+        glTranslatef(0,30,0);
+        if        (gametype==GAME_8BALL){
+            switch(player[act_player].half_full){
+@@ -5197,6 +5206,9 @@
+    }
+    DPRINTF("created winner text obj's\n");
+ 
++
++   last_fault_text = textObj_new( "x", options_help_fontname, 20 );
++
+    init_menu();
+ 
+    sys_set_timer(frametime_ms, Idle_timer);     /* assure a framerate of max 50 fps (1frame/20ms) */
+Index: foobillard-3.0a/src/evaluate_move.c
+===================================================================
+--- foobillard-3.0a.orig/src/evaluate_move.c	2006-10-12 16:44:22.000000000 +0200
++++ foobillard-3.0a/src/evaluate_move.c	2006-10-12 16:44:31.000000000 +0200
+@@ -4,6 +4,9 @@
+ **    Copyright (C) 2001  Florian Berger
+ **    Email: harpin_floh at yahoo.de, florian.berger at jk.uni-linz.ac.at
+ **
++**    Small changes to output a reason why the last shot was a fault by
++**    Thorsten Gunkel <tgunkel-lists at tgunkel.de>
++**
+ **    This program is free software; you can redistribute it and/or modify
+ **    it under the terms of the GNU General Public License Version 2 as
+ **    published by the Free Software Foundation;
+@@ -108,11 +111,12 @@
+ 
+     /* wenn fremde kugel zuerst angespielt -> foul */
+     first_ball_hit=BM_get_1st_ball_hit();
+-    if( player[act_player].half_full == BALL_FULL ){
+-        if ( first_ball_hit>8 && first_ball_hit<16 ) foul=1;
+-    }
+-    if( player[act_player].half_full == BALL_HALF ){
+-        if ( first_ball_hit>0 && first_ball_hit<8 ) foul=1;
++    if(
++       ( player[act_player].half_full == BALL_FULL && first_ball_hit>8 && first_ball_hit<16 ) ||
++       ( player[act_player].half_full == BALL_HALF && first_ball_hit>0 && first_ball_hit<8  )
++       ){
++      foul=1;
++      textObj_setText(last_fault_text, "First ball hit was not one of yours");
+     }
+ 
+     /* erst an 2. stelle, da oben kein foul bei break */
+@@ -146,7 +150,10 @@
+                 }
+             }
+         }
+-        if(eigene_da) foul=1;
++        if(eigene_da){
++          foul=1;
++          textObj_setText(last_fault_text, "You hit the 8-Ball too soon");
++        }
+     }
+ 
+     /* wenn angespielte kugel im strafraum */
+@@ -154,6 +161,7 @@
+         in_strafraum(BM_get_1st_ball_hit_pos()) &&
+         !BM_get_non_strafraum_wall_hit_before_1st_ball(in_strafraum) ){
+         foul=1;
++        textObj_setText(last_fault_text, "You hit a ball not behind the head string");
+     }
+ 
+     /* wenn eigene rein naechster */
+@@ -169,7 +177,10 @@
+     }
+ 
+ 
+-    if( BM_get_balls_hit()==0 ) foul=1;
++    if( BM_get_balls_hit()==0 ){
++      foul=1;
++      textObj_setText(last_fault_text, "No Ball hit");
++    }
+ 
+     /* wenn weisse rein */
+     if( BM_get_white_out() ){
+@@ -177,6 +188,7 @@
+         foul=1;
+         balls.ball[0].in_game=1;
+         balls.ball[0].in_hole=0;
++        textObj_setText(last_fault_text, "White ball potted");
+     }
+ 
+     /* wenn foul */
+@@ -188,6 +200,8 @@
+         balls.ball[0].w=vec_xyz(0.0,0.0,0.0);
+         balls.ball[0].r=vec_xyz(0.0,-TABLE_L/4.0,0.0);
+ //        balls.ball[0].r=vec_xyz(x,y,0.0);
++    } else {
++      textObj_setText(last_fault_text, "x");
+     }
+ 
+     /* if 8 out */
+@@ -221,6 +235,7 @@
+         else
+         {
+             player[(act_player==1)?0:1].winner=1;
++            textObj_setText(last_fault_text, "8 ball potted too soon");
+         }
+ 
+     }
+@@ -277,9 +292,15 @@
+         nextplayer=0;
+     }
+ 
+-    if( BM_get_balls_hit()==0 ) foul=1;
+-
+-    if( BM_get_1st_ball_hit()!=minball ) foul=1;
++    if( BM_get_balls_hit()==0 ){
++      textObj_setText(last_fault_text, "No Ball hit");
++      foul=1;
++    } else {
++      if( BM_get_1st_ball_hit()!=minball ){
++        textObj_setText(last_fault_text, "First ball hit was not the lowest");
++        foul=1;
++      }
++    }
+ 
+     /* wenn weisse rein */
+     if( BM_get_white_out() ){
+@@ -287,6 +308,7 @@
+         nextplayer=1;
+         pballs->ball[0].in_game=1;
+         pballs->ball[0].in_hole=0;
++        textObj_setText(last_fault_text, "White ball is potted");
+     }
+ 
+     /* wenn foul - weisse platzieren */
+@@ -297,6 +319,8 @@
+         pballs->ball[0].v=vec_xyz(0.0,0.0,0.0);
+         pballs->ball[0].w=vec_xyz(0.0,0.0,0.0);
+         pballs->ball[0].r=vec_xyz(0,-TABLE_L/4.0,0.0);
++    } else {
++      textObj_setText(last_fault_text, "x");
+     }
+ 
+     fprintf(stderr,"foul:%d, nextplayer:%d, BM_get_ball_out(9):%d\n",foul,nextplayer,BM_get_ball_out(9));
+@@ -409,6 +433,7 @@
+         act_penalty =MAX(act_penalty,(BM_get_1st_ball_hit()<=7?BM_get_1st_ball_hit():4));
+         spot_snooker_ball(pballs,0);
+         player[other_player].place_cue_ball=1;
++        textObj_setText(last_fault_text, "White ball is potted");
+     }
+ 
+     switch(st.to_play)
+@@ -420,6 +445,11 @@
+             foul=1;
+             act_penalty=MAX(act_penalty,b1hit);
+             printf("EVAL foul 1\n");
++            if( BM_get_balls_hit()==0 ){
++              textObj_setText(last_fault_text, "No Ball hit");
++            } else {
++              textObj_setText(last_fault_text, "First ball hit was not a red one");
++            }
+         }
+         i=1;
+         while((ball_out=BM_get_nth_ball_out(i++))>=0)
+@@ -434,6 +464,11 @@
+                 act_penalty=MAX(act_penalty,ball_out);
+                 foul=1;
+                 printf("EVAL foul 2\n");
++                if (BM_get_white_out()){
++                  textObj_setText(last_fault_text, "White ball potted");
++                } else {
++                  textObj_setText(last_fault_text, "Potted ball was not a red one");
++                }
+             }
+         }
+         for(i=2;i<8;i++)
+@@ -449,6 +484,11 @@
+             foul=1;
+             printf("EVAL foul 3\n");
+             act_penalty=MAX(act_penalty,7);
++            if( BM_get_balls_hit()==0 ){
++              textObj_setText(last_fault_text, "No Ball hit");
++            } else {
++              textObj_setText(last_fault_text, "First ball hit was not a colored one");
++            }
+         }
+         color_to_pot=b1hit;
+         i=1;
+@@ -464,6 +504,11 @@
+                 foul=1;
+                 printf("EVAL foul 4\n");
+                 act_penalty=MAX(act_penalty,ball_out==1?7:ball_out);
++                if (BM_get_white_out()){
++                  textObj_setText(last_fault_text, "White ball potted");
++                } else {
++                  textObj_setText(last_fault_text, "Potted ball was not a colored one");
++                }
+             }
+         }
+         if(red_balls_are_in_game)
+@@ -490,6 +535,11 @@
+             printf("EVAL foul 5\n");
+             act_penalty=MAX(act_penalty,b1hit);
+             act_penalty=MAX(act_penalty,color_to_pot);
++            if( BM_get_balls_hit()==0 ){
++              textObj_setText(last_fault_text, "No Ball hit");
++            } else {
++              textObj_setText(last_fault_text, "First ball hit was not the correct one");
++            }
+         }
+         i=1;
+         while((ball_out=BM_get_nth_ball_out(i++))>=0)
+@@ -505,6 +555,11 @@
+                 printf("EVAL foul 6\n");
+                 act_penalty=MAX(act_penalty,b1hit);
+                 act_penalty=MAX(act_penalty,color_to_pot);
++                if (BM_get_white_out()){
++                  textObj_setText(last_fault_text, "White ball potted");
++                } else {
++                  textObj_setText(last_fault_text, "Potted ball was not the correct one");
++                }
+             }
+         }
+         if(!foul && act_score>0) st.to_play++;
+@@ -528,6 +583,7 @@
+     {
+         player[act_player].score += act_score ;
+         printf("EVAL no foul\n");
++        textObj_setText(last_fault_text, "x");
+     }
+     if(act_score==0 || foul)
+     {
+Index: foobillard-3.0a/src/evaluate_move.h
+===================================================================
+--- foobillard-3.0a.orig/src/evaluate_move.h	2006-10-12 16:44:24.000000000 +0200
++++ foobillard-3.0a/src/evaluate_move.h	2006-10-12 16:44:31.000000000 +0200
+@@ -31,6 +31,7 @@
+                                     BallsType * pballs, int * pqueue_view, float * pXque );
+ #endif
+ 
++extern textObj * last_fault_text;
+ 
+ void evaluate_last_move_8ball    ( struct Player * player, int * actual_player,
+                                    BallsType * pballs, int * pqueue_view, float * pXque );

Added: 06_show_ball_to_hit
===================================================================
--- 06_show_ball_to_hit	                        (rev 0)
+++ 06_show_ball_to_hit	2010-01-19 00:02:11 UTC (rev 63883)
@@ -0,0 +1,255 @@
+Index: foobillard-3.0a/src/billard.c
+===================================================================
+--- foobillard-3.0a.orig/src/billard.c	2006-10-12 16:45:04.000000000 +0200
++++ foobillard-3.0a/src/billard.c	2006-10-12 16:45:23.000000000 +0200
+@@ -31,6 +31,8 @@
+ void * (*billard_malloc)( size_t size ) = malloc;
+ void (*billard_free)( void * ptr ) = free;
+ 
++SnookerState snooker_state={SN_PLAY_RED};
++
+ void setfunc_create_scene( void (*func)( BallsType * balls ) )
+ {
+     create_scene=func;
+Index: foobillard-3.0a/src/billard.h
+===================================================================
+--- foobillard-3.0a.orig/src/billard.h	2006-10-12 16:45:05.000000000 +0200
++++ foobillard-3.0a/src/billard.h	2006-10-12 16:45:23.000000000 +0200
+@@ -76,9 +76,30 @@
+ #define BALL_HALF 2
+ #define BALL_ANY  0
+ 
++typedef enum
++{
++   SN_PLAY_RED,
++   SN_PLAY_ANY_COLOR,
++   SN_PLAY_YELLOW,
++   SN_PLAY_GREEN,
++   SN_PLAY_BROWN,
++   SN_PLAY_BLUE,
++   SN_PLAY_PINK,
++   SN_PLAY_BLACK,
++   SN_DONE
++}
++SnookerBallToPlay;
++
++typedef struct
++{
++   SnookerBallToPlay to_play;
++}
++SnookerState;
++
+ #ifndef BILLARD_C
+ extern void (*create_scene)( BallsType * balls );
+ extern void (*create_walls)( BordersType * walls );
++extern SnookerState snooker_state;
+ #endif
+ 
+ void create_0hole_walls( BordersType * walls );   /* carambol */
+Index: foobillard-3.0a/src/billard3d.c
+===================================================================
+--- foobillard-3.0a.orig/src/billard3d.c	2006-10-12 16:45:08.000000000 +0200
++++ foobillard-3.0a/src/billard3d.c	2006-10-12 16:45:23.000000000 +0200
+@@ -829,6 +829,7 @@
+         player[act_player].place_cue_ball=1;
+         human_player_roster.player[0].cue_ball=0;   human_player_roster.player[1].cue_ball=0;
+         human_player_roster.player[act_player].place_cue_ball=1;
++        snooker_state.to_play=SN_PLAY_RED;
+     }
+ }
+ 
+@@ -1787,6 +1788,7 @@
+            /* score text */
+            for(i=0;i<2;i++){
+                char str[256];
++               char *color;
+                switch(gametype){
+                case GAME_8BALL: strcpy(str,"0"); break;
+                case GAME_9BALL:
+@@ -1805,7 +1807,44 @@
+                    sprintf( str, "%d", player[i].score );
+                    break;
+                case GAME_SNOOKER:
+-                   sprintf( str, "%c%03d  %s", (player[i].score<0)?'-':'+', abs(player[i].score), player[i].snooker_on_red ? "red":"col" );
++                   switch(snooker_state.to_play)
++                   {
++                   case SN_PLAY_RED:
++                       color="red";
++                       break;
++                   case SN_PLAY_ANY_COLOR:
++                       color="color";
++                       break;
++                   case SN_PLAY_YELLOW:
++                       color="yellow";
++                       break;
++                   case SN_PLAY_GREEN:
++                       color="green";
++                       break;
++                   case SN_PLAY_BROWN:
++                       color="brown";
++                       break;
++                   case SN_PLAY_BLUE:
++                       color="blue";
++                       break;
++                   case SN_PLAY_PINK:
++                       color="pink";
++                       break;
++                   case SN_PLAY_BLACK:
++                       color="black";
++                       break;
++                   case SN_DONE:
++                       color="";
++                       break;
++                   }
++                   if(i==act_player)
++                   {
++                       sprintf( str, "%.3d  %s", player[i].score, color);
++                   }
++                   else
++                   {
++                       sprintf( str, "%.3d", player[i].score);
++                   }
+                    break;
+                }
+                textObj_setText( player[i].score_text, str );
+Index: foobillard-3.0a/src/evaluate_move.c
+===================================================================
+--- foobillard-3.0a.orig/src/evaluate_move.c	2006-10-12 16:45:12.000000000 +0200
++++ foobillard-3.0a/src/evaluate_move.c	2006-10-12 16:45:23.000000000 +0200
+@@ -30,26 +30,6 @@
+ 
+ #define MAX(x,y) ((x)>(y)?(x):(y));
+ 
+-typedef enum
+-{
+-   SN_PLAY_RED,
+-   SN_PLAY_ANY_COLOR,
+-   SN_PLAY_YELLOW,
+-   SN_PLAY_GREEN,
+-   SN_PLAY_BROWN,
+-   SN_PLAY_BLUE,
+-   SN_PLAY_PINK,
+-   SN_PLAY_BLACK,
+-   SN_DONE
+-}
+-SnookerBallToPlay;
+-
+-typedef struct
+-{
+-   SnookerBallToPlay to_play;
+-}
+-SnookerState;
+-
+ 
+ void spot_snooker_ball(BallsType *balls,int nr);
+ 
+@@ -400,7 +380,6 @@
+ #define act_player (*pact_player)
+ #define IS_RED(x) ( x==1 || x>=8 )
+     int red_balls_are_in_game=0;
+-    static SnookerState st={SN_PLAY_RED};
+     int color_to_pot;
+     int i;
+     int act_score=0;
+@@ -409,7 +388,7 @@
+     int ball_out;
+     int other_player=(act_player==1)?0:1;
+     int b1hit = BM_get_1st_ball_hit();  if (b1hit>=8) b1hit=1;
+-    if(st.to_play==SN_DONE)
++    if(snooker_state.to_play==SN_DONE)
+     {
+         BM_reset_move_info();
+         return;
+@@ -417,7 +396,7 @@
+ 
+     if( player[act_player].place_cue_ball ) player[act_player].place_cue_ball=0;
+     printf("EVAL start\n");
+-    printf("EVAL to_play=%d\n",st.to_play);
++    printf("EVAL to_play=%d\n",snooker_state.to_play);
+     printf("EVAL b1hit=%d\n",b1hit);
+     for(i=0;i<pballs->nr;i++){
+         if( IS_RED(pballs->ball[i].nr) && pballs->ball[i].in_game ){
+@@ -436,7 +415,7 @@
+         textObj_setText(last_fault_text, "White ball is potted");
+     }
+ 
+-    switch(st.to_play)
++    switch(snooker_state.to_play)
+     {
+     case SN_PLAY_RED:
+         color_to_pot=1;
+@@ -476,7 +455,7 @@
+             if( BM_get_ball_out(i))
+                 spot_snooker_ball(pballs,i);
+         }
+-        st.to_play=SN_PLAY_ANY_COLOR;
++        snooker_state.to_play=SN_PLAY_ANY_COLOR;
+         break;
+     case SN_PLAY_ANY_COLOR:
+         if(b1hit==1)
+@@ -512,9 +491,9 @@
+             }
+         }
+         if(red_balls_are_in_game)
+-            st.to_play=SN_PLAY_RED;
++            snooker_state.to_play=SN_PLAY_RED;
+         else
+-            st.to_play=SN_PLAY_YELLOW;
++            snooker_state.to_play=SN_PLAY_YELLOW;
+ 
+         for(i=2;i<8;i++)
+         {
+@@ -528,7 +507,7 @@
+     case SN_PLAY_BLUE:
+     case SN_PLAY_PINK:
+     case SN_PLAY_BLACK:
+-        color_to_pot=st.to_play;
++        color_to_pot=snooker_state.to_play;
+         if(b1hit!=color_to_pot)
+         {
+             foul=1;
+@@ -562,9 +541,9 @@
+                 }
+             }
+         }
+-        if(!foul && act_score>0) st.to_play++;
++        if(!foul && act_score>0) snooker_state.to_play++;
+ 
+-        for(i=st.to_play;i<8;i++)
++        for(i=snooker_state.to_play;i<8;i++)
+         {
+             if( BM_get_ball_out(i))
+                 spot_snooker_ball(pballs,i);
+@@ -590,13 +569,13 @@
+         printf("EVAL next player\n");
+         if(red_balls_are_in_game)
+         {
+-            st.to_play=SN_PLAY_RED;
++            snooker_state.to_play=SN_PLAY_RED;
+         }
+         else
+         {
+-            if(st.to_play<=SN_PLAY_ANY_COLOR)
++            if(snooker_state.to_play<=SN_PLAY_ANY_COLOR)
+             {
+-                st.to_play=SN_PLAY_YELLOW;
++                snooker_state.to_play=SN_PLAY_YELLOW;
+             }
+         }
+         player[act_player].queue_view=*pqueue_view;
+@@ -605,11 +584,11 @@
+         *pqueue_view=player[act_player].queue_view;
+     }
+ 
+-    player[act_player].snooker_on_red=st.to_play==SN_PLAY_RED;
+-    player[act_player].snooker_next_color=st.to_play;
+-    printf("EVAL to_play=%d\n",st.to_play);
++    player[act_player].snooker_on_red=snooker_state.to_play==SN_PLAY_RED;
++    player[act_player].snooker_next_color=snooker_state.to_play;
++    printf("EVAL to_play=%d\n",snooker_state.to_play);
+ 
+-    if(st.to_play==SN_DONE)
++    if(snooker_state.to_play==SN_DONE)
+     {
+         int other_player;
+ 

Added: ChangeLog
===================================================================
--- ChangeLog	                        (rev 0)
+++ ChangeLog	2010-01-19 00:02:11 UTC (rev 63883)
@@ -0,0 +1,10 @@
+2010-01-18  Eric Belanger  <eric at archlinux.org>
+
+	* foobillard 3.0a-4
+	* Rebuilt for libpng 1.4 and libjpeg 8
+	* Added bug fix and improvement patches
+	* Fixed license
+	* Updated url
+	* Added man page
+	* Added desktop file and icon
+	* Added ChangeLog

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2010-01-18 23:54:32 UTC (rev 63882)
+++ PKGBUILD	2010-01-19 00:02:11 UTC (rev 63883)
@@ -1,23 +1,36 @@
 # $Id$
-# Maintainer: dale <dale at archlinux.org>
+# Maintainer: Eric Belanger <eric at archlinux.org>
 # Contributor: Tom Newsom <Jeepster at gmx.co.uk>
 
 pkgname=foobillard
 pkgver=3.0a
-pkgrel=3
+pkgrel=4
 pkgdesc="An OpenGL billiard game for Linux"
 arch=('i686' 'x86_64')
+url="http://foobillard.sourceforge.net/"
+license=('GPL2' 'custom')
 depends=('sdl' 'freetype2' 'libpng' 'libxaw' 'mesa' 'libxi')
-url="http://foobillard.sunsite.dk/"
-source=(http://foobillard.sunsite.dk/dnl/$pkgname-$pkgver.tar.gz)
-license=('GPL2')
-md5sums=('c2d92edeaaf8bfb18aa26f1c79931b7d')
+source=(ftp://ftp.archlinux.org/other/${pkgname}/${pkgname}-${pkgver}.tar.gz \
+        03_bugfixes 05_foul_explanation 06_show_ball_to_hit \
+        foobillard.desktop foobillard.png)
+md5sums=('c2d92edeaaf8bfb18aa26f1c79931b7d' '4400c87674b8a442c0cbbd619e118cd3'\
+         '0b79b9b71bebd7e0e1584f0593cc348d' 'eed13569ab099054619137eabce96045'\
+         '436f76ad44910a2524a38ff158bc32fc' '4bb47566197a252388bf49583536dd4d')
+sha1sums=('1caa51a201b55883640b5c5b1e9fde20fc71a095' '119aa2bfcfb2b074e0d9b441441808c22eacf625'\
+         '347535e3db4b04caab2f040779576229b2ce71ac' '11cff3e62fccd101cc85d58cc0d0eb4a1b99670f'\
+         '7e820e047497eae5f3d495cc8c61870d7b438a2e' '67db7b2a96784ff3baaeca9610414376210e5c49')
 
 build() {
   cd "${srcdir}/${pkgname}-${pkgver}"
+  patch -p1 < ../03_bugfixes || return 1
+  patch -p1 < ../05_foul_explanation || return 1
+  patch -p1 < ../06_show_ball_to_hit || return 1
+
   ./configure --prefix=/usr || return 1
-  # fix startup bug in youregon.ttf and freetype2
-  sed -i -e 's/youregon.ttf/bluebold.ttf/g' src/options.h || return 1
   make || return 1
   make DESTDIR="${pkgdir}" install || return 1
+  install -D -m644 foobillard.6 "${pkgdir}/usr/share/man/man6/foobillard.6" || return 1
+  install -D -m644 README.FONTS "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.FONTS" || return 1
+  install -D -m644 ../foobillard.desktop "${pkgdir}/usr/share/applications/foobillard.desktop" || return 1
+  install -D -m644 ../foobillard.png "${pkgdir}/usr/share/pixmaps/foobillard.png" || return 1
 }

Added: foobillard.desktop
===================================================================
--- foobillard.desktop	                        (rev 0)
+++ foobillard.desktop	2010-01-19 00:02:11 UTC (rev 63883)
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=Foobillard
+Comment=A 3D billiards game using OpenGL
+Exec=foobillard
+Icon=foobillard.png
+Terminal=false
+Type=Application
+Categories=Game;SportsGame;
+StartupNotify=false

Added: foobillard.png
===================================================================
(Binary files differ)


Property changes on: foobillard/trunk/foobillard.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream



More information about the arch-commits mailing list