|
From: Maxim C. <max...@gm...> - 2018-07-02 14:05:07
|
Dear Openjade maintainers,
I've recently tried packaging Openjade for the GNU Guix package manager,
and have found a couple issues:
1. Getopt::Std should be used instead of the legacy getopts.pl in the
"msggen.pl" file.
2. The (language "EN" "US") directive in the testsuite/expr-lang.dsl
would fail since it was trying to find files named "en_US" and not
"en_US.UTF-8". To work around the problem, I had to rename "US" to
"US-UTF-8" in that file.
3. Parallel builds (make -j3, for example) had to be disabled otherwise
there was some build errors.
4. OpenSP had to be enabled explicitly; it would be nicer if the
configure script would attempt a compiler test as in Guix this should
just work as long as the dependencies are provided as inputs.
5. There is no top level 'check' make target as is common for the GNU
build system.
6. The test suite failed its diff test with the following errors:
--8<---------------cut here---------------start------------->8---
starting phase `check'
../jade/openjade -c ../dsssl/catalog -t sgml -d expr-lang.dsl null.sgml > expr-lang.actual
diff expr-lang.actual expr-lang.expected
7c7
< (char<? #\a #\A --> #t
---
> (char<? #\a #\A --> #f
10c10
< (char<=? #\a #\A --> #t
---
> (char<=? #\a #\A --> #f
13c13
< (char>? #\a #\A --> #f
---
> (char>? #\a #\A --> #t
16c16
< (char>=? #\a #\A --> #f
---
> (char>=? #\a #\A --> #t
make: *** [Makefile:11: expr-lang.expected] Error 1
--8<---------------cut here---------------end--------------->8---
I'm not sure what could be at caused. I tried setting the environment
variable LANG to "en_US.UTF-8" but it didn't change the result.
The current Guix package definition for Openjade is listed below for
reference.
Thanks,
Maxim
--8<---------------cut here---------------start------------->8---
(define-public openjade
(package
(name "openjade")
(version "1.3.2")
(source (origin
(method url-fetch)
(uri (string-append "mirror://sourceforge/openjade/openjade/"
version "/" name "-" version ".tar.gz"))
(sha256
(base32
"1l92sfvx1f0wmkbvzv1385y1gb3hh010xksi1iyviyclrjb7jb8x"))))
(build-system gnu-build-system)
(arguments
`(#:configure-flags
(list (string-append "--enable-spincludedir="
(assoc-ref %build-inputs "opensp")
"/include/OpenSP")
(string-append "--enable-splibdir="
(assoc-ref %build-inputs "opensp") "/lib"))
#:parallel-build? #f ;build fails otherwise
;; The test suite fails with diff errors between the actual and
;; expected results, like: (char<? #\a #\A) returning #t rather than
;; #f.
#:tests? #f
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'replace-deprecated-getopt
(lambda _
(substitute* "msggen.pl"
(("use POSIX;") "use POSIX;\nuse Getopt::Std;")
(("do 'getopts.pl';") "")
(("&Getopts") "getopts"))
#t))
(add-after 'replace-deprecated-getopt 'fix-locale-lookup
(lambda _
(substitute* "testsuite/expr-lang.dsl"
(("\\(language \"EN\" \"US\"\\)")
"(language \"EN\" \"US.UTF-8\")"))
#t))
(delete 'check)
(add-after 'install 'check
(lambda* (#:key tests? out #:allow-other-keys)
(if tests?
(with-directory-excursion "testsuite"
(invoke "make"))
(format #t "test suite not run~%"))
#t)))))
(inputs
`(("opensp" ,opensp)))
(native-inputs
`(("perl" ,perl)))
(home-page "http://openjade.sourceforge.net/")
(synopsis "DSSSL implementation")
(description "OpenJade is an implementation of DSSSL, a style language to
format SGML or XML documents. It contains backends for various formats (RTF,
HTML, TeX, MIF, SGML2SGML, and FOT).")
(license license:non-copyleft)))
--8<---------------cut here---------------end--------------->8---
|