pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Useful examples not built in chmlib



Hello.

To the chmlib maintainer:

extract_chmLib is one of the examples that came with chmlib. More than an example like the ones in other packages, this is a very useful program that extracts the html files of the chm document. I've always been able to read the html output in a web browser without any problem so if the document interest me I keep the html version.

chm_http is an html server, so you can use your web browser as a chm viewer without having to extract the document first. For example,

$ chm_http file.chm

And you can point your browser to 0.0.0.0:8080/index.html.

I'm not a user of any product of microsoft, but sometimes I found a book in this format, and these little programs avoid me the nuisance of having to install a chm viewer with its dependencies.

I think that an option to build the examples is a good idea:

--- ../../devel/chmlib/Makefile 2017-08-17 01:00:37.000000000 +0000
+++ Makefile    2018-01-30 16:55:44.519045764 +0000
@@ -17,9 +17,9 @@
 USE_LIBTOOL=   yes

 CONFIGURE_ARGS+=       --disable-io64
+PLIST_SRC=     ${PKGDIR}/PLIST

-INSTALLATION_DIRS=     include lib
-
+.include "options.mk"
 .include "../../mk/pthread.buildlink3.mk"

 .if defined(PTHREAD_TYPE) && ${PTHREAD_TYPE} == "none"

================================================================
$ cat PLIST.examples
@comment $NetBSD$
bin/chm_http
bin/enum_chmLib
bin/enumdir_chmLib
bin/extract_chmLib
bin/test_chmLib

================================================================
$ cat options.mk
PKG_OPTIONS_VAR=        PKG_OPTIONS.chmlib
PKG_SUPPORTED_OPTIONS=  examples

.include "../../mk/bsd.options.mk"

.if !empty(PKG_OPTIONS:Mexamples)
INSTALLATION_DIRS=      include lib bin
PLIST_SRC+=             ${PKGDIR}/PLIST.examples
CONFIGURE_ARGS+=        --enable-examples
.else
INSTALLATION_DIRS=      include lib
.endif

================================================================

Regards,
trebol.


Home | Main Index | Thread Index | Old Index