Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Dec 2013 23:32:27 +0000 (UTC)
From:      Dmitry Marakasov <amdmi3@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r337103 - in head/games/osgg: . files
Message-ID:  <201312202332.rBKNWRW8004698@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: amdmi3
Date: Fri Dec 20 23:32:26 2013
New Revision: 337103
URL: http://svnweb.freebsd.org/changeset/ports/337103

Log:
  - Support staging
  - Fix segfault when built with clang

Deleted:
  head/games/osgg/pkg-plist
Modified:
  head/games/osgg/Makefile
  head/games/osgg/files/patch-main.cpp

Modified: head/games/osgg/Makefile
==============================================================================
--- head/games/osgg/Makefile	Fri Dec 20 23:32:15 2013	(r337102)
+++ head/games/osgg/Makefile	Fri Dec 20 23:32:26 2013	(r337103)
@@ -16,7 +16,12 @@ USE_GL=		yes
 
 WRKSRC=		${WRKDIR}/${PORTNAME}
 
-NO_STAGE=	yes
+PLIST_FILES=	bin/${PORTNAME}
+PORTDATA=	*
+
+post-extract:
+	@${FIND} -d ${WRKSRC} -name .svn -exec ${RM} -rf {} \;
+
 post-patch:
 	@${RM} -f ${WRKSRC}/osgg
 	@${REINPLACE_CMD} -e 's|"[a-z]*.txt"|DATADIR&|; s|endian.h|sys/&|' \
@@ -24,16 +29,12 @@ post-patch:
 
 do-build:
 	cd ${WRKSRC} && ${CXX} ${CXXFLAGS} `${SDL_CONFIG} --libs --cflags` \
-		-lGL -lSDL_image -lSDL_ttf -lSDL_mixer -o osgg \
+		-lGL -lSDL_image -lSDL_ttf -lSDL_mixer -o ${PORTNAME} \
 		-DDATADIR="\"${DATADIR}/\"" \
 	       	main.cpp text.cpp sound.cpp
 
 do-install:
-	${INSTALL_PROGRAM} ${WRKSRC}/osgg ${PREFIX}/bin/
-	${MKDIR} ${DATADIR}
-	${INSTALL_DATA} ${WRKSRC}/*.txt ${WRKSRC}/*.ogg ${WRKSRC}/Bandal.ttf \
-		${WRKSRC}/icon.png ${DATADIR}
-	${MKDIR} ${DATADIR}/levels
-	${INSTALL_DATA} ${WRKSRC}/levels/* ${DATADIR}/levels
+	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/
+	cd ${WRKSRC} && ${COPYTREE_SHARE} "*.txt *.ogg Bandal.ttf icon.png levels" ${STAGEDIR}${DATADIR}/
 
 .include <bsd.port.mk>

Modified: head/games/osgg/files/patch-main.cpp
==============================================================================
--- head/games/osgg/files/patch-main.cpp	Fri Dec 20 23:32:15 2013	(r337102)
+++ head/games/osgg/files/patch-main.cpp	Fri Dec 20 23:32:26 2013	(r337103)
@@ -1,5 +1,5 @@
---- main.cpp.orig	2013-09-13 20:24:16.310226753 +0400
-+++ main.cpp	2013-09-13 20:24:50.127352703 +0400
+--- main.cpp.orig	2009-03-14 01:46:04.000000000 +0300
++++ main.cpp	2013-12-21 03:29:52.401817465 +0400
 @@ -26,6 +26,7 @@
  #include <fstream>
  #include <iostream>
@@ -8,3 +8,11 @@
  
  #include <sys/time.h>
  
+@@ -340,6 +341,7 @@
+       }
+     }
+   }
++  return false;
+ }
+ 
+ void classBullets::shoot(entity owner, gPs velocity)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201312202332.rBKNWRW8004698>