git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #40415 from oxij/pkgs/update-uim

uim: 1.8.6 -> 1.8.6-20180501-git, switch to fetchFromGitHub

commit0b439d8d7d423cf8adfc489dc3cfbd7d935fb5e3 authorMatthew Justin Bauer <mjbauer95@gmail.com> dateWed 16 May 2018, 00:54 (9 years ago) parent485fe9e13f4469
2 files changed+76−39
pkgs/tools/inputmethods/uim/data-hook.patch+20−21 pkgs/tools/inputmethods/uim/default.nix+56−18
pkgs/tools/inputmethods/uim/data-hook.patch+20−21
@@ -1,6 +1,6 @@
11--- a/gtk2/immodule/Makefile.in 2015-11-24 16:21:08.967087208 +0900
22+++ b/gtk2/immodule/Makefile.in 2015-11-24 16:22:53.316095150 +0900
3−@@ -806,7 +806,6 @@
3+@@ -928,7 +928,6 @@
44
55 install-data-am: install-moduleLTLIBRARIES
66 @$(NORMAL_INSTALL)
@@ -8,19 +8,18 @@
88 install-dvi: install-dvi-am
99
1010 install-dvi-am:
11−@@ -861,7 +860,7 @@
12− ctags distclean distclean-compile distclean-generic \
13− distclean-libtool distclean-tags distdir dvi dvi-am html \
14− html-am info info-am install install-am install-data \
15−- install-data-am install-data-hook install-dvi install-dvi-am \
16−+ install-data-am install-dvi install-dvi-am \
17− install-exec install-exec-am install-html install-html-am \
18− install-info install-info-am install-man \
19− install-moduleLTLIBRARIES install-pdf install-pdf-am \
20−
11+@@ -993,7 +992,7 @@
12+ distclean-compile distclean-generic distclean-libtool \
13+ distclean-tags distdir dvi dvi-am html html-am info info-am \
14+ install install-am install-data install-data-am \
15+- install-data-hook install-dvi install-dvi-am install-exec \
16++ install-dvi install-dvi-am install-exec \
17+ install-exec-am install-html install-html-am install-info \
18+ install-info-am install-man install-moduleLTLIBRARIES \
19+ install-pdf install-pdf-am install-ps install-ps-am \
2120--- a/gtk3/immodule/Makefile.in 2015-11-24 16:21:08.971087209 +0900
2221+++ b/gtk3/immodule/Makefile.in 2015-11-24 16:23:28.251097832 +0900
23−@@ -824,7 +824,6 @@
22+@@ -896,7 +896,6 @@
2423
2524 install-data-am: install-moduleLTLIBRARIES
2625 @$(NORMAL_INSTALL)
@@ -28,12 +27,12 @@
2827 install-dvi: install-dvi-am
2928
3029 install-dvi-am:
31−@@ -879,7 +878,7 @@
32− ctags distclean distclean-compile distclean-generic \
33− distclean-libtool distclean-tags distdir dvi dvi-am html \
34− html-am info info-am install install-am install-data \
35−- install-data-am install-data-hook install-dvi install-dvi-am \
36−+ install-data-am install-dvi install-dvi-am \
37− install-exec install-exec-am install-html install-html-am \
38− install-info install-info-am install-man \
39− install-moduleLTLIBRARIES install-pdf install-pdf-am
30+@@ -959,7 +958,7 @@
31+ cscopelist-am ctags ctags-am distclean distclean-compile \
32+ distclean-generic distclean-libtool distclean-tags distdir dvi \
33+ dvi-am html html-am info info-am install install-am \
34+- install-data install-data-am install-data-hook install-dvi \
35++ install-data install-data-am install-dvi \
36+ install-dvi-am install-exec install-exec-am install-html \
37+ install-html-am install-info install-info-am install-man \
38+ install-moduleLTLIBRARIES install-pdf install-pdf-am \
pkgs/tools/inputmethods/uim/default.nix+56−18
@@ -1,4 +1,6 @@
1−{ stdenv, fetchurl, intltool, pkgconfig, cmake
1+{ stdenv, fetchFromGitHub
2+, autoconf, automake, intltool, libtool, pkgconfig, cmake
3+, ruby, librsvg
24, ncurses, m17n_lib, m17n_db, expat
35, withAnthy ? true, anthy ? null
46, withGtk ? true
@@ -6,6 +8,7 @@
68, withGtk3 ? withGtk, gtk3 ? null
79, withQt ? true
810, withQt4 ? withQt, qt4 ? null
11+, withQt5 ? false, qt5 ? null
912, withLibnotify ? true, libnotify ? null
1013, withSqlite ? true, sqlite ? null
1114, withNetworking ? true, curl ? null, openssl ? null
@@ -17,10 +20,17 @@
1720
1821with stdenv.lib;
1922
20−assert withAnthy -> anthy != null;
2123assert withGtk2 -> gtk2 != null;
2224assert withGtk3 -> gtk3 != null;
23−assert withQt4 -> qt4 != null;
25+
26+# TODO(@oxij): ./configure can't find both qmakes at the same time
27+# this can be fixed by adding an alias qmake -> qmaka${version} in qmake derivation
28+assert withQt4 -> !withQt5 && qt4 != null;
29+assert withQt5 -> !withQt4 && qt5 != null;
30+
31+assert !withQt5; # fails to build with "Makefile.qmake: No such file or directory"
32+
33+assert withAnthy -> anthy != null;
2434assert withLibnotify -> libnotify != null;
2535assert withSqlite -> sqlite != null;
2636assert withNetworking -> curl != null && openssl != null;
@@ -28,22 +38,32 @@ assert withFFI -> libffi != null;
2838assert withMisc -> libeb != null;
2939
3040stdenv.mkDerivation rec {
31− version = "1.8.6";
41+ version = "1.8.6-20180501-git";
3242 name = "uim-${version}";
3343
44+ src = fetchFromGitHub {
45+ owner = "uim";
46+ repo = "uim";
47+ rev = "c79432cb5aba3a67fb7e7557f4817c749865cc8a";
48+ fetchSubmodules = true;
49+ sha256 = "12rznfwq1mh750i18bl1743c51akyyvy6la5rgrxmrnp0mha9ba5";
50+ };
51+
52+ nativeBuildInputs = [
53+ autoconf automake intltool libtool pkgconfig cmake
54+
55+ ruby # used by sigscheme build to generate function tables
56+ librsvg # used by uim build to generate png pixmaps from svg
57+ ];
58+
3459 buildInputs = [
35− intltool
36− pkgconfig
37− ncurses
38− cmake
39− m17n_lib
40− m17n_db
41− expat
60+ ncurses m17n_lib m17n_db expat
4261 ]
4362 ++ optional withAnthy anthy
4463 ++ optional withGtk2 gtk2
4564 ++ optional withGtk3 gtk3
4665 ++ optional withQt4 qt4
66+ ++ optionals withQt5 [ qt5.qtbase.bin qt5.qtbase.dev ]
4767 ++ optional withLibnotify libnotify
4868 ++ optional withSqlite sqlite
4969 ++ optionals withNetworking [
@@ -52,9 +72,27 @@ stdenv.mkDerivation rec {
5272 ++ optional withFFI libffi
5373 ++ optional withMisc libeb;
5474
75+ prePatch = ''
76+ patchShebangs *.sh */*.sh */*/*.sh
77+
78+ # configure sigscheme in maintainer mode or else some function tables won't get autogenerated
79+ substituteInPlace configure.ac \
80+ --replace "--with-master-pkg=uim --enable-conf=uim" \
81+ "--enable-maintainer-mode --with-master-pkg=uim --enable-conf=uim"
82+
83+ # generate ./configure files
84+ (cd sigscheme/libgcroots; ./autogen.sh)
85+ (cd sigscheme; ./autogen.sh)
86+ ./autogen.sh
87+ '';
88+
5589 patches = [ ./data-hook.patch ];
5690
5791 configureFlags = [
92+ # configure in maintainer mode or else some pixmaps won't get autogenerated
93+ # this should imply the above `--enable-maintainer-mode`, but it does not
94+ "--enable-maintainer-mode"
95+
5896 "--enable-pref"
5997 "--with-skk"
6098 "--with-x"
@@ -68,6 +106,10 @@ stdenv.mkDerivation rec {
68106 "--with-qt4"
69107 "--with-qt4-immodule"
70108 ]
109+ ++ optionals withQt5 [
110+ "--with-qt5"
111+ "--with-qt5-immodule"
112+ ]
71113 ++ optional withLibnotify "--enable-notify=libnotify"
72114 ++ optional withSqlite "--with-sqlite3"
73115 ++ optionals withNetworking [
@@ -87,16 +129,12 @@ stdenv.mkDerivation rec {
87129
88130 dontUseCmakeConfigure = true;
89131
90− src = fetchurl {
91− url = "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/uim/uim-${version}.tar.bz2";
92− sha1 = "43b9dbdead6797880e6cfc9c032ecb2d37d42777";
93− };
94−
95132 meta = with stdenv.lib; {
96− homepage = "https://github.com/uim/uim";
133+ homepage = src.meta.homepage;
97134 description = "A multilingual input method framework";
98135 license = licenses.bsd3;
99− platforms = platforms.linux;
136+ platforms = platforms.unix;
137+ broken = stdenv.hostPlatform.isAarch64; # fails to build libgcroots (not supported on aarch64)
100138 maintainers = with maintainers; [ ericsagnes oxij ];
101139 };
102140}