summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBertrand Jacquin <beber@meleeweb.net>2013-05-27 14:09:58 +0200
committerBertrand Jacquin <beber@meleeweb.net>2013-05-27 14:09:58 +0200
commit5355511b997dd1525a077b291ffbab47b1aa8464 (patch)
tree00523492ddeb508fb925b493ad952b3e2cb88e65
parentsys-apps/dfc: update to eclass git-2 and fix warnings (diff)
downloadportage-5355511b997dd1525a077b291ffbab47b1aa8464.tar.xz
sys-apps/alix-leds: make dietlibc optional, add a Makefile to not strip
in all case, so we can use gentoo striping
-rw-r--r--sys-apps/alix-leds/Manifest4
-rw-r--r--sys-apps/alix-leds/alix-leds-3.0.ebuild18
-rw-r--r--sys-apps/alix-leds/files/alix-leds-3.0-libc.diff11
-rw-r--r--sys-apps/alix-leds/files/alix-leds-3.0-nostrip.diff20
4 files changed, 48 insertions, 5 deletions
diff --git a/sys-apps/alix-leds/Manifest b/sys-apps/alix-leds/Manifest
index 5510b0ad..c7189155 100644
--- a/sys-apps/alix-leds/Manifest
+++ b/sys-apps/alix-leds/Manifest
@@ -1,2 +1,4 @@
+AUX alix-leds-3.0-libc.diff 362 RMD160 431781e1aea2432bcdea9ce6f17dde4a76b8125b SHA1 e996e4a5139c31342e0335ad39cc6adc474139ac SHA256 c30e43cc68d1f4e63068d43eec6e799c4868dd93aa61899bc4bd8d26376b50d7
+AUX alix-leds-3.0-nostrip.diff 677 RMD160 93927d6c86b2e4d90601550c3057cdc565f3e3c7 SHA1 920b9cc626462796ffdcc8e402bbca2557fa9da6 SHA256 db99b7f4e7d88da5d0ad76afdd30e127f2e4254b50721b434c7bc12580a4962e
DIST alix-leds-3.0.tgz 9815 RMD160 39821172591921bc73dc156d17bdc5d8c62a2530 SHA1 b9d5827a85b68e0616726fcb787a853e74f480a9 SHA256 b2cb0e4641464a12d229aa40ee5580f8d5b2cf7e98f08c12c7503464bbac7b3f
-EBUILD alix-leds-3.0.ebuild 634 RMD160 f2b660a0f8e4ffc5e46e99b690f77c8a52462913 SHA1 7c018de8c50e86ffb1798a9b2a53c820416d734b SHA256 f780da31befcf1d565cd9d2677becb237285b9c82fe0486c8e68c35bdc1419ae
+EBUILD alix-leds-3.0.ebuild 794 RMD160 dc73f5352e8eaa0a19ab92378041090102df9b9e SHA1 55855326cd509bd7f181a801f49b40e3faa0b617 SHA256 1828d16b33708b42f985b853f5c6bd0068788bca9039c5a11242da19bb6c8740
diff --git a/sys-apps/alix-leds/alix-leds-3.0.ebuild b/sys-apps/alix-leds/alix-leds-3.0.ebuild
index 89c0c8e8..635a2d67 100644
--- a/sys-apps/alix-leds/alix-leds-3.0.ebuild
+++ b/sys-apps/alix-leds/alix-leds-3.0.ebuild
@@ -11,18 +11,28 @@ SRC_URI="http://git.1wt.eu/pub/${P}.tgz"
LICENSE="Public-Domain"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE=""
+IUSE="diet"
-DEPEND="dev-libs/dietlibc"
+DEPEND="diet? ( dev-libs/dietlibc )"
RDEPEND=""
+src_unpack () {
+ unpack "${A}"
+
+ cd "${S}"
+ epatch "${FILESDIR}/${P}-nostrip.diff"
+ epatch "${FILESDIR}/${P}-libc.diff"
+}
+
src_compile () {
+ use diet && DIET="/usr/bin/diet"
+
emake alix-leds \
- DIET="/usr/bin/diet" \
CC="$(tc-getCC)" \
OBJDUMP="$(tc-getPROG OBJDUMP objdump ${CHOST})" \
STRIP="$(tc-getSTRIP)" \
- SSTRIP=\"\" \
+ SSTRIP= \
+ DIET=${DIET} \
|| die "emake failed"
}
diff --git a/sys-apps/alix-leds/files/alix-leds-3.0-libc.diff b/sys-apps/alix-leds/files/alix-leds-3.0-libc.diff
new file mode 100644
index 00000000..d463b49c
--- /dev/null
+++ b/sys-apps/alix-leds/files/alix-leds-3.0-libc.diff
@@ -0,0 +1,11 @@
+--- alix-leds.c.ori 2011-06-30 18:40:01.000000000 +0200
++++ alix-leds.c 2011-06-30 18:46:32.000000000 +0200
+@@ -1022,7 +1022,7 @@
+
+ #ifndef DEBUG
+ if (pidname) {
+- pidfd = open(pidname, O_WRONLY|O_CREAT|O_TRUNC);
++ pidfd = open(pidname, O_WRONLY|O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
+ if (pidfd < 0)
+ die(-4, "Failed to open pidfile");
+ }
diff --git a/sys-apps/alix-leds/files/alix-leds-3.0-nostrip.diff b/sys-apps/alix-leds/files/alix-leds-3.0-nostrip.diff
new file mode 100644
index 00000000..8657208f
--- /dev/null
+++ b/sys-apps/alix-leds/files/alix-leds-3.0-nostrip.diff
@@ -0,0 +1,20 @@
+--- Makefile.ori 2011-06-30 18:49:28.742345366 +0200
++++ Makefile 2011-06-30 18:57:16.403701570 +0200
+@@ -7,7 +7,7 @@
+ DIET = diet
+
+ CFLAGS = -fomit-frame-pointer -Wall -Os -mpreferred-stack-boundary=2
+-LDFLAGS = -s -Wl,--gc-sections #-Wl,--sort-section=alignment
++LDFLAGS = -Wl,--gc-sections #-Wl,--sort-section=alignment
+
+ CC_ORIG := $(CC)
+ override CC := $(DIET) $(CC)
+@@ -16,6 +16,8 @@
+
+ %: %.c
+ $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
++
++strip: $(OBJS)
+ $(STRIP) -x --strip-unneeded -R .comment -R .note $@
+ $(OBJDUMP) -h $@ | grep -q '\.data[ ]*00000000' && $(STRIP) -R .data $@ || true
+ $(OBJDUMP) -h $@ | grep -q '\.sbss[ ]*00000000' && $(STRIP) -R .sbss $@ || true