Use https for most gnu.org URLs
[gentoo.git] / dev-util / emilpro / emilpro-3-r1.ebuild
1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6
7 inherit cmake-utils eutils
8
9 DESCRIPTION="a graphical disassembler for a large number of instruction sets"
10 HOMEPAGE="http://www.emilpro.com/"
11
12 if [[ ${PV} == "9999" ]] ; then
13         EGIT_REPO_URI="https://github.com/SimonKagstrom/emilpro"
14         inherit git-r3
15         KEYWORDS=""
16         SRC_URI="mirror://gnu/binutils/binutils-2.23.2.tar.bz2"
17 else
18         SRC_URI="http://www.emilpro.com/${P}.tar.gz
19                 !system-binutils? ( mirror://gnu/binutils/binutils-2.23.2.tar.bz2 )"
20         KEYWORDS="~amd64 ~x86"
21 fi
22
23 LICENSE="GPL-2"
24 SLOT="0"
25 IUSE="+system-binutils"
26
27 DEPEND="|| ( dev-libs/elfutils dev-libs/libelf )
28         dev-cpp/gtkmm:3.0
29         dev-cpp/gtksourceviewmm:3.0
30         dev-cpp/libxmlpp:2.6
31         system-binutils? ( sys-devel/binutils[multitarget] )
32         net-misc/curl"
33 RDEPEND="${DEPEND}"
34
35 src_prepare() {
36         epatch "${FILESDIR}"/respect-cflags.patch
37         if use system-binutils; then
38                 epatch "${FILESDIR}"/use-gentoo-binutils.patch
39         else
40                 sed -i "s#wget -O binutils.tar.bz2 https://ftp.gnu.org/gnu/binutils/binutils-2.23.2.tar.bz2#cp \"${DISTDIR}/binutils-2.23.2.tar.bz2\" ./binutils.tar.bz2#" cmake/BuildBinutils.cmake
41         fi
42         cmake-utils_src_prepare
43 }
44
45 src_compile() {
46         if use system-binutils; then
47                 cmake-utils_src_compile
48         else
49                 #bundled binutils is broken, always builds with one thread
50                 #but somehow it still fails if I don't do this
51                 cd "${BUILD_DIR}"
52                 emake -j1
53         fi
54 }
55
56 src_install() {
57         dobin "${BUILD_DIR}"/emilpro
58 }