aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--graphics/libmng/Makefile16
-rw-r--r--graphics/libmng/distinfo4
-rw-r--r--graphics/libmng/files/Makefile.bsd7
-rw-r--r--graphics/libmng/files/patch-conf19
4 files changed, 41 insertions, 5 deletions
diff --git a/graphics/libmng/Makefile b/graphics/libmng/Makefile
index 282196bba50d..bf3bfc751ba3 100644
--- a/graphics/libmng/Makefile
+++ b/graphics/libmng/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= libmng
-PORTVERSION= 1.0.8
+PORTVERSION= 1.0.9
CATEGORIES= graphics
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} \
http://www.libmng.com/download/
@@ -18,14 +18,26 @@ COMMENT= Multiple-image Network Graphics (MNG) reference library
LIB_DEPENDS= jpeg:${PORTSDIR}/graphics/jpeg \
lcms:${PORTSDIR}/graphics/lcms
+OPTIONS= MNG_OPTIMIZE "Use vendor's new optimization flags" no
+
+USE_REINPLACE= yes
+REINPLACE_ARGS= -i ""
MAKEFILE= ${FILESDIR}/Makefile.bsd
-MAKE_ARGS+= -j2
+MAKE_ARGS+= -j2 WITH_MNG_OPTIMIZE=${WITH_MNG_OPTIMIZE}
INSTALLS_SHLIB= yes
MAN3= libmng.3
MAN5= mng.5 jng.5
+post-extract:
+ #
+ # Getting rid of the DOS-style end-of-lines left by the vendor
+ #
+ ${FIND} ${WRKSRC} -type f | ${XARGS} ${FILE} | \
+ ${AWK} -F: '/CRLF/ { print $$1 }' | \
+ ${XARGS} ${REINPLACE_CMD} -Ee 's,[[:space:]]+$$,,'
+
post-install:
cd ${WRKSRC}/doc/man && ${INSTALL_MAN} ${MAN3} ${PREFIX}/man/man3 \
&& ${INSTALL_MAN} ${MAN5} ${PREFIX}/man/man5
diff --git a/graphics/libmng/distinfo b/graphics/libmng/distinfo
index 88c7dc29eaa3..bfd06b5f5fda 100644
--- a/graphics/libmng/distinfo
+++ b/graphics/libmng/distinfo
@@ -1,2 +1,2 @@
-MD5 (libmng-1.0.8.tar.gz) = d688ca879c934e9cde8b323cf3025f89
-SIZE (libmng-1.0.8.tar.gz) = 509823
+MD5 (libmng-1.0.9.tar.gz) = ff1205ef70855a75c098ea09690413c6
+SIZE (libmng-1.0.9.tar.gz) = 554848
diff --git a/graphics/libmng/files/Makefile.bsd b/graphics/libmng/files/Makefile.bsd
index a80ab5c57788..6c4dffcc3d75 100644
--- a/graphics/libmng/files/Makefile.bsd
+++ b/graphics/libmng/files/Makefile.bsd
@@ -7,7 +7,12 @@ SHLIB_MINOR?= 0
SRCS!= ${MAKE} -f ${.CURDIR}/makefiles/makefile.unix -V SOURCES
-CFLAGS+= -I${INCDIR} -DMNG_FULL_CMS -DMNG_BUILD_SO
+CFLAGS+= -I${INCDIR}
+.if ${WITH_MNG_OPTIMIZE} == "true"
+.for f in CHUNKINITFREE OBJCLEANUP CHUNKASSIGN CHUNKREADER
+CFLAGS+= -DMNG_OPTIMIZE_$f
+.endfor
+.endif
INCS= libmng.h libmng_conf.h libmng_types.h
INCSDIR= ${LOCALBASE}/include
diff --git a/graphics/libmng/files/patch-conf b/graphics/libmng/files/patch-conf
new file mode 100644
index 000000000000..94dacd178e58
--- /dev/null
+++ b/graphics/libmng/files/patch-conf
@@ -0,0 +1,19 @@
++++ libmng_conf.h Tue Oct 18 00:23:11 2005
+@@ -100,4 +100,8 @@
+ #endif
+
++#ifdef PIC
++# define MNG_BUILD_SO
++#endif
++
+ #ifndef MNG_SUPPORT_IJG6B
+ #if defined(MNG_BUILD_SO) || defined(MNG_USE_SO) || defined(MNG_BUILD_DLL) || defined(MNG_USE_DLL)
+@@ -161,6 +165,6 @@
+ select MNG_APP_CMS */
+
+-#define MNG_GAMMA_ONLY
+-/* #define MNG_FULL_CMS */
++/* #define MNG_GAMMA_ONLY */
++#define MNG_FULL_CMS
+ /* #define MNG_APP_CMS */
+