mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-20 20:43:09 -04:00
x11-terms/dmd5620: add 2.1.0
Signed-off-by: Vladislav Dudar <seal331gentoo@gmail.com>
This commit is contained in:
@@ -1 +1,2 @@
|
||||
DIST dmd5620-1.2.0.tar.gz 2560536 BLAKE2B e7ccd740cd727c5a21ddef19671e08675eaf66228b4917a56b47923bf3c2c0a23373391db59f83fb30529a616db2df0107732e5106600838a6ba68fb546855a3 SHA512 674c990d08a56458b35cba76d2733ff0b75bed83589f20166ca017af37616072caf11d7b9c8b621945affbc42edfc758bc1e13fa2d0ccf1fbc76a43f6ece9298
|
||||
DIST dmd5620-2.1.0.tar.gz 14415 BLAKE2B 43b9cd0fe1167ffa365aca7e7503bc78bb4d3d3d279d06ddaad68c4fc3d963b30924a86b684288d970101c0b7254f239ad401b2dc727df097a6ebbaa33d6cf98 SHA512 8d444d2f4579855d9e6cb3f0b5bd63b0735ef8fc1b6dfd41a69283009f097492800697af22d5c81b04f8e488fd12c4bda8e77f6410b5ffab84da2f64acf51444
|
||||
|
||||
59
x11-terms/dmd5620/dmd5620-2.1.0.ebuild
Normal file
59
x11-terms/dmd5620/dmd5620-2.1.0.ebuild
Normal file
@@ -0,0 +1,59 @@
|
||||
# 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="
|
||||
>=dev-libs/dmd_core-0.7.1
|
||||
x11-libs/gtk+:3
|
||||
x11-libs/gdk-pixbuf
|
||||
x11-libs/cairo
|
||||
dev-libs/glib:2
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
BDEPEND="
|
||||
${RDEPEND}
|
||||
virtual/pkgconfig
|
||||
"
|
||||
|
||||
src_prepare() {
|
||||
# remove leftover of bundled library which is not properly packaged in github releases anyways
|
||||
rmdir "${S}"/dmd_core
|
||||
# apply patches
|
||||
eapply "${FILESDIR}/${PN}-2.1.0-consolidated.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
|
||||
}
|
||||
64
x11-terms/dmd5620/files/dmd5620-2.1.0-consolidated.patch
Normal file
64
x11-terms/dmd5620/files/dmd5620-2.1.0-consolidated.patch
Normal file
@@ -0,0 +1,64 @@
|
||||
--- dmd_gtk-2.1.0.orig/Makefile 2024-07-13 00:17:40.231937343 +0300
|
||||
+++ dmd_gtk-2.1.0/Makefile 2024-07-13 00:32:41.311218471 +0300
|
||||
@@ -3,27 +3,22 @@
|
||||
CC = gcc
|
||||
GIT = git
|
||||
CARGO = cargo
|
||||
-CFLAGS = $(shell pkg-config --cflags gtk+-3.0) -Wall -std=gnu99
|
||||
+CFLAGS = $(shell printenv CFLAGS)
|
||||
+CFLAGS += $(shell pkg-config --cflags gtk+-3.0) -Wall -std=gnu99
|
||||
GTKLIBS = $(shell pkg-config --libs gtk+-3.0)
|
||||
EXE = dmd5620
|
||||
CSRC = $(wildcard src/*.c)
|
||||
OBJ = $(CSRC:.c=.o)
|
||||
-LDFLAGS = $(GTKLIBS) -lm -lpthread -lc -ldl -lutil
|
||||
-CORELIB = $(LIBDIR)/target/release/libdmd_core.a
|
||||
+LDFLAGS = $(shell printenv LDFLAGS)
|
||||
+LDFLAGS += $(GTKLIBS) -lm -lpthread -lc -ldl
|
||||
+CORELIB = $(shell pkg-config --libs dmd_core)
|
||||
|
||||
ifeq ($(PREFIX),)
|
||||
PREFIX := /usr/local
|
||||
endif
|
||||
|
||||
ifdef DEBUG
|
||||
- CFLAGS+ = -g -O0
|
||||
-else
|
||||
- UNAME_S := $(shell uname -s)
|
||||
- ifeq ($(UNAME_S),Darwin)
|
||||
- CFLAGS += -O3 -Os
|
||||
- else
|
||||
- CFLAGS += -O3 -Os -s
|
||||
- endif
|
||||
+ CFLAGS += -g
|
||||
endif
|
||||
|
||||
.PHONY: all clean
|
||||
@@ -34,18 +29,14 @@
|
||||
@rm -f $(EXE) $(OBJ)
|
||||
@cd $(LIBDIR) && $(CARGO) clean
|
||||
|
||||
-$(CORELIB):
|
||||
- $(if $(wildcard ./dmd_core/Cargo.toml),,$(error The submodule dmd_core is not checked out.))
|
||||
- @cd $(LIBDIR) && $(CARGO) build --release
|
||||
-
|
||||
-$(EXE): $(CORELIB) $(OBJ)
|
||||
+$(EXE): $(OBJ)
|
||||
@$(CC) $(CFLAGS) -o $@ $^ $(CORELIB) $(LDFLAGS)
|
||||
|
||||
install: $(EXE)
|
||||
install -d $(DESTDIR)$(PREFIX)/bin
|
||||
install -m 755 $(EXE) $(DESTDIR)$(PREFIX)/bin
|
||||
- install -d $(DESTDIR)$(PREFIX)/man/man1
|
||||
- install -m 644 dmd5620.man $(DESTDIR)$(PREFIX)/man/man1/dmd5620.1
|
||||
+ install -d $(DESTDIR)$(PREFIX)/share/man/man1
|
||||
+ install -m 644 dmd5620.man $(DESTDIR)$(PREFIX)/share/man/man1/dmd5620.1
|
||||
install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps
|
||||
install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps
|
||||
install -m 644 assets/dmd5620.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps
|
||||
@@ -55,4 +46,4 @@
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/$(EXE)
|
||||
rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/dmd5620.png
|
||||
rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/dmd5620.svg
|
||||
- rm -f $(DESTDIR)$(PREFIX)/man/man1/dmd5620.1
|
||||
+ rm -f $(DESTDIR)$(PREFIX)/share/man/man1/dmd5620.1
|
||||
Reference in New Issue
Block a user