aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPo-Chuan Hsieh <sunpoet@FreeBSD.org>2022-01-11 16:42:36 +0000
committerPo-Chuan Hsieh <sunpoet@FreeBSD.org>2022-01-11 18:43:39 +0000
commitb4491820804572cf05d0ec133a963685d771d60b (patch)
tree000bb57d04534838e1718f5d5a53a2961f1963e4
parentc50d57602798240a8c8d5995c97a73c7377dbd13 (diff)
downloadports-b4491820804572cf05d0ec133a963685d771d60b.tar.gz
ports-b4491820804572cf05d0ec133a963685d771d60b.zip
graphics/brunsli: Add brunsli 0.1
Brunsli is a lossless JPEG repacking library. Brunsli allows for a 22% decrease in file size while allowing the original JPEG to be recovered byte-by-byte. It is possible to try how much Brunsli will save on your images on the site brunsli.dev. Images are transcoded in browser, no data is transmitted or stored. Codec is powered by WASM technology. WWW: https://github.com/google/brunsli
-rw-r--r--graphics/Makefile1
-rw-r--r--graphics/brunsli/Makefile29
-rw-r--r--graphics/brunsli/distinfo3
-rw-r--r--graphics/brunsli/files/patch-CMakeLists.txt10
-rw-r--r--graphics/brunsli/files/patch-brunsli.cmake20
-rw-r--r--graphics/brunsli/pkg-descr10
-rw-r--r--graphics/brunsli/pkg-plist11
7 files changed, 84 insertions, 0 deletions
diff --git a/graphics/Makefile b/graphics/Makefile
index 60fce7f7c465..77d992f1698e 100644
--- a/graphics/Makefile
+++ b/graphics/Makefile
@@ -82,6 +82,7 @@
SUBDIR += bmp2html
SUBDIR += bonzomatic
SUBDIR += box
+ SUBDIR += brunsli
SUBDIR += bsd-plotutils
SUBDIR += c-a-i-r
SUBDIR += cadubi
diff --git a/graphics/brunsli/Makefile b/graphics/brunsli/Makefile
new file mode 100644
index 000000000000..6d9bca277a78
--- /dev/null
+++ b/graphics/brunsli/Makefile
@@ -0,0 +1,29 @@
+# Created by: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
+
+PORTNAME= brunsli
+PORTVERSION= 0.1
+DISTVERSIONPREFIX= v
+CATEGORIES= graphics
+
+MAINTAINER= sunpoet@FreeBSD.org
+COMMENT= Lossless JPEG repacking library
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+LIB_DEPENDS= libbrotlidec.so:archivers/brotli \
+ libgtest_main.so:devel/googletest \
+ libhighwayhash.so:security/highwayhash
+
+USES= cmake compiler:c++11-lang localbase:ldflags
+
+USE_CXXSTD= c++11
+
+GH_ACCOUNT= google
+USE_GITHUB= yes
+
+post-patch:
+# Clean up bundled libraries
+ @${RM} -r ${WRKSRC}/third_party/
+
+.include <bsd.port.mk>
diff --git a/graphics/brunsli/distinfo b/graphics/brunsli/distinfo
new file mode 100644
index 000000000000..85cdefbe6dd6
--- /dev/null
+++ b/graphics/brunsli/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1641045700
+SHA256 (google-brunsli-v0.1_GH0.tar.gz) = 62762dc740f9fcc9706449c078f12c2a366416486d2882be50a9f201f99ac0bc
+SIZE (google-brunsli-v0.1_GH0.tar.gz) = 876192
diff --git a/graphics/brunsli/files/patch-CMakeLists.txt b/graphics/brunsli/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..55bd29fba640
--- /dev/null
+++ b/graphics/brunsli/files/patch-CMakeLists.txt
@@ -0,0 +1,10 @@
+--- CMakeLists.txt.orig 2019-10-28 09:56:51 UTC
++++ CMakeLists.txt
+@@ -26,7 +26,5 @@ set(CMAKE_CXX_STANDARD 11)
+ set(CMAKE_CXX_EXTENSIONS OFF)
+ set(CMAKE_CXX_STANDARD_REQUIRED YES)
+
+-add_subdirectory(third_party)
+-
+ # The Brunsli library definition.
+ include(brunsli.cmake)
diff --git a/graphics/brunsli/files/patch-brunsli.cmake b/graphics/brunsli/files/patch-brunsli.cmake
new file mode 100644
index 000000000000..61bdcd767a59
--- /dev/null
+++ b/graphics/brunsli/files/patch-brunsli.cmake
@@ -0,0 +1,20 @@
+--- brunsli.cmake.orig 2019-10-28 09:56:51 UTC
++++ brunsli.cmake
+@@ -57,7 +57,7 @@ add_library(brunslidec-static STATIC
+ ${BRUNSLI_DEC_HEADERS}
+ )
+ target_link_libraries(brunslidec-static PRIVATE
+- brotlidec-static
++ brotlidec
+ brunslicommon-static
+ )
+
+@@ -66,7 +66,7 @@ add_library(brunslienc-static STATIC
+ ${BRUNSLI_ENC_HEADERS}
+ )
+ target_link_libraries(brunslienc-static PRIVATE
+- brotlienc-static
++ brotlienc
+ brunslicommon-static
+ )
+
diff --git a/graphics/brunsli/pkg-descr b/graphics/brunsli/pkg-descr
new file mode 100644
index 000000000000..8dda1bddf5bc
--- /dev/null
+++ b/graphics/brunsli/pkg-descr
@@ -0,0 +1,10 @@
+Brunsli is a lossless JPEG repacking library.
+
+Brunsli allows for a 22% decrease in file size while allowing the original JPEG
+to be recovered byte-by-byte.
+
+It is possible to try how much Brunsli will save on your images on the site
+brunsli.dev. Images are transcoded in browser, no data is transmitted or stored.
+Codec is powered by WASM technology.
+
+WWW: https://github.com/google/brunsli
diff --git a/graphics/brunsli/pkg-plist b/graphics/brunsli/pkg-plist
new file mode 100644
index 000000000000..4d6b94b46568
--- /dev/null
+++ b/graphics/brunsli/pkg-plist
@@ -0,0 +1,11 @@
+include/brunsli/brunsli_decode.h
+include/brunsli/brunsli_encode.h
+include/brunsli/decode.h
+include/brunsli/encode.h
+include/brunsli/jpeg_data.h
+include/brunsli/jpeg_data_reader.h
+include/brunsli/jpeg_data_writer.h
+include/brunsli/status.h
+include/brunsli/types.h
+lib/libbrunslidec-c.so
+lib/libbrunslienc-c.so