Bug 179116 - New port: graphics/xcftools Command-line tools for extracting from Gimp's XCF format
Summary: New port: graphics/xcftools Command-line tools for extracting from Gimp's XCF...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: John Marino
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-30 20:40 UTC by Kalten
Modified: 2014-09-17 20:37 UTC (History)
1 user (show)

See Also:


Attachments
file.shar (5.74 KB, text/plain)
2013-05-30 20:40 UTC, Kalten
no flags Details
xcftools_v03.shar (5.89 KB, application/x-shar)
2013-06-06 01:29 UTC, Kalten
no flags Details
file.dat (3 bytes, text/plain)
2013-06-06 01:29 UTC, Kalten
no flags Details
graphics/xcftools: ShellArchive {v4} (6.94 KB, text/plain)
2014-09-12 01:04 UTC, Kalten
no flags Details
log: make.* output {v4} (8.56 KB, text/plain)
2014-09-12 01:07 UTC, Kalten
no flags Details
log: poudriere testport output {v4} (52.86 KB, text/plain)
2014-09-12 01:08 UTC, Kalten
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kalten 2013-05-30 20:40:00 UTC
Xcftools is a set of command-line tools for extracting information
as well as converting images from the Gimp's native file format XCF.
Works with layered XCF files.
Work independently of the Gimp engine (no Gimp installation needed).

From https://github.com/j-jorge/xcftools

I fear, the Makefile is not totaly OK, as the man/da/man1/*-Files
are not removed on ``make deinstall''.

There is no real release-Version (git-Repository) and my Makefile
just fetches the current version (not so good). I don't know how
to do that in a better way.

Maybe someone could add the port and make my version better ;-)

Thanks!
 Kalten

Fix: Patch attached with submission follows:
Comment 1 Kalten 2013-05-31 21:11:06 UTC
Hello!

There is a new version making use of the GitHub Variables 
USE_GITHUB, GH_ACCOUNT, GH_TAGNAME and GH_COMMIT (and minor other
changes).

Sadly GH_COMMIT is only used for WRKSRC. If master changes, the
``make patch''-command will break, as it will be extracted to the wrong
directory---so far so good. But downloading the commit with the right
sha already stated in GH_COMMIT would be nice (until now I have not
found out, how to create a download url for a commit id, not a tag).

Note: The xcftools code itself does not honour the --disable-nls switch
of configure, so a WITHOUT_NLS knob (as suggested by ``portlint -A'')
does no good.

Not tested in RedPorts yet as the ``Browse source'' states No Node for
me yet (yes, mail address is already stated as confirmed with the token;
I hope, it will work soon).

So: new shell archive here replacing the old one.

Greetings,
      Kalten

>Fix:

--- xcftools_v02.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	xcftools
#	xcftools/files
#	xcftools/files/patch-io-unix.c
#	xcftools/files/patch-xcf2png.c
#	xcftools/files/patch-Makefile.in
#	xcftools/files/patch-test_dotest
#	xcftools/Makefile
#	xcftools/pkg-plist
#	xcftools/pkg-descr
#	xcftools/distinfo
#
echo c - xcftools
mkdir -p xcftools > /dev/null 2>&1
echo c - xcftools/files
mkdir -p xcftools/files > /dev/null 2>&1
echo x - xcftools/files/patch-io-unix.c
sed 's/^X//' >xcftools/files/patch-io-unix.c << 'fcaaf551ce2ab243ceb5c1e52188fa43'
X--- io-unix.c.orig	2013-01-31 14:46:20.000000000 +0100
X+++ io-unix.c	2013-05-27 15:00:57.000000000 +0200
X@@ -106,7 +106,7 @@
X       if( status > 0 ) {
X         fclose(xcfstream) ;
X         xcfstream = 0 ;
X-        FatalGeneric(status,NULL);
X+        FatalGeneric(status,"status=%d",status);
X       }
X     } else {
X       fclose(xcfstream) ;
fcaaf551ce2ab243ceb5c1e52188fa43
echo x - xcftools/files/patch-xcf2png.c
sed 's/^X//' >xcftools/files/patch-xcf2png.c << 'a42e86a4be326dc4c2286bcbedd62443'
X--- xcf2png.c.orig	2013-01-31 14:46:20.000000000 +0100
X+++ xcf2png.c	2013-05-27 15:09:53.000000000 +0200
X@@ -20,6 +20,13 @@
X #include "flatten.h"
X #include "palette.h"
X #include <png.h>
X+#ifndef png_voidp_NULL
X+#define png_voidp_NULL (png_voidp)NULL
X+#endif
X+#ifndef png_error_ptr_NULL
X+#define png_error_ptr_NULL (png_error_ptr)NULL
X+#endif
X+
X #include <stdlib.h>
X #include <string.h>
X #include <locale.h>
a42e86a4be326dc4c2286bcbedd62443
echo x - xcftools/files/patch-Makefile.in
sed 's/^X//' >xcftools/files/patch-Makefile.in << '4287e599f7eaa953e11b89356cbd2e05'
X--- Makefile.in.orig	2013-01-31 14:46:20.000000000 +0100
X+++ Makefile.in	2013-05-30 19:58:00.000000000 +0200
X@@ -36,6 +36,7 @@
X 
X INSTALL			= @INSTALL@ -D
X INSTALL_PROGRAM		= @INSTALL_PROGRAM@
X+INSTALL_SCRIPT		= @INSTALL_SCRIPT@
X INSTALL_DATA		= @INSTALL_DATA@
X 
X RM			= rm -f
X@@ -89,8 +90,8 @@
X 
X install: all
X 	for p in $(BINARIES) ; do \
X-	  case $$p in xcfview) strip= ;; *) strip=-s ;; esac ; \
X-	  $(INSTALL_PROGRAM) $$strip $$p \
X+	  case $$p in xcfview) installer="$(INSTALL_SCRIPT)"; strip= ;; *) installer="$(INSTALL_PROGRAM)"; strip=-s ;; esac ; \
X+	  $$installer $$strip $$p \
X 	    $(DESTDIR)$(bindir)/`echo $$p | $(SED) $(program_transform_name)` \
X 	    || exit 1 ;\
X         done
X@@ -163,7 +164,7 @@
X 	msgfmt -c -o$@ $<
X 
X po/stamp: $(patsubst %,po/%.mo,$(LINGUAS))
X-	if ! make -q po/$(APPNAME).pot ; then \
X+	if ! $(MAKE) -q po/$(APPNAME).pot ; then \
X 	touch po/$(APPNAME).pot ; touch po/*.po ; touch po/*.mo ; fi
X 	touch $@
X 
X@@ -187,7 +188,7 @@
X 	touch $@
X 
X manpo/stamp: $(patsubst %,manpo/%.po,$(MANLINGUAS))
X-	if ! make -q manpo/manpages.pot ; then \
X+	if ! $(MAKE) -q manpo/manpages.pot ; then \
X 	touch manpo/manpages.pot ; touch $^ ; fi
X 	touch $@
X 
4287e599f7eaa953e11b89356cbd2e05
echo x - xcftools/files/patch-test_dotest
sed 's/^X//' >xcftools/files/patch-test_dotest << '5945542d9aa847ec450a557141f9ade0'
X--- test/dotest.orig	2013-01-31 14:46:20.000000000 +0100
X+++ test/dotest	2013-05-27 15:34:37.000000000 +0200
X@@ -1,4 +1,4 @@
X-#! /bin/bash
X+#!/usr/local/bin/bash
X 
X # Regression test for Xcftools
X #
5945542d9aa847ec450a557141f9ade0
echo x - xcftools/Makefile
sed 's/^X//' >xcftools/Makefile << 'f2c575185295cfe5398ef7652fdf85f1'
X# $FreeBSD$
X
XPORTNAME=	xcftools
XPORTVERSION=	0.0
XCATEGORIES=	graphics
X
XMAINTAINER=	kalten@gmx.at
XCOMMENT=	Command-line tools for extracting from Gimp's XCF format
X
XUSE_GITHUB=	yes
XGH_ACCOUNT=	j-jorge
XGH_TAGNAME=	master
XGH_COMMIT=	2c4d3fc
X
XDIST_SUBDIR=	${PORTNAME}
X
XUSE_PERL5=	yes
XUSE_PKGCONFIG=	yes
XUSE_AUTOTOOLS+=	libtool
XGNU_CONFIGURE=	yes
XCONFIGURE_ARGS=
XUSE_GMAKE=	yes
XMAKE_JOBS_SAFE=	no
XUSE_LDCONFIG=	yes
XUSE_GETTEXT=	yes
X
XOPTIONS_DEFINE=	TESTS
XTESTS_DESC=	Run bundled self-tests after build (pulls in graphics/netpbm)
XOPTIONS_DEFAULT=
X
X.include <bsd.port.options.mk>
X
X.if ${PORT_OPTIONS:MTESTS}
XBUILD_DEPENDS+=	pngtopnm:${PORTSDIR}/graphics/netpbm
X.endif
X
XMAN1=		xcf2png.1 xcf2pnm.1 xcfinfo.1 xcfview.1
XMAN1_DA=	xcf2png.1 xcf2pnm.1 xcfinfo.1 xcfview.1
X
XCFLAGS+=	-I${LOCALBASE}/include
XCPPFLAGS+=	-I${LOCALBASE}/include
XLDFLAGS+=	-L${LOCALBASE}/lib -lintl
X
X.include <bsd.port.pre.mk>
X
Xtest check:
X.if  (${PORT_OPTIONS:MTESTS} || defined(PACKAGE_BUILDING))
X	-cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} limits -m 20m ${GMAKE} check
X.endif
X
Xpost-build: check
X
X.include <bsd.port.post.mk>
f2c575185295cfe5398ef7652fdf85f1
echo x - xcftools/pkg-plist
sed 's/^X//' >xcftools/pkg-plist << 'a9508632c813f30af60acf6e7bdf9697'
Xbin/xcf2png
Xbin/xcf2pnm
Xbin/xcfinfo
Xbin/xcfview
Xshare/locale/da/LC_MESSAGES/xcftools.mo
X@dirrmtry man/da/man1
X@dirrmtry man/da
a9508632c813f30af60acf6e7bdf9697
echo x - xcftools/pkg-descr
sed 's/^X//' >xcftools/pkg-descr << 'e7b9d91acff8b3670976296a981c7359'
XXcftools is a set of fast command-line tools for extracting
Xinformation from the Gimp's native file format XCF. The tools
Xare designed to allow efficient use of layered XCF files as
Xsources in a build system that use 'make' and similar tools
Xto manage automatic processing of the graphics. These tools
Xwork independently of the Gimp engine and do not require the
XGimp to even be installed.
X
XWWW: https://github.com/j-jorge/xcftools
e7b9d91acff8b3670976296a981c7359
echo x - xcftools/distinfo
sed 's/^X//' >xcftools/distinfo << '17c2317948a4c2980d1b7557f835925b'
XSHA256 (xcftools/xcftools-0.0.tar.gz) = 94cd21c0e2c5c293042913e3f106a2a875af8edc4d15e2b2ea7d8ae5697cc56f
XSIZE (xcftools/xcftools-0.0.tar.gz) = 275527
17c2317948a4c2980d1b7557f835925b
exit
--- xcftools_v02.shar ends here ---
Comment 2 Kalten 2013-06-06 01:29:53 UTC
Hello again!

Yes, I have entered myself as the maintainer ;-)

> Sadly GH_COMMIT is only used for WRKSRC. If master changes, [...]
Thanks to bdrewery I now know how to do it right (several other ports in
the ports tree do it the wrong way too).
GH_TAGNAME must not be ``master'' but ``${GH_COMMIT}''! (and I have
tested it by using an older git commit id to see whether it works)

As GitHub is currently stuttering, I have added another master site
(dynamic IP, so not good!) to the Makefile.

> Note: The xcftools code itself does not honour the --disable-nls switch
> of configure, so a WITHOUT_NLS knob (as suggested by ``portlint -A'')
> does no good.
That is still true.

> [RedPorts]
Tested: this new version attached to this mail equals r12999 at
https://redports.org/browser/kalten/graphics/xcftools
(well: not all tests for all systems done right now---it takes a long
time ;-))

So: new shell archive here replacing the old one. (sorry for the mess in
the version before this one)

Greetings,
      Kalten
Comment 3 John Marino freebsd_committer 2014-08-07 13:55:33 UTC
Hi, if you are still interested in having this port in FreeBSD, it needs to be reworked to support stage.  
See http://lists.freebsd.org/pipermail/freebsd-ports-announce/2014-May/000080.html


Additionally, you need to provide some sort of quality assurance.    
In order of preference, we are looking for:

1) "poudriere testport" or "poudriere bulk -t" logs
2) Redports or tinderbox logs

Please provide an updated shar file and attach a test log.  Alternatively, please indicate if you are no longer interested in having this software in the Ports Collection and that we can close the PR.

Thanks!
Comment 4 John Marino freebsd_committer 2014-08-24 18:23:26 UTC
I apologize, but I'm going to close all "new port" PRs older than 1 July 2013 that have had no activity, even if it is through no fault of the submitter.  If you are still interested in getting the port into tree, please provide an updated share and some build verification (poudriere logs, redports logs, or Porter's Handbook[1]).  If you do that, we'll fast-track the port into the tree.  I'm sorry about this.


"make check-plist" followed by "make stage-qa" output  (https://www.freebsd.org/doc/en/books/porters-handbook/porting-testing.html)
Comment 5 Kalten 2014-09-12 01:04:07 UTC
Created attachment 147230 [details]
graphics/xcftools: ShellArchive {v4}

Finally I have come up with a new version {v4} for this port.
(New ShellArchive v4_graphics_xcftools.shar attached here).

* I have found out, that there is a version 1.0.8 in patched form and I
  am using that one now (d72ba82 at https://github.com/j-jorge/xcftools)

* manual pages are not built (complicated problems—the Linux-version
  would not build them either)—maybe I will look into the problem at
  some time: it is not that urgent as each executable has a parameter
  “-h” to reveal its usage information.

* NLS is not a configurable option as the code uses it regardless of
  switches—it simply needs nls.

* There are regression tests: but they seem to be faulty (mentioned so
  to the user and off by default)

* LICENSE should be PD (PublicDomain) but there is no such thing until
  now—to end the chaos there I have filed Bug 193573 and shall correct
  it in graphics/xcftools when they will have answered to my report.

* There are tests to ensure quality of the port:
  - »portlint -AC«  (added in this Comment later on)
  - »setenv DEVELOPER yes; make clean; make stage && \
     make check-plist && make stage-qa && make package«
    (will be attached in a couple of minutes)
  - poudriere(8) »testport« output
    (will be attached in a couple of minutes)

And now the output of »portlint -AC« with comments:
------------------------------------------------------------------------
> WARN: Makefile: Consider adding support for a NLS knob to conditionally disable gettext support.
As mentioned above: deactivation of nls is not an option as the code
makes use of nls in any case.

> WARN: Makefile: Consider defining LICENSE.
As mentioned above: should be “PD” (see Bug 193573 and comment in
Makefile regarding “LICENSE=”)

> WARN: Makefile: "LIB_DEPENDS" has to appear earlier.
That is funny: If I alter »#LICENSE=	PD« in the Makefile to
»LICENSE=	GPLv3« the warning regarding LIB_DEPENDS vanishes.
So it seems to be no real fault in the Makefile.

> 0 fatal errors and 3 warnings found.
------------------------------------------------------------------------

Many thanks to the one taking this,
 Kalten
Comment 6 Kalten 2014-09-12 01:07:03 UTC
Created attachment 147231 [details]
log: make.* output {v4}

setenv DEVELOPER yes; make clean; make stage && \
     make check-plist && make stage-qa && make package
Comment 7 Kalten 2014-09-12 01:08:14 UTC
Created attachment 147232 [details]
log: poudriere testport output {v4}
Comment 8 John Marino freebsd_committer 2014-09-12 06:09:46 UTC
Everything looks reasonable!


(In reply to Kalten from comment #5)
> * manual pages are not built (complicated problems—the Linux-version
>   would not build them either)—maybe I will look into the problem at
>   some time: it is not that urgent as each executable has a parameter
>   “-h” to reveal its usage information.

When you revise the port, you might consider pregenerating the manpage and storing it and installing it from the "files" directory.


> * NLS is not a configurable option as the code uses it regardless of
>   switches—it simply needs nls.

okay.


> * There are regression tests: but they seem to be faulty (mentioned so
>   to the user and off by default)

okay.

 
> * LICENSE should be PD (PublicDomain) but there is no such thing until
>   now—to end the chaos there I have filed Bug 193573 and shall correct
>   it in graphics/xcftools when they will have answered to my report.


LICENSE is optional anyway.  However, if you want to see an example of PD license implemented, you can follow the example in textproc/words port.



> > WARN: Makefile: "LIB_DEPENDS" has to appear earlier.
> That is funny: If I alter »#LICENSE=	PD« in the Makefile to
> »LICENSE=	GPLv3« the warning regarding LIB_DEPENDS vanishes.
> So it seems to be no real fault in the Makefile.

It's because PD isn't a defined license most likely.




I'm moving this to the patch-ready pool.
Comment 9 commit-hook freebsd_committer 2014-09-17 20:33:52 UTC
A commit references this bug:

Author: marino
Date: Wed Sep 17 20:33:24 UTC 2014
New revision: 368415
URL: http://svnweb.freebsd.org/changeset/ports/368415

Log:
  Add new port graphics/xcftools

  PR:		179116
  Submitted by:	Kalten (gmx.at)

  Xcftools is a set of fast command-line tools for extracting information
  from the Gimp's native file format XCF. The tools are designed to allow
  efficient use of layered XCF files as sources in a build system that use
  'make' and similar tools to manage automatic processing of the graphics.
  These tools work independently of the Gimp engine and do not require the
  Gimp to even be installed.

Changes:
  head/graphics/Makefile
  head/graphics/xcftools/
  head/graphics/xcftools/Makefile
  head/graphics/xcftools/distinfo
  head/graphics/xcftools/files/
  head/graphics/xcftools/files/patch-src_io-unix.c
  head/graphics/xcftools/files/patch-src_xcf2png.c
  head/graphics/xcftools/files/patch-test_dottest
  head/graphics/xcftools/pkg-descr
Comment 10 John Marino freebsd_committer 2014-09-17 20:37:08 UTC
Thanks!

I reworked most of the Makefile, you should review the changes to be aware of what I didn.
By the way, the MAKE_JOBS_SAFE=no is not longer supported, so I changed that to MAKE_JOBS_UNSAFE=yes.