diff options
author | David Seifert <soap@gentoo.org> | 2018-04-17 13:52:39 +0200 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2018-04-17 22:25:25 +0200 |
commit | b38cce1e33027d963c6f9aac6dfd0376e245024c (patch) | |
tree | ba552fce3c590ef5ac4c0ba78d1e14319806fca4 /sci-chemistry/elem | |
parent | sci-chemistry/prekin: Port to EAPI 6 (diff) | |
download | gentoo-b38cce1e33027d963c6f9aac6dfd0376e245024c.tar.gz gentoo-b38cce1e33027d963c6f9aac6dfd0376e245024c.tar.bz2 gentoo-b38cce1e33027d963c6f9aac6dfd0376e245024c.zip |
sci-chemistry/elem: Port to EAPI 6
Package-Manager: Portage-2.3.29, Repoman-2.3.9
Diffstat (limited to 'sci-chemistry/elem')
-rw-r--r-- | sci-chemistry/elem/elem-1.0.3-r1.ebuild | 31 | ||||
-rw-r--r-- | sci-chemistry/elem/elem-1.0.3-r2.ebuild | 31 | ||||
-rw-r--r-- | sci-chemistry/elem/files/elem-1.0.3-fix-build-system.patch | 65 | ||||
-rw-r--r-- | sci-chemistry/elem/files/elem-1.0.3-missing-stdlib.patch | 9 |
4 files changed, 92 insertions, 44 deletions
diff --git a/sci-chemistry/elem/elem-1.0.3-r1.ebuild b/sci-chemistry/elem/elem-1.0.3-r1.ebuild deleted file mode 100644 index eafbb9c4c0b7..000000000000 --- a/sci-chemistry/elem/elem-1.0.3-r1.ebuild +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -inherit toolchain-funcs - -DESCRIPTION="periodic table of the elements" -HOMEPAGE="http://elem.sourceforge.net/" -SRC_URI="mirror://sourceforge/elem/${PN}-src-${PV}-Linux.tgz" -LICENSE="GPL-2" -KEYWORDS="amd64 sparc x86" -SLOT="0" -IUSE="" - -DEPEND="x11-libs/xforms" -RDEPEND="${DEPEND}" - -src_unpack() { - unpack ${A} - cd "${S}" - sed -e 's:\(^LIBS = .*\):\1 -lXpm:' -i Makefile || die "sed failed" -} - -src_compile () { - emake COMPILER="$(tc-getCC)" FLAGS="${CFLAGS}" all || die "Build failed." -} - -src_install () { - into /usr - dobin elem elem-de elem-en - dohtml -r doc/* -} diff --git a/sci-chemistry/elem/elem-1.0.3-r2.ebuild b/sci-chemistry/elem/elem-1.0.3-r2.ebuild index 5a9a8c132cf3..daade3396d36 100644 --- a/sci-chemistry/elem/elem-1.0.3-r2.ebuild +++ b/sci-chemistry/elem/elem-1.0.3-r2.ebuild @@ -1,34 +1,39 @@ -# Copyright 1999-2010 Gentoo Foundation +# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 +EAPI=6 + inherit toolchain-funcs DESCRIPTION="periodic table of the elements" HOMEPAGE="http://elem.sourceforge.net/" SRC_URI="mirror://sourceforge/elem/${PN}-src-${PV}-Linux.tgz" + LICENSE="GPL-2" -KEYWORDS="~amd64 ~sparc ~x86" +KEYWORDS="amd64 sparc x86" SLOT="0" IUSE="" DEPEND="x11-libs/xforms" RDEPEND="${DEPEND}" -src_unpack() { - unpack ${A} - cd "${S}" - sed -e 's:\(^LIBS = .*\):\1 -lXpm:' \ - -e "s:\${FLAGS} -o elem:\$(LDFLAGS) &:" \ - -i Makefile || die #336190 - sed -e "/string.h/ i #include <stdlib.h>" \ - -i elem_cb.c || die #implicit exit() +PATCHES=( + "${FILESDIR}"/${P}-fix-build-system.patch + "${FILESDIR}"/${P}-missing-stdlib.patch +) + +src_configure() { + tc-export CC } src_compile () { - emake COMPILER="$(tc-getCC)" FLAGS="${CFLAGS}" all || die "Build failed." + emake all } src_install () { - dobin elem elem-de elem-en || die - dohtml -r doc/* || die + dobin elem elem-de elem-en + + rm -rf doc/CVS || die + HTML_DOCS=( doc/. ) + einstalldocs } diff --git a/sci-chemistry/elem/files/elem-1.0.3-fix-build-system.patch b/sci-chemistry/elem/files/elem-1.0.3-fix-build-system.patch new file mode 100644 index 000000000000..b89f226e46a7 --- /dev/null +++ b/sci-chemistry/elem/files/elem-1.0.3-fix-build-system.patch @@ -0,0 +1,65 @@ +--- a/Makefile ++++ b/Makefile +@@ -1,8 +1,4 @@ +-COMPILER=gcc +-LIBS = -lm -L./ -lforms -L/usr/X11R6/lib -lX11 -lnsl +-INCLUDE=-I/usr/X11R6/include/X11 -I/usr/include -I/usr/X11R6/include -I/usr/local/X11/include/ -I/usr/X/include/ +-FLAGS = -g -O2 +-DESTDIR = ++LIBS = -lm -L./ -lforms + + + default: +@@ -35,7 +31,7 @@ + @echo "erzeuge deutsche Version von elem" + + elem-de: elem_main_de.o elem_cb_de.o elem_de.o deutsch.h +- ${COMPILER} ${FLAGS} -o elem-de elem_main_de.o elem_cb_de.o elem_de.o ${LIBS} -DDEUTSCH ++ $(CC) $(LDFLAGS) $(CFLAGS) -o elem-de elem_main_de.o elem_cb_de.o elem_de.o $(LIBS) + + + +@@ -43,34 +39,34 @@ + @echo "creating english version of elem" + + elem-en: elem_main_en.o elem_cb_en.o elem_en.o english.h +- ${COMPILER} ${FLAGS} -o elem-en elem_main_en.o elem_cb_en.o elem_en.o ${LIBS} -DENGLISH ++ $(CC) $(LDFLAGS) $(CFLAGS) -o elem-en elem_main_en.o elem_cb_en.o elem_en.o $(LIBS) + + static-de : elem_main_de.o elem_cb_de.o elem_de.o +- ${COMPILER} ${FLAGS} -static -o elem-static-de elem_main_de.o elem_cb_de.o elem_de.o ${LIBS} -DDEUTSCH ++ $(CC) $(LDFLAGS) $(CFLAGS) -static -o elem-static-de elem_main_de.o elem_cb_de.o elem_de.o $(LIBS) + + static-en : elem_main_en.o elem_cb_en.o elem_en.o +- ${COMPILER} ${FLAGS} -static -o elem-static-en elem_main_en.o elem_cb_en.o elem_en.o ${LIBS} -DENGLISH ++ $(CC) $(LDFLAGS) $(CFLAGS) -static -o elem-static-en elem_main_en.o elem_cb_en.o elem_en.o $(LIBS) + + + + + elem_main_de.o : elem_main.c elem.h deutsch.h +- ${COMPILER} ${FLAGS} -DDEUTSCH -o elem_main_de.o -c elem_main.c ${INCLUDE} ++ $(CC) $(CFLAGS) $(CPPFLAGS) -DDEUTSCH -o elem_main_de.o -c elem_main.c + + elem_main_en.o : elem_main.c elem.h english.h +- ${COMPILER} ${FLAGS} -DENGLISH -o elem_main_en.o -c elem_main.c ${INCLUDE} ++ $(CC) $(CFLAGS) $(CPPFLAGS) -DENGLISH -o elem_main_en.o -c elem_main.c + + + elem_cb_de.o : elem_cb.c elem.h deutsch.h +- ${COMPILER} ${FLAGS} -DDEUTSCH -o elem_cb_de.o -c elem_cb.c ${INCLUDE} ++ $(CC) $(CFLAGS) $(CPPFLAGS) -DDEUTSCH -o elem_cb_de.o -c elem_cb.c + elem_cb_en.o : elem_cb.c elem.h english.h +- ${COMPILER} ${FLAGS} -DENGLISH -o elem_cb_en.o -c elem_cb.c ${INCLUDE} ++ $(CC) $(CFLAGS) $(CPPFLAGS) -DENGLISH -o elem_cb_en.o -c elem_cb.c + + + elem_de.o : elem.c elem.h +- ${COMPILER} ${FLAGS} -DDEUTSCH -o elem_de.o -c elem.c ${INCLUDE} ++ $(CC) $(CFLAGS) $(CPPFLAGS) -DDEUTSCH -o elem_de.o -c elem.c + elem_en.o : elem.c elem.h +- ${COMPILER} ${FLAGS} -DENGLISH -o elem_en.o -c elem.c ${INCLUDE} ++ $(CC) $(CFLAGS) $(CPPFLAGS) -DENGLISH -o elem_en.o -c elem.c + + + install-de: deutsch diff --git a/sci-chemistry/elem/files/elem-1.0.3-missing-stdlib.patch b/sci-chemistry/elem/files/elem-1.0.3-missing-stdlib.patch new file mode 100644 index 000000000000..e1937734a51c --- /dev/null +++ b/sci-chemistry/elem/files/elem-1.0.3-missing-stdlib.patch @@ -0,0 +1,9 @@ +--- a/elem_cb.c ++++ b/elem_cb.c +@@ -1,5 +1,6 @@ + #include "forms.h" + #include "elem.h" ++#include <stdlib.h> + #include <string.h> + + |