summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'x11-misc/xmountains')
-rw-r--r--x11-misc/xmountains/files/xmountains-2.9-fno-common.patch20
-rw-r--r--x11-misc/xmountains/files/xmountains-2.9-global.patch26
-rw-r--r--x11-misc/xmountains/files/xmountains-2.9-main.patch11
-rw-r--r--x11-misc/xmountains/files/xmountains-2.9-string.patch11
-rw-r--r--x11-misc/xmountains/metadata.xml2
-rw-r--r--x11-misc/xmountains/xmountains-2.9-r1.ebuild36
6 files changed, 85 insertions, 21 deletions
diff --git a/x11-misc/xmountains/files/xmountains-2.9-fno-common.patch b/x11-misc/xmountains/files/xmountains-2.9-fno-common.patch
new file mode 100644
index 000000000000..e7140ca4fada
--- /dev/null
+++ b/x11-misc/xmountains/files/xmountains-2.9-fno-common.patch
@@ -0,0 +1,20 @@
+--- a/X_graphics.c
++++ b/X_graphics.c
+@@ -10,7 +10,6 @@
+ #include "paint.h"
+ char X_graphics_Id[]="$Id: X_graphics.c,v 1.26 2009/08/28 09:09:17 spb Exp $";
+
+-char *display=NULL; /* name of display to open, NULL for default */
+ char *geom=NULL; /* geometry of window, NULL for default */
+
+ Atom wm_protocols;
+@@ -264,7 +263,8 @@
+ graph_height = gptr->graph_height;
+ /*{{{open display*/
+
+- dpy = XOpenDisplay(display);
++/* display to open, NULL for default */
++ dpy = XOpenDisplay(NULL);
+
+ if( ! dpy )
+ {
diff --git a/x11-misc/xmountains/files/xmountains-2.9-global.patch b/x11-misc/xmountains/files/xmountains-2.9-global.patch
new file mode 100644
index 000000000000..65ef65fa2040
--- /dev/null
+++ b/x11-misc/xmountains/files/xmountains-2.9-global.patch
@@ -0,0 +1,26 @@
+--- a/Makefile.alt
++++ b/Makefile.alt
+@@ -8,17 +8,17 @@
+
+ LOCAL_LIBRARIES = -lX11
+ SYS_LIBRARIES = -lm
+- SRCS = calcalt.c random.c artist.c global.c xmountains.c X_graphics.c print_alg.c
+- OBJS = calcalt.o random.o artist.o global.o xmountains.o X_graphics.o print_alg.o
+- HDRS = crinkle.h global.h paint.h patchlevel.h copyright.h
++ SRCS = calcalt.c random.c artist.c xmountains.c X_graphics.c print_alg.c
++ OBJS = calcalt.o random.o artist.o xmountains.o X_graphics.o print_alg.o
++ HDRS = crinkle.h paint.h patchlevel.h copyright.h
+
+ xmountains: $(OBJS)
+ $(CC) $(LDFLAGS) -o xmountains $(OBJS) -lX11 -lm
+
+
+ calcalt.o: crinkle.h
+-artist.o: global.h paint.h crinkle.h
+-global.o: crinkle.h paint.h
+-xmountains.o: paint.h global.h patchlevel.h copyright.h crinkle.h
++artist.o: paint.h crinkle.h
++: crinkle.h paint.h
++xmountains.o: paint.h patchlevel.h copyright.h crinkle.h
+ X_graphics.o: paint.h crinkle.h
+
diff --git a/x11-misc/xmountains/files/xmountains-2.9-main.patch b/x11-misc/xmountains/files/xmountains-2.9-main.patch
new file mode 100644
index 000000000000..26297783c7ee
--- /dev/null
+++ b/x11-misc/xmountains/files/xmountains-2.9-main.patch
@@ -0,0 +1,11 @@
+--- a/xmountains.c
++++ b/xmountains.c
+@@ -144,7 +144,7 @@
+ void seed_uni(int ijkl);
+ void plot_column(Graph *g);
+
+-main (argc,argv)
++int main (argc,argv)
+ int argc;
+ char **argv;
+ {
diff --git a/x11-misc/xmountains/files/xmountains-2.9-string.patch b/x11-misc/xmountains/files/xmountains-2.9-string.patch
new file mode 100644
index 000000000000..97540b2792e7
--- /dev/null
+++ b/x11-misc/xmountains/files/xmountains-2.9-string.patch
@@ -0,0 +1,11 @@
+--- a/xmountains.c
++++ b/xmountains.c
+@@ -1,7 +1,7 @@
+
+ #include <stdio.h>
+ #include <stdlib.h>
+-#include <strings.h>
++#include <string.h>
+ #include <signal.h>
+ #include <sys/types.h>
+ #include <unistd.h>
diff --git a/x11-misc/xmountains/metadata.xml b/x11-misc/xmountains/metadata.xml
index 2ba8e9e851e4..410408b3d171 100644
--- a/x11-misc/xmountains/metadata.xml
+++ b/x11-misc/xmountains/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>desktop-misc@gentoo.org</email>
diff --git a/x11-misc/xmountains/xmountains-2.9-r1.ebuild b/x11-misc/xmountains/xmountains-2.9-r1.ebuild
index 712987fe73bd..3ba1649dc3fd 100644
--- a/x11-misc/xmountains/xmountains-2.9-r1.ebuild
+++ b/x11-misc/xmountains/xmountains-2.9-r1.ebuild
@@ -1,43 +1,39 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
-
+EAPI=7
inherit toolchain-funcs
-MY_P=${P/-/_}
-
DESCRIPTION="Fractal terrains of snow-capped mountains near water"
HOMEPAGE="https://spbooth.github.io/xmountains/"
-SRC_URI="http://www.epcc.ed.ac.uk/~spb/${PN}/${MY_P}.tar.gz"
+SRC_URI="http://www.epcc.ed.ac.uk/~spb/${PN}/${P/-/_}.tar.gz"
LICENSE="HPND"
SLOT="0"
KEYWORDS="amd64 ppc x86"
-IUSE=""
RDEPEND="
x11-libs/libX11
- x11-misc/xbitmaps"
-DEPEND="${RDEPEND}
- x11-base/xorg-proto"
-
+ x11-misc/xbitmaps
+"
+DEPEND="
+ ${RDEPEND}
+ x11-base/xorg-proto
+"
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.9-fno-common.patch
+ "${FILESDIR}"/${PN}-2.9-global.patch
+ "${FILESDIR}"/${PN}-2.9-main.patch
+ "${FILESDIR}"/${PN}-2.9-string.patch
+)
S=${WORKDIR}
-src_prepare() {
- default
- # add missing include for strcmp
- sed -i xmountains.c -e '1a#include <string.h> /* strcmp() */' || die
- # remove obsolete references to global.*
- sed -i Makefile.alt README -e 's|global\..||g' || die
-}
-
src_compile() {
emake \
-f Makefile.alt \
CC="$(tc-getCC)" \
CFLAGS="${CFLAGS}" \
- LDFLAGS="${LDFLAGS}" \
+ LDFLAGS="${CFLAGS} ${LDFLAGS}" \
${PN}
}