Bug 184290 - [MAINTAINER UPDATE] fix games/uqm build on FreeBSD 10.0
Summary: [MAINTAINER UPDATE] fix games/uqm build on FreeBSD 10.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Alex Kozlov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-25 19:10 UTC by Benjamin Lutz
Modified: 2013-11-30 08:00 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Lutz 2013-11-25 19:10:01 UTC
 UQM doesn't build on FreeBSD 10 because it assumes that gcc exists.

Fix: 

The patch makes it use plain "cc" instead of "gcc", which exists on all 
 FreeBSD versions. For this, there's a new patch file:
    files/patch-build-unix-config_proginfo_build
 
 Also it turns out that UQM depends on devel/pth.
 
 While here, update my email address and change the descriptions of the 
 options.
 
 --- uqm.patch begins here ---
 diff -ruN uqm.orig/Makefile uqm/Makefile
 --- uqm.orig/Makefile	2013-11-25 16:50:14.000000000 +0100
 +++ uqm/Makefile	2013-11-25 19:49:49.000000000 +0100
 @@ -1,4 +1,4 @@
 -# Created by: benlutz@datacomm.ch
 +# Created by: mail@maxlor.com
   # $FreeBSD: games/uqm/Makefile 327730 2013-09-20 17:36:33Z bapt $
 
   PORTNAME=	uqm
 @@ -9,13 +9,14 @@
   DISTFILES=	${PORTNAME}-${PORTVERSION}-source.tgz 
 ${PORTNAME}-${DATAVERSION}-content.uqm
   EXTRACT_ONLY=	${PORTNAME}-${PORTVERSION}-source.tgz
 
 -MAINTAINER=	benlutz@datacomm.ch
 +MAINTAINER=	mail@maxlor.com
   COMMENT=	Port of the original Star Control 2 for 3DO consoles
 
   LICENSE=	GPLv2
 
   LIB_DEPENDS=	vorbis:${PORTSDIR}/audio/libvorbis \
 -		mikmod:${PORTSDIR}/audio/libmikmod
 +		mikmod:${PORTSDIR}/audio/libmikmod \
 +		pth:${PORTSDIR}/devel/pth
 
   USES=		gmake pkgconfig
   USE_SDL=	image sdl
 @@ -23,14 +24,15 @@
   DATAVERSION=	0.7.0
 
   OPTIONS_DEFINE=	VOICE MUSIC OPENAL DOCS
 -MUSIC_DESC=	Music add-on
 -VOICE_DESC=	Voice add-on
 -OPTIONS_GROUP=	REMIXES
 +MUSIC_DESC=	3DO music add-on (18 MiB)
 +VOICE_DESC=	Speech add-on (109 MiB)
 +OPTIONS_GROUP=	SOUNDTRACK_REMIXES
   REMIX_PACKS=	1 2 3 4
 -.for i in ${REMIX_PACKS}
 -OPTIONS_GROUP_REMIXES+=REMIXPACK${i}
 -REMIXPACK${i}_DESC=	UQM Remix Pack ${i} add-on
 -.endfor
 +OPTIONS_GROUP_SOUNDTRACK_REMIXES= REMIX1 REMIX2 REMIX3 REMIX4
 +REMIX1_DESC=	"Super Meelee!"                  (47 MiB)
 +REMIX2_DESC=	"Neutral Aliens, Don't Shoot!"   (57 MiB)
 +REMIX3_DESC=	"Ur-Quan Hierarchy"              (38 MiB)
 +REMIX4_DESC=	"The New Alliance of Free Stars" (82 MiB)
 
   NO_STAGE=	yes
   .include <bsd.port.options.mk>
 @@ -54,12 +56,12 @@
   .endif
 
   .for i in ${REMIX_PACKS}
 -.	if ${PORT_OPTIONS:MREMIXPACK${i}}
 +.	if ${PORT_OPTIONS:MREMIX${i}}
   MASTER_SITES+= 
 SF/sc2/UQM%20Remix%20Packs/UQM%20Remix%20Pack%20${i}:remixpack${i}
   DISTFILES+=	${PORTNAME}-remix-disc${i}.uqm:remixpack${i}
 -PLIST_SUB+=	REMIXPACK${i}ADDON=""
 +PLIST_SUB+=	REMIX${i}ADDON=""
   .	else
 -PLIST_SUB+=	REMIXPACK${i}ADDON="@comment "
 +PLIST_SUB+=	REMIX${i}ADDON="@comment "
   .	endif
   .endfor
 
 @@ -73,7 +75,7 @@
   	${CP} ${DISTDIR}/${PORTNAME}-${DATAVERSION}-3domusic.uqm 
 ${WRKSRC}/content/addons/
   .endif
   .for i in ${REMIX_PACKS}
 -.	if ${PORT_OPTIONS:MREMIXPACK${i}}
 +.	if ${PORT_OPTIONS:MREMIX${i}}
   	${CP} ${DISTDIR}/${PORTNAME}-remix-disc${i}.uqm ${WRKSRC}/content/addons/
   .	endif
   .endfor
 diff -ruN uqm.orig/files/patch-build-unix-config_proginfo_build 
 uqm/files/patch-build-unix-config_proginfo_build
 --- uqm.orig/files/patch-build-unix-config_proginfo_build	1970-01-01 
 01:00:00.000000000 +0100
 +++ uqm/files/patch-build-unix-config_proginfo_build	2013-11-25 
 19:20:22.000000000 +0100
 @@ -0,0 +1,16 @@
 +--- build/unix/config_proginfo_build.orig	2011-05-20 21:25:22.000000000 
 +0200
 ++++ build/unix/config_proginfo_build	2013-11-25 19:19:42.000000000 +0100
 +@@ -166,10 +166,10 @@
 +
 +
 + ### gcc ###
 +-PROG_gcc_NAME="GNU C compiler"
 +-PROG_gcc_FILE="gcc"
 ++PROG_gcc_NAME="C compiler"
 ++PROG_gcc_FILE="cc"
 + PROG_gcc_ACTION=""
 +-PROG_gcc_VERSION='$(gcc --version)'
 ++PROG_gcc_VERSION='$(cc --version)'
 +
 +
 + ### sed ###
 --- uqm.patch ends here ---
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2013-11-26 00:52:53 UTC
Class Changed
From-To: sw-bug->maintainer-update

recover from formatting botch. 


Comment 2 Mark Linimon freebsd_committer freebsd_triage 2013-11-26 00:52:53 UTC
Responsible Changed
From-To: gnats-admin->freebsd-ports-bugs
Comment 3 Alex Kozlov freebsd_committer 2013-11-30 01:00:50 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ak

I'll take it.
Comment 4 dfilter service freebsd_committer 2013-11-30 07:51:17 UTC
Author: ak
Date: Sat Nov 30 07:51:09 2013
New Revision: 335266
URL: http://svnweb.freebsd.org/changeset/ports/335266

Log:
  - Fix build with clang [1]
  - Improve options description [1]
  - Update maintainer email [1]
  - Support STAGEDIR
  - Convert to new LIB_DEPENDS syntax
  - Convert to options helpers when possible
  
  PR:	ports/184290 (based on) [1]
  Submitted by:	Benjamin Lutz <mail@maxlor.com> (maintainer) [1]

Added:
  head/games/uqm/files/patch-build-unix-config_proginfo_build   (contents, props changed)
Modified:
  head/games/uqm/Makefile
  head/games/uqm/pkg-plist

Modified: head/games/uqm/Makefile
==============================================================================
--- head/games/uqm/Makefile	Sat Nov 30 07:08:51 2013	(r335265)
+++ head/games/uqm/Makefile	Sat Nov 30 07:51:09 2013	(r335266)
@@ -9,72 +9,57 @@ MASTER_SITES=	SF/sc2/UQM/${PORTVERSION:R
 DISTFILES=	${PORTNAME}-${PORTVERSION}-source.tgz ${PORTNAME}-${DATAVERSION}-content.uqm
 EXTRACT_ONLY=	${PORTNAME}-${PORTVERSION}-source.tgz
 
-MAINTAINER=	benlutz@datacomm.ch
+MAINTAINER=	mail@maxlor.com
 COMMENT=	Port of the original Star Control 2 for 3DO consoles
 
 LICENSE=	GPLv2
 
-LIB_DEPENDS=	vorbis:${PORTSDIR}/audio/libvorbis \
-		mikmod:${PORTSDIR}/audio/libmikmod
+LIB_DEPENDS=	libvorbis.so:${PORTSDIR}/audio/libvorbis \
+		libmikmod.so:${PORTSDIR}/audio/libmikmod \
+		libpth.so:${PORTSDIR}/devel/pth
 
 USES=		gmake pkgconfig
 USE_SDL=	image sdl
-NO_INSTALL_MANPAGES=	yes
 DATAVERSION=	0.7.0
 
 OPTIONS_DEFINE=	VOICE MUSIC OPENAL DOCS
-MUSIC_DESC=	Music add-on
-VOICE_DESC=	Voice add-on
-OPTIONS_GROUP=	REMIXES
+MUSIC_DESC=	3DO music add-on (18 MiB)
+VOICE_DESC=	Speech add-on (109 MiB)
+OPTIONS_GROUP=	SOUNDTRACK_REMIXES
 REMIX_PACKS=	1 2 3 4
-.for i in ${REMIX_PACKS}
-OPTIONS_GROUP_REMIXES+=REMIXPACK${i}
-REMIXPACK${i}_DESC=	UQM Remix Pack ${i} add-on
-.endfor
+OPTIONS_GROUP_SOUNDTRACK_REMIXES=	REMIX1 REMIX2 REMIX3 REMIX4
+REMIX1_DESC=	"Super Meelee!"                  (47 MiB)
+REMIX2_DESC=	"Neutral Aliens, Don't Shoot!"   (57 MiB)
+REMIX3_DESC=	"Ur-Quan Hierarchy"              (38 MiB)
+REMIX4_DESC=	"The New Alliance of Free Stars" (82 MiB)
+
+OPTIONS_SUB=	yes
+
+VOICE_DISTFILES=	${PORTNAME}-${DATAVERSION}-voice.uqm
+MUSIC_DISTFILES=	${PORTNAME}-${DATAVERSION}-3domusic.uqm
+OPENAL_USE=	OPENAL=al
 
-NO_STAGE=	yes
 .include <bsd.port.options.mk>
 
-.if ${PORT_OPTIONS:MVOICE}
-DISTFILES+=	${PORTNAME}-${DATAVERSION}-voice.uqm
-PLIST_SUB+=	VOICEADDON=""
-.else
-PLIST_SUB+=	VOICEADDON="@comment "
-.endif
-
-.if ${PORT_OPTIONS:MMUSIC}
-DISTFILES+=	${PORTNAME}-${DATAVERSION}-3domusic.uqm
-PLIST_SUB+=	MUSICADDON=""
-.else
-PLIST_SUB+=	MUSICADDON="@comment "
-.endif
-
-.if ${PORT_OPTIONS:MOPENAL}
-USE_OPENAL=	al
-.endif
-
 .for i in ${REMIX_PACKS}
-.	if ${PORT_OPTIONS:MREMIXPACK${i}}
+.	if ${PORT_OPTIONS:MREMIX${i}}
 MASTER_SITES+=	SF/sc2/UQM%20Remix%20Packs/UQM%20Remix%20Pack%20${i}:remixpack${i}
 DISTFILES+=	${PORTNAME}-remix-disc${i}.uqm:remixpack${i}
-PLIST_SUB+=	REMIXPACK${i}ADDON=""
-.	else
-PLIST_SUB+=	REMIXPACK${i}ADDON="@comment "
 .	endif
 .endfor
 
 post-extract:
-	${MKDIR} ${WRKSRC}/content/addons ${WRKSRC}/content/packages
-	${CP} ${DISTDIR}/${PORTNAME}-${DATAVERSION}-content.uqm ${WRKSRC}/content/packages/
-.ifdef(WITH_VOICE)
-	${CP} ${DISTDIR}/${PORTNAME}-${DATAVERSION}-voice.uqm ${WRKSRC}/content/addons/
+	@${MKDIR} ${WRKSRC}/content/addons ${WRKSRC}/content/packages
+	@${CP} ${DISTDIR}/${PORTNAME}-${DATAVERSION}-content.uqm ${WRKSRC}/content/packages/
+.if ${PORT_OPTIONS:MVOICE}
+	@${CP} ${DISTDIR}/${PORTNAME}-${DATAVERSION}-voice.uqm ${WRKSRC}/content/addons/
 .endif
-.ifdef(WITH_MUSIC)
-	${CP} ${DISTDIR}/${PORTNAME}-${DATAVERSION}-3domusic.uqm ${WRKSRC}/content/addons/
+.if	${PORT_OPTIONS:MMUSIC}
+	@${CP} ${DISTDIR}/${PORTNAME}-${DATAVERSION}-3domusic.uqm ${WRKSRC}/content/addons/
 .endif
 .for i in ${REMIX_PACKS}
-.	if ${PORT_OPTIONS:MREMIXPACK${i}}
-	${CP} ${DISTDIR}/${PORTNAME}-remix-disc${i}.uqm ${WRKSRC}/content/addons/
+.	if ${PORT_OPTIONS:MREMIX${i}}
+	@${CP} ${DISTDIR}/${PORTNAME}-remix-disc${i}.uqm ${WRKSRC}/content/addons/
 .	endif
 .endfor
 
@@ -88,7 +73,7 @@ do-configure:
 .endif
 	@${ECHO_CMD} CHOICE_mikmod_VALUE=\'external\' >> ${WRKSRC}/config.state
 	@${ECHO_CMD} CHOICE_ovcodec_VALUE=\'standard\' >> ${WRKSRC}/config.state
-.ifdef(NO_INET6)
+.if	${PORT_OPTIONS:MINET6}
 	@${ECHO_CMD} CHOICE_netplay_VALUE=\'full\' >> ${WRKSRC}/config.state
 .else
 	@${ECHO_CMD} CHOICE_netplay_VALUE=\'ipv4\' >> ${WRKSRC}/config.state
@@ -101,23 +86,21 @@ do-configure:
 	@${ECHO_CMD} CHOICE_accel_VALUE=\'plainc\' >> ${WRKSRC}/config.state
 .endif
 	@${ECHO_CMD} CHOICE_threadlib_VALUE=\'sdl\' >> ${WRKSRC}/config.state
-	@${ECHO_CMD} INPUT_install_prefix_VALUE=\'${PREFIX}\' >> ${WRKSRC}/config.state
+	@${ECHO_CMD} INPUT_install_prefix_VALUE=\'${STAGEDIR}${PREFIX}\' >> ${WRKSRC}/config.state
 	@${ECHO_CMD} INPUT_install_bindir_VALUE=\''$$prefix/bin'\' >> ${WRKSRC}/config.state
 	@${ECHO_CMD} INPUT_install_libdir_VALUE=\''$$prefix/lib'\' >> ${WRKSRC}/config.state
 	@${ECHO_CMD} INPUT_install_sharedir_VALUE=\''$$prefix/share'\' >> ${WRKSRC}/config.state
-	cd ${WRKSRC} && ${SETENV} LOCALBASE=${LOCALBASE} PREFIX=${PREFIX} ./build.sh uqm config
+	@(cd ${WRKSRC} && ${SETENV} LOCALBASE=${LOCALBASE} PREFIX=${PREFIX} ./build.sh uqm config)
 
 do-build:
-	cd ${WRKSRC} && ./build.sh uqm
+	@(cd ${WRKSRC} && ./build.sh uqm)
 
 do-install:
-	cd ${WRKSRC} && ./build.sh uqm install
+	@(cd ${WRKSRC} && ./build.sh uqm install)
 
 post-install:
-	${STRIP_CMD} ${PREFIX}/lib/uqm/uqm
-.if ${PORT_OPTIONS:MDOCS}
-	${MKDIR} ${DOCSDIR}
-	${INSTALL_MAN} ${WRKSRC}/doc/users/manual.txt ${DOCSDIR}
-.endif
+	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/uqm/uqm
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+	${INSTALL_DATA} ${WRKSRC}/doc/users/manual.txt ${STAGEDIR}${DOCSDIR}
 
 .include <bsd.port.mk>

Added: head/games/uqm/files/patch-build-unix-config_proginfo_build
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/uqm/files/patch-build-unix-config_proginfo_build	Sat Nov 30 07:51:09 2013	(r335266)
@@ -0,0 +1,16 @@
+--- build/unix/config_proginfo_build.orig	2011-05-20 21:25:22.000000000 +0200
++++ build/unix/config_proginfo_build	2013-11-25 19:19:42.000000000 +0100
+@@ -166,10 +166,10 @@
+
+
+ ### gcc ###
+-PROG_gcc_NAME="GNU C compiler"
+-PROG_gcc_FILE="gcc"
++PROG_gcc_NAME="C compiler"
++PROG_gcc_FILE="cc"
+ PROG_gcc_ACTION=""
+-PROG_gcc_VERSION='$(gcc --version)'
++PROG_gcc_VERSION='$(cc --version)'
+
+
+ ### sed ###

Modified: head/games/uqm/pkg-plist
==============================================================================
--- head/games/uqm/pkg-plist	Sat Nov 30 07:08:51 2013	(r335265)
+++ head/games/uqm/pkg-plist	Sat Nov 30 07:51:09 2013	(r335266)
@@ -2,12 +2,12 @@ bin/uqm
 lib/uqm/uqm
 %%DATADIR%%/content/packages/uqm-0.7.0-content.uqm
 %%DATADIR%%/content/version
-%%VOICEADDON%%%%DATADIR%%/content/addons/uqm-0.7.0-voice.uqm
-%%MUSICADDON%%%%DATADIR%%/content/addons/uqm-0.7.0-3domusic.uqm
-%%REMIXPACK1ADDON%%%%DATADIR%%/content/addons/uqm-remix-disc1.uqm
-%%REMIXPACK2ADDON%%%%DATADIR%%/content/addons/uqm-remix-disc2.uqm
-%%REMIXPACK3ADDON%%%%DATADIR%%/content/addons/uqm-remix-disc3.uqm
-%%REMIXPACK4ADDON%%%%DATADIR%%/content/addons/uqm-remix-disc4.uqm
+%%VOICE%%%%DATADIR%%/content/addons/uqm-0.7.0-voice.uqm
+%%MUSIC%%%%DATADIR%%/content/addons/uqm-0.7.0-3domusic.uqm
+%%REMIX1%%%%DATADIR%%/content/addons/uqm-remix-disc1.uqm
+%%REMIX2%%%%DATADIR%%/content/addons/uqm-remix-disc2.uqm
+%%REMIX3%%%%DATADIR%%/content/addons/uqm-remix-disc3.uqm
+%%REMIX4%%%%DATADIR%%/content/addons/uqm-remix-disc4.uqm
 @dirrm %%DATADIR%%/content/packages
 @dirrm %%DATADIR%%/content/addons
 @dirrm %%DATADIR%%/content
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 5 Alex Kozlov freebsd_committer 2013-11-30 07:52:18 UTC
State Changed
From-To: open->closed

Committed, with minor changes. Thanks!