diff options
| author | Bartosz Golaszewski <bgolaszewski@baylibre.com> | 2019-09-13 11:43:07 +0200 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2019-09-13 09:26:09 -0700 |
| commit | 184cf325c1c430b0e9ea23c6976ddad750fe29d3 (patch) | |
| tree | b78c991ca4375073a271160666910628c624fbb8 | |
| parent | 7c69fbdfd33407b2b04cc9c671480023f0f9bf47 (diff) | |
| download | meta-openembedded-184cf325c1c430b0e9ea23c6976ddad750fe29d3.tar.gz | |
unclutter-xfixes: new package
Add a recipe for unclutter-xfixes - a rewrite of the popular tool
unclutter using the x11-xfixes extension.
Included is a patch adding autotools support (instead of a hand-coded
Makefile) that's already been submitted upstream.
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
| -rw-r--r-- | meta-oe/recipes-graphics/unclutter-xfixes/unclutter-xfixes/0001-build-use-autotools.patch | 238 | ||||
| -rw-r--r-- | meta-oe/recipes-graphics/unclutter-xfixes/unclutter-xfixes_1.5.bb | 23 |
2 files changed, 261 insertions, 0 deletions
diff --git a/meta-oe/recipes-graphics/unclutter-xfixes/unclutter-xfixes/0001-build-use-autotools.patch b/meta-oe/recipes-graphics/unclutter-xfixes/unclutter-xfixes/0001-build-use-autotools.patch new file mode 100644 index 0000000000..25771168ce --- /dev/null +++ b/meta-oe/recipes-graphics/unclutter-xfixes/unclutter-xfixes/0001-build-use-autotools.patch | |||
| @@ -0,0 +1,238 @@ | |||
| 1 | From 2a5cf5021b56bc92c9953d2c82e8c90502d22c97 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Bartosz Golaszewski <bgolaszewski@baylibre.com> | ||
| 3 | Date: Fri, 13 Sep 2019 10:20:53 +0200 | ||
| 4 | Subject: [PATCH] build: use autotools | ||
| 5 | |||
| 6 | This removes the hand-crafted Makefile in favor of standardized autotools | ||
| 7 | build configuration. This is done to allow for easy cross-compilation of | ||
| 8 | this project. | ||
| 9 | |||
| 10 | Upstream-Status: Submitted | ||
| 11 | |||
| 12 | Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> | ||
| 13 | --- | ||
| 14 | .gitignore | 17 ++++++++++++ | ||
| 15 | Makefile | 66 --------------------------------------------- | ||
| 16 | Makefile.am | 10 +++++++ | ||
| 17 | configure.ac | 36 +++++++++++++++++++++++++ | ||
| 18 | include/Makefile.am | 9 +++++++ | ||
| 19 | man/Makefile.am | 7 +++++ | ||
| 20 | obj/.gitkeep | 0 | ||
| 21 | src/Makefile.am | 13 +++++++++ | ||
| 22 | 8 files changed, 92 insertions(+), 66 deletions(-) | ||
| 23 | delete mode 100644 Makefile | ||
| 24 | create mode 100644 Makefile.am | ||
| 25 | create mode 100644 configure.ac | ||
| 26 | create mode 100644 include/Makefile.am | ||
| 27 | create mode 100644 man/Makefile.am | ||
| 28 | delete mode 100644 obj/.gitkeep | ||
| 29 | create mode 100644 src/Makefile.am | ||
| 30 | |||
| 31 | diff --git a/.gitignore b/.gitignore | ||
| 32 | index af88e94..4e7355a 100644 | ||
| 33 | --- a/.gitignore | ||
| 34 | +++ b/.gitignore | ||
| 35 | @@ -3,3 +3,20 @@ obj/*.o | ||
| 36 | man/*.1 | ||
| 37 | man/*.xml | ||
| 38 | test/GLOB* | ||
| 39 | +*.o | ||
| 40 | + | ||
| 41 | +# autotools stuff | ||
| 42 | +.deps/ | ||
| 43 | +Makefile | ||
| 44 | +Makefile.in | ||
| 45 | +aclocal.m4 | ||
| 46 | +autom4te.cache/ | ||
| 47 | +autostuff/ | ||
| 48 | +config.h | ||
| 49 | +config.h.in | ||
| 50 | +config.h.in~ | ||
| 51 | +config.log | ||
| 52 | +config.status | ||
| 53 | +configure | ||
| 54 | +m4/ | ||
| 55 | +stamp-h1 | ||
| 56 | diff --git a/Makefile b/Makefile | ||
| 57 | deleted file mode 100644 | ||
| 58 | index 6264da0..0000000 | ||
| 59 | --- a/Makefile | ||
| 60 | +++ /dev/null | ||
| 61 | @@ -1,66 +0,0 @@ | ||
| 62 | -TARGET = unclutter | ||
| 63 | -VERSION = 1.5 | ||
| 64 | -SDIR = src | ||
| 65 | -IDIR = include | ||
| 66 | -ODIR = obj | ||
| 67 | - | ||
| 68 | -INSTALL = install | ||
| 69 | -PREFIX = /usr | ||
| 70 | - | ||
| 71 | -BINDIR = $(PREFIX)/bin | ||
| 72 | -MANDIR = $(PREFIX)/share/man/man1 | ||
| 73 | -LICENSEDIR = $(PREFIX)/share/licenses/$(TARGET) | ||
| 74 | - | ||
| 75 | -CC = gcc | ||
| 76 | -LD = $(CC) | ||
| 77 | -PKG_CONFIG = pkg-config | ||
| 78 | - | ||
| 79 | -CPPFLAGS += -D'__VERSION="${VERSION}"' "-I$(IDIR)" | ||
| 80 | - | ||
| 81 | -CFLAGS += -std=gnu99 | ||
| 82 | -CFLAGS += -Wall -Wundef -Wshadow -Wformat-security | ||
| 83 | - | ||
| 84 | -LDFLAGS += $(shell $(PKG_CONFIG) --libs x11 xi xfixes) | ||
| 85 | -# libev has no pkg-config support | ||
| 86 | -LDFLAGS += -lev | ||
| 87 | - | ||
| 88 | -INCS = $(wildcard $(IDIR)/*.h) | ||
| 89 | -SRCS = $(wildcard $(SDIR)/*.c) | ||
| 90 | -OBJS = $(patsubst %,$(ODIR)/%,$(notdir $(SRCS:.c=.o))) | ||
| 91 | - | ||
| 92 | -MANS = man/unclutter-xfixes.1 | ||
| 93 | - | ||
| 94 | -.NOTPARALLEL: | ||
| 95 | - | ||
| 96 | -.PHONY: all | ||
| 97 | -all: clean $(TARGET) mans | ||
| 98 | - | ||
| 99 | -.PHONY: $(TARGET) | ||
| 100 | -$(TARGET): $(OBJS) | ||
| 101 | - $(LD) $(OBJS) $(LDFLAGS) -o "$(TARGET)" | ||
| 102 | - | ||
| 103 | -$(ODIR)/%.o: $(SDIR)/%.c $(INCS) | ||
| 104 | - $(CC) $(CPPFLAGS) $(CFLAGS) -o "$@" -c "$<" | ||
| 105 | - | ||
| 106 | -.PHONY: install | ||
| 107 | -install: $(TARGET) mans | ||
| 108 | - $(INSTALL) -Dm 0755 "$(TARGET)" "$(DESTDIR)$(BINDIR)/$(TARGET)" | ||
| 109 | - $(INSTALL) -Dm 0644 man/unclutter-xfixes.1 "$(DESTDIR)$(MANDIR)/unclutter.1" | ||
| 110 | - $(INSTALL) -Dm 0644 -t "$(DESTDIR)$(LICENSEDIR)/" LICENSE | ||
| 111 | - | ||
| 112 | -.PHONY: uninstall | ||
| 113 | -uninstall: | ||
| 114 | - $(RM) "$(DESTDIR)$(BINDIR)/$(TARGET)" | ||
| 115 | - $(RM) "$(DESTDIR)$(MANDIR)/unclutter.1" | ||
| 116 | - $(RM) "$(DESTDIR)$(LICENSEDIR)/LICENSE" | ||
| 117 | - | ||
| 118 | -.PHONY: mans | ||
| 119 | -mans: $(MANS) | ||
| 120 | - | ||
| 121 | -$(MANS): %.1: %.man | ||
| 122 | - a2x --no-xmllint -f manpage "$<" | ||
| 123 | - | ||
| 124 | -.PHONY: clean | ||
| 125 | -clean: | ||
| 126 | - $(RM) $(TARGET) $(OBJS) | ||
| 127 | - $(RM) man/*.1 man/*.xml | ||
| 128 | diff --git a/Makefile.am b/Makefile.am | ||
| 129 | new file mode 100644 | ||
| 130 | index 0000000..38ecaa1 | ||
| 131 | --- /dev/null | ||
| 132 | +++ b/Makefile.am | ||
| 133 | @@ -0,0 +1,10 @@ | ||
| 134 | +ACLOCAL_AMFLAGS = -I m4 | ||
| 135 | +AUTOMAKE_OPTIONS = foreign | ||
| 136 | +SUBDIRS = include src | ||
| 137 | + | ||
| 138 | +if HAS_A2X | ||
| 139 | +SUBDIRS += man | ||
| 140 | +endif | ||
| 141 | + | ||
| 142 | +licensedir = $(datadir)/licenses/unclutter | ||
| 143 | +license_DATA = LICENSE | ||
| 144 | diff --git a/configure.ac b/configure.ac | ||
| 145 | new file mode 100644 | ||
| 146 | index 0000000..1d59197 | ||
| 147 | --- /dev/null | ||
| 148 | +++ b/configure.ac | ||
| 149 | @@ -0,0 +1,36 @@ | ||
| 150 | +AC_PREREQ(2.61) | ||
| 151 | + | ||
| 152 | +AC_INIT([unclutter-xfixes], 1.6) | ||
| 153 | +AC_DEFINE_UNQUOTED([VERSION], ["$PACKAGE_VERSION"]) | ||
| 154 | + | ||
| 155 | +AC_CONFIG_AUX_DIR([autostuff]) | ||
| 156 | +AC_CONFIG_MACRO_DIRS([m4]) | ||
| 157 | +AM_INIT_AUTOMAKE([foreign subdir-objects]) | ||
| 158 | + | ||
| 159 | +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) | ||
| 160 | + | ||
| 161 | +AC_CONFIG_SRCDIR([src]) | ||
| 162 | +AC_CONFIG_HEADER([config.h]) | ||
| 163 | + | ||
| 164 | +AM_PROG_AR | ||
| 165 | +AC_PROG_CC | ||
| 166 | +AC_PROG_INSTALL | ||
| 167 | + | ||
| 168 | +# libev has no pkg-config support | ||
| 169 | +AC_CHECK_HEADERS([ev.h], [], [AC_MSG_ERROR([ev.h not found - please install libev])]) | ||
| 170 | + | ||
| 171 | +PKG_CHECK_MODULES([X11], [x11 xi xfixes]) | ||
| 172 | + | ||
| 173 | +AC_CHECK_PROG([has_a2x], [a2x], [true], [false]) | ||
| 174 | +AM_CONDITIONAL([HAS_A2X], [test "x$has_a2x" = xtrue]) | ||
| 175 | +if test "x$has_a2x" = xfalse | ||
| 176 | +then | ||
| 177 | + AC_MSG_NOTICE([a2x not found - needed to generate man pages]) | ||
| 178 | +fi | ||
| 179 | + | ||
| 180 | +AC_CONFIG_FILES([Makefile | ||
| 181 | + include/Makefile | ||
| 182 | + src/Makefile | ||
| 183 | + man/Makefile]) | ||
| 184 | + | ||
| 185 | +AC_OUTPUT | ||
| 186 | diff --git a/include/Makefile.am b/include/Makefile.am | ||
| 187 | new file mode 100644 | ||
| 188 | index 0000000..90d8bbc | ||
| 189 | --- /dev/null | ||
| 190 | +++ b/include/Makefile.am | ||
| 191 | @@ -0,0 +1,9 @@ | ||
| 192 | +noinst_HEADERS = \ | ||
| 193 | + all.h \ | ||
| 194 | + cursor.h \ | ||
| 195 | + event.h \ | ||
| 196 | + extensions.h \ | ||
| 197 | + externals.h \ | ||
| 198 | + globals.h \ | ||
| 199 | + types.h \ | ||
| 200 | + util.h | ||
| 201 | diff --git a/man/Makefile.am b/man/Makefile.am | ||
| 202 | new file mode 100644 | ||
| 203 | index 0000000..7856e6a | ||
| 204 | --- /dev/null | ||
| 205 | +++ b/man/Makefile.am | ||
| 206 | @@ -0,0 +1,7 @@ | ||
| 207 | +unclutter-xfixes.1: | ||
| 208 | + a2x --no-xmllint -f manpage unclutter-xfixes.man | ||
| 209 | + | ||
| 210 | +dist_man1_MANS = unclutter-xfixes.1 | ||
| 211 | + | ||
| 212 | +clean-local: | ||
| 213 | + rm -f unclutter-xfixes.1 | ||
| 214 | diff --git a/obj/.gitkeep b/obj/.gitkeep | ||
| 215 | deleted file mode 100644 | ||
| 216 | index e69de29..0000000 | ||
| 217 | diff --git a/src/Makefile.am b/src/Makefile.am | ||
| 218 | new file mode 100644 | ||
| 219 | index 0000000..c7f0729 | ||
| 220 | --- /dev/null | ||
| 221 | +++ b/src/Makefile.am | ||
| 222 | @@ -0,0 +1,13 @@ | ||
| 223 | +AM_CFLAGS = -D'__VERSION="${VERSION}"' "-I$(top_srcdir)/include" | ||
| 224 | +AM_CFLAGS += -std=gnu99 -Wall -Wundef -Wshadow -Wformat-security | ||
| 225 | +AM_CFLAGS += $(X11_CFLAGS) | ||
| 226 | +AM_LDFLAGS = -lev $(X11_LIBS) | ||
| 227 | + | ||
| 228 | +bin_PROGRAMS = unclutter | ||
| 229 | + | ||
| 230 | +unclutter_SOURCES = \ | ||
| 231 | + cursor.c \ | ||
| 232 | + event.c \ | ||
| 233 | + extensions.c \ | ||
| 234 | + unclutter.c \ | ||
| 235 | + util.c | ||
| 236 | -- | ||
| 237 | 2.21.0 | ||
| 238 | |||
diff --git a/meta-oe/recipes-graphics/unclutter-xfixes/unclutter-xfixes_1.5.bb b/meta-oe/recipes-graphics/unclutter-xfixes/unclutter-xfixes_1.5.bb new file mode 100644 index 0000000000..a566bc18a3 --- /dev/null +++ b/meta-oe/recipes-graphics/unclutter-xfixes/unclutter-xfixes_1.5.bb | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | SUMMARY = "Remove idle cursor image from screen." | ||
| 2 | DESCRIPTION = "This is a rewrite of the popular tool unclutter, but using the x11-xfixes extension." | ||
| 3 | AUTHOR = "Ingo Bürk" | ||
| 4 | |||
| 5 | LICENSE = "MIT" | ||
| 6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=b25d2c4cca175f44120d1b8e67cb358d" | ||
| 7 | |||
| 8 | SRC_URI = "git://github.com/Airblader/unclutter-xfixes.git \ | ||
| 9 | file://0001-build-use-autotools.patch" | ||
| 10 | SRCREV = "10fd337bb77e4e93c3380f630a0555372778a948" | ||
| 11 | |||
| 12 | inherit autotools pkgconfig distro_features_check | ||
| 13 | |||
| 14 | REQUIRED_DISTRO_FEATURES = "x11" | ||
| 15 | |||
| 16 | DEPENDS = "libev libx11 libxi libxfixes" | ||
| 17 | |||
| 18 | S = "${WORKDIR}/git" | ||
| 19 | |||
| 20 | do_install_append() { | ||
| 21 | # LICENSE is installed to /usr/share/licenses but we don't want it in the package | ||
| 22 | rm -rf ${D}${datadir} | ||
| 23 | } | ||
