pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/graphics/libimagequant Small, portable C library for h...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/e6d1f2104e1a
branches:  trunk
changeset: 357820:e6d1f2104e1a
user:      adam <adam%pkgsrc.org@localhost>
date:      Sun Jan 29 11:57:03 2017 +0000

description:
Small, portable C library for high-quality conversion of RGBA images to 8-bit
indexed-color (palette) images.

diffstat:

 graphics/libimagequant/DESCR                   |   2 +
 graphics/libimagequant/Makefile                |  33 +++++++++++++
 graphics/libimagequant/PLIST                   |   3 +
 graphics/libimagequant/buildlink3.mk           |  12 ++++
 graphics/libimagequant/distinfo                |   8 +++
 graphics/libimagequant/patches/patch-Makefile  |  30 +++++++++++
 graphics/libimagequant/patches/patch-configure |  66 ++++++++++++++++++++++++++
 7 files changed, 154 insertions(+), 0 deletions(-)

diffs (182 lines):

diff -r dee5dfdf0cc5 -r e6d1f2104e1a graphics/libimagequant/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/libimagequant/DESCR      Sun Jan 29 11:57:03 2017 +0000
@@ -0,0 +1,2 @@
+Small, portable C library for high-quality conversion of RGBA images to 8-bit
+indexed-color (palette) images.
diff -r dee5dfdf0cc5 -r e6d1f2104e1a graphics/libimagequant/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/libimagequant/Makefile   Sun Jan 29 11:57:03 2017 +0000
@@ -0,0 +1,33 @@
+# $NetBSD: Makefile,v 1.1 2017/01/29 11:57:03 adam Exp $
+
+DISTNAME=      libimagequant-2.8.2
+CATEGORIES=    graphics
+MASTER_SITES+= ${MASTER_SITE_GITHUB:=ImageOptim/}
+
+MAINTAINER=    adam%NetBSD.org@localhost
+HOMEPAGE=      http://www.libpng.org/pub/png/libpng.html
+COMMENT=       High-quality conversion of RGBA images to 8-bit indexed-color
+LICENSE=       gnu-gpl-v3
+
+GITHUB_TAG=    ${PKGVERSION_NOREV}
+
+USE_LIBTOOL=           yes
+USE_TOOLS+=            gmake
+HAS_CONFIGURE=         yes
+CONFIGURE_ARGS+=       --without-openmp
+BUILD_TARGET=          shared
+
+INSTALLATION_DIRS=     include lib
+REPLACE_SH=            configure
+
+.include "../../mk/bsd.prefs.mk"
+
+.if ${MACHINE_ARCH} == "x86_64"
+CONFIGURE_ARGS+=       --enable-sse
+.endif
+
+do-install:
+       ${INSTALL_DATA} ${WRKSRC}/libimagequant.h ${DESTDIR}${PREFIX}/include/libimagequant.h
+       ${LIBTOOL} --mode=install ${INSTALL_LIB} ${WRKSRC}/libimagequant.la ${DESTDIR}${PREFIX}/lib
+
+.include "../../mk/bsd.pkg.mk"
diff -r dee5dfdf0cc5 -r e6d1f2104e1a graphics/libimagequant/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/libimagequant/PLIST      Sun Jan 29 11:57:03 2017 +0000
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.1 2017/01/29 11:57:03 adam Exp $
+include/libimagequant.h
+lib/libimagequant.la
diff -r dee5dfdf0cc5 -r e6d1f2104e1a graphics/libimagequant/buildlink3.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/libimagequant/buildlink3.mk      Sun Jan 29 11:57:03 2017 +0000
@@ -0,0 +1,12 @@
+# $NetBSD: buildlink3.mk,v 1.1 2017/01/29 11:57:03 adam Exp $
+
+BUILDLINK_TREE+=       libimagequant
+
+.if !defined(LIBIMAGEQUANT_BUILDLINK3_MK)
+LIBIMAGEQUANT_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.libimagequant+=  libimagequant>=2.8.2
+BUILDLINK_PKGSRCDIR.libimagequant?=    ../../graphics/libimagequant
+.endif # LIBIMAGEQUANT_BUILDLINK3_MK
+
+BUILDLINK_TREE+=       -libimagequant
diff -r dee5dfdf0cc5 -r e6d1f2104e1a graphics/libimagequant/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/libimagequant/distinfo   Sun Jan 29 11:57:03 2017 +0000
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.1 2017/01/29 11:57:03 adam Exp $
+
+SHA1 (libimagequant-2.8.2.tar.gz) = 0058b265a8b594db40609969b01a38927c909d13
+RMD160 (libimagequant-2.8.2.tar.gz) = e0e11024c9a8db8e11bf7b4fef6614b437761b8a
+SHA512 (libimagequant-2.8.2.tar.gz) = 91bd5b821c823fd6508643d412253a6d1b8173d76548d96a0c41e2a7cfd7f21c082d901d0412fa10906b9da0cd2430b48fcb8cb60ec88fac60e7f4565a00bb07
+Size (libimagequant-2.8.2.tar.gz) = 63386 bytes
+SHA1 (patch-Makefile) = e1bd81385c268e104c9bf8c119c28831ba023d08
+SHA1 (patch-configure) = 1c8d3cde6cac8b3ace2335d93d5f2464e6852e2e
diff -r dee5dfdf0cc5 -r e6d1f2104e1a graphics/libimagequant/patches/patch-Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/libimagequant/patches/patch-Makefile     Sun Jan 29 11:57:03 2017 +0000
@@ -0,0 +1,30 @@
+$NetBSD: patch-Makefile,v 1.1 2017/01/29 11:57:03 adam Exp $
+
+Libtoolize.
+
+--- Makefile.orig      2017-01-29 09:14:56.000000000 +0000
++++ Makefile
+@@ -1,7 +1,7 @@
+ -include config.mk
+ 
+ STATICLIB=libimagequant.a
+-SHAREDLIB=libimagequant.$(SOLIBSUFFIX)
++SHAREDLIB=libimagequant.la
+ SOVER=0
+ 
+ JNILIB=libimagequant.jnilib
+@@ -38,11 +38,11 @@ $(STATICLIB): $(OBJS)
+       $(AR) $(ARFLAGS) $@ $^
+ 
+ $(SHAREDOBJS):
+-      $(CC) -fPIC $(CFLAGS) -c $(@:.lo=.c) -o $@
++      ${LIBTOOL} --mode=compile $(CC) -fPIC $(CFLAGS) -c $(@:.lo=.c) -o $@
+ 
+ $(SHAREDLIB): $(SHAREDOBJS)
+-      $(CC) -shared -Wl,-soname,$(SHAREDLIB).$(SOVER) -o $(SHAREDLIB).$(SOVER) $^ $(LDFLAGS)
+-      ln -fs $(SHAREDLIB).$(SOVER) $(SHAREDLIB)
++      ${LIBTOOL} --mode=link $(CC) -o $(SHAREDLIB) $^ $(LDFLAGS) \
++              -rpath ${PREFIX}/lib -version-info $(subst .,:,$(VERSION))
+ 
+ $(OBJS): $(wildcard *.h) config.mk
+ 
diff -r dee5dfdf0cc5 -r e6d1f2104e1a graphics/libimagequant/patches/patch-configure
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/libimagequant/patches/patch-configure    Sun Jan 29 11:57:03 2017 +0000
@@ -0,0 +1,66 @@
+$NetBSD: patch-configure,v 1.1 2017/01/29 11:57:03 adam Exp $
+
+Remove SSE auto-detection, it is not portable.
+Remove unwanted compiler flags.
+
+--- configure.orig     2016-12-23 23:22:46.000000000 +0000
++++ configure
+@@ -125,7 +124,7 @@ cflags "-std=c99 -I."
+ 
+ # DEBUG
+ if [ -z "$DEBUG" ]; then
+-    cflags "-O3 -DNDEBUG"
++    cflags "-DNDEBUG"
+     status "Debug" "no"
+ else
+     cflags "-O1 -g"
+@@ -133,13 +132,6 @@ else
+ fi
+ 
+ # SSE
+-if [ "$SSE" = 'auto' ]; then
+-    if [[ "$(uname -m)" =~ (amd|x86_)64 ||
+-          "$(grep -E -m1 "^flags" /proc/cpuinfo)" =~ "sse" ]]; then
+-        SSE=1
+-    fi
+-fi
+-
+ if [ "$SSE" -eq 1 ]; then
+     status "SSE" "yes"
+     cflags "-DUSE_SSE=1"
+@@ -160,15 +152,9 @@ if [ -n "$OPENMP" ]; then
+     else
+         OPENMPFLAGS="-fopenmp"
+     fi
+-    if [[ "$("$CC" -xc -E $OPENMPFLAGS <(echo "#ifdef _OPENMP
+-           #include <omp.h>
+-           #endif") 2>&1)" =~ "omp_get_thread_num" ]]; then
+         cflags "$OPENMPFLAGS"
+         lflags "$OPENMPFLAGS"
+         status "OpenMP" "yes"
+-    else
+-        error "OpenMP" "not supported by compiler (please install a compiler that supports OpenMP (e.g. gcc) and specify it with the CC= argument)"
+-    fi
+ else
+     # silence warnings about omp pragmas
+     cflags "-Wno-unknown-pragmas"
+@@ -177,19 +163,9 @@ else
+ fi
+ 
+ # Cocoa
+-if [[ "$OSTYPE" =~ "darwin" ]]; then
+-    cflags "-mmacosx-version-min=10.6"
+-    lflags "-mmacosx-version-min=10.6"
+-fi
+ 
+ if [[ "$OSTYPE" =~ "darwin" ]]; then
+     SOLIBSUFFIX=dylib
+-
+-    # Search Developer SDK paths, since Apple seems to have dropped the standard Unixy ones
+-    XCODE_CMD="xcode-select"
+-    XCODE_PATH=$($XCODE_CMD -p)
+-    DIRS+=("$XCODE_PATH/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include $XCODE_PATH/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/lib")
+-    DIRS+=("$XCODE_PATH/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include $XCODE_PATH/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/lib")
+ else
+     SOLIBSUFFIX=so
+ fi



Home | Main Index | Thread Index | Old Index