Open shfbsdbvf opened 3 months ago
I can't reproduce this. Attaching my build.log with success compilation
Maybe the problem is in \$ENV{DESTDIR}
? In my case $ENV is empty.
Anyway, I built it with a workaround after the build failed:
cd /var/tmp/portage/net-voip/linphone-desktop-5.2.4/work/linphone-desktop-5.2.4/linphone-app/src
ln -s ../include/LinphoneApp .
ebuild /var/db/repos/nest/net-voip/linphone-desktop/linphone-desktop-5.2.4.ebuild merge
Maybe the problem is in \$ENV{DESTDIR}?
I don't think so. DESTDIR is used here to avoid copying files outside of portage sendbox, like this:
/usr/bin/cmake -E copy_directory /var/tmp/portage/net-voip/linphone-desktop-5.2.6/work/linphone-desktop-5.2.6/linphone-app/include/ /usr/include/ && cd /var/tmp/portage/net-voip/linphone-desktop-5.2.6/work/linphone-desktop-5.2.6_build/linphone-app && /usr/bin/cmake -E copy /var/tmp/portage/net-voip/linphone-desktop-5.2.6/work/linphone-desktop-5.2.6_build/linphone-app/libapp-plugin.so /usr/lib64/ && cd /var/tmp/portage/net-voip/linphone-desktop-5.2.6/work/linphone-desktop-5.2.6_build/linphone-app && /usr/bin/cmake -E copy /var/tmp/portage/net-voip/linphone-desktop-5.2.6/work/linphone-desktop-5.2.6_build/linphone-app/libapp-plugin.so /usr/lib64/
Error copying directory from "/var/tmp/portage/net-voip/linphone-desktop-5.2.6/work/linphone-desktop-5.2.6/linphone-app/include/" to "/usr/include/".
ninja: build stopped: subcommand failed.
You could verify this by copying ebuild to local overlay and removing this line from it.
In your original error you're missing headers for plugin and looks like you workaround makes them accessible for your build environment.
Try this ebuild:
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake xdg
DESCRIPTION="A free VoIP and video softphone based on the SIP protocol"
HOMEPAGE="https://gitlab.linphone.org/BC/public/linphone-desktop"
SRC_URI="https://gitlab.linphone.org/BC/public/${PN}/-/archive/${PV}/${P}.tar.bz2"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="ldap qrcode"
RESTRICT="test" # needs sdk
RDEPEND="dev-libs/belcard
dev-libs/jsoncpp:0=
dev-libs/liblinphone
dev-libs/qtkeychain:=
dev-qt/qtconcurrent:5
dev-qt/qtcore:5
dev-qt/qtdbus:5
dev-qt/qtgui:5
dev-qt/qtnetwork:5
dev-qt/qtquickcontrols:5
dev-qt/qtquickcontrols2:5[widgets]
dev-qt/qtsvg:5
dev-qt/qtwidgets:5
media-libs/mediastreamer2[zrtp,jpeg]
net-libs/bctoolbox
net-libs/ortp
ldap? ( net-nds/openldap:0= )
qrcode? ( media-libs/zxing-cpp:0= )"
DEPEND="${RDEPEND}"
BDEPEND="dev-vcs/git
dev-qt/linguist-tools:5
virtual/pkgconfig"
PATCHES=( # change path to BCToolbox, include utils
"${FILESDIR}"/"${PN}"-5.2.4-FindBCToolbox.patch
# fix incorrect use of get_target_property
"${FILESDIR}"/"${PN}"-5.2.4-FindMediastreamer2.patch
# change path to BCToolbox, include config
"${FILESDIR}"/"${PN}"-5.2.4-FindLibLinphone.patch
# change path to BelCard
"${FILESDIR}"/"${PN}"-5.2.4-FindBelcard.patch
# remove spellchecker from UI
"${FILESDIR}"/"${PN}"-5.2.4-spellchecker.patch )
DOCS=( {CHANGELOG,README}.md )
src_prepare() {
# don't build ispell, don't build rpm, don't install qt.conf,
# respect DESTDIR, correct include path, commend out spellchecker sources
sed -i -e '/if(NOT APPLE AND NOT WIN32)/s|APPLE|UNIX|' \
-e '/add_subdirectory(build)/d' \
-e '/deployqt_hack/d' \
-e 's|${CMAKE_INSTALL_PREFIX}|\\$ENV{DESTDIR}\/${CMAKE_INSTALL_PREFIX}|g' \
-e '/install(DIRECTORY/s|include"|include/"|' \
-e '/spell-checker/s|^|#|' \
linphone-app/CMakeLists.txt \
|| die "sed for CMakeLists.txt failed"
# don't install ispell dictionaries, don't build AppImage, don't install qt.conf
sed -i -e '/ISpell_SOURCE_DIR/d' \
-e '/{ENABLE_APP_PACKAGING}/s|}|_}|' \
-e "/install(FILES.*qt.conf/d" \
linphone-app/cmake_builder/linphone_package/CMakeLists.txt \
|| die "sed failed for linphone_package/CMakeLists.txt"
# remove SpellChecker component
sed -i '/SpellChecker/d' linphone-app/src/app/App.cpp \
|| die "sed failed for App.cpp"
# make plugins headers visible
ln -s "${S}/linphone-app/include/LinphoneApp" "${S}/linphone-app/src/LinphoneApp"
cmake_src_prepare
}
src_configure() {
local mycmakeargs=(
-DLINPHONEAPP_VERSION="${PV}"
-DLINPHONE_OUTPUT_DIR="/usr"
-DENABLE_APP_PACKAGING=YES
-DLINPHONE_QT_ONLY=YES
-DENABLE_APP_EXPORT_PLUGIN=NO
-DENABLE_BUILD_VERBOSE=ON
-DENABLE_CONSOLE_UI=ON
-DENABLE_DAEMON=ON
-DENABLE_LDAP="$(usex ldap)"
-DENABLE_QRCODE="$(usex qrcode)"
-DENABLE_QT_KEYCHAIN=NO
-DENABLE_STRICT=OFF
-DENABLE_UPDATE_CHECK=OFF
-DENABLE_BUILD_APP_PLUGINS=OFF
-Wno-dev
)
cmake_src_configure
}
here's the error:
FAILED: linphone-app/CMakeFiles/app-library.dir/app-library_autogen/mocs_compilation.cpp.o /usr/bin/x86_64-pc-linux-gnu-g++ -DENABLE_VIDEO -I/var/tmp/portage/net-voip/linphone-desktop-5.2.4/work/linphone-desktop-5.2.4_build/linphone-app -I/var/tmp/portage/net-voip/linphone-desktop-5.2.4/work/linphone-desktop-5.2.4/linphone-app -I/var/tmp/portage/net-voip/linphone-desktop-5.2.4/work/linphone-desktop-5.2.4_build/linphone-app/app-library_autogen/include -I/var/tmp/portage/net-voip/linphone-desktop-5.2.4/work/linphone-desktop-5.2.4/linphone-app/src -I/usr/include/OpenGL -I"/var/tmp/portage/net-voip/linphone-desktop-5.2.4/work/linphone-desktop-5.2.4/linphone-app/\$ENV{DESTDIR}/usr/include" -isystem /usr/include/belle-sip -isystem /usr/include/libxml2 -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtQmlModels -isystem /usr/include/qt5/QtQml -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtCore -isystem /usr/lib64/qt5/mkspecs/linux-g++ -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtQuick -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtQuickControls2 -isystem /usr/include/qt5/QtSvg -isystem /usr/include/qt5/QtConcurrent -isystem /usr/include/qt5/QtTest -isystem /usr/include/qt5/QtMultimedia -isystem /usr/include/qt5/QtDBus -mtune=generic -O2 -pipe -DQMLMODELS_ENABLED -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -std=gnu++14 -fPIC -MD -MT linphone-app/CMakeFiles/app-library.dir/app-library_autogen/mocs_compilation.cpp.o -MF linphone-app/CMakeFiles/app-library.dir/app-library_autogen/mocs_compilation.cpp.o.d -o linphone-app/CMakeFiles/app-library.dir/app-library_autogen/mocs_compilation.cpp.o -c /var/tmp/portage/net-voip/linphone-desktop-5.2.4/work/linphone-desktop-5.2.4_build/linphone-app/app-library_autogen/mocs_compilation.cpp In file included from /var/tmp/portage/net-voip/linphone-desktop-5.2.4/work/linphone-desktop-5.2.4_build/linphone-app/app-library_autogen/WROIZFETPG/../../../../linphone-desktop-5.2.4/linphone-app/src/components/contacts/ContactsImporterModel.hpp:28, from /var/tmp/portage/net-voip/linphone-desktop-5.2.4/work/linphone-desktop-5.2.4_build/linphone-app/app-library_autogen/WROIZFETPG/moc_ContactsImporterModel.cpp:10, from /var/tmp/portage/net-voip/linphone-desktop-5.2.4/work/linphone-desktop-5.2.4_build/linphone-app/app-library_autogen/mocs_compilation.cpp:46: /var/tmp/portage/net-voip/linphone-desktop-5.2.4/work/linphone-desktop-5.2.4/linphone-app/include/LinphoneApp/PluginDataAPI.hpp:9:18: fatal error: LinphoneApp/LinphonePlugin.hpp: No such file or directory 9 | #include <LinphoneApp/LinphonePlugin.hpp> | ^
~~~~~~~ compilation terminated.