summaryrefslogtreecommitdiff
path: root/user/icewm
diff options
context:
space:
mode:
authorKiyoshi Aman <kiyoshi.aman+apkfission@gmail.com>2018-07-31 00:17:44 -0500
committerKiyoshi Aman <kiyoshi.aman+apkfission@gmail.com>2018-07-31 00:17:44 -0500
commit7ae40701ee87c40771bfa8f13019a614263a3767 (patch)
tree339cfd61758d9cc5a5e3cbacb7704f9128415f66 /user/icewm
parent118ca90c3d1a1d3cd5d873ef1aec3a7675c4a09c (diff)
downloadpackages-7ae40701ee87c40771bfa8f13019a614263a3767.tar.gz
packages-7ae40701ee87c40771bfa8f13019a614263a3767.tar.bz2
packages-7ae40701ee87c40771bfa8f13019a614263a3767.tar.xz
packages-7ae40701ee87c40771bfa8f13019a614263a3767.zip
user/icewm: new package
Diffstat (limited to 'user/icewm')
-rw-r--r--user/icewm/APKBUILD53
-rw-r--r--user/icewm/fix-globit.patch23
-rw-r--r--user/icewm/guard-string-funcs.patch189
-rw-r--r--user/icewm/portable-ylocale.patch16
4 files changed, 281 insertions, 0 deletions
diff --git a/user/icewm/APKBUILD b/user/icewm/APKBUILD
new file mode 100644
index 000000000..7f3d91d5d
--- /dev/null
+++ b/user/icewm/APKBUILD
@@ -0,0 +1,53 @@
+# Contributor: Kiyoshi Aman <kiyoshi.aman+adelie@gmail.com>
+# Maintainer: Kiyoshi Aman <kiyoshi.aman+adelie@gmail.com>
+pkgname=icewm
+pkgver=1.4.2
+pkgrel=0
+pkgdesc="A window manager designed for speed, usability, and consistency"
+url="https://github.com/bbidulock/icewm"
+arch="all"
+options="!check" # no tests
+license="LGPL-2.0-only AND MirOS"
+depends=""
+makedepends="libxft-dev libxinerama-dev libxpm-dev libjpeg-turbo-dev
+ libxrandr-dev glib-dev fribidi-dev gdk-pixbuf-dev $depends_dev"
+install=""
+subpackages="$pkgname-doc $pkgname-lang"
+source="https://github.com/bbidulock/icewm/releases/download/$pkgver/icewm-$pkgver.tar.bz2
+ guard-string-funcs.patch
+ portable-ylocale.patch
+ fix-globit.patch
+ "
+
+prepare() {
+ default_prepare
+ cd "$builddir"
+ autoreconf -vif
+}
+
+build() {
+ cd "$builddir"
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --localstatedir=/var
+ make
+}
+
+check() {
+ cd "$builddir"
+ make check
+}
+
+package() {
+ cd "$builddir"
+ make DESTDIR="$pkgdir" install
+}
+
+sha512sums="0d227d75d2e3e6e5314eb0990375b85a34496e61e8b504ee023decb52b0c3a20bfd65c0d491b738d3742ddf3f21acfabfc8e4d43df51d137f568580b6c5ed0cd icewm-1.4.2.tar.bz2
+07bbaff552d26828089d6c0aaa4a70d321c2e1b21a70545232c31b464281a857c267ba93b23d8267c4cc7e599067be6508554d2b9aea3aa2b18372c9bb7b4dfe guard-string-funcs.patch
+d7389a2ee6627612280991765c9c4a3c3d8305624b28bef0aa9b7d8316fc4708bd8e32dc5777fb3abed61cec8546e905257fe1cdb6ad7e3da2c169e747199173 portable-ylocale.patch
+1cadda6a5ac03ebe7671e173af4bff43be9ba4680d015edf4222fd739b6d11c1d6b1ca058f6cf5c350d5bf7d587298a23e178b660d121c517e8bc551f3fec5aa fix-globit.patch"
diff --git a/user/icewm/fix-globit.patch b/user/icewm/fix-globit.patch
new file mode 100644
index 000000000..be04bd219
--- /dev/null
+++ b/user/icewm/fix-globit.patch
@@ -0,0 +1,23 @@
+From 3817103bae789b2bff7cf8c1bbe2255b60878ab3 Mon Sep 17 00:00:00 2001
+From: Bert Gijsbers <gijsbers@science.uva.nl>
+Date: Sun, 3 Jun 2018 09:34:12 +0200
+Subject: [PATCH] portability
+
+---
+ src/globit.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/globit.c b/src/globit.c
+index 9bc8dc76..726c8bd8 100644
+--- a/src/globit.c
++++ b/src/globit.c
+@@ -143,7 +143,9 @@ globit_best(const char *pattern_, char **result)
+ } else if (*pattern == '~') {
+ /* yes, tilde */
+ is_absolute = 2;
++#ifdef GLOB_TILDE
+ glob_flags |= GLOB_TILDE;
++#endif
+ /* any slash in the pattern? */
+ while (*cp && *cp != '/')
+ ++cp;
diff --git a/user/icewm/guard-string-funcs.patch b/user/icewm/guard-string-funcs.patch
new file mode 100644
index 000000000..dfb412b9c
--- /dev/null
+++ b/user/icewm/guard-string-funcs.patch
@@ -0,0 +1,189 @@
+From 57b8f15fbd67709055c245222b0c20cd27d3c3a1 Mon Sep 17 00:00:00 2001
+From: Bert Gijsbers <gijsbers@science.uva.nl>
+Date: Mon, 31 Jul 2017 21:30:20 +0200
+Subject: [PATCH] Changes for ALTLinux which has its own prototypes for
+ strlcpy/strlcat. Also cleanup obsolete AC_FUNC_*s and sort -u the
+ CHECK_FUNCs. Add two AC_RUN_IFELSE to detect correct operations of
+ strlcpy/strcat. Define HAVE_STRLCPY / HAVE_STRLCAT if they do. Don't include
+ our own strlcpy/strlcat if these are defined.
+
+---
+ configure.ac | 49 ++++++++++++++++++++++++++++++++++++++++---------
+ src/CMakeLists.txt | 19 +++++++------------
+ src/base.h | 5 +++++
+ src/misc.cc | 4 ++++
+ 4 files changed, 56 insertions(+), 21 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index fe9176ea..e00cb147 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -110,21 +110,52 @@ AC_CHECK_SIZEOF(long, 4)
+ AC_TYPE_SIGNAL
+
+ # Checks for library functions.
+-AC_FUNC_STRFTIME
+-AC_FUNC_VPRINTF
+-AC_FUNC_ERROR_AT_LINE
+ if test x$cross_compling != xyes ; then :; AC_FUNC_FORK fi
+-AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
+ if test x$cross_compling != xyes ; then :; AC_FUNC_MALLOC fi
+-AC_FUNC_MMAP
+ if test x$cross_compling != xyes ; then :; AC_FUNC_REALLOC fi
+-AC_FUNC_STRNLEN
+-AC_CHECK_FUNCS([dup2 getcwd gethostbyname gethostname gettimeofday mblen memchr memmove memset mkdir nl_langinfo putenv select setlocale socket strcasecmp strchr strcspn strdup strerror strncasecmp strrchr strspn strstr strtol sysinfo uname abort wordexp])
+-AC_CHECK_FUNCS([gettimeofday putenv select socket strtol strtoul basename])
+-AC_CHECK_FUNCS([sysctlbyname asprintf])
++AC_CHECK_FUNCS([abort basename dup2])
++AC_CHECK_FUNCS([gethostbyname gethostname gettimeofday])
++AC_CHECK_FUNCS([mblen memchr memmove memset mkdir nl_langinfo])
++AC_CHECK_FUNCS([select setlocale socket])
++AC_CHECK_FUNCS([strcasecmp strchr strcspn strdup strerror])
++AC_CHECK_FUNCS([strncasecmp strrchr strspn strstr strtol strtoul])
++AC_CHECK_FUNCS([sysctlbyname sysinfo uname wordexp])
+ AC_CHECK_FUNC([getloadavg],[AC_DEFINE([HAVE_GETLOADAVG2], 1, [getloadavg() is available])])
+ AC_FUNC_SELECT_ARGTYPES
+
++AC_MSG_CHECKING([for strlcpy])
++AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <string.h>]],[[
++ char a[2];
++ if (strlcpy(a, "yes", 2) != 3)
++ return 1;]])],
++ [
++ AC_MSG_RESULT([yes])
++ AC_DEFINE_UNQUOTED([HAVE_STRLCPY], 1,
++ [Define to 1 if you have the strlcpy function.])
++ ],
++ [
++ AC_MSG_RESULT([no])
++ AC_DEFINE_UNQUOTED([HAVE_STRLCPY], 0,
++ [Define to 1 if you have the strlcpy function.])
++ ])
++
++AC_MSG_CHECKING([for strlcat])
++AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <string.h>]],[[
++ char a[4] = "no";
++ if (strlcat(a, "yes", 4) != 5)
++ return 1;]])],
++ [
++ AC_MSG_RESULT([yes])
++ AC_DEFINE_UNQUOTED([HAVE_STRLCAT], 1,
++ [Define to 1 if you have the strlcat function.])
++ ],
++ [
++ AC_MSG_RESULT([no])
++ AC_DEFINE_UNQUOTED([HAVE_STRLCAT], 0,
++ [Define to 1 if you have the strlcat function.])
++ ])
++
++
+ PKG_CHECK_MODULES([CORE],[fontconfig xext x11])
+ AC_SUBST([CORE_CFLAGS])
+ AC_SUBST([CORE_LIBS])
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index da476a0b..6f694c18 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -59,10 +59,12 @@ endif()
+ # for x in `cat funclist` ; do grep $x src/* lib/* && echo $x >> exlist ; done
+ # perl -e 'print "CHECK_FUNCTION_EXISTS($_ HAVE_".uc($_).")\n" for @ARGV' `cat exlist`
+ # perl -e 'print "#cmakedefine HAVE_".uc($_)."\n" for @ARGV' `cat exlist`
++CHECK_FUNCTION_EXISTS(abort HAVE_ABORT)
++CHECK_FUNCTION_EXISTS(basename HAVE_BASENAME)
+ CHECK_FUNCTION_EXISTS(dup2 HAVE_DUP2)
+-CHECK_FUNCTION_EXISTS(getcwd HAVE_GETCWD)
+ CHECK_FUNCTION_EXISTS(gethostbyname HAVE_GETHOSTBYNAME)
+ CHECK_FUNCTION_EXISTS(gethostname HAVE_GETHOSTNAME)
++CHECK_FUNCTION_EXISTS(getloadavg HAVE_GETLOADAVG)
+ CHECK_FUNCTION_EXISTS(gettimeofday HAVE_GETTIMEOFDAY)
+ CHECK_FUNCTION_EXISTS(mblen HAVE_MBLEN)
+ CHECK_FUNCTION_EXISTS(memchr HAVE_MEMCHR)
+@@ -70,7 +72,6 @@ CHECK_FUNCTION_EXISTS(memmove HAVE_MEMMOVE)
+ CHECK_FUNCTION_EXISTS(memset HAVE_MEMSET)
+ CHECK_FUNCTION_EXISTS(mkdir HAVE_MKDIR)
+ CHECK_FUNCTION_EXISTS(nl_langinfo HAVE_NL_LANGINFO)
+-CHECK_FUNCTION_EXISTS(putenv HAVE_PUTENV)
+ CHECK_FUNCTION_EXISTS(select HAVE_SELECT)
+ CHECK_FUNCTION_EXISTS(setlocale HAVE_SETLOCALE)
+ CHECK_FUNCTION_EXISTS(socket HAVE_SOCKET)
+@@ -79,23 +80,17 @@ CHECK_FUNCTION_EXISTS(strchr HAVE_STRCHR)
+ CHECK_FUNCTION_EXISTS(strcspn HAVE_STRCSPN)
+ CHECK_FUNCTION_EXISTS(strdup HAVE_STRDUP)
+ CHECK_FUNCTION_EXISTS(strerror HAVE_STRERROR)
++CHECK_FUNCTION_EXISTS(strlcpy HAVE_STRLCPY)
++CHECK_FUNCTION_EXISTS(strlcat HAVE_STRLCAT)
+ CHECK_FUNCTION_EXISTS(strncasecmp HAVE_STRNCASECMP)
+ CHECK_FUNCTION_EXISTS(strrchr HAVE_STRRCHR)
+ CHECK_FUNCTION_EXISTS(strspn HAVE_STRSPN)
+ CHECK_FUNCTION_EXISTS(strstr HAVE_STRSTR)
+ CHECK_FUNCTION_EXISTS(strtol HAVE_STRTOL)
++CHECK_FUNCTION_EXISTS(strtoul HAVE_STRTOL)
++CHECK_FUNCTION_EXISTS(sysctlbyname HAVE_SYSCTLBYNAME)
+ CHECK_FUNCTION_EXISTS(sysinfo HAVE_SYSINFO)
+ CHECK_FUNCTION_EXISTS(uname HAVE_UNAME)
+-CHECK_FUNCTION_EXISTS(abort HAVE_ABORT)
+-CHECK_FUNCTION_EXISTS(gettimeofday HAVE_GETTIMEOFDAY)
+-CHECK_FUNCTION_EXISTS(putenv HAVE_PUTENV)
+-CHECK_FUNCTION_EXISTS(select HAVE_SELECT)
+-CHECK_FUNCTION_EXISTS(socket HAVE_SOCKET)
+-CHECK_FUNCTION_EXISTS(strtol HAVE_STRTOL)
+-CHECK_FUNCTION_EXISTS(basename HAVE_BASENAME)
+-CHECK_FUNCTION_EXISTS(sysctlbyname HAVE_SYSCTLBYNAME)
+-CHECK_FUNCTION_EXISTS(getloadavg HAVE_GETLOADAVG)
+-CHECK_FUNCTION_EXISTS(asprintf HAVE_ASPRINTF)
+ CHECK_FUNCTION_EXISTS(wordexp HAVE_WORDEXP)
+
+ CHECK_LIBRARY_EXISTS (X11 XInternAtoms "" HAVE_XINTERNATOMS)
+diff --git a/src/base.h b/src/base.h
+index 0df34ccb..2083ca6f 100644
+--- a/src/base.h
++++ b/src/base.h
+@@ -49,9 +49,14 @@ inline T abs(T v) {
+ /*** String Functions *********************************************************/
+
+ /* Prefer this as a safer alternative over strcpy. Return strlen(from). */
++#ifndef HAVE_STRLCPY
+ size_t strlcpy(char *dest, const char *from, size_t dest_size);
++#endif
++
+ /* Prefer this over strcat. Return strlen(dest) + strlen(from). */
++#ifndef HAVE_STRLCAT
+ size_t strlcat(char *dest, const char *from, size_t dest_size);
++#endif
+
+ char *newstr(char const *str);
+ char *newstr(char const *str, int len);
+diff --git a/src/misc.cc b/src/misc.cc
+index b0ac1c95..97638495 100644
+--- a/src/misc.cc
++++ b/src/misc.cc
+@@ -448,6 +448,7 @@ void operator delete[](void *p) {
+ #endif
+
+ /* Prefer this as a safer alternative over strcpy. Return strlen(from). */
++#ifndef HAVE_STRLCPY
+ size_t strlcpy(char *dest, const char *from, size_t dest_size)
+ {
+ const char *in = from;
+@@ -461,8 +462,10 @@ size_t strlcpy(char *dest, const char *from, size_t dest_size)
+ while (*in) ++in;
+ return in - from;
+ }
++#endif
+
+ /* Prefer this over strcat. Return strlen(dest) + strlen(from). */
++#ifndef HAVE_STRLCAT
+ size_t strlcat(char *dest, const char *from, size_t dest_size)
+ {
+ char *to = dest;
+@@ -470,6 +473,7 @@ size_t strlcat(char *dest, const char *from, size_t dest_size)
+ while (to < stop && *to) ++to;
+ return to - dest + strlcpy(to, from, dest_size - (to - dest));
+ }
++#endif
+
+ char *newstr(char const *str) {
+ return (str != NULL ? newstr(str, strlen(str)) : NULL);
+--
+2.15.0
+
diff --git a/user/icewm/portable-ylocale.patch b/user/icewm/portable-ylocale.patch
new file mode 100644
index 000000000..b9a2b243c
--- /dev/null
+++ b/user/icewm/portable-ylocale.patch
@@ -0,0 +1,16 @@
+diff -Nurd icewm-1.4.2/src/ylocale.cc icewm-1.4.2.new/src/ylocale.cc
+--- icewm-1.4.2/src/ylocale.cc 2017-07-30 03:53:35.524267864 -0500
++++ icewm-1.4.2.new/src/ylocale.cc 2018-06-27 08:29:55.967038048 -0500
+@@ -56,7 +56,11 @@
+ #ifdef CONFIG_NL_CODESETS
+ CONFIG_NL_CODESETS
+ #else
+- CODESET, _NL_CTYPE_CODESET_NAME, 0
++ CODESET,
++#ifdef _NL_CTYPE_CODESET_NAME
++ _NL_CTYPE_CODESET_NAME,
++#endif
++ 0
+ #endif
+ };
+