diff --git a/textproc/chardet/Makefile b/textproc/chardet/Makefile new file mode 100644 index 00000000000..c15098909cf --- /dev/null +++ b/textproc/chardet/Makefile @@ -0,0 +1,23 @@ +COMMENT= Mozilla's universal character set detector C/C++ API + +V= 1.0.6 +DISTNAME= libchardet-${V} +EXTRACT_SUFX= .tar.bz2 + +SHARED_LIBS += chardet 0.0 # 1.0 + +CATEGORIES= textproc + +# https preferred for HOMEPAGE +#HOMEPAGE = ??? URL + +# MPL-1.1 +PERMIT_PACKAGE= Yes + +SITES= https://github.com/Joungkyun/libchardet/releases/download/${V}/ + +WANTLIB += ${COMPILER_LIBCXX} m + +CONFIGURE_STYLE= gnu + +.include diff --git a/textproc/chardet/distinfo b/textproc/chardet/distinfo new file mode 100644 index 00000000000..b8dcc53f448 --- /dev/null +++ b/textproc/chardet/distinfo @@ -0,0 +1,2 @@ +SHA256 (libchardet-1.0.6.tar.bz2) = iVjVc4yPevNRzI9xjpIseWH9Lwlfxmi/9ZripTEjFZI= +SIZE (libchardet-1.0.6.tar.bz2) = 435028 diff --git a/textproc/chardet/patches/patch-chardet_pc_in b/textproc/chardet/patches/patch-chardet_pc_in new file mode 100644 index 00000000000..f3ecb8da05a --- /dev/null +++ b/textproc/chardet/patches/patch-chardet_pc_in @@ -0,0 +1,14 @@ +From d919d9906aaa4fb66d14ddfd5a7af0fac1468772 Mon Sep 17 00:00:00 2001 +From: Jakob Gahde +Date: Wed, 25 Feb 2026 02:18:20 +0100 +Subject: [PATCH] Fix pkg-config Cflags + +Index: chardet.pc.in +--- chardet.pc.in.orig ++++ chardet.pc.in +@@ -9,4 +9,4 @@ Name: @PACKAGE_NAME@ + Description: Mozilla's Universal Charset Detector C/C++ API + Version: @PACKAGE_VERSION@ + Libs: -L${libdir} -lchardet +-Cflags: -I${includedir}/chardet @CFLAGS@ ++Cflags: -I${includedir}/chardet diff --git a/textproc/chardet/pkg/DESCR b/textproc/chardet/pkg/DESCR new file mode 100644 index 00000000000..7307b5ac548 --- /dev/null +++ b/textproc/chardet/pkg/DESCR @@ -0,0 +1,2 @@ +libchardet is based on Mozilla Universal Charset Detector library and, detects +the character set used to encode data. diff --git a/textproc/chardet/pkg/PLIST b/textproc/chardet/pkg/PLIST new file mode 100644 index 00000000000..8c61def49bf --- /dev/null +++ b/textproc/chardet/pkg/PLIST @@ -0,0 +1,30 @@ +bin/chardet-config +include/chardet/ +include/chardet/chardet-config.h +include/chardet/chardet.h +include/chardet/nsUniversalDetector.h +include/chardet/nscore.h +include/chardet/version.h +@static-lib lib/libchardet.a +lib/libchardet.la +@lib lib/libchardet.so.${LIBchardet_VERSION} +lib/pkgconfig/chardet.pc +man/ko/ +man/ko/man3/ +@man man/ko/man3/detect.3 +@man man/ko/man3/detect_destroy.3 +@man man/ko/man3/detect_handledata.3 +@man man/ko/man3/detect_init.3 +@man man/ko/man3/detect_obj_free.3 +@man man/ko/man3/detect_obj_init.3 +@man man/ko/man3/detect_reset.3 +@man man/man3/detect.3 +@man man/man3/detect_destroy.3 +@man man/man3/detect_handledata.3 +@man man/man3/detect_init.3 +@man man/man3/detect_obj_free.3 +@man man/man3/detect_obj_init.3 +@man man/man3/detect_reset.3 +share/doc/libchardet/ +share/doc/libchardet/Changelog +share/doc/libchardet/LICENSE