commit: adb7fea306beb629b2977cade7bd1fad005694e4 Author: Vladislav Dudar <seal331gentoo <AT> gmail <DOT> com> AuthorDate: Sun Oct 24 19:01:44 2021 +0000 Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org> CommitDate: Sun Oct 24 19:01:44 2021 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=adb7fea3
x11-terms/dmd5620: new package Package-Manager: Portage-3.0.22, Repoman-3.0.3 Signed-off-by: Vladislav Dudar <seal331gentoo <AT> gmail.com> x11-terms/dmd5620/Manifest | 1 + x11-terms/dmd5620/dmd5620-1.2.0.ebuild | 61 ++++++++++++++++++++++ .../files/dmd5620-1.2.0-systemlibs-nostrip.patch | 34 ++++++++++++ x11-terms/dmd5620/metadata.xml | 9 ++++ 4 files changed, 105 insertions(+) diff --git a/x11-terms/dmd5620/Manifest b/x11-terms/dmd5620/Manifest new file mode 100644 index 000000000..d64b87be8 --- /dev/null +++ b/x11-terms/dmd5620/Manifest @@ -0,0 +1 @@ +DIST dmd5620-1.2.0.tar.gz 2560536 BLAKE2B e7ccd740cd727c5a21ddef19671e08675eaf66228b4917a56b47923bf3c2c0a23373391db59f83fb30529a616db2df0107732e5106600838a6ba68fb546855a3 SHA512 674c990d08a56458b35cba76d2733ff0b75bed83589f20166ca017af37616072caf11d7b9c8b621945affbc42edfc758bc1e13fa2d0ccf1fbc76a43f6ece9298 diff --git a/x11-terms/dmd5620/dmd5620-1.2.0.ebuild b/x11-terms/dmd5620/dmd5620-1.2.0.ebuild new file mode 100644 index 000000000..c523739ad --- /dev/null +++ b/x11-terms/dmd5620/dmd5620-1.2.0.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-funcs xdg-utils + +DESCRIPTION="GTK+ 3.0 implementation of an AT&T / Teletype DMD 5620 emulator." +HOMEPAGE="https://github.com/sethm/dmd_gtk" +SRC_URI="https://github.com/sethm/dmd_gtk/archive/v${PV}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/dmd_gtk-${PV}" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" + +RESTRICT="test mirror" + +RDEPEND=" + net-libs/libtelnet + dev-libs/dmd_core + x11-libs/gtk+:3 + x11-libs/gdk-pixbuf + x11-libs/cairo + dev-libs/glib:2 +" +DEPEND="${RDEPEND}" + +BDEPEND=" + ${RDEPEND} + virtual/pkgconfig +" + +src_prepare() { + # remove bundled libraries + rm "${S}"/src/libtelnet.c "${S}"/src/libtelnet.h "${S}"/lib/libdmd_core.a + rmdir "${S}"/lib + # apply patches + eapply "${FILESDIR}/${PN}-1.2.0-systemlibs-nostrip.patch" + eapply_user + # use system pkgconfig + sed -i -e "s:pkgconfig:$(tc-getPKG_CONFIG):" "${S}"/Makefile || die "sed failed" +} + +src_compile() { + emake CC="$(tc-getCC)" LD="$(tc-getLD)" +} + +src_install() { + emake PREFIX=/usr DESTDIR="${D}" install + dodoc "${S}/LICENSE.md" + dodoc "${S}/README.md" +} + +pkg_postinst() { + xdg_icon_cache_update +} + +pkg_postrm() { + xdg_icon_cache_update +} diff --git a/x11-terms/dmd5620/files/dmd5620-1.2.0-systemlibs-nostrip.patch b/x11-terms/dmd5620/files/dmd5620-1.2.0-systemlibs-nostrip.patch new file mode 100644 index 000000000..d24ae1705 --- /dev/null +++ b/x11-terms/dmd5620/files/dmd5620-1.2.0-systemlibs-nostrip.patch @@ -0,0 +1,34 @@ +Index: dmd_gtk-1.2.0/Makefile +=================================================================== +--- dmd_gtk-1.2.0.orig/Makefile ++++ dmd_gtk-1.2.0/Makefile +@@ -1,13 +1,16 @@ + SRCDIR = src + LIBDIR = lib + CC = gcc +-CFLAGS = $(shell pkg-config --cflags gtk+-3.0) -Wall -std=gnu99 ++CFLAGS = $(shell printenv CFLAGS) ++CFLAGS += $(shell pkg-config --cflags gtk+-3.0) $(shell pkg-config --cflags libtelnet) -Wall -std=gnu99 + GTKLIBS = $(shell pkg-config --libs gtk+-3.0) ++TELNETLIBS = $(shell pkg-config --libs libtelnet) + EXE = dmd5620 +-CSRC = $(wildcard src/*.c) ++CSRC = src/dmd_5620.c + OBJ = $(CSRC:.c=.o) +-LDFLAGS = $(GTKLIBS) -lm -lpthread -lc -ldl +-CORELIB = $(LIBDIR)/libdmd_core.a ++LDFLAGS = $(shell printenv LDFLAGS) ++LDFLAGS += $(GTKLIBS) $(TELNETLIBS) -lm -lpthread -lc -ldl ++CORELIB = $(shell pkg-config --libs dmd_core) + + ifeq ($(PREFIX),) + PREFIX := /usr/local +@@ -16,7 +19,7 @@ endif + ifdef DEBUG + CFLAGS+ = -g -O0 + else +-CFLAGS += -O3 -Os -s ++CFLAGS += -O3 -Os + endif + + .PHONY: all clean diff --git a/x11-terms/dmd5620/metadata.xml b/x11-terms/dmd5620/metadata.xml new file mode 100644 index 000000000..75d3b66ba --- /dev/null +++ b/x11-terms/dmd5620/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>seal331gen...@gmail.com</email> + <name>Vladislav Dudar</name> + <description>Primary maintainer</description> + </maintainer> +</pkgmetadata>