diff options
author | Azamat H. Hackimov <azamat.hackimov@gmail.com> | 2023-09-15 18:17:29 +0300 |
---|---|---|
committer | Arthur Zamarin <arthurzam@gentoo.org> | 2023-09-16 10:00:53 +0300 |
commit | dd262942d9abaa10fdb67a967cb1230cc8e158f9 (patch) | |
tree | d6a4969d2d33aac6046c2dc6f219da0dff90132a /app-crypt/rotix | |
parent | app-misc/regex-markup: fix tests (diff) | |
download | gentoo-dd262942d9abaa10fdb67a967cb1230cc8e158f9.tar.gz gentoo-dd262942d9abaa10fdb67a967cb1230cc8e158f9.tar.bz2 gentoo-dd262942d9abaa10fdb67a967cb1230cc8e158f9.zip |
app-crypt/rotix: switch to meson
Implementing own meson based build system is cheaper than
dealing broken upstream build system. Updated LICENSE.
Closes: https://bugs.gentoo.org/914230
Closes: https://bugs.gentoo.org/914231
Signed-off-by: Azamat H. Hackimov <azamat.hackimov@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/32811
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'app-crypt/rotix')
-rw-r--r-- | app-crypt/rotix/files/rotix-0.83-cc-cflags-lflags.patch | 61 | ||||
-rw-r--r-- | app-crypt/rotix/files/rotix-0.83-meson-build.patch | 61 | ||||
-rw-r--r-- | app-crypt/rotix/rotix-0.83-r2.ebuild | 25 |
3 files changed, 75 insertions, 72 deletions
diff --git a/app-crypt/rotix/files/rotix-0.83-cc-cflags-lflags.patch b/app-crypt/rotix/files/rotix-0.83-cc-cflags-lflags.patch deleted file mode 100644 index 2cb97fdc52ac..000000000000 --- a/app-crypt/rotix/files/rotix-0.83-cc-cflags-lflags.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 615eaabfa00cbef1b783bd3026fdfa3f45385e53 Mon Sep 17 00:00:00 2001 -From: "Azamat H. Hackimov" <azamat.hackimov@gmail.com> -Date: Thu, 14 Sep 2023 00:20:51 +0300 -Subject: [PATCH] Respect CFLAGS, STRIP and CC, append LDFLAGS to linking - ---- a/Makefile -+++ b/Makefile -@@ -22,12 +22,6 @@ - - include Makefile.settings - --ifdef DEBUG --CFLAGS += -g3 --else --CFLAGS += -O3 --endif -- - ifdef I18N - CFLAGS += -DPACKAGE=\"${PACKAGE}\" -D LOCALEDIR=\"${LOCALE}\" - endif -@@ -39,7 +33,7 @@ endif - all : rotix po - - rotix : rot.o help.o rotix.o -- $(CC) -Wall $(CFLAGS) -o rotix rot.o help.o rotix.o -+ $(CC) -Wall $(CFLAGS) $(LDFLAGS) $(LFLAGS) -o rotix rot.o help.o rotix.o - ifdef STRIP - ifndef DEBUG - $(STRIP) rotix ---- a/configure -+++ b/configure -@@ -82,14 +82,7 @@ if [ "$i18n" = "1" ]; then - fi; - fi - --if type gcc > /dev/null 2> /dev/null; then -- echo "CC=gcc" >> Makefile.settings; --elif type cc > /dev/null 2> /dev/null; then -- echo "CC=cc" >> Makefile.settings; --else -- echo 'Cannot find a C compiler, aborting.' -- exit 1; --fi -+echo "CC?=cc" >> Makefile.settings; - - if [ "$strip" = "1" ]; then - if type strip > /dev/null 2> /dev/null; then -@@ -101,10 +94,7 @@ if [ "$strip" = "1" ]; then - else - echo 'No strip utility found, cannot remove unnecessary parts from executable.' - echo '' -- echo 'STRIP=0' >> Makefile.settings; - fi --else -- echo 'STRIP=0' >> Makefile.settings; - fi - - case "$arch" in --- -2.41.0 - diff --git a/app-crypt/rotix/files/rotix-0.83-meson-build.patch b/app-crypt/rotix/files/rotix-0.83-meson-build.patch new file mode 100644 index 000000000000..c18d5f1329a2 --- /dev/null +++ b/app-crypt/rotix/files/rotix-0.83-meson-build.patch @@ -0,0 +1,61 @@ +https://github.com/shemminga/rotix/pull/3 +From: "Azamat H. Hackimov" <azamat.hackimov@gmail.com> +Date: Fri, 15 Sep 2023 17:00:38 +0300 +Subject: [PATCH 1/3] Implementing meson build-system + +Replacing old configure/make system. +--- /dev/null ++++ b/meson.build +@@ -0,0 +1,17 @@ ++project('rotix', 'c', version: '0.83', license: 'GPL-2.0-or-later') ++cc = meson.get_compiler('c') ++ ++if get_option('i18n') ++ subdir('po') ++endif ++ ++if not cc.check_header('getopt.h') ++ add_project_arguments('-DNO_GETOPT_LONG=1', language:'c') ++endif ++ ++ ++src = ['help.c', 'rot.c', 'rotix.c'] ++ ++executable('rotix', sources: src, install: true) ++install_man('rotix.1') ++ +--- /dev/null ++++ b/meson_options.txt +@@ -0,0 +1,2 @@ ++option('i18n', type: 'boolean', value: true) ++ +--- /dev/null ++++ b/po/LINGUAS +@@ -0,0 +1 @@ ++nl +--- /dev/null ++++ b/po/POTFILES +@@ -0,0 +1,4 @@ ++help.c ++rot.c ++rotix.c ++ +--- /dev/null ++++ b/po/meson.build +@@ -0,0 +1,10 @@ ++i18n = import('i18n') ++ ++add_project_arguments( ++ [ ++ '-DI18N=1', ++ '-DPACKAGE="rotix"', ++ '-DLOCALEDIR="@0@"'.format( get_option('prefix') / get_option('localedir')) ++ ], language:'c') ++i18n.gettext(meson.project_name()) ++ +similarity index 100% +rename from po/NL.po +rename to po/nl.po +-- +2.41.0 + diff --git a/app-crypt/rotix/rotix-0.83-r2.ebuild b/app-crypt/rotix/rotix-0.83-r2.ebuild index ee8600113fa1..bcef6159843f 100644 --- a/app-crypt/rotix/rotix-0.83-r2.ebuild +++ b/app-crypt/rotix/rotix-0.83-r2.ebuild @@ -3,13 +3,13 @@ EAPI=8 -inherit toolchain-funcs +inherit meson DESCRIPTION="Rotix allows you to generate rotational obfuscations" HOMEPAGE="https://github.com/shemminga/rotix" SRC_URI="https://github.com/shemminga/${PN}/releases/download/${PV}/${PN}_${PV}.tar.gz -> ${P}.tar.gz" -LICENSE="GPL-2" +LICENSE="GPL-2+" SLOT="0" KEYWORDS="~amd64 ~ia64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos" IUSE="nls" @@ -18,21 +18,24 @@ BDEPEND="nls? ( sys-devel/gettext )" RDEPEND="nls? ( virtual/libintl )" PATCHES=( - "${FILESDIR}/rotix-0.83-cc-cflags-lflags.patch" + "${FILESDIR}/rotix-0.83-meson-build.patch" "${FILESDIR}/rotix-0.83-locale.patch" "${FILESDIR}/rotix-0.83-interix.patch" "${FILESDIR}/rotix-0.83-nl.po-charset.patch" ) -src_configure() { - econf --i18n=$(usex nls 1 0) --strip=0 --debug=0 -} +DOCS=( + README +) -src_compile() { - emake CC=$(tc-getCC) +src_prepare() { + default + mv po/{NL,nl}.po || die } -src_install() { - emake DESTDIR="${ED}" install - dodoc README +src_configure() { + local emesonargs=( + $(meson_use nls i18n) + ) + meson_src_configure } |