diff options
author | Alexey Dokuchaev <danfe@FreeBSD.org> | 2014-06-12 06:06:27 +0000 |
---|---|---|
committer | Alexey Dokuchaev <danfe@FreeBSD.org> | 2014-06-12 06:06:27 +0000 |
commit | 458e2b107607c274ecca7b7e5ab07a297d57c13f (patch) | |
tree | 83eb0f77e79838fc7563d6a0b4c2273de7ace9a7 /games/openttd | |
parent | 41d298818a2d1472fd0ac3cb85ee9050802cc057 (diff) | |
download | ports-458e2b107607c274ecca7b7e5ab07a297d57c13f.tar.gz ports-458e2b107607c274ecca7b7e5ab07a297d57c13f.zip |
Notes
Diffstat (limited to 'games/openttd')
-rw-r--r-- | games/openttd/Makefile | 15 | ||||
-rw-r--r-- | games/openttd/distinfo | 4 | ||||
-rw-r--r-- | games/openttd/files/liblzma.pc | 19 | ||||
-rw-r--r-- | games/openttd/files/patch-config.lib | 83 |
4 files changed, 89 insertions, 32 deletions
diff --git a/games/openttd/Makefile b/games/openttd/Makefile index f3977536d1c3..fb0b1e75c0ca 100644 --- a/games/openttd/Makefile +++ b/games/openttd/Makefile @@ -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 diff --git a/games/openttd/distinfo b/games/openttd/distinfo index 8c032afd933a..1037200fe0f4 100644 --- a/games/openttd/distinfo +++ b/games/openttd/distinfo @@ -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 diff --git a/games/openttd/files/liblzma.pc b/games/openttd/files/liblzma.pc deleted file mode 100644 index b479beb6e6cb..000000000000 --- a/games/openttd/files/liblzma.pc +++ /dev/null @@ -1,19 +0,0 @@ -# -# Author: Lasse Collin -# -# This file has been put into the public domain. -# You can do whatever you want with this file. -# - -prefix=/usr -exec_prefix=${prefix} -libdir=${exec_prefix}/lib -includedir=${prefix}/include - -Name: liblzma -Description: General purpose data compression library -URL: http://tukaani.org/xz/ -Version: 5.0.0 -Cflags: -I${includedir} -Libs: -L${libdir} -llzma -Libs.private: -D_THREAD_SAFE -pthread diff --git a/games/openttd/files/patch-config.lib b/games/openttd/files/patch-config.lib new file mode 100644 index 000000000000..95ab5f63e6d1 --- /dev/null +++ b/games/openttd/files/patch-config.lib @@ -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]" |