Tue Aug 18 03:27:49 2020 UTC ()
openttd: use pkg-config to find liblzo2


(tnn)
diff -r1.35 -r1.36 pkgsrc/games/openttd/distinfo
diff -r1.2 -r1.3 pkgsrc/games/openttd/patches/patch-config.lib

cvs diff -r1.35 -r1.36 pkgsrc/games/openttd/distinfo (expand / switch to unified diff)

--- pkgsrc/games/openttd/distinfo 2020/06/03 16:52:39 1.35
+++ pkgsrc/games/openttd/distinfo 2020/08/18 03:27:49 1.36
@@ -1,9 +1,9 @@ @@ -1,9 +1,9 @@
1$NetBSD: distinfo,v 1.35 2020/06/03 16:52:39 nia Exp $ 1$NetBSD: distinfo,v 1.36 2020/08/18 03:27:49 tnn Exp $
2 2
3SHA1 (openttd-1.10.2-source.tar.xz) = a7f56648b974b3f088e44362a7fe9d53721b5ecc 3SHA1 (openttd-1.10.2-source.tar.xz) = a7f56648b974b3f088e44362a7fe9d53721b5ecc
4RMD160 (openttd-1.10.2-source.tar.xz) = a821312b74f7328e367fa765b59ec228d8ebfb7d 4RMD160 (openttd-1.10.2-source.tar.xz) = a821312b74f7328e367fa765b59ec228d8ebfb7d
5SHA512 (openttd-1.10.2-source.tar.xz) = 03de85449a458c76c07d8a28c34f72bc95ab0652c666e5925da43746cdd4e95b0d66360b6e214d1df33f11b5346da2e3b9ca6832ac6628c7d6e5e0a791881683 5SHA512 (openttd-1.10.2-source.tar.xz) = 03de85449a458c76c07d8a28c34f72bc95ab0652c666e5925da43746cdd4e95b0d66360b6e214d1df33f11b5346da2e3b9ca6832ac6628c7d6e5e0a791881683
6Size (openttd-1.10.2-source.tar.xz) = 6766904 bytes 6Size (openttd-1.10.2-source.tar.xz) = 6766904 bytes
7SHA1 (patch-config.lib) = 297caf33c50298a4efcbddbe3fea88e2b4f101c1 7SHA1 (patch-config.lib) = 1e8319816aba9d7bf4d0f749c0a4725d1747388a
8SHA1 (patch-src_core_alloc__func.hpp) = 17fcfe3ce984cd453f6756f4f212c8fe8ab15ed1 8SHA1 (patch-src_core_alloc__func.hpp) = 17fcfe3ce984cd453f6756f4f212c8fe8ab15ed1
9SHA1 (patch-src_core_endian__type.hpp) = 23564a89fd0e2ebe97043c7d16d5831831b65f40 9SHA1 (patch-src_core_endian__type.hpp) = 23564a89fd0e2ebe97043c7d16d5831831b65f40

cvs diff -r1.2 -r1.3 pkgsrc/games/openttd/patches/Attic/patch-config.lib (expand / switch to unified diff)

--- pkgsrc/games/openttd/patches/Attic/patch-config.lib 2019/04/25 15:55:07 1.2
+++ pkgsrc/games/openttd/patches/Attic/patch-config.lib 2020/08/18 03:27:49 1.3
@@ -1,36 +1,46 @@ @@ -1,36 +1,46 @@
1$NetBSD: patch-config.lib,v 1.2 2019/04/25 15:55:07 adam Exp $ 1$NetBSD: patch-config.lib,v 1.3 2020/08/18 03:27:49 tnn Exp $
2 2
3Compile 'strip' test with CFLAGS, so -isysroot can be passed on OSX. 3Compile 'strip' test with CFLAGS, so -isysroot can be passed on OSX.
4Correct library detection on NetBSD. 4Correct library detection on NetBSD.
5On Darwin, be able to locate iconv.h inside the SDK. 5On Darwin, be able to locate iconv.h inside the SDK.
 6Use pkg-config to detect liblzo2 as hand-crafted method seems unreliable.
6 7
7--- config.lib.orig 2019-04-08 19:42:35.000000000 +0000 8--- config.lib.orig 2020-06-01 21:22:01.000000000 +0000
8+++ config.lib 9+++ config.lib
9@@ -2140,7 +2140,7 @@ check_strip() { 10@@ -2088,7 +2088,7 @@ check_strip() {
10 elif [ "$os" = "OSX" ]; then 11 elif [ "$os" = "OSX" ]; then
11 # Most targets have -V in strip, to see if they exists... OSX doesn't.. so execute something 12 # Most targets have -V in strip, to see if they exists... OSX doesn't.. so execute something
12 echo "int main(int argc, char *argv[]) { }" > strip.test.c 13 echo "int main(int argc, char *argv[]) { }" > strip.test.c
13- $cxx_host strip.test.c -o strip.test 14- $cxx_host strip.test.c -o strip.test
14+ $cc_host $CFLAGS strip.test.c -o strip.test 15+ $cc_host $CFLAGS strip.test.c -o strip.test
15 check_compiler "host strip" "strip" "$host" "$strip" "$STRIP" "strip" "strip" "3" "strip.test" 16 check_compiler "host strip" "strip" "$host" "$strip" "$STRIP" "strip" "strip" "3" "strip.test"
16 rm -f strip.test.c strip.test 17 rm -f strip.test.c strip.test
17 else 18 else
18@@ -2676,7 +2676,7 @@ detect_library() { 19@@ -2633,7 +2633,7 @@ detect_library() {
19 if [ -z "$res" ]; then 20 if [ -z "$res" ]; then
20 log 2 " trying /opt/local/include/$4$5... no" 21 log 2 " trying /opt/local/include/$4$5... no"
21 fi 22 fi
22- if [ -z "$res" ] && [ "$os" = "NETBSD" ]; then 23- if [ -z "$res" ] && [ "$os" = "NETBSD" ]; then
23+ if [ -z "$res" ]; then 24+ if [ -z "$res" ]; then
24 eval "$2=`ls -1 /usr/pkg/include/$4*.h 2>/dev/null | egrep \"\/$5\$\"`" 25 eval "$2=`ls -1 /usr/pkg/include/$4*.h 2>/dev/null | egrep \"\/$5\$\"`"
25 eval "res=\$$2" 26 eval "res=\$$2"
26 if [ -z "$res" ]; then 27 if [ -z "$res" ]; then
27@@ -2926,6 +2926,9 @@ detect_iconv() { 28@@ -2725,7 +2725,7 @@ detect_zlib() {
 29 }
 30
 31 detect_lzo2() {
 32- detect_library "$with_lzo2" "lzo2" "liblzo2.a" "lzo/" "lzo1x.h"
 33+ detect_pkg_config "$with_lzo2" "lzo2" "lzo2" "2.10"
 34 }
 35
 36 detect_fluidsynth() {
 37@@ -2885,6 +2885,9 @@ detect_iconv() {
28 break 38 break
29 fi 39 fi
30 done 40 done
31+ if [ -z "$iconv" ] && [ "$os" = "OSX" ]; then 41+ if [ -z "$iconv" ] && [ "$os" = "OSX" ]; then
32+ iconv=`xcrun --show-sdk-path`/usr/include/iconv.h 42+ iconv=`xcrun --show-sdk-path`/usr/include/iconv.h
33+ fi 43+ fi
34 else 44 else
35 # Make sure it exists 45 # Make sure it exists
36 iconv=`ls $with_iconv/include/iconv.h 2>/dev/null` 46 iconv=`ls $with_iconv/include/iconv.h 2>/dev/null`