gtklp: init at 1.3.4

This commit is contained in:
caadar 2020-10-14 20:57:10 +03:00 committed by scr
parent b19efccaf1
commit 1a4033b73c
4 changed files with 99 additions and 0 deletions

View file

@ -0,0 +1,52 @@
{ stdenv, lib, fetchurl
, autoreconfHook, libtool, pkg-config
, gtk2, glib, cups, gettext, openssl
}:
stdenv.mkDerivation rec {
pname = "gtklp";
version = "1.3.4";
src = fetchurl {
url = "mirror://sourceforge/${pname}/${pname}-${version}.src.tar.gz";
sha256 = "1arvnnvar22ipgnzqqq8xh0kkwyf71q2sfsf0crajpsr8a8601xy";
};
nativeBuildInputs = [
pkg-config
autoreconfHook
];
buildInputs = [
cups
gettext
glib
gtk2
libtool
openssl
];
patches = [
./patches/mdv-fix-str-fmt.patch
./patches/autoconf.patch
];
preConfigure = ''
substituteInPlace include/defaults.h --replace "netscape" "firefox"
substituteInPlace include/defaults.h --replace "http://localhost:631/sum.html#STANDARD_OPTIONS" \
"http://localhost:631/help/"
'';
preInstall = ''
install -D -m0644 -t $out/share/doc AUTHORS BUGS ChangeLog README USAGE
'';
meta = with lib; {
description = "A graphical frontend for CUPS";
homepage = "https://gtklp.sirtobi.com";
license = licenses.gpl2Only;
maintainers = with maintainers; [ caadar ];
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,23 @@
Patch origin: http://sophie.zarb.org/rpms/68e90a72e0052022f558148d97c9ea2a/files/3
diff --git a/configure.ac b/configure.ac
index b7a30e9..3768ae9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8,6 +8,7 @@ AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
AM_GNU_GETTEXT([external])
+AM_GNU_GETTEXT_REQUIRE_VERSION([0.21])
dnl Extra params
CUPSCONFIGPATH=""
@@ -30,8 +31,6 @@ AC_SUBST(XLIBS)
dnl Checks for header files
-dnl internationalization macros
-AM_GNU_GETTEXT
# Forte Compiler ############################################################

View file

@ -0,0 +1,22 @@
Patch source: http://sophie.zarb.org/rpms/68e90a72e0052022f558148d97c9ea2a/files/1
--- a/libgtklp/libgtklp.c 2020-08-25 17:31:52.427298559 +0100
+++ b/libgtklp/libgtklp.c 2020-08-25 17:36:37.728154682 +0100
@@ -939,7 +939,7 @@
gtk_widget_show(pixmapwid);
if (strlen(gerror2) == 0)
- snprintf(tmplabel, (size_t) MAXLINE, gerror1);
+ snprintf(tmplabel, (size_t) MAXLINE, "%s", gerror1);
else
snprintf(tmplabel, (size_t) MAXLINE, gerror1, gerror2);
label = gtk_label_new(tmplabel);
@@ -973,7 +973,7 @@
#endif
} else {
if (strlen(gerror2) == 0)
- g_warning(gerror1);
+ g_warning("%s", gerror1);
else
g_warning(gerror1, gerror2);
}

View file

@ -1104,6 +1104,8 @@ in
glyr = callPackage ../tools/audio/glyr { };
gtklp = callPackage ../tools/misc/gtklp { };
google-amber = callPackage ../tools/graphics/amber { };
hpe-ltfs = callPackage ../tools/backup/hpe-ltfs { };