这是indexloc提供的服务,不要输入任何密码
Skip to content

addpkg(main/farbfeld): Conversion tools for farbfeld image format #24752

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
34 changes: 34 additions & 0 deletions packages/farbfeld/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

TERMUX_PKG_HOMEPAGE=https://tools.suckless.org/farbfeld/
TERMUX_PKG_DESCRIPTION="conversion tools for farbfelt, like netpbm without the complexity"
TERMUX_PKG_LICENSE="ISC"

TERMUX_PKG_MAINTAINER="@termux"

TERMUX_PKG_VERSION=4
TERMUX_PKG_SRCURL=https://dl.suckless.org/farbfeld/farbfeld-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=c7df5921edd121ca5d5b1cf6fb01e430aff9b31242262e4f690d3af72ccbe72a

TERMUX_PKG_DEPENDS=libjpeg-turbo,libpng
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While what you typed seemed to work here for downloading dependencies, It is a little more conventional in termux-packages to format the TERMUX_PKG_DEPENDS like this:

TERMUX_PKG_DEPENDS="libjpeg-turbo, libpng"

# The 2ff(1) script just uses convert(1) to convert to png and then png2ff(1) to convert to farbfeld.
# Without convert(1), we can't even convert PNM to farbfeld!
TERMUX_PKG_RECOMMENDS=imagemagick

# plain Makefile; doesn't seem to support out-of-tree builds?
TERMUX_PKG_BUILD_IN_SRC=true

termux_step_configure() {
# Replace config.mk
cat <<-EOF > config.mk
VERSION = $TERMUX_PKG_VERSION
PREFIX = $PREFIX
MANPREFIX = $PREFIX/share/man
CC = $CC
CPPFLAGS = $CPPFLAGS -D_DEFAULT_SOURCE
CFLAGS = $CFLAGS -std=c99 -pedantic -Wall -Wextra -Os
# We don't need -s: if we want it stripped, we will strip it ourselves.
LDFLAGS = $LDFLAGS
PNG-LDLIBS = -lpng
JPG-LDLIBS = -ljpeg
EOF
}