sci-geosciences/routino: making QA checks happy
authorAndrey Grozin <grozin@gentoo.org>
Tue, 24 Oct 2017 10:24:30 +0000 (17:24 +0700)
committerAndrey Grozin <grozin@gentoo.org>
Tue, 24 Oct 2017 10:24:30 +0000 (17:24 +0700)
Suggested-by: Fabio Rossi <rossi.f@inwind.it>
Closes: https://bugs.gentoo.org/628398
Package-Manager: Portage-2.3.11, Repoman-2.3.3

sci-geosciences/routino/files/routino-3.1.1.patch
sci-geosciences/routino/files/routino-3.2.patch
sci-geosciences/routino/routino-3.1.1.ebuild
sci-geosciences/routino/routino-3.2.ebuild

index 15ba41b73feb6a527106cefd2b28a08cb3f0ed57..ac54fcf9f8870b203d8b8d433f34b28b0ce1585c 100644 (file)
@@ -1,17 +1,22 @@
-diff -r -U1 routino-3.1.1.orig/Makefile.conf routino-3.1.1/Makefile.conf
---- routino-3.1.1.orig/Makefile.conf   2016-03-05 19:49:21.000000000 +0600
-+++ routino-3.1.1/Makefile.conf        2016-07-16 20:09:22.208869580 +0600
-@@ -47,3 +47,3 @@
+--- routino-3.1.1/Makefile.conf        2017-10-22 15:55:10.420531850 +0200
++++ routino-3.1.1/Makefile.conf.new    2017-10-22 15:55:32.180533067 +0200
+@@ -45,11 +45,11 @@
+ # Installation locations (edit if required)
+ 
  ifneq ($(HOST),MINGW)
 -prefix=/usr/local
 +prefix=/usr
  bindir=$(prefix)/bin
-@@ -51,3 +51,3 @@
+ incdir=$(prefix)/include
  libdir=$(prefix)/lib
 -docdir=$(prefix)/doc/routino
 +docdir=$(prefix)/share/doc/$(PF)
  datadir=$(prefix)/share/routino
-@@ -76,6 +76,6 @@
+ else
+ prefix="c:/Program Files/Routino"
+@@ -74,16 +74,16 @@
+ 
+ 
  # Maths library
 -LDFLAGS=-lm
 +LDFLAGS+=-lm
@@ -20,15 +25,32 @@ diff -r -U1 routino-3.1.1.orig/Makefile.conf routino-3.1.1/Makefile.conf
 -CFLAGS=-std=c99
 +CFLAGS+=-std=c99
  
-@@ -85,3 +85,3 @@
+ # Warning options
+ CFLAGS+=-Wall -Wmissing-prototypes -Wextra -Wno-unused-parameter -pedantic
+ 
  # Optimisation options
 -CFLAGS+=-O3
 +#CFLAGS+=-O3
  CFLAGS+=-ffast-math
-@@ -141,4 +141,4 @@
+ 
+ # Optimisation option (only works if compilation and execution use exactly the same CPU architecture).
+@@ -118,7 +118,7 @@
+ endif
+ 
+ # Put the current directory in the shared library path for the router using libroutino
+-LDFLAGS_LDSO=-Wl,-R.
++#LDFLAGS_LDSO=-Wl,-R.
+ 
+ 
+ # Required for multi-threaded support (comment these two lines out if not required)
+@@ -139,8 +139,8 @@
+ 
+ 
  # Required for xz support (uncomment these two lines if required)
 -#CFLAGS+=-DUSE_XZ
 -#LDFLAGS+=-llzma
 +CFLAGS+=-DUSE_XZ
 +LDFLAGS+=-llzma
  
+ 
+ # Required to use stdio with files > 2GiB on 32-bit system.
index 484b61b68f10b3f3739d38227eb2041c0603ba4e..81b6c4d938c9586c9c57932016c58749d5568227 100644 (file)
@@ -1,30 +1,56 @@
-diff -r -U1 routino-3.2.orig/Makefile.conf routino-3.2/Makefile.conf
---- routino-3.2.orig/Makefile.conf     2016-11-22 20:22:52.000000000 +0100
-+++ routino-3.2/Makefile.conf  2017-04-01 23:58:23.835905270 +0200
-@@ -47,3 +47,3 @@
+--- routino-3.2/Makefile.conf  2017-10-22 16:03:29.917559780 +0200
++++ routino-3.2/Makefile.conf.new      2017-10-22 16:04:23.877562797 +0200
+@@ -45,11 +45,11 @@
+ # Installation locations (edit if required)
+ 
  ifneq ($(HOST),MINGW)
 -prefix=/usr/local
 +prefix=/usr
  bindir=$(prefix)/bin
-@@ -51,3 +51,3 @@
+ incdir=$(prefix)/include
  libdir=$(prefix)/lib
 -docdir=$(prefix)/doc/routino
 +docdir=$(prefix)/share/doc/$(PF)
  datadir=$(prefix)/share/routino
-@@ -79,3 +79,3 @@
+ else
+ prefix="c:/Program Files/Routino"
+@@ -74,16 +74,16 @@
+ 
+ 
+ # Maths library
+-LDFLAGS=-lm
++LDFLAGS+=-lm
+ 
  # Language dialect selection
 -CFLAGS=-std=c99
 +CFLAGS+=-std=c99
  
-@@ -85,3 +85,3 @@
+ # Warning options
+ CFLAGS+=-Wall -Wmissing-prototypes -Wextra -Wno-unused-parameter -pedantic
+ 
  # Optimisation options
 -CFLAGS+=-O3
 +#CFLAGS+=-O3
  CFLAGS+=-ffast-math
-@@ -141,4 +141,4 @@
+ 
+ # Optimisation option (only works if compilation and execution use exactly the same CPU architecture).
+@@ -118,7 +118,7 @@
+ endif
+ 
+ # Put the current directory in the shared library path for the router using libroutino
+-LDFLAGS_LDSO=-Wl,-R.
++#LDFLAGS_LDSO=-Wl,-R.
+ 
+ 
+ # Required for multi-threaded support (comment these two lines out if not required)
+@@ -139,8 +139,8 @@
+ 
+ 
  # Required for xz support (uncomment these two lines if required)
 -#CFLAGS+=-DUSE_XZ
 -#LDFLAGS+=-llzma
 +CFLAGS+=-DUSE_XZ
 +LDFLAGS+=-llzma
  
+ 
+ # Required to use stdio with files > 2GiB on 32-bit system.
index 54aadaee9dd20c21c0b685ba72a7387e1bcf6e3b..724e40b2079931913182bdd802508230ce4831ba 100644 (file)
@@ -1,7 +1,10 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
+
 EAPI=6
 
+inherit toolchain-funcs
+
 DESCRIPTION="Routing application based on openstreetmap data"
 HOMEPAGE="http://www.routino.org/"
 SRC_URI="http://www.routino.org/download/${P}.tgz"
@@ -10,10 +13,16 @@ SLOT="0"
 KEYWORDS="amd64 x86"
 IUSE=""
 DEPEND=""
-PATCHES=( "${FILESDIR}"/${P}.patch )
 
-src_configure() {
-       :
+src_prepare() {
+       eapply "${FILESDIR}"/${P}.patch
+
+       sed -i -e "s@libdir=\(.*\)@libdir=\$(prefix)/$(get_libdir)@" \
+               -e "s@CC=gcc@CC=$(tc-getCC)@" \
+               -e "s@LD=gcc@LD=$(tc-getCC)@" \
+               Makefile.conf || die "failed sed"
+
+       eapply_user
 }
 
 src_compile() {
index cb1ceff2cd3cd560f1c032e67c14daedad73f3a0..19512b20efa772e4a7d5761aba76460c1c78b02b 100644 (file)
@@ -1,7 +1,10 @@
 # Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
+
 EAPI=6
 
+inherit toolchain-funcs
+
 DESCRIPTION="Routing application based on openstreetmap data"
 HOMEPAGE="http://www.routino.org/"
 SRC_URI="http://www.routino.org/download/${P}.tgz"
@@ -10,10 +13,16 @@ SLOT="0"
 KEYWORDS="~amd64 ~x86"
 IUSE=""
 DEPEND=""
-PATCHES=( "${FILESDIR}"/${P}.patch )
 
-src_configure() {
-       :
+src_prepare() {
+       eapply "${FILESDIR}"/${P}.patch
+
+       sed -i -e "s@libdir=\(.*\)@libdir=\$(prefix)/$(get_libdir)@" \
+               -e "s@CC=gcc@CC=$(tc-getCC)@" \
+               -e "s@LD=gcc@LD=$(tc-getCC)@" \
+               Makefile.conf || die "failed sed"
+
+       eapply_user
 }
 
 src_compile() {