pkgsrc/graphics/libimagequant/patches/patch-Makefile
adam 2e3c7a60c6 libimagequant: updated to 2.12.1
version 2.12
- new liq_histogram_add_fixed_color()
- faster for large/complex images
- workarounds for Microsoft's outdated C compiler
2018-06-12 10:15:03 +00:00

35 lines
1 KiB
Text

$NetBSD: patch-Makefile,v 1.5 2018/06/12 10:15:03 adam Exp $
Libtoolize.
--- Makefile.orig 2018-06-03 19:46:28.000000000 +0000
+++ Makefile
@@ -1,7 +1,7 @@
-include config.mk
STATICLIB=libimagequant.a
-SHAREDLIB=libimagequant.$(SOLIBSUFFIX)
+SHAREDLIB=libimagequant.la
SOVER=0
ifeq ($(SOLIBSUFFIX),dylib)
SHAREDLIBVER=libimagequant.$(SOVER).$(SOLIBSUFFIX)
@@ -52,15 +52,11 @@ $(STATICLIB): $(OBJS)
$(AR) $(ARFLAGS) $@ $^
$(SHAREDOBJS):
- $(CC) -fPIC $(CFLAGS) -c $(@:.lo=.c) -o $@
+ ${LIBTOOL} --mode=compile $(CC) -fPIC $(CFLAGS) -c $(@:.lo=.c) -o $@
-libimagequant.so: $(SHAREDOBJS)
- $(CC) -shared -Wl,-soname,$(SHAREDLIBVER) -o $(SHAREDLIBVER) $^ $(LDFLAGS)
- ln -fs $(SHAREDLIBVER) $(SHAREDLIB)
-
-libimagequant.dylib: $(SHAREDOBJS)
- $(CC) -shared -o $(SHAREDLIBVER) $^ $(LDFLAGS)
- ln -fs $(SHAREDLIBVER) $(SHAREDLIB)
+$(SHAREDLIB): $(SHAREDOBJS)
+ ${LIBTOOL} --mode=link $(CC) -o $(SHAREDLIB) $^ $(LDFLAGS) \
+ -rpath ${PREFIX}/lib -version-info $(subst .,:,$(basename $(VERSION)))
$(OBJS): $(wildcard *.h) config.mk