Mercurial > vanilla
changeset 513:47ef69f75b86
lib/vte: initial import, closes #1588
author | David Demelier <markand@malikania.fr> |
---|---|
date | Tue, 09 Apr 2019 14:30:50 +0200 |
parents | 8e6c29fbd8fc |
children | 33e57b5ed4a8 |
files | lib/vte/musl.patch lib/vte/vte.sh |
diffstat | 2 files changed, 118 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/vte/musl.patch Tue Apr 09 14:30:50 2019 +0200 @@ -0,0 +1,53 @@ +From f78988d3bb5929c857e788a86c7919d6a4ffacc9 Mon Sep 17 00:00:00 2001 +From: Danilo Spinella <danyspin97@protonmail.com> +Date: Thu, 21 Mar 2019 14:19:26 +0100 +Subject: [PATCH] Add W_EXITCODE macro for non-glibc systems + +--- + src/missing.hh | 21 +++++++++++++++++++++ + src/widget.cc | 1 + + 2 files changed, 22 insertions(+) + create mode 100644 src/missing.hh + +diff --git a/src/missing.hh b/src/missing.hh +new file mode 100644 +index 00000000..1baa993d +--- /dev/null ++++ b/src/missing.hh +@@ -0,0 +1,21 @@ ++/* Copyright 2019 Danilo Spinella ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 2.1 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ++ */ ++ ++#ifndef W_EXITCODE ++#define W_EXITCODE(ret, sig) ((ret) << 8 | (sig)) ++#endif ++ +diff --git a/src/widget.cc b/src/widget.cc +index 331ddba9..555a4adf 100644 +--- a/src/widget.cc ++++ b/src/widget.cc +@@ -21,6 +21,7 @@ + #include "widget.hh" + + #include <sys/wait.h> // for W_EXITCODE ++#include "missing.hh" // for W_EXITCODE on non-glibc systems + + #include <new> + #include <string> +-- +2.21.0 +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/vte/vte.sh Tue Apr 09 14:30:50 2019 +0200 @@ -0,0 +1,65 @@ +#!/bin/sh +# +# Copyright (c) 2019 David Demelier <markand@malikania.fr> +# +# Permission to use, copy, modify, and/or distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +# + +PKGNAME=vte +PKGVERSION=0.56.0 +PKGREVISION=1 +PKGLICENSE="LGPLv20+" +PKGSUMMARY="library provisioning a virtual terminal emulator widget" +PKGDOWNLOAD="https://download.gnome.org/sources/$PKGNAME/0.56/$PKGNAME-$PKGVERSION.tar.xz" +PKGDEPENDS="crypto/gnutls + dev/gobject-introspection + graphics/gtk + lib/pcre2" +PKGOPTIONS="VALA" + +: ${CHOST:=$(uname -m)-linux-musl} +: ${CBUILD:=$(uname -m)-linux-musl} +: ${CC:=clang} +: ${CFLAGS:=-O2} +: ${CXX:=clang++} +: ${CXXFLAGS:=-O2} +: ${LDFLAGS:=} +: ${LIBS:=} + +build() +{ + rm -rf $PKGNAME-$PKGVERSION + tar xvaf $PKGNAME-$PKGVERSION.tar.xz + pushd $PKGNAME-$PKGVERSION + + # https://gitlab.gnome.org/GNOME/vte/issues/72 + patch -p1 < ../musl.patch + CC="$CC" \ + CFLAGS="$CFLAGS" \ + CXX="$CXX" \ + CXXFLAGS="$CXXFLAGS" \ + LDFLAGS="$LDFLAGS" \ + LIBS="$LIBS" \ + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ + --disable-static \ + --enable-shared + make + make install DESTDIR=$DESTDIR + rm -f $DESTDIR/usr/lib/libvte-*.la + + popd + rm -rf $PKGNAME-$PKGVERSION +}