From ed24ab01691c2d03fc21562f78b6a05e71803d62 Mon Sep 17 00:00:00 2001 From: David Seifert Date: Sat, 2 Dec 2017 15:49:59 +0100 Subject: sys-apps/utempter: Port to EAPI 6 Package-Manager: Portage-2.3.16, Repoman-2.3.6 --- sys-apps/utempter/Manifest | 2 +- .../utempter/files/utempter-0.5.5.6-build.patch | 11 ----- .../files/utempter-0.5.5.6-fix-build-system.patch | 41 ++++++++++++++++++ .../utempter/files/utempter-0.5.5.6-no_utmpx.patch | 4 +- .../utempter-0.5.5.6-soname-makefile-fix.patch | 22 ---------- sys-apps/utempter/utempter-0.5.5.6.ebuild | 48 +++++++++++----------- 6 files changed, 69 insertions(+), 59 deletions(-) delete mode 100644 sys-apps/utempter/files/utempter-0.5.5.6-build.patch create mode 100644 sys-apps/utempter/files/utempter-0.5.5.6-fix-build-system.patch delete mode 100644 sys-apps/utempter/files/utempter-0.5.5.6-soname-makefile-fix.patch (limited to 'sys-apps/utempter') diff --git a/sys-apps/utempter/Manifest b/sys-apps/utempter/Manifest index 8b18dda0755b..031d8a62a834 100644 --- a/sys-apps/utempter/Manifest +++ b/sys-apps/utempter/Manifest @@ -1 +1 @@ -DIST utempter-0.5.5-6.src.rpm 21099 SHA256 617c28d579fa54349b8a706e8346c2442f2ef39523db7e0501701a0919651f3c SHA512 81eeac830631922f2d1b2099a559b60bfd21818b38a524d3c5f61aec143b3e70e95a9ccc300f649dd81f515837fe3befaba6b93bb2e22767e71eee7acb711655 WHIRLPOOL 3ae0a32eae886f2ac14dcf36b4e96e4bb8c25966389c6608a83673149a3045b580b35832e5c69836a18a4f88b55e8c20d254470f84424e30f758a820a87ce13a +DIST utempter-0.5.5-6.src.rpm 21099 BLAKE2B a4a8c53ab31d53ec56d60a16e5c1d3a0a2ec6c73c3c3025c15dfc389da75f969545392b46976017cfcde1d9f9ca974b14786bbf39709aebdda890df13a7866ed SHA512 81eeac830631922f2d1b2099a559b60bfd21818b38a524d3c5f61aec143b3e70e95a9ccc300f649dd81f515837fe3befaba6b93bb2e22767e71eee7acb711655 diff --git a/sys-apps/utempter/files/utempter-0.5.5.6-build.patch b/sys-apps/utempter/files/utempter-0.5.5.6-build.patch deleted file mode 100644 index 8fbfb111196f..000000000000 --- a/sys-apps/utempter/files/utempter-0.5.5.6-build.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- Makefile -+++ Makefile -@@ -37,7 +37,7 @@ - ln -sf $(SHAREDLIB).$(VERSION) $(RPM_BUILD_ROOT)/$(LIBDIR)/$(SHAREDLIB).$(SOMAJOR) - - $(SHAREDLIB): utmpintf.os -- $(CC) -o $@ -shared -Wl,-soname,$(SONAME) $^ -lc -+ $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,$(SONAME) $^ -lc - - utmpintf.o: utmpintf.c utempter.h - diff --git a/sys-apps/utempter/files/utempter-0.5.5.6-fix-build-system.patch b/sys-apps/utempter/files/utempter-0.5.5.6-fix-build-system.patch new file mode 100644 index 000000000000..83b41a04b25f --- /dev/null +++ b/sys-apps/utempter/files/utempter-0.5.5.6-fix-build-system.patch @@ -0,0 +1,41 @@ +--- a/Makefile ++++ b/Makefile +@@ -5,12 +5,14 @@ + CVSROOT=$(shell cat CVS/Root) + # major number of the .so lib + SOMAJOR = 0 ++# minor number of the .so lib ++SOMINOR = 5 ++# micro number of the .so lib ++SOMICRO = 5 + + SHAREDLIB = lib$(NAME).so + SONAME = $(SHAREDLIB).$(SOMAJOR) + +-CFLAGS = -Wall $(RPM_OPT_FLAGS) +- + TARGETS = $(NAME) utmp $(SHAREDLIB) + + all: $(TARGETS) +@@ -19,7 +21,7 @@ + rm -f *.so utempter utmp *.os + + %.os : %.c +- $(CC) -c $(CFLAGS) -fPIC $< -o $@ ++ $(CC) -c $(CFLAGS) $(CPPFLAGS) -fPIC $< -o $@ + + install: + mkdir -p $(RPM_BUILD_ROOT)/usr/sbin +@@ -29,9 +31,11 @@ + install -m 644 utempter.h $(RPM_BUILD_ROOT)/usr/include + install -m 644 $(SHAREDLIB) $(RPM_BUILD_ROOT)/$(LIBDIR)/$(SHAREDLIB).$(VERSION) + ln -sf $(SHAREDLIB).$(VERSION) $(RPM_BUILD_ROOT)/$(LIBDIR)/$(SHAREDLIB) ++ ln -sf $(SHAREDLIB).$(VERSION) $(RPM_BUILD_ROOT)/$(LIBDIR)/$(SHAREDLIB).$(SOMAJOR).$(SOMINOR) ++ ln -sf $(SHAREDLIB).$(VERSION) $(RPM_BUILD_ROOT)/$(LIBDIR)/$(SHAREDLIB).$(SOMAJOR) + + $(SHAREDLIB): utmpintf.os +- $(CC) -o $@ -shared -Wl,-soname,$(SONAME) $^ -lc ++ $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,$(SONAME) $^ -lc $(LIBS) + + utmpintf.o: utmpintf.c utempter.h + diff --git a/sys-apps/utempter/files/utempter-0.5.5.6-no_utmpx.patch b/sys-apps/utempter/files/utempter-0.5.5.6-no_utmpx.patch index 8644db837f4a..b6fc7ea7d27e 100644 --- a/sys-apps/utempter/files/utempter-0.5.5.6-no_utmpx.patch +++ b/sys-apps/utempter/files/utempter-0.5.5.6-no_utmpx.patch @@ -1,5 +1,5 @@ ---- utempter-0.5.5/utempter.c.mps 2004-12-11 14:54:06.000000000 +0100 -+++ utempter-0.5.5/utempter.c 2004-12-11 14:57:46.000000000 +0100 +--- a/utempter.c ++++ b/utempter.c @@ -11,7 +11,9 @@ #include #include diff --git a/sys-apps/utempter/files/utempter-0.5.5.6-soname-makefile-fix.patch b/sys-apps/utempter/files/utempter-0.5.5.6-soname-makefile-fix.patch deleted file mode 100644 index 123c77eb357c..000000000000 --- a/sys-apps/utempter/files/utempter-0.5.5.6-soname-makefile-fix.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- Makefile.orig 2005-04-15 08:54:32.000000000 -0400 -+++ Makefile 2005-04-15 08:56:17.000000000 -0400 -@@ -5,6 +5,10 @@ - CVSROOT=$(shell cat CVS/Root) - # major number of the .so lib - SOMAJOR = 0 -+# minor number of the .so lib -+SOMINOR = 5 -+# micro number of the .so lib -+SOMICRO = 5 - - SHAREDLIB = lib$(NAME).so - SONAME = $(SHAREDLIB).$(SOMAJOR) -@@ -29,6 +33,8 @@ - install -m 644 utempter.h $(RPM_BUILD_ROOT)/usr/include - install -m 644 $(SHAREDLIB) $(RPM_BUILD_ROOT)/$(LIBDIR)/$(SHAREDLIB).$(VERSION) - ln -sf $(SHAREDLIB).$(VERSION) $(RPM_BUILD_ROOT)/$(LIBDIR)/$(SHAREDLIB) -+ ln -sf $(SHAREDLIB).$(VERSION) $(RPM_BUILD_ROOT)/$(LIBDIR)/$(SHAREDLIB).$(SOMAJOR).$(SOMINOR) -+ ln -sf $(SHAREDLIB).$(VERSION) $(RPM_BUILD_ROOT)/$(LIBDIR)/$(SHAREDLIB).$(SOMAJOR) - - $(SHAREDLIB): utmpintf.os - $(CC) -o $@ -shared -Wl,-soname,$(SONAME) $^ -lc diff --git a/sys-apps/utempter/utempter-0.5.5.6.ebuild b/sys-apps/utempter/utempter-0.5.5.6.ebuild index 4866160d3cd1..6fd2931dcb40 100644 --- a/sys-apps/utempter/utempter-0.5.5.6.ebuild +++ b/sys-apps/utempter/utempter-0.5.5.6.ebuild @@ -1,10 +1,12 @@ -# Copyright 1999-2015 Gentoo Foundation +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -inherit rpm eutils user +EAPI=6 + +inherit flag-o-matic rpm toolchain-funcs user MY_P=${P%.*}-${PV##*.} -S=${WORKDIR}/${P%.*} + DESCRIPTION="App that allows non-privileged apps to write utmp (login) info" HOMEPAGE="https://www.redhat.com/" SRC_URI="mirror://gentoo/${MY_P}.src.rpm" @@ -14,43 +16,43 @@ SLOT="0" KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86" IUSE="" -RDEPEND="!sys-libs/libutempter +RDEPEND=" + !sys-libs/libutempter !dev-python/utmp" +S=${WORKDIR}/${P%.*} +PATCHES=( + "${FILESDIR}"/${P}-no_utmpx.patch + "${FILESDIR}"/${P}-fix-build-system.patch +) + pkg_setup() { enewgroup utmp 406 } -src_unpack() { - rpm_src_unpack - cd "${S}" - epatch "${FILESDIR}"/${P}-soname-makefile-fix.patch - epatch "${FILESDIR}"/${P}-no_utmpx.patch - epatch "${FILESDIR}"/${P}-build.patch -} - -src_compile() { - emake RPM_OPT_FLAGS="${CFLAGS} ${CPPFLAGS}" || die +src_configure() { + tc-export CC + append-cflags -Wall } src_install() { emake \ - RPM_BUILD_ROOT="${D}" \ + RPM_BUILD_ROOT="${ED}" \ LIBDIR=/usr/$(get_libdir) \ - install || die - dobin utmp || die + install + dobin utmp fowners root:utmp /usr/sbin/utempter fperms 2755 /usr/sbin/utempter } pkg_postinst() { - if [ -f "${ROOT}"/var/log/wtmp ] ; then - chown root:utmp "${ROOT}"/var/log/wtmp - chmod 664 "${ROOT}"/var/log/wtmp + if [[ -f "${EROOT%/}"/var/log/wtmp ]] ; then + chown root:utmp "${EROOT%/}"/var/log/wtmp + chmod 664 "${EROOT%/}"/var/log/wtmp fi - if [ -f "${ROOT}"/var/run/utmp ] ; then - chown root:utmp "${ROOT}"/var/run/utmp - chmod 664 "${ROOT}"/var/run/utmp + if [[ -f "${EROOT%/}"/var/run/utmp ]] ; then + chown root:utmp "${EROOT%/}"/var/run/utmp + chmod 664 "${EROOT%/}"/var/run/utmp fi } -- cgit v1.2.3-65-gdbad