pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/graphics/freeimage freeimage: Fix unzip problems.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/7b9ddf0abb56
branches:  trunk
changeset: 389970:7b9ddf0abb56
user:      jperkin <jperkin%pkgsrc.org@localhost>
date:      Tue Dec 13 13:34:48 2022 +0000

description:
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:

 graphics/freeimage/Makefile.common |  12 +++++++++++-
 graphics/freeimage/hacks.mk        |  19 -------------------
 2 files changed, 11 insertions(+), 20 deletions(-)

diffs (49 lines):

diff -r 665317069062 -r 7b9ddf0abb56 graphics/freeimage/Makefile.common
--- a/graphics/freeimage/Makefile.common        Tue Dec 13 13:31:11 2022 +0000
+++ b/graphics/freeimage/Makefile.common        Tue Dec 13 13:34:48 2022 +0000
@@ -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 @@
 
 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 -r 665317069062 -r 7b9ddf0abb56 graphics/freeimage/hacks.mk
--- a/graphics/freeimage/hacks.mk       Tue Dec 13 13:31:11 2022 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -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



Home | Main Index | Thread Index | Old Index