Compare commits
No commits in common. "ffc51253baabd33f7110d71c5f8361b4b04e2e30" and "52c4eec278fc5a75ad7651ad30e04dfa2d782caa" have entirely different histories.
ffc51253ba
...
52c4eec278
@ -1,2 +1 @@
|
|||||||
DIST meganz-sdk-3.7.3.tar.gz 3322179 BLAKE2B c8f5f9bea8b1e030f24ae79f0fddf8027d9f770b30762caa1f013d1ca19b40a8bf7451ad6b056743c55d71c48014298f005cbc0f3b24edd932da3ba3edba62e0 SHA512 d85f04cc1cd4c1320f0e01a6d2bd52522f502f91f06ba275c8dbf0f3fb751ac195054376cf97fe7eb93934c37f68614164232486f5d3c296dc830896ca60dea9
|
DIST meganz-sdk-3.7.3.tar.gz 3322179 BLAKE2B c8f5f9bea8b1e030f24ae79f0fddf8027d9f770b30762caa1f013d1ca19b40a8bf7451ad6b056743c55d71c48014298f005cbc0f3b24edd932da3ba3edba62e0 SHA512 d85f04cc1cd4c1320f0e01a6d2bd52522f502f91f06ba275c8dbf0f3fb751ac195054376cf97fe7eb93934c37f68614164232486f5d3c296dc830896ca60dea9
|
||||||
DIST meganz-sdk-7.10.0.tar.gz 4203361 BLAKE2B b8624fa65d40086605d3debae0cea9c1d4167b2b4c54757ef5cf87f3a35cfff8d285a926b3ee12ddb03272e92a144062a1790a2189df38606d7c0741b802f4cf SHA512 6d5c648927225b01b2ef10961864093b51c3dabb2389e63a13fd2a59558ce46ac782f5bd4e16cc312c9975a3cbd8f86948f565ebd05188d6bb76693045b3ed09
|
|
||||||
|
@ -1,120 +0,0 @@
|
|||||||
# Copyright 1999-2024 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=8
|
|
||||||
|
|
||||||
inherit cmake flag-o-matic
|
|
||||||
|
|
||||||
DESCRIPTION="MEGA C++ SDK"
|
|
||||||
HOMEPAGE="https://github.com/meganz/sdk"
|
|
||||||
|
|
||||||
if [[ "${PV}" == "9999" ]]; then
|
|
||||||
inherit git-r3
|
|
||||||
EGIT_REPO_URI="https://github.com/meganz/sdk.git"
|
|
||||||
else
|
|
||||||
SRC_URI="https://github.com/meganz/sdk/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
|
||||||
S="${WORKDIR}/sdk-${PV}"
|
|
||||||
KEYWORDS="~amd64"
|
|
||||||
fi
|
|
||||||
|
|
||||||
LICENSE="BSD-2"
|
|
||||||
SLOT="0/${PV}"
|
|
||||||
IUSE="examples ffmpeg freeimage fuse libuv mediainfo qt test"
|
|
||||||
|
|
||||||
RESTRICT="!test? ( test )"
|
|
||||||
|
|
||||||
# <ffmpeg-6: https://github.com/meganz/sdk/issues/2635
|
|
||||||
RDEPEND="
|
|
||||||
dev-db/sqlite:3
|
|
||||||
dev-libs/crypto++:=
|
|
||||||
dev-libs/icu:=
|
|
||||||
dev-libs/libsodium:=
|
|
||||||
dev-libs/openssl:=
|
|
||||||
net-dns/c-ares:=
|
|
||||||
net-misc/curl
|
|
||||||
ffmpeg? ( <media-video/ffmpeg-6 )
|
|
||||||
freeimage? ( media-libs/freeimage )
|
|
||||||
fuse? ( sys-fs/fuse )
|
|
||||||
libuv? ( dev-libs/libuv:= )
|
|
||||||
mediainfo? (
|
|
||||||
media-libs/libmediainfo
|
|
||||||
media-libs/libzen
|
|
||||||
)
|
|
||||||
qt? ( dev-qt/qtcore:5 )
|
|
||||||
"
|
|
||||||
DEPEND="
|
|
||||||
${RDEPEND}
|
|
||||||
sys-libs/readline
|
|
||||||
"
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
# 1. Mismatched pkgconfig file names
|
|
||||||
# 2. Symbols still needed publically when linking library
|
|
||||||
sed -i \
|
|
||||||
-e '/pkg_check_modules/ s/libcrypto++/libcryptopp/' \
|
|
||||||
-e '/target_link_libraries(SDKlib/ { /\(curl\|sodium\)/ s/PRIVATE/PUBLIC/ }' \
|
|
||||||
contrib/cmake/modules/sdklib_libraries.cmake || die
|
|
||||||
|
|
||||||
sed -i \
|
|
||||||
-e 's|DESTINATION cmake|DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake|' \
|
|
||||||
-e 's|DESTINATION pkgconfig|DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig|' \
|
|
||||||
contrib/cmake/modules/sdklib_target.cmake || die
|
|
||||||
|
|
||||||
# examples use readline symbols
|
|
||||||
sed -i \
|
|
||||||
-e 's/target_link_libraries(megacli PRIVATE MEGA::SDKlib)/target_link_libraries(megacli PRIVATE MEGA::SDKlib PkgConfig::readline)/' \
|
|
||||||
examples/CMakeLists.txt || die
|
|
||||||
|
|
||||||
cmake_src_prepare
|
|
||||||
}
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
# building with DEBUG disabled isn't tested apparently
|
|
||||||
# https://github.com/meganz/sdk/issues/2658
|
|
||||||
append-cppflags -DDEBUG=1
|
|
||||||
|
|
||||||
local mycmakeargs=(
|
|
||||||
# CMakeLists.txt
|
|
||||||
# contrib/cmake/modules/sdklib_options.cmake
|
|
||||||
|
|
||||||
-DENABLE_ISOLATED_GFX=OFF # required freeimage + doesn't properly link libz
|
|
||||||
-DENABLE_QT_BINDINGS=$(usex qt) # doesn't get installed
|
|
||||||
-DENABLE_SDKLIB_EXAMPLES=$(usex examples)
|
|
||||||
-DENABLE_SDKLIB_TESTS=$(usex test)
|
|
||||||
-DENABLE_SDKLIB_WERROR=OFF
|
|
||||||
-DUSE_FFMPEG=$(usex ffmpeg)
|
|
||||||
-DUSE_C_ARES=ON
|
|
||||||
-DUSE_FREEIMAGE=$(usex freeimage)
|
|
||||||
-DUSE_LIBUV=$(usex libuv)
|
|
||||||
-DUSE_MEDIAINFO=$(usex mediainfo)
|
|
||||||
-DUSE_OPENSSL=ON
|
|
||||||
-DUSE_PDFIUM=OFF # unpackaged
|
|
||||||
-DUSE_READLINE=ON
|
|
||||||
-DWITH_FUSE=$(usex fuse)
|
|
||||||
)
|
|
||||||
cmake_src_configure
|
|
||||||
}
|
|
||||||
|
|
||||||
src_test() {
|
|
||||||
set -- "${BUILD_DIR}"/tests/unit/test_unit
|
|
||||||
einfo ${@}
|
|
||||||
${@} || die
|
|
||||||
|
|
||||||
# integration test require a mega account and will be destructive, which is why they aren't run.
|
|
||||||
# IMPORTANT: the main account must be empty (Cloud & Rubbish) before starting the test and it will be purged at exit.
|
|
||||||
# Both main and auxiliar accounts shouldn't be contacts yet and shouldn't have any pending contact requests.
|
|
||||||
# Set your login credentials as environment variables:
|
|
||||||
# * $MEGA_EMAIL and $MEGA_PWD (and $MEGA_EMAIL_AUX / $MEGA_PWD_AUX for shares * contacts)
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
cmake_src_install
|
|
||||||
|
|
||||||
doheader -r include/mega
|
|
||||||
|
|
||||||
if use qt; then
|
|
||||||
dolib.so "${BUILD_DIR}"/bindings/qt/libSDKQtBindings.so
|
|
||||||
insinto /usr/share/${PN}/bindings/qt
|
|
||||||
doins bindings/qt/*.{h,cpp}
|
|
||||||
fi
|
|
||||||
}
|
|
@ -1,120 +1,107 @@
|
|||||||
# Copyright 1999-2024 Gentoo Authors
|
# Copyright 1999-2021 Gentoo Authors
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
EAPI=8
|
EAPI=7
|
||||||
|
|
||||||
inherit cmake flag-o-matic
|
|
||||||
|
|
||||||
|
inherit flag-o-matic qmake-utils autotools db-use
|
||||||
|
if [[ -z ${PV%%*9999} ]]; then
|
||||||
|
inherit git-r3
|
||||||
|
EGIT_REPO_URI="https://github.com/${PN%-*}/${PN#*-}.git"
|
||||||
|
else
|
||||||
|
SRC_URI="https://github.com/meganz/sdk/archive/v${PV}d.tar.gz -> ${P}.tar.gz"
|
||||||
|
S="${WORKDIR}/sdk-${PV}d"
|
||||||
|
RESTRICT="primaryuri"
|
||||||
|
KEYWORDS="~amd64 ~x86"
|
||||||
|
fi
|
||||||
DESCRIPTION="MEGA C++ SDK"
|
DESCRIPTION="MEGA C++ SDK"
|
||||||
HOMEPAGE="https://github.com/meganz/sdk"
|
HOMEPAGE="https://github.com/meganz/sdk"
|
||||||
|
|
||||||
if [[ "${PV}" == "9999" ]]; then
|
|
||||||
inherit git-r3
|
|
||||||
EGIT_REPO_URI="https://github.com/meganz/sdk.git"
|
|
||||||
else
|
|
||||||
SRC_URI="https://github.com/meganz/sdk/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
|
||||||
S="${WORKDIR}/sdk-${PV}"
|
|
||||||
KEYWORDS="~amd64"
|
|
||||||
fi
|
|
||||||
|
|
||||||
LICENSE="BSD-2"
|
LICENSE="BSD-2"
|
||||||
SLOT="0/${PV}"
|
SLOT="0/30701"
|
||||||
IUSE="examples ffmpeg freeimage fuse libuv mediainfo qt test"
|
IUSE="examples ffmpeg freeimage fuse hardened inotify libuv mediainfo qt raw +sqlite test"
|
||||||
|
REQUIRED_USE="
|
||||||
|
examples? ( sqlite )
|
||||||
|
fuse? ( examples )
|
||||||
|
"
|
||||||
|
# tests require a working mega.nz account and login details provided via $MEGA_EMAIL and $MEGA_PWD
|
||||||
|
RESTRICT+=" test"
|
||||||
|
|
||||||
RESTRICT="!test? ( test )"
|
|
||||||
|
|
||||||
# <ffmpeg-6: https://github.com/meganz/sdk/issues/2635
|
|
||||||
RDEPEND="
|
RDEPEND="
|
||||||
dev-db/sqlite:3
|
dev-libs/crypto++
|
||||||
dev-libs/crypto++:=
|
sys-libs/zlib
|
||||||
dev-libs/icu:=
|
dev-libs/libpcre:3[cxx]
|
||||||
dev-libs/libsodium:=
|
dev-libs/openssl:0
|
||||||
dev-libs/openssl:=
|
net-dns/c-ares
|
||||||
net-dns/c-ares:=
|
|
||||||
net-misc/curl
|
net-misc/curl
|
||||||
ffmpeg? ( <media-video/ffmpeg-6 )
|
sqlite? ( dev-db/sqlite:3 )
|
||||||
freeimage? ( media-libs/freeimage )
|
!sqlite? ( sys-libs/db:*[cxx] )
|
||||||
fuse? ( sys-fs/fuse )
|
examples? (
|
||||||
libuv? ( dev-libs/libuv:= )
|
sys-libs/readline:0
|
||||||
mediainfo? (
|
fuse? ( sys-fs/fuse:0 )
|
||||||
media-libs/libmediainfo
|
|
||||||
media-libs/libzen
|
|
||||||
)
|
)
|
||||||
qt? ( dev-qt/qtcore:5 )
|
freeimage? ( media-libs/freeimage )
|
||||||
|
libuv? ( dev-libs/libuv )
|
||||||
|
dev-libs/libsodium
|
||||||
|
mediainfo? ( media-libs/libmediainfo )
|
||||||
|
ffmpeg? ( media-video/ffmpeg )
|
||||||
|
raw? ( media-libs/libraw )
|
||||||
"
|
"
|
||||||
DEPEND="
|
DEPEND="
|
||||||
${RDEPEND}
|
${RDEPEND}
|
||||||
sys-libs/readline
|
test? ( dev-cpp/gtest )
|
||||||
"
|
"
|
||||||
|
|
||||||
|
pkg_setup() {
|
||||||
|
use sqlite || append-cppflags "-I$(db_includedir)"
|
||||||
|
}
|
||||||
|
|
||||||
src_prepare() {
|
src_prepare() {
|
||||||
# 1. Mismatched pkgconfig file names
|
default
|
||||||
# 2. Symbols still needed publically when linking library
|
use qt && sed \
|
||||||
sed -i \
|
-e '/SOURCES += src\// s:+:-:' \
|
||||||
-e '/pkg_check_modules/ s/libcrypto++/libcryptopp/' \
|
-e '/!exists.*config.h/ s:!::' \
|
||||||
-e '/target_link_libraries(SDKlib/ { /\(curl\|sodium\)/ s/PRIVATE/PUBLIC/ }' \
|
-e 's:CONFIG(USE_MEGAAPI) {:&\nLIBS += -lmega:' \
|
||||||
contrib/cmake/modules/sdklib_libraries.cmake || die
|
-e '/^unix:!macx {/,/^}/d' \
|
||||||
|
-i bindings/qt/sdk.pri
|
||||||
sed -i \
|
use test && sed \
|
||||||
-e 's|DESTINATION cmake|DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake|' \
|
-e 's:\$(GTEST_DIR)/lib/lib\([^ ]\+\)\.la:-l\1:g' \
|
||||||
-e 's|DESTINATION pkgconfig|DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig|' \
|
-e 's: tests/tool_purge_account::' \
|
||||||
contrib/cmake/modules/sdklib_target.cmake || die
|
-i tests/include.am
|
||||||
|
eautoreconf
|
||||||
# examples use readline symbols
|
|
||||||
sed -i \
|
|
||||||
-e 's/target_link_libraries(megacli PRIVATE MEGA::SDKlib)/target_link_libraries(megacli PRIVATE MEGA::SDKlib PkgConfig::readline)/' \
|
|
||||||
examples/CMakeLists.txt || die
|
|
||||||
|
|
||||||
cmake_src_prepare
|
|
||||||
}
|
}
|
||||||
|
|
||||||
src_configure() {
|
src_configure() {
|
||||||
# building with DEBUG disabled isn't tested apparently
|
local myeconfargs=(
|
||||||
# https://github.com/meganz/sdk/issues/2658
|
--enable-chat
|
||||||
append-cppflags -DDEBUG=1
|
$(use_enable inotify)
|
||||||
|
$(use_enable hardened gcc-hardening)
|
||||||
local mycmakeargs=(
|
$(use_with libuv)
|
||||||
# CMakeLists.txt
|
$(use_with !sqlite db)
|
||||||
# contrib/cmake/modules/sdklib_options.cmake
|
$(use_with sqlite)
|
||||||
|
$(use_enable examples)
|
||||||
-DENABLE_ISOLATED_GFX=OFF # required freeimage + doesn't properly link libz
|
$(use_enable test tests)
|
||||||
-DENABLE_QT_BINDINGS=$(usex qt) # doesn't get installed
|
$(use_with freeimage)
|
||||||
-DENABLE_SDKLIB_EXAMPLES=$(usex examples)
|
$(use_with fuse)
|
||||||
-DENABLE_SDKLIB_TESTS=$(usex test)
|
$(use_with mediainfo libmediainfo)
|
||||||
-DENABLE_SDKLIB_WERROR=OFF
|
$(use_with ffmpeg)
|
||||||
-DUSE_FFMPEG=$(usex ffmpeg)
|
$(use_with raw libraw)
|
||||||
-DUSE_C_ARES=ON
|
|
||||||
-DUSE_FREEIMAGE=$(usex freeimage)
|
|
||||||
-DUSE_LIBUV=$(usex libuv)
|
|
||||||
-DUSE_MEDIAINFO=$(usex mediainfo)
|
|
||||||
-DUSE_OPENSSL=ON
|
|
||||||
-DUSE_PDFIUM=OFF # unpackaged
|
|
||||||
-DUSE_READLINE=ON
|
|
||||||
-DWITH_FUSE=$(usex fuse)
|
|
||||||
)
|
)
|
||||||
cmake_src_configure
|
use test && myeconfargs+=(
|
||||||
|
--with-gtest="${EPREFIX}/usr"
|
||||||
|
)
|
||||||
|
econf "${myeconfargs[@]}"
|
||||||
}
|
}
|
||||||
|
|
||||||
src_test() {
|
src_test() {
|
||||||
set -- "${BUILD_DIR}"/tests/unit/test_unit
|
export MEGA_EMAIL MEGA_PWD MEGA_EMAIL_AUX="${MEGA_EMAIL}" MEGA_PWD_AUX="${MEGA_PWD}"
|
||||||
einfo ${@}
|
default
|
||||||
${@} || die
|
|
||||||
|
|
||||||
# integration test require a mega account and will be destructive, which is why they aren't run.
|
|
||||||
# IMPORTANT: the main account must be empty (Cloud & Rubbish) before starting the test and it will be purged at exit.
|
|
||||||
# Both main and auxiliar accounts shouldn't be contacts yet and shouldn't have any pending contact requests.
|
|
||||||
# Set your login credentials as environment variables:
|
|
||||||
# * $MEGA_EMAIL and $MEGA_PWD (and $MEGA_EMAIL_AUX / $MEGA_PWD_AUX for shares * contacts)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
src_install() {
|
src_install() {
|
||||||
cmake_src_install
|
default
|
||||||
|
|
||||||
doheader -r include/mega
|
doheader -r include/mega
|
||||||
|
|
||||||
if use qt; then
|
use qt || return
|
||||||
dolib.so "${BUILD_DIR}"/bindings/qt/libSDKQtBindings.so
|
insinto /usr/share/${PN}/bindings/qt
|
||||||
insinto /usr/share/${PN}/bindings/qt
|
doins bindings/qt/*.{h,cpp,pri}
|
||||||
doins bindings/qt/*.{h,cpp}
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user