I try to make an ebuild for the telldius-core-2.1.1, the code can be compiled and installed into my system by these actions:
adding "#include <unistd.h>" into file telldus-core-2.1.1/common/Socket_unix.cpp
Then:
cmake .
make
make install
ldconfig
The current ebuild looks like this:
Code: Select all
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/openvas-manager/openvas-manager-2.0.4.ebuild,v 1.2 2012/05/04 06:08:10 jdhore Exp $
EAPI="2"
RESTRICT="primaryuri"
inherit cmake-utils
DESCRIPTION="Cli for tellstick house automation transmitter/reciever"
HOMEPAGE="http://www.telldus.se/"
SRC_URI="http://download.telldus.se/TellStick/Software/telldus-core/${P}.tar.gz"
SLOT="0"
LICENSE="LGPL-2"
KEYWORDS="~amd64 ~arm ~x86"
IUSE=""
RDEPEND=""
DEPEND="${RDEPEND}
virtual/pkgconfig
dev-util/cmake"
src_prepare() {
epatch "${FILESDIR}"/telldus-core-2.1.1_fix_missing_include.patch
}
src_configure() {
cmake-utils_src_configure
}
src_install() {
emake DESTDIR="${D}" install
}
pkg_postinst() {
elog "Start /usr/local/sbin/telldusd before use of service"
}Code: Select all
--- common/Socket_unix.cpp.orig 2012-11-04 13:21:56.000000000 +0100
+++ common/Socket_unix.cpp 2012-11-04 13:21:56.000000000 +0100
@@ -7,6 +7,7 @@
#include <sys/socket.h>
#include <sys/un.h>
#include <math.h>
+#include <unistd.h>
#define BUFSIZE 512Code: Select all
[ 18%] Building CXX object common/CMakeFiles/TelldusCommon.dir/EventHandler_unix.cpp.o
cd /var/tmp/portage/dev-util/telldus-core-2.1.1/work/telldus-core-2.1.1_build/common && /usr/bin/x86_64-pc-linux-gnu-g++ -D_LINUX -DNDEBUG -march=core2 -O2 -pipe -fPIC -fvisibility=hidden -o CMakeFiles/TelldusCommon.dir/EventHandler_unix.cpp.o -c /var/tmp/portage/dev-util/telldus-core-2.1.1/work/telldus-core-2.1.1/common/EventHandler_unix.cpp
/usr/bin/cmake -E cmake_progress_report /var/tmp/portage/dev-util/telldus-core-2.1.1/work/telldus-core-2.1.1_build/CMakeFiles 8
[ 20%] Building CXX object common/CMakeFiles/TelldusCommon.dir/Socket_unix.cpp.o
cd /var/tmp/portage/dev-util/telldus-core-2.1.1/work/telldus-core-2.1.1_build/common && /usr/bin/x86_64-pc-linux-gnu-g++ -D_LINUX -DNDEBUG -march=core2 -O2 -pipe -fPIC -fvisibility=hidden -o CMakeFiles/TelldusCommon.dir/Socket_unix.cpp.o -c /var/tmp/portage/dev-util/telldus-core-2.1.1/work/telldus-core-2.1.1/common/Socket_unix.cpp
Linking CXX static library libTelldusCommon.a
cd /var/tmp/portage/dev-util/telldus-core-2.1.1/work/telldus-core-2.1.1_build/common && /usr/bin/cmake -P CMakeFiles/TelldusCommon.dir/cmake_clean_target.cmake
cd /var/tmp/portage/dev-util/telldus-core-2.1.1/work/telldus-core-2.1.1_build/common && /usr/bin/cmake -E cmake_link_script CMakeFiles/TelldusCommon.dir/link.txt --verbose=1
/usr/bin/x86_64-pc-linux-gnu-ar cr libTelldusCommon.a CMakeFiles/TelldusCommon.dir/Event.cpp.o CMakeFiles/TelldusCommon.dir/Message.cpp.o CMakeFiles/TelldusCommon.dir/Mutex.cpp.o CMakeFiles/TelldusCommon.dir/Strings.cpp.o CMakeFiles/TelldusCommon.dir/Thread.cpp.o CMakeFiles/TelldusCommon.dir/Event_unix.cpp.o CMakeFiles/TelldusCommon.dir/EventHandler_unix.cpp.o CMakeFiles/TelldusCommon.dir/Socket_unix.cpp.o
/usr/bin/x86_64-pc-linux-gnu-ranlib libTelldusCommon.a
make[2]: Lämnar katalogen "/var/tmp/portage/dev-util/telldus-core-2.1.1/work/telldus-core-2.1.1_build"
/usr/bin/cmake -E cmake_progress_report /var/tmp/portage/dev-util/telldus-core-2.1.1/work/telldus-core-2.1.1_build/CMakeFiles 1 2 3 4 5 6 7 8
[ 20%] Built target TelldusCommon
make[1]: Lämnar katalogen "/var/tmp/portage/dev-util/telldus-core-2.1.1/work/telldus-core-2.1.1_build"
make: *** [all] Fel 2
emake failed
* ERROR: dev-util/telldus-core-2.1.1 failed (compile phase):
* Make failed!
*
* Call stack:
* ebuild.sh, line 93: Called src_compile
* environment, line 2783: Called cmake-utils_src_compile
* environment, line 751: Called _execute_optionaly 'src_compile'
* environment, line 269: Called enable_cmake-utils_src_compile
* environment, line 1000: Called cmake-utils_src_make
* environment, line 776: Called die
* The specific snippet of code:
* emake VERBOSE=1 "$@" || die "Make failed!";
*
* If you need support, post the output of `emerge --info '=dev-util/telldus-core-2.1.1'`,
* the complete build log and the output of `emerge -pqv '=dev-util/telldus-core-2.1.1'`.
* This ebuild is from an overlay named 'local-repo': '/usr/local/portage/'
* The complete build log is located at '/var/tmp/portage/dev-util/telldus-core-2.1.1/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/dev-util/telldus-core-2.1.1/temp/environment'.
* Working directory: '/var/tmp/portage/dev-util/telldus-core-2.1.1/work/telldus-core-2.1.1_build'
* S: '/var/tmp/portage/dev-util/telldus-core-2.1.1/work/telldus-core-2.1.1'

