dev-libs/STLport: fix accessing to tm struct during build
authorSergey Popov <pinkbyte@gentoo.org>
Sat, 7 Nov 2015 11:55:43 +0000 (14:55 +0300)
committerSergey Popov <pinkbyte@gentoo.org>
Sat, 7 Nov 2015 11:56:27 +0000 (14:56 +0300)
time_facets.cpp misses _USE_MISC check, which makes building failed
Fixed by adding a proper check. Drop old revision.

Suggested-by: uzu@tuta.io
Gentoo-Bug: 562926

Package-Manager: portage-2.2.24

dev-libs/STLport/STLport-5.2.1-r3.ebuild [moved from dev-libs/STLport/STLport-5.2.1-r2.ebuild with 96% similarity]
dev-libs/STLport/files/STLport-5.2.1-time-facets.patch [new file with mode: 0644]

similarity index 96%
rename from dev-libs/STLport/STLport-5.2.1-r2.ebuild
rename to dev-libs/STLport/STLport-5.2.1-r3.ebuild
index a7ad58ae212bd6de66b8ad0b117ad6185ba63796..0a03529b279dd6771827ef1da0a8c824dacfcf7e 100644 (file)
@@ -18,7 +18,7 @@ SLOT="0"
 KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
 IUSE="boost debug static static-libs threads"
 
-DEPEND="boost? ( >=dev-libs/boost-1.35.0-r5 )"
+DEPEND="boost? ( dev-libs/boost:= )"
 RDEPEND="${DEPEND}"
 
 DOCS=( README etc/ChangeLog doc/FAQ doc/README.utf8 )
@@ -45,6 +45,9 @@ src_prepare() {
        #define _LARGEFILE64_SOURCE
        EOF
 
+       # bug #562926
+       epatch "${FILESDIR}/${P}-time-facets.patch"
+
        epatch_user
 }
 
diff --git a/dev-libs/STLport/files/STLport-5.2.1-time-facets.patch b/dev-libs/STLport/files/STLport-5.2.1-time-facets.patch
new file mode 100644 (file)
index 0000000..85a5a32
--- /dev/null
@@ -0,0 +1,12 @@
+diff -uNptr a/src/time_facets.cpp b/src/time_facets.cpp
+--- a/src/time_facets.cpp      2008-12-10 10:56:51.000000000 +0100
++++ b/src/time_facets.cpp      2015-10-11 12:07:55.841141984 +0100
+@@ -428,7 +428,7 @@ void _STLP_CALL __write_formatted_timeT(
+         break;
+       {
+         int diff;
+-#    if defined (__USE_BSD) || defined (__BEOS__)
++#    if defined (__USE_MISC) || defined (__USE_BSD) || defined (__BEOS__)
+         diff = t->tm_gmtoff;
+ #    else
+         diff = t->__tm_gmtoff;