pkgsrc-WIP-changes archive

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

Add options and update TODO



Module Name:	pkgsrc-wip
Committed By:	xorrvin <xorrvin%pm.me@localhost>
Pushed By:	xorrvin
Date:		Wed Jun 12 04:53:11 2024 +0200
Changeset:	3de067f2561e24f9f29e290957be875be6c96279

Modified Files:
	libvips/Makefile
	libvips/TODO
Added Files:
	libvips/options.mk

Log Message:
Add options and update TODO

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=3de067f2561e24f9f29e290957be875be6c96279

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 libvips/Makefile   | 21 ++++++++++++---------
 libvips/TODO       | 13 ++++---------
 libvips/options.mk | 43 +++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 59 insertions(+), 18 deletions(-)

diffs:
diff --git a/libvips/Makefile b/libvips/Makefile
index 7cc945f989..70ca310648 100644
--- a/libvips/Makefile
+++ b/libvips/Makefile
@@ -13,27 +13,30 @@ HOMEPAGE=	https://libvips.github.io/libvips/
 COMMENT=	Libvips is a demand-driven, horizontally threaded image processing lib
 LICENSE=	gnu-lgpl-v2.1
 
+
+# disable examples and deprecated interfaces
+MESON_ARGS+=	-Ddeprecated=false -Dexamples=false
+
 USE_TOOLS+=		pkg-config msgfmt xgettext
 USE_LANGUAGES=		c c++
-PYTHON_FOR_BUILD_ONLY=  tool
+PYTHON_FOR_BUILD_ONLY=	tool
 
-PKGCONFIG_OVERRIDE_STAGE=   pre-install
-PKGCONFIG_OVERRIDE+=        output/meson-private/vips-cpp.pc
-PKGCONFIG_OVERRIDE+=        output/meson-private/vips.pc
+PKGCONFIG_OVERRIDE_STAGE=	pre-install
+PKGCONFIG_OVERRIDE+=		output/meson-private/vips-cpp.pc
+PKGCONFIG_OVERRIDE+=		output/meson-private/vips.pc
 
 # disable relro otherwise it'll crash on NetBSD:
 # https://github.com/libvips/libvips/issues/3977 and
 # https://mail-index.netbsd.org/netbsd-bugs/2023/12/26/msg080904.html
-RELRO_SUPPORTED=no
+RELRO_SUPPORTED=		no
+
+.include "options.mk"
 
 .include "../../devel/meson/build.mk"
-.include "../../devel/gobject-introspection/buildlink3.mk"
 .include "../../lang/python/tool.mk"
 .include "../../textproc/expat/buildlink3.mk"
 .include "../../devel/glib2/buildlink3.mk"
 .include "../../textproc/libxml2/buildlink3.mk"
-.include "../../mk/jpeg.buildlink3.mk"
-.include "../../graphics/png/buildlink3.mk"
-.include "../../graphics/libexif/buildlink3.mk"
+
 #Note to self: This must go last
 .include "../../mk/bsd.pkg.mk"
diff --git a/libvips/TODO b/libvips/TODO
index d206f70258..d6192daeed 100644
--- a/libvips/TODO
+++ b/libvips/TODO
@@ -5,18 +5,13 @@ pkglint checks:
 
 Makefile:
 
-- Add in Tiff buildlink? Also, should these be includes or DEPENDS, I'm still
-  not sure?
-- For whatever reason, since they switched to autogen with 8.4 I can't get this
-  to build via Pkgsrc without having libexif as a requirement. Even though it
-  should build fine without it; If I just extract the source and ./configure
-  and make it builds fine without libexif, it's just via this Makefile, etc.
-- Build from source instead of release bundle for more cross platform
-  compatibility?
+- pkglint complains about comment
+- PLIST will be different if some options are enabled (e.g. -Ddeprecated=true)
 
 options.mk:
 
-- Should add in all the optional dependencies.
+- some (but not all) options added
+- some options are undocumented
 
 This package has known vulnerabilities, please investigate and fix if possible:
   CVE-2019-6976, CVE-2019-17534, CVE-2021-27847
diff --git a/libvips/options.mk b/libvips/options.mk
new file mode 100644
index 0000000000..97e38201e6
--- /dev/null
+++ b/libvips/options.mk
@@ -0,0 +1,43 @@
+# $NetBSD$
+
+PKG_OPTIONS_VAR=	PKG_OPTIONS.vips
+PKG_SUPPORTED_OPTIONS=	jpeg png exif tiff gobject-introspection
+PKG_SUGGESTED_OPTIONS=	jpeg png
+
+.include "../../mk/bsd.options.mk"
+
+# meson will find libs if they are installed,
+# so it makes sense to explicitly disabled them
+# if they are not going to be used
+
+# libvips advises jpeg-turbo / mozjpeg
+.if !empty(PKG_OPTIONS:Mjpeg)
+.include "../../graphics/libjpeg-turbo/buildlink3.mk"
+.else
+MESON_ARGS+= -Djpeg=disabled
+.endif
+
+.if !empty(PKG_OPTIONS:Mpng)
+.include "../../graphics/png/buildlink3.mk"
+.else
+MESON_ARGS+= -Dpng=disabled
+.endif
+
+.if !empty(PKG_OPTIONS:Mexif)
+.include "../../graphics/libexif/buildlink3.mk"
+.else
+MESON_ARGS+= -Dexif=disabled
+.endif
+
+.if !empty(PKG_OPTIONS:Mtiff)
+.include "../../graphics/tiff/buildlink3.mk"
+.else
+MESON_ARGS+= -Dtiff=disabled
+.endif
+
+.if !empty(PKG_OPTIONS:Mgobject-introspection)
+.include "../../devel/gobject-introspection/buildlink3.mk"
+.else
+MESON_ARGS+= -Dintrospection=disabled
+.endif
+


Home | Main Index | Thread Index | Old Index