feat: add packages related to JPEG, TIFF and PNG
Signed-off-by: sisungo <[email protected]>
This commit is contained in:
1 parent
8232d4e393
commit
fb9c372755
5 files changed
+220
No files matched your search
@@ -0,0 +1,40 @@
|
||||
import os
|
||||
|
||||
from lib.make import *
|
||||
from lib import cpp, packie
|
||||
|
||||
|
||||
version("2.1")
|
||||
description("a software implementation of the JBIG1 data compression standard")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://www.cl.cam.ac.uk/~mgk25/jbigkit/download/jbigkit-2.1.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.make(["CC=cc"])
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
def pack_bin(composer):
|
||||
composer.makedir("bin")
|
||||
for i in ["pbmtojbg", "jbgtopbm", "pbmtojbg85", "jbgtopbm85"]:
|
||||
composer.addfile(f"pbmtools/{i}", f"bin/{i}")
|
||||
|
||||
def pack_dev(composer):
|
||||
composer.makedir("lib")
|
||||
composer.makedir("include")
|
||||
for i in ["jbig.h", "jbig85.h", "jbig_ar.h"]:
|
||||
composer.addfile(f"libjbig/{i}", f"include/{i}")
|
||||
for i in ["libjbig.a", "libjbig85.a"]:
|
||||
composer.addfile(f"libjbig/{i}", f"lib/{i}")
|
||||
|
||||
package("jbig-kit")
|
||||
dep("semi-libc @same-arch")
|
||||
on_pack(pack_bin)
|
||||
|
||||
package("libjbig-dev")
|
||||
on_pack(pack_dev)
|
||||
@@ -0,0 +1,33 @@
|
||||
import os
|
||||
|
||||
from lib.make import *
|
||||
from lib import cpp, packie
|
||||
|
||||
|
||||
version("4.2.0")
|
||||
description("an open-source image or raster format which supports rapid encoding and decoding for any pixel type")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_managed("github://Esri/lerc#v4.2.0")
|
||||
|
||||
builddep("shortcut/c++")
|
||||
builddep("shortcut/cmake")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.cmake([
|
||||
f"-DCMAKE_INSTALL_LIBDIR={get_prefix('liblerc')}/lib",
|
||||
f"-DCMAKE_INSTALL_INCLUDEDIR={get_prefix('liblerc-dev')}/include",
|
||||
])
|
||||
cpp.ninja()
|
||||
cpp.ninja_install()
|
||||
|
||||
on_build(build)
|
||||
|
||||
package("liblerc")
|
||||
dep("semi-libc @same-arch")
|
||||
cpp.use_auto_pack(["lib"])
|
||||
|
||||
package("liblerc-dev")
|
||||
dep("liblerc (same)")
|
||||
dep("semi-libc-dev @same-arch")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
@@ -0,0 +1,47 @@
|
||||
from lib.make import *
|
||||
from lib import cpp, packie
|
||||
|
||||
|
||||
version("3.2.0")
|
||||
description("a JPEG image codec that uses SIMD instructions to accelerate baseline and progressive JPEG compression and decompression")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_managed("github://libjpeg-turbo/libjpeg-turbo#3.2.0")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/cmake")
|
||||
builddep("libspng-dev @target")
|
||||
builddep("libz-ng-dev @target")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.cmake([
|
||||
f"-DCMAKE_INSTALL_LIBDIR={get_prefix('libjpeg-turbo')}/lib",
|
||||
f"-DCMAKE_INSTALL_INCLUDEDIR={get_prefix('libjpeg-turbo-dev')}/include",
|
||||
"-DWITH_JPEG8=1",
|
||||
"-DWITH_SYSTEM_SPNG=1",
|
||||
"-DWITH_SYSTEM_ZLIB=1",
|
||||
f"-DZLIB_LIBRARY={packie.prefix_of('libz-ng')}/lib/libz.so",
|
||||
f"-DZLIB_INCLUDE_DIR={packie.prefix_of('libz-ng-dev')}/include",
|
||||
])
|
||||
cpp.ninja()
|
||||
cpp.ninja_install()
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
package("libjpeg-turbo")
|
||||
dep("semi-libc @same-arch")
|
||||
dep("libspng @same-arch")
|
||||
cpp.use_auto_pack(["lib"])
|
||||
provide("libjpeg @same-arch")
|
||||
|
||||
package("libjpeg-turbo-tools")
|
||||
dep("libjpeg-turbo (same)")
|
||||
cpp.use_auto_pack(["bin"])
|
||||
|
||||
package("libjpeg-turbo-dev")
|
||||
dep("libjpeg-turbo (same)")
|
||||
dep("semi-libc-dev @same-arch")
|
||||
dep("libspng-dev @same-arch")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
provide("libjpeg-dev @same-arch")
|
||||
@@ -0,0 +1,35 @@
|
||||
from lib.make import *
|
||||
from lib import cpp
|
||||
|
||||
|
||||
version("0.7.4")
|
||||
description("a C library for reading and writing Portable Network Graphics (PNG) format files with a focus on security and ease of use")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_managed("github://randy408/libspng#v0.7.4")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/meson")
|
||||
builddep("libz-dev @target")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.meson_setup([
|
||||
f"--libdir={get_prefix('libspng')}/lib",
|
||||
f"--includedir={get_prefix('libspng-dev')}/include",
|
||||
])
|
||||
cpp.meson_compile()
|
||||
cpp.meson_install()
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
package("libspng")
|
||||
dep("semi-libc @same-arch")
|
||||
dep("libz @same-arch")
|
||||
cpp.use_auto_pack(["lib"])
|
||||
|
||||
package("libspng-dev")
|
||||
dep("libspng (same)")
|
||||
dep("semi-libc-dev @same-arch")
|
||||
dep("libz-dev @same-arch")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
@@ -0,0 +1,65 @@
|
||||
from lib.make import *
|
||||
from lib import cpp
|
||||
|
||||
|
||||
version("4.7.2")
|
||||
description("TIFF Library and Utilities")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("http://download.osgeo.org/libtiff/tiff-4.7.2.tar.xz")
|
||||
|
||||
builddep("shortcut/c++")
|
||||
builddep("shortcut/autotools")
|
||||
builddep("libz-dev @target")
|
||||
builddep("liblzma-dev @target")
|
||||
builddep("libzstd-dev @target")
|
||||
builddep("libjbig-dev @target")
|
||||
builddep("liblerc-dev @target")
|
||||
builddep("libwebp-dev @target")
|
||||
builddep("libjpeg-turbo-dev @target")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.configure([
|
||||
"--prefix=/",
|
||||
f"--bindir={get_prefix('libtiff-tools')}/bin",
|
||||
f"--libdir={get_prefix('libtiff')}/lib",
|
||||
f"--includedir={get_prefix('libtiff-dev')}/include",
|
||||
"--disable-thunder",
|
||||
"--disable-next",
|
||||
"--disable-libdeflate",
|
||||
"--disable-pixarlog",
|
||||
"--disable-old-jpeg",
|
||||
"--enable-defer-strile-load",
|
||||
])
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
package("libtiff")
|
||||
dep("semi-libc @same-arch")
|
||||
dep("libwebp @same-arch")
|
||||
dep("libzstd @same-arch")
|
||||
dep("liblzma @same-arch")
|
||||
dep("liblerc @same-arch")
|
||||
dep("libjpeg-turbo @same-arch")
|
||||
dep("libz @same-arch")
|
||||
dep("libcxx @same-arch")
|
||||
cpp.use_auto_pack(["lib"])
|
||||
|
||||
package("libtiff-tools")
|
||||
dep("libtiff (same)")
|
||||
cpp.use_auto_pack(["bin"])
|
||||
|
||||
package("libtiff-dev")
|
||||
dep("libtiff (same)")
|
||||
dep("semi-libc-dev @same-arch")
|
||||
dep("libwebp-dev @same-arch")
|
||||
dep("libzstd-dev @same-arch")
|
||||
dep("liblzma-dev @same-arch")
|
||||
dep("liblerc-dev @same-arch")
|
||||
dep("libjpeg-turbo-dev @same-arch")
|
||||
dep("libz-dev @same-arch")
|
||||
dep("libcxx-dev @same-arch")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
Reference in new issue
Block a user