Subject: [alpine-devel] [PATCH] Added -fPIC flag to fix pci_malloc relocation

From: k0r10n <[email-masked]>
Date: Tue, 14 Oct 2014 19:07:30 +0400

---
 main/pciutils/APKBUILD                              |  8 ++++++--
 main/pciutils/fix-linking-pci-malloc-Makefile.patch | 11 +++++++++++
 2 files changed, 17 insertions(+), 2 deletions(-)
 create mode 100644 main/pciutils/fix-linking-pci-malloc-Makefile.patch

diff --git a/main/pciutils/APKBUILD b/main/pciutils/APKBUILD
index bb5ee21..0cbdc8c 100644
--- a/main/pciutils/APKBUILD
+++ b/main/pciutils/APKBUILD
@@ -2,7 +2,7 @@
 # Maintainer: Leonardo Arena <[email-masked]>
 pkgname=pciutils
 pkgver=3.2.1
-pkgrel=1
+pkgrel=2
 pkgdesc="PCI bus configuration space access library and tools"
 url="http://mj.ucw.cz/pciutils.html"
 arch="all"
@@ -12,6 +12,7 @@ makedepends=
 install=
 subpackages="$pkgname-doc $pkgname-dev"
 source="http://www.kernel.org/pub/software/utils/$pkgname/$pkgname-$pkgver.tar.gz
+	fix-linking-pci-malloc-Makefile.patch
 	fix-headers.patch"
 
 _builddir="$srcdir"/$pkgname-$pkgver
@@ -42,7 +43,7 @@ package() {
 		SHAREDIR="$pkgdir"/usr/share/hwdata \
 		MANDIR="$pkgdir"/usr/share/man \
 		install
-
+	
 	install -d "$pkgdir"/usr/lib
 	install -m644 lib/libpci.a "$pkgdir"/usr/lib
 	install -D -m 644 lib/libpci.pc "$pkgdir"/usr/lib/pkgconfig/libpci.pc
@@ -53,8 +54,11 @@ package() {
 }
 
 md5sums="fc51ae19eb25c50c8d61667084623e6d  pciutils-3.2.1.tar.gz
+f56647a25dd1cfe80f6141914c2c0591  fix-linking-pci-malloc-Makefile.patch
 bb5c5627b8436b9b55e27f369f392afc  fix-headers.patch"
 sha256sums="9c1ad30d1e40e353ea78b0c7ca41487cc0923d91e560a6e07072c93bcf520c02  pciutils-3.2.1.tar.gz
+75ff5022e6a223297aa51ffcee80e6fa58bae839d0ae3ae2861013cabce6fba8  fix-linking-pci-malloc-Makefile.patch
 caf84597a154c53d689ca4ce6234f03da0d9f95775b28b12248bcf21f92c51ee  fix-headers.patch"
 sha512sums="dfe9c2cd56f2e823d287eac07a044ea137f2f0d7913475a06cc072945049ad224e47fc33bdaa04ec9ab94e6ce0864cd83736da43c5166ef4b03aebefa2d014cb  pciutils-3.2.1.tar.gz
+520b39602078e4325d7dac2d460547b360f7b52c668d88cf3d776c59246c8cfcb537b7b4f50575da9d2fcea1e207b3e99626ce4f23df890d2565b7dac1db2d94  fix-linking-pci-malloc-Makefile.patch
 d3104b9f4937279fc6dd24c4f92d48ae704566ef2125dc2a62d2c68b2be84b61818f023a9442d9323579315c1139dc9b57b8cb2fee7be44f1fbced02026d52a2  fix-headers.patch"
diff --git a/main/pciutils/fix-linking-pci-malloc-Makefile.patch b/main/pciutils/fix-linking-pci-malloc-Makefile.patch
new file mode 100644
index 0000000..a2b5f01
--- /dev/null
+++ b/main/pciutils/fix-linking-pci-malloc-Makefile.patch
@@ -0,0 +1,11 @@
+--- pciutils-3.2.1/Makefile.orig
++++ pciutils-3.2.1/Makefile
+@@ -2,7 +2,7 @@
+ # (c) 1998--2013 Martin Mares <[email-masked]>
+ 
+ OPT=-O2
+-CFLAGS=$(OPT) -Wall -W -Wno-parentheses -Wstrict-prototypes -Wmissing-prototypes
++CFLAGS=$(OPT) -Wall -W -Wno-parentheses -Wstrict-prototypes -Wmissing-prototypes -fPIC
+ 
+ VERSION=3.2.1
+ DATE=2013-11-10
-- 
2.0.0

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: Natanael Copa <[email-masked]>
Date: Thu, 16 Oct 2014 16:56:51 +0200

On Tue, 14 Oct 2014 19:07:30 +0400

>  create mode 100644 main/pciutils/fix-linking-pci-malloc-Makefile.patch

I fixed commit message to include which package it is about and applied.

In future patches, please prefix the first line in commit message with
which package it is.

Do:
main/pciutils: Added -fPIC flag to fix pci_malloc relocation

Instead of:
Added -fPIC flag to fix pci_malloc relocation

The reason is that I use git shortlog to generate release notes.
Without the 'main/pciutils:' prefix the release-notes would look
something like:

Carlo Landmeter (4):
      testing/py-mopidy-beets: new aport
      testing/py-mopidy-moped: new aport
      testing/py-pykka: new aport
      testing/py-gstreamer0.10: remove duplicate aport

Natanael Copa (5):
      main/openjdk7: remove unused xulrunner from makedepends
      main/php: build phpdbg
      main/php: install php-cli as default instead of php-cgi
      main/php: upgrade to 5.6.2
      main/gettext: upgrade to 0.19.3

k0r10n (1):
      Added -fPIC flag to fix pci_malloc relocation

There is nothing in your commit that indicates what was actually fixed.
If you do the commit message with 'main/pciutils:' prefix it becomes:

Carlo Landmeter (4):
      testing/py-mopidy-beets: new aport
      testing/py-mopidy-moped: new aport
      testing/py-pykka: new aport
      testing/py-gstreamer0.10: remove duplicate aport

Natanael Copa (5):
      main/openjdk7: remove unused xulrunner from makedepends
      main/php: build phpdbg
      main/php: install php-cli as default instead of php-cgi
      main/php: upgrade to 5.6.2
      main/gettext: upgrade to 0.19.3

k0r10n (1):
      main/pciutils: Added -fPIC flag to fix pci_malloc relocation

With the package name in commit message the release-notes (and git log)
makes more sense.

Thanks!

-nc

---