]> git.draconx.ca Git - gentoo-draconx.git/blobdiff - x11-apps/dragon/dragon-1.1.1.ebuild
Add x11-apps/dragon ebuild.
[gentoo-draconx.git] / x11-apps / dragon / dragon-1.1.1.ebuild
diff --git a/x11-apps/dragon/dragon-1.1.1.ebuild b/x11-apps/dragon/dragon-1.1.1.ebuild
new file mode 100644 (file)
index 0000000..ed8fbf9
--- /dev/null
@@ -0,0 +1,43 @@
+# Copyright 2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit toolchain-funcs
+
+DESCRIPTION="Simple drag and drop source/target for X"
+HOMEPAGE="https://github.com/mwh/dragon"
+SRC_URI="https://github.com/mwh/dragon/archive/v$PV.tar.gz -> $P.tar.gz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="x11-libs/gtk+:3"
+RDEPEND="$DEPEND"
+
+src_prepare () {
+       cat >GNUmakefile <<'EOF'
+GTK_CFLAGS := $(shell pkg-config --cflags gtk+-3.0)
+
+ALL_CPPFLAGS := -std=c99 -Wall $(filter -D% -I%,$(GTK_CFLAGS)) $(CPPFLAGS)
+ALL_CFLAGS := -std=c99 -Wall $(filter-out -D% -I%,$(GTK_CFLAGS)) $(CFLAGS)
+LIBS := $(shell pkg-config --libs gtk+-3.0)
+
+dragon: dragon.o
+       $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
+
+.c.o:
+       $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -c -o $@ $<
+EOF
+       default
+}
+
+src_compile () {
+       emake CC=$(tc-getCC)
+}
+
+src_install () {
+       dobin dragon
+       dodoc README
+}