[arch-commits] Commit in giflib/trunk (PKGBUILD giflib-5.1.9-make-flags.patch)
Levente Polyak
anthraxx at archlinux.org
Tue Apr 2 13:06:19 UTC 2019
Date: Tuesday, April 2, 2019 @ 13:06:18
Author: anthraxx
Revision: 349646
upgpkg: giflib 5.1.9-3 (fix cflags usage and run tests)
Added:
giflib/trunk/giflib-5.1.9-make-flags.patch
Modified:
giflib/trunk/PKGBUILD
-------------------------------+
PKGBUILD | 16 +++++++++++---
giflib-5.1.9-make-flags.patch | 43 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 55 insertions(+), 4 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2019-04-02 12:54:13 UTC (rev 349645)
+++ PKGBUILD 2019-04-02 13:06:18 UTC (rev 349646)
@@ -6,9 +6,9 @@
pkgname=giflib
pkgver=5.1.9
-pkgrel=2
+pkgrel=3
pkgdesc='Library for reading and writing gif images'
-url='https://sourceforge.net/projects/giflib/'
+url='http://giflib.sourceforge.net/'
arch=('x86_64')
license=('MIT')
depends=('glibc')
@@ -15,13 +15,16 @@
provides=('libgif.so')
makedepends=('xmlto' 'docbook-xml' 'docbook-xsl')
source=(https://downloads.sourceforge.net/project/giflib/${pkgname}-${pkgver}.tar.gz
- giflib-5.1.9-fix-missing-quantize-API-symbols.patch)
+ giflib-5.1.9-fix-missing-quantize-API-symbols.patch
+ giflib-5.1.9-make-flags.patch)
sha512sums=('b6350b39755e3eeba58b5fccf319bbaeee2db6564e13c8ce44d3652cc32d243c391def74b6b1529bc5e0d4573eff94b2ffa5faa90fc564a049122d3e23f1d184'
- '5de1e8724f5221fa3637b4e6a482f650f7608673e2c9200233290018ec8a0bf1beea049b3979b5f57dbf2b2a5fda409324e636e9af10582fd01c71d92d4de3b3')
+ '5de1e8724f5221fa3637b4e6a482f650f7608673e2c9200233290018ec8a0bf1beea049b3979b5f57dbf2b2a5fda409324e636e9af10582fd01c71d92d4de3b3'
+ 'b9afd436c31b971087485c7b476f796817e6ee4f237ef8a0e61e47f8ac59fbe5e673d7194895fcc9aafbb79f133469d27c2f69041ae0cccd9acb78667c0222dd')
prepare() {
cd ${pkgname}-${pkgver}
patch -Np1 < ../giflib-5.1.9-fix-missing-quantize-API-symbols.patch
+ patch -Np1 < ../giflib-5.1.9-make-flags.patch
}
build() {
@@ -29,6 +32,11 @@
make
}
+check() {
+ cd ${pkgname}-${pkgver}
+ make check
+}
+
package() {
cd ${pkgname}-${pkgver}
make PREFIX=/usr DESTDIR="${pkgdir}" install
Added: giflib-5.1.9-make-flags.patch
===================================================================
--- giflib-5.1.9-make-flags.patch (rev 0)
+++ giflib-5.1.9-make-flags.patch 2019-04-02 13:06:18 UTC (rev 349646)
@@ -0,0 +1,43 @@
+From 788a52c399f4731ac1fb27a49db48626f3e140e1 Mon Sep 17 00:00:00 2001
+From: anthraxx <levente at leventepolyak.net>
+Date: Tue, 2 Apr 2019 14:53:28 +0200
+Subject: [PATCH] respect existence of distro CFLAGS and CPPFLAGS
+
+- append CFLAGS instead of set to honor default distro CFLAGS
+- add CPPFLAGS that are defined by distros
+---
+ Makefile | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index e4ded69..7fef84a 100644
+--- a/Makefile
++++ b/Makefile
+@@ -8,7 +8,7 @@
+ #
+ OFLAGS = -O0 -g
+ OFLAGS = -O2
+-CFLAGS = -std=gnu99 -fPIC -Wall -Wno-format-truncation $(OFLAGS)
++CFLAGS += -std=gnu99 -fPIC -Wall -Wno-format-truncation $(OFLAGS)
+
+ SHELL = /bin/sh
+ TAR = tar
+@@ -68,13 +68,13 @@ all: libgif.so libgif.a libutil.so libutil.a $(UTILS)
+ $(UTILS):: libgif.a libutil.a
+
+ libgif.so: $(OBJECTS) $(HEADERS)
+- $(CC) $(CFLAGS) -shared $(LDFLAGS) -Wl,-soname -Wl,libgif.so.$(LIBMAJOR) -o libgif.so $(OBJECTS)
++ $(CC) $(CFLAGS) $(CPPFLAGS) -shared $(LDFLAGS) -Wl,-soname -Wl,libgif.so.$(LIBMAJOR) -o libgif.so $(OBJECTS)
+
+ libgif.a: $(OBJECTS) $(HEADERS)
+ $(AR) rcs libgif.a $(OBJECTS)
+
+ libutil.so: $(UOBJECTS) $(UHEADERS)
+- $(CC) $(CFLAGS) -shared $(LDFLAGS) -Wl,-soname -Wl,libutil.so.$(LIBMAJOR) -o libutil.so $(UOBJECTS)
++ $(CC) $(CFLAGS) $(CPPFLAGS) -shared $(LDFLAGS) -Wl,-soname -Wl,libutil.so.$(LIBMAJOR) -o libutil.so $(UOBJECTS)
+
+ libutil.a: $(UOBJECTS) $(UHEADERS)
+ $(AR) rcs libutil.a $(UOBJECTS)
+--
+2.21.0
+
More information about the arch-commits
mailing list