summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2018-07-20 21:06:06 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2018-07-20 21:06:06 -0500
commitdb9f90ce297a0adb756f50d8c245a89ab273e0df (patch)
tree282713e6bab3f5734d5ef47a736d5973193d04bc
parente11ea2d9ec1deb9a94f9ed935c85a9357502cf1b (diff)
downloadpackages-db9f90ce297a0adb756f50d8c245a89ab273e0df.tar.gz
packages-db9f90ce297a0adb756f50d8c245a89ab273e0df.tar.bz2
packages-db9f90ce297a0adb756f50d8c245a89ab273e0df.tar.xz
packages-db9f90ce297a0adb756f50d8c245a89ab273e0df.zip
system/gettext-tiny: integrate upstream fix for M4 file installation
-rw-r--r--system/gettext-tiny/APKBUILD6
-rw-r--r--system/gettext-tiny/m4-installation.patch149
2 files changed, 153 insertions, 2 deletions
diff --git a/system/gettext-tiny/APKBUILD b/system/gettext-tiny/APKBUILD
index fa430d70a..5294526c3 100644
--- a/system/gettext-tiny/APKBUILD
+++ b/system/gettext-tiny/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=gettext-tiny
pkgver=0.3.0_pre1
-pkgrel=4
+pkgrel=5
pkgdesc="An internationalisation and localisation system"
url="https://github.com/sabotage-linux/gettext-tiny"
arch="all"
@@ -18,6 +18,7 @@ source="https://distfiles.adelielinux.org/source/$pkgname-$pkgver.tar.xz
stop-doing-macro-crap.patch
cpp-compat.patch
double-stack-size.patch
+ m4-installation.patch
"
build() {
@@ -35,4 +36,5 @@ sha512sums="3795b9923f6820ce6e2c6a27480365a4ee1cb1f8f8916256887a40c8e0f0b582ada0
cea1596f3f20c8983e57d2e49e955a43ed2e261b244f6c4c2ae7d8b869e3cfce3bb87b0a17c16bdac59afd99703cef9c7ef4e93fca536bf1bf9aa5f9be9fa34f respect-cflags.patch
d2a1a6b1f135c25172cf98dfed64739ff85f6016a31c3ce028b3a7aa72de0b55c1f9a54c5ba2c58817f5222c3d2a5bc3d03ec9058ae5fbae2c798df9227a4e52 stop-doing-macro-crap.patch
0f1a1be10a038e6d30976f060c271e926f8f6b0541af7044f1b0ac2641825fc784ce3e3ff6ca13f3a5d15bbcd355a0999b60d4aa6f30c7b75254ca0edcaccc4d cpp-compat.patch
-d5227a56fd136a00832ad224675e333cb8a686415a45485bd02406a2cefa13ef5698b6790ee23bac05d5ad43d4d01657c17c663bf578e4d7681451a25f800618 double-stack-size.patch"
+d5227a56fd136a00832ad224675e333cb8a686415a45485bd02406a2cefa13ef5698b6790ee23bac05d5ad43d4d01657c17c663bf578e4d7681451a25f800618 double-stack-size.patch
+090b685f6846b1cf4c266cbc982701283c7e30ddcbb1d3d263d50f83645ed168530db4bc03b6b688e46a32ac7ad09f0cd3f0e94f5c1a39e86d904f010353d91e m4-installation.patch"
diff --git a/system/gettext-tiny/m4-installation.patch b/system/gettext-tiny/m4-installation.patch
new file mode 100644
index 000000000..f55a03b08
--- /dev/null
+++ b/system/gettext-tiny/m4-installation.patch
@@ -0,0 +1,149 @@
+From 7698cca6d5634ce0de4bb382e0535e1f02d7fb17 Mon Sep 17 00:00:00 2001
+From: xhe <xw897002528@gmail.com>
+Date: Sat, 14 Jul 2018 18:45:45 +0800
+Subject: [PATCH] install: symlink m4 files to $(dataroot)/aclocal follow
+ https://github.com/sabotage-linux/gettext-tiny/issues/27.
+
+According to @awilfox, GNU gettext will install m4 files to aclocal dir.
+But gettext-tiny did not. So autoreconf just stops working and complains
+that it can not find needed macros.
+
+Suggested by rofl0r, symlinking all m4 files into $(dataroot)/aclocal is
+a good idea. Save a little disk space.
+---
+ Makefile | 22 ++++++++++++---------
+ install.sh | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 80 insertions(+), 9 deletions(-)
+ create mode 100644 install.sh
+
+diff --git a/Makefile b/Makefile
+index 7842c0f..927d02e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -3,7 +3,9 @@ bindir=$(prefix)/bin
+ includedir=$(prefix)/include
+ libdir=$(prefix)/lib
+ sysconfdir=$(prefix)/etc
+-datadir=$(prefix)/share/gettext-tiny
++datarootdir=$(prefix)/share
++datadir=$(datarootdir)/gettext-tiny
++acdir=$(datarootdir)/aclocal
+
+ ifeq ($(LIBINTL), MUSL)
+ LIBSRC = libintl/libintl-musl.c
+@@ -36,13 +38,15 @@ AR ?= $(CROSS_COMPILE)ar
+ RANLIB ?= $(CROSS_COMPILE)ranlib
+ CC ?= $(CROSS_COMPILE)cc
+
++INSTALL ?= ./install.sh
++
+ -include config.mak
+
+ BUILDCFLAGS=$(CFLAGS)
+
+ all: $(ALL_LIBS) $(ALL_TOOLS)
+
+-install: $(ALL_LIBS:lib%=$(DESTDIR)$(libdir)/lib%) $(ALL_INCLUDES:%=$(DESTDIR)$(includedir)/%) $(ALL_TOOLS:%=$(DESTDIR)$(bindir)/%) $(ALL_M4S:%=$(DESTDIR)$(datadir)/%) $(ALL_DATA:%=$(DESTDIR)$(datadir)/%)
++install: $(ALL_LIBS:lib%=$(DESTDIR)$(libdir)/lib%) $(ALL_INCLUDES:%=$(DESTDIR)$(includedir)/%) $(ALL_TOOLS:%=$(DESTDIR)$(bindir)/%) $(ALL_M4S:%=$(DESTDIR)$(datadir)/%) $(ALL_M4S:%=$(DESTDIR)$(acdir)/%) $(ALL_DATA:%=$(DESTDIR)$(datadir)/%)
+
+ clean:
+ rm -f $(ALL_LIBS)
+@@ -70,18 +74,18 @@ autopoint: src/autopoint.in
+ cat $< | sed 's,@datadir@,$(datadir),' > $@
+
+ $(DESTDIR)$(libdir)/%.a: %.a
+- install -D -m 755 $< $@
++ $(INSTALL) -D -m 755 $< $@
+
+ $(DESTDIR)$(includedir)/%.h: include/%.h
+- install -D -m 644 $< $@
++ $(INSTALL) -D -m 644 $< $@
+
+ $(DESTDIR)$(bindir)/%: %
+- install -D -m 755 $< $@
++ $(INSTALL) -D -m 755 $< $@
+
+ $(DESTDIR)$(datadir)/%: %
+- install -D -m 644 $< $@
+-
+-.PHONY: all clean install
+-
++ $(INSTALL) -D -m 644 $< $@
+
++$(DESTDIR)$(acdir)/%: %
++ $(INSTALL) -D -l ../$(subst $(datarootdir)/,,$(datadir))/$< $(subst m4/,,$@)
+
++.PHONY: all clean install
+diff --git a/install.sh b/install.sh
+new file mode 100755
+index 0000000..0410883
+--- /dev/null
++++ b/install.sh
+@@ -0,0 +1,67 @@
++#!/bin/sh
++#
++# Written by Rich Felker, originally as part of musl libc.
++# Multi-licensed under MIT, 0BSD, and CC0.
++#
++# This is an actually-safe install command which installs the new
++# file atomically in the new location, rather than overwriting
++# existing files.
++#
++
++usage() {
++printf "usage: %s [-D] [-l] [-m mode] src dest\n" "$0" 1>&2
++exit 1
++}
++
++mkdirp=
++symlink=
++mode=755
++
++while getopts Dlm: name ; do
++case "$name" in
++D) mkdirp=yes ;;
++l) symlink=yes ;;
++m) mode=$OPTARG ;;
++?) usage ;;
++esac
++done
++shift $(($OPTIND - 1))
++
++test "$#" -eq 2 || usage
++src=$1
++dst=$2
++tmp="$dst.tmp.$$"
++
++case "$dst" in
++*/) printf "%s: %s ends in /\n", "$0" "$dst" 1>&2 ; exit 1 ;;
++esac
++
++set -C
++set -e
++
++if test "$mkdirp" ; then
++umask 022
++case "$2" in
++*/*) mkdir -p "${dst%/*}" ;;
++esac
++fi
++
++trap 'rm -f "$tmp"' EXIT INT QUIT TERM HUP
++
++umask 077
++
++if test "$symlink" ; then
++ln -s "$1" "$tmp"
++else
++cat < "$1" > "$tmp"
++chmod "$mode" "$tmp"
++fi
++
++mv -f "$tmp" "$2"
++test -d "$2" && {
++rm -f "$2/$tmp"
++printf "%s: %s is a directory\n" "$0" "$dst" 1>&2
++exit 1
++}
++
++exit 0