help2man: help wrapper find libintl on cygwin
This commit is contained in:
parent
33eec8e105
commit
18125e6f50
|
@ -16,8 +16,8 @@ that we're trying to help2man).
|
|||
|
||||
install_preload: install_dirs preload
|
||||
- $(INSTALL_PROGRAM) $(preload).so $(DESTDIR)$(pkglibdir)
|
||||
+ $(INSTALL_PROGRAM) lib/cygintl-8.dll $(DESTDIR)$(pkglibdir)
|
||||
+ ln -sf cygintl-8.dll $(DESTDIR)$(pkglibdir)/$(preload).so
|
||||
+ $(INSTALL_PROGRAM) lib/cygintl-9.dll $(DESTDIR)$(pkglibdir)
|
||||
+ ln -sf cygintl-9.dll $(DESTDIR)$(pkglibdir)/$(preload).so
|
||||
|
||||
install_l10n: install_dirs msg_l10n man_l10n info_l10n
|
||||
set -e; \
|
||||
|
@ -27,8 +27,8 @@ that we're trying to help2man).
|
|||
$(preload).so: $(srcdir)/$(preload).c
|
||||
- $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ -fPIC -shared $? $(LIBS)
|
||||
+ mkdir -p lib
|
||||
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o lib/cygintl-8.dll -shared $? $(LIBS)
|
||||
+ ln -sf lib/cygintl-8.dll $@
|
||||
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o lib/cygintl-9.dll -shared $? $(LIBS)
|
||||
+ ln -sf lib/cygintl-9.dll $@
|
||||
|
||||
man: $(target).1
|
||||
$(target).1: $(srcdir)/$(target).PL $(srcdir)/$(target).h2m.PL
|
||||
|
@ -62,7 +62,7 @@ that we're trying to help2man).
|
|||
return;
|
||||
|
||||
+#ifdef __CYGWIN__
|
||||
+ if (!(RTLD_NEXT = dlopen("/usr/bin/cygintl-8.dll", RTLD_LAZY)))
|
||||
+ if (!(RTLD_NEXT = dlopen("/usr/bin/cygintl-9.dll", RTLD_LAZY)))
|
||||
+ die("libintl8 not found");
|
||||
+#endif
|
||||
+
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchurl, perl, gettext, LocaleGettext, makeWrapper }:
|
||||
{ stdenv, hostPlatform, fetchurl, perl, gettext, LocaleGettext, makeWrapper }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "help2man-1.47.4";
|
||||
|
@ -12,11 +12,12 @@ stdenv.mkDerivation rec {
|
|||
|
||||
doCheck = false; # target `check' is missing
|
||||
|
||||
patches = if stdenv.isCygwin then [ ./1.40.4-cygwin-nls.patch ] else null;
|
||||
patches = if hostPlatform.isCygwin then [ ./1.40.4-cygwin-nls.patch ] else null;
|
||||
|
||||
postInstall =
|
||||
'' wrapProgram "$out/bin/help2man" \
|
||||
--prefix PERL5LIB : "$(echo ${LocaleGettext}/lib/perl*/site_perl)"
|
||||
--prefix PERL5LIB : "$(echo ${LocaleGettext}/lib/perl*/site_perl)" \
|
||||
${stdenv.lib.optionalString hostPlatform.isCygwin "--prefix PATH : ${gettext}/bin"}
|
||||
'';
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue