]> git.draconx.ca Git - gentoo-draconx.git/blob - x11-apps/dragon/dragon-1.1.1.ebuild
Add x11-apps/dragon ebuild.
[gentoo-draconx.git] / x11-apps / dragon / dragon-1.1.1.ebuild
1 # Copyright 2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit toolchain-funcs
7
8 DESCRIPTION="Simple drag and drop source/target for X"
9 HOMEPAGE="https://github.com/mwh/dragon"
10 SRC_URI="https://github.com/mwh/dragon/archive/v$PV.tar.gz -> $P.tar.gz"
11
12 LICENSE="GPL-3+"
13 SLOT="0"
14 KEYWORDS="~amd64 ~x86"
15
16 DEPEND="x11-libs/gtk+:3"
17 RDEPEND="$DEPEND"
18
19 src_prepare () {
20         cat >GNUmakefile <<'EOF'
21 GTK_CFLAGS := $(shell pkg-config --cflags gtk+-3.0)
22
23 ALL_CPPFLAGS := -std=c99 -Wall $(filter -D% -I%,$(GTK_CFLAGS)) $(CPPFLAGS)
24 ALL_CFLAGS := -std=c99 -Wall $(filter-out -D% -I%,$(GTK_CFLAGS)) $(CFLAGS)
25 LIBS := $(shell pkg-config --libs gtk+-3.0)
26
27 dragon: dragon.o
28         $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
29
30 .c.o:
31         $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -c -o $@ $<
32 EOF
33         default
34 }
35
36 src_compile () {
37         emake CC=$(tc-getCC)
38 }
39
40 src_install () {
41         dobin dragon
42         dodoc README
43 }