qt4-libs: fix build on netbsd-current, where the prototype of iconv is no longer unusual. This mostly consists of making our local patches only apply for older netbsd.diff -r1.115 -r1.116 pkgsrc/x11/qt4-libs/distinfo
(maya)
@@ -1,35 +1,35 @@ | @@ -1,35 +1,35 @@ | |||
1 | $NetBSD: distinfo,v 1.115 2019/07/03 10:04:23 markd Exp $ | 1 | $NetBSD: distinfo,v 1.116 2019/10/28 19:37:41 maya Exp $ | |
2 | 2 | |||
3 | SHA1 (qt-everywhere-opensource-src-4.8.7.tar.gz) = 76aef40335c0701e5be7bb3a9101df5d22fe3666 | 3 | SHA1 (qt-everywhere-opensource-src-4.8.7.tar.gz) = 76aef40335c0701e5be7bb3a9101df5d22fe3666 | |
4 | RMD160 (qt-everywhere-opensource-src-4.8.7.tar.gz) = afb5e5a99388e6429faca59cb5000054feffd166 | 4 | RMD160 (qt-everywhere-opensource-src-4.8.7.tar.gz) = afb5e5a99388e6429faca59cb5000054feffd166 | |
5 | SHA512 (qt-everywhere-opensource-src-4.8.7.tar.gz) = f9f81a2e7205e1fd05c8d923dc73244f29aa33f951fa6b7c5c8193449328b37084796b9b71ad0c317e4e6fd00017c10ea5d67b1b2032551cde00548522218125 | 5 | SHA512 (qt-everywhere-opensource-src-4.8.7.tar.gz) = f9f81a2e7205e1fd05c8d923dc73244f29aa33f951fa6b7c5c8193449328b37084796b9b71ad0c317e4e6fd00017c10ea5d67b1b2032551cde00548522218125 | |
6 | Size (qt-everywhere-opensource-src-4.8.7.tar.gz) = 241075567 bytes | 6 | Size (qt-everywhere-opensource-src-4.8.7.tar.gz) = 241075567 bytes | |
7 | SHA1 (patch-aa) = 9b5f8bd980d8c3f38fd3c541380fd42d2a93a609 | 7 | SHA1 (patch-aa) = 9b5f8bd980d8c3f38fd3c541380fd42d2a93a609 | |
8 | SHA1 (patch-ab) = 447a888cbc784a54935f23d1005d6977374a484d | 8 | SHA1 (patch-ab) = 447a888cbc784a54935f23d1005d6977374a484d | |
9 | SHA1 (patch-ac) = 078ddafefc719f248740f40e2063dae07cd601e5 | 9 | SHA1 (patch-ac) = 078ddafefc719f248740f40e2063dae07cd601e5 | |
10 | SHA1 (patch-ad) = ca1dfb801ea16ba4b10797e4121fa05f585fd87b | 10 | SHA1 (patch-ad) = ca1dfb801ea16ba4b10797e4121fa05f585fd87b | |
11 | SHA1 (patch-ae) = 132e25722f2d78249e76c6d748cd671105e329de | 11 | SHA1 (patch-ae) = 132e25722f2d78249e76c6d748cd671105e329de | |
12 | SHA1 (patch-af) = 86bab4c9090a346d44f378a00f4f434da9ded714 | 12 | SHA1 (patch-af) = 86bab4c9090a346d44f378a00f4f434da9ded714 | |
13 | SHA1 (patch-ag) = 8ba8839a110375c7343c42225945138c5a378e8b | 13 | SHA1 (patch-ag) = 8ba8839a110375c7343c42225945138c5a378e8b | |
14 | SHA1 (patch-ah) = 62c50fe48b9ff1ce9fb757b432c8b1db7693e112 | 14 | SHA1 (patch-ah) = 62c50fe48b9ff1ce9fb757b432c8b1db7693e112 | |
15 | SHA1 (patch-ai) = 5ae8d5516b577e017ea61bce8faa774da8c96f47 | 15 | SHA1 (patch-ai) = 5ae8d5516b577e017ea61bce8faa774da8c96f47 | |
16 | SHA1 (patch-aj) = c5510b6f6044f17855f2840fabb8ed94fddbd525 | 16 | SHA1 (patch-aj) = c5510b6f6044f17855f2840fabb8ed94fddbd525 | |
17 | SHA1 (patch-ak) = a16e2ae20e0568f2a50eb390c4fbd480c0223ad4 | 17 | SHA1 (patch-ak) = a16e2ae20e0568f2a50eb390c4fbd480c0223ad4 | |
18 | SHA1 (patch-al) = a215436a2df433e050fa48a7cc8238b5ef13b64d | 18 | SHA1 (patch-al) = a215436a2df433e050fa48a7cc8238b5ef13b64d | |
19 | SHA1 (patch-am) = 018a5982834737ca8ceb6460dc696b6e3a70ec54 | 19 | SHA1 (patch-am) = 018a5982834737ca8ceb6460dc696b6e3a70ec54 | |
20 | SHA1 (patch-an) = 8aa6ceffb9acab4771d22b3184a1360227a81409 | 20 | SHA1 (patch-an) = 8aa6ceffb9acab4771d22b3184a1360227a81409 | |
21 | SHA1 (patch-ao) = a63839ae22e0bf13ff40f5377df2bc36ca052d91 | 21 | SHA1 (patch-ao) = 981b506bdf5d9d21940880308318d6ac3f59742d | |
22 | SHA1 (patch-ap) = 86a2f5cce47607c8c453c63c6213d5efb48c8569 | 22 | SHA1 (patch-ap) = f18e8d0c70bfc31a91d1b8660513ece38646b79c | |
23 | SHA1 (patch-aq) = 7533741c81086cd1992d3e96a47c28d9ade27cbc | 23 | SHA1 (patch-aq) = 7533741c81086cd1992d3e96a47c28d9ade27cbc | |
24 | SHA1 (patch-ar) = ba839210b42532b1797604722442841e43acbae1 | 24 | SHA1 (patch-ar) = ba839210b42532b1797604722442841e43acbae1 | |
25 | SHA1 (patch-as) = b0962c535fc2e8da08bb78b9ebcb5cd678565058 | 25 | SHA1 (patch-as) = b0962c535fc2e8da08bb78b9ebcb5cd678565058 | |
26 | SHA1 (patch-au) = 397a18f84299026e21aee0079784f56698fc9c6b | 26 | SHA1 (patch-au) = 397a18f84299026e21aee0079784f56698fc9c6b | |
27 | SHA1 (patch-av) = a79dbf65e6b88ac22d48514cca01c0baa6dec880 | 27 | SHA1 (patch-av) = a79dbf65e6b88ac22d48514cca01c0baa6dec880 | |
28 | SHA1 (patch-aw) = 7e6735bf637bf3e72afe488f37b399d170185f8f | 28 | SHA1 (patch-aw) = 7e6735bf637bf3e72afe488f37b399d170185f8f | |
29 | SHA1 (patch-ay) = e1edcb5de9a40b3549c7cd74ebb814c6b4eb6c94 | 29 | SHA1 (patch-ay) = e1edcb5de9a40b3549c7cd74ebb814c6b4eb6c94 | |
30 | SHA1 (patch-ba) = 8e70813962e434a82a737ce4f3ea743c1bb560f9 | 30 | SHA1 (patch-ba) = 8e70813962e434a82a737ce4f3ea743c1bb560f9 | |
31 | SHA1 (patch-bb) = 0d002013974af33e097df5df03ec3f45222846b5 | 31 | SHA1 (patch-bb) = 0d002013974af33e097df5df03ec3f45222846b5 | |
32 | SHA1 (patch-bc) = 5df34d2d6bb2f93e511cdfb2d9371e1646f5a773 | 32 | SHA1 (patch-bc) = 5df34d2d6bb2f93e511cdfb2d9371e1646f5a773 | |
33 | SHA1 (patch-bd) = 013dd17149e4ed60072adfd226f7e6b3ea8eb5cd | 33 | SHA1 (patch-bd) = 013dd17149e4ed60072adfd226f7e6b3ea8eb5cd | |
34 | SHA1 (patch-be) = dd47e1fbf46ca01901e664f544ea1942f61c2557 | 34 | SHA1 (patch-be) = dd47e1fbf46ca01901e664f544ea1942f61c2557 | |
35 | SHA1 (patch-bf) = fba76801814a69d22ce5cc58ac2a8c2bfe3bd019 | 35 | SHA1 (patch-bf) = fba76801814a69d22ce5cc58ac2a8c2bfe3bd019 |
@@ -1,72 +1,74 @@ | @@ -1,72 +1,74 @@ | |||
1 | $NetBSD: patch-ao,v 1.10 2012/04/09 09:12:49 adam Exp $ | 1 | $NetBSD: patch-ao,v 1.11 2019/10/28 19:37:41 maya Exp $ | |
2 | ||||
3 | Fix build on netbsd, which has an unusual prototype for iconv | |||
2 | 4 | |||
3 | --- src/corelib/codecs/qiconvcodec.cpp.orig 2012-03-14 14:01:18.000000000 +0000 | 5 | --- src/corelib/codecs/qiconvcodec.cpp.orig 2012-03-14 14:01:18.000000000 +0000 | |
4 | +++ src/corelib/codecs/qiconvcodec.cpp | 6 | +++ src/corelib/codecs/qiconvcodec.cpp | |
5 | @@ -50,9 +50,14 @@ | 7 | @@ -50,9 +50,14 @@ | |
6 | #include <stdio.h> | 8 | #include <stdio.h> | |
7 | #include <dlfcn.h> | 9 | #include <dlfcn.h> | |
8 | 10 | |||
9 | +// for __DragonFly_version | 11 | +// for __DragonFly_version | |
10 | +#if defined(__DragonFly__) | 12 | +#if defined(__DragonFly__) || defined(__NetBSD__) | |
11 | +#include <sys/param.h> | 13 | +#include <sys/param.h> | |
12 | +#endif | 14 | +#endif | |
13 | + | 15 | + | |
14 | // unistd.h is needed for the _XOPEN_UNIX macro | 16 | // unistd.h is needed for the _XOPEN_UNIX macro | |
15 | #include <unistd.h> | 17 | #include <unistd.h> | |
16 | -#if defined(_XOPEN_UNIX) && !defined(Q_OS_QNX) && !defined(Q_OS_OSF) | 18 | -#if defined(_XOPEN_UNIX) && !defined(Q_OS_QNX) && !defined(Q_OS_OSF) | |
17 | +#if (defined(_XOPEN_UNIX) && !defined(Q_OS_QNX) && !defined(Q_OS_OSF)) || defined(Q_OS_NETBSD) || defined(__DragonFly__) | 19 | +#if (defined(_XOPEN_UNIX) && !defined(Q_OS_QNX) && !defined(Q_OS_OSF)) || defined(Q_OS_NETBSD) || defined(__DragonFly__) | |
18 | # include <langinfo.h> | 20 | # include <langinfo.h> | |
19 | #endif | 21 | #endif | |
20 | 22 | |||
21 | @@ -69,6 +74,9 @@ | 23 | @@ -69,6 +74,9 @@ | |
22 | # else | 24 | # else | |
23 | # define UTF16 "UTF-16LE" | 25 | # define UTF16 "UTF-16LE" | |
24 | # endif | 26 | # endif | |
25 | +#elif defined(__DragonFly__) && __DragonFly_version__ < 197700 | 27 | +#elif defined(__DragonFly__) && __DragonFly_version__ < 197700 | |
26 | +# define NO_BOM | 28 | +# define NO_BOM | |
27 | +# define UTF16 "UTF-16" | 29 | +# define UTF16 "UTF-16" | |
28 | #else | 30 | #else | |
29 | # define UTF16 "UTF-16" | 31 | # define UTF16 "UTF-16" | |
30 | #endif | 32 | #endif | |
31 | @@ -219,7 +227,7 @@ QString QIconvCodec::convertToUnicode(co | 33 | @@ -219,7 +227,7 @@ QString QIconvCodec::convertToUnicode(co | |
32 | IconvState *state = *pstate; | 34 | IconvState *state = *pstate; | |
33 | size_t inBytesLeft = len; | 35 | size_t inBytesLeft = len; | |
34 | // best case assumption, each byte is converted into one UTF-16 character, plus 2 bytes for the BOM | 36 | // best case assumption, each byte is converted into one UTF-16 character, plus 2 bytes for the BOM | |
35 | -#ifdef GNU_LIBICONV | 37 | -#ifdef GNU_LIBICONV | |
36 | +#if defined(GNU_LIBICONV) || defined(__NetBSD__) | 38 | +#if defined(GNU_LIBICONV) || (defined(__NetBSD__) && __NetBSD_Version__ < 999001700) | |
37 | // GNU doesn't disagree with POSIX :/ | 39 | // GNU doesn't disagree with POSIX :/ | |
38 | const char *inBytes = chars; | 40 | const char *inBytes = chars; | |
39 | #else | 41 | #else | |
40 | @@ -318,7 +326,7 @@ static bool setByteOrder(iconv_t cd) | 42 | @@ -318,7 +326,7 @@ static bool setByteOrder(iconv_t cd) | |
41 | size_t outBytesLeft = sizeof buf; | 43 | size_t outBytesLeft = sizeof buf; | |
42 | size_t inBytesLeft = sizeof bom; | 44 | size_t inBytesLeft = sizeof bom; | |
43 | 45 | |||
44 | -#if defined(GNU_LIBICONV) | 46 | -#if defined(GNU_LIBICONV) | |
45 | +#if defined(GNU_LIBICONV) || defined(__NetBSD__) | 47 | +#if defined(GNU_LIBICONV) || (defined(__NetBSD__) && __NetBSD_Version__ < 999001700) | |
46 | const char **inBytesPtr = const_cast<const char **>(&inBytes); | 48 | const char **inBytesPtr = const_cast<const char **>(&inBytes); | |
47 | #else | 49 | #else | |
48 | char **inBytesPtr = &inBytes; | 50 | char **inBytesPtr = &inBytes; | |
49 | @@ -338,7 +346,7 @@ QByteArray QIconvCodec::convertFromUnico | 51 | @@ -338,7 +346,7 @@ QByteArray QIconvCodec::convertFromUnico | |
50 | char *outBytes; | 52 | char *outBytes; | |
51 | size_t inBytesLeft; | 53 | size_t inBytesLeft; | |
52 | 54 | |||
53 | -#if defined(GNU_LIBICONV) | 55 | -#if defined(GNU_LIBICONV) | |
54 | +#if defined(GNU_LIBICONV) || defined(__NetBSD__) | 56 | +#if defined(GNU_LIBICONV) || (defined(__NetBSD__) && __NetBSD_Version__ < 999001700) | |
55 | const char **inBytesPtr = const_cast<const char **>(&inBytes); | 57 | const char **inBytesPtr = const_cast<const char **>(&inBytes); | |
56 | #else | 58 | #else | |
57 | char **inBytesPtr = &inBytes; | 59 | char **inBytesPtr = &inBytes; | |
58 | @@ -475,11 +483,13 @@ iconv_t QIconvCodec::createIconv_t(const | 60 | @@ -475,11 +483,13 @@ iconv_t QIconvCodec::createIconv_t(const | |
59 | #endif | 61 | #endif | |
60 | const char *codeset = empty_codeset; | 62 | const char *codeset = empty_codeset; | |
61 | cd = iconv_open(to ? to : codeset, from ? from : codeset); | 63 | cd = iconv_open(to ? to : codeset, from ? from : codeset); | |
62 | +#elif defined(__NetBSD) | 64 | +#elif defined(__NetBSD__) && __NetBSD_Version__ < 999001700 | |
63 | + const char *codeset = 0; | 65 | + const char *codeset = 0; | |
64 | #else | 66 | #else | |
65 | char *codeset = 0; | 67 | char *codeset = 0; | |
66 | #endif | 68 | #endif | |
67 | 69 | |||
68 | -#if defined(_XOPEN_UNIX) && !defined(Q_OS_QNX) && !defined(Q_OS_OSF) | 70 | -#if defined(_XOPEN_UNIX) && !defined(Q_OS_QNX) && !defined(Q_OS_OSF) | |
69 | +#if (defined(_XOPEN_UNIX) && !defined(Q_OS_QNX) && !defined(Q_OS_OSF)) || defined(Q_OS_NETBSD) || defined(__DragonFly__) | 71 | +#if (defined(_XOPEN_UNIX) && !defined(Q_OS_QNX) && !defined(Q_OS_OSF)) || defined(Q_OS_NETBSD) || defined(__DragonFly__) | |
70 | if (cd == (iconv_t) -1) { | 72 | if (cd == (iconv_t) -1) { | |
71 | codeset = nl_langinfo(CODESET); | 73 | codeset = nl_langinfo(CODESET); | |
72 | if (codeset) | 74 | if (codeset) |
@@ -1,16 +1,26 @@ | @@ -1,16 +1,26 @@ | |||
1 | $NetBSD: patch-ap,v 1.2 2009/10/11 09:14:52 adam Exp $ | 1 | $NetBSD: patch-ap,v 1.3 2019/10/28 19:37:41 maya Exp $ | |
2 | 2 | |||
3 | --- config.tests/unix/iconv/iconv.cpp.orig 2009-09-29 13:01:31.000000000 +0200 | 3 | Support NetBSD iconv variant (pre-9.99.17 and newer) | |
4 | ||||
5 | --- config.tests/unix/iconv/iconv.cpp.orig 2015-05-07 14:14:42.000000000 +0000 | |||
4 | +++ config.tests/unix/iconv/iconv.cpp | 6 | +++ config.tests/unix/iconv/iconv.cpp | |
5 | @@ -48,7 +48,11 @@ int main(int, char **) | 7 | #if defined(__sgi) | |
8 | #error "iconv not supported on IRIX" | |||
9 | #else | |||
10 | +#if defined(__NetBSD__) | |||
11 | +#include <sys/param.h> | |||
12 | +#endif | |||
13 | #include <iconv.h> | |||
14 | ||||
15 | int main(int, char **) | |||
6 | { | 16 | { | |
7 | iconv_t x = iconv_open("", ""); | 17 | iconv_t x = iconv_open("", ""); | |
8 | 18 | |||
9 | +#if defined(__NetBSD__) | 19 | +#if defined(__NetBSD__) && __NetBSD_Version__ < 999001700 | |
10 | + const char *inp; | 20 | + const char *inp; | |
11 | +#else | 21 | +#else | |
12 | char *inp; | 22 | char *inp; | |
13 | +#endif | 23 | +#endif | |
14 | char *outp; | 24 | char *outp; | |
15 | size_t inbytes, outbytes; | 25 | size_t inbytes, outbytes; | |
16 | iconv(x, &inp, &inbytes, &outp, &outbytes); | 26 | iconv(x, &inp, &inbytes, &outp, &outbytes); |