summaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorjperkin <jperkin@pkgsrc.org>2022-12-13 13:34:48 +0000
committerjperkin <jperkin@pkgsrc.org>2022-12-13 13:34:48 +0000
commit82f4b6084a02b0ba6978eb2a6e1022f4951e9b04 (patch)
tree56707da1634566fcb277e27fb5c8719613d17882 /graphics
parent0af10bf51929388d5daa254ad7a34f188f7ff6d9 (diff)
downloadpkgsrc-82f4b6084a02b0ba6978eb2a6e1022f4951e9b04.tar.gz
freeimage: Fix unzip problems.
Move fix out of hacks.mk and generalise for all systems, the problem is that NetBSD unzip behaves differently to other implementations, which is why we end up with these problems. Also make it pkglint clean while here.
Diffstat (limited to 'graphics')
-rw-r--r--graphics/freeimage/Makefile.common12
-rw-r--r--graphics/freeimage/hacks.mk19
2 files changed, 11 insertions, 20 deletions
diff --git a/graphics/freeimage/Makefile.common b/graphics/freeimage/Makefile.common
index 5b4776e0e18..fab0062be15 100644
--- a/graphics/freeimage/Makefile.common
+++ b/graphics/freeimage/Makefile.common
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.4 2022/12/13 13:31:11 jperkin Exp $
+# $NetBSD: Makefile.common,v 1.5 2022/12/13 13:34:48 jperkin Exp $
# used by graphics/freeimage/Makefile
# used by graphics/freeimageplus/Makefile
@@ -24,6 +24,16 @@ DISTINFO_FILE= ${.CURDIR}/../../graphics/freeimage/distinfo
INSTALLATION_DIRS+= include lib share/doc/${PKGBASE}
+# Systems that use unzip from pkgsrc end up with DOS line endings, so
+# we need to ensure files can be patched.
+SUBST_CLASSES+= cr
+SUBST_STAGE.cr= post-extract
+SUBST_FILES.cr+= Source/FreeImage/PluginBMP.cpp
+SUBST_FILES.cr+= Source/FreeImage/PluginDDS.cpp
+SUBST_FILES.cr+= Source/FreeImage/PluginTIFF.cpp
+SUBST_FILTER_CMD.cr= ${TR} -d '\r'
+SUBST_NOOP_OK.cr= yes
+
pre-configure:
# G3 and JPEGTransform can't be built,
# due to using private headers in bundled libs
diff --git a/graphics/freeimage/hacks.mk b/graphics/freeimage/hacks.mk
deleted file mode 100644
index a651bd6d1fb..00000000000
--- a/graphics/freeimage/hacks.mk
+++ /dev/null
@@ -1,19 +0,0 @@
-# $NetBSD: hacks.mk,v 1.1 2021/07/11 04:08:06 markd Exp $
-
-.if !defined(FREEIMAGE_HACKS_MK)
-FREEIMAGE_HACKS_MK= defined
-
-###
-### For some reason on Linux PluginTIFF.cpp extracts with CR LF
-### so strip CR before patch is applied.
-###
-.if ${OPSYS} == "Linux"
-PKG_HACKS+= strip-cr
-
-SUBST_CLASSES+= cr
-SUBST_STAGE.cr= pre-patch
-SUBST_FILES.cr= Source/FreeImage/PluginTIFF.cpp
-SUBST_SED.cr= -e 's|\r||'
-.endif
-
-.endif # FREEIMAGE_HACKS_MK