diff --git a/dev-libs/libvterm-0.3.3.PKGBUILD b/dev-libs/libvterm-0.3.3.PKGBUILD new file mode 100644 index 0000000..28b8659 --- /dev/null +++ b/dev-libs/libvterm-0.3.3.PKGBUILD @@ -0,0 +1,41 @@ +pkgname=libvterm +pkgver=0.3.3 +pkgdesc="An abstract library implementation of a VT220/xterm/ECMA-48 terminal emulator" +homepage="https://www.leonerd.org.uk/code/libvterm/" +license=("MIT") +_patches=("${pkgname}-0.3.3-slibtool.patch") +_patch_sums=("4d037b7f6538ab3a994d6e4398b9aa89f7ec689ff646899bd25af609d712cb5c2eab75ced1dae5a9cfdd9a2668d418951df681d0f81c872964beaeda32f447da") +sources=("${pkgname}-${pkgver}.tar.gz" + "${_patches[@]}" +) +urls=("https://launchpad.net/libvterm/trunk/v0.3/+download/${sources[0]}" + "${_patches[@]}" +) +sha512sums=("0117f71988d2c3c1b5e46d0778ce491a8ab9033f3afc9a9905b6d52d0e2adb59ee101667826281470e4c9de5178cbe966f4ecb2c7673e9644c7ca3508491bb49" + "${_patch_sums[@]}" +) + +src_prepare() { + tar -xf ${distdir}/${sources[0]} --strip-components=1 + for _patch in ${_patches[@]}; do + patch -p1 -i ${filedir}/${_patch} + done + + autoreconf -fiv +} + +src_build() { + ./configure --prefix=/usr --disable-static + make VERBOSE=1 +} + +src_check() { + make VERBOSE=1 test +} + +src_install() { + make VERBOSE=1 DESTDIR="${pkgdir}" install + find "${pkgdir}" -name '*.la' -delete +} + +# vim:ft=sh syn=sh et sw=2: diff --git a/dev-libs/libvterm/libvterm-0.3.3-slibtool.patch b/dev-libs/libvterm/libvterm-0.3.3-slibtool.patch new file mode 100644 index 0000000..f439a1f --- /dev/null +++ b/dev-libs/libvterm/libvterm-0.3.3-slibtool.patch @@ -0,0 +1,102 @@ +Author: orbea +Date: Tue Aug 29 16:56:23 2023 -0700 +Subject: [PATCH] build: Add a minimal configures script + +When building libvterm with slibtool using the rlibtool symlink the +build will fail when the generated libtool is not found. This file is +required with rlibtool so that the build can determine if the build +should be shared, static or both. + +This can be solved by adding a minimal configure script. + +The build steps are now: + +autoreconf -fi +./configure +make +make install + +Gentoo Bug: https://bugs.gentoo.org/779034 +diff --git a/Makefile b/Makefile.in +similarity index 88% +rename from Makefile +rename to Makefile.in +index 41b08ed..763c8c4 100644 +--- a/Makefile ++++ b/Makefile.in +@@ -1,13 +1,13 @@ +-ifeq ($(shell uname),Darwin) +- LIBTOOL ?= glibtool +-else +- LIBTOOL ?= libtool +-endif ++top_builddir = @top_builddir@ ++ ++LIBTOOL = @LIBTOOL@ + + ifneq ($(VERBOSE),1) + LIBTOOL +=--quiet + endif + ++CC = @CC@ ++ + override CFLAGS +=-Wall -Iinclude -std=c99 -Wpedantic + + ifeq ($(shell uname),SunOS) +@@ -36,17 +36,21 @@ INCFILES=$(TBLFILES:.tbl=.inc) + + HFILES_INT=$(sort $(wildcard src/*.h)) $(HFILES) + ++VERSION_MAJOR=@VERSION_MAJOR@ ++VERSION_MINOR=@VERSION_MINOR@ ++ + VERSION_CURRENT=0 + VERSION_REVISION=0 + VERSION_AGE=0 + +-VERSION=0.3.3 ++VERSION=@PACKAGE_VERSION@ + +-PREFIX=/usr/local +-BINDIR=$(PREFIX)/bin +-LIBDIR=$(PREFIX)/lib +-INCDIR=$(PREFIX)/include +-MANDIR=$(PREFIX)/share/man ++prefix=@prefix@ ++exec_prefix=@exec_prefix@ ++BINDIR=@bindir@ ++LIBDIR=@libdir@ ++INCDIR=@includedir@ ++MANDIR=@mandir@ + MAN3DIR=$(MANDIR)/man3 + + all: $(LIBRARY) $(BINFILES) +@@ -70,7 +74,7 @@ src/encoding.lo: $(INCFILES) + + bin/%: bin/%.c $(LIBRARY) + @echo CC $< +- @$(LIBTOOL) --mode=link --tag=CC $(CC) $(CFLAGS) -o $@ $< -lvterm $(LDFLAGS) ++ @$(LIBTOOL) --mode=link --tag=CC $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) + + t/harness.lo: t/harness.c $(HFILES) + @echo CC $< +diff --git a/configure.ac b/configure.ac +new file mode 100644 +index 0000000..34292fd +--- /dev/null ++++ b/configure.ac +@@ -0,0 +1,14 @@ ++m4_define([version_major], [0]) ++m4_define([version_minor], [3]) ++ ++AC_INIT([libvterm], [version_major.version_minor]) ++AC_CONFIG_FILES([Makefile]) ++ ++LT_INIT ++ ++AC_SUBST([top_builddir], [$abs_builddir]) ++ ++AC_SUBST([VERSION_MAJOR], [version_major]) ++AC_SUBST([VERSION_MINOR], [version_minor]) ++ ++AC_OUTPUT