aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Barbieri <lssndrbarbieri@gmail.com>2021-04-12 01:56:57 +0200
committerAlessandro Barbieri <lssndrbarbieri@gmail.com>2021-04-12 01:56:57 +0200
commit31ac6c64fbade82616b50751619a4916d1dded54 (patch)
tree7b4b5a77a5fa499ac8c2cd0a54278180d4cb9949 /sci-libs
parentsci-libs/meschach: respect flags, remove useless binaries (diff)
downloadguru-31ac6c64fbade82616b50751619a4916d1dded54.tar.gz
guru-31ac6c64fbade82616b50751619a4916d1dded54.tar.bz2
guru-31ac6c64fbade82616b50751619a4916d1dded54.zip
sci-libs/chaco: respect flags
Closes: https://bugs.gentoo.org/781638 Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/chaco/chaco-2.2.ebuild20
-rw-r--r--sci-libs/chaco/files/makefile.patch26
2 files changed, 33 insertions, 13 deletions
diff --git a/sci-libs/chaco/chaco-2.2.ebuild b/sci-libs/chaco/chaco-2.2.ebuild
index d4f784cf0..12c58a451 100644
--- a/sci-libs/chaco/chaco-2.2.ebuild
+++ b/sci-libs/chaco/chaco-2.2.ebuild
@@ -1,10 +1,8 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
-inherit flag-o-matic
-
DESCRIPTION="Software for Partitioning Graphs"
HOMEPAGE="https://www3.cs.stonybrook.edu/~algorith/implement/chaco/implement.shtml"
SRC_URI="https://www3.cs.stonybrook.edu/~algorith/implement/${PN}/distrib/Chaco-${PV}.tar.gz"
@@ -12,21 +10,17 @@ SRC_URI="https://www3.cs.stonybrook.edu/~algorith/implement/${PN}/distrib/Chaco-
LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-
+PATCHES=( "${FILESDIR}/makefile.patch" )
S="${WORKDIR}/Chaco-${PV}"
-src_prepare() {
- sed -i '/CC =/d' code/Makefile
- sed -i '/CFLAGS =/d' code/Makefile
- sed -i -e 's/-O2/${CFLAGS}/g' code/Makefile
- eapply_user
-}
+#src_prepare() {
+# eapply_user
+#}
src_install() {
- append-cflags -fPIE
- cd code
+ pushd code
emake
- cd ..
+ popd
dobin "exec/chaco"
dodoc -r doc/.
}
diff --git a/sci-libs/chaco/files/makefile.patch b/sci-libs/chaco/files/makefile.patch
new file mode 100644
index 000000000..32ab4b84c
--- /dev/null
+++ b/sci-libs/chaco/files/makefile.patch
@@ -0,0 +1,26 @@
+--- a/code/Makefile 2021-04-12 01:42:10.792372462 +0200
++++ b/code/Makefile 2021-04-12 01:46:20.332391138 +0200
+@@ -1,8 +1,6 @@
+ DEST_DIR = ../exec
+ DEST= ${DEST_DIR}/chaco
+-CC = gcc
+ IFLAG = -Imain
+-CFLAGS = -O2
+ OFLAGS = -O2
+
+ FILES.c= main/user_params.c main/interface.c main/main.c \
+@@ -91,7 +89,7 @@
+
+
+ ${DEST}: ${FILES.o} Makefile
+- ${CC} ${OFLAGS} ${FILES.o} -lm -o ${DEST}
++ ${CC} ${CFLAGS} -fPIE ${LDFLAGS} ${FILES.o} -lm -o ${DEST}
+
+ lint:
+ lint ${IFLAG} ${FILES.c} -lm
+@@ -103,4 +101,4 @@
+ rm -f */*.o ${DEST_DIR}/core
+
+ .c.o:
+- ${CC} -c ${IFLAG} ${CFLAGS} -o $*.o $*.c
++ ${CC} -c ${IFLAG} ${CFLAGS} -fPIC -o $*.o $*.c