diff options
author | David Seifert <soap@gentoo.org> | 2020-08-29 19:33:53 +0200 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2020-08-29 19:33:53 +0200 |
commit | bb50b8477b5209d012332bcb532bd6cee7311145 (patch) | |
tree | bcdfdf9ab710763a8a805fd78fc5a000a68763fd /sys-power/nvclock | |
parent | sys-devel/gnuconfig: Update LICENSE. (diff) | |
download | gentoo-bb50b8477b5209d012332bcb532bd6cee7311145.tar.gz gentoo-bb50b8477b5209d012332bcb532bd6cee7311145.tar.bz2 gentoo-bb50b8477b5209d012332bcb532bd6cee7311145.zip |
sys-power/nvclock: Port to EAPI 7
Closes: https://bugs.gentoo.org/709544
Closes: https://bugs.gentoo.org/726030
Package-Manager: Portage-3.0.4, Repoman-3.0.1
Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'sys-power/nvclock')
3 files changed, 129 insertions, 53 deletions
diff --git a/sys-power/nvclock/files/nvclock-0.8_p20110102-fno-common.patch b/sys-power/nvclock/files/nvclock-0.8_p20110102-fno-common.patch new file mode 100644 index 000000000000..d95053a54cc6 --- /dev/null +++ b/sys-power/nvclock/files/nvclock-0.8_p20110102-fno-common.patch @@ -0,0 +1,11 @@ +--- a/src/nvcontrol/nvcontrol.h ++++ b/src/nvcontrol/nvcontrol.h +@@ -42,7 +42,7 @@ + } NVOptionList; + + #define OPTION_LIST_SIZE 27 +-NVOptionList option_list[OPTION_LIST_SIZE]; ++extern NVOptionList option_list[OPTION_LIST_SIZE]; + int init_nvcontrol(); + NVOptionList *nvcontrol_lookup_option(int option); + diff --git a/sys-power/nvclock/files/nvclock-0.8_p20110102-r1-make.patch b/sys-power/nvclock/files/nvclock-0.8_p20110102-r1-make.patch index e45e2a6aa341..89a9b7c1c5e3 100644 --- a/sys-power/nvclock/files/nvclock-0.8_p20110102-r1-make.patch +++ b/sys-power/nvclock/files/nvclock-0.8_p20110102-r1-make.patch @@ -1,11 +1,56 @@ - Fix building with --as-needed - Fix parallel make by defining two new targets - Fix one spelling error -- Respect CFLAGS, LDFLAGS +- Respect AR, CC, RANLIB, CFLAGS, LDFLAGS - Link GTK frontend against -lX11 since it uses XOpenDisplay all the time --- a/configure.in +++ b/configure.in +@@ -11,6 +11,9 @@ + AC_PROG_MAKE_SET + AC_HEADER_STDC + ++AC_CHECK_TOOL([AR], [ar]) ++AC_PROG_RANLIB ++ + + HAVE_GTK2=no + HAVE_QT=no +@@ -75,6 +78,7 @@ + + dnl We will only compile one NVClock gtk binary, choose the latest version availible + if test x"$enable_gtk" = "xyes"; then ++ PKG_CHECK_MODULES([X11], [x11]) + PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.4.0, have_gtk2=yes, have_gtk2=no) + GTK2_CFLAGS=$GTK_CFLAGS + GTK2_LIBS=$GTK_LIBS +@@ -109,22 +113,18 @@ + X11_LIBS="$X11_LIBS $XEXT_LIBS" + if test x"$X11_LIBS" != x ; then + HAVE_NVCONTROL=yes +- AC_SUBST(X11_CFLAGS) +- AC_SUBST(X11_LIBS) + AC_DEFINE([HAVE_NVCONTROL], [1], [NV-CONTROL support for changing OpenGL settings]) + fi + fi + ++AC_SEARCH_LIBS([dlsym], [dl dld], [], [ ++ AC_MSG_ERROR([unable to find the dlsym() function]) ++]) ++ + AC_SUBST(HAVE_GTK2) + AC_SUBST(HAVE_QT) + AC_SUBST(HAVE_NVCONTROL) + +-AC_SUBST(CFLAGS) +-AC_SUBST(LIBS) +- +-RANLIB=ranlib +-AC_SUBST(RANLIB) +- + + AC_OUTPUT(src/Makefile + src/backend/Makefile @@ -141,7 +141,7 @@ if [test "$HAVE_NVCONTROL" = "yes"]; then echo "- NV-CONTROL support enabled" @@ -15,6 +60,50 @@ fi if [test "$HAVE_GTK2" = "yes"]; then echo "- GTK2 GUI enabled" +--- a/src/backend/Makefile.in ++++ b/src/backend/Makefile.in +@@ -1,11 +1,11 @@ +-CC=@CC@ -O0 +-AR=ar ++CC=@CC@ ++AR=@AR@ + RANLIB=@RANLIB@ + + system=@system@ + HAVE_NVCONTROL=@HAVE_NVCONTROL@ + OBJECTS=backend.o bios.o config.o error.o nv30.o nv40.o nv50.o info.o overclock.o utils.o i2c.o xf86i2c.o adt7473.o f75375.o lm99.o w83781d.o w83l785r.o libc_wrapper.o +-CFLAGS=@X11_CFLAGS@ -I../.. -I../nvcontrol ++CFLAGS=@CFLAGS@ @X11_CFLAGS@ -I../.. -I../nvcontrol + + ifeq ($(system), FreeBSD) + OBJECTS+=back_bsd.o +--- a/src/gtk/Makefile.in ++++ b/src/gtk/Makefile.in +@@ -20,20 +20,21 @@ + + ifeq ($(HAVE_NVCONTROL), yes) + DEPS=$(libbackend) $(libnvcontrol) +- LIBS=@GTK_LIBS@ -L../backend -lbackend -L../nvcontrol -lnvcontrol ++ LIBS=@LIBS@ @GTK_LIBS@ -L../backend -lbackend -L../nvcontrol -lnvcontrol + OBJECTS=banner.o gl.o hw.o main.o settings.o + else + DEPS=$(libbackend) +- LIBS=@GTK_LIBS@ -L../backend -lbackend ++ LIBS=@LIBS@ @GTK_LIBS@ -L../backend -lbackend + OBJECTS=banner.o hw.o main.o settings.o + endif ++X11_LIBS=@X11_LIBS@ + + + .PHONY: clean distclean install + all: $(PROGRAM) + + nvclock_gtk: $(DEPS) $(OBJECTS) +- $(CC) $(CFLAGS) -o nvclock_gtk $(OBJECTS) $(libbackend) $(LIBS) ++ $(CC) $(CFLAGS) $(LDFLAGS) -o nvclock_gtk $(OBJECTS) $(libbackend) $(LIBS) $(X11_LIBS) + + clean: + rm -f nvclock_gtk *.core *.o *.exe --- a/src/Makefile.in +++ b/src/Makefile.in @@ -16,7 +16,7 @@ @@ -46,25 +135,15 @@ clean: clean-recursive clean-app ---- a/src/gtk/Makefile.in -+++ b/src/gtk/Makefile.in -@@ -27,6 +27,7 @@ - LIBS=@GTK_LIBS@ -L../backend -lbackend - OBJECTS=banner.o hw.o main.o settings.o - endif -+LIBS += -lX11 - - - .PHONY: clean distclean install -@@ -33,7 +33,7 @@ - all: $(PROGRAM) - - nvclock_gtk: $(DEPS) $(OBJECTS) -- $(CC) $(CFLAGS) -o nvclock_gtk $(OBJECTS) $(libbackend) $(LIBS) -+ $(CC) $(CFLAGS) $(LDFLAGS) -o nvclock_gtk $(OBJECTS) $(libbackend) $(LIBS) - - clean: - rm -f nvclock_gtk *.core *.o *.exe +--- a/src/nvcontrol/Makefile.in ++++ b/src/nvcontrol/Makefile.in +@@ -1,5 +1,5 @@ + CC=@CC@ +-AR=ar ++AR=@AR@ + RANLIB=@RANLIB@ + system=@system@ + CFLAGS=@CFLAGS@ --- a/src/qt/Makefile.in +++ b/src/qt/Makefile.in @@ -31,7 +31,7 @@ @@ -76,19 +155,3 @@ clean: rm -f nvclock_qt *.core *.moc *.o ---- a/src/backend/Makefile.in -+++ b/src/backend/Makefile.in -@@ -1,11 +1,11 @@ --CC=@CC@ -O0 -+CC=@CC@ - AR=ar - RANLIB=@RANLIB@ - - system=@system@ - HAVE_NVCONTROL=@HAVE_NVCONTROL@ - OBJECTS=backend.o bios.o config.o error.o nv30.o nv40.o nv50.o info.o overclock.o utils.o i2c.o xf86i2c.o adt7473.o f75375.o lm99.o w83781d.o w83l785r.o libc_wrapper.o --CFLAGS=@X11_CFLAGS@ -I../.. -I../nvcontrol -+CFLAGS=@CFLAGS@ @X11_CFLAGS@ -I../.. -I../nvcontrol - - ifeq ($(system), FreeBSD) - OBJECTS+=back_bsd.o diff --git a/sys-power/nvclock/nvclock-0.8_p20110102-r2.ebuild b/sys-power/nvclock/nvclock-0.8_p20110102-r2.ebuild index 92f0dd852e67..d14d2d9f9b1d 100644 --- a/sys-power/nvclock/nvclock-0.8_p20110102-r2.ebuild +++ b/sys-power/nvclock/nvclock-0.8_p20110102-r2.ebuild @@ -1,9 +1,9 @@ # Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="4" +EAPI=7 -inherit autotools eutils toolchain-funcs +inherit autotools DESCRIPTION="NVIDIA Overclocking Utility" HOMEPAGE="http://www.linuxhardware.org/nvclock/" @@ -19,27 +19,30 @@ RDEPEND=" x11-libs/gtk+:2 x11-libs/libX11 ) - nvcontrol? ( x11-libs/libX11 x11-libs/libXext ) -" + nvcontrol? ( + x11-libs/libX11 + x11-libs/libXext + )" DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}"/${P}-r1-make.patch + "${FILESDIR}"/${P}-usleep.patch + "${FILESDIR}"/${P}-desktop.patch + "${FILESDIR}"/${P}-buffers.patch + "${FILESDIR}"/${P}-fno-common.patch +) src_prepare() { - epatch \ - "${FILESDIR}"/${P}-r1-make.patch \ - "${FILESDIR}"/${P}-usleep.patch \ - "${FILESDIR}"/${P}-desktop.patch \ - "${FILESDIR}"/${P}-buffers.patch + default + mv configure.{in,ac} || die eautoreconf } src_configure() { - sed -i \ - -e "/^AR=ar/s:=.*:=$(tc-getAR):" \ - src/*/Makefile.in || die - - # Qt support would mean Qt 3. + # only <Qt-4 supported econf \ - --docdir=/usr/share/doc/${PF} \ --disable-qt \ $(use_enable gtk) \ $(use_enable nvcontrol) @@ -51,8 +54,7 @@ src_compile() { } src_install() { - mkdir -p "${D}"/usr/bin || die - + dodir /usr/bin default newinitd "${FILESDIR}"/nvclock_initd nvclock |