Files
ports/games/openttd/files/patch-config.lib
T
Alexey Dokuchaev 728311e9d2 - Update OpenTTD to version 1.10.0
- Adjust existing patches and PORTDOCS
- Stick to SDL 1.2 for the time being

PR:	245253 (independent)
2020-04-02 08:36:17 +00:00

83 lines
2.8 KiB
Plaintext

--- config.lib.orig 2016-04-01 18:33:55 UTC
+++ config.lib
@@ -816,15 +816,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
@@ -1468,7 +1468,6 @@ make_cflags_and_ldflags() {
# -fomit-frame-pointer and -pg do not go well together (gcc errors they are incompatible)
CFLAGS="-fomit-frame-pointer $CFLAGS"
fi
- CFLAGS="-O2 $CFLAGS"
else
OBJS_SUBDIR="debug"
@@ -1675,16 +1674,14 @@ make_cflags_and_ldflags() {
fi
fi
- if [ -n "$lzma_config" ]; then
- CFLAGS="$CFLAGS -DWITH_LIBLZMA"
- 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_LIBLZMA"
fi
if [ "$with_lzo2" != "0" ]; then
@@ -2692,6 +2689,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_fluidsynth() {
detect_library "$with_fluidsynth" "fluidsynth" "" "" "fluidsynth.h"
}
@@ -2756,10 +2757,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"
}
@@ -3523,8 +3520,7 @@ showhelp() {
echo " --with-sdl[=\"pkg-config sdl\"] enables SDL video driver support"
echo " --with-zlib[=\"pkg-config zlib\"]"
echo " 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[=\"pkg-config libpng\"]"
echo " enables libpng support"