Lightweight tool for creating APNG files.
Note, the port does NOT require APNG support in libpng (ports/146229). I've tested with and without that patch. Works fine in both cases.
resending as shar archive for convenience --- a.shar begins here --- #!/bin/sh # This is a shell archive echo x graphics/apngasm mkdir -p graphics/apngasm > /dev/null 2>&1 echo x graphics/apngasm/Makefile sed 's/^X//' > graphics/apngasm/Makefile << 'SHAR_END' X# New ports collection makefile for: apngasm X# Date created: 02 May 2010 X# Whom: Anonymous <swell.k@gmail.com> X# X# $FreeBSD$ X# X XPORTNAME= apngasm XPORTVERSION= 2.0 XDISTVERSIONSUFFIX=-src XCATEGORIES= graphics XMASTER_SITES= SF/${PORTNAME}/${PORTVERSION} X XMAINTAINER= swell.k@gmail.com XCOMMENT= Create Animated PNG from a sequence of files X XLIB_DEPENDS= png.6:${PORTSDIR}/graphics/png X XUSE_ZIP= yes XEXTRACT_AFTER_ARGS=-d ${WRKSRC} XUSE_DOS2UNIX= yes XPLIST_FILES= bin/${PORTNAME} X XALL_TARGET= ${PORTNAME} XMAKEFILE= /dev/null XCFLAGS+= -I${LOCALBASE}/include -lpng -lz -L${LOCALBASE}/lib X Xdo-install: .SILENT X ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin/ X X.include <bsd.port.mk> SHAR_END echo x graphics/apngasm/pkg-descr sed 's/^X//' > graphics/apngasm/pkg-descr << 'SHAR_END' XStandalone version of the popular APNG Assembler. Simple command-line Xinterface. No size limits. X XWWW: http://sourceforge.net/projects/apngasm/ SHAR_END echo x graphics/apngasm/distinfo sed 's/^X//' > graphics/apngasm/distinfo << 'SHAR_END' XMD5 (apngasm-2.0-src.zip) = eacbeb064219c6e7fe490abe788ab385 XSHA256 (apngasm-2.0-src.zip) = cc8c33c42115273dc63b7763f8c0b3ab5ec891420fb3ad794b44ade104118c19 XSIZE (apngasm-2.0-src.zip) = 6807 SHAR_END echo x graphics/apngasm/files mkdir -p graphics/apngasm/files > /dev/null 2>&1 echo x graphics/apngasm/files/patch-bswap sed 's/^X//' > graphics/apngasm/files/patch-bswap << 'SHAR_END' X--- apngasm.c~ X+++ apngasm.c X@@ -39,6 +39,10 @@ inline unsigned int swap32(unsigned int X #include <byteswap.h> X inline unsigned short swap16(unsigned short data) {return(bswap_16(data));} X inline unsigned int swap32(unsigned int data) {return(bswap_32(data));} X+#elif defined(__FreeBSD__) X+#include <sys/endian.h> X+inline unsigned short swap16(unsigned short data) {return(bswap16(data));} X+inline unsigned int swap32(unsigned int data) {return(bswap32(data));} X #else X inline unsigned short swap16(unsigned short data) {return((data >> 8) | (data << 8));} X inline unsigned int swap32(unsigned int data) {return((swap16(data) << 16) | swap16(data >> 16));} SHAR_END exit --- a.shar ends here ---
Responsible Changed From-To: freebsd-ports-bugs->amdmi3 I'll take it.
* Anonymous (swell.k@gmail.com) wrote: How about this? --- apngasm.patch begins here --- diff -ruN apngasm.orig/Makefile apngasm/Makefile --- apngasm.orig/Makefile 2010-05-12 22:38:12.000000000 +0400 +++ apngasm/Makefile 2010-05-12 22:40:24.000000000 +0400 @@ -17,15 +17,16 @@ LIB_DEPENDS= png.6:${PORTSDIR}/graphics/png USE_ZIP= yes -EXTRACT_AFTER_ARGS=-d ${WRKSRC} USE_DOS2UNIX= yes +NO_WRKSUBDIR= yes + PLIST_FILES= bin/${PORTNAME} -ALL_TARGET= ${PORTNAME} -MAKEFILE= /dev/null -CFLAGS+= -I${LOCALBASE}/include -lpng -lz -L${LOCALBASE}/lib +do-build: + ${CC} ${CFLAGS} ${WRKSRC}/${PORTNAME}.c -o ${WRKSRC}/${PORTNAME} \ + -I${LOCALBASE}/include -lpng -lz -L${LOCALBASE}/lib -do-install: .SILENT +do-install: ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin/ .include <bsd.port.mk> --- apngasm.patch ends here --- This is a bit less hacky. -- Dmitry Marakasov . 55B5 0596 FF1E 8D84 5F56 9510 D35A 80DD F9D2 F77D amdmi3@amdmi3.ru ..: jabber: amdmi3@jabber.ru http://www.amdmi3.ru
Dmitry Marakasov <amdmi3@amdmi3.ru> writes: > * Anonymous (swell.k@gmail.com) wrote: > > How about this? > > --- apngasm.patch begins here --- > diff -ruN apngasm.orig/Makefile apngasm/Makefile > --- apngasm.orig/Makefile 2010-05-12 22:38:12.000000000 +0400 > +++ apngasm/Makefile 2010-05-12 22:40:24.000000000 +0400 > @@ -17,15 +17,16 @@ > LIB_DEPENDS= png.6:${PORTSDIR}/graphics/png > > USE_ZIP= yes > -EXTRACT_AFTER_ARGS=-d ${WRKSRC} > USE_DOS2UNIX= yes > +NO_WRKSUBDIR= yes > + Good. > PLIST_FILES= bin/${PORTNAME} > > -ALL_TARGET= ${PORTNAME} > -MAKEFILE= /dev/null > -CFLAGS+= -I${LOCALBASE}/include -lpng -lz -L${LOCALBASE}/lib > +do-build: > + ${CC} ${CFLAGS} ${WRKSRC}/${PORTNAME}.c -o ${WRKSRC}/${PORTNAME} \ > + -I${LOCALBASE}/include -lpng -lz -L${LOCALBASE}/lib > It's default behaviour of make(1) (and gmake(1)) when no Makefile is given and inherits all the special handling normal programs would have e.g. .if defined(WITH_CTF) MAKE_ENV+= WITH_CTF= .endif This will not work with your do-build target. > -do-install: .SILENT > +do-install: Good. > ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin/ > > .include <bsd.port.mk> > --- apngasm.patch ends here --- > > This is a bit less hacky.
* Anonymous (swell.k@gmail.com) wrote: > > -ALL_TARGET= ${PORTNAME} > > -MAKEFILE= /dev/null > > -CFLAGS+= -I${LOCALBASE}/include -lpng -lz -L${LOCALBASE}/lib > > +do-build: > > + ${CC} ${CFLAGS} ${WRKSRC}/${PORTNAME}.c -o ${WRKSRC}/${PORTNAME} \ > > + -I${LOCALBASE}/include -lpng -lz -L${LOCALBASE}/lib > > > > It's default behaviour of make(1) (and gmake(1)) when no Makefile is given > and inherits all the special handling normal programs would have e.g. > > .if defined(WITH_CTF) > MAKE_ENV+= WITH_CTF= > .endif > > This will not work with your do-build target. What special handling will it need if there's only single C file? make without makefile just does the same as do-build above, but this way of using it is quite onobvious. -- Dmitry Marakasov . 55B5 0596 FF1E 8D84 5F56 9510 D35A 80DD F9D2 F77D amdmi3@amdmi3.ru ..: jabber: amdmi3@jabber.ru http://www.amdmi3.ru
Dmitry Marakasov <amdmi3@amdmi3.ru> writes: > * Anonymous (swell.k@gmail.com) wrote: > >> > -ALL_TARGET= ${PORTNAME} >> > -MAKEFILE= /dev/null >> > -CFLAGS+= -I${LOCALBASE}/include -lpng -lz -L${LOCALBASE}/lib >> > +do-build: >> > + ${CC} ${CFLAGS} ${WRKSRC}/${PORTNAME}.c -o ${WRKSRC}/${PORTNAME} \ >> > + -I${LOCALBASE}/include -lpng -lz -L${LOCALBASE}/lib >> > >> >> It's default behaviour of make(1) (and gmake(1)) when no Makefile is given >> and inherits all the special handling normal programs would have e.g. >> >> .if defined(WITH_CTF) >> MAKE_ENV+= WITH_CTF= >> .endif >> >> This will not work with your do-build target. > > What special handling will it need if there's only single C file? It will run the program through ctfmerge(1) if you put MAKE_ENV+=WITH_CTF= into make.conf. This is true only for ports that use make(1), though. It's usefulness may be less than WITH_DEBUG= in make.conf but that's until dtrace supports userland tracing. > make without makefile just does the same as do-build above, but this way > of using it is quite onobvious. The feature is pretty known. I remember it mentioned in the first steps of some C tutorial. <http://www2.its.strath.ac.uk/courses/c/subsubsection3_5_2_2.html> I'm not alone in using /dev/null for Makefile: benchmarks/nuttcp net-p2p/ed2k
State Changed From-To: open->closed New port added, with minor changes. Thanks!
amdmi3 2010-05-13 14:47:58 UTC FreeBSD ports repository Modified files: graphics Makefile Added files: graphics/apngasm Makefile distinfo pkg-descr graphics/apngasm/files patch-bswap Log: Standalone version of the popular APNG Assembler. Simple command-line interface. No size limits. WWW: http://sourceforge.net/projects/apngasm/ PR: 146233 Submitteed by: Anonymous <swell.k@gmail.com> Revision Changes Path 1.1326 +1 -0 ports/graphics/Makefile 1.1 +32 -0 ports/graphics/apngasm/Makefile (new) 1.1 +3 -0 ports/graphics/apngasm/distinfo (new) 1.1 +13 -0 ports/graphics/apngasm/files/patch-bswap (new) 1.1 +4 -0 ports/graphics/apngasm/pkg-descr (new) _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"