Github messages for voidlinux
 help / color / mirror / Atom feed
From: MIvanchev <MIvanchev@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] New package: LibreSprite-1.0
Date: Tue, 02 Jan 2024 22:45:20 +0100	[thread overview]
Message-ID: <20240102214520.1xQV8W3r09pFMWp7wwrtMsyjSBm-HaS-mPZEXwtbdmc@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-48030@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 676 bytes --]

There is an updated pull request by MIvanchev against master on the void-packages repository

https://github.com/MIvanchev/void-packages libresprite
https://github.com/void-linux/void-packages/pull/48030

New package: LibreSprite-1.0
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)


A patch file from https://github.com/void-linux/void-packages/pull/48030.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libresprite-48030.patch --]
[-- Type: text/x-diff, Size: 9132 bytes --]

From 61553ec37f68ae9af20ff48dacccd35df6f802c1 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Tue, 2 Jan 2024 16:47:39 +0100
Subject: [PATCH] New package: LibreSprite-1.0

---
 srcpkgs/LibreSprite/patches/gen_only.patch | 171 +++++++++++++++++++++
 srcpkgs/LibreSprite/template               |  62 ++++++++
 2 files changed, 233 insertions(+)
 create mode 100644 srcpkgs/LibreSprite/patches/gen_only.patch
 create mode 100644 srcpkgs/LibreSprite/template

diff --git a/srcpkgs/LibreSprite/patches/gen_only.patch b/srcpkgs/LibreSprite/patches/gen_only.patch
new file mode 100644
index 0000000000000..dffd264be5289
--- /dev/null
+++ b/srcpkgs/LibreSprite/patches/gen_only.patch
@@ -0,0 +1,171 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 9966bb0ec..6ef8f9a0a 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -141,6 +141,7 @@ if(APPLE)
+   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
+ endif()
+ 
++if(NOT GEN_ONLY)
+ # zlib
+ find_package(ZLIB REQUIRED)
+ include_directories(${ZLIB_INCLUDE_DIRS})
+@@ -155,12 +156,14 @@ if(WITH_WEBP_SUPPORT)
+   pkg_check_modules(WEBP libwebp REQUIRED)
+   include_directories(${WEBP_INCLUDE_DIR})
+ endif()
++endif()
+ 
+ # tinyxml
+ find_library(TINYXML_LIBRARY NAMES tinyxml)
+ find_path(TINYXML_INCLUDE_DIR NAMES tinyxml.h)
+ include_directories(${TINYXML_INCLUDE_DIR})
+ 
++if(NOT GEN_ONLY)
+ # pixman
+ find_library(PIXMAN_LIBRARY NAMES pixman pixman-1)
+ find_path(PIXMAN_INCLUDE_DIR NAMES pixman.h PATH_SUFFIXES pixman-1)
+@@ -210,6 +213,7 @@ endif()
+ 
+ find_package(CURL REQUIRED)
+ include_directories(${CURL_INCLUDE_DIRS})
++endif()
+ 
+ # simpleini
+ include_directories(${SIMPLEINI_DIR})
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 4186b6478..68e4b9176 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -81,19 +81,23 @@ add_subdirectory(base)
+ # Directory where base/config.h file is located
+ include_directories(${BASE_INCLUDE_DIR})
+ 
++if(NOT GEN_ONLY)
+ add_subdirectory(cfg)
+ add_subdirectory(css)
+ add_subdirectory(doc)
+ add_subdirectory(filters)
+ add_subdirectory(fixmath)
+ add_subdirectory(flic)
++endif()
+ add_subdirectory(gen)
++if(NOT GEN_ONLY)
+ add_subdirectory(gfx)
+ add_subdirectory(net)
+ add_subdirectory(render)
+ add_subdirectory(script)
+ add_subdirectory(she)
+ add_subdirectory(ui)
++endif()
+ add_subdirectory(app)
+ 
+ ######################################################################
+@@ -113,7 +117,7 @@ add_custom_target(copy_data DEPENDS ${out_data_files})
+ 
+ ######################################################################
+ # Aseprite application
+-
++if(NOT GEN_ONLY)
+ if(WIN32)
+   set(win32_resources
+     main/resources_win32.rc
+@@ -136,6 +140,7 @@ install(TARGETS libresprite
+ 
+ install(DIRECTORY ../data
+   DESTINATION share/libresprite)
++endif()
+ 
+ ######################################################################
+ # Tests
+diff --git a/src/app/CMakeLists.txt b/src/app/CMakeLists.txt
+index 4e9bb1880..585633870 100644
+--- a/src/app/CMakeLists.txt
++++ b/src/app/CMakeLists.txt
+@@ -5,6 +5,7 @@
+ file(GLOB widget_files ${CMAKE_SOURCE_DIR}/data/widgets/*.xml)
+ foreach(widget_file ${widget_files})
+   get_filename_component(widget_name ${widget_file} NAME_WE)
++if(GEN_ONLY)
+   set(output_fn ${CMAKE_CURRENT_BINARY_DIR}/${widget_name}.xml.h)
+ 
+   add_custom_command(
+@@ -14,6 +15,9 @@ foreach(widget_file ${widget_files})
+     WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+     MAIN_DEPENDENCY ${widget_file}
+     DEPENDS gen)
++else()
++  set(output_fn ${CMAKE_SOURCE_DIR}/src/app/gen/${widget_name}.xml.h)
++endif()
+ 
+   list(APPEND generated_files ${output_fn})
+ endforeach()
+@@ -21,6 +25,7 @@ endforeach()
+ # Generate preference types from data/pref.xml
+ set(pref_xml ${CMAKE_SOURCE_DIR}/data/pref.xml)
+ 
++if(GEN_ONLY)
+ set(output_fn ${CMAKE_CURRENT_BINARY_DIR}/pref.xml.h)
+ add_custom_command(
+   OUTPUT ${output_fn}
+@@ -29,8 +34,12 @@ add_custom_command(
+   WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+   MAIN_DEPENDENCY ${pref_xml}
+   DEPENDS gen)
++else()
++set(output_fn ${CMAKE_SOURCE_DIR}/src/app/gen/pref.xml.h)
++endif()
+ list(APPEND generated_files ${output_fn})
+ 
++if(GEN_ONLY)
+ set(output_fn ${CMAKE_CURRENT_BINARY_DIR}/pref.xml.cpp)
+ add_custom_command(
+   OUTPUT ${output_fn}
+@@ -39,10 +48,14 @@ add_custom_command(
+   WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+   MAIN_DEPENDENCY ${pref_xml}
+   DEPENDS gen)
++else()
++set(output_fn ${CMAKE_SOURCE_DIR}/src/app/gen/pref.xml.cpp)
++endif()
+ list(APPEND generated_files ${output_fn})
+ 
+ # Generate generated_skin.h from data/skins/default/skin.xml
+ set(skin_xml ${CMAKE_SOURCE_DIR}/data/skins/default/skin.xml)
++if(GEN_ONLY)
+ set(output_fn ${CMAKE_CURRENT_BINARY_DIR}/skin.xml.h)
+ add_custom_command(
+   OUTPUT ${output_fn}
+@@ -51,10 +64,17 @@ add_custom_command(
+   WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+   MAIN_DEPENDENCY ${skin_xml}
+   DEPENDS gen)
++else()
++set(output_fn ${CMAKE_SOURCE_DIR}/src/app/gen/skin.xml.h)
++endif()
+ list(APPEND generated_files ${output_fn})
+ 
++if(GEN_ONLY)
+ # Directory where generated files by "gen" utility will stay.
+ include_directories(${CMAKE_CURRENT_BINARY_DIR})
++else()
++include_directories(${CMAKE_SOURCE_DIR}/src/app/gen)
++endif()
+ 
+ if(WITH_WEBP_SUPPORT)
+   add_definitions(-DASEPRITE_WITH_WEBP_SUPPORT)
+@@ -101,6 +121,9 @@ if(WITH_WEBP_SUPPORT)
+   list(APPEND file_formats file/webp_format.cpp)
+ endif()
+ 
++if(GEN_ONLY)
++add_library(app-lib ${generated_files})
++else()
+ add_library(app-lib
+   app.cpp
+   app_brushes.cpp
+@@ -491,3 +514,4 @@ target_link_libraries(app-lib
+   ${LUA_LIBRARIES}
+   ${V8_LIBRARIES}
+   ${FREETYPE_LIBRARIES})
++endif()
diff --git a/srcpkgs/LibreSprite/template b/srcpkgs/LibreSprite/template
new file mode 100644
index 0000000000000..46f66d8349675
--- /dev/null
+++ b/srcpkgs/LibreSprite/template
@@ -0,0 +1,62 @@
+# Template file for 'LibreSprite'
+pkgname=LibreSprite
+_clipcommit=8175b5b941e93313d093dba7c68a905773e9e76b
+_fliccommit=876ef60df5fec606f8eb0638ee893e4967db4673
+# TODO: Using older commit here due to incompatiblity with the current version
+# Check upon every new version!
+_observablecommit=f5e79fefd465ad722f1ab98705d16e8af8b6a5df
+_undocommit=c868a0238973f04564253133c1cd3689f9aa3913
+_simpleinicommit=9fa7622f41e36105a4c767a7765bb24afec4d6be
+_duktapecommit=6f715553e706b61e611aa4ae8e6fe90626800dae
+version=1.0
+revision=1
+build_style=cmake
+build_helpers=qemu
+configure_args="-DWITH_DESKTOP_INTEGRATION=ON -DCLIP_TESTS=OFF"
+hostmakedepends="pkg-config git"
+makedepends="libpng-devel pixman-devel libcurl-devel SDL2_image-devel tinyxml-devel zlib-devel SDL2-devel freetype-devel lua54-devel giflib-devel libjpeg-turbo-devel gtest-devel"
+depends="desktop-file-utils hicolor-icon-theme"
+short_desc="Animated sprite editor & pixel art tool -- GPL2 Aseprite fork"
+maintainer="Mihail Ivanchev <contact@ivanchev.net>"
+license="GPL-2.0-only"
+homepage="https://libresprite.github.io/"
+distfiles="https://github.com/LibreSprite/LibreSprite/archive/refs/tags/v${version}.tar.gz
+https://github.com/aseprite/clip/archive/${_clipcommit}.zip
+https://github.com/aseprite/flic/archive/${_fliccommit}.zip
+https://github.com/dacap/observable/archive/${_observablecommit}.zip
+https://github.com/aseprite/undo/archive/${_undocommit}.zip
+https://github.com/aseprite/simpleini/archive/${_simpleinicommit}.zip
+https://github.com/LibreSprite/duktape/archive/${_duktapecommit}.zip"
+checksum="7f1fc58ba3c1c7dae384a2e893d0b9d821c6213a5121f263d0964deabd07708e
+ 5d07e4e2102dc3bd073aab2f6e217981f8ccbf3b944a31768ac774dd652f12a5
+ 05861274a408e4c75afba5096e9c6dc0f8e8cde54ea2c005c34ce47e1485d468
+ c5e62c9dabee7b7c2448eb0f612ddd3c26a0007bb32095ca294d77f39629e409
+ bd151d5e0482b704eda33f91dc74c2de5c6339522a2a837ab29100aef796c552
+ d19e2498aa8d55a616e0621c0d59343f59a80e6789edc144915271b874dd887f
+ e736c47b942028680654fb55633ec7efda617324a5f032be44c05f5060a7a796"
+
+# The build involves generating C++ code from XML templates using a tool
+# compiled at an initial stage which doesn't really work with cross-builds.
+# So instead, the files are pre-generated on the host, copied to the source
+# and everything is compiled for the target.
+
+pre_configure() {
+#	mkdir -p build-gen
+#	pushd build-gen
+#	cmake -G Ninja -DGEN_ONLY=ON ..
+#	ninja
+#	popd
+#	mkdir -p src/app/gen
+#	mv build-gen/src/app/*.xml.{h,cpp} src/app/gen
+}
+
+post_extract() {
+	mv -T ${wrksrc}/clip-${_clipcommit} ${wrksrc}/${pkgname}-${version}/src/clip
+	mv -T ${wrksrc}/flic-${_fliccommit} ${wrksrc}/${pkgname}-${version}/src/flic
+	mv -T ${wrksrc}/observable-${_observablecommit} ${wrksrc}/${pkgname}-${version}/src/observable
+	mv -T ${wrksrc}/undo-${_undocommit} ${wrksrc}/${pkgname}-${version}/src/undo
+	mv -T ${wrksrc}/simpleini-${_simpleinicommit} ${wrksrc}/${pkgname}-${version}/third_party/simpleini
+	mv -T ${wrksrc}/duktape-${_duktapecommit} ${wrksrc}/${pkgname}-${version}/third_party/duktape
+	mv ${wrksrc}/${pkgname}-${version}/{*,.[!.]*} ${wrksrc}/
+	rmdir ${wrksrc}/${pkgname}-${version}
+}

  parent reply	other threads:[~2024-01-02 21:45 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-02 15:52 [PR PATCH] " MIvanchev
2024-01-02 15:54 ` MIvanchev
2024-01-02 15:55 ` MIvanchev
2024-01-02 15:56 ` [PR PATCH] [Updated] " MIvanchev
2024-01-02 16:04 ` MIvanchev
2024-01-02 16:10 ` MIvanchev
2024-01-02 21:22 ` MIvanchev
2024-01-02 21:23 ` MIvanchev
2024-01-02 21:45 ` MIvanchev [this message]
2024-01-02 21:46 ` MIvanchev
2024-01-02 21:48 ` MIvanchev
2024-01-02 21:58 ` MIvanchev
2024-01-02 22:06 ` MIvanchev
2024-01-02 22:09 ` MIvanchev
2024-01-02 22:25 ` MIvanchev
2024-01-02 22:26 ` MIvanchev
2024-01-02 22:34 ` MIvanchev
2024-01-03  2:01 ` chrysos349
2024-01-03  8:22 ` [PR PATCH] [Updated] " MIvanchev
2024-01-03 13:40 ` [PR REVIEW] " sgn
2024-01-03 13:40 ` [PR PATCH] [Updated] " sgn
2024-01-03 15:02 ` MIvanchev
2024-01-03 15:08 ` MIvanchev
2024-01-03 15:12 ` [PR PATCH] [Updated] " MIvanchev
2024-02-18 12:07 ` sug0
2024-02-18 12:41 ` [PR PATCH] [Updated] " MIvanchev
2024-02-18 12:45 ` MIvanchev
2024-02-18 12:49 ` MIvanchev
2024-02-18 12:52 ` MIvanchev
2024-02-18 13:01 ` MIvanchev
2024-02-18 13:08 ` MIvanchev
2024-02-18 13:13 ` MIvanchev
2024-02-18 13:18 ` MIvanchev
2024-02-18 13:24 ` MIvanchev
2024-02-18 13:32 ` MIvanchev
2024-02-18 13:32 ` MIvanchev
  -- strict thread matches above, loose matches on Subject: below --
2023-08-06 19:04 [PR PATCH] New package: libresprite-1.0 moheb2000
2023-08-07 17:16 ` [PR PATCH] [Updated] " moheb2000
2023-08-09 13:03 ` moheb2000
2021-12-22  1:54 [PR PATCH] New package: LibreSprite-1.0 notthewave
2021-12-22  1:56 ` [PR PATCH] [Updated] " notthewave
2021-12-27 16:16 ` notthewave
2021-12-27 16:39 ` notthewave
2021-12-27 16:47 ` notthewave

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240102214520.1xQV8W3r09pFMWp7wwrtMsyjSBm-HaS-mPZEXwtbdmc@z \
    --to=mivanchev@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).