diff options
author | Joonas Niilola <juippis@gentoo.org> | 2020-11-05 09:16:38 +0200 |
---|---|---|
committer | Joonas Niilola <juippis@gentoo.org> | 2020-11-05 09:20:22 +0200 |
commit | 41c69476e406581bcd954db3fc77fdd4c82cc791 (patch) | |
tree | 630eae1deffbae1d04b9eb6e034a8cc09ce3c5e9 /app-misc/no-more-secrets | |
parent | app-misc/no-more-secrets: update live ebuild, respect CFLAGS/LDFLAGS (diff) | |
download | gentoo-41c69476e406581bcd954db3fc77fdd4c82cc791.tar.gz gentoo-41c69476e406581bcd954db3fc77fdd4c82cc791.tar.bz2 gentoo-41c69476e406581bcd954db3fc77fdd4c82cc791.zip |
app-misc/no-more-secrets: sync live ebuild with 0.3.3, respect *FLAGS
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'app-misc/no-more-secrets')
-rw-r--r-- | app-misc/no-more-secrets/files/no-more-secrets-0.3.3-respect-ldflags.patch | 48 | ||||
-rw-r--r-- | app-misc/no-more-secrets/no-more-secrets-0.3.3.ebuild | 25 |
2 files changed, 60 insertions, 13 deletions
diff --git a/app-misc/no-more-secrets/files/no-more-secrets-0.3.3-respect-ldflags.patch b/app-misc/no-more-secrets/files/no-more-secrets-0.3.3-respect-ldflags.patch new file mode 100644 index 000000000000..1fb407f1c099 --- /dev/null +++ b/app-misc/no-more-secrets/files/no-more-secrets-0.3.3-respect-ldflags.patch @@ -0,0 +1,48 @@ +--- a/Makefile 2020-11-05 09:12:07.420199828 +0200 ++++ b/Makefile 2020-11-05 09:13:08.652973506 +0200 +@@ -1,5 +1,5 @@ + # Installation directories following GNU conventions +-prefix ?= /usr/local ++prefix = /usr + exec_prefix = $(prefix) + bindir = $(exec_prefix)/bin + sbindir = $(exec_prefix)/sbin +@@ -12,29 +12,30 @@ + OBJ=obj + SRC=src + +-CC ?= gcc +-CFLAGS ?= -Wextra -Wall ++export CC ++export CFLAGS ++export LDFLAGS + + .PHONY: all install uninstall clean + + nms: $(OBJ)/nmscharset.o $(OBJ)/nmstermio.o $(OBJ)/nmseffect.o $(OBJ)/nms.o | $(BIN) +- $(CC) $(CFLAGS) -o $(BIN)/$@ $^ ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $(BIN)/$@ $^ + + sneakers: $(OBJ)/nmscharset.o $(OBJ)/nmstermio.o $(OBJ)/nmseffect.o $(OBJ)/sneakers.o | $(BIN) +- $(CC) $(CFLAGS) -o $(BIN)/$@ $^ ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $(BIN)/$@ $^ + + all: nms sneakers + + all-ncurses: nms-ncurses sneakers-ncurses + + nms-ncurses: $(OBJ)/nmscharset.o $(OBJ)/nmstermio_ncurses.o $(OBJ)/nmseffect.o $(OBJ)/nms.o | $(BIN) +- $(CC) $(CFLAGS) -o $(BIN)/nms $^ -lncurses ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $(BIN)/nms $^ -lncurses + + sneakers-ncurses: $(OBJ)/nmscharset.o $(OBJ)/nmstermio_ncurses.o $(OBJ)/nmseffect.o $(OBJ)/sneakers.o | $(BIN) +- $(CC) $(CFLAGS) -o $(BIN)/sneakers $^ -lncurses ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $(BIN)/sneakers $^ -lncurses + + $(OBJ)/%.o: $(SRC)/%.c | $(OBJ) +- $(CC) $(CFLAGS) -o $@ -c $< ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ -c $< + + $(BIN): + mkdir $(BIN) + diff --git a/app-misc/no-more-secrets/no-more-secrets-0.3.3.ebuild b/app-misc/no-more-secrets/no-more-secrets-0.3.3.ebuild index 57fdd08f5c3e..fd0780756aa5 100644 --- a/app-misc/no-more-secrets/no-more-secrets-0.3.3.ebuild +++ b/app-misc/no-more-secrets/no-more-secrets-0.3.3.ebuild @@ -5,26 +5,25 @@ EAPI=7 inherit toolchain-funcs -SRC_URI="https://github.com/bartobri/no-more-secrets/archive/v${PV}.tar.gz -> ${P}.tar.gz" -KEYWORDS="~amd64" +if [[ ${PV} == *9999 ]] ; then + EGIT_REPO_URI="https://github.com/bartobri/no-more-secrets.git" + inherit git-r3 +else + SRC_URI="https://github.com/bartobri/no-more-secrets/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" +fi + DESCRIPTION="Recreate decrypting text from 1992 movie 'Sneakers'" HOMEPAGE="https://github.com/bartobri/no-more-secrets" + LICENSE="GPL-3" SLOT=0 + DEPEND="sys-libs/ncurses:0=" RDEPEND="${DEPEND}" -src_prepare() { - sed -i -e 's#CC =#CC ?=#' \ - -e 's#prefix =#prefix ?=#' \ - -e 's#CFLAGS =#CFLAGS ?=#' Makefile || die - default -} +PATCHES=( "${FILESDIR}"/${P}-respect-ldflags.patch ) src_compile() { - CC="$(tc-getCC)" CFLAGS="${CFLAGS}" emake -} - -src_install() { - prefix="/usr" DESTDIR="${ED}" emake install + CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" emake } |