git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #82249 from caadar/gtklp

gtklp: init at 1.3.4

commit1d0cd06d37a34ff16b72ba15a8598dddf06c9a9e authorDoron Behar <doron.behar@gmail.com> dateSat 6 Mar 2021, 11:19 (6 years ago) parent70a84cb1a4033b
4 files changed+99
pkgs/tools/misc/gtklp/default.nix+52 pkgs/tools/misc/gtklp/patches/autoconf.patch+23 pkgs/tools/misc/gtklp/patches/mdv-fix-str-fmt.patch+22 pkgs/top-level/all-packages.nix+2
pkgs/tools/misc/gtklp/default.nixnew file+52
@@ -0,0 +1,52 @@
1+{ stdenv, lib, fetchurl
2+, autoreconfHook, libtool, pkg-config
3+, gtk2, glib, cups, gettext, openssl
4+}:
5+
6+stdenv.mkDerivation rec {
7+ pname = "gtklp";
8+ version = "1.3.4";
9+
10+ src = fetchurl {
11+ url = "mirror://sourceforge/${pname}/${pname}-${version}.src.tar.gz";
12+ sha256 = "1arvnnvar22ipgnzqqq8xh0kkwyf71q2sfsf0crajpsr8a8601xy";
13+ };
14+
15+ nativeBuildInputs = [
16+ pkg-config
17+ autoreconfHook
18+ ];
19+
20+ buildInputs = [
21+ cups
22+ gettext
23+ glib
24+ gtk2
25+ libtool
26+ openssl
27+ ];
28+
29+ patches = [
30+ ./patches/mdv-fix-str-fmt.patch
31+ ./patches/autoconf.patch
32+ ];
33+
34+ preConfigure = ''
35+ substituteInPlace include/defaults.h --replace "netscape" "firefox"
36+ substituteInPlace include/defaults.h --replace "http://localhost:631/sum.html#STANDARD_OPTIONS" \
37+ "http://localhost:631/help/"
38+ '';
39+
40+ preInstall = ''
41+ install -D -m0644 -t $out/share/doc AUTHORS BUGS ChangeLog README USAGE
42+ '';
43+
44+ meta = with lib; {
45+ description = "A graphical frontend for CUPS";
46+ homepage = "https://gtklp.sirtobi.com";
47+ license = licenses.gpl2Only;
48+ maintainers = with maintainers; [ caadar ];
49+ platforms = platforms.unix;
50+ };
51+
52+}
pkgs/tools/misc/gtklp/patches/autoconf.patchnew file+23
@@ -0,0 +1,23 @@
1+Patch origin: http://sophie.zarb.org/rpms/68e90a72e0052022f558148d97c9ea2a/files/3
2+
3+diff --git a/configure.ac b/configure.ac
4+index b7a30e9..3768ae9 100644
5+--- a/configure.ac
6++++ b/configure.ac
7+@@ -8,6 +8,7 @@ AC_CONFIG_HEADERS([config.h])
8+
9+ AC_CONFIG_MACRO_DIR([m4])
10+ AM_GNU_GETTEXT([external])
11++AM_GNU_GETTEXT_REQUIRE_VERSION([0.21])
12+
13+ dnl Extra params
14+ CUPSCONFIGPATH=""
15+@@ -30,8 +31,6 @@ AC_SUBST(XLIBS)
16+
17+ dnl Checks for header files
18+
19+-dnl internationalization macros
20+-AM_GNU_GETTEXT
21+
22+
23+ # Forte Compiler ############################################################
pkgs/tools/misc/gtklp/patches/mdv-fix-str-fmt.patchnew file+22
@@ -0,0 +1,22 @@
1+Patch source: http://sophie.zarb.org/rpms/68e90a72e0052022f558148d97c9ea2a/files/1
2+
3+--- a/libgtklp/libgtklp.c 2020-08-25 17:31:52.427298559 +0100
4++++ b/libgtklp/libgtklp.c 2020-08-25 17:36:37.728154682 +0100
5+@@ -939,7 +939,7 @@
6+ gtk_widget_show(pixmapwid);
7+
8+ if (strlen(gerror2) == 0)
9+- snprintf(tmplabel, (size_t) MAXLINE, gerror1);
10++ snprintf(tmplabel, (size_t) MAXLINE, "%s", gerror1);
11+ else
12+ snprintf(tmplabel, (size_t) MAXLINE, gerror1, gerror2);
13+ label = gtk_label_new(tmplabel);
14+@@ -973,7 +973,7 @@
15+ #endif
16+ } else {
17+ if (strlen(gerror2) == 0)
18+- g_warning(gerror1);
19++ g_warning("%s", gerror1);
20+ else
21+ g_warning(gerror1, gerror2);
22+ }
pkgs/top-level/all-packages.nix+2
@@ -1362,6 +1362,8 @@ in
13621362
13631363 glyr = callPackage ../tools/audio/glyr { };
13641364
1365+ gtklp = callPackage ../tools/misc/gtklp { };
1366+
13651367 google-amber = callPackage ../tools/graphics/amber { };
13661368
13671369 hakrawler = callPackage ../tools/security/hakrawler { };