GLUED: renamed packages to rules, cfg_dir_packages to cfg_dir_rules.
This commit is contained in:
70
rules/apache-log4cxx/default.bash
Normal file
70
rules/apache-log4cxx/default.bash
Normal file
@@ -0,0 +1,70 @@
|
||||
version=\
|
||||
(
|
||||
'0.10.0'
|
||||
)
|
||||
|
||||
url=\
|
||||
(
|
||||
"http://www.eu.apache.org/dist/logging/log4cxx/0.10.0/apache-log4cxx-0.10.0.tar.gz"
|
||||
)
|
||||
|
||||
md5=\
|
||||
(
|
||||
'b30ffb8da3665178e68940ff7a61084c'
|
||||
)
|
||||
|
||||
requires=\
|
||||
(
|
||||
'apr/default'
|
||||
'apr-util/default'
|
||||
)
|
||||
|
||||
post_unpack()
|
||||
{
|
||||
patches=$(ls "$cfg_package_spec_dir/patches-$version/"*.patch 2>/dev/null)
|
||||
if [ -n "$patches" ]; then
|
||||
cat $patches | patch -p1
|
||||
fi
|
||||
}
|
||||
|
||||
configure()
|
||||
{
|
||||
./configure \
|
||||
--prefix="${cfg_dir_toolchain_sysroot}/usr" \
|
||||
--target=${cfg_target_canonical} \
|
||||
--host=${cfg_target_canonical} \
|
||||
--build=${cfg_host_canonical} \
|
||||
--with-apr="${cfg_dir_toolchain_sysroot}/usr" \
|
||||
--with-apr-util="${cfg_dir_toolchain_sysroot}/usr" \
|
||||
--enable-shared \
|
||||
--disable-static \
|
||||
ac_cv_file__dev_zero=yes \
|
||||
ac_cv_func_setpgrp_void=yes \
|
||||
apr_cv_tcp_nodelay_with_cork=no \
|
||||
apr_cv_process_shared_works=no \
|
||||
apr_cv_mutex_robust_shared=no \
|
||||
ac_cv_sizeof_struct_iovec=8
|
||||
}
|
||||
|
||||
build()
|
||||
{
|
||||
$cmd_make
|
||||
}
|
||||
|
||||
host_install()
|
||||
{
|
||||
cd ../log4cpp
|
||||
$cmd_make install
|
||||
}
|
||||
|
||||
target_install()
|
||||
{
|
||||
# Libs:
|
||||
for f in "$cfg_dir_toolchain_sysroot/usr/lib/"liblog4cxx*.so*; do
|
||||
if [ -L "$f" ]; then
|
||||
$cmd_cp "$f" "$cfg_dir_rootfs/usr/lib"
|
||||
else
|
||||
$cmd_target_strip -v "$f" -o "$cfg_dir_rootfs/usr/lib/$(basename "$f")"
|
||||
fi
|
||||
done
|
||||
}
|
@@ -0,0 +1,12 @@
|
||||
--- apache-log4cxx-0.10.0/src/examples/cpp/console.cpp 2008-04-01 00:34:52.000000000 +0200
|
||||
+++ apache-log4cxx-0.10.0/src/examples/cpp/console.cpp 2013-04-16 12:59:03.149931476 +0200
|
||||
@@ -15,7 +15,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
+#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
+#include <string.h>
|
||||
#include <log4cxx/logger.h>
|
||||
#include <log4cxx/consoleappender.h>
|
||||
#include <log4cxx/simplelayout.h>
|
@@ -0,0 +1,19 @@
|
||||
--- apache-log4cxx-0.10.0/src/main/cpp/inputstreamreader.cpp 2008-04-01 00:34:09.000000000 +0200
|
||||
+++ apache-log4cxx-0.10.0/src/main/cpp/inputstreamreader.cpp 2013-04-16 12:57:58.153931747 +0200
|
||||
@@ -15,6 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
+#include <cstring>
|
||||
#include <log4cxx/logstring.h>
|
||||
#include <log4cxx/helpers/inputstreamreader.h>
|
||||
#include <log4cxx/helpers/exception.h>
|
||||
@@ -63,7 +64,7 @@ LogString InputStreamReader::read(Pool&
|
||||
throw IOException(stat);
|
||||
}
|
||||
if (buf.remaining() > 0) {
|
||||
- memmove(buf.data(), buf.current(), buf.remaining());
|
||||
+ std::memmove(buf.data(), buf.current(), buf.remaining());
|
||||
buf.limit(buf.remaining());
|
||||
} else {
|
||||
buf.clear();
|
@@ -0,0 +1,19 @@
|
||||
--- apache-log4cxx-0.10.0/src/main/cpp/socketoutputstream.cpp 2008-04-01 00:34:09.000000000 +0200
|
||||
+++ apache-log4cxx-0.10.0/src/main/cpp/socketoutputstream.cpp 2013-04-16 12:53:30.646181613 +0200
|
||||
@@ -15,6 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
+#include <cstring>
|
||||
#include <log4cxx/logstring.h>
|
||||
#include <log4cxx/helpers/socketoutputstream.h>
|
||||
#include <log4cxx/helpers/socket.h>
|
||||
@@ -49,7 +50,7 @@ void SocketOutputStream::write(ByteBuffe
|
||||
if (buf.remaining() > 0) {
|
||||
size_t sz = array.size();
|
||||
array.resize(sz + buf.remaining());
|
||||
- memcpy(&array[sz], buf.current(), buf.remaining());
|
||||
+ std::memcpy(&array[sz], buf.current(), buf.remaining());
|
||||
buf.position(buf.limit());
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user