Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions libs/plutosvg/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=plutosvg
PKG_VERSION:=0.0.8
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/sammycage/plutosvg/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=49d5cfe772d3aa10cd4879f2f6e189f5083c08e4c8ea01bf3d5b87c97dfca7d2

PKG_MAINTAINER:=Daniel Golle <[email protected]>
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE

PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1

include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/meson.mk

# plutosvg ships subprojects/plutovg.wrap and declares it as a fallback,
# so a failed dependency check would quietly build and stage a second
# copy of plutovg over the packaged one.
MESON_ARGS += \
--wrap-mode=nofallback \
-Dexamples=disabled \
-Dtests=disabled \
-Dfreetype=disabled

define Package/plutosvg
SECTION:=libs
CATEGORY:=Libraries
TITLE:=SVG rendering library
URL:=https://github.com/sammycage/plutosvg
DEPENDS:=+plutovg
endef

define Package/plutosvg/description
Parses SVG documents and renders them through plutovg. Built without
the optional freetype support, which only serves OpenType SVG glyphs.
endef

define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/plutosvg $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libplutosvg.so* $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/plutosvg.pc $(1)/usr/lib/pkgconfig/
endef

define Package/plutosvg/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libplutosvg.so.* $(1)/usr/lib/
endef

$(eval $(call BuildPackage,plutosvg))
55 changes: 55 additions & 0 deletions libs/plutovg/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=plutovg
PKG_VERSION:=1.3.3
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/sammycage/plutovg/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=2b0d17a6e016f47b86f9c00e2cb82600041b1ea1f7d2a00c2d46ae542cbfed3c

PKG_MAINTAINER:=Daniel Golle <[email protected]>
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE

PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1

include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/meson.mk

MESON_ARGS += \
--wrap-mode=nofallback \
-Dexamples=disabled \
-Dtests=disabled \
-Dfont-face-cache-load=disabled

define Package/plutovg
SECTION:=libs
CATEGORY:=Libraries
TITLE:=2D vector graphics library
URL:=https://github.com/sammycage/plutovg
endef

define Package/plutovg/description
Software rasteriser for 2D vector graphics: path filling, stroking and
dashing, solid, gradient and texture paints, clipping, compositing and
transformations, onto a 32-bit premultiplied ARGB surface that can wrap
memory the caller already owns. Depends on nothing but libc.
endef

define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/plutovg $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libplutovg.so* $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/plutovg.pc $(1)/usr/lib/pkgconfig/
endef

define Package/plutovg/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libplutovg.so.* $(1)/usr/lib/
endef

$(eval $(call BuildPackage,plutovg))
44 changes: 44 additions & 0 deletions libs/ucode-mod-plutosvg/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=ucode-mod-plutosvg
PKG_RELEASE:=1

PKG_MAINTAINER:=Daniel Golle <[email protected]>
PKG_LICENSE:=ISC
PKG_LICENSE_FILES:=LICENSE

include $(INCLUDE_DIR)/package.mk

define Package/ucode-mod-plutosvg
SECTION:=libs
CATEGORY:=Libraries
SUBMENU:=ucode
TITLE:=ucode binding for the plutosvg SVG rendering library
DEPENDS:=+libucode +plutovg +plutosvg +ucode-mod-plutovg
endef

define Package/ucode-mod-plutosvg/description
Exposes the plutosvg document API to ucode scripts: loading SVG
documents from memory or from a file, querying their intrinsic size and
element extents, and rendering a document or a single element onto a
plutovg canvas or into a fresh surface. CSS currentColor and colour
variables can be resolved from a ucode object or callback.
endef

define Build/Configure
endef

define Build/Compile
$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS) \
$(FPIC) -Wall -ffunction-sections -Wl,--gc-sections -shared \
-I$(STAGING_DIR)/usr/include/plutovg \
-o $(PKG_BUILD_DIR)/plutosvg.so $(PKG_BUILD_DIR)/plutosvg.c \
-lplutosvg -lplutovg
endef

define Package/ucode-mod-plutosvg/install
$(INSTALL_DIR) $(1)/usr/lib/ucode
$(CP) $(PKG_BUILD_DIR)/plutosvg.so $(1)/usr/lib/ucode/
endef

$(eval $(call BuildPackage,ucode-mod-plutosvg))
13 changes: 13 additions & 0 deletions libs/ucode-mod-plutosvg/src/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Copyright (C) 2026 Daniel Golle <[email protected]>

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Loading
Loading