forked from semios/semios-packages
Compare commits
2
Commits
libpng
..
spirvtools
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3a1f472de2 | ||
|
|
452e767da4 |
@@ -117,6 +117,7 @@ def _is_dev_file(ent) -> bool:
|
||||
or ent.name.endswith(".la")
|
||||
or ent.name.endswith(".pc")
|
||||
or ent.name.endswith(".h")
|
||||
or ent.name.endswith(".hpp")
|
||||
or ent.name.endswith(".cmake")
|
||||
or ent.name.endswith(".inc")
|
||||
or ("Makefile" in ent.name)
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
from lib import cpp, arch
|
||||
from lib.make import *
|
||||
|
||||
|
||||
version("1.6.58")
|
||||
description("the official PNG reference library")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://github.com/pnggroup/libpng/archive/refs/tags/v1.6.58.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
builddep(f"libz-ng-dev @{arch.get_target()}")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.configure([
|
||||
f"--libdir={get_prefix('libpng')}/lib",
|
||||
f"--includedir={get_prefix('libpng')}/include",
|
||||
"--enable-hardware-optimizations=on",
|
||||
])
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
def pack_tools(composer):
|
||||
composer.makedir("bin")
|
||||
composer.addfile("bin/png-fix-itxt", "bin/png-fix-itxt")
|
||||
composer.addfile("bin/pngfix", "bin/pngfix")
|
||||
|
||||
def pack_dev(composer):
|
||||
composer.makedir("lib")
|
||||
composer.addfile("lib/libpng.a", "lib/libpng.a")
|
||||
composer.addfile("lib/libpng.la", "lib/libpng.la")
|
||||
composer.addfile("lib/libpng16.a", "lib/libpng16.a")
|
||||
composer.addfile("lib/libpng16.la", "lib/libpng16.la")
|
||||
composer.add_dir("lib/pkgconfig", "lib/pkgconfig")
|
||||
composer.makedir("bin")
|
||||
composer.addfile("bin/libpng-config", "bin/libpng-config")
|
||||
composer.addfile("bin/libpng16-config", "bin/libpng16-config")
|
||||
composer.add_dir("include", "include")
|
||||
|
||||
|
||||
package("libpng")
|
||||
dep("libz @same-arch")
|
||||
cpp.use_auto_pack(["lib"])
|
||||
|
||||
package("libpng-tools")
|
||||
dep("libpng (same)")
|
||||
on_pack(pack_tools)
|
||||
|
||||
package("libpng-dev")
|
||||
dep("libpng (same)")
|
||||
dep("libz-dev @same-arch")
|
||||
on_pack(pack_dev)
|
||||
@@ -0,0 +1,43 @@
|
||||
import os
|
||||
import shutil
|
||||
|
||||
from lib.make import *
|
||||
from lib import cpp, arch
|
||||
|
||||
|
||||
sdk_version = "1.4.357.0"
|
||||
|
||||
version(sdk_version)
|
||||
description("an API and commands for processing SPIR-V modules")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://github.com/KhronosGroup/SPIRV-Tools/archive/refs/tags/vulkan-sdk-1.4.357.0.tar.gz")
|
||||
|
||||
builddep("shortcut/cmake")
|
||||
builddep("shortcut/c++")
|
||||
builddep(f"spirv-headers (={sdk_version}) @{arch.get_target()}")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.cmake([
|
||||
f"-DSPIRV-Headers_SOURCE_DIR=/lib/{arch.get_target()}",
|
||||
"-DCMAKE_CXX_FLAGS=-Wno-error=switch",
|
||||
f"-DCMAKE_INSTALL_PREFIX={get_prefix('spirv-tools-dev')}",
|
||||
])
|
||||
cpp.ninja()
|
||||
cpp.ninja_install()
|
||||
try:
|
||||
os.rename("lib64", "lib")
|
||||
os.rename("lib32", "lib")
|
||||
except:
|
||||
pass
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
package("spirv-tools")
|
||||
dep("libcxx @same-arch")
|
||||
cpp.use_auto_pack(["bin"])
|
||||
|
||||
package("spirv-tools-dev")
|
||||
dep("spirv-tools (same)")
|
||||
cpp.use_auto_pack(["lib", "dev"])
|
||||
Reference in New Issue
Block a user