diff --git a/app-emulation/waydroid/files/waydroid b/app-emulation/waydroid/files/waydroid new file mode 100644 index 0000000000..d9e5905921 --- /dev/null +++ b/app-emulation/waydroid/files/waydroid @@ -0,0 +1,9 @@ +#!/usr/bin/openrc-run +description="Waydroid Container Manager" +start() { + waydroid container start & +} +stop() { + waydroid container stop + waydroid session stop +} \ No newline at end of file diff --git a/dev-lang/quickjs/files/quickjs-2021-03-27-respect-env.patch b/dev-lang/quickjs/files/quickjs-2021-03-27-respect-env.patch new file mode 100644 index 0000000000..6c8c681715 --- /dev/null +++ b/dev-lang/quickjs/files/quickjs-2021-03-27-respect-env.patch @@ -0,0 +1,47 @@ +diff --git a/Makefile b/Makefile +index 8fc7e55..03cec93 100644 +--- a/Makefile ++++ b/Makefile +@@ -28,7 +28,7 @@ endif + # Windows cross compilation from Linux + #CONFIG_WIN32=y + # use link time optimization (smaller and faster executables but slower build) +-CONFIG_LTO=y ++#CONFIG_LTO=y + # consider warnings as errors (for development) + #CONFIG_WERROR=y + # force 32 bit build for some utilities +@@ -65,7 +65,7 @@ else + endif + ifdef CONFIG_CLANG + HOST_CC=clang +- CFLAGS+=-g -Wall -MMD -MF $(OBJDIR)/$(@F).d ++ CFLAGS+=-Wall -MMD -MF $(OBJDIR)/$(@F).d + CFLAGS += -Wextra + CFLAGS += -Wno-sign-compare + CFLAGS += -Wno-missing-field-initializers +@@ -82,7 +82,7 @@ ifdef CONFIG_CLANG + endif + else + HOST_CC=gcc +- CFLAGS+=-g -Wall -MMD -MF $(OBJDIR)/$(@F).d ++ CFLAGS+=-Wall -MMD -MF $(OBJDIR)/$(@F).d + CFLAGS += -Wno-array-bounds -Wno-format-truncation + ifdef CONFIG_LTO + else +@@ -101,11 +101,11 @@ DEFINES+=-D__USE_MINGW_ANSI_STDIO # for standard snprintf behavior + endif + + CFLAGS+=$(DEFINES) +-CFLAGS_DEBUG=$(CFLAGS) -O0 +-CFLAGS_SMALL=$(CFLAGS) -Os +-CFLAGS_OPT=$(CFLAGS) -O2 ++CFLAGS_DEBUG=$(CFLAGS) ++CFLAGS_SMALL=$(CFLAGS) ++CFLAGS_OPT=$(CFLAGS) + CFLAGS_NOLTO:=$(CFLAGS_OPT) +-LDFLAGS+=-g ++#LDFLAGS+= + ifdef CONFIG_LTO + CFLAGS_SMALL+=-flto + CFLAGS_OPT+=-flto diff --git a/dev-lang/quickjs/metadata.xml b/dev-lang/quickjs/metadata.xml index a9444b4d98..1d24ea4654 100644 --- a/dev-lang/quickjs/metadata.xml +++ b/dev-lang/quickjs/metadata.xml @@ -6,4 +6,7 @@ Denis Reva rarogcmex + + Enable Link Time Optimizations (improves performance and decreases size of executables) + diff --git a/dev-lang/quickjs/quickjs-2021.03.27.ebuild b/dev-lang/quickjs/quickjs-2021.03.27.ebuild index c787f5c8ad..8da61d8edc 100644 --- a/dev-lang/quickjs/quickjs-2021.03.27.ebuild +++ b/dev-lang/quickjs/quickjs-2021.03.27.ebuild @@ -14,8 +14,12 @@ S="${WORKDIR}/${MY_P}" LICENSE="MIT" SLOT="0" KEYWORDS="~amd64" +IUSE="lto" -PATCHES=( "${FILESDIR}/${PN}-2020.11.08_Remove-TTY-check-in-test.patch" ) +PATCHES=( + "${FILESDIR}/${PN}-2020.11.08_Remove-TTY-check-in-test.patch" + "${FILESDIR}/${PN}-2021-03-27-respect-env.patch" + ) src_prepare() { sed -i \ @@ -34,3 +38,11 @@ src_prepare() { default } + +src_compile() { + if use lto; then + CONFIG_LTO=$(use lto) emake + else + emake + fi +}