mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 19:50:05 +02:00
Libresprite: add recipe (#10588)
This commit is contained in:
113
media-gfx/libresprite/libresprite-1.1~git.recipe
Normal file
113
media-gfx/libresprite/libresprite-1.1~git.recipe
Normal file
@@ -0,0 +1,113 @@
|
||||
SUMMARY="Animated sprite editor & pixel art tool"
|
||||
DESCRIPTION="LibreSprite is a free and open source program for creating and animating your sprites."
|
||||
HOMEPAGE="https://libresprite.github.io"
|
||||
COPYRIGHT="2001-2016 David Capello and Aseprite contributors
|
||||
2016-2024 LibreSprite contributors"
|
||||
LICENSE="GNU GPL v2"
|
||||
REVISION="1"
|
||||
srcGitRev="c99d3666b17ff731824e3eccc79cf3ec48564ad5"
|
||||
SOURCE_URI="https://github.com/LibreSprite/LibreSprite/archive/$srcGitRev.zip"
|
||||
CHECKSUM_SHA256="29c4e8013b2f25ce47b01a6b3890e1b7cd575a6b7c475f055b716de0e9a66c90"
|
||||
SOURCE_DIR="LibreSprite-$srcGitRev"
|
||||
srcGitRev_2="c94997d4d64394833e4b9d21f4573c66600c9a9a"
|
||||
SOURCE_URI_2="https://github.com/aseprite/simpleini/archive/$srcGitRev_2.zip"
|
||||
CHECKSUM_SHA256_2="207117bbc25e25848f2bb4481681cc315f959d074bac61e43b8591ad51dcf954"
|
||||
SOURCE_DIR_2="simpleini-$srcGitRev_2"
|
||||
srcGitRev_3="6f715553e706b61e611aa4ae8e6fe90626800dae"
|
||||
SOURCE_URI_3="https://github.com/LibreSprite/duktape/archive/$srcGitRev_3.zip"
|
||||
CHECKSUM_SHA256_3="e736c47b942028680654fb55633ec7efda617324a5f032be44c05f5060a7a796"
|
||||
SOURCE_DIR_3="duktape-$srcGitRev_3"
|
||||
srcGitRev_4="94693e2414a2c69a8ca16f065240c80a94cc6221"
|
||||
SOURCE_URI_4="https://github.com/aseprite/clip/archive/$srcGitRev_4.zip"
|
||||
CHECKSUM_SHA256_4="8a50617ce9679be1521fe989e70d20f7189cb4ea575f57887344d0bd8a13d6a4"
|
||||
SOURCE_DIR_4="clip-$srcGitRev_4"
|
||||
srcGitRev_5="876ef60df5fec606f8eb0638ee893e4967db4673"
|
||||
SOURCE_URI_5="https://github.com/aseprite/flic/archive/$srcGitRev_5.zip"
|
||||
CHECKSUM_SHA256_5="05861274a408e4c75afba5096e9c6dc0f8e8cde54ea2c005c34ce47e1485d468"
|
||||
SOURCE_DIR_5="flic-$srcGitRev_5"
|
||||
srcGitRev_6="8e03c3cb060120b25517503e6c1d9072686d1cd3"
|
||||
SOURCE_URI_6="https://github.com/dacap/observable/archive/$srcGitRev_6.zip"
|
||||
CHECKSUM_SHA256_6="bf2650ccf78ce3b3f9a668c286026b38bfdf49117dde69c3f79fd9622db674e5"
|
||||
SOURCE_DIR_6="observable-$srcGitRev_6"
|
||||
srcGitRev_7="f39b188e29d0f9adaa49c8705c0f492939d967a9"
|
||||
SOURCE_URI_7="https://github.com/aseprite/undo/archive/$srcGitRev_7.zip"
|
||||
CHECKSUM_SHA256_7="f870af42e3f9983862545c24f8ee9a0dff5a30415a1be06b68445d6ea4c3bc62"
|
||||
SOURCE_DIR_7="undo-$srcGitRev_7"
|
||||
PATCHES="libresprite-1.1~git.patchset"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
libresprite = $portVersion
|
||||
cmd:libresprite = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libarchive$secondaryArchSuffix
|
||||
lib:libcurl$secondaryArchSuffix
|
||||
lib:libfreetype$secondaryArchSuffix
|
||||
lib:libgif$secondaryArchSuffix
|
||||
lib:libgtest$secondaryArchSuffix
|
||||
lib:libjpeg$secondaryArchSuffix
|
||||
lib:libpixman_1$secondaryArchSuffix
|
||||
lib:libpng16$secondaryArchSuffix
|
||||
lib:libSDL2_2.0$secondaryArchSuffix
|
||||
lib:libSDL2_image_2.0$secondaryArchSuffix
|
||||
lib:libtinyxml2$secondaryArchSuffix
|
||||
lib:libv8$secondaryArchSuffix
|
||||
lib:libx11$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
xlibe${secondaryArchSuffix}_devel
|
||||
devel:libarchive$secondaryArchSuffix
|
||||
devel:libcurl$secondaryArchSuffix
|
||||
devel:libfreetype$secondaryArchSuffix
|
||||
devel:libgif$secondaryArchSuffix
|
||||
devel:libgtest$secondaryArchSuffix
|
||||
devel:libjpeg$secondaryArchSuffix
|
||||
devel:libpixman_1$secondaryArchSuffix
|
||||
devel:libpng16$secondaryArchSuffix
|
||||
devel:libSDL2_2.0$secondaryArchSuffix
|
||||
devel:libSDL2_image_2.0$secondaryArchSuffix
|
||||
devel:libtinyxml2$secondaryArchSuffix
|
||||
devel:libv8$secondaryArchSuffix
|
||||
devel:libx11$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
cmd:g++$secondaryArchSuffix
|
||||
cmd:ninja
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
rm -r ./third_party/simpleini ./third_party/duktape
|
||||
ln -sfr ../../sources-2/simpleini-$srcGitRev_2/ ./third_party/simpleini
|
||||
ln -sfr ../../sources-3/duktape-$srcGitRev_3/ ./third_party/duktape
|
||||
rm -r ./src/clip ./src/flic ./src/observable ./src/undo
|
||||
ln -sfr ../../sources-4/clip-$srcGitRev_4/ ./src/clip
|
||||
ln -sfr ../../sources-5/flic-$srcGitRev_5/ ./src/flic
|
||||
ln -sfr ../../sources-6/observable-$srcGitRev_6/ ./src/observable
|
||||
ln -sfr ../../sources-7/undo-$srcGitRev_7/ ./src/undo
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake -G Ninja .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=$prefix
|
||||
ninja libresprite
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd build
|
||||
ninja install libresprite
|
||||
rm -r $prefix/share
|
||||
mkdir -p $dataDir && mkdir -p $appsDir
|
||||
cp -r bin/data/* $dataDir/
|
||||
ln -sfr $prefix/bin/libresprite $appsDir/libresprite
|
||||
addAppDeskbarSymlink $prefix/bin/libresprite LibreSprite
|
||||
}
|
||||
49
media-gfx/libresprite/patches/libresprite-1.1~git.patchset
Normal file
49
media-gfx/libresprite/patches/libresprite-1.1~git.patchset
Normal file
@@ -0,0 +1,49 @@
|
||||
From 62c9e45f22374e5364767d5c6b2c36681a790f3f Mon Sep 17 00:00:00 2001
|
||||
From: sabcha1 <slozoviz@gmail.com>
|
||||
Date: Sat, 8 Jun 2024 20:24:00 +0000
|
||||
Subject: libresprite: initial port
|
||||
|
||||
|
||||
diff --git a/src/app/file_system.cpp b/src/app/file_system.cpp
|
||||
index c79c4af..a7c83cc 100644
|
||||
--- a/src/app/file_system.cpp
|
||||
+++ b/src/app/file_system.cpp
|
||||
@@ -28,6 +28,12 @@
|
||||
#include <cstdio>
|
||||
#include <map>
|
||||
#include <utility>
|
||||
+#include <sys/types.h>
|
||||
+#include <sys/stat.h>
|
||||
+#include <unistd.h>
|
||||
+#include <cstring>
|
||||
+#include <cerrno>
|
||||
+#include <cstdio>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
@@ -461,11 +467,19 @@ const FileItemList& FileItem::children()
|
||||
child = new FileItem(this);
|
||||
|
||||
bool is_folder;
|
||||
- if (entry->d_type == DT_LNK) {
|
||||
- is_folder = base::is_directory(fullfn);
|
||||
+ struct stat file_stat;
|
||||
+
|
||||
+ if(stat(fullfn.c_str(), &file_stat) == -1) {
|
||||
+ perror("stat");
|
||||
+ is_folder = false;
|
||||
}
|
||||
else {
|
||||
- is_folder = (entry->d_type == DT_DIR);
|
||||
+ if(S_ISLNK(file_stat.st_mode)) {
|
||||
+ is_folder = base::is_directory(fullfn);
|
||||
+ }
|
||||
+ else {
|
||||
+ is_folder = S_ISDIR(file_stat.st_mode);
|
||||
+ }
|
||||
}
|
||||
|
||||
child->m_filename = fullfn;
|
||||
--
|
||||
2.45.1
|
||||
|
||||
Reference in New Issue
Block a user