Added i3 4.12-r1 with tiny-titles patch

This commit is contained in:
Austen Adler 2016-05-31 02:55:47 -04:00
parent 6cd3e08649
commit 350e3542ef
5 changed files with 308 additions and 0 deletions

10
x11-wm/i3/Manifest Normal file
View File

@ -0,0 +1,10 @@
AUX i3-4.12-pango.patch 5932 SHA256 fc7c9e1874242a5fe120f9ea45c01b97a50cc0fbe3caf5c7235f24d58c997a36 SHA512 8d808d15f5b1f00ac0f5e9eeacdc2d31062a367ac65594404ea8ba1f27b43bd8ed6cb3cdaa47e6971a88e667d33f467d5d62eb2efead9f9857f1c9a96562d45f WHIRLPOOL 668af23628b0f0808441782a84350a0d1fe4428b8d04a75499a036a967359c878373b7ebc5ad74db5c63d88ec1ad4017a9add5f62f4cda87e4c7718dde7231e4
AUX i3-4.6-missing_include.patch 325 SHA256 726a5e3c15973d2810075379beeb42cf521d62fc4e16cd5203f47e1aebf8cab1 SHA512 13301417da6d776fd72041fd3a32a1992ef7fc557113f438ecde4132f9e8c205841b2cd892d529ce738a6ac42f9103b4c6d1af1419aefd977d29d7a7d53a7b2d WHIRLPOOL ef79ce93f658b05234eec6f9e264508fc0b75d493fe7d22577aef240ac95a30a8093e4edae46a77026947df0089ecee5422733df74f2c094789a2340fdaba696
AUX i3-4.7.2-cflags.patch 529 SHA256 6cf35eebd73d0acd909e9b509e050125526cb6214567f2b0a41b906bc9462222 SHA512 2066ad0918bab75e71f7e90e409682a2f9a121f8619545ecb1cd917e36ebb8bef8e4284de976815f587ee7123fcc424fbbfedd05fc0fc174a85e196311964393 WHIRLPOOL b7e89411e8b4d2ff6c9f420d4e9a0fc39322d6bb01872f72664a9bd20a704e00faa548877e6f81ce02708f44364df57e2c87a82dbf45f93efae1ae0a6ef59f81
AUX i3-4.7.2-parallel_make.patch 2381 SHA256 541590c752b591910f414a2b3128e4c008a79be4ee409fb5a63431fb4cfc5a04 SHA512 5d63763839834f30b77a40a009ef5097da46156ab5e2b69d3a36351e19c67ee8220aa1cc5533c7088b5f5d59ed3afee08cc77d6d1119155de74da17a3b5c6720 WHIRLPOOL 08f0c6a2da29cc517d29e1a947b9e922ddb1df3f0169b0c9b4d299e6490ae998d43ef5b9253c74b439504b8529332bce9dc49760c64219e4fd7c78aa46eedb36
AUX i3-smart-border.patch 718 SHA256 ae8afa8d17691d78fad8b9e56afd9f30a870627cd7c0a6d78466e1e3be55dba7 SHA512 7242856f5b5bd26b7ec9aeb2df03ced11bf692925bd296efa17e44706c392c39db5cb26c82863eb472ab7d7e5a1e63f59da08c61dd45a93778da56d61165e562 WHIRLPOOL 81b880f904bf57182d3e66f820c8d9312236e04150ac8b233bee2c545a9b3204e6912b5bf2861feca3b828edd83e4225e3f0e4d0c4ffe0a5d7c8febc274e336b
AUX i3-tiny-bar.patch 5516 SHA256 a166682091de063332280aeef352fabadf88286de200a39fe97e48a363a8c38b SHA512 db1709a3840778236676ddb2e26db69b3276bab1c1a599a404cfc30a13e8ea8203c12662b22d58771d286a012cf8ad86a4f2add2b28d1139447ab58ffda35e60 WHIRLPOOL d17b4794ade9a4ab0d9bc6b80756d7b73fb8529c556bedca0de405510cbe1901d42cfd7dc3f45fd65bdf89d2e1cd39cdebd6c05aa23d505b6d4f1127a5264cd7
AUX i3-tiny-titles.patch 387 SHA256 af50e52efe4021c2052b6040ade78d7cc2e444858d860e035988bcb27cbe66a9 SHA512 0183749170733eb70e02825fccb1ce45efeff43ce8160b22dbaefd938151cbb35243ab100d5c39eceb4d53ba5e3e7ce25d8c9ec4475b798e83b9b645aa9d219c WHIRLPOOL b671b05f1f8814d118c35f72134aaad152486c5025f883e2afb32937a5eedfe6a73817ead100083061b3c2f8fc00bc7ef3b3a37f4e4e47203a9080cc79c0ecb8
DIST i3-4.12.tar.bz2 988084 SHA256 e19e1ce08c2549cba83e083cc768d487202c41760d5c283f67752e791f1d78b4 SHA512 966f62dbd82c6c70d1344cc61f14f154f3f649ce1b5a5b5168f00f50d598582ef26f5bd5496ea62e13213e45b1c7043f6209c94fcbefe2947fec63284445c1f5 WHIRLPOOL 7cf414de6d375029328edc8d824d2542ccae99ddf48eac9a563e81e0e86db5506f45f851d5af755ebfe8514e9afb5f8394d962fb191f4b0ab4268a81b8397395
EBUILD i3-4.12-r1.ebuild 1962 SHA256 e2250bc785b140a8abd31a7aaeab05193012e46c15bbe8fba3c3c67514be4a11 SHA512 012c87eb3e60be221d256d932f784d716e24087d74c730df1aa3e2b390d1f0e850cf45d5528bb50c4a0f442b787bd76fb8baf72d0ccb58dc005232c2e1ec3631 WHIRLPOOL 7400f4837955503f72bf8180fc5c306120cb59bcdaec3899c4daed388512bf09a5200374dd8c156025a01eff4e689aceb3cf3793f0284fefaada35893a6c2405
MISC metadata.xml 606 SHA256 7e53dac97b82d6a8815039c5d45bbe3508eb12500255baa39fc7f5a602633511 SHA512 86df03013b8e4e6ad0c0853d51c1858324adb9d8387463321556fc348186df918e18400f7b38504dad21b3e5de7fe206c656dcfe9969978e390d89df1c29f6a5 WHIRLPOOL a27bd1c11d91dc997e1b19c0266d17f8bba65b7783ee00356d39870524a6d081b1151e3ee4ed0bf31c0bb3b0ddc7adcaf3df561f261904979a7adff86d04a2d2

View File

@ -0,0 +1,181 @@
Fixes builds with without pango/cairo
https://github.com/i3/i3/pull/2243
https://bugs.gentoo.org/show_bug.cgi?id=576664
--- a/include/libi3.h
+++ b/include/libi3.h
@@ -20,7 +20,7 @@
#if PANGO_SUPPORT
#include <pango/pango.h>
#endif
-#ifdef CAIRO_SUPPORT
+#if CAIRO_SUPPORT
#include <cairo/cairo-xcb.h>
#endif
@@ -518,7 +518,7 @@ typedef struct placeholder_t {
*/
char *format_placeholders(char *format, placeholder_t *placeholders, int num);
-#ifdef CAIRO_SUPPORT
+#if CAIRO_SUPPORT
/* We need to flush cairo surfaces twice to avoid an assertion bug. See #1989
* and https://bugs.freedesktop.org/show_bug.cgi?id=92455. */
#define CAIRO_SURFACE_FLUSH(surface) \
@@ -542,7 +542,7 @@ typedef struct surface_t {
int width;
int height;
-#ifdef CAIRO_SUPPORT
+#if CAIRO_SUPPORT
/* A cairo surface representing the drawable. */
cairo_surface_t *surface;
--- a/libi3/draw_util.c
+++ b/libi3/draw_util.c
@@ -11,7 +11,7 @@
#include <string.h>
#include <xcb/xcb.h>
#include <xcb/xcb_aux.h>
-#ifdef CAIRO_SUPPORT
+#if CAIRO_SUPPORT
#include <cairo/cairo-xcb.h>
#endif
@@ -50,7 +50,7 @@ void draw_util_surface_init(xcb_connection_t *conn, surface_t *surface, xcb_draw
ELOG("Could not create graphical context. Error code: %d. Please report this bug.\n", error->error_code);
}
-#ifdef CAIRO_SUPPORT
+#if CAIRO_SUPPORT
surface->surface = cairo_xcb_surface_create(conn, surface->id, surface->visual_type, width, height);
surface->cr = cairo_create(surface->surface);
#endif
@@ -62,7 +62,7 @@ void draw_util_surface_init(xcb_connection_t *conn, surface_t *surface, xcb_draw
*/
void draw_util_surface_free(xcb_connection_t *conn, surface_t *surface) {
xcb_free_gc(conn, surface->gc);
-#ifdef CAIRO_SUPPORT
+#if CAIRO_SUPPORT
cairo_surface_destroy(surface->surface);
cairo_destroy(surface->cr);
@@ -81,7 +81,7 @@ void draw_util_surface_free(xcb_connection_t *conn, surface_t *surface) {
void draw_util_surface_set_size(surface_t *surface, int width, int height) {
surface->width = width;
surface->height = height;
-#ifdef CAIRO_SUPPORT
+#if CAIRO_SUPPORT
cairo_xcb_surface_set_size(surface->surface, width, height);
#endif
}
@@ -121,7 +121,7 @@ color_t draw_util_hex_to_color(const char *color) {
static void draw_util_set_source_color(xcb_connection_t *conn, surface_t *surface, color_t color) {
RETURN_UNLESS_SURFACE_INITIALIZED(surface);
-#ifdef CAIRO_SUPPORT
+#if CAIRO_SUPPORT
cairo_set_source_rgba(surface->cr, color.red, color.green, color.blue, color.alpha);
#else
uint32_t colorpixel = color.colorpixel;
@@ -139,7 +139,7 @@ static void draw_util_set_source_color(xcb_connection_t *conn, surface_t *surfac
void draw_util_text(i3String *text, surface_t *surface, color_t fg_color, color_t bg_color, int x, int y, int max_width) {
RETURN_UNLESS_SURFACE_INITIALIZED(surface);
-#ifdef CAIRO_SUPPORT
+#if CAIRO_SUPPORT
/* Flush any changes before we draw the text as this might use XCB directly. */
CAIRO_SURFACE_FLUSH(surface->surface);
#endif
@@ -147,7 +147,7 @@ void draw_util_text(i3String *text, surface_t *surface, color_t fg_color, color_
set_font_colors(surface->gc, fg_color, bg_color);
draw_text(text, surface->id, surface->gc, surface->visual_type, x, y, max_width);
-#ifdef CAIRO_SUPPORT
+#if CAIRO_SUPPORT
/* Notify cairo that we (possibly) used another way to draw on the surface. */
cairo_surface_mark_dirty(surface->surface);
#endif
@@ -162,7 +162,7 @@ void draw_util_text(i3String *text, surface_t *surface, color_t fg_color, color_
void draw_util_rectangle(xcb_connection_t *conn, surface_t *surface, color_t color, double x, double y, double w, double h) {
RETURN_UNLESS_SURFACE_INITIALIZED(surface);
-#ifdef CAIRO_SUPPORT
+#if CAIRO_SUPPORT
cairo_save(surface->cr);
/* Using the SOURCE operator will copy both color and alpha information directly
@@ -194,7 +194,7 @@ void draw_util_rectangle(xcb_connection_t *conn, surface_t *surface, color_t col
void draw_util_clear_surface(xcb_connection_t *conn, surface_t *surface, color_t color) {
RETURN_UNLESS_SURFACE_INITIALIZED(surface);
-#ifdef CAIRO_SUPPORT
+#if CAIRO_SUPPORT
cairo_save(surface->cr);
/* Using the SOURCE operator will copy both color and alpha information directly
@@ -227,7 +227,7 @@ void draw_util_copy_surface(xcb_connection_t *conn, surface_t *src, surface_t *d
RETURN_UNLESS_SURFACE_INITIALIZED(src);
RETURN_UNLESS_SURFACE_INITIALIZED(dest);
-#ifdef CAIRO_SUPPORT
+#if CAIRO_SUPPORT
cairo_save(dest->cr);
/* Using the SOURCE operator will copy both color and alpha information directly
--- a/libi3/font.c
+++ b/libi3/font.c
@@ -397,9 +397,11 @@ static void draw_text_xcb(const xcb_char2b_t *text, size_t text_len, xcb_drawabl
void draw_text(i3String *text, xcb_drawable_t drawable, xcb_gcontext_t gc,
xcb_visualtype_t *visual, int x, int y, int max_width) {
assert(savedFont != NULL);
+#if PANGO_SUPPORT
if (visual == NULL) {
visual = root_visual_type;
}
+#endif
switch (savedFont->type) {
case FONT_TYPE_NONE:
--- a/src/floating.c
+++ b/src/floating.c
@@ -11,6 +11,10 @@
*/
#include "all.h"
+#ifndef MAX
+#define MAX(x, y) ((x) > (y) ? (x) : (y))
+#endif
+
/*
* Calculates sum of heights and sum of widths of all currently active outputs
*
--- a/src/util.c
+++ b/src/util.c
@@ -341,10 +341,12 @@ char *pango_escape_markup(char *input) {
if (!font_is_pango())
return input;
+#if PANGO_SUPPORT
char *escaped = g_markup_escape_text(input, -1);
FREE(input);
return escaped;
+#endif
}
/*
--- a/src/x.c
+++ b/src/x.c
@@ -12,6 +12,10 @@
*/
#include "all.h"
+#ifndef MAX
+#define MAX(x, y) ((x) > (y) ? (x) : (y))
+#endif
+
xcb_window_t ewmh_window;
/* Stores the X11 window ID of the currently focused window */

View File

@ -0,0 +1,14 @@
--- a/src/render.c
+++ b/src/render.c
@@ -25,10 +25,7 @@ static void render_con_dockarea(Con *con, Con *child, render_params *p);
* Returns the height for the decorations
*/
int render_deco_height(void) {
- int deco_height = config.font.height + 4;
- if (config.font.height & 0x01)
- ++deco_height;
- return deco_height;
+ return config.font.height + 2;
}
/*

View File

@ -0,0 +1,87 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
inherit eutils toolchain-funcs
DESCRIPTION="An improved dynamic tiling window manager"
HOMEPAGE="http://i3wm.org/"
SRC_URI="http://i3wm.org/downloads/${P}.tar.bz2"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~arm ~x86"
IUSE="+cairo +pango"
REQUIRED_USE="pango? ( cairo )"
CDEPEND="dev-libs/libev
dev-libs/libpcre
>=dev-libs/yajl-2.0.3
x11-libs/libxcb[xkb]
x11-libs/libxkbcommon[X]
x11-libs/startup-notification
x11-libs/xcb-util
x11-libs/xcb-util-cursor
x11-libs/xcb-util-keysyms
x11-libs/xcb-util-wm
cairo? (
>=x11-libs/cairo-1.14.4[X,xcb]
)
pango? (
>=x11-libs/pango-1.30.0[X]
)"
DEPEND="${CDEPEND}
virtual/pkgconfig"
RDEPEND="${CDEPEND}
dev-lang/perl
dev-perl/AnyEvent-I3
dev-perl/JSON-XS"
DOCS=( RELEASE-NOTES-${PV} )
src_prepare() {
epatch "${FILESDIR}"/i3-tiny-titles.patch
epatch "${FILESDIR}"/${P}-pango.patch
if ! use pango; then
sed -e '/^PANGO_.*pangocairo/d' \
-e '/PANGO_SUPPORT/ s/1/0/g' \
-i common.mk || die
fi
if ! use cairo; then
sed -e '/^PANGO_.*cairo/d' \
-e '/CAIRO_SUPPORT/ s/1/0/g' \
-i common.mk || die
fi
cat <<- EOF > "${T}"/i3wm
#!/bin/sh
exec /usr/bin/i3
EOF
sed -e 's/FALSE/false/' -i src/handlers.c || die #546444
epatch_user #471716
}
src_compile() {
emake V=1 CC="$(tc-getCC)" AR="$(tc-getAR)"
}
src_install() {
default
dohtml -r docs/*
doman man/*.1
exeinto /etc/X11/Sessions
doexe "${T}"/i3wm
}
pkg_postinst() {
einfo "There are several packages that you may find useful with ${PN} and"
einfo "their usage is suggested by the upstream maintainers, namely:"
einfo " x11-misc/dmenu"
einfo " x11-misc/i3status"
einfo " x11-misc/i3lock"
einfo "Please refer to their description for additional info."
}

16
x11-wm/i3/metadata.xml Normal file
View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>xarthisius@gentoo.org</email>
<name>Kacper Kowalik</name>
</maintainer>
<maintainer type="person">
<email>hasufell@gentoo.org</email>
<name>Julian Ospald</name>
<description>Maintains the live ebuild.</description>
</maintainer>
<use>
<flag name="pango">Use <pkg>x11-libs/pango</pkg> to render text in order to support fonts which have more glyphs (e.g. Kanji). See RELEASE-NOTES for more information</flag>
</use>
</pkgmetadata>