mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 04:00:05 +02:00
libsquish, new recipe (#5308)
This commit is contained in:
78
media-libs/libsquish/libsquish-1.15.recipe
Normal file
78
media-libs/libsquish/libsquish-1.15.recipe
Normal file
@@ -0,0 +1,78 @@
|
||||
SUMMARY="DTX compression library"
|
||||
DESCRIPTION="The libSquish library compresses images with the DXT standard \
|
||||
(also known as S3TC). This standard is mainly used by OpenGL and DirectX for \
|
||||
the lossy compression of RGBA textures."
|
||||
HOMEPAGE="https://sourceforge.net/projects/libsquish/"
|
||||
COPYRIGHT="2006 Simon Brown"
|
||||
LICENSE="MIT"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://sourceforge.net/projects/libsquish/files/libsquish-$portVersion.tgz"
|
||||
CHECKSUM_SHA256="628796eeba608866183a61d080d46967c9dda6723bc0a3ec52324c85d2147269"
|
||||
SOURCE_DIR=""
|
||||
PATCHES="libsquish-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="x86_gcc2 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
libsquish$secondaryArchSuffix = $portVersion
|
||||
lib:libsquish$secondaryArchSuffix = 0.0
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
"
|
||||
if [ "$effectiveTargetArchitecture" != x86_gcc2 ]; then
|
||||
REQUIRES="$REQUIRES
|
||||
lib:libgomp$secondaryArchSuffix
|
||||
"
|
||||
fi
|
||||
|
||||
PROVIDES_devel="
|
||||
libsquish${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libsquish$secondaryArchSuffix = 0.0
|
||||
"
|
||||
REQUIRES_devel="
|
||||
libsquish$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
cmd:make
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
if [ $effectiveTargetArchitecture = x86_gcc2 ]; then
|
||||
SSE2="-DBUILD_SQUISH_WITH_SSE2=OFF"
|
||||
else
|
||||
SSE2="-DBUILD_SQUISH_WITH_SSE2=ON"
|
||||
fi
|
||||
|
||||
mkdir -p build && cd build
|
||||
cmake -DCMAKE_BUILD_TYPE=Release \
|
||||
$cmakeDirArgs \
|
||||
$SSE2 \
|
||||
-DBUILD_SHARED_LIBS=ON ..
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make -C build install
|
||||
|
||||
prepareInstalledDevelLib libsquish
|
||||
|
||||
packageEntries devel \
|
||||
$developDir
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
cd build
|
||||
./squishtest
|
||||
}
|
||||
32
media-libs/libsquish/patches/libsquish-1.15.patchset
Normal file
32
media-libs/libsquish/patches/libsquish-1.15.patchset
Normal file
@@ -0,0 +1,32 @@
|
||||
From 266b8bb369cbe4033677befd977a580ee2637542 Mon Sep 17 00:00:00 2001
|
||||
From: begasus <begasus@gmail.com>
|
||||
Date: Sun, 4 Oct 2020 11:54:49 +0000
|
||||
Subject: Fix installation paths
|
||||
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index a36e574..2e349cf 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -109,9 +109,15 @@ IF (BUILD_SQUISH_EXTRA)
|
||||
ENDIF (PNG_FOUND)
|
||||
ENDIF (BUILD_SQUISH_EXTRA)
|
||||
|
||||
+INCLUDE(GNUInstallDirs)
|
||||
+mark_as_advanced(CLEAR
|
||||
+ CMAKE_INSTALL_LIBDIR
|
||||
+ CMAKE_INSTALL_INCLUDEDIR
|
||||
+ )
|
||||
+
|
||||
INSTALL(
|
||||
TARGETS squish
|
||||
- LIBRARY DESTINATION lib
|
||||
- ARCHIVE DESTINATION lib
|
||||
- PUBLIC_HEADER DESTINATION include
|
||||
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
+ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
)
|
||||
--
|
||||
2.28.0
|
||||
|
||||
Reference in New Issue
Block a user