Bug 211177 - [NEW PORT] archivers/lhasa: Command line tool and library for parsing LHA archives
Summary: [NEW PORT] archivers/lhasa: Command line tool and library for parsing LHA arc...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Dmitry Marakasov
URL: http://fragglet.github.io/lhasa/
Keywords: feature, patch
Depends on:
Blocks:
 
Reported: 2016-07-17 18:05 UTC by Carsten Larsen
Modified: 2016-07-20 19:56 UTC (History)
0 users

See Also:


Attachments
Port source (2.46 KB, text/plain)
2016-07-17 18:05 UTC, Carsten Larsen
no flags Details
Updated shar file (2.75 KB, application/x-shar)
2016-07-19 19:30 UTC, Carsten Larsen
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Carsten Larsen 2016-07-17 18:05:34 UTC
Created attachment 172611 [details]
Port source

Lhasa is a Free Software replacement for the Unix LHA tool, for decompressing
.lzh (LHA / LHarc) and .lzs (LArc) archives. The backend for the tool is a
library, so that it can be reused for other purposes.

Lhasa aims to be compatible with as many types of lzh/lzs archives as possible.
It also aims to generate the same output as the (non-free) Unix LHA tool, so
that it will act as a drop-in free replacement.

WWW: http://fragglet.github.io/lhasa/


portlint: OK ?
        Using hyphen in PORTNAME. consider using PKGNAMEPREFIX and/or PKGNAMESUFFIX

testport: OK
        poudriere: i386,  11.0-BETA1 r302895 (tested)
        poudriere: amd64, 11.0-BETA1 r302895 (tested)
        poudriere: i386,  10.3-p5 (tested)
        poudriere: amd64, 10.3-p5 (tested)
        poudriere: i386,  9.3-p44 (tested)
        poudriere: amd64, 9.3-p44 (tested)
Comment 1 Dmitry Marakasov freebsd_committer freebsd_triage 2016-07-19 15:03:09 UTC
- Please don't duplicate version in DISTNAME, you may refer it via ${PORTVERSION} there
- The port uses autotools, so you should use GNU_CONFIGURE instead of HAS_CONFIGURE. You probably only need --program-suffix=sa CONFIGURE_ARGS, additionally --disable-silent-rules is preferred
- pkgconfig files are located under ${PREFIX}/libdata/pkgconfig, not ${PREFIX}/libdata. Also you can likely fix it in more simple way by using USES=pathfix
- LICENSE_FILE is preferred (= ${WRKSRC}/COPYING)
- Would be nice to (optionally) install some docs (AUTHORS, NEWS, README, TODO), see converters/osm2pgsql as example (PORTDOCS, OPTIONS_DEFINE lines and post-install-DOCS-on target)
Comment 2 Carsten Larsen 2016-07-19 16:43:29 UTC
(In reply to Dmitry Marakasov from comment #1)
Thank you for you feedback. Should I submit changes via patch or simply upload a new shar file ?
Comment 3 Dmitry Marakasov freebsd_committer freebsd_triage 2016-07-19 17:44:42 UTC
(In reply to Carsten Larsen from comment #2)
> (In reply to Dmitry Marakasov from comment #1)
> Thank you for you feedback. Should I submit changes via patch or simply
> upload a new shar file ?

Updated shar would be more convenient. Please don't forget to mark old shar as obsolete.
Comment 4 Carsten Larsen 2016-07-19 19:30:19 UTC
Created attachment 172735 [details]
Updated shar file

Thank you Dmitry.

* Updated shar according to guidelines
* Changed the name to lhasa to reflect those used in Linux distributions
* Updated the package description
* Other minor changes

portlint now reports: looks fine.
poudriere: No errors
Comment 5 Dmitry Marakasov freebsd_committer freebsd_triage 2016-07-20 19:21:39 UTC
What's --disable-libtool-lock for?
Comment 6 Carsten Larsen 2016-07-20 19:43:26 UTC
According to documentation @amdmi:
--disable-libtool-lock  avoid locking (might break parallel builds)

Could be irrelevant. I don't know the inner guts of FreeBSD build environment so well but I was thinking of the -j option.
Comment 7 Carsten Larsen 2016-07-20 19:46:02 UTC
I managed to get rid of the INSTALL_TARGET with the following patch. Maybe its a better way to remove the symbols ?


--- Makefile.orig       2016-07-20 21:41:56.890360870 +0200
+++ Makefile    2016-07-20 21:15:37.855464860 +0200
@@ -19,7 +19,6 @@
 CONFIGURE_ARGS+=--disable-libtool-lock \
                --disable-silent-rules \
                --program-suffix=sa
-INSTALL_TARGET=        install-strip
 
 PORTDOCS=      ChangeLog README AUTHORS TODO NEWS
 
@@ -28,6 +27,9 @@
 post-patch:
        @${REINPLACE_CMD} -e 's|{libdir}|{prefix}/libdata|' ${WRKSRC}/Makefile.am
 
+post-install:
+       @${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/liblhasa.so
+
 post-install-DOCS-on:
        ${MKDIR} ${STAGEDIR}${DOCSDIR}
 .for f in ${PORTDOCS}
Comment 8 Dmitry Marakasov freebsd_committer freebsd_triage 2016-07-20 19:55:40 UTC
(In reply to Carsten Larsen from comment #6)
> According to documentation @amdmi:
> --disable-libtool-lock  avoid locking (might break parallel builds)
> 
> Could be irrelevant. I don't know the inner guts of FreeBSD build
> environment so well but I was thinking of the -j option.

Seen that, it gave me an idea that _using_ this option might break parallel builds.

Found more elaborative description http://tinf2.vub.ac.be/~dvermeir/manual/autobook/autobook-1.2/autobook_86.html, seems like this option may really break parallel builds and is not really needed on FreeBSD.

So removing this and committing with additional minor fixes:
- Really use pathfix instead of manual patching (you're using USES=autoreconf, so you need to specify PATHFIX_MAKEFILEIN to work correctly).
- Silence MKDIR as per porter's handbook
Comment 9 Dmitry Marakasov freebsd_committer freebsd_triage 2016-07-20 19:56:18 UTC
(In reply to Carsten Larsen from comment #7)

> I managed to get rid of the INSTALL_TARGET with the following patch. Maybe
> its a better way to remove the symbols ?

I think INSTALL_TARGET is preferred.
Comment 10 commit-hook freebsd_committer freebsd_triage 2016-07-20 19:56:44 UTC
A commit references this bug:

Author: amdmi3
Date: Wed Jul 20 19:56:27 UTC 2016
New revision: 418852
URL: https://svnweb.freebsd.org/changeset/ports/418852

Log:
  - Add archivers/lhasa

  Lhasa is a command line tool and library for parsing LHA archives.

  Currently it is only possible to decompress archives. Compressing
  LHA archives may be an enhancement for future versions. The aim is
  to be compatible with as many different variants of the LHA file
  format as possible, including LArc (.lzs) and PMarc (.pma).

  The command line tool aims to be interface-compatible with Unix LHA
  tool (command line syntax and output), for backwards compatibility
  with tools that expect particular output.

  WWW: http://fragglet.github.io/lhasa/

  PR:		211177
  Submitted by:	cs@innolan.dk

Changes:
  head/archivers/Makefile
  head/archivers/lhasa/
  head/archivers/lhasa/Makefile
  head/archivers/lhasa/distinfo
  head/archivers/lhasa/pkg-descr
  head/archivers/lhasa/pkg-plist