svn commit: r357564 - in head/games/openttd: . files

Alexey Dokuchaev danfe at FreeBSD.org
Thu Jun 12 06:06:29 UTC 2014


Author: danfe
Date: Thu Jun 12 06:06:27 2014
New Revision: 357564
URL: http://svnweb.freebsd.org/changeset/ports/357564
QAT: https://qat.redports.org/buildarchive/r357564/

Log:
  - Update OpenTTD to version 1.4.1 which fixes a regression with the order
    of how some packets are sent to the admin port
  - Add another mirror (per http://devs.openttd.org/~truebrain/mirror.txt)
  - Remove trivial files/liblzma.pc and handle liblzma the same way as zlib
    and lzo2; this also allows to simplify `post-patch' target

Added:
  head/games/openttd/files/patch-config.lib   (contents, props changed)
Deleted:
  head/games/openttd/files/liblzma.pc
Modified:
  head/games/openttd/Makefile
  head/games/openttd/distinfo

Modified: head/games/openttd/Makefile
==============================================================================
--- head/games/openttd/Makefile	Thu Jun 12 05:44:26 2014	(r357563)
+++ head/games/openttd/Makefile	Thu Jun 12 06:06:27 2014	(r357564)
@@ -2,10 +2,10 @@
 # $FreeBSD$
 
 PORTNAME=	openttd
-PORTVERSION=	1.4.0
-PORTREVISION=	1
+PORTVERSION=	1.4.1
 CATEGORIES=	games
-MASTER_SITES=	http://ftp.snt.utwente.nl/pub/games/openttd/binaries/releases/${PORTVERSION}/ \
+MASTER_SITES=	http://gb.binaries.openttd.org/binaries/releases/${PORTVERSION}/ \
+		http://ftp.snt.utwente.nl/pub/games/openttd/binaries/releases/${PORTVERSION}/ \
 		http://us.binaries.openttd.org/binaries/releases/${PORTVERSION}/
 DISTNAME=	${PORTNAME}-${PORTVERSION}-source
 
@@ -83,14 +83,7 @@ pre-everything::
 .endif
 
 post-patch:
-# Remove extra (vendor-provided) CFLAGS and LDFLAGS and make the port more
-# LOCALBASE safe
-	@${REINPLACE_CMD} -e '/-O2 -fomit-frame-pointer/d ; \
-		s,/usr/local,${LOCALBASE},' ${WRKSRC}/config.lib
-# Use custom liblzma.pc for when we use liblzma from base
-	@${REINPLACE_CMD} -e \
-		's,pkg-config liblzma,pkg-config ${FILESDIR}/liblzma.pc,' \
-			${WRKSRC}/config.lib
+	@${REINPLACE_CMD} -e 's,/usr/local,${LOCALBASE},' ${WRKSRC}/config.lib
 
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/bin/${PORTNAME} ${STAGEDIR}${PREFIX}/bin

Modified: head/games/openttd/distinfo
==============================================================================
--- head/games/openttd/distinfo	Thu Jun 12 05:44:26 2014	(r357563)
+++ head/games/openttd/distinfo	Thu Jun 12 06:06:27 2014	(r357564)
@@ -1,2 +1,2 @@
-SHA256 (openttd-1.4.0-source.tar.xz) = d85bcb89d499a177a904f627ce407a086db8b26bc9a021030ee7f5534fbe0955
-SIZE (openttd-1.4.0-source.tar.xz) = 6661904
+SHA256 (openttd-1.4.1-source.tar.xz) = 1face3af7a9b2169c0e284f3916f4b7b82947364e836107c404be520a570753e
+SIZE (openttd-1.4.1-source.tar.xz) = 6664600

Added: head/games/openttd/files/patch-config.lib
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/openttd/files/patch-config.lib	Thu Jun 12 06:06:27 2014	(r357564)
@@ -0,0 +1,83 @@
+--- config.lib.orig	2014-06-03 02:26:54 +0800
++++ config.lib
+@@ -804,15 +804,15 @@ check_params() {
+ 	pre_detect_with_lzma=$with_lzma
+ 	detect_lzma
+ 
+-	if [ "$with_lzma" = "0" ] || [ -z "$lzma_config" ]; then
++	if [ "$with_lzma" = "0" ] || [ -z "$lzma" ]; then
+ 		log 1 "WARNING: lzma was not detected or disabled"
+ 		log 1 "WARNING: OpenTTD doesn't require lzma, but it does mean that many features"
+ 		log 1 "WARNING: (like loading most savegames/scenarios and joining most servers)"
+ 		log 1 "WARNING: will be disabled."
+ 		if [ "$pre_detect_with_lzma" = "0" ]; then
+ 			log 1 "WARNING: We strongly suggest you to install liblzma."
+-			log 1 "configure: error: no liblzma detected"
+ 		else
++			log 1 "configure: error: no liblzma detected"
+ 			log 1 " If you want to compile without lzma use --without-lzma as parameter"
+ 			exit
+ 		fi
+@@ -1449,8 +1449,6 @@ make_cflags_and_ldflags() {
+ 			CFLAGS="-I/gg/os-include -noixemul -fstrict-aliasing -fexpensive-optimizations -mcpu=604 -fno-inline -mstring -mmultiple $CFLAGS"
+ 			LDFLAGS="$LDFLAGS -noixemul"
+ 		fi
+-
+-		CFLAGS="-O2 -fomit-frame-pointer $CFLAGS"
+ 	else
+ 		OBJS_SUBDIR="debug"
+ 
+@@ -1660,16 +1658,14 @@ make_cflags_and_ldflags() {
+ 		CFLAGS="$CFLAGS -DWITH_ZLIB"
+ 	fi
+ 
+-	if [ -n "$lzma_config" ]; then
+-		CFLAGS="$CFLAGS -DWITH_LZMA"
+-		CFLAGS="$CFLAGS `$lzma_config --cflags | tr '\n\r' '  '`"
+-
+-		if [ "$enable_static" != "0" ]; then
++	if [ "$with_lzma" != "0" ]; then
++		if [ "$enable_static" != "0" ] && [ "$os" != "OSX" ]; then
+ 			CFLAGS="$CFLAGS -DLZMA_API_STATIC"
+-			LIBS="$LIBS `$lzma_config --libs --static | tr '\n\r' '  '`"
++			LIBS="$LIBS $lzma"
+ 		else
+-			LIBS="$LIBS `$lzma_config --libs | tr '\n\r' '  '`"
++			LIBS="$LIBS -llzma"
+ 		fi
++		CFLAGS="$CFLAGS -DWITH_LZMA"
+ 	fi
+ 
+ 	if [ "$with_lzo2" != "0" ]; then
+@@ -2712,6 +2708,10 @@ detect_lzo2() {
+ 	detect_library "$with_lzo2" "lzo2" "liblzo2.a" "lzo/" "lzo1x.h"
+ }
+ 
++detect_lzma() {
++	detect_library "$with_lzma" "lzma" "liblzma.a" "" "lzma.h"
++}
++
+ detect_libtimidity() {
+ 	detect_library "$with_libtimidity" "libtimidity" "libtimidity.a" "" "timidity.h"
+ }
+@@ -2768,10 +2768,6 @@ detect_pkg_config() {
+ 	log 1 "checking $2... found"
+ }
+ 
+-detect_lzma() {
+-	detect_pkg_config "$with_lzma" "liblzma" "lzma_config" "5.0"
+-}
+-
+ detect_xdg_basedir() {
+ 	detect_pkg_config "$with_xdg_basedir" "libxdg-basedir" "xdg_basedir_config" "1.2"
+ }
+@@ -3665,8 +3661,7 @@ showhelp() {
+ 	echo "  --with-cocoa                   enables COCOA video driver (OSX ONLY)"
+ 	echo "  --with-sdl[=sdl-config]        enables SDL video driver support"
+ 	echo "  --with-zlib[=zlib.a]           enables zlib support"
+-	echo "  --with-liblzma[=\"pkg-config liblzma\"]"
+-	echo "                                 enables liblzma support"
++	echo "  --with-liblzma[=liblzma.a]     enables liblzma support"
+ 	echo "  --with-liblzo2[=liblzo2.a]     enables liblzo2 support"
+ 	echo "  --with-png[=libpng-config]     enables libpng support"
+ 	echo "  --with-freetype[=freetype-config]"


More information about the svn-ports-head mailing list