pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/graphics/giflib Apply <https://sourceforge.net/p/gifli...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/e215b7e5bd1f
branches:  trunk
changeset: 347449:e215b7e5bd1f
user:      schmonz <schmonz%pkgsrc.org@localhost>
date:      Sat Jan 11 13:33:31 2020 +0000

description:
Apply <https://sourceforge.net/p/giflib/bugs/_discuss/thread/4e811ad29b/>
to fix Darwin build.

diffstat:

 graphics/giflib/Makefile               |    8 +--
 graphics/giflib/distinfo               |    4 +-
 graphics/giflib/patches/patch-Makefile |  110 +++++++++++++++++++++++++++++++-
 3 files changed, 108 insertions(+), 14 deletions(-)

diffs (162 lines):

diff -r 68d23a0b0dc6 -r e215b7e5bd1f graphics/giflib/Makefile
--- a/graphics/giflib/Makefile  Sat Jan 11 13:11:52 2020 +0000
+++ b/graphics/giflib/Makefile  Sat Jan 11 13:33:31 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.50 2020/01/09 15:56:11 ryoon Exp $
+# $NetBSD: Makefile,v 1.51 2020/01/11 13:33:31 schmonz Exp $
 
 .include "Makefile.common"
 PKGREVISION=   1
@@ -10,10 +10,4 @@
 INSTALL_TARGET=        install-include
 INSTALL_TARGET+=       install-lib
 
-post-install:
-       ${INSTALL_LIB} ${WRKSRC}/libutil.a \
-               ${DESTDIR}${PREFIX}/lib/libgifutil.a
-       ${INSTALL_LIB} ${WRKSRC}/libutil.so \
-               ${DESTDIR}${PREFIX}/lib/libgifutil.so
-
 .include "../../mk/bsd.pkg.mk"
diff -r 68d23a0b0dc6 -r e215b7e5bd1f graphics/giflib/distinfo
--- a/graphics/giflib/distinfo  Sat Jan 11 13:11:52 2020 +0000
+++ b/graphics/giflib/distinfo  Sat Jan 11 13:33:31 2020 +0000
@@ -1,7 +1,7 @@
-$NetBSD: distinfo,v 1.19 2020/01/07 20:25:14 sevan Exp $
+$NetBSD: distinfo,v 1.20 2020/01/11 13:33:31 schmonz Exp $
 
 SHA1 (giflib-5.2.1.tar.gz) = c3f774dcbdf26afded7788979c8081d33c6426dc
 RMD160 (giflib-5.2.1.tar.gz) = bc4be3ddaef877e4fd546b1240fe94dec8ef3e27
 SHA512 (giflib-5.2.1.tar.gz) = 4550e53c21cb1191a4581e363fc9d0610da53f7898ca8320f0d3ef6711e76bdda2609c2df15dc94c45e28bff8de441f1227ec2da7ea827cb3c0405af4faa4736
 Size (giflib-5.2.1.tar.gz) = 444187 bytes
-SHA1 (patch-Makefile) = 72f3d0727d2092697feea6483cd1b1e4648f3bb0
+SHA1 (patch-Makefile) = 184181cf8d7b7da4aa179931e034a43c2b0be266
diff -r 68d23a0b0dc6 -r e215b7e5bd1f graphics/giflib/patches/patch-Makefile
--- a/graphics/giflib/patches/patch-Makefile    Sat Jan 11 13:11:52 2020 +0000
+++ b/graphics/giflib/patches/patch-Makefile    Sat Jan 11 13:33:31 2020 +0000
@@ -1,20 +1,120 @@
-$NetBSD: patch-Makefile,v 1.1 2020/01/07 20:25:14 sevan Exp $
+$NetBSD: patch-Makefile,v 1.2 2020/01/11 13:33:31 schmonz Exp $
 
 - Inherit the PREFIX rather than hard-coding it.
 - Adjust location where manuals are installed.
+- Apply <https://sourceforge.net/p/giflib/bugs/_discuss/thread/4e811ad29b/>
+  to fix Darwin build
 
 --- Makefile.orig      2019-06-24 16:08:57.000000000 +0000
 +++ Makefile
-@@ -14,11 +14,10 @@ SHELL = /bin/sh
+@@ -14,7 +14,7 @@ SHELL = /bin/sh
  TAR = tar
  INSTALL = install
  
 -PREFIX = /usr/local
++PREFIX?= /usr/local
  BINDIR = $(PREFIX)/bin
  INCDIR = $(PREFIX)/include
  LIBDIR = $(PREFIX)/lib
--MANDIR = $(PREFIX)/share/man
-+MANDIR = $(PREFIX)/man
+@@ -37,6 +37,8 @@ USOURCES = qprintf.c quantize.c getarg.c
+ UHEADERS = getarg.h
+ UOBJECTS = $(USOURCES:.c=.o)
+ 
++UNAME:=$(shell uname)
++
+ # Some utilities are installed
+ INSTALLABLE = \
+       gif2rgb \
+@@ -61,27 +63,48 @@ UTILS = $(INSTALLABLE) \
+ 
+ LDLIBS=libgif.a -lm
+ 
+-all: libgif.so libgif.a libutil.so libutil.a $(UTILS)
+-      $(MAKE) -C doc
++ifeq ($(UNAME), Darwin)
++SOEXTENSION   = dylib
++LIBGIFSOMAJOR   = libgif.$(LIBMAJOR).$(SOEXTENSION)
++LIBGIFSOVER   = libgif.$(LIBVER).$(SOEXTENSION)
++LIBUTILSOMAJOR        = libutil.$(LIBMAJOR).$(SOEXTENSION)
++else
++SOEXTENSION   = so
++LIBGIFSOMAJOR = libgif.$(SOEXTENSION).$(LIBMAJOR)
++LIBGIFSOVER   = libgif.$(SOEXTENSION).$(LIBVER)
++LIBUTILSOMAJOR        = libutil.$(SOEXTENSION).$(LIBMAJOR)
++endif
++LIBGIFSO        = libgif.$(SOEXTENSION)
++LIBUTILSO     = libutil.$(SOEXTENSION)
++
++all: $(LIBGIFSO) libgif.a $(LIBUTILSO) 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)
++$(LIBGIFSO): $(OBJECTS) $(HEADERS)
++ifeq ($(UNAME), Darwin)
++      $(CC) $(CFLAGS) -dynamiclib -current_version $(LIBVER) $(OBJECTS) -o $(LIBGIFSO)
++else
++      $(CC) $(CFLAGS) -shared $(LDFLAGS) -Wl,-soname -Wl,$(LIBGIFSOMAJOR) -o $(LIBGIFSO) $(OBJECTS)
++endif
+ 
+ libgif.a: $(OBJECTS) $(HEADERS)
+       $(AR) rcs libgif.a $(OBJECTS)
  
- # No user-serviceable parts below this line
+-libutil.so: $(UOBJECTS) $(UHEADERS)
+-      $(CC) $(CFLAGS) -shared $(LDFLAGS) -Wl,-soname -Wl,libutil.so.$(LIBMAJOR) -o libutil.so $(UOBJECTS)
++$(LIBUTILSO): $(UOBJECTS) $(UHEADERS)
++ifeq ($(UNAME), Darwin)
++      $(CC) $(CFLAGS) -dynamiclib -current_version $(LIBVER) $(OBJECTS) -o $(LIBUTILSO)
++else
++      $(CC) $(CFLAGS) -shared $(LDFLAGS) -Wl,-soname -Wl,$(LIBUTILMAJOR) -o $(LIBUTILSO) $(UOBJECTS)
++endif
+ 
+ libutil.a: $(UOBJECTS) $(UHEADERS)
+       $(AR) rcs libutil.a $(UOBJECTS)
+ 
+ clean:
+-      rm -f $(UTILS) $(TARGET) libgetarg.a libgif.a libgif.so libutil.a libutil.so *.o
+-      rm -f libgif.so.$(LIBMAJOR).$(LIBMINOR).$(LIBPOINT)
+-      rm -f libgif.so.$(LIBMAJOR)
++      rm -f $(UTILS) $(TARGET) libgetarg.a libgif.a $(LIBGIFSO) libutil.a $(LIBUTILSO) *.o
++      rm -f $(LIBGIFSOVER)
++      rm -f $(LIBGIFSOMAJOR)
+       rm -fr doc/*.1 *.html doc/staging
+ 
+ check: all
+@@ -89,7 +112,8 @@ check: all
+ 
+ # Installation/uninstallation
  
+-install: all install-bin install-include install-lib install-man
++install: all install-bin install-include install-lib
++
+ install-bin: $(INSTALLABLE)
+       $(INSTALL) -d "$(DESTDIR)$(BINDIR)"
+       $(INSTALL) $^ "$(DESTDIR)$(BINDIR)"
+@@ -99,9 +123,12 @@ install-include:
+ install-lib:
+       $(INSTALL) -d "$(DESTDIR)$(LIBDIR)"
+       $(INSTALL) -m 644 libgif.a "$(DESTDIR)$(LIBDIR)/libgif.a"
+-      $(INSTALL) -m 755 libgif.so "$(DESTDIR)$(LIBDIR)/libgif.so.$(LIBVER)"
+-      ln -sf libgif.so.$(LIBVER) "$(DESTDIR)$(LIBDIR)/libgif.so.$(LIBMAJOR)"
+-      ln -sf libgif.so.$(LIBMAJOR) "$(DESTDIR)$(LIBDIR)/libgif.so"
++      $(INSTALL) -m 755 $(LIBGIFSO) "$(DESTDIR)$(LIBDIR)/$(LIBGIFSOVER)"
++      ln -sf $(LIBGIFSOVER) "$(DESTDIR)$(LIBDIR)/$(LIBGIFSOMAJOR)"
++      ln -sf $(LIBGIFSOMAJOR) "$(DESTDIR)$(LIBDIR)/$(LIBGIFSO)"
++      $(INSTALL) -m 644 libutil.a "$(DESTDIR)$(LIBDIR)/libgifutil.a"
++      $(INSTALL) -m 755 $(LIBUTILSO) "$(DESTDIR)$(LIBDIR)/libgifutil.$(SOEXTENSION)"
++
+ install-man:
+       $(INSTALL) -d "$(DESTDIR)$(MANDIR)/man1"
+       $(INSTALL) -m 644 doc/*.1 "$(DESTDIR)$(MANDIR)/man1"
+@@ -112,7 +139,7 @@ uninstall-include:
+       rm -f "$(DESTDIR)$(INCDIR)/gif_lib.h"
+ uninstall-lib:
+       cd "$(DESTDIR)$(LIBDIR)" && \
+-              rm -f libgif.a libgif.so libgif.so.$(LIBMAJOR) libgif.so.$(LIBVER)
++              rm -f libgif.a $(LIBGIFSO) $(LIBGIFSOMAJOR) $(LIBGIFSOVER)
+ uninstall-man:
+       cd "$(DESTDIR)$(MANDIR)/man1" && rm -f $(shell cd doc >/dev/null && echo *.1)
+ 



Home | Main Index | Thread Index | Old Index