Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#22286 - [pciutils] PKGBUILD doesn't honour CFLAGS

Attached to Project: Arch Linux
Opened by Emil Renner Berthing (Esmil) - Monday, 03 January 2011, 14:20 GMT
Last edited by Tobias Powalowski (tpowa) - Wednesday, 26 January 2011, 21:08 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Tobias Powalowski (tpowa)
Architecture All
Severity Very Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
The PKGBUILD updates the global CFLAGS to include -fPIC -DPIC (which is good), but
unfortunately the Makefile doesn't seem to take the environment variable into account.
Instead the following line changes the Makefile with a sed script to use -fPIC -DPIC,
but doesn't use the CFLAGS environment variable.

The following change does the same, but is a bit clearer IMHO, and does take CFLAGS into account:

diff --git a/PKGBUILD b/PKGBUILD
index ac03405..c6d78ad 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -16,11 +16,9 @@ md5sums=('35222edb86b50a6641352c66fe829b2e')

build() {
cd "${srcdir}/${pkgname}-${pkgver}"
- CFLAGS="${CFLAGS} -fPIC -DPIC"
- sed -i -e 's/^OPT=.*/OPT=-O2 -pipe -fPIC -DPIC/g' Makefile
./update-pciids.sh

- make ZLIB=no PREFIX=/usr SHAREDIR=/usr/share/hwdata MANDIR=/usr/share/man all
+ make OPT="$CFLAGS -fPIC -DPIC" ZLIB=no PREFIX=/usr SHAREDIR=/usr/share/hwdata MANDIR=/usr/share/man all
}

package() {


Additional info:
I looked at the 3.1.7-2 version of the PKGBUILD.


Steps to reproduce:
Compile pciutils with custom CFLAGS in your /etc/makepkg.conf
This task depends upon

Closed by  Tobias Powalowski (tpowa)
Wednesday, 26 January 2011, 21:08 GMT
Reason for closing:  Fixed
Additional comments about closing:  3.1.7-3

Loading...