Bug 196731 - [patch] update science/metaf2xml to 1.56
Summary: [patch] update science/metaf2xml to 1.56
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Pawel Pekala
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-14 17:48 UTC by metaf2xml
Modified: 2015-02-10 20:18 UTC (History)
1 user (show)

See Also:


Attachments
patch to update science/metaf2xml to 1.56 (2.56 KB, patch)
2015-01-14 17:48 UTC, metaf2xml
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description metaf2xml 2015-01-14 17:48:15 UTC
Created attachment 151630 [details]
patch to update science/metaf2xml to 1.56

Attached a proposed patch to upgrade the port for science/metaf2xml to 1.56. The patch has the following changes:

- bump PORTREVISION to 1.56 (pkg-plist, distinfo, Makefile)
- add metaf2xml/bufr.pm (new in 1.56) to pkg-plist
- use WWWDIR instead of PREFIX/www/metaf2xml in MAKE_ARGS
- pass BUILD_ROOT=${STAGEDIR} to make
- this makes files/patch-Makefile obsolete
- remove the targets pre-install and do-install, they seem to be
  unnecessary

Please re-test on FreeBSD (I tested only on a Linux dist, with FreeBSD emulation) and apply the patch. Thanks!
Comment 1 Pawel Pekala freebsd_committer freebsd_triage 2015-02-04 19:41:10 UTC
There are some plist problems:

====> Checking for pkg-plist issues (check-plist)
===> Parsing plist
===> Checking for items in STAGEDIR missing from pkg-plist
Error: Orphaned: man/man3/%%AP_NAME%%::bufr.3pm.gz
===> Checking for items in pkg-plist which are not in STAGEDIR
Error: Missing: %%ETCDIR%%-1.56-apache.conf
===> Error: Plist issues found.
*** Error code 1

Stop.
make: stopped in /usr/local/ports/science/metaf2xml
[blaviken@~/ports/science/metaf2xml]% make showconfig
===> The following configuration options are available for metaf2xml-1.56:
     APACHE=on: Install Apache config file for metaf2xml (depends on Apache)
     DOCS=on: Build and/or install documentation
===> Use 'make config' to modify these settings

Second one occurs only when APACHE=on.
Comment 2 metaf2xml 2015-02-05 17:58:50 UTC
Hi Pawel,

the first error is my fault: I forgot to add man/man3/metaf2xml::bufr.3pm.gz in pkg-plist.

Re. the other one: The file metaf2xml-1.56-apache.conf needs to be installed somewhere. The target directory can be specified via the variable CONF_DIR. In the ports Makefile, CONF_DIR is set to ${PREFIX}/${APACHEETCDIR}/Includes if APACHE=on. If APACHE=off, the default CONF_DIR is used, which is $METAF2XML/etc, and $METAF2XML is set to ${PREFIX} in the ports Makefile, so it will be installed in /usr/local/etc, I assume (which should be fine). If I understand https://www.freebsd.org/doc/en/books/porters-handbook/plist.html#plist-sub correctly, plist can contain %%NO_APACHE%%, so plist should have the following 2 entries for metaf2xml-1.56-apache.conf:

%%APACHE%%%%APACHEETCDIR%%/Includes/metaf2xml-1.56-apache.conf
%%NO_APACHE%%etc/metaf2xml-1.56-apache.conf

Finally, I think %%PORTVERSION%% can be used.

So please try this additional patch for pkg-plist:
--- pkg-plist.orig      2015-02-05 09:38:20.000000000 +0100
+++ pkg-plist   2015-02-05 09:38:32.000000000 +0100
@@ -3,4 +3,4 @@
 bin/metafsrc2raw.pl
-%%APACHE%%%%APACHEETCDIR%%/Includes/metaf2xml-1.56-apache.conf
-etc/metaf2xml-1.56-apache.conf
+%%APACHE%%%%APACHEETCDIR%%/Includes/metaf2xml-%%PORTVERSION%%-apache.conf
+%%NO_APACHE%%etc/metaf2xml-%%PORTVERSION%%-apache.conf
 %%SITE_PERL%%/metaf2xml/bufr.pm
@@ -11,2 +11,3 @@
 man/man1/metafsrc2raw.1.gz
+man/man3/metaf2xml::bufr.3pm.gz
 man/man3/metaf2xml::parser.3pm.gz

HTH.

Thanks and kind regards,
Thomas
Comment 3 commit-hook freebsd_committer freebsd_triage 2015-02-05 20:24:42 UTC
A commit references this bug:

Author: pawel
Date: Thu Feb  5 20:24:23 UTC 2015
New revision: 378490
URL: https://svnweb.freebsd.org/changeset/ports/378490

Log:
  - Update to version 1.56
  - Use PLIST_SUB for version substitution
  - Fix plist when APACHE=on

  PR:		196731
  Submitted by:	metaf2xml@users.sourceforge.net

Changes:
  head/science/metaf2xml/Makefile
  head/science/metaf2xml/distinfo
  head/science/metaf2xml/pkg-plist
Comment 4 Pawel Pekala freebsd_committer freebsd_triage 2015-02-05 20:30:51 UTC
Thanks for update.
Please consider taking maintainership of this port in the future.
Upstream care would be nice ;) 
We provide virtual machine images to ease porting:

https://www.freebsd.org/where.html
Comment 5 metaf2xml 2015-02-10 18:48:25 UTC
Hi Pawel,

thanks a lot for committing! Could you please apply the complete patch and remove "files/patch-Makefile"?

> Please consider taking maintainership of this port in the future.
> Upstream care would be nice ;)

Sorry, but currently I haven't even enough time to work on upstream, so I'm unable to commit myself to maintainership.

Kind regards,
Thomas
Comment 6 commit-hook freebsd_committer freebsd_triage 2015-02-10 20:18:19 UTC
A commit references this bug:

Author: pawel
Date: Tue Feb 10 20:17:18 UTC 2015
New revision: 378796
URL: https://svnweb.freebsd.org/changeset/ports/378796

Log:
  Remove no longer needed patch, this completes r378490.

  PR:		196731
  Submitted by:	metaf2xml@users.sourceforge.net

Changes:
  head/science/metaf2xml/files/