Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Aug 2020 20:22:46 +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: r544349 - in head/games/ufoai: . files
Message-ID:  <202008072022.077KMkFI087066@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: amdmi3
Date: Fri Aug  7 20:22:46 2020
New Revision: 544349
URL: https://svnweb.freebsd.org/changeset/ports/544349

Log:
  - Fix detection of system jpeg by adding USES=localbase, this fixes crash on game start due to libraries conflict
  - Fix build failure on 12.x i386 related to linking with OpenAL
  - Remove most bundled third party librarues ti ensure they are not used
  - Add missing depends
  - Portlint nits
  - Modernize options handling
  - Silence patching
  - Simplify radiant data installation
  - Fix absolute symlink
  
  PR:		242612
  Reported by:	peter.kien@posteo.org, attila.kover@guardian.co.uk, storm16@gmail.com
  Approved by:	maintainer timeout (m.tsatsenko@gmail.com, 8 months)

Deleted:
  head/games/ufoai/files/patch-src__libs__vorbis__config.h
Modified:
  head/games/ufoai/Makefile
  head/games/ufoai/pkg-plist

Modified: head/games/ufoai/Makefile
==============================================================================
--- head/games/ufoai/Makefile	Fri Aug  7 19:56:46 2020	(r544348)
+++ head/games/ufoai/Makefile	Fri Aug  7 20:22:46 2020	(r544349)
@@ -3,7 +3,7 @@
 
 PORTNAME=	ufoai
 PORTVERSION=	2.5
-PORTREVISION=	9
+PORTREVISION=	10
 CATEGORIES=	games
 MASTER_SITES=	SF/${PORTNAME}/UFO_AI%202.x/${PORTVERSION}
 DISTNAME=	${PORTNAME:S/$/-/}${PORTVERSION}-source
@@ -20,19 +20,21 @@ LIB_DEPENDS=	libvorbis.so:audio/libvorbis \
 		libcurl.so:ftp/curl \
 		libtheora.so:multimedia/libtheora \
 		libxvidcore.so:multimedia/xvid \
-		libmxml.so:textproc/mxml
+		libmxml.so:textproc/mxml \
+		libogg.so:audio/libogg
 BUILD_DEPENDS=	zip:archivers/zip
 RUN_DEPENDS=	${LOCALBASE}/share/${PORTNAME}/base/default.cfg:games/ufoai-data
 
-ALL_TARGET=	all lang
-USES=		compiler:c++11-lang gettext gl gmake jpeg openal:soft \
+USES=		compiler:c++11-lang gettext gl gmake jpeg localbase openal:soft \
 		pkgconfig python:build sdl tar:bzip2
-USE_GL=		yes
+USE_GL=		gl
 USE_SDL=	sdl image mixer ttf
 USE_CXXSTD=	c++11
 HAS_CONFIGURE=	yes
-CONFIGURE_ARGS+=	--enable-release --target-os=freebsd
+CONFIGURE_ARGS=	--enable-release --target-os=freebsd
+ALL_TARGET=	all lang
 LDFLAGS+=	-lpthread -lexecinfo
+LDFLAGS_i386=	-Wl,-z,notext
 
 DATADIR=	share/${PORTNAME}
 SUB_FILES=	pkg-message
@@ -42,61 +44,43 @@ UFO_FILES=	ufo ufomodel
 
 OPTIONS_DEFINE=		SERVER UFO2MAP UFORADIANT
 OPTIONS_DEFAULT=	SERVER UFO2MAP
+OPTIONS_SUB=		yes
 
 SERVER_DESC=		Install dedicated server
 UFO2MAP_DESC=		Install UFO tools
 UFORADIANT_DESC=	Install UFO map editor
 
-.include <bsd.port.options.mk>
+SERVER_CONFIGURE_ENABLE=ufoded
+SERVER_VARS=		UFO_FILES+=ufoded
 
-.if ${PORT_OPTIONS:MSERVER}
-CONFIGURE_ARGS+=	--enable-ufoded
-UFO_FILES+=	ufoded
-PLIST_SUB+=	UFOSERVER=""
-.else
-CONFIGURE_ARGS+=	--disable-ufoded
-PLIST_SUB+=	UFOSERVER="@comment "
-.endif
+UFO2MAP_CONFIGURE_ENABLE=ufo2map
+UFO2MAP_VARS=		UFO_FILES+=ufo2map
 
-.if ${PORT_OPTIONS:MUFO2MAP}
-CONFIGURE_ARGS+=	--enable-ufo2map
-UFO_FILES+=	ufo2map
-PLIST_SUB+=	UFO2MAP=""
-.else
-CONFIGURE_ARGS+=	--disable-ufo2map
-PLIST_SUB+=	UFO2MAP="@comment "
-.endif
+UFORADIANT_ALL_TARGET=	uforadiant
+UFORADIANT_CONFIGURE_ENABLE=uforadiant
+UFORADIANT_USES=	gnome
+UFORADIANT_USE=		GNOME=gtk20,glib20,gtksourceview2,libxml2
+UFORADIANT_LIB_DEPENDS=	libgtkglext-x11-1.0.so:x11-toolkits/gtkglext
 
-.if ${PORT_OPTIONS:MUFORADIANT}
-ALL_TARGET+=	uforadiant
-CONFIGURE_ARGS+=--enable-uforadiant
-USES+=		gnome
-USE_GNOME+=	gtk20 glib20 gtksourceview2 libxml2
-LIB_DEPENDS+=	libgtkglext-x11-1.0.so:x11-toolkits/gtkglext
-RADIANT_FILES=	colours.xml game.xml input.xml mapdef.template menu.xml user.xml
-RADIANT_DIRS=	bitmaps i18n prefabs sourceviewer
-PLIST_SUB+=	UFORADIANT=""
-.else
-CONFIGURE_ARGS+=--disable-uforadiant
-PLIST_SUB+=	UFORADIANT="@comment "
-.endif
-
 .include <bsd.port.pre.mk>
 
 post-extract:
 	@${MKDIR} ${WRKSRC}/base/maps ${WRKSRC}/base/models
-	${REINPLACE_CMD} \
+	@${REINPLACE_CMD} \
 		-e 's|DEFAULT_COMPILER_CC=cc|DEFAULT_COMPILER_CC=${CC}|' \
 		-e 's|DEFAULT_COMPILER_CXX=c++|DEFAULT_COMPILER_CXX=${CXX}|' \
 		${WRKSRC}/configure
 .if ${CHOSEN_COMPILER_TYPE} == "clang"
-	${REINPLACE_CMD} \
+	@${REINPLACE_CMD} \
 		-e 's|-falign-loops=2 -falign-jumps=2 -falign-functions=2||' \
 		${WRKSRC}/build/modes/release.mk
 .endif
+.for LIB in SDL SDL_mixer SDL_ttf curl intl jpeg mxml ogg png theora vorbis zlib
+	@${RM} -rf ${WRKSRC}/src/libs/${LIB}
+.endfor
 
 do-install:
-	${MKDIR} ${STAGEDIR}${UFO_DIR}
+	@${MKDIR} ${STAGEDIR}${UFO_DIR}
 .for FILE in ${UFO_FILES}
 	@${SED} \
 		-e 's|@UFODIR@|${UFO_DIR}|' \
@@ -105,33 +89,22 @@ do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/${FILE} ${STAGEDIR}${UFO_DIR}
 	${INSTALL_SCRIPT} ${WRKDIR}/${FILE} ${STAGEDIR}${PREFIX}/bin
 .endfor
-	${MKDIR} ${STAGEDIR}${PREFIX}/${DATADIR}/base
+	@${MKDIR} ${STAGEDIR}${PREFIX}/${DATADIR}/base
 	${INSTALL_PROGRAM} ${WRKSRC}/base/game.so ${STAGEDIR}${PREFIX}/${DATADIR}/base
 
-.if ${PORT_OPTIONS:MUFORADIANT}
-	${MKDIR} ${STAGEDIR}${UFO_DIR}/radiant
+	@cd ${WRKSRC}/base/i18n && \
+		${FIND} * -type d -exec ${MKDIR} "${STAGEDIR}${PREFIX}/${DATADIR}/base/i18n/{}" \; && \
+			${FIND} * -type f -exec ${INSTALL_DATA} {} "${STAGEDIR}${PREFIX}/${DATADIR}/base/i18n/{}" \;
+	${LN} -s ../../${DATADIR}/base ${STAGEDIR}${UFO_DIR}/base
+
+do-install-UFORADIANT-on:
+	@${MKDIR} ${STAGEDIR}${UFO_DIR}/radiant
 	@${SED} \
 		-e 's|@UFODIR@|${UFO_DIR}/radiant|' \
 		-e 's|@APP@|uforadiant|' \
 		${FILESDIR}/run.sh.in > ${WRKDIR}/uforadiant
 	${INSTALL_PROGRAM} ${WRKSRC}/radiant/uforadiant ${STAGEDIR}${UFO_DIR}/radiant
 	${INSTALL_SCRIPT} ${WRKDIR}/uforadiant ${STAGEDIR}${PREFIX}/bin
-
-.for FILE in ${RADIANT_FILES}
-	${INSTALL_DATA} ${WRKSRC}/radiant/${FILE} ${STAGEDIR}${UFO_DIR}/radiant
-.endfor
-
-.for DIRE in ${RADIANT_DIRS}
-	${MKDIR} ${STAGEDIR}${UFO_DIR}/radiant/${DIRE}
-	cd ${WRKSRC}/radiant/${DIRE} && \
-		${FIND} * -type d -exec ${MKDIR} "${STAGEDIR}${UFO_DIR}/radiant/${DIRE}/{}" \; && \
-		${FIND} * -type f -exec ${INSTALL_DATA} {} "${STAGEDIR}${UFO_DIR}/radiant/${DIRE}/{}" \;
-.endfor
-.endif
-
-	cd ${WRKSRC}/base/i18n && \
-		${FIND} * -type d -exec ${MKDIR} "${STAGEDIR}${PREFIX}/${DATADIR}/base/i18n/{}" \; && \
-			${FIND} * -type f -exec ${INSTALL_DATA} {} "${STAGEDIR}${PREFIX}/${DATADIR}/base/i18n/{}" \;
-	${LN} -s ${PREFIX}/${DATADIR}/base ${STAGEDIR}${UFO_DIR}/base
+	@cd ${WRKSRC}/radiant && ${COPYTREE_SHARE} . ${STAGEDIR}${UFO_DIR}/radiant
 
 .include <bsd.port.post.mk>

Modified: head/games/ufoai/pkg-plist
==============================================================================
--- head/games/ufoai/pkg-plist	Fri Aug  7 19:56:46 2020	(r544348)
+++ head/games/ufoai/pkg-plist	Fri Aug  7 20:22:46 2020	(r544349)
@@ -1,6 +1,6 @@
 bin/ufo
 bin/ufomodel
-%%UFOSERVER%%bin/ufoded
+%%SERVER%%bin/ufoded
 %%UFO2MAP%%bin/ufo2map
 %%UFORADIANT%%bin/uforadiant
 %%DATADIR%%/base/game.so
@@ -34,7 +34,7 @@ bin/ufomodel
 %%DATADIR%%/base/i18n/zh_TW/LC_MESSAGES/ufoai.mo
 lib/ufoai/ufo
 lib/ufoai/ufomodel
-%%UFOSERVER%%lib/ufoai/ufoded
+%%SERVER%%lib/ufoai/ufoded
 %%UFO2MAP%%lib/ufoai/ufo2map
 lib/ufoai/base
 %%UFORADIANT%%lib/ufoai/radiant/bitmaps/texwindow_hideunused.png



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