megacmd-9999.ebuild (1239B)
1 # Copyright 1999-2022 Gentoo Authors 2 # Distributed under the terms of the GNU General Public License v2 3 4 EAPI=8 5 6 inherit autotools 7 if [[ -z ${PV%%*9999} ]]; then 8 inherit git-r3 9 EGIT_REPO_URI="https://github.com/meganz/${PN}.git" 10 EGIT_SUBMODULES=( ) 11 else 12 PN2="MEGAcmd" 13 SRC_URI="https://yorune.pl/gentoo/${CATEGORY}/${PN}/${PN}-${PV} -> ${P}.tar.gz" 14 S="${WORKDIR}/${PN2}-${PV}_Linux" 15 RESTRICT="primaryuri" 16 KEYWORDS="~amd64 ~x86" 17 fi 18 19 DESCRIPTION="Command Line Interactive and Scriptable Application to access MEGA" 20 HOMEPAGE="https://mega.nz/cmd" 21 22 LICENSE="BSD-2" 23 SLOT="0" 24 DEPEND=" 25 >=net-misc/meganz-sdk-3.7.3:=[sodium(+),sqlite] 26 dev-libs/libpcre:3[cxx] 27 sys-libs/readline:0 28 " 29 RDEPEND=" 30 ${DEPEND} 31 " 32 DOCS=( README.md build/megacmd/megacmd.changes ) 33 34 src_prepare() { 35 sed \ 36 -e '/SUBDIRS.*sdk/d' \ 37 -e '/sdk\/m4/d' \ 38 -e 's:LMEGAINC=.*:PKG_CHECK_MODULES([MEGA],[libmega])\nLMEGAINC=${MEGA_CFLAGS}:' \ 39 -i Makefile.am configure.ac 40 sed \ 41 -e 's:\$(top_builddir)/sdk/src/libmega\.la:$(MEGA_LIBS):' \ 42 -e 's:mega_cmd_LDADD = .*:&$(MEGA_LIBS):' \ 43 -e 's:^mega_exec_CXXFLAGS.*:&\nmega_exec_LDADD=$(MEGA_LIBS):' \ 44 -e 's:sdk/include/mega/[^ ]\+\.h::g' \ 45 -e '/sdk\/src\/[^ ]\+\.cpp/d' \ 46 -i src/include.am 47 default 48 eautoreconf 49 }