pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/40301: patch games/galaxa



>Number:         40301
>Category:       pkg
>Synopsis:       patch games/galaxa
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Dec 30 21:10:00 +0000 2008
>Originator:     Tim Larson
>Release:        
>Organization:
>Environment:
SunOS marcie 5.9 Generic_118558-34 sun4u sparc SUNW,Ultra-5_10
>Description:
Galaxa would not install on Solaris (and probably other platforms) due to some 
hardcoded assumptions in the existing patch.  This update abstracts them into 
the package Makefile using standard variables, and adds DESTDIR support too.

Two patch files are modified, one removed, and the Makefile changed.
>How-To-Repeat:

>Fix:
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/games/galaxa/Makefile,v
retrieving revision 1.18
diff -u -p -r1.18 Makefile
--- Makefile    19 Jan 2008 09:16:21 -0000      1.18
+++ Makefile    30 Dec 2008 21:03:20 -0000
@@ -11,12 +11,24 @@ MAINTAINER= pkgsrc-users%NetBSD.org@localhost
 HOMEPAGE=      
http://web.archive.org/web/2/http://www.newbreedsoftware.com/galaxa/
 COMMENT=       Space game based loosely on "Galaga"

+PKG_DESTDIR_SUPPORT=   user-destdir
+
 WRKSRC=                ${WRKDIR}/galaxa
 MAKE_FILE=     makefile
+MAKE_ENV+=     SOUNDS=${PREFIX}/share/galaxa/sounds
+MAKE_ENV+=     IMAGES=${PREFIX}/share/galaxa/images
+MAKE_ENV+=     DATA=${PREFIX}/share/galaxa
+MAKE_ENV+=     VARBASE=${VARBASE}
+
+INSTALLATION_DIRS+=    ${PREFIX}/share/galaxa/sounds
+INSTALLATION_DIRS+=    ${PREFIX}/share/galaxa/images
+INSTALLATION_DIRS+=    ${PREFIX}/share/doc/galaxa

-pre-install:
-       ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/galaxa
-       ${CP} ${WRKSRC}/README.txt ${PREFIX}/share/doc/galaxa
+do-install:
+       ${INSTALL_DATA} ${WRKSRC}/README.txt 
${DESTDIR}${PREFIX}/share/doc/galaxa
+       ${INSTALL_GAME} ${WRKSRC}/galaxa ${DESTDIR}${PREFIX}/bin
+       ${INSTALL_GAME_DATA} ${WRKSRC}/sounds/* 
${DESTDIR}${PREFIX}/share/galaxa/sounds
+       ${INSTALL_GAME_DATA} ${WRKSRC}/images/* 
${DESTDIR}${PREFIX}/share/galaxa/images

 .include "../../x11/libX11/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/games/galaxa/distinfo,v
retrieving revision 1.3
diff -u -p -r1.3 distinfo
--- distinfo    23 Feb 2005 23:11:58 -0000      1.3
+++ distinfo    30 Dec 2008 21:03:20 -0000
@@ -3,9 +3,8 @@ $NetBSD: distinfo,v 1.3 2005/02/23 23:11
 SHA1 (galaxa.0.1.tar.gz) = 63927c23783aa4b52a2a0ba9f533a73f43cb9e0b
 RMD160 (galaxa.0.1.tar.gz) = fe5e522a2217eeb263ea0e402959da4496d61cd1
 Size (galaxa.0.1.tar.gz) = 192068 bytes
-SHA1 (patch-aa) = f94baf25ea4bb080252a4eaa2b1124217ddec1e4
-SHA1 (patch-ab) = 1e79b7f423bf8d156c4820b10f05885545c3826a
+SHA1 (patch-aa) = 16cad2c5cde79b3d66c5a6b34866e5525fd7b54c
+SHA1 (patch-ab) = 6b62df1cbdef569f16aa29c601e0fbe83346f15a
 SHA1 (patch-ac) = 7a778ec3ea5647c522aa001b5759fa8580b68237
 SHA1 (patch-ad) = 34d91852e9958e458f5de5d58ebcadd778eda15c
 SHA1 (patch-ae) = 2a2588f5ac7b37e974427142a4b55f59205aea22
-SHA1 (patch-af) = fdae1acc4e91790366f112c78b5a079adcff9e4e
Index: patches/patch-aa
===================================================================
RCS file: /cvsroot/pkgsrc/games/galaxa/patches/patch-aa,v
retrieving revision 1.5
diff -u -p -r1.5 patch-aa
--- patches/patch-aa    14 Sep 1998 06:38:45 -0000      1.5
+++ patches/patch-aa    30 Dec 2008 21:03:20 -0000
@@ -1,16 +1,10 @@
-$NetBSD: patch-aa,v 1.5 1998/09/14 06:38:45 garbled Exp $
---- makefile.orig      Wed Apr 22 22:41:21 1998
-+++ makefile   Sun Sep 13 23:25:17 1998
-@@ -14,16 +14,21 @@
- OPTFLAG=
+--- makefile.orig      Thu Apr 23 00:41:21 1998
++++ makefile   Mon Dec 29 14:08:30 2008
+@@ -15,15 +15,16 @@

  POSTPROCESS=strip
-+INSTALLROOT=$(PREFIX)
-+SOUNDS=$(INSTALLROOT)/share/galaxa/sounds
-+IMAGES=$(INSTALLROOT)/share/galaxa/images
-+DATA=$(INSTALLROOT)/share/galaxa

-+DIRS= -DSOUNDS=\"$(SOUNDS)\" -DIMAGES=\"$(IMAGES)\" -DDATA=\"$(DATA)\"
++DIRS= -DSOUNDS=\"$(SOUNDS)\" -DIMAGES=\"$(IMAGES)\" -DDATA=\"$(DATA)\" 
-DVARBASE=\"$(VARBASE)\"

 -XLIB=-lX11
 -CFLAGS=
@@ -27,7 +21,7 @@ $NetBSD: patch-aa,v 1.5 1998/09/14 06:38


  OBJECTS=galaxa.o hints.o randnum.o setup.o text.o soundmgr.o
-@@ -39,30 +44,26 @@
+@@ -39,30 +40,15 @@


  galaxa:       $(OBJECTS)
@@ -36,20 +30,10 @@ $NetBSD: patch-aa,v 1.5 1998/09/14 06:38
        chmod 755 galaxa
        $(POSTPROCESS) galaxa

-+install: galaxa
-+      install -g games -o bin -m 2755 galaxa $(INSTALLROOT)/bin
-+      mkdir -p $(DATA)
-+      mkdir -p $(SOUNDS)
-+      mkdir -p $(IMAGES)
-+      install -g bin -o bin -m 0644 sounds/* $(SOUNDS)
-+      install -g bin -o bin -m 0644 images/* $(IMAGES)
-+      if [ ! -e /var/games/galaxa-highs.dat ]; then \
-+              install -g games -o bin -m 0664 galaxa-highs.dat /var/games ; \
-+      fi
-
--#-- App object--#
 +#-- Dependencies --#

+-#-- App object--#
+-
  galaxa.o:     galaxa.c hints.h randnum.h setup.h text.h soundmgr.h
 -      $(CC)   galaxa.c -c
 -
@@ -59,10 +43,9 @@ $NetBSD: patch-aa,v 1.5 1998/09/14 06:38
  hints.o:      hints.c hints.h
 -      $(CC)   hints.c -c
 -
--text.o:       text.c text.h
+ text.o:       text.c text.h
 -      $(CC)   text.c -c
 -
-+text.o:               text.c text.h
  soundmgr.o:   soundmgr.c soundmgr.h
 -      $(CC)   soundmgr.c -c
 -
Index: patches/patch-ab
===================================================================
RCS file: /cvsroot/pkgsrc/games/galaxa/patches/patch-ab,v
retrieving revision 1.3
diff -u -p -r1.3 patch-ab
--- patches/patch-ab    13 Sep 1998 20:55:15 -0000      1.3
+++ patches/patch-ab    30 Dec 2008 21:03:20 -0000
@@ -9,14 +9,14 @@ $NetBSD: patch-ab,v 1.3 1998/09/13 20:55
    /* Open file: */
 -
 -  fi = fopen("galaxa-highs.dat", "r");
-+  fi = fopen("/var/games/galaxa-highs.dat", "r");
++  fi = fopen("VARBASE/games/galaxa-highs.dat", "r");

    if (fi == NULL)
      {
        /* Set defaults: */

 -      perror("galaxa-highs.dat");
-+      perror("/var/games/galaxa-highs.dat");
++      perror("VARBASE/games/galaxa-highs.dat");

        for (i = 0; i < 10; i++)
        {
@@ -27,12 +27,12 @@ $NetBSD: patch-ab,v 1.3 1998/09/13 20:55
 -
 -  fi = fopen("galaxa-highs.dat", "w");
 +
-+    fi = fopen("/var/games/galaxa-highs.dat", "w");
++    fi = fopen("VARBASE/games/galaxa-highs.dat", "w");

    if (fi == NULL)
      {
 -      perror("galaxa-highs.dat");
-+      perror("/var/games/galaxa-highs.dat");
++      perror("VARBASE/games/galaxa-highs.dat");
      }
    else
      {
cvs diff: cannot find patches/patch-af



Home | Main Index | Thread Index | Old Index