dev-embedded/qdl: respect user CFLAGS and LDFLAGS

Signed-off-by: Quincy Fleming <quincyf467@protonmail.com>
This commit is contained in:
Quincy Fleming
2023-07-18 12:56:49 -05:00
parent c243d91ba1
commit 390eeecd09
4 changed files with 53 additions and 7 deletions

View File

@@ -0,0 +1,17 @@
#Created by Quincy Fleming
#CFLAGS and LDFLAGS were not being respected
#Bug links: https://bugs.gentoo.org/910480 https://bugs.gentoo.org/910481
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,8 @@
OUT := qdl
-CFLAGS := -O2 -Wall -g `xml2-config --cflags`
-LDFLAGS := `xml2-config --libs`
-prefix := /usr/local
+CFLAGS += `${PKG_CONFIG} --cflags libxml-2.0`
+LDFLAGS += `${PKG_CONFIG} --libs libxml-2.0 libudev`
+prefix = ${EPREFIX}/usr
SRCS := firehose.c qdl.c sahara.c util.c patch.c program.c
OBJS := $(SRCS:.c=.o)

View File

@@ -0,0 +1,17 @@
#Created by Quincy Fleming
#CFLAGS and LDFLAGS were not being respected
#Bug links: https://bugs.gentoo.org/910480 https://bugs.gentoo.org/910481
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,8 @@
OUT := qdl
-CFLAGS := -O2 -Wall -g `pkg-config --cflags libxml-2.0`
-LDFLAGS := `pkg-config --libs libxml-2.0 libudev`
-prefix := /usr/local
+CFLAGS += `${PKG_CONFIG} --cflags libxml-2.0`
+LDFLAGS += `${PKG_CONFIG} --libs libxml-2.0 libudev`
+prefix = ${EPREFIX}/usr
SRCS := firehose.c qdl.c sahara.c util.c patch.c program.c ufs.c
OBJS := $(SRCS:.c=.o)

View File

@@ -3,6 +3,8 @@
EAPI=8
inherit toolchain-funcs
DESCRIPTION="Tool to communicate with Qualcomm System On a Chip bootroms"
HOMEPAGE="https://github.com/andersson/qdl"
SRC_URI="https://github.com/andersson/qdl/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
@@ -12,13 +14,18 @@ SLOT="0"
KEYWORDS="~amd64"
BDEPEND="virtual/libudev
virtual/pkgconfig
dev-libs/libxml2
"
src_install() {
emake DESTDIR="${D}" prefix="${EPREFIX}"/usr install
PATCHES=( "${FILESDIR}/${P}-makefile.patch" )
dodoc README
src_compile() {
emake CC=$(tc-getCC) PKG_CONFIG=$(tc-getPKG_CONFIG)
}
src_install() {
default
insinto "/usr/share/${PN}"
doins LICENSE
}

View File

@@ -3,7 +3,7 @@
EAPI=8
inherit git-r3
inherit git-r3 toolchain-funcs
DESCRIPTION="Tool to communicate with Qualcomm System On a Chip bootroms"
HOMEPAGE="https://github.com/andersson/qdl"
@@ -13,13 +13,18 @@ LICENSE="BSD-3"
SLOT="0"
BDEPEND="virtual/libudev
virtual/pkgconfig
dev-libs/libxml2
"
src_install() {
emake DESTDIR="${D}" prefix="${EPREFIX}"/usr install
PATCHES=( "${FILESDIR}/${P}-makefile.patch" )
dodoc README
src_compile() {
emake CC=$(tc-getCC) PKG_CONFIG=$(tc-getPKG_CONFIG)
}
src_install() {
default
insinto "/usr/share/${PN}"
doins LICENSE
}