pkgsrc-WIP-changes archive

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

add gdk-pixbuf-jxl version 0.6 to pkgsrc-wip



Module Name:	pkgsrc-wip
Committed By:	Niclas Rosenvik <nros%NetBSD.org@localhost>
Pushed By:	nros
Date:		Thu Oct 14 21:22:10 2021 +0000
Changeset:	c5dea4b3af1fa5a25144ae06fecb20b13a1880bb

Modified Files:
	Makefile
	libjxl/Makefile.common
	libjxl/distinfo
Added Files:
	gdk-pixbuf-jxl/DESCR
	gdk-pixbuf-jxl/Makefile
	gdk-pixbuf-jxl/PLIST
	libjxl/patches/patch-plugins_gdk-pixbuf_CMakeLists.txt

Log Message:
add gdk-pixbuf-jxl version 0.6 to pkgsrc-wip

Gdk-pixbuf plugin for reading JPEG XL images.
JPEG XL (.jxl) is the next generation , general-purpose
image compression codec by the JPEG committee.

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

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

diffstat:
 Makefile                                           |  1 +
 gdk-pixbuf-jxl/DESCR                               |  3 ++
 gdk-pixbuf-jxl/Makefile                            | 31 +++++++++++++++
 gdk-pixbuf-jxl/PLIST                               |  4 ++
 libjxl/Makefile.common                             |  1 +
 libjxl/distinfo                                    |  1 +
 .../patch-plugins_gdk-pixbuf_CMakeLists.txt        | 46 ++++++++++++++++++++++
 7 files changed, 87 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index 8eabc00451..efab511cf5 100644
--- a/Makefile
+++ b/Makefile
@@ -1084,6 +1084,7 @@ SUBDIR+=	gdb-git
 SUBDIR+=	gdb5
 SUBDIR+=	gdb6
 SUBDIR+=	gde
+SUBDIR+=	gdk-pixbuf-jxl
 SUBDIR+=	gdm
 SUBDIR+=	gdm2
 SUBDIR+=	gdsreader
diff --git a/gdk-pixbuf-jxl/DESCR b/gdk-pixbuf-jxl/DESCR
new file mode 100644
index 0000000000..65ed1baac9
--- /dev/null
+++ b/gdk-pixbuf-jxl/DESCR
@@ -0,0 +1,3 @@
+gdk-pixbuf loader for reading JPEG XL images.
+JPEG XL (.jxl) is the next generation , general-purpose
+image compression codec by the JPEG committee.
diff --git a/gdk-pixbuf-jxl/Makefile b/gdk-pixbuf-jxl/Makefile
new file mode 100644
index 0000000000..1c42b085d1
--- /dev/null
+++ b/gdk-pixbuf-jxl/Makefile
@@ -0,0 +1,31 @@
+# $NetBSD$
+
+.include "../../wip/libjxl/Makefile.common"
+
+PKGNAME=	${DISTNAME:S/lib/gdk-pixbuf-/g}
+COMMENT=	JpegXL GDK pixbuf loader
+
+WRKSRC=		${WRKDIR}/${DISTNAME}
+
+USE_TOOLS+=	bash pkg-config
+USE_LANGUAGES=	c c++
+USE_CMAKE=	yes
+
+CONFIGURE_DIRS=	plugins/gdk-pixbuf
+BUILD_DIRS=	plugins/gdk-pixbuf
+
+REPLACE_BASH=	deps.sh
+
+SUBST_CLASSES+=		gpt
+SUBST_STAGE.gpt=	pre-configure
+SUBST_MESSAGE.gpt=	Fixing path to gdk-pixbuf-thumbnailer
+SUBST_FILES.gpt=	plugins/gdk-pixbuf/jxl.thumbnailer
+SUBST_SED.gpt=		-e 's,/usr,${PREFIX},g'
+
+pre-configure:
+	cd ${WRKSRC} && ./deps.sh
+
+.include "../../databases/shared-mime-info/mimedb.mk"
+.include "../../graphics/gdk-pixbuf2/loaders.mk"
+.include "../../wip/libjxl/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/gdk-pixbuf-jxl/PLIST b/gdk-pixbuf-jxl/PLIST
new file mode 100644
index 0000000000..8d7aa4405e
--- /dev/null
+++ b/gdk-pixbuf-jxl/PLIST
@@ -0,0 +1,4 @@
+@comment $NetBSD$
+lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-jxl.so
+share/mime/packages/image-jxl.xml
+share/thumbnailers/jxl.thumbnailer
diff --git a/libjxl/Makefile.common b/libjxl/Makefile.common
index b08ae1eff5..82495e2b6b 100644
--- a/libjxl/Makefile.common
+++ b/libjxl/Makefile.common
@@ -1,4 +1,5 @@
 # $NetBSD$
+# used by wip/gdk-pixbuf-jxl/Makefile
 # used by wip/gimp-jxl/Makefile
 
 DISTNAME=	libjxl-0.6
diff --git a/libjxl/distinfo b/libjxl/distinfo
index bb89fff384..214f01ceb9 100644
--- a/libjxl/distinfo
+++ b/libjxl/distinfo
@@ -6,5 +6,6 @@ Size (libjxl-0.6.tar.gz) = 16953410 bytes
 SHA1 (patch-CMakeLists.txt) = 037a77f2c258424fcc75f7eff2b75ae4cc150b19
 SHA1 (patch-deps.sh) = 7886018fe8f79f692865c852b2755e4b16a3ee72
 SHA1 (patch-lib_jxl_base_os__macros.h) = 083d97beeec362271fa1ce515204332f1d8938e6
+SHA1 (patch-plugins_gdk-pixbuf_CMakeLists.txt) = 1f73463f206d92e3f4a5ead0ffc8d99257ca6677
 SHA1 (patch-plugins_gimp_CMakeLists.txt) = fda9e3f42bf71848bb7348219ae06839f0f1c93c
 SHA1 (patch-tools_cpu_os__specific.cc) = 8cdd77ae04ad80e09c4e46ef1de29ba71cebc0b7
diff --git a/libjxl/patches/patch-plugins_gdk-pixbuf_CMakeLists.txt b/libjxl/patches/patch-plugins_gdk-pixbuf_CMakeLists.txt
new file mode 100644
index 0000000000..1087a6a95e
--- /dev/null
+++ b/libjxl/patches/patch-plugins_gdk-pixbuf_CMakeLists.txt
@@ -0,0 +1,46 @@
+$NetBSD$
+
+* adapt to make gdk-pixbuf plugin a separate package
+
+--- plugins/gdk-pixbuf/CMakeLists.txt.orig	2021-10-04 18:02:44.000000000 +0000
++++ plugins/gdk-pixbuf/CMakeLists.txt
+@@ -2,9 +2,12 @@
+ #
+ # Use of this source code is governed by a BSD-style
+ # license that can be found in the LICENSE file.
++cmake_minimum_required(VERSION 3.10)
++project(gdl-pixbuf-jxl LANGUAGES C CXX)
+ 
+ find_package(PkgConfig)
+ pkg_check_modules(Gdk-Pixbuf IMPORTED_TARGET gdk-pixbuf-2.0>=2.36)
++pkg_check_modules(JXL IMPORTED_TARGET libjxl libjxl_threads)
+ 
+ if (NOT Gdk-Pixbuf_FOUND)
+   message(WARNING "GDK Pixbuf development libraries not found, \
+@@ -12,7 +15,7 @@ if (NOT Gdk-Pixbuf_FOUND)
+   return ()
+ endif ()
+ 
+-add_library(pixbufloader-jxl SHARED pixbufloader-jxl.c)
++add_library(pixbufloader-jxl SHARED pixbufloader-jxl.c ../../third_party/skcms/skcms.cc)
+ 
+ # Mark all symbols as hidden by default. The PkgConfig::Gdk-Pixbuf dependency
+ # will cause fill_info and fill_vtable entry points to be made public.
+@@ -23,7 +26,8 @@ set_target_properties(pixbufloader-jxl P
+ 
+ # Note: This only needs the decoder library, but we don't install the decoder
+ # shared library.
+-target_link_libraries(pixbufloader-jxl jxl jxl_threads skcms-interface PkgConfig::Gdk-Pixbuf)
++target_link_libraries(pixbufloader-jxl PkgConfig::JXL PkgConfig::Gdk-Pixbuf)
++target_include_directories(pixbufloader-jxl PRIVATE "../../third_party/skcms")
+ 
+ pkg_get_variable(GDK_PIXBUF_MODULEDIR gdk-pixbuf-2.0 gdk_pixbuf_moduledir)
+ install(TARGETS pixbufloader-jxl LIBRARY DESTINATION "${GDK_PIXBUF_MODULEDIR}")
+@@ -32,6 +36,7 @@ install(TARGETS pixbufloader-jxl LIBRARY
+ # mime type image/jxl to
+ # /usr/share/thumbnailers/gdk-pixbuf-thumbnailer.thumbnailer
+ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/jxl.thumbnailer DESTINATION share/thumbnailers/)
++install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../mime/image-jxl.xml DESTINATION share/mime/packages/)
+ 
+ if(BUILD_TESTING AND NOT MINGW)
+   pkg_check_modules(Gdk IMPORTED_TARGET gdk-2.0)


Home | Main Index | Thread Index | Old Index