summaryrefslogtreecommitdiff
path: root/dev-embedded/scratchbox2
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-embedded/scratchbox2
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-embedded/scratchbox2')
-rw-r--r--dev-embedded/scratchbox2/Manifest7
-rw-r--r--dev-embedded/scratchbox2/files/scratchbox2-2.0-as-needed.patch22
-rw-r--r--dev-embedded/scratchbox2/files/scratchbox2-2.0-gentoo.patch88
-rw-r--r--dev-embedded/scratchbox2/files/scratchbox2-2.0-glibc-2.10.patch39
-rw-r--r--dev-embedded/scratchbox2/files/scratchbox2-2.0-use-system-lua.patch77
-rw-r--r--dev-embedded/scratchbox2/metadata.xml8
-rw-r--r--dev-embedded/scratchbox2/scratchbox2-2.0-r1.ebuild60
7 files changed, 301 insertions, 0 deletions
diff --git a/dev-embedded/scratchbox2/Manifest b/dev-embedded/scratchbox2/Manifest
new file mode 100644
index 000000000000..8188fcbed4ad
--- /dev/null
+++ b/dev-embedded/scratchbox2/Manifest
@@ -0,0 +1,7 @@
+AUX scratchbox2-2.0-as-needed.patch 830 BLAKE2B 25f1f45ac7f8dec2d953de9bbe22dfffce5fd2d77cdd312fb84fb5e0bf88c54e27f771f25798ec8025a63585c25c154a98137f17701043ac911ec6cee0ef14c1 SHA512 b7fd201e856fd8c34416f7c25bbf2f9c5df4c2b0b666603c4726e9c2bcd40d5f12b67efcc923a42c14c9c3f6a1737c1e6cc42abd92b2f6e8d263d83edd0e9192
+AUX scratchbox2-2.0-gentoo.patch 3371 BLAKE2B c1652126c7f49ccfef0f8e1cd8d05d7aa6d1bffc456ee02c701716126bdcf7f0723120ea0afccaf5d11365c46637840bee19b83abe0ee0ceb87ca89ebdb81eb1 SHA512 44d6c7fc9333e9f2fd4c7b0594339f1d9d66e307ef1b9213ee08aa7dca4b8354ec2aa4eefe5e2a7831e6d58855a8d304812da0fcdd4f06c9091b8f273466da3a
+AUX scratchbox2-2.0-glibc-2.10.patch 1452 BLAKE2B 416e07847e80968e7724db8d9bb41b349c250bef2fe931ae073b13f8b64362b86505e37c717d4fd47e73e704179bf470d7512e3d3dfb681dd94814250343fb68 SHA512 082f1819a00b93d8f6777ec8fde3fb1e8defed46dbc9b22b30439dfbfa0f0cc7fb6e6a5da8642f43de98da7058e2784396e6013aaf710cf20bc69d500484ae25
+AUX scratchbox2-2.0-use-system-lua.patch 2935 BLAKE2B 4486eef454a7c92df0413577180b6fd3d4a76b976e572e4c8ef57a9c1f0a3e84732d77de302c323bcb503b60d5106f14510bfae1f0d5c5727d8056a6b786d90b SHA512 bad26a70fbf6faee4f97634f341e7c2cad98288a2ffc63cad2c72b5f65ba6c97dd846f84f4d6be36c1f83fbce5acfd745d42597fbbd2d93779af8945cc71acb6
+DIST sbox2-2.0.tar.bz2 371402 BLAKE2B bbcf4c88e963275a387eac23480e8aaacc2ad41f3af7cb90ebb61cb0e9f37a0a871c4ee16db7945271fc008db97af288ae9e88fd65d4239c1255abe1e5d2fa5f SHA512 f440c848fc08e825d6dbd978987941a71c087902de152238c31f7d529f5b2256c94aaf1085b5775aa7d66022e5bc83ff8f09bd90a55b32632d60342cd258d209
+EBUILD scratchbox2-2.0-r1.ebuild 1419 BLAKE2B d2e395514bfaf22af3121e0beddcb9f54c19837d98c2d5fd2d7affb96325e7e0caf76cafc9335f8abedb0aa6e8ed913892394f9090e73b39f0f51578658d2513 SHA512 50376cb3a893664f2bdb3a6e03e304074787f017dbed9dee8e74edab3a43f5524869553f51cd1a100e204f5efda4955cf54abb5cbe509260c9c40c630d190af9
+MISC metadata.xml 251 BLAKE2B 118fce129507949f74491c6959c5b8c07a9ba6f1d6a813984cb222435023426d9581131651816ad72f759e87f2bbf70e63ead86330d73ffef3bd60aca060e055 SHA512 b3e4656ceb318c1dc3f8150664734711c9af7b589d5afa1aafe4ef063fb73157e8946a0d845ba02c54d759057597f5c1543b2fdaa93457c91a83b3ea31aec372
diff --git a/dev-embedded/scratchbox2/files/scratchbox2-2.0-as-needed.patch b/dev-embedded/scratchbox2/files/scratchbox2-2.0-as-needed.patch
new file mode 100644
index 000000000000..eaffc158f9f2
--- /dev/null
+++ b/dev-embedded/scratchbox2/files/scratchbox2-2.0-as-needed.patch
@@ -0,0 +1,22 @@
+diff --git a/utils/Makefile b/utils/Makefile
+index cf9b6c4..6f715d3 100644
+--- a/utils/Makefile
++++ b/utils/Makefile
+@@ -6,7 +6,7 @@ $(D)/sb2-show: CFLAGS := $(CFLAGS) -Wall -W -Werror \
+ -I$(SRCDIR)/include
+
+ $(D)/sb2-show.o: preload/exported.h
+-$(D)/sb2-show: preload/libsb2.$(SHLIBEXT) $(D)/sb2-show.o
++$(D)/sb2-show: $(D)/sb2-show.o preload/libsb2.$(SHLIBEXT)
+ $(MKOUTPUTDIR)
+ $(P)LD
+ $(Q)$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
+@@ -25,7 +25,7 @@ $(D)/sb2-interp-wrapper: CFLAGS := $(CFLAGS) -Wall -W -Werror \
+ -I$(SRCDIR)/preload -Ipreload/ $(PROTOTYPEWARNINGS) \
+ -I$(SRCDIR)/include
+
+-$(D)/sb2-interp-wrapper: preload/libsb2.$(SHLIBEXT) $(D)/sb2-interp-wrapper.o
++$(D)/sb2-interp-wrapper: $(D)/sb2-interp-wrapper.o preload/libsb2.$(SHLIBEXT)
+ $(MKOUTPUTDIR)
+ $(P)LD
+ $(Q)$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ -ldl
diff --git a/dev-embedded/scratchbox2/files/scratchbox2-2.0-gentoo.patch b/dev-embedded/scratchbox2/files/scratchbox2-2.0-gentoo.patch
new file mode 100644
index 000000000000..32dcdd1e2e36
--- /dev/null
+++ b/dev-embedded/scratchbox2/files/scratchbox2-2.0-gentoo.patch
@@ -0,0 +1,88 @@
+diff --git a/Makefile b/Makefile
+index 23a13b3..c5b26cc 100644
+--- a/Makefile
++++ b/Makefile
+@@ -59,7 +59,6 @@ subdirs = luaif preload utils
+
+ -include config.mak
+
+-CFLAGS += -O2 -g -Wall -W
+ CFLAGS += -I$(OBJDIR)/include -I$(SRCDIR)/include
+ CFLAGS += -I$(SRCDIR)/luaif/lua-5.1.4/src
+ CFLAGS += -D_GNU_SOURCE=1 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1
+@@ -145,6 +144,9 @@ install-noarch: regular
+ else install -d -m 755 $(prefix)/share/man/man1 ; \
+ fi
+ $(Q)echo "$(PACKAGE_VERSION)" > $(prefix)/share/scratchbox2/version
++ $(Q)install -c -m 755 $(OBJDIR)/utils/sb2-show $(prefix)/bin/sb2-show
++ $(Q)install -c -m 755 $(OBJDIR)/utils/sb2-monitor $(prefix)/bin/sb2-monitor
++ $(Q)install -c -m 755 $(OBJDIR)/utils/sb2-interp-wrapper $(prefix)/bin/sb2-interp-wrapper
+ $(Q)install -c -m 755 $(SRCDIR)/utils/sb2 $(prefix)/bin/sb2
+ $(Q)install -c -m 755 $(SRCDIR)/utils/sb2-init $(prefix)/bin/sb2-init
+ $(Q)install -c -m 755 $(SRCDIR)/utils/sb2-config $(prefix)/bin/sb2-config
+@@ -210,10 +212,10 @@ install-noarch: regular
+ ifeq ($(MACH),x86_64)
+ install: install-multilib
+ else
+-install: do-install
++install: install-singlelib
+ endif
+
+-do-install: install-noarch
++install-singlelib: install-noarch
+ $(P)INSTALL
+ @if [ -d $(prefix)/lib ] ; \
+ then echo "$(prefix)/lib present" ; \
+@@ -221,9 +223,6 @@ do-install: install-noarch
+ fi
+ $(Q)install -d -m 755 $(prefix)/lib/libsb2
+ $(Q)install -c -m 755 $(OBJDIR)/preload/libsb2.$(SHLIBEXT) $(prefix)/lib/libsb2/libsb2.so.$(PACKAGE_VERSION)
+- $(Q)install -c -m 755 $(OBJDIR)/utils/sb2-show $(prefix)/bin/sb2-show
+- $(Q)install -c -m 755 $(OBJDIR)/utils/sb2-monitor $(prefix)/bin/sb2-monitor
+- $(Q)install -c -m 755 $(OBJDIR)/utils/sb2-interp-wrapper $(prefix)/bin/sb2-interp-wrapper
+ ifeq ($(OS),Linux)
+ $(Q)/sbin/ldconfig -n $(prefix)/lib/libsb2
+ endif
+@@ -232,9 +231,9 @@ multilib_prefix=$(prefix)
+
+ install-multilib: multilib
+ @$(MAKE) -C obj-32 --include-dir=.. -f ../Makefile SRCDIR=.. do-install-multilib bitness=32
+- @$(MAKE) -C obj-64 --include-dir=.. -f ../Makefile SRCDIR=.. do-install
++ @$(MAKE) -C obj-64 --include-dir=.. -f ../Makefile SRCDIR=.. do-install-multilib bitness=64
+
+-do-install-multilib:
++do-install-multilib: install-noarch
+ $(P)INSTALL
+ @if [ -d $(multilib_prefix)/lib$(bitness) ] ; \
+ then echo "$(prefix)/lib$(bitness) present" ; \
+diff --git a/utils/Makefile b/utils/Makefile
+index cf9b6c4..79304fc 100644
+--- a/utils/Makefile
++++ b/utils/Makefile
+@@ -1,7 +1,7 @@
+ # beware of namespace collisions, all subdir makefiles are included
+ # into the top-level Makefile
+
+-$(D)/sb2-show: CFLAGS := $(CFLAGS) -Wall -W -Werror \
++$(D)/sb2-show: CFLAGS := $(CFLAGS) -Wall -W \
+ -I$(SRCDIR)/preload -Ipreload/ $(PROTOTYPEWARNINGS) \
+ -I$(SRCDIR)/include
+
+@@ -12,7 +12,7 @@ $(D)/sb2-show: preload/libsb2.$(SHLIBEXT) $(D)/sb2-show.o
+ $(Q)$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
+
+
+-$(D)/sb2-monitor: CFLAGS := $(CFLAGS) -Wall -W -Werror \
++$(D)/sb2-monitor: CFLAGS := $(CFLAGS) -Wall -W \
+ -I$(SRCDIR)/preload -Ipreload/ $(PROTOTYPEWARNINGS) \
+ -I$(SRCDIR)/include
+
+@@ -21,7 +21,7 @@ $(D)/sb2-monitor: $(D)/sb2-monitor.o
+ $(P)LD
+ $(Q)$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
+
+-$(D)/sb2-interp-wrapper: CFLAGS := $(CFLAGS) -Wall -W -Werror \
++$(D)/sb2-interp-wrapper: CFLAGS := $(CFLAGS) -Wall -W \
+ -I$(SRCDIR)/preload -Ipreload/ $(PROTOTYPEWARNINGS) \
+ -I$(SRCDIR)/include
+
diff --git a/dev-embedded/scratchbox2/files/scratchbox2-2.0-glibc-2.10.patch b/dev-embedded/scratchbox2/files/scratchbox2-2.0-glibc-2.10.patch
new file mode 100644
index 000000000000..c5ec6aea4341
--- /dev/null
+++ b/dev-embedded/scratchbox2/files/scratchbox2-2.0-glibc-2.10.patch
@@ -0,0 +1,39 @@
+diff --git a/preload/interface.master b/preload/interface.master
+index 55a9481..4ba22b2 100644
+--- a/preload/interface.master
++++ b/preload/interface.master
+@@ -406,20 +406,34 @@ WRAP: int rmdir(const char *pathname) : \
+
+ #ifdef HAVE_SCANDIR
+ #ifdef HAVE_LINUX_SCANDIR
++#if _POSIX_C_SOURCE == 200809L
++WRAP: int scandir(const char *dir, struct dirent ***namelist, \
++ SCANDIR_TYPE_ARG3, \
++ int(*compar)(const struct dirent **, const struct dirent **)) : \
++ map(dir) hardcode_param(3,filter)
++#else
+ WRAP: int scandir(const char *dir, struct dirent ***namelist, \
+ SCANDIR_TYPE_ARG3, int(*compar)(const void *, const void *)) : \
+ map(dir) hardcode_param(3,filter)
+ #endif
++#endif
+ #ifdef HAVE_OSX_SCANDIR
+ WRAP: int scandir(const char *dirname, struct dirent ***namelist, int (*select)(struct dirent *), int (*compar)(const void *, const void *)): map(dirname)
+ #endif
+ #endif
+ #ifdef HAVE_SCANDIR64
++#if _POSIX_C_SOURCE == 200809L
++WRAP: int scandir64(const char *dir, struct dirent64 ***namelist, \
++ int(*filter)(const struct dirent64 *), \
++ int(*compar)(const struct dirent64 **, const struct dirent64 **)) : \
++ map(dir)
++#else
+ WRAP: int scandir64(const char *dir, struct dirent64 ***namelist, \
+ int(*filter)(const struct dirent64 *), \
+ int(*compar)(const void *, const void *)) : \
+ map(dir)
+ #endif
++#endif
+ #ifdef HAVE_SETXATTR
+ #ifdef HAVE_LINUX_XATTRS
+ WRAP: int setxattr(const char *path, const char *name, const void *value, \
diff --git a/dev-embedded/scratchbox2/files/scratchbox2-2.0-use-system-lua.patch b/dev-embedded/scratchbox2/files/scratchbox2-2.0-use-system-lua.patch
new file mode 100644
index 000000000000..d4c231c74db2
--- /dev/null
+++ b/dev-embedded/scratchbox2/files/scratchbox2-2.0-use-system-lua.patch
@@ -0,0 +1,77 @@
+diff --git a/Makefile b/Makefile
+index c5b26cc..da48ea0 100644
+--- a/Makefile
++++ b/Makefile
+@@ -60,7 +60,7 @@ subdirs = luaif preload utils
+ -include config.mak
+
+ CFLAGS += -I$(OBJDIR)/include -I$(SRCDIR)/include
+-CFLAGS += -I$(SRCDIR)/luaif/lua-5.1.4/src
++# CFLAGS += -I$(SRCDIR)/luaif/lua-5.1.4/src
+ CFLAGS += -D_GNU_SOURCE=1 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1
+ CFLAGS += -DSCRATCHBOX_ROOT="$(prefix)"
+ CFLAGS += $(MACH_CFLAG)
+@@ -103,10 +103,7 @@ regular: .configure .version
+ @$(MAKE) -f $(SRCDIR)/Makefile --include-dir=$(SRCDIR) SRCDIR=$(SRCDIR) do-all
+
+ multilib:
+- @mkdir -p obj-32
+- @mkdir -p obj-64
+- @$(MAKE) MACH_CFLAG=-m32 -C obj-32 --include-dir=.. -f ../Makefile SRCDIR=.. regular
+- @$(MAKE) MACH_CFLAG=-m64 -C obj-64 --include-dir=.. -f ../Makefile SRCDIR=.. regular
++ @$(MAKE) MACH_CFLAG=-m64 regular
+
+
+ gcc_bins = addr2line ar as cc c++ c++filt cpp g++ gcc gcov gdb gdbtui gprof ld nm objcopy objdump ranlib rdi-stub readelf run size strings strip
+@@ -230,8 +227,7 @@ endif
+ multilib_prefix=$(prefix)
+
+ install-multilib: multilib
+- @$(MAKE) -C obj-32 --include-dir=.. -f ../Makefile SRCDIR=.. do-install-multilib bitness=32
+- @$(MAKE) -C obj-64 --include-dir=.. -f ../Makefile SRCDIR=.. do-install-multilib bitness=64
++ @$(MAKE) do-install-multilib bitness=64
+
+ do-install-multilib: install-noarch
+ $(P)INSTALL
+diff --git a/luaif/Makefile b/luaif/Makefile
+index 28e8885..5e1af6f 100644
+--- a/luaif/Makefile
++++ b/luaif/Makefile
+@@ -5,7 +5,7 @@ objs := $(D)/luaif.o $(D)/sb_log.o $(D)/paths.o $(D)/argvenvp.o
+ $(D)/sb_log.o: preload/exported.h
+
+ luaif/libluaif.a: $(objs)
+-luaif/libluaif.a: override CFLAGS := $(CFLAGS) -O2 -g -fPIC -Wall -W -I$(SRCDIR)/$(LUASRC) -I$(OBJDIR)/preload -I$(SRCDIR)/preload
++luaif/libluaif.a: override CFLAGS := $(CFLAGS) -O2 -g -fPIC -Wall -W -I$(OBJDIR)/preload -I$(SRCDIR)/preload
+ luaif/libluaif.a: override LDFLAGS := $(LDFLAGS)
+ luaif/libluaif.a: override LIBS :=
+
+@@ -24,5 +24,5 @@ luaif/liblua.a: override CFLAGS := -O2 -g -fPIC -Wall -W $(CFLAGS)
+ luaif/liblua.a: override LDFLAGS := $(LDFLAGS)
+ luaif/liblua.a: override LIBS :=
+
+-targets := $(targets) $(D)/libluaif.a $(D)/liblua.a
++targets := $(targets) $(D)/libluaif.a
+
+diff --git a/preload/Makefile b/preload/Makefile
+index 9f785ba..5094dbc 100644
+--- a/preload/Makefile
++++ b/preload/Makefile
+@@ -8,7 +8,7 @@ LIBSB2_LDFLAGS = -Wl,-soname=$(LIBSB2_SONAME) \
+ # DO NOT add any libraries that depend on libpthread to
+ # LIBSB2_LIBS or LIBS!! see the comments in luaif.c.
+
+-LIBSB2_LIBS =
++LIBSB2_LIBS = -llua
+ SHLIBEXT = so
+ else
+ LIBSB2_LIBS =
+@@ -17,7 +17,7 @@ endif
+
+
+ $(D)/libsb2.$(SHLIBEXT): $(call O,$(objs))
+-$(D)/libsb2.$(SHLIBEXT): luaif/libluaif.a luaif/liblua.a
++$(D)/libsb2.$(SHLIBEXT): luaif/libluaif.a
+ $(D)/libsb2.$(SHLIBEXT): CFLAGS := $(CFLAGS) -fPIC -Wall -W \
+ -I$(SRCDIR)/preload -Ipreload/ $(PROTOTYPEWARNINGS)
+ $(D)/libsb2.$(SHLIBEXT): LDFLAGS := $(LDFLAGS) $(LIBSB2_LDFLAGS)
diff --git a/dev-embedded/scratchbox2/metadata.xml b/dev-embedded/scratchbox2/metadata.xml
new file mode 100644
index 000000000000..e248196b07c4
--- /dev/null
+++ b/dev-embedded/scratchbox2/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>embedded@gentoo.org</email>
+ <name>Embedded Gentoo</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-embedded/scratchbox2/scratchbox2-2.0-r1.ebuild b/dev-embedded/scratchbox2/scratchbox2-2.0-r1.ebuild
new file mode 100644
index 000000000000..9fd9257fb6ca
--- /dev/null
+++ b/dev-embedded/scratchbox2/scratchbox2-2.0-r1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="2"
+
+inherit autotools eutils multilib toolchain-funcs
+
+MY_PN="${PN/cratch}"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="A cross-compilation toolkit for embedded Linux application development"
+HOMEPAGE="https://www.freedesktop.org/wiki/Software/sbox2"
+SRC_URI="https://cgit.freedesktop.org/${MY_PN}/snapshot/${MY_P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=">=dev-lang/lua-5.1.4"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-glibc-2.10.patch"
+ epatch "${FILESDIR}/${P}-gentoo.patch"
+ # bug 296552
+ epatch "${FILESDIR}/${P}-use-system-lua.patch"
+ # bug 296550
+ epatch "${FILESDIR}/${P}-as-needed.patch"
+
+ sed -e "s/^\(CC = \).*/\1$(tc-getCC)/" \
+ -e "s/^\(CXX = \).*/\1$(tc-getCXX)/" \
+ -e "s/^\(LD = \).*/\1$(tc-getLD)/" \
+ -i Makefile || die "sed Makefile failed"
+
+ eautoreconf
+}
+
+src_compile() {
+ emake prefix="${D}/usr" || die "emake failed"
+}
+
+src_install() {
+ emake prefix="${D}/usr" install || die "emake install failed"
+
+ # List all the multilib libdirs
+ local libdirs=
+ for libdir in $(get_all_libdirs); do
+ libdirs="${libdirs}:/usr/${libdir}/libsb2"
+ done
+
+ cat <<-EOF > "${T}/55scratchbox2"
+ LDPATH=${libdirs:1}
+ EOF
+ doenvd "${T}/55scratchbox2" || die "doenvd failed"
+
+ dodoc AUTHORS README TODO || die "dodoc failed"
+}