aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/libmng/files
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/libmng/files')
-rw-r--r--graphics/libmng/files/Makefile.bsd7
-rw-r--r--graphics/libmng/files/patch-conf19
2 files changed, 25 insertions, 1 deletions
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 */
+